Skip to content

✅ fresh

last synced 2026-10-20T11:44:45.791774+00:00 · coverage 96% (application)

Validation by Beadloom doc_sync — same source as sync-check.

Application ​

Use-case orchestration layer. Sits between the interface layer (services/tui) and the domain layer (context_oracle, doc_sync, graph, onboarding). Its modules coordinate multiple domains plus infrastructure to fulfil a use case and hold no business rules of their own.

Layer order: services → application → domains → infrastructure. The application layer may depend on domains and infrastructure (legal top-down); it is never depended upon by a lower layer. Extracting these orchestrators out of infrastructure is what lets infrastructure stay domain-agnostic and restores the DDD Dependency Rule.

Features ​

Each feature has its own SPEC.md:

  • Reindex — full + incremental index rebuild (beadloom reindex).
  • Doctor — graph/data integrity checks (beadloom doctor).
  • Debt Report — weighted architecture-debt score.
  • Watcher — file-watch auto-reindex.
  • Site Generation — the VitePress site generator (beadloom docs site).
  • CI Gate — the unified beadloom ci enforcement gate.
  • Flow Guards — the named-guard primitive the agentic flow binds to (beadloom guard).
  • Wave Plan — decide which beads may run at the same time, and build the clean room each of them measures in (beadloom waves, beadloom clean-room).
  • Review Brief — hand a reviewer the change and the specification, and withhold the author's account until a verdict is recorded (beadloom review-brief).

Specification ​

Modules ​

  • reindex/ — package (decomposed by cohesion in BDL-059 S4 into models, rules_loader, indexing, enrichment, sync_state, change_detection, full, incremental, joined by test_index in BDL-074 C1 and by unread_code in BDL-082 S2a; the package __init__ re-exports the stable public + back-compat surface). reindex(root) performs full reindex: snapshot sync baselines → drop tables → create schema → load graph YAML → record tests: declarations → store deep config → index docs → index code → resolve imports → load rules → analyze git activity → extract API routes → populate file index → index test files → build sync state (with preserved symbol hashes) → populate FTS5 → clear bundle cache → take health snapshot → store parser fingerprint. A layer rule is stored with its exempt: entries since BDL-070 B4, because the architecture view reads its rule from the rules table and asks it which edges to draw red; since BDL-080 its scope and title too, each only when declared. A node matcher's tag_prefix (BDL-080 S2b) is stored the same way, and the two slice rules as {tags} and {tags, segments} (S3c), slice_shape with discouraged beside its segments since BDL-082 S1b, written even when defaulted. A graph node read through a kind alias (kind: site as service, BDL-080 S1a) is reported in ReindexResult.infos, which beadloom reindex prints as an [info] block. The three suite rules of BDL-074 C3 (test_binding, test_import_boundary, scenario_binding) are stored whole as well, with their exemptions, so a reader of the table sees no stricter rule than the one that runs. A route is stored on every node whose source its file lies under by path component, through infrastructure.node_source.NodeSource, the rule git activity and docs polish call too. Until BDL-069 beadloom-rqma.4, enrichment matched by string prefix and gave src/ledger/ the routes of src/ledger_archive/. The route store is the whole answer rather than a merge, so a node that holds no route loses the key and a stale route does not survive an incremental reindex. The file index moved AHEAD of the sync-state build in BDL-061.50 and the order is load bearing: a node's owned files are read from file_index, and a full reindex drops every table first, so populating it last left the FIRST build of a fresh index with an empty table and produced those pairs only on the second run. incremental_reindex(root) updates only changed files; detects parser availability changes via fingerprint comparison and graph YAML changes via _graph_yaml_changed(), triggering full reindex when needed. Backfills symbols_indexed from the live DB (total code_symbols count) so the result reports the true symbol total, not just the per-run delta (mirroring the #88 nodes/edges backfill). Since BDL-074 C1 test_index records the project's test files in their own tables (test_files, test_imports, test_overrides), binds each to a node by the mirror of its path, a node's tests: declaration or, since BDL-074 G2, its place inside a node's source, and rebuilds nodes.extra["tests"] from that binding in the four-key shape; the heuristic _store_test_mappings step is removed. Its placement_counts() delegates to infrastructure.repository.count_test_files_by_placement since BDL-074 C2, because ctx and the debt report state the same counts and neither may import the reindex. Since BDL-074 F1 kind_counts() reads the other_kind files by recorded kind (count_other_kind_test_files), and the reindex Tests: line names each kind with its count (72 acceptance step, 103 self-check) where it used to say bound by other means. Since BDL-074 G2 where the test files are and which files are tests is the test layout of .beadloom/config.yml's tests: block (roots, kind folders, patterns by framework, build-tool test trees, beside_code; since beadloom-2mj3.15 the default roots are tests/, test/ and spec/, joined by a top-level __tests__/ in beadloom-2mj3.17, each read where it exists, and a pattern with a / matches the end of a file's path); the files under a root are never indexed as code, a test beside the code is taken from the code scan, the layout is recorded as meta.test_layout with the roots that exist and, as absent_roots, the ones that do not, and an unusable key or a node's tests: prefix that binds nothing is a reindex warning. Both paths run it after the file index. An index without the test tables is rebuilt in full once, and a test-only change no longer reads as nothing_changed. BDL-078 changed four things. (1) Activity (enrichment): the full reindex passes the part_of containers (get_part_of_containers) and the project's activity.exclude patterns (activity_settings) to analyze_git_activity, stores lines_30d and lines_90d beside the commit counts, reads the clone's history once at the instant it measures (read_git_history, beadloom-btkd.18) and returns it as ReindexResult.activity_history; a shallow history is printed as an Activity: line (beadloom-btkd.9). (2) Imports (beadloom-nh7h): an import resolves against the source files of the tree being indexed, not against code_symbols / file_index as an earlier run left them, and the incremental path re-resolves every stored import of the files it did not touch, so an incremental index and a fresh one resolve every import identically. (3) Manifests (beadloom-jcng): incremental asks graph.import_manifests.manifests_changed(); a changed go.mod, go.work or Package.swift is a change, not nothing_changed, and re-resolves every stored import without re-reading a file. (4) Flat tests (beadloom-76mk): test_index binds a flat Python test by the module it names or the one node its imports reach when the layout declares flat_tests, the Tests: line counts them ((K flat, by the module named or imported)), and unbound_test_files() lists the files bound to no node for init. See the reindex SPEC.

  • doctor.py — run_checks(conn, *, project_root=None) validates graph health with DB checks (empty summaries, unlinked docs, nodes without docs, isolated nodes, symbol drift, NOT-FRESH sync entries — stale and missing, since "No stale sync entries" over a deleted document is the false green the missing verdict exists to end (BDL-UX #174) — source coverage gaps) plus, when project_root is provided, the git_root row (BDL-083 S2e, BDL-UX #325: ERROR when the git root is above the project root, the only built-in check that emits ERROR, so it fails the Gate's doctor step and beadloom doctor exits 1) and an optional "Agent Instructions" check, comparing CLAUDE.md/AGENTS.md factual claims against runtime truth. Four of those claims describe the TARGET project, and until BDL-UX #183 every one of them was audited against Beadloom's state: version vs get_actual_version() (our __version__), packages vs a scan of <project_root>/src/beadloom/, stack vs the literal keyword set {python, sqlite}, and test framework vs the literal string pytest. All four read OK on this repository by coincidence, and a TypeScript adopter with a correct CLAUDE.md was told their stack claim was missing keywords and their test framework was not pytest. They now read the project through onboarding.scanner.project_facts — its declared version, its own src/ packages, its flow.yml stack, and whatever its manifests declare — and a fact the project does not declare is INFO … not verified rather than drift (unknown is not zero, and it is not a verdict either). _check_stack_claim() and _check_test_framework_claim() carry those two; _get_actual_packages() is gone, replaced by detect_source_packages(). get_actual_version() is unchanged and still returns Beadloom's own version — it exists to diagnose Beadloom's version drift (BDL-UX #92) and the defect was always the caller, never that function. nodes_without_docs reports three outcomes, not two (BDL-062 .4): a node with no document is WARNING, a node whose graph YAML records docs_absent: <reason> is INFO with the reason printed — reported, never hidden, so a reader can disagree with the decision — and a node that records a reason while HAVING a document is WARNING again, naming the document, because a suppression that suppresses nothing reads as coverage it does not have. A blank reason is not a reason. The key needs no schema column: the loader stores any key it does not map into nodes.extra.

  • debt_report/ — package (decomposed by cohesion in BDL-059 S4 into models, config, collect, scoring, trend, render; the package __init__ re-exports the public surface). collect_debt_data() aggregates architecture health signals from lint, sync-check, doctor, git activity, and the test binding: since BDL-074 C2 a node is untested when it carries extra["tests"] with no bound test file, and while any test file is unplaced the count is withheld (0) and DebtData.test_population / DebtReport.test_population say why — a node with no bound test may still be tested by an unplaced file. Since BDL-074 G2 that sentence names the folders of the test layout the reindex recorded, and since beadloom-2mj3.15 the population always ends with what a test file is read by — the patterns and the roots that exist, or, with none and tests beside the code read, and it lies beside a node's code, since none of the roots tests, test, spec, __tests__ exists (beadloom-2mj3.17, reworded by beadloom-2mj3.19) — so "all N test file(s) placed" reads as all the files those patterns matched. The Rich report prints it under Test Gaps and the JSON carries it as test_population. compute_debt_score() applies a weighted formula producing a 0-100 debt score with category breakdown, severity classification, and per-node top offenders. format_debt_report()/format_debt_json() render the report. compute_debt_trend() compares against the last graph snapshot. DebtData.layer_populations / DebtReport.layer_populations carry how much of its edge set each declared layer rule judged, in the shared population_phrase wording, because the error and warning counts are counts OVER a population and this collector is one of the two surfaces that call evaluate_all without ever building a LintResult (BDL-070 A4). The Rich report prints them as counted over: ... under Rule Violations and the JSON carries them under layer_populations; they are carried unweighted, because a statement about how much of the graph a count covers is not itself debt. A finding at info, the statement that an import rule is live with nothing to ban (BDL-083 D2), adds to neither the error count nor the warning count, as lint counts it; until BDL-083 S1R Major 2 the collector counted it as a warning. The dormant count keeps its meaning under BDL-078's activity (no change in 90 days): a box is read with its part_of parts, and a change only to files the project declares machine-written (activity_settings) is no change.

  • activity_settings.py — the activity: block of .beadloom/config.yml (BDL-078 beadloom-btkd.1; annotated feature=reindex). read_activity_exclusions(project_root) -> (patterns, refusals) reads activity.exclude, a list of file-name or path patterns of files a machine wrote, and refuses by name a key the block does not read, an exclude: that is not a list and an entry that is not a non-empty string; activity_exclusions(project_root) returns the usable patterns only. The reindex, the debt report's dormant count and the TUI's activity provider read the same patterns from here. A pattern without / matches a file name anywhere; one with / matches the whole path from the root, and * crosses directories, unlike .gitignore. The refusals reach beadloom config-check and the Gate's config-check step, which block on them.

  • import_aliases.py — the imports: block of .beadloom/config.yml (BDL-080 S3a beadloom-cwzc; annotated feature=reindex). read_import_aliases(project_root) -> (aliases, refusals) reads imports.aliases, a mapping of an alias to a project-relative folder or file (. for the root; a trailing / on the alias dropped, so "@/" declares @), and refuses by name an unknown key under imports:, an aliases: that is not a mapping, an alias that is a pattern, empty, or a relative or absolute path, and a value that is not a path to something in the project; import_aliases(project_root) returns the usable (alias, folder) pairs only. The reindex hands them to graph.import_resolver as aliases=, because the graph domain does not read this file's blocks itself and a graph -> doc-sync import would be a peer-domain crossing. The refusals reach beadloom config-check (a block headed "The imports: block of .beadloom/config.yml (N):", exit 1) and the Gate's config-check step (rule import-aliases, blocking, summary "N unusable imports: value(s)"). beadloom init writes the block from a text scan of the project's bundler configs (see the onboarding domain's scanner/alias_scan.py).

  • watcher.py — watch() monitors project files (graph YAML, docs, source) and auto-triggers reindex on changes using watchfiles. Graph changes trigger full reindex; other changes trigger incremental. WatchEvent frozen dataclass captures per-event metadata. DEFAULT_DEBOUNCE_MS constant (500ms).

  • site/ — package: the portal, everything beadloom docs site writes. It is owned by the Site Generation feature, which describes its modules, the architecture.data.json and landscape.data.json contracts and their API. Since BDL-080 site/layer_rules_view.py reads every layer rule from the index, so the data file carries each rule (layer_rules) and the rule that places each node (layer_rule, layer_rule_rank), and an edge is drawn red when any rule finds against it. Since BDL-082 S1a a depends_on edge every import of which goes through the target's @x cross-import API carries via: "@x" in the data file, the fact the reindex recorded on it. BDL-076 K1 moved the portal's modules here from this directory (site.py became site/generate.py, site_pages.py became site/node_pages.py, site_dashboard/ became site/dashboard/, and so on; no shim was left), because their symbols counted against this domain: 183 against a limit of 180 after BDL-076 A1, and 14 after the move, as measured by K1. from beadloom.application.site import generate_site is the entry the CLI uses. Slice 2 of BDL-076 added the modules that make the portal an adopter's: site_config.py (the site: block), forge_routes.py (forge routes, a self-hosted forge declared per host), scaffold.py (the scaffold shipped as package data under src/beadloom/site_scaffold/, written with a marker and never over a hand edit, a file the installed version no longer ships retired with the folders it leaves empty (BDL-080 S2d), and .beadloom/site/ copied last), pages_workflow.py (docs site --pages-workflow), pages_base.py (the base warning), and the project-text path: markdown_links.py, project_text.py, and markdown-it-py read as VitePress reads Markdown in vitepress_markdown.py, markdown_positions.py, markdown_source.py, markdown_attrs.py (where VitePress's markdown-it-attrs would read a brace as attributes, beadloom-ujzb.23) and raw_html.py. Since beadloom-ujzb.23 the project-text path also shows as written an autolink whose text decodes a brace pair, a brace markdown-it-attrs would read, and a fence's info string, and it moves front matter gray-matter cannot parse off the top of a page; site_config.py refuses a repo_url that stops before a repository or runs past one by the forge's address shape (forge_routes.stops_before_repository). Since BDL-078 the data file's node activity carries CARD_ACTIVITY_KEYS = commits_30d, lines_30d, level (architecture_card.py; schema stays 2), and the Pages workflow that pages_workflow.py writes checks the repository out with fetch-depth: 0, because activity is measured on the history the clone holds (beadloom-btkd.9). BDL-080 S4 added six modules: lint_reach.py (lint's totals and the findings bound to no node, the data files' lint) and page_map.py (the pages one run wrote, by section, the dashboard's pages), site_logo.py, repository_icon.py and favicon.py (the portal's logo, the header's forge icon and the favicon), and source_ref.py (which revision the source links name, a branch of origin standing in for a commit no branch of origin holds). The run writes dashboard.data.json after the published documentation, so its page map names every page it wrote. BDL-081 R2 added moved_pages.py: a node page docs site wrote under a section the node's page has left is removed (the page of a node declared kind: site, written under other/ before BDL-080 S1a and under services/ since), never a path .beadloom/site/ provides, and the scaffold line counts it as N moved pages retired.

  • planning_report.py — ONE composition of every check that reads a planning document (BDL-068 S1.4): the five writing-standard checks, the two structural ones, the two axes ones and the two route ones added in S1.5. The docs-quality gate step and beadloom docs quality each assembled the run themselves before this, and two assemblies of one report can disagree about what was checked. applicable is stated for all eleven, because a check reported as 0 finding(s) over a population of zero has verified nothing — and the two route checks report the WORK-ITEM count rather than the document count, because their unit is the folder. Classified as the planning-report component node.

  • doc_shape.py — the shape a project's documents are held to (BDL-061 S4b). section_requirements(project_root) derives the required sections per graph node kind from the composed doc templates and is passed into check_sync; planning_documents / planning_document_globs find the documents the writing-standard checks read (default .claude/development/docs/features/*/*.md, overridable by doc_quality.paths in .beadloom/config.yml); document_section_requirements(project_root) does the same for PLANNING document kinds (BRIEF, RFC, ...), derived from the same composed /templates command; shipped_placeholders derives the placeholder vocabulary from that command's fenced blocks; shipped_decision_sections derives, the same way, the sections the shipped templates put a reason-carrying table under, which is how decision-reason tells a decision table from a measurement table that happens to carry a Reason column (BDL-068 S6, BDL-UX #213). The join lives HERE because onboarding (where the templates are) and doc_sync (where the checks are) are peer domains that must not import each other. Classified as the doc-shape-requirements component node.

  • doc_spaces.py — the TO-BE → AS-IS relation (BDL-061 S5). check_spaces(project_root, *, spaces, known_refs, documented_refs, declared_doc_paths, beads_by_epic) is the pure core: it classifies every document into its space and reports an epic with at least one closed bead that declared a graph node with no AS-IS document — intent recorded, work finished, reality never written down. The join is read ONLY from the epic CONTEXT.md/BRIEF.md Related Files section, because that list is a declaration. The unscoped version was measured first, over 60 epic directories. It attributed the ref status to nine of them whose documents merely used the English word, which is the false-positive class BDL-UX #169 and #190 already record against the audit scanner. An epic is a TO-BE DIRECTORY, not a directory carrying a CONTEXT.md: the narrower reading left four of this repository's 61 directories in no field of the report while their documents stayed in the TO-BE population, and unresolved_reasons now says which of three situations each unresolved epic is in — the document declares no node, the directory carries none of the configured intent_documents, or the one it carries cannot be decoded (reported as intent_document_unreadable, since a document that is there and unreadable is a defect while a directory that is not an epic is not). An epic declaring nothing is counted as unresolved, never as clean, and relation_checked says whether the relation had anything to relate at all. An epic the tracker does not NAME is a third state rather than an epic with no closed beads: EpicIntent.unknown_status_reason says which of the two ways its statuses are unknown, epics_unknown_to_tracker names them, and one that declares a node is reported as epic_not_in_tracker — bd close writes only the local database, so an epic leaves .beads/issues.jsonl by ordinary use and the relation would otherwise stop checking it in silence. TrackerRead / read_tracker_export carry the statuses together with the source that answered, because the gate reads the committed export and the command prefers the live bd database. It also audits the WORKING declaration two ways: an exemption a project declared that matches no document — asked of EACH declared kind and EACH declared root, since liveness asked of a whole declaration is answered by its luckiest half and one ACTIVE.md made a kinds: [ACTIVE, SPEC] line covering 39 SPEC.md files report nothing (working_exemption_inert, with working_reach carrying how many documents each declared half excused) — and a document the graph declares as a node's documentation while the config declares it ephemeral (working_declaration_contradicted). A document whose kind places it in a space whose roots exclude it is counted in that space and the disagreement is reported as document_outside_declared_root, one finding per kind with the count and up to five paths, because such a document used to be in no population at all (beadloom-mr2l.77). pairs_excused is a count of sync PAIRS and arrives as an argument from whoever ran check_sync, never recomputed here: one run printed exempt: 0 and 55 WORKING document(s) exempt two lines apart about one tree, and a caller that ran no freshness check passes None so the surface makes no pair claim. spaces_report(conn, project_root, *, beads, tracker_source, pairs_excused) runs it over a live index; graph_facts(conn) supplies the three graph sets; jsonl_records / beads_by_epic read and group the tracker export. It lives HERE because the answer joins the graph, the tracker and infrastructure/doc_roots.py — three readers no single domain owns. Classified as the doc-spaces component node.

  • intent_reader.py — the adapter that carries recorded intent into a context bundle (BDL-061 .87). read_intent(project_root, *, known_refs) reads the TO-BE space through doc_spaces.read_epic_intents — the same declaration join, never a second one — and returns the port type context_oracle.intent.IntentReading: the declarations, how many epics were read and how many of them declare any node at all. read_node_intent(conn, project_root) is the one call a surface makes, resolving the graph's vocabulary from the index first, so a backticked token naming no node is not mistaken for a declaration. It lives HERE and the policy lives in context_oracle because a domain must not reach up into application; the port types are declared in the domain and this fills them. The tracker is deliberately NOT read: bd close writes only the local database, so the committed export and the live tracker disagree on a branch and a bead status shown inside ctx would be confidently wrong where the work is happening — and the export costs 2.7 MB and 15 ms per cold bundle for a fact that does not change which epic declared the node. Measured on this repository: 61 epics read in 25 ms, against a build_context of 8.5 ms, paid on a cold bundle only. Classified as the intent-reader component node.

  • mutation_scope/ — whether a declared mutation target could run a single mutant, and what a run over it produced (BDL-061 S4b + BDL-068 S3.1, CONTEXT Q5). Beadloom owns no mutation runner — the tool is the project's choice — so it owns the role duty, the scope convention and this check: check_mutation_scope(project_root) reports mutation-outside-source, mutation-target-missing and mutation-zero-mutants, all warn, against mutation.targets in .beadloom/flow.yml and scan_paths/languages in .beadloom/config.yml. Surfaced by config-check (CLI and gate); it runs BEFORE the gate step's database guard, because a declaration is checkable against the tree whether or not the index was built. score.py is the half that answers what a run PRODUCED: report_mutation_score(project_root, run) holds the counters a runner wrote against the declared targets and reports mutation-target-unmeasured, mutation-run-zero-mutants and mutation-counters-missing, all warn. Three rules decide what the number means: a missing counter is reported rather than read as zero (read as zero it scores "0%", and a number is what gets pasted into a bead comment), a timeout counts as killed while a mutant no test covers does not (leaving that class out of the denominator is how a slice with no tests scores 100%), and the report names the ROOM it was measured in, derived from the platform and the interpreter rather than typed by the caller. The counter vocabulary is NAMES, not a tool: nothing under src/ imports a runner. Since BDL-068 S3.3 report_mutation_score also folds check_mutation_scope over the targets the run is answerable for (filtered by --only), so the three SCOPE findings reach the score and not only config-check: before that a target naming a path the code had moved away from scored 100.0% at exit 0. Two further empty populations report there too — a run that produced mutants and reached a verdict on none of them, and a counter that is negative, which divided to "125.0% of -4 scored mutants". Surfaced by beadloom mutation, which names the room on every report it produces including the one carrying no run. Since BDL-074 D1 a run can cover less than the whole scope and say which part: touched.py (changed_lines, touched_functions) maps a unified diff to the functions its lines fall in; change.py (diff_since, plan_change → ChangePlan) states a change's population since the merge base with a ref — the touched functions in the declared scope, the node owning each, the test files the binding ties to that node whatever placement bound them, and since BDL-074 G1 the acceptance step files whose loaded scenarios carry that node's @node: tag (NodeSelection.acceptance_tests, read by acceptance.py's acceptance_files_by_node from the literal pytest-bdd scenarios()/scenario() paths a step file hands over) and the unplaced test files alone as the runner's fallback (unplaced_tests, which replaced unbound_tests: a self-check or an acceptance step file is never the fallback). Since BDL-074 F1 the plan also carries test_placements and other_kinds, so the Binding: line states the unplaced count ctx and the debt report state (context_oracle.test_binding.describe_unbound, over the recorded layout ChangePlan.test_layout since beadloom-2mj3.15), with unowned files and each kind named beside it rather than folded into one number; survivors.py (read_survivors, survivors_by_node) lists survivors under the node owning their file; sample.py (wilson_interval, sample_interval) states the 95% Wilson interval of a score measured on a random sample. scope.lies_within (formerly score._is_covered) is the one path-containment rule both the score and the change use. Classified as the mutation-scope component node.

  • active_table/ — package: the shared ACTIVE.md bead-status table parser/updater + the pure reconcile-from-bd core (BDL-053). It was a single active_table.py until BDL-068 S5, whose own docstring already needed an "and" to describe itself; the file moved with git mv and __init__.py re-exports the whole public surface, so no import path outside the package changed. Five modules, one responsibility each: row_ids.py (the bead id a row names, and what the row names when it names none), table.py (the markdown table, its Status column, one cell write), statuses.py (the state a Status cell states and the bd status it comes from), reconcile.py (the reconcile core) and staging.py (what a reconcile may stage, which is never more than the commit already carries). split_table_row/is_separator_cells are the markdown row primitives; set_active_table_status(path, bead_id, status) flips one bead's Status cell by whole-token bead-id match (the extracted MCP S4 behaviour, byte-identical — services/mcp_server.py re-exports them for back-compat); bd_status_to_cell(bd_status) is the documented bd-status → Status-cell map (closed → ✓ done, in_progress → in progress, blocked → blocked, open/ready → ready; unknown → None); resolve_row_bead_id(cell, bd_statuses, *, prefix=None) is the single place that maps the tracker's beadloom-mr2l.22 onto a table's abbreviated .22, because comparing the two as whole strings matched nothing for the whole of BDL-053's life. reconcile_active_tables(project_root, bd_statuses, *, epic=None) discovers ACTIVE.md files (one epic or every features/*/ACTIVE.md), locates the bead-status table's Status column by header index (3- or 4-col), and rewrites only the cells whose state drifts from the injected bd statuses — preserving a richer note when the state already agrees — returning a ReconcileResult for --check vs fix. Since BDL-068 S5 that result states "no row at all" and "a row this run could not read" as two populations rather than one: on this repository the single number 79 became 41 unlisted beads and 38 beads a row names but no run could resolve, and one run reporting both of a single row is the defect the split removes. Best-effort: never raises, touches only Status cells (prose/Progress Log/other columns byte-preserved). Classified as the active-table component node (its own DOC.md).

  • gate.py — run_ci_gate(project_root, *, fail_on, hub_exports, no_reindex) is the unified CI enforcement gate (the beadloom ci orchestrator). It composes the existing checkers IN ORDER — reindex (unless no_reindex) → lint --strict → sync-check → docs audit → docs-quality (BDL-061 S4b: the five writing-standard checks over the project's planning documents; warn only, so it never blocks, and a project with no planning document is a NAMED skip). Its summary states four silences the finding count cannot: NOT CHECKED for a check that read nothing anywhere, NO CHECK READS for a document KIND no content check enters, NOT CLASSIFIED: N table(s), M row(s) for a table decision-reason could not place as a table of decisions (BDL-UX #213 — a Reason column does not make a table a decision table, and a measurement row judged as one is a false positive against honest documentation), and UNREADABLE: N for documents nothing could decode — each sets not_verified, so the step reports WARN rather than PASS → issue-log (BDL-068 S6: the issue log's numbers — duplicate-number, unwritten-claim and unclaimed-number — which BLOCKS where its two document neighbours only warn, because a duplicate number is a reference that resolves to two entries and to neither rather than an opinion about prose, and every leg's repair fits in the commit that trips it. A project that declares no issue_log: block is a NAMED skip, so the upgrade shipping the step reddens nobody — while a project that declared the block and mistyped a key reached that same skip until beadloom-rqma.7 and now fails with 0 leg(s) run; 1 entr(ies) declared, 1 unusable: issue_log (...), BDL-UX #270 — and not_verified says when the ledger has no floor and two of the three legs entered no number. Its line also states the PARTIAL case since beadloom-l9ee — PARTLY CHECKED: 235 of 241 entr(ies) are below floor 262, where unclaimed-number did not enter — because that leg skips every entry below the floor by design and the summary said nothing about how many, so a clean list over five entries sat under a header naming 240, BDL-UX #267) → readme-pair (BDL-069 S4: the document pairs a project DECLARES under document_pairs: in .beadloom/config.yml, compared by SHAPE — the sequence of blocks each document is built from — and never by text, because the files are in two languages and a text comparison is a check somebody has to switch off. It BLOCKS for the issue-log reason rather than the docs-quality one: a block one document has and the other does not is a statement one language makes and the other does not, and the repair fits in the commit that trips it. A declared path nothing could read fails too, because a declaration pointing at nothing would otherwise report 0 finding(s) having compared no document at all. A project that declares no pair is a NAMED skip, so the upgrade shipping the step reddens nobody, and a project that declared one BADLY is a different project: four ways of mistyping the block reached that skip word for word — beadloom ci exited 0 on all four, measured at HEAD on a foreign two-package project — and each is a finding now whose line carries 1 entr(ies) declared, 1 unusable: document_pairs[0] (...), because what tells declared none from declared badly has to be a count rather than an adverb (beadloom-rqma.7). Both legs read their declaration through doc-sync/components/config-declarations, so the rule about what a misdeclaration costs has one home; a .beadloom/config.yml that will not parse is the one case that still skips, WARNing and naming the file rather than reddening a project that may never have written the key. Its line states the population and not only the verdict — 1 pair(s) held, 109 block(s) compared, 0 finding(s); README.ru.md <-> README.md (109 block(s)), measured on this repository 2026-09-11 — with UNREADABLE: naming each declared path nothing read and NOT COMPARED: counting the pairs whose two files were read and hold no block between them, the second of which sets not_verified so the step reports WARN rather than PASS) → doc-spaces (BDL-061 S5: the TO-BE → AS-IS relation; warn only, a NAMED skip on a project with no TO-BE document, and not_verified when no tracker export was readable, when no epic with closed beads declared a node, when some epics declare none, or when the tracker does not name some of them at all — four ways to print no findings while having checked nothing, each with its own clause because the boolean saturates). Its tracker read is the committed .beads/issues.jsonl export rather than a bd subprocess, so the gate gives the same answer in a fresh CI checkout with no tracker installed, and the line names it. The sync-check line states what a WORKING declaration EXCUSED, with the reason it was declared with: the exempt verdict was in no count any surface printed, which is the shape this summary had already been rewritten against once (beadloom-mr2l.76). That count is carried on GateStep.pairs_excused and handed to the doc-spaces step, whose line names two populations apart — N WORKING document(s) in the exempt space, M sync pair(s) excused — because one word had stood for both and the two lines of one run said 55 and 0 (beadloom-mr2l.77) → scope-check (BDL-068 S1.6: the paths this BRANCH changes against its base, judged against the ## Axes its work item declared; warn only, and a run that found no branch, no work item, no index, no section or no owned path at all is a NAMED skip rather than a pass). Branch-scoped and not tree-scoped, because the tree is shared by several agents and <base>...HEAD is what the pull request contains. Since BDL-083 S1d the base is scope_base()'s — the merge-base with the branch this one was cut from, else the trunk — and the line ends with it and the files it attributed to the parent branch (BDL-UX #330); in CI the branch comes from the pull or merge request, so the step judges a detached checkout instead of skipping it (BDL-UX #300) → config-check (AgentConfigAsCode, which also carries the mutation-SCOPE findings and, since BDL-076 B1, every refused value of the site: block as the blocking rule site-config, and since BDL-078 beadloom-btkd.1 every refused value of the activity: block as the blocking rule activity-settings, summarised N unusable `activity:` value(s), and since BDL-080 S3a beadloom-cwzc every refused entry of the imports: block as the blocking rule import-aliases, summarised N unusable `imports:` value(s); since BDL-083 S2c the summary ends with the sentence claude_md_comparison(...).describe() writes, naming .claude/CLAUDE.md, the flow configuration it was composed from and the project name with its source, BDL-UX #334) → doctor (graph/data integrity; only ERROR-severity checks fail the gate, so advisory WARNING/INFO checks never block — no false gate) → (when hub_exports given) federate --fail-on — into one GateResult whose .ok is True only when every step passed. It ORCHESTRATES existing domain code; it reimplements no checker (the doctor step reuses doctor.run_checks). Honesty invariants: no short-circuit (every step runs and ALL findings are collected even after an earlier failure) and no silent skip (each GateStep records PASS/WARN/FAIL/SKIP, where WARN is a step that ran, found nothing wrong, and could not check part of what it reports on — unverifiable is not clean, BDL-UX #174/#175). The docs-audit line names a third population beside its fraction — NOT APPLICABLE to this project: <facts> — because a fact the registry could not compute used to leave the denominator without a trace, and an unregistered CLI surface was measured turning 3/9 declared fact(s) verified into 3/8 in silence. It names a fourth since BDL-068 .81 — COULD NOT JUDGE N version token(s) naming <subject> — unconfirmed here — for a version whose subject the ENVIRONMENT could not confirm in this directory: git is derived from a .git a git archive export cannot carry, so git 2.49.0 was judged against this project's version and every clean-room Gate run on this repository was rc 1 for one line of one document (BDL-UX #266). An unconfirmed subject is unresolved rather than absent, and the declined token is reported rather than silenced. The lint line carries _population_note beside _suppressed_note, both taken from the linter's own formatter so the Gate line cannot drift from the command it summarises; unlike the suppressed clause it is present at FULL reach as well, because a population is the denominator of the counts beside it and 16 of 362 and 362 of 362 read alike when neither is printed (BDL-070 A4). Findings are projected to the shared agent-actionable shape {kind, rule, severity, node, locations, why, remediation} (reused from graph/linter.py) uniformly across all steps, so --format json/github are identical regardless of which step produced a finding. Since BDL-078 beadloom-btkd.9 the reindex step names a shallow clone whenever its run falls back to a full rebuild (as on a fresh checkout): its summary gains ; activity <note> (git_activity.activity_history_note), and the step reports WARN (not_verified) when the clone does not reach back over the 90-day window, so activity was not measured.

  • graph_reads.py — the application-layer read facade over the infrastructure the presentation layer reads (BDL-059 S2). Presentation code (tui/) must not read SQLite directly (the tui-no-direct-infra boundary), so it consumes graph-index data — nodes, edges, symbols, hierarchy — through this facade, which delegates to infrastructure/repository.py. Read-only; returns the repository's typed rows. Keeps the data-access seam in one place and the dependency direction honest (presentation → application → infrastructure). Since BDL-UX #172 it also passes through analyze_git_activity / GitActivity from infrastructure/git_activity.py: repairing that boundary rule's dead to: glob made it fire on the TUI's one remaining direct infrastructure import (tui/data_providers.py), and a second facade module for a single read would be indirection for its own sake. Since BDL-078 it also re-exports get_part_of_containers, NO_CHANGE_WORDS and count_in_words, so the TUI words a level and rolls a box up as ctx and the card do.

  • guards/ — package: the flow-guard primitive (BDL-061 S1). evaluate_guard(...) turns a check outcome, the guards: block of .beadloom/flow.yml and the request context into a GuardVerdict whose exit code a harness acts on. run_invocation(...) is the one boundary every beadloom guard invocation returns through, so a failure anywhere becomes a recorded verdict rather than a traceback. Checks read the world only through the ports in contract.py — the real bd/git probes live in services/guard_probes.py, because the application layer must not import the services layer. See the Flow Guards SPEC. Two of the boundary's inputs are deliberately not ambient (BDL-061.36): the hook payload arrives as bytes and is decoded inside the boundary with errors='strict', so an undecodable event is refused under every locale rather than only under a UTF-8 one; and paths.py catches Exception around Path.resolve(), so a symlink loop — which raises RuntimeError on 3.10–3.12 and raises nothing on 3.13 — is a stated refusal on every interpreter. firing.py bounds the record it writes (BDL-061.56): the active guard-firings.jsonl rolls over at ACTIVE_FIRINGS_CAP (2000) records into guard-firings.1.jsonl, so --liveness parses a bounded file instead of one that grew with every guarded edit. Rotation loses no count — the outgoing firings are folded into a carried summary holding, per guard, the count, how many reached a verdict, and the first and last moment and outcome, which is every input liveness.py reads — so fired_count, never-fired and the last outcome are the same numbers after a rollover as before it. What it costs is per-firing why text older than one generation, and GuardLiveness.carried_count says how much of a count rests on the summary rather than on readable lines. Two modules answer the binding's own coverage (BDL-068 S4, BDL-UX #170): shell_targets.py reads what a shell command line says about itself — the program it runs, and the write targets a declared set of write shapes names, stated as a lower bound — so a shell edit resolves to PathScope.UNDETERMINED, matches no exclusion and carries the undetermined write set into not_covered instead of reading as a clean pass; and surface.py reports what fraction of the write paths the emitted role adapters grant is named by a registered matcher, deriving the matchers from .claude/settings.json and the population from each adapter's tools: line, reporting a tool it cannot classify as unclassified and an unreadable source as unresolved rather than as an empty population. BindingSurface.describe() has three sentences and not two for the reason typed_surface.py below has three: an empty population is not an unreadable one, and 0 of 0 write path(s) bound read as full coverage in the instrument built to report that class (BDL-068 S4.x, BDL-UX #239). covered is None in both non-fraction states and unresolved / nothing_to_check tell them apart. The report also names the corpus it answered about — the artifacts on disk — because onboarding.role_duties answers the neighbouring question of the composition and the two looked like they agreed (#241). Binding the shell tool also changed what the firing record HOLDS, which is a separate question from how often it is written (beadloom-0mdo.43): a command line is reduced at the one door the context is built at (hook_payload.shell_command_context, reached from the harness payload and from --context command=...) to the program and the derived write targets, and the line itself reaches no verdict and no record. Reduction rather than redaction, because redacting KEY=value and header-shaped operands is a denylist and the next credential arrives in a spelling nobody enumerated. Measured on this repository: of the 1 999 firings in one rotated generation, 1 927 had stored the line they fired on — 2.0 MB of one machine's shell history in a plaintext file inside the project directory; the same firings replayed through the reduction are 557 bytes a record rather than 1 007. It does not reach a record already written — nothing rewrites the file it is evidence in. Two of the six outcomes mean the guard did not answer, and BDL-UX #254 separated them by what it could not answer ABOUT: error is a target the guard refuses to interpret, which stops that edit at exit 2 and stops nothing else, while unresolved is an inability the guard has about ITSELF — its own code will not import, its flow.yml will not parse, the evaluation crashed, no project could be located — which warns and PERMITS, at 1 under a harness and 3 from a shell. Measured live in S5: a git mv left services/bd_seam without an __init__.py, guard_probes.py:79 imports it to reach the tracker, and Bash, Write and Edit all returned the same ImportError at the blocking code while the remediation asked for the write that verdict had just disabled — cleared only by a heredoc typed outside the session. The surface was not narrowed to fix it, because Bash belongs on the matcher; the verdict on inability moved instead. Permitting is not passing: the outcome is named on stderr beside PERMITTED_UNGUARDED, is recorded, and does not clear never-fired in --liveness, where is_unanswered is the one predicate both the liveness rule and the rotation summary read.

  • waves/ — package: the wave decision (BDL-061 S6). plan_waves(records, *, conn, overrides, today, environment) decides which beads may run at the same time from the code-level independence of their node scopes: a bead declares refs: <ref_id> at the start of a line in the tracker, the scope expands downward through part_of, and a pair is serialised for exactly one named reason — blocked_by_bead, unresolved_scope, shared_node, shared_file, dependency_edge or override_serial. It DECIDES rather than advises, because an advisory wave shape is prose a model may ignore. A bead whose declaration cannot be read is serialised against every bead: an unknown scope is not an empty scope, and an empty one compares independent of everything. The parser fails in that direction on purpose (beadloom-mr2l.83): four unresolved reasons — no declaration, a ref the graph lacks, a refs: written inside a sentence, and a second ref written without a comma that the graph confirms is a node — each carry their own remedy and each serialise, because a wave shape is acted on and a parser whose errors widen a wave is worse than no parser. The declaration is parsed in one place (parse_declaration) AND composed in one place (compose_declaration), shared by beadloom waves, beadloom review-brief and the MCP bead_context tool: the four tracker fields are joined with newlines, and a caller that joined them with a space put the next field's first word behind a dangling refs: header. A human outranks the computation through waves.overrides in .beadloom/flow.yml, each entry carrying a reason and an exit condition (the same exit_condition_deadline the guard exclusions use) and reported with the number of decisions it changed — an override that changed none is a finding. Every wave states the seven media it shares no matter what shape is chosen (the graph the plan is derived from, the working tree, the commit gate, the landing order, the focus document, the doc baseline, the tracker's id space), names one bead as the gate_owner that measures the combined tree — because that step used to be in nobody's bead (BDL-UX #181) — names the clean room each of its beads owes as room_for(bead_id) = room-<bead-id>, so a room can say whose it is rather than being a shared directory with a reassuring name (BDL-UX #235), and CHECKS each medium's plan-time precondition, so a medium that fails or that nobody measured is a finding rather than a line of prose printed beside the shape. Statement and check alike are unconditional on wave size since BDL-UX #228: wave_size is the width of one plan and not a claim about solitude, and the not_applicable verdict a serial plan used to produce was silence exactly where nobody was already thinking about the risk — roughly twenty single-bead waves across two epics carried the discipline by a launch prompt alone. The six file-observed preconditions arrive as a WaveEnvironment gathered by the command, so the decision stays runnable without git, without a repository, without a hook and without a scaffolded flow; the seventh compares each bead's title against the id the tracker allocated, which is the comparison BDL-UX #171 needed and nobody made. The focus-document medium is BDL-UX #257: this plan resolves a bead to the nodes and the SOURCE FILES its code occupies, so two beads can hold disjoint code scopes and one shared DOCUMENT and the plan reports 0 serialisations truthfully about the wrong population — measured on this project's own S6, where one bead's hunk in docs/domains/application/README.md landed inside another bead's commit, and again where four concurrent beads all wrote into one ACTIVE.md. It is a medium and not a serialisation because it cannot be one: docs.ref_id holds at most one node per document and shared_node fires on any ref intersection first, so a serialisation derived from document ownership adds nothing shared_node does not already produce. The population is DERIVED — Routing.shared_kinds is the intersection of the document kinds every route of the composed /task-init writes, and the folder is the work item's own from the same branch read the commit gate makes — and the precondition asks whether that document carries a row for each bead of the plan, because a bead with no row of its own writes into the shared prose and its edit is committed by whoever gets there first. The graph-files medium is BDL-UX #261, and it is the same shape met one level down: the graph is what this plan derives every serialisation FROM, and a bead that adds a node writes it, so a derivation cannot describe its own input by asking it. Its check compares the node population the graph files declare against the one the index resolved these scopes from — a difference means the plan was computed from the older graph — and its pass states the half no plan can observe, that the node a bead is about to add is in no graph the plan could read. The serialisation the entry sketched was measured and declined: one file holds every node of this project, so it fires on every pair and collapses each wave to a wave of one (BDL-UX #245's failure mode) against a real write rate of 8 of 55 commits, and the primitive that would remove the medium instead is one writer per file — one graph file per node, the shape beadloom-0mdo.66 already took at the boundary for issue numbers — which changes every adopter's .beadloom/_graph/ layout and is filed rather than taken. The landing-order precondition is landing.lock_sites(invocations): the command reads the composed flow artifacts an agent is HANDED, the seam's one bd grammar parses them, and this module reports every instruction of bd merge-slot whose call form grants less than it is relied on for -- an acquire with no --holder (one tracker actor for every role, so the holder cannot be told from the claimant), a release with no --holder (the one form bd does not check, which frees a live neighbour's hold and reports success), and --wait (which appends the caller to a queue nothing drains and returns at once). Judged by the FLAGS of the invocation and never by the prose around it, because a check reading English for the promise "blocks until free" would repeat the keyword-proximity class already filed three times against the docs audit; a subcommand the derivation has not measured is reported as unknown-form rather than passing. Measured on bd 1.0.4 in an isolated rig with every exit code read without a pipe: the primitive itself is sound (one winner in each of four rounds of eight simultaneous acquires, and release --holder refuses a caller that is not the holder), so what BDL-UX #194 and #237 both found was our call form, filed nine days apart by two agents that had never met. Since BDL-068 S5 this module carries no grammar of its own: beadloom-0mdo.51 generalised it to every bd subcommand and homed it at the seam, so the tree holds one grammar and one judgement of the lock rather than two derivations of the same kind. A declared ref is held against the work item's recorded table under five verdicts since BDL-068 S6, not four: approved is the KEPT rows and nothing else, because a node owning a file the Derived by field ran over reached the approval without anyone deciding it -- six nodes on this repository, two of them carrying rows that say no (BDL-UX #250) -- and a swept node nobody ruled on is swept_no_scope_decision rather than not_derived, which would say the derivation never reached it. The unguarded_axis remedy names a PER-BEAD derivation for the same reason: the work item's axes are the UNION of its slices' and a bead's scope is a SUBSET, and the remedy that prescribed the union for every bead would have made every pair share a node and collapsed every wave to a wave of one (BDL-UX #245). Records arrive as DATA, never a tracker handle, so the application layer does not import the bd seam. Since BDL-068 S6 the package also BUILDS the room it names: build_room(*, bead_id, project_root, parent, carry, rebuild, extras, environment) derives the path from the bead, creates the directory rather than entering one, and refuses a directory this run did not create — an existing room is left byte-for-byte as it was, and rebuild replaces a room whose .beadloom-room.json names that same bead rather than refreshing it. A rebuild reads the REQUEST out of that record — the carried list and the extras the caller pinned — because naming the files is the correct path and it was retyped on every rebuild, measured at 16 --carry flags twice on one bead, and what an agent reaches for under that friction is copying files into the live room, which is #243 again. What is reused is the LIST and never the content: the files are copied from the working tree at build time, and an option named beside rebuild REPLACES its remembered counterpart, so the remembered list cannot grow into the "everything that differs" mode that deliberately does not exist. One rule decides what may be remembered — a rebuild must never silently produce a room whose verdict is greener or less isolated than the one it replaces — and it settles the two cases opposite ways: extras the caller PINNED are reused, because forgetting them widens the room to the legs' union and that is 0 mypy errors where the pinned leg reports 82 (BDL-UX #236), while a set the legs derived is derived again and environment=False is recorded but NOT reused, because a remembered decline hands back a room whose verdict the machine decides (BDL-UX #256) with no way to ask for anything else short of deleting the room. Naming was not enough twice: two agents of one wave reached one directory (BDL-UX #235), and files copied into an already-indexed room postdate its own doc-freshness baseline, measured as sync-check exit 2 with stale: 2 against a change that is clean at HEAD (BDL-UX #243). It carries git archive HEAD plus the files the caller NAMES, with no "everything that differs from HEAD" mode, because on a shared tree that set holds the neighbour's work. room_invocation(path) hands back the PYTHONPATH an editable install needs so the suite imports the room's source and not the tree's, and the record STATES the optional extras that interpreter has, because those and not the files decided 0 mypy errors against 82 on one code base at one commit (BDL-UX #236). Since BDL-UX #256 the room also HOLDS that interpreter: room_env.py creates a virtual environment inside the room and installs the room's own sources into it, so a verdict is no longer decided by whatever the machine happened to have — the name isolates the files, and nothing was isolating the import path or the environment. Since BDL-083 S2b (BDL-UX #333, #311) room_distribution.py chooses the Python project that owns the carried files (the deepest one under the scan paths) and derives the room's hint from it, and a project keeping a uv.lock is installed from it with uv sync --frozen in the room's copy of its directory; without a lock the room resolves afresh and says so in environment.resolution. The room's limits name what its missing .git costs a suite. Since BDL-083 S2d (BDL-UX #335) a carried path HEAD holds and the working tree does not is deleted in the room, empty directories with it, instead of refusing the room, and room_tree.py names every file where the tree differs from HEAD that the room does not carry (RoomBuild.not_carried), because those are what its verdict leaves out — a neighbour's work or a file nobody named, which git cannot tell apart. The extras it installs are the UNION of every extra any leg of the project's workflows installs, read from the typed install step (rooms.leg_installs) rather than from the satisfied set, which needs the analysed distribution installed under the running interpreter and is therefore unresolved for a project this tool is merely pointed at. The union rather than the commonest set, because the modal reading is wrong on this repository — four of the eight installing jobs install dev, languages to build a site or run a release gate and two run the suite — and because the two errors are not symmetric: a missing extra removes tests from a run without failing it while a surplus one removes nothing, measured at 9 MB and no time over .[all,dev]. Failing to build one is a FINDING and never a refusal, since the files are isolated either way and what a reader must not do is assume; and interpreter.extras is then read off the room's own interpreter through installed_extras(project_root, search_path=...), because recording this process's extras on that room's record would state the extras of an environment no verdict was taken in. Paid per room and never cached — uv venv 0.082 s and uv pip install -e 1.07 s for 184 MB apparent, under half a percent of a seven-minute suite — because an environment kept outside the room and reused is a directory two rooms share, which is BDL-UX #235 again. Since BDL-UX #283 a plan is also compared against the beads already IN PROGRESS under its work item (running.py): the beads it decides over are ready ones and a running bead is not ready, so --parent once printed 0 serialisation(s) while a bead of the same epic ran and conflicted with the one being launched. A conflict with running work is reported apart from the plan's own serialisations, because it does not order the plan's waves, and a running bead whose record could not be read is the finding running_not_compared. See the Wave Plan SPEC. Classified as the wave-plan feature node.

  • review_brief/ — package: what a reviewer is handed (BDL-061 S6). assemble_brief(conn, record, *, assignment, changed_paths, measured_since, notes, scenarios, project_root, branch, commits) builds a reviewer's input from three things and no fourth — the assignment (the bead's title and description), the specification (the graph's documents for the declared nodes plus the acceptance scenarios tagged @bead:), and the change (every path differing from the base ref — since BDL-083 S1d the scope_base() base unless --since names one, printed as the brief's Base: line — each carrying the node that owns it; the window is the BRANCH, not the bead, so the changed-outside-scope finding names what it measured over instead of claiming a per-bead attribution the commits do not hold). The author's comments are counted, never printed: a review that reads what the author said it did is not an independent check, and hidden-profile groups scored 17-36% against ~100% for a single holder of all the facts (BDL-UX #155 C). release_notes(notes, *, bead_author) ends the withholding once a verdict is on the bead — REVIEW PASSED:, REVIEW ISSUES: or REVIEW FINDINGS:, colon included, opening the comment's first non-blank line — so the measurements and deliberate deferrals in those comments are read AFTER the reviewer's own judgement is recorded rather than never. The author of the verdict comment is compared with the bead's assignee and the answer is reported rather than enforced: a self-recorded verdict still releases, prints why its independence cannot be established, and costs the run exit 1, because in this repository every role writes under one tracker identity and a gate nobody can pass is bypassed rather than obeyed. The split is description-against-comment because it is structural; claim-against-measurement would need a judgement no mechanism can make. A change nobody could measure comes back as change_measured: false with a finding, never as an empty change set. Scope is resolved through waves.scope.resolve_scope, the one parser of the refs: grammar. The brief also states what is REACHABLE rather than what was withheld (BDL-068 S2): four channels — bead comments, the documents of the work item the branch names, the commit bodies of git log <base>..HEAD, and the launch prompt — each either inspected or NAMED as one this command cannot inspect, because 0 withheld was true of bead comments and was read as a claim about the reviewer's knowledge while the account reached three reviewers through ACTIVE.md, through the commit bodies and through a prompt nothing here can see (BDL-UX #204, #212, #219). The document population is DERIVED from the composed prompts themselves — every role in ROLE_NAMES and every shipped command fragment, composed for this project's flow.yml and including its project layer, matched by shape rather than by spelling — so a team that names its own document in .beadloom/flow/roles/review.md moves the report by that act and by no other. It raises detectability and closes nothing: the review protocol itself sends a reviewer to the diff. The bead-comment channel NAMES the bead its count was taken over and says the beads that made the change are neither read nor counted, because on a wave-structured slice the bead a brief is for is a review bead and 0 item(s) was measured beside 31,544 characters on the two beads that made the change (BDL-068 S2 review, Major 1(a)). TWO CHANNELS THE REPORT DOES NOT NAME, both measured and filed: the tracker export inside the reviewed diff, which the brief's own change inventory lists and then tells the reviewer to read — 16 added record lines, 30 author comments, 81,270 characters on that same review — and behind it the slice's sibling beads (BDL-UX #229); and the work item's documents on a branch whose name carries a suffix after the key, where features/BDL-068-S2S3 names no work item and the channel read NOT INSPECTED while the reviewer was reading RFC.md and CONTEXT.md out of that folder (BDL-UX #230, fixed in declared_scope.py or nowhere). Four channels is what the report states, not what exists. A flow.yml that will not parse costs the documents channel and not the brief: prompts_naming_documents answers None — which is not {} — and the channel reports NOT INSPECTED, because naming a malformed config is config-check's job (BDL-068.19-1). Notes, changed paths, scenarios and the commit range arrive as DATA, so the decision runs without bd, without git and without a repository. See the Review Brief SPEC. Classified as the review-brief feature node.

  • source_derivation/ — package: the three AST derivations BDL-067 wrote as tests, lifted into production by BDL-068 S1.1 (calls, source_tree, call_graph, termination, branches, body_shapes; the package __init__ re-exports the public surface). It answers who else writes this, who else calls this and how many branches does this have and how many ways does it end from the SOURCE rather than from a hand-maintained list, and it answers over a SHAPE rather than a spelling: a reader is a body that lists a directory AND parses YAML — matched over six listing verbs and six loaders, because a detector asking for glob("*.yml") and yaml.safe_load by name was measured walking past five bodies that read the same directory. callables_that_reach(root, seed) is a least fixed point over the tree; call_sites_in(source, reaching, command=…, marker=…, resolving_in=…) reads one command's branches, the branch each call sits in, and whether the marker call is still reachable after it; writers_that_build(root, key=…, commit_point=…) finds the bodies that create rather than patch. Nothing here is bound to a particular question — the commit point, the payload key, the marker and the module terminator names resolve through are parameters. It imports no other beadloom package and consumes only ast and pathlib. Ceilings are stated in the component DOC and in each module: a name is not a resolved import, the branch reading is syntactic, an unresolvable terminator reads as continuing, and a writer that hands its commit to a helper is seen as the helper instead.

  • work_item_routing.py — the work-item types, their flows and the documents each writes, DERIVED from the composed /task-init command rather than restated here (BDL-068 S1.5). A work item's type is a claim about how far the change ranges, and BDL-067 was routed bug, wrote one BRIEF, passed one approval gate and became 28 beads — re-deriving its axes afterwards showed four graph nodes. Reading the command's own routing table means a project layer that adds a type or moves one between flows changes the check by the same act, and the command cannot state a route the check does not police. Routing.shared_kinds is the third face of the same computation — the kinds EVERY route writes, taken as an intersection rather than a difference — and beadloom waves spends it: a document no route can avoid is one every bead of a work item writes and no bead's code owns. It also reports the line the explore step is stated on and the line the type decision is taken on, which is what makes "the decision cannot be reached before the step" checkable on the artifact rather than asserted about it. The join lives here for the reason doc_shape.py states: onboarding and doc_sync are peer domains. A routing table is found through doc_sync.tables.table_blocks — the one component that decides where a markdown table begins — so this is the third reader of that boundary and not a third parser of it (BDL-UX #259, after #213 and #244). Every block whose own header row leads with Type and Flow is a routing table, and the routes are their union, because a project layer states its own. A row a table states and the derivation cannot read as a route is named in Routing.notes with its line number rather than dropped. Classified as the work-item-routing component node.

  • declared_scope.py — which work item a commit belongs to, and the scope its ## Axes section declares (BDL-068 S1.6). The join scope-check cannot make for itself: the graph index that says which node owns a path, git for the paths and for the branch, and the planning corpus that says which folders are work items. The work item is found by the BRANCH, and it has to be — the pre-commit hook runs before the commit message is finalised, so the [KEY] prefix is not readable at the moment the commit is judged. A folder matches when its name is one of the branch's /-separated segments, over the population planning_documents() returns, so a project configuring its own doc_quality.paths is judged over its own corpus. scope_check(project_root, *, branch, base) judges the staged index without a base and the branch against one with it. trunk_ref() (now in scope_base.py) prefers origin/<trunk> over the local one and paths_changed_since uses ref...HEAD, both for one measured reason: with a local main two commits behind the remote, --since main reported another work item's LANDED change as this branch's and --since origin/main did not. No branch, no work item, no index, no section and no answer from git are five different reasons to have checked nothing, and each is reported as itself — and since beadloom-0mdo.32 each reaches the pre-commit hook, which reads the command as 2>/dev/null and so used to see a run that could attribute nothing and a run that found nothing outside as the same empty string. VERDICT_MARKER marks the verdict line in porcelain output for exactly that split. Classified as the declared-scope component node.

  • scope_base.py — the branch a run judges, and the ref that branch's work is judged against (BDL-083 S1d, RFC D4, BDL-UX #330, #344, #300). scope_base(project_root, *, explicit, branch, environ) returns a ScopeBase by the rule agreed with the owner: explicit when the caller names one; else the merge-base with the branch this one was cut from, read from the reflog, then from the pull or merge request's target branch (GITHUB_BASE_REF, CI_MERGE_REQUEST_TARGET_BRANCH_NAME), then from the nearest branch whose merge-base is newer than the trunk's; else the trunk. ScopeBase.describe() is the one wording the Gate's scope-check line, scope-check --base, review-brief's Base: line and the ownership report print: the ref, the rule and how many files of the trunk's diff it attributed to the parent branch. working_branch() reads GITHUB_HEAD_REF and CI_MERGE_REQUEST_SOURCE_BRANCH_NAME before the checkout's own name, because a CI job checks a pull request out on a detached HEAD. Measured on the monorepo fixture with a work item cut from an unmerged parent that changed two frontend files: beadloom ci judged both as outside the axes before, and 0 with 2 file(s) attributed to the parent branch after. Part of the declared-scope component node.

  • impact/ — package: beadloom impact <path|symbol> (BDL-068 S1.2), the feature an adopter runs over source_derivation/. It answers four questions from the SOURCE — who else commits through the sink this target reaches, who else calls what it defines, how many branches each of its commands has and how many ways each ends — plus the boundary from the graph, which says when a change leaves a bounded context. The seed is derived, never given. BDL-068 S1.3 measured at af26750d that the same derivations report 2 writers and 4 branches of init under one seed and 0 and 3 under another, on one tree: three is the number BDL-067 carried for nine review passes, and a command taking the commit point as an argument would ship that as a clean, confident, wrong answer. So the rule reaches-an-effect-sink derives it — a name the target reaches TRANSITIVELY whose OWN body performs a declared effect directly (serialises-yaml, or reads-a-yaml-directory as a conjunction) — and the answer names the seed, the rule and the effect. PUTS_BYTES_ON_DISK is deliberately not a declared effect: measured at the same commit it does not contain this product's own commit point, and open also reads, so it is not a sound predicate alone. A target no rule finds a sink for is reported as UNRESOLVED rather than answered over an empty set, and what the derivation could not read travels with the answer under twelve named kinds (unreadable-target, target-outside-the-sweep, sweep-narrower-than-the-project, no-seed, no-graph-index, unparsed-module, call-through-a-variable, dynamic-dispatch, unresolved-terminator-name, name-defined-more-than-once, no-node-for-path, node-owns-unread-files). A named node's unread surface is on its row (BDL-UX #284): unread_ownership lists, per node the answer names, the files that node owns by the most-specific-wins rule and this derivation did not read, and the ## Axes section writes the count and the first file in the row's Owns unread column. One epic ruled onboarding out as blast radius because it surfaced as a caller, while the fix lived in that node's .md.txt templates. How wide it swept is a claim the answer can withdraw (BDL-068 .15): the walk up from the target does not require __init__.py, because requiring one stopped the sweep at the first subpackage of a PEP 420 namespace tree and reported a caller one directory across as none found. — resolved, empty and wrong, on every adopter tree and on none of this repository's own, where every package carries the file. It stops instead below a src-named directory, below one carrying pyproject.toml, and never above the project root; callers.resolved is a predicate over whether the swept root holds the target rather than the literal True; and a sweep narrower than the project's source root says so, carrying both paths. An unresolved axis still prints the sites it did find, under the caveat rather than instead of it. The branch axis is read from the callers' seats as well as the target's: scoped to the target's own file it wrote bootstrap_project: 3 branch(es) while init, named one row above as a caller, had the four branches this project got wrong for nine review passes, and every count now carries THE_TARGET_SEAT or THE_CALLER_SEAT. It is NOT a graph walk: a node whose axes live entirely inside it still produces an answer, and the graph supplies the boundary and nothing else. Eight modules by responsibility — seeds, axes, boundary, unresolved, unread_ownership, answer, render and section — with human, --json and --section output from one computation; section renders the ## Axes section a work item's document carries, using the grammar doc_sync.axes_section declares rather than a second one. See the Impact SPEC. Classified as the impact feature node.

  • typed_surface.py — the files a project declares type-checked, and the three sentences a check over them has (BDL-068 S4, BDL-UX #231). declared_typed_surface(project_root) resolves [tool.mypy]'s packages, modules and files against mypy_path into the roots a type check covers, and TypedSurface.partition(paths) holds staged paths against them. The surface is DERIVED rather than listed because beadloom-mr2l.82 listed it in the pre-commit hook template, the mypy configuration then moved and the template did not. [[tool.mypy.overrides]] is outside the read by construction: an override changes which findings are reported, never which files are in the surface. SurfacePartition.describe() has three sentences and not two — NOT CHECKED with its reason when no surface could be derived, NOTHING TO CHECK when the surface exists and the commit staged nothing inside it, and otherwise a count of the files actually handed to the checker — because a check whose population is empty reading as a check that passed is the phantom this epic is named for. What could not be resolved travels with the answer: a package resolving to no path, a glob matching nothing or several roots, a declared exclude (not applied, because mypy does not apply it to files named on the command line, which is how the hook invokes it), and a mypy.ini or setup.cfg beside the pyproject.toml. The declaration is read without a TOML parser for the reason rooms.py states about the packaging metadata. Measured on this repository: the hook used to hand mypy every staged .py under src/ or tests/, which is 970 errors in 90 files, and over the 24 commits of features/BDL-068 it warned on 4 of the 7 that staged Python — all 4 false. Surfaced by beadloom typed-surface and consumed by both pre-commit hook templates. Classified as the typed-surface component node.

  • rooms.py — the rooms a verdict can be taken in (BDL-068 S3.2). take_census(project_root) answers three things at once: the room this process is in, derived from the platform and the interpreter rather than typed by a caller; the rooms the project DECLARES, read from the Programming Language :: Python :: X.Y classifiers and from every job of every .github/workflows/*.yml with its matrix expanded; and which of those the run did not enter. One rule decides the last: a run enters a leg only when every dimension of that leg is comparable and equal, so a runner label naming no platform and a dimension this run cannot describe both resolve to NOT ENTERED — a comparison that cannot be made must never manufacture coverage. requires-python is kept as a FLOOR and never counted upward, because enumerating >=3.10 needs a hardcoded newest Python, and the packaging metadata is read without a TOML parser so the answer does not differ between 3.10 and 3.13 — a room-dependent answer from the module whose subject is rooms. What could not be derived travels with the answer: a workflow that does not parse, a job with no runs-on, an unresolvable runs-on expression, a matrix using include/exclude, and python-version: [3.10] left unquoted, which reaches a reader as the number 3.1. Surfaced by beadloom rooms, printed under every beadloom ci verdict and carried on the MCP complete_bead verdict; mutation_scope.describe_room composes its room sentence here so both surfaces print one sentence. Since BDL-068 S6 the census carries an extras dimension: what this run has comes from the analysed project's own distribution as the running interpreter holds it (Provides-Extra and the extra == markers on Requires-Dist), and what a leg installs comes from the install step its job declares, compared on what an environment SATISFIES rather than on what somebody typed — a leg installing dev,languages,tui,watch,graphql also satisfies all. It is the dimension BDL-UX #236 was filed on: measured at 6c4d0a9, one code base at one commit gave 0 mypy errors under .[all,dev] and 82 under .[dev]. An interpreter holding no distribution of that name adds no dimension at all, because a value spelling unknown would read as a difference in the environment when what happened is that nothing looked. Since BDL-068 S6 it also carries a locale dimension, and it is the CODEC in force rather than the name somebody spelled — codecs.lookup(locale.getpreferredencoding(False)), the same derivation ci.yml's own anti-vacuity step makes, with a leg's declared name resolved through its codeset. It is the dimension BDL-UX #248 and #249 were filed on: the tests-locale legs used to resolve to "this run cannot describe the dimension locale" while the process genuinely was running under an ASCII codec, and en_US.ISO-8859-1 — the name ci.yml publishes — is not a locale macOS has, so a developer reproducing that leg ran the C room a second time under the other room's name. A locale the environment asked for and did not get adds a second dimension, locale_asked, present only then, so the room line every verdict carries reads locale ascii (asked for en_US.ISO-8859-1, which did not apply here) and no leg is reported as entered on a name that resolved elsewhere. Naming the room does not make a verdict stronger — it makes it answerable. WORKFLOW_DIR and load_jobs(path) are public because a second derivation reads the same declaration for a different question — gate_coverage.py below — and one reader means one wording for "this workflow could not be parsed" rather than two that can drift. typed_extras_of_job(job) is public for the same reason and answers a genuinely different question from extras_satisfied_by: a room CENSUS asks which extras an environment satisfies, so two identical environments are not reported as two rooms, while a room BUILDER asks what to type into an install command. Both parse a leg's install step through that one function. leg_installs(project_root) is the builder's read of it, over the pipeline pipeline_sources chooses, so a GitLab job is a leg too (BDL-083 S2b), and declared_extra_names(project_root) enumerates what a leg spelling --all-extras names and does not list, read without a TOML parser for the reason above and therefore a lower bound. installed_extras(project_root, search_path=...) reads another environment's installed metadata rather than this process's, which is what lets a clean room record the extras of the interpreter its own verdict is taken under (BDL-UX #256). Since BDL-083 S2a (BDL-UX #332) the legs also come from .gitlab-ci.yml, one room per job carrying its image and the python an official python:X.Y image names; pipeline_sources(project_root) chooses the files once — since BDL-083 S2F1 the ones .beadloom/config.yml names under rooms.pipelines (github, gitlab), or every one present when the key is unset, a present file the key leaves out and a named one with no file each an unresolved entry naming the key (this repository declares [github] for its BDL-050 mirror, and its 33 rooms are unchanged); the packaging comes from the Python project infrastructure/python_projects.census_packaging finds; and a census that derived no room carries not_derived, printed as rooms: not derived — <reason> instead of 0 of 0. Classified as the verdict-room component node.

  • pipeline_sources.py — which pipeline files the room census and the gate's coverage report read (BDL-083 S2F1, RFC D6 as amended on 2026-10-19): pipeline_sources(project_root) returns the .github/workflows/*.yml files and .gitlab-ci.yml that rooms.pipelines in .beadloom/config.yml names, or every one present when the key is unset, with set_aside (a present file the key leaves out), missing (a name with no file) and refused (an unusable value) as notes that name the key; declared_pipelines(project_root) is the key read on its own. Owns WORKFLOW_DIR. Part of the verdict-room component node.

  • gitlab_pipeline.py — a .gitlab-ci.yml read into its jobs (BDL-083 S2a, BDL-UX #332): load_gitlab_pipeline(path) returns each job's image (its own, default:'s or the top-level one) and its before_script, script and after_script lines, with include:, extends: and parallel: matrix named as notes rather than expanded; python_of_image(image) reads the interpreter an official python:X.Y tag names. Read by rooms.py and gate_coverage.py, so one file has one reader. Part of the verdict-room component node.

  • gate_step.py — the shape one gate step reports in (GateStep, its status property, Finding) and the one line the Gate prints about it (gate_step_line). Lifted out of gate.py by beadloom-rqma.8 and re-exported from it, so none of the forty-five modules that import these names from beadloom.application.gate changed. The move was forced rather than chosen: a leg lifted into a module of its own cannot name the type it returns while that type lives in the module that imports it. The shape is what every leg shares and the composition is not, so the shape is what moved. A number a leg's summary states about its findings is the length of GateStep.findings — the readme-pair leg counted a second population and printed 0 finding(s) in a run whose findings held one.

  • gate_declarations.py — what an unusable opt-in declaration costs a leg, for the two legs that are opt-in (issue-log reads issue_log:, readme-pair reads document_pairs:). unusable_phrase renders the ; N entr(ies) declared, M unusable: <where> (<why>) clause, unusable_declaration_step and undetermined_declaration_step build the two steps that say nothing ran, and refusal_finding projects one refusal onto the shared finding shape. One home, because the two legs answering did this project declare one? separately is the defect that produced BDL-UX #270 and its twin. What tells declared none from declared badly is a count and not an adverb: a skip reworded to possibly nothing was declared would be the same defect in softer words. It reads no config and decides no verdict — doc-sync/components/config-declarations reads, this renders, the leg composes.

  • gate_document_pairs.py — the readme-pair leg itself: step_readme_pair, its line, and the projection of what it found. The first leg lifted out of gate.py under beadloom-oew7, and the reason is measured rather than asserted — gate.py went 1362 → 1553 → 1624 → 1733 lines while a deferral to lift per-leg rendering out of it stood, so the debt that deferral called bounded grew every time the file was touched. It shipped the count correction with the move: N finding(s) was taken from PairReport.findings, which folds over the pairs HELD, so a refused declaration and a document nothing could read were findings the step returned and the line did not count — the leg printed 0 finding(s) in the same run in which the Gate printed a finding about that leg, and the SPEC shipped in the same cycle documented the 1 finding(s) the code did not produce. The step builds one list, carries it and counts it, so the number and the findings beside it are the same expression (beadloom-rqma.8).

  • gate_issue_log.py — the issue-log leg: step_issue_log(report), its line, and the projection of what it found. Lifted out of gate.py under beadloom-6xdt for a reason of its own: beadloom issue-number check takes its exit code from this step's passed, so the command and the Gate cannot disagree about which states of one report block. They disagreed on one before the move — over a declared log the tree does not hold the Gate failed the step and the command exited 0 (BDL-UX #331, measured on 9.0.0).

  • gate_boundary.py — the Gate's per-step exception boundary (beadloom-ba9w.13, BDL-UX #318). run_bounded(name, run) runs one step and turns an Exception it raises into a GateStep that reads ERROR, names the exception and where it was raised, and fails the gate, so the steps after it still run; crashed_clause(steps) is the N step(s) crashed: … clause every surface prints. Held apart from gate.py because it decides nothing about a project: it reports what a checker did wrong, the same way for every step. Before it, an exception in the fourth step ended the run and beadloom ci printed nothing. derive_bounded(report, derive) is the same boundary for the three reports derived after the steps (the room census, the coverage report, the ownership report): one that raises is absent, and the run carries report_raised's sentence the <report> raised <class>: <message> in its place while the steps' verdict and exit code stand (beadloom-4m0w, S1R Major 1).

  • gate_coverage.py — the verifications a project's pipeline declares that no step of a gate run performed (BDL-068 S6, BDL-UX #247). beadloom ci runs reindex, lint, sync-check, docs-audit, docs-quality, doc-spaces, scope-check, config-check and doctor, and it does not run the test suite; the division is reasonable and every step it does run is named, but until this module the run never said the suite was not among them — while CLAUDE.md calls the pre-push hook "the full beadloom ci". Measured twice in one slice: a document change reddened two tests under a gate that returned rc 0, and a docs wave spilled an inline code span past a line under a gate that returned rc 0 over that tree twice, after which all six test legs went red on one assertion that reproduces locally in 0.07 s. derive_gate_coverage(project_root, performed=...) answers it from two declarations and no sentence: what this run performed comes from its own GateStep names plus anything the caller ran beside it, so a suite step added to the gate later removes the line by the same act; what the project verifies comes from the files pipeline_sources.pipeline_sources returns — .github/workflows/*.yml through the same rooms.load_jobs reader the room census uses and .gitlab-ci.yml through gitlab_pipeline.load_gitlab_pipeline (BDL-083 S2a), the ones rooms.pipelines names or every one present (S2F1) — so one file has one reader and one wording for "this workflow could not be parsed". DUTIES recognises pytest, ruff/flake8/pylint, mypy/pyright and, since BDL-080 S2b, the FSD linter (steiger, or the lint:fsd script init writes for a Feature-Sliced frontend) behind any runner prefix, npm, pnpm and yarn included, and it deliberately does not bind the style duty to the step name lint: the gate's own lint step checks the architecture boundaries, not the source style, which is why this repository's block names four and not one — the test suite, the style linter, the type checker and, since the CI site-build job runs Steiger (BDL-080 S2c), the FSD linter. A pipeline verifying under a name the vocabulary does not hold is told the population is empty with the vocabulary named, never that nothing is left to run. Printed under every beadloom ci verdict beside the room lines, carried as not_run in --format json and on the MCP complete_bead payload, which passes performed_elsewhere=("tests",) when it runs the suite itself so one run cannot report the suite as not run while that run ran it. It is not a step: same ok, same exit code, same findings. Classified as the gate-coverage component node.

  • gate_ownership.py — which claimed bead's commits changed the files each finding of a gate run is about, and the verdict when none did (BDL-068 S6, offered by beadloom-0mdo.76; the commit rule since BDL-083 S1c). The branch carried a red Gate across two waves of S6 — two stale docs owned by no bead in the running plan — and every gate owner in those waves had to be told by the coordinator, by hand, that the red was not theirs. The first rule attributed a finding to every claimed bead whose refs: declared the node covering it, and the first outside adopter measured what that says (BDL-UX #329): a bead told it owned 36 findings on files it never touched, because its refs: named the node covering the frontend's source whole. derive_gate_ownership(project_root, findings=..., tracker=..., base=None) now attributes by the commits: a finding is owned by a bead the tracker reports in_progress whose commits on base..HEAD (the base scope-check judges against, scope_base(), since BDL-083 S1d; listed by doc_sync.git_baseline.commits_since; a commit is a bead's when its message carries the git trailer Bead: <bead-id>, read as git reads trailers — from the message's final paragraph only, which needs git 2.22 or later — and a mention of the id anywhere else binds nothing, BDL-083 D10; a claimed bead with no bound commit whose Bead: <id> line stands where git reads no trailer is told how many commits carry it and where, since S1 fix 5, not that no commit does; since S1 fix 6 each claims entry of the JSON and MCP payload carries the same fact as unread_bead_lines, one {placement, stated, count, commits} row per placement with the commit hashes, placement the token outside_final or unread_final and stated the text's sentence since S1 fix 7) changed a file the finding is about, and unattributed otherwise. The files a finding is about are the ones its locations name (a document in the documentation root's frame re-rooted through the docs table; a stale or missing pair locates its code file second), or, for a finding that names a node and locates no file, the files that node owns by most-specific ownership plus its documents. A tracker that cannot answer, a project with no index and a git that cannot list the branch's commits are a reason on the whole report. It is not a step: same ok, same exit code, same findings, and the tracker is asked only when the run produced a finding. Every surface prints the rule and the base from one wording (ownership_sentences) and one payload (ownership_payload): under every beadloom ci verdict beside the room and coverage lines, as ownership in --format json, as ::notice:: lines in --format github and as owners on the MCP complete_bead FAIL payload. Classified as the gate-ownership component node.

  • landing_slot.py — who holds the landing slot in a tracker's records, and whether a push lands an export holding it for a bead the push carries (BDL-083 S2g, BDL-UX #354, RFC D12). slot_hold(records) finds the slot by its label gt:slot and returns a SlotHold (the slot's id, its holder, the holder's status in the same records; stale for a holder the tracker lists as closed). check_push(project_root, pushes) reads the export at each pushed commit and the Bead: trailers of the commits the push carries, through doc_sync.git_baseline, and returns REFUSED, clean or NOT CHECKED with the lines beadloom landing-check prints. The pre-push hook and the landing-order medium of beadloom waves are its two consumers. See the Landing Slot DOC. Classified as the landing-slot component node.

  • status.py — the read-side of the beadloom status command (BDL-059 S4; moved down from services/cli.py). gather_status(conn, project_root) reads the index/coverage/health/trend counts (its not-fresh count includes missing pairs: a pair whose file is gone is not one less thing to worry about) plus per-kind breakdown out of the SQLite index into a frozen StatusData value; compute_context_metrics(conn, nodes_count, symbols_count) builds each node's context bundle and returns the average/largest bundle token sizes and total indexed symbols. The CLI status command keeps only presentation (Rich or JSON rendering) — this module owns the queries.

API ​

Module src/beadloom/application/reindex/ (package; public surface re-exported from __init__):

  • ReindexResult — dataclass with counts (including test_files_indexed and test_files_unplaced), nothing_changed flag, errors, warnings, infos (BDL-080: a kind read through its alias), and activity_history (the GitHistory a full reindex measured activity on; None on an incremental run or outside git)
  • reindex(project_root, *, docs_dir=None) -> ReindexResult — full reindex with sync baseline preservation
  • incremental_reindex(project_root, *, docs_dir=None) -> ReindexResult — incremental reindex with parser fingerprint and graph YAML change detection
  • resolve_scan_paths(project_root) -> list[str] — resolves source scan directories from config (defined in infrastructure/scan_paths.py; re-exported here for backward-compatible import paths)
  • UnreadCode(language, files), unread_code(conn) -> tuple[UnreadCode, ...], read_unread_code(project_root) -> tuple[UnreadCode, ...] — the indexed code files no installed parser reads, counted by language, most first (module unread_code.py, BDL-082 S2a); beadloom reindex and beadloom init print one line per language from it, and no exit code moves on it

Module src/beadloom/application/activity_settings.py:

  • ACTIVITY_KEY — "activity"
  • read_activity_exclusions(project_root) -> tuple[tuple[str, ...], tuple[Refusal, ...]] — the usable patterns and every refused entry
  • activity_exclusions(project_root) -> tuple[str, ...] — the usable patterns only

Module src/beadloom/application/import_aliases.py:

  • IMPORTS_KEY — "imports"
  • read_import_aliases(project_root) -> tuple[tuple[tuple[str, str], ...], tuple[Refusal, ...]] — the usable (alias, folder) pairs and every refused entry
  • import_aliases(project_root) -> tuple[tuple[str, str], ...] — the usable pairs only

Module src/beadloom/application/doctor.py:

  • Severity — enum: OK, INFO, WARNING, ERROR
  • Check — dataclass: name, severity, description
  • run_checks(conn, *, project_root=None) -> list[Check] — runs DB validation checks plus optional agent instructions freshness check when project_root is provided. Since BDL-083 S2f one of the DB checks, index_separator, warns per index table that holds a path written with a backslash and names beadloom reindex --full, because an index an older version built on Windows matches no source:

Module src/beadloom/application/status.py:

  • StatusData — frozen dataclass: version/last-reindex, node/edge/doc/chunk/symbol counts, stale/isolated/empty-summary counts, coverage, per-kind breakdown, trends, and context_metrics
  • gather_status(conn, project_root) -> StatusData — read the full status payload (counts, coverage, health, trends, context metrics) from the index
  • compute_context_metrics(conn, nodes_count, symbols_count) -> dict — average/largest context-bundle token sizes (+ owning ref_id) and total indexed symbols

Module src/beadloom/application/debt_report/ (package; public surface re-exported from __init__):

  • DebtReport — frozen dataclass: debt_score (0-100), severity, categories, top_offenders, trend, layer_populations, test_population
  • load_debt_weights(project_root) -> DebtWeights
  • collect_debt_data(conn, project_root, weights=None) -> DebtData
  • compute_debt_score(data, weights=None) -> DebtReport
  • compute_debt_trend(conn, current_report, project_root, weights=None) -> DebtTrend | None
  • format_debt_report(report) -> str — the Rich report; the layer populations, the test population and the offenders' ref ids and reasons are escaped before Rich reads them as markup, so a declared pattern such as __tests__/**/*.[jt]s prints as written (beadloom-2mj3.19)
  • format_debt_json(report, category=None) -> dict[str, Any]

Module src/beadloom/application/watcher.py:

  • DEFAULT_DEBOUNCE_MS — debounce constant (500ms)
  • WatchEvent — frozen dataclass: files_changed, is_graph_change, reindex_type
  • watch(project_root, debounce_ms=DEFAULT_DEBOUNCE_MS, callback=None) — monitors project files via watchfiles

Package src/beadloom/application/site/: see the Site Generation SPEC. generate_site is re-exported from the package __init__.

Module src/beadloom/application/gate.py:

  • GateStep — dataclass: name, passed, skipped, findings, summary, not_verified, error; .status -> PASS/WARN/FAIL/SKIP/ERROR, where ERROR is a step that raised (its error is <class>: <message>) and is read before every other flag. not_verified keeps passed True (a project that cannot supply a baseline is not thereby broken) while stopping the step reading green
  • GateResult — dataclass: steps, room, coverage, ownership; .ok (all steps passed), .findings (all findings across steps), .crashed (the steps that raised, in step order). The last three are qualifications the verdict carries and not steps: which rooms it is true of, which verifications it is a verdict about, and who owns what it found. None of them has a status and none moves the exit code; None on any of them means nothing derived it, so a surface that was not told makes no claim. room_reason and coverage_reason are the sentence a census or a coverage report that raised left in its place; an ownership report that raised is a GateOwnership whose reason is that sentence
  • run_ci_gate(project_root, *, fail_on, hub_exports, no_reindex, performed_elsewhere=(), tracker=None) -> GateResult — composes reindex → lint → sync-check → docs audit → docs-quality → issue-log → readme-pair → doc-spaces → scope-check → config-check → doctor → (optional) federate; never short-circuits. tracker is the read port over the work tracker, supplied by the service that runs the gate because the bd seam lives in the services layer this one must not import; without it the run makes no ownership claim at all rather than reporting every finding as owned by nobody
  • gate_step_line(step) -> str — the one line the Gate prints about a step, [STATUS] name: summary. It lives beside the dataclass rather than in the renderer because two commands quote it and one of them is not the Gate: init tells the adopter what beadloom ci will say about the graph it has just judged, and it said lint - <summary>, a shape nothing prints (BDL-067 .14). A line that pre-empts another command's output is produced by that command's own formatter, or it drifts the first time either is reworded
  • lint_step(project_root) -> GateStep — the gate's lint --strict step, and the only step that is public. beadloom init calls it over the graph it has just written and exits 1 when it does not pass, so the command cannot report success over a graph that fails the rules the same command wrote (BDL-067 .2). Shared rather than restated: the defect being closed, BDL-UX #192, is two halves of one command disagreeing about whether a tree is green, and a second copy of passed = not result.has_errors at the init site is how they would disagree again
  • RULES_CONFIG_ERROR — the lint step's summary when rules.yml could not be loaded at all. Public because that step is the one case where a finding's rule is the step's own name rather than a rule's, so a caller rendering findings has to branch on it: beadloom init prints the loader's complaint there and rule names everywhere else (BDL-067 .6)
  • The sync-check step carries the pair's ref_id as the finding's node field, which the linter's findings have carried since BDL-067 .14 and these named only in English prose. It is what lets gate_ownership attribute a stale doc — the finding this branch's two-wave red was made of — to a bead without parsing a sentence. It fails on stale AND missing pairs (BLOCKING_STATUSES), emits warning findings for unverified pairs and for a declared surface smaller than the committed ledger records, and its summary names what it could not check instead of printing a bare pair count (BDL-UX #174/#175). Since BDL-069 its failing line counts stale PAIRS rather than documents, each doc-stale finding names its pair (— pair <doc> <-> <code>), and its remediation is chosen by doc_sync.engine.attestation_clears: a reason re-attesting cannot clear, such as missing_modules, is told what does clear it instead of being told to run sync-update (BDL-UX #282)
  • The doctor step summary counts the CHECKS that ran, by severity — run_checks returns one entry per FINDING, so the old len(checks) counted problems and ROSE from 20 to 21 while a declared doc was being deleted. The word clean is printed only when every check is OK

Testing ​

Tests: tests/integration/application/reindex/ and tests/unit/application/reindex/ (bound to reindex since BDL-074 F2; see the reindex SPEC), tests/integration/application/doctor/test_doctor.py, tests/integration/application/doctor/test_doctor_drift.py, tests/integration/application/doctor/test_doctor_instructions.py, tests/unit/application/watcher/test_watcher.py, tests/integration/application/debt_report/test_debt_report.py, tests/unit/application/debt_report/test_debt_integration.py, tests/integration/application/debt_report/test_the_debt_report_reads_the_test_binding.py, tests/integration/application/mutation_scope/change/test_a_change_states_the_one_unplaced_count.py, tests/integration/application/mutation_scope/change/test_a_change_selects_by_placement_and_by_tag.py, tests/integration/application/mutation_scope/acceptance/test_a_step_file_is_read_for_the_scenarios_it_loads.py, tests/integration/application/debt_report/test_an_adopter_scores_what_it_scored_before.py, tests/test_gate.py, tests/test_gate_finding_owner.py, tests/unit/application/test_import_aliases.py, tests/integration/application/test_config_check_reads_the_imports_block.py. The portal's tests moved with it to tests/integration/application/site/ and tests/unit/application/site/ and are listed in the Site Generation SPEC.