✅ fresh
last synced 2026-10-20T11:44:45.791774+00:00 · coverage 96% (
application)Validation by Beadloom
doc_sync— same source assync-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 cienforcement 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 bytest_indexin BDL-074 C1 and byunread_codein 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 → recordtests: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 itsexempt:entries since BDL-070 B4, because the architecture view reads its rule from therulestable and asks it which edges to draw red; since BDL-080 itsscopeandtitletoo, each only when declared. A node matcher'stag_prefix(BDL-080 S2b) is stored the same way, and the two slice rules as{tags}and{tags, segments}(S3c),slice_shapewithdiscouragedbeside its segments since BDL-082 S1b, written even when defaulted. A graph node read through a kind alias (kind: siteasservice, BDL-080 S1a) is reported inReindexResult.infos, whichbeadloom reindexprints 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, throughinfrastructure.node_source.NodeSource, the rule git activity anddocs polishcall too. Until BDL-069beadloom-rqma.4,enrichmentmatched by string prefix and gavesrc/ledger/the routes ofsrc/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 fromfile_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. Backfillssymbols_indexedfrom the live DB (totalcode_symbolscount) so the result reports the true symbol total, not just the per-run delta (mirroring the #88 nodes/edges backfill). Since BDL-074 C1test_indexrecords 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'stests:declaration or, since BDL-074 G2, its place inside a node's source, and rebuildsnodes.extra["tests"]from that binding in the four-key shape; the heuristic_store_test_mappingsstep is removed. Itsplacement_counts()delegates toinfrastructure.repository.count_test_files_by_placementsince BDL-074 C2, becausectxand the debt report state the same counts and neither may import the reindex. Since BDL-074 F1kind_counts()reads theother_kindfiles by recorded kind (count_other_kind_test_files), and the reindexTests:line names each kind with its count (72 acceptance step, 103 self-check) where it used to saybound 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'stests:block (roots, kind folders, patterns by framework, build-tool test trees,beside_code; sincebeadloom-2mj3.15the default roots aretests/,test/andspec/, joined by a top-level__tests__/inbeadloom-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 asmeta.test_layoutwith the roots that exist and, asabsent_roots, the ones that do not, and an unusable key or a node'stests: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 asnothing_changed. BDL-078 changed four things. (1) Activity (enrichment): the full reindex passes thepart_ofcontainers (get_part_of_containers) and the project'sactivity.excludepatterns (activity_settings) toanalyze_git_activity, storeslines_30dandlines_90dbeside the commit counts, reads the clone's history once at the instant it measures (read_git_history,beadloom-btkd.18) and returns it asReindexResult.activity_history; a shallow history is printed as anActivity:line (beadloom-btkd.9). (2) Imports (beadloom-nh7h): an import resolves against the source files of the tree being indexed, not againstcode_symbols/file_indexas 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):incrementalasksgraph.import_manifests.manifests_changed(); a changedgo.mod,go.workorPackage.swiftis a change, notnothing_changed, and re-resolves every stored import without re-reading a file. (4) Flat tests (beadloom-76mk):test_indexbinds a flat Python test by the module it names or the one node its imports reach when the layout declaresflat_tests, theTests:line counts them ((K flat, by the module named or imported)), andunbound_test_files()lists the files bound to no node forinit. 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 —staleandmissing, since "No stale sync entries" over a deleted document is the false green themissingverdict exists to end (BDL-UX #174) — source coverage gaps) plus, whenproject_rootis provided, thegit_rootrow (BDL-083 S2e, BDL-UX #325:ERRORwhen the git root is above the project root, the only built-in check that emitsERROR, so it fails the Gate'sdoctorstep andbeadloom doctorexits 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 vsget_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 stringpytest. All four read OK on this repository by coincidence, and a TypeScript adopter with a correctCLAUDE.mdwas told their stack claim was missing keywords and their test framework was not pytest. They now read the project throughonboarding.scanner.project_facts— its declared version, its ownsrc/packages, itsflow.ymlstack, and whatever its manifests declare — and a fact the project does not declare isINFO … not verifiedrather 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 bydetect_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_docsreports three outcomes, not two (BDL-062.4): a node with no document isWARNING, a node whose graph YAML recordsdocs_absent: <reason>isINFOwith 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 isWARNINGagain, 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 intonodes.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 carriesextra["tests"]with no bound test file, and while any test file is unplaced the count is withheld (0) andDebtData.test_population/DebtReport.test_populationsay 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 sincebeadloom-2mj3.15the 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 bybeadloom-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 astest_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_populationscarry how much of its edge set each declared layer rule judged, in the sharedpopulation_phrasewording, because the error and warning counts are counts OVER a population and this collector is one of the two surfaces that callevaluate_allwithout ever building aLintResult(BDL-070 A4). The Rich report prints them ascounted over: ...under Rule Violations and the JSON carries them underlayer_populations; they are carried unweighted, because a statement about how much of the graph a count covers is not itself debt. A finding atinfo, 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 itspart_ofparts, 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-078beadloom-btkd.1; annotatedfeature=reindex).read_activity_exclusions(project_root)->(patterns, refusals)readsactivity.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, anexclude: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 reachbeadloom config-checkand the Gate'sconfig-checkstep, which block on them.import_aliases.py — the
imports:block of.beadloom/config.yml(BDL-080 S3abeadloom-cwzc; annotatedfeature=reindex).read_import_aliases(project_root)->(aliases, refusals)readsimports.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 underimports:, analiases: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 tograph.import_resolverasaliases=, because the graph domain does not read this file's blocks itself and agraph->doc-syncimport would be a peer-domain crossing. The refusals reachbeadloom config-check(a block headed "Theimports:block of .beadloom/config.yml (N):", exit 1) and the Gate'sconfig-checkstep (ruleimport-aliases, blocking, summary "N unusableimports:value(s)").beadloom initwrites the block from a text scan of the project's bundler configs (see the onboarding domain'sscanner/alias_scan.py).watcher.py —
watch()monitors project files (graph YAML, docs, source) and auto-triggers reindex on changes usingwatchfiles. Graph changes trigger full reindex; other changes trigger incremental.WatchEventfrozen dataclass captures per-event metadata.DEFAULT_DEBOUNCE_MSconstant (500ms).site/ — package: the portal, everything
beadloom docs sitewrites. It is owned by the Site Generation feature, which describes its modules, thearchitecture.data.jsonandlandscape.data.jsoncontracts and their API. Since BDL-080site/layer_rules_view.pyreads 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 adepends_onedge every import of which goes through the target's@xcross-import API carriesvia: "@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.pybecamesite/generate.py,site_pages.pybecamesite/node_pages.py,site_dashboard/becamesite/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_siteis the entry the CLI uses. Slice 2 of BDL-076 added the modules that make the portal an adopter's:site_config.py(thesite:block),forge_routes.py(forge routes, a self-hosted forge declared per host),scaffold.py(the scaffold shipped as package data undersrc/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 invitepress_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) andraw_html.py. Sincebeadloom-ujzb.23the 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.pyrefuses arepo_urlthat 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 nodeactivitycarriesCARD_ACTIVITY_KEYS=commits_30d,lines_30d,level(architecture_card.py; schema stays 2), and the Pages workflow thatpages_workflow.pywrites checks the repository out withfetch-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) andpage_map.py(the pages one run wrote, by section, the dashboard'spages),site_logo.py,repository_icon.pyandfavicon.py(the portal's logo, the header's forge icon and the favicon), andsource_ref.py(which revision the source links name, a branch oforiginstanding in for a commit no branch oforiginholds). The run writesdashboard.data.jsonafter the published documentation, so its page map names every page it wrote. BDL-081 R2 addedmoved_pages.py: a node pagedocs sitewrote under a section the node's page has left is removed (the page of a node declaredkind: site, written underother/before BDL-080 S1a and underservices/since), never a path.beadloom/site/provides, and the scaffold line counts it asN 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-qualitygate step andbeadloom docs qualityeach assembled the run themselves before this, and two assemblies of one report can disagree about what was checked.applicableis stated for all eleven, because a check reported as0 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 theplanning-reportcomponent 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 intocheck_sync;planning_documents/planning_document_globsfind the documents the writing-standard checks read (default.claude/development/docs/features/*/*.md, overridable bydoc_quality.pathsin.beadloom/config.yml);document_section_requirements(project_root)does the same for PLANNING document kinds (BRIEF,RFC, ...), derived from the same composed/templatescommand;shipped_placeholdersderives the placeholder vocabulary from that command's fenced blocks;shipped_decision_sectionsderives, the same way, the sections the shipped templates put a reason-carrying table under, which is howdecision-reasontells a decision table from a measurement table that happens to carry aReasoncolumn (BDL-068 S6, BDL-UX #213). The join lives HERE becauseonboarding(where the templates are) anddoc_sync(where the checks are) are peer domains that must not import each other. Classified as thedoc-shape-requirementscomponent 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 epicCONTEXT.md/BRIEF.mdRelated Files section, because that list is a declaration. The unscoped version was measured first, over 60 epic directories. It attributed the refstatusto 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 aCONTEXT.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, andunresolved_reasonsnow says which of three situations each unresolved epic is in — the document declares no node, the directory carries none of the configuredintent_documents, or the one it carries cannot be decoded (reported asintent_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, andrelation_checkedsays 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_reasonsays which of the two ways its statuses are unknown,epics_unknown_to_trackernames them, and one that declares a node is reported asepic_not_in_tracker—bd closewrites only the local database, so an epic leaves.beads/issues.jsonlby ordinary use and the relation would otherwise stop checking it in silence.TrackerRead/read_tracker_exportcarry the statuses together with the source that answered, because the gate reads the committed export and the command prefers the livebddatabase. 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 oneACTIVE.mdmade akinds: [ACTIVE, SPEC]line covering 39SPEC.mdfiles report nothing (working_exemption_inert, withworking_reachcarrying 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 asdocument_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_excusedis a count of sync PAIRS and arrives as an argument from whoever rancheck_sync, never recomputed here: one run printedexempt: 0and55 WORKING document(s) exempttwo lines apart about one tree, and a caller that ran no freshness check passesNoneso 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_epicread and group the tracker export. It lives HERE because the answer joins the graph, the tracker andinfrastructure/doc_roots.py— three readers no single domain owns. Classified as thedoc-spacescomponent 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 throughdoc_spaces.read_epic_intents— the same declaration join, never a second one — and returns the port typecontext_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 incontext_oraclebecause 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 closewrites only the local database, so the committed export and the live tracker disagree on a branch and a bead status shown insidectxwould 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 abuild_contextof 8.5 ms, paid on a cold bundle only. Classified as theintent-readercomponent 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)reportsmutation-outside-source,mutation-target-missingandmutation-zero-mutants, allwarn, againstmutation.targetsin.beadloom/flow.ymlandscan_paths/languagesin.beadloom/config.yml. Surfaced byconfig-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.pyis 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 reportsmutation-target-unmeasured,mutation-run-zero-mutantsandmutation-counters-missing, allwarn. 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 undersrc/imports a runner. Since BDL-068 S3.3report_mutation_scorealso foldscheck_mutation_scopeover the targets the run is answerable for (filtered by--only), so the three SCOPE findings reach the score and not onlyconfig-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 bybeadloom 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 byacceptance.py'sacceptance_files_by_nodefrom the literal pytest-bddscenarios()/scenario()paths a step file hands over) and theunplacedtest files alone as the runner's fallback (unplaced_tests, which replacedunbound_tests: a self-check or an acceptance step file is never the fallback). Since BDL-074 F1 the plan also carriestest_placementsandother_kinds, so theBinding:line states the unplaced countctxand the debt report state (context_oracle.test_binding.describe_unbound, over the recorded layoutChangePlan.test_layoutsincebeadloom-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(formerlyscore._is_covered) is the one path-containment rule both the score and the change use. Classified as themutation-scopecomponent 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.pyuntil BDL-068 S5, whose own docstring already needed an "and" to describe itself; the file moved withgit mvand__init__.pyre-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 thebdstatus it comes from),reconcile.py(the reconcile core) andstaging.py(what a reconcile may stage, which is never more than the commit already carries).split_table_row/is_separator_cellsare 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.pyre-exports them for back-compat);bd_status_to_cell(bd_status)is the documentedbd-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'sbeadloom-mr2l.22onto 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 everyfeatures/*/ACTIVE.md), locates the bead-status table'sStatuscolumn by header index (3- or 4-col), and rewrites only the cells whose state drifts from the injectedbdstatuses — preserving a richer note when the state already agrees — returning aReconcileResultfor--checkvs 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 theactive-tablecomponent node (its own DOC.md).gate.py —
run_ci_gate(project_root, *, fail_on, hub_exports, no_reindex)is the unified CI enforcement gate (thebeadloom ciorchestrator). It composes the existing checkers IN ORDER — reindex (unlessno_reindex) →lint --strict→sync-check→docs audit→docs-quality(BDL-061 S4b: the five writing-standard checks over the project's planning documents;warnonly, 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 CHECKEDfor a check that read nothing anywhere,NO CHECK READSfor a document KIND no content check enters,NOT CLASSIFIED: N table(s), M row(s)for a tabledecision-reasoncould not place as a table of decisions (BDL-UX #213 — aReasoncolumn does not make a table a decision table, and a measurement row judged as one is a false positive against honest documentation), andUNREADABLE: Nfor documents nothing could decode — each setsnot_verified, so the step reports WARN rather than PASS →issue-log(BDL-068 S6: the issue log's numbers —duplicate-number,unwritten-claimandunclaimed-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 noissue_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 untilbeadloom-rqma.7and now fails with0 leg(s) run; 1 entr(ies) declared, 1 unusable: issue_log (...), BDL-UX #270 — andnot_verifiedsays when the ledger has no floor and two of the three legs entered no number. Its line also states the PARTIAL case sincebeadloom-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 underdocument_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 theissue-logreason rather than thedocs-qualityone: 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 report0 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 ciexited 0 on all four, measured at HEAD on a foreign two-package project — and each is a finding now whose line carries1 entr(ies) declared, 1 unusable: document_pairs[0] (...), because what tellsdeclared nonefromdeclared badlyhas to be a count rather than an adverb (beadloom-rqma.7). Both legs read their declaration throughdoc-sync/components/config-declarations, so the rule about what a misdeclaration costs has one home; a.beadloom/config.ymlthat 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 — withUNREADABLE:naming each declared path nothing read andNOT COMPARED:counting the pairs whose two files were read and hold no block between them, the second of which setsnot_verifiedso the step reports WARN rather than PASS) →doc-spaces(BDL-061 S5: the TO-BE → AS-IS relation;warnonly, a NAMED skip on a project with no TO-BE document, andnot_verifiedwhen 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.jsonlexport rather than abdsubprocess, so the gate gives the same answer in a fresh CI checkout with no tracker installed, and the line names it. Thesync-checkline states what a WORKING declaration EXCUSED, with the reason it was declared with: theexemptverdict 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 onGateStep.pairs_excusedand handed to thedoc-spacesstep, 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## Axesits work item declared;warnonly, 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>...HEADis what the pull request contains. Since BDL-083 S1d the base isscope_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 thesite:block as the blocking rulesite-config, and since BDL-078beadloom-btkd.1every refused value of theactivity:block as the blocking ruleactivity-settings, summarisedN unusable `activity:` value(s), and since BDL-080 S3abeadloom-cwzcevery refused entry of theimports:block as the blocking ruleimport-aliases, summarisedN unusable `imports:` value(s); since BDL-083 S2c the summary ends with the sentenceclaude_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; onlyERROR-severity checks fail the gate, so advisory WARNING/INFO checks never block — no false gate) → (whenhub_exportsgiven)federate --fail-on— into oneGateResultwhose.okis True only when every step passed. It ORCHESTRATES existing domain code; it reimplements no checker (the doctor step reusesdoctor.run_checks). Honesty invariants: no short-circuit (every step runs and ALL findings are collected even after an earlier failure) and no silent skip (eachGateSteprecordsPASS/WARN/FAIL/SKIP, whereWARNis 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). Thedocs-auditline 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 turning3/9 declared fact(s) verifiedinto3/8in 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:gitis derived from a.gitagit archiveexport cannot carry, sogit 2.49.0was 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. Thelintline carries_population_notebeside_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 and16 of 362and362 of 362read 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 fromgraph/linter.py) uniformly across all steps, so--format json/githubare identical regardless of which step produced a finding. Since BDL-078beadloom-btkd.9the 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 reportsWARN(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 (thetui-no-direct-infraboundary), so it consumes graph-index data — nodes, edges, symbols, hierarchy — through this facade, which delegates toinfrastructure/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 throughanalyze_git_activity/GitActivityfrominfrastructure/git_activity.py: repairing that boundary rule's deadto: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-exportsget_part_of_containers,NO_CHANGE_WORDSandcount_in_words, so the TUI words a level and rolls a box up asctxand the card do.guards/ — package: the flow-guard primitive (BDL-061 S1).
evaluate_guard(...)turns a check outcome, theguards:block of.beadloom/flow.ymland the request context into aGuardVerdictwhose exit code a harness acts on.run_invocation(...)is the one boundary everybeadloom guardinvocation returns through, so a failure anywhere becomes a recorded verdict rather than a traceback. Checks read the world only through the ports incontract.py— the realbd/gitprobes live inservices/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 witherrors='strict', so an undecodable event is refused under every locale rather than only under a UTF-8 one; andpaths.pycatchesExceptionaroundPath.resolve(), so a symlink loop — which raisesRuntimeErroron 3.10–3.12 and raises nothing on 3.13 — is a stated refusal on every interpreter.firing.pybounds the record it writes (BDL-061.56): the activeguard-firings.jsonlrolls over atACTIVE_FIRINGS_CAP(2000) records intoguard-firings.1.jsonl, so--livenessparses 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 inputliveness.pyreads — sofired_count,never-firedand the last outcome are the same numbers after a rollover as before it. What it costs is per-firingwhytext older than one generation, andGuardLiveness.carried_countsays 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.pyreads 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 toPathScope.UNDETERMINED, matches no exclusion and carries the undetermined write set intonot_coveredinstead of reading as a cleanpass; andsurface.pyreports what fraction of the write paths the emitted role adapters grant is named by a registered matcher, deriving the matchers from.claude/settings.jsonand the population from each adapter'stools: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 reasontyped_surface.pybelow has three: an empty population is not an unreadable one, and0 of 0 write path(s) boundread as full coverage in the instrument built to report that class (BDL-068 S4.x, BDL-UX #239).coveredisNonein both non-fraction states andunresolved/nothing_to_checktell them apart. The report also names the corpus it answered about — the artifacts on disk — becauseonboarding.role_dutiesanswers 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 redactingKEY=valueand 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:erroris a target the guard refuses to interpret, which stops that edit at exit 2 and stops nothing else, whileunresolvedis an inability the guard has about ITSELF — its own code will not import, itsflow.ymlwill 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: agit mvleftservices/bd_seamwithout an__init__.py,guard_probes.py:79imports it to reach the tracker, andBash,WriteandEditall returned the sameImportErrorat 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, becauseBashbelongs on the matcher; the verdict on inability moved instead. Permitting is not passing: the outcome is named on stderr besidePERMITTED_UNGUARDED, is recorded, and does not clearnever-firedin--liveness, whereis_unansweredis 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 declaresrefs: <ref_id>at the start of a line in the tracker, the scope expands downward throughpart_of, and a pair is serialised for exactly one named reason —blocked_by_bead,unresolved_scope,shared_node,shared_file,dependency_edgeoroverride_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, arefs: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 bybeadloom waves,beadloom review-briefand the MCPbead_contexttool: 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 danglingrefs:header. A human outranks the computation throughwaves.overridesin.beadloom/flow.yml, each entry carrying a reason and an exit condition (the sameexit_condition_deadlinethe 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 thegate_ownerthat 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 asroom_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_sizeis the width of one plan and not a claim about solitude, and thenot_applicableverdict 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 aWaveEnvironmentgathered 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. Thefocus-documentmedium 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 reports0 serialisationstruthfully about the wrong population — measured on this project's own S6, where one bead's hunk indocs/domains/application/README.mdlanded inside another bead's commit, and again where four concurrent beads all wrote into oneACTIVE.md. It is a medium and not a serialisation because it cannot be one:docs.ref_idholds at most one node per document andshared_nodefires on any ref intersection first, so a serialisation derived from document ownership adds nothingshared_nodedoes not already produce. The population is DERIVED —Routing.shared_kindsis the intersection of the document kinds every route of the composed/task-initwrites, 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. Thegraph-filesmedium 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 shapebeadloom-0mdo.66already took at the boundary for issue numbers — which changes every adopter's.beadloom/_graph/layout and is filed rather than taken. Thelanding-orderprecondition islanding.lock_sites(invocations): the command reads the composed flow artifacts an agent is HANDED, the seam's onebdgrammar parses them, and this module reports every instruction ofbd merge-slotwhose call form grants less than it is relied on for -- anacquirewith no--holder(one tracker actor for every role, so the holder cannot be told from the claimant), areleasewith 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 asunknown-formrather 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, andrelease --holderrefuses 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.51generalised it to everybdsubcommand 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:approvedis the KEPT rows and nothing else, because a node owning a file theDerived byfield ran over reached the approval without anyone deciding it -- six nodes on this repository, two of them carrying rows that sayno(BDL-UX #250) -- and a swept node nobody ruled on isswept_no_scope_decisionrather thannot_derived, which would say the derivation never reached it. Theunguarded_axisremedy 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 thebdseam. 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, andrebuildreplaces a room whose.beadloom-room.jsonnames 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--carryflags 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 besiderebuildREPLACES 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 andenvironment=Falseis 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 assync-checkexit 2 withstale: 2against a change that is clean atHEAD(BDL-UX #243). It carriesgit archive HEADplus the files the caller NAMES, with no "everything that differs fromHEAD" mode, because on a shared tree that set holds the neighbour's work.room_invocation(path)hands back thePYTHONPATHan 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.pycreates 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.pychooses 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 auv.lockis installed from it withuv sync --frozenin the room's copy of its directory; without a lock the room resolves afresh and says so inenvironment.resolution. The room'slimitsname what its missing.gitcosts a suite. Since BDL-083 S2d (BDL-UX #335) a carried pathHEADholds and the working tree does not is deleted in the room, empty directories with it, instead of refusing the room, androom_tree.pynames every file where the tree differs fromHEADthat 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 installdev, languagesto 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; andinterpreter.extrasis then read off the room's own interpreter throughinstalled_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 venv0.082 s anduv pip install -e1.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--parentonce printed0 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 findingrunning_not_compared. See the Wave Plan SPEC. Classified as thewave-planfeature 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 thescope_base()base unless--sincenames one, printed as the brief'sBase:line — each carrying the node that owns it; the window is the BRANCH, not the bead, so thechanged-outside-scopefinding 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:orREVIEW 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 aschange_measured: falsewith a finding, never as an empty change set. Scope is resolved throughwaves.scope.resolve_scope, the one parser of therefs: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 ofgit log <base>..HEAD, and the launch prompt — each either inspected or NAMED as one this command cannot inspect, because0 withheldwas true of bead comments and was read as a claim about the reviewer's knowledge while the account reached three reviewers throughACTIVE.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 inROLE_NAMESand every shipped command fragment, composed for this project'sflow.ymland including its project layer, matched by shape rather than by spelling — so a team that names its own document in.beadloom/flow/roles/review.mdmoves 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 and0 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, wherefeatures/BDL-068-S2S3names 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 indeclared_scope.pyor nowhere). Four channels is what the report states, not what exists. Aflow.ymlthat will not parse costs the documents channel and not the brief:prompts_naming_documentsanswersNone— which is not{}— and the channel reports NOT INSPECTED, because naming a malformed config isconfig-check's job (BDL-068.19-1). Notes, changed paths, scenarios and the commit range arrive as DATA, so the decision runs withoutbd, without git and without a repository. See the Review Brief SPEC. Classified as thereview-brieffeature 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 forglob("*.yml")andyaml.safe_loadby 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 onlyastandpathlib. 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-initcommand 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 routedbug, 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_kindsis the third face of the same computation — the kinds EVERY route writes, taken as an intersection rather than a difference — andbeadloom wavesspends 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 reasondoc_shape.pystates:onboardinganddoc_syncare peer domains. A routing table is found throughdoc_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 withTypeandFlowis 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 inRouting.noteswith its line number rather than dropped. Classified as thework-item-routingcomponent node.declared_scope.py — which work item a commit belongs to, and the scope its
## Axessection declares (BDL-068 S1.6). The joinscope-checkcannot 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 populationplanning_documents()returns, so a project configuring its owndoc_quality.pathsis 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 inscope_base.py) prefersorigin/<trunk>over the local one andpaths_changed_sinceusesref...HEAD, both for one measured reason: with a localmaintwo commits behind the remote,--since mainreported another work item's LANDED change as this branch's and--since origin/maindid 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 sincebeadloom-0mdo.32each reaches the pre-commit hook, which reads the command as2>/dev/nulland so used to see a run that could attribute nothing and a run that found nothing outside as the same empty string.VERDICT_MARKERmarks the verdict line in porcelain output for exactly that split. Classified as thedeclared-scopecomponent 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 aScopeBaseby the rule agreed with the owner:explicitwhen 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'sscope-checkline,scope-check --base,review-brief'sBase: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()readsGITHUB_HEAD_REFandCI_MERGE_REQUEST_SOURCE_BRANCH_NAMEbefore 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 cijudged both as outside the axes before, and 0 with2 file(s) attributed to the parent branchafter. Part of thedeclared-scopecomponent node.impact/ — package:
beadloom impact <path|symbol>(BDL-068 S1.2), the feature an adopter runs oversource_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 ataf26750dthat the same derivations report 2 writers and 4 branches ofinitunder 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 rulereaches-an-effect-sinkderives it — a name the target reaches TRANSITIVELY whose OWN body performs a declared effect directly (serialises-yaml, orreads-a-yaml-directoryas a conjunction) — and the answer names the seed, the rule and the effect.PUTS_BYTES_ON_DISKis deliberately not a declared effect: measured at the same commit it does not contain this product's own commit point, andopenalso 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_ownershiplists, per node the answer names, the files that node owns by the most-specific-wins rule and this derivation did not read, and the## Axessection writes the count and the first file in the row'sOwns unreadcolumn. One epic ruledonboardingout as blast radius because it surfaced as a caller, while the fix lived in that node's.md.txttemplates. 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 asnone 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 asrc-named directory, below one carryingpyproject.toml, and never above the project root;callers.resolvedis a predicate over whether the swept root holds the target rather than the literalTrue; 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 wrotebootstrap_project: 3 branch(es)whileinit, named one row above as a caller, had the four branches this project got wrong for nine review passes, and every count now carriesTHE_TARGET_SEATorTHE_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,renderandsection— with human,--jsonand--sectionoutput from one computation;sectionrenders the## Axessection a work item's document carries, using the grammardoc_sync.axes_sectiondeclares rather than a second one. See the Impact SPEC. Classified as theimpactfeature 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]'spackages,modulesandfilesagainstmypy_pathinto the roots a type check covers, andTypedSurface.partition(paths)holds staged paths against them. The surface is DERIVED rather than listed becausebeadloom-mr2l.82listed 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 CHECKEDwith its reason when no surface could be derived,NOTHING TO CHECKwhen 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 declaredexclude(not applied, because mypy does not apply it to files named on the command line, which is how the hook invokes it), and amypy.iniorsetup.cfgbeside thepyproject.toml. The declaration is read without a TOML parser for the reasonrooms.pystates about the packaging metadata. Measured on this repository: the hook used to handmypyevery staged.pyundersrc/ortests/, which is 970 errors in 90 files, and over the 24 commits offeatures/BDL-068it warned on 4 of the 7 that staged Python — all 4 false. Surfaced bybeadloom typed-surfaceand consumed by both pre-commit hook templates. Classified as thetyped-surfacecomponent 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 theProgramming Language :: Python :: X.Yclassifiers and from every job of every.github/workflows/*.ymlwith 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-pythonis kept as a FLOOR and never counted upward, because enumerating>=3.10needs 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 noruns-on, an unresolvableruns-onexpression, a matrix usinginclude/exclude, andpython-version: [3.10]left unquoted, which reaches a reader as the number 3.1. Surfaced bybeadloom rooms, printed under everybeadloom civerdict and carried on the MCPcomplete_beadverdict;mutation_scope.describe_roomcomposes its room sentence here so both surfaces print one sentence. Since BDL-068 S6 the census carries anextrasdimension: what this run has comes from the analysed project's own distribution as the running interpreter holds it (Provides-Extraand theextra ==markers onRequires-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 installingdev,languages,tui,watch,graphqlalso satisfiesall. It is the dimension BDL-UX #236 was filed on: measured at6c4d0a9, 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 spellingunknownwould read as a difference in the environment when what happened is that nothing looked. Since BDL-068 S6 it also carries alocaledimension, and it is the CODEC in force rather than the name somebody spelled —codecs.lookup(locale.getpreferredencoding(False)), the same derivationci.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: thetests-localelegs used to resolve to "this run cannot describe the dimensionlocale" while the process genuinely was running under an ASCII codec, anden_US.ISO-8859-1— the nameci.ymlpublishes — is not a locale macOS has, so a developer reproducing that leg ran theCroom 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 readslocale 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_DIRandload_jobs(path)are public because a second derivation reads the same declaration for a different question —gate_coverage.pybelow — 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 fromextras_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 pipelinepipeline_sourceschooses, so a GitLab job is a leg too (BDL-083 S2b), anddeclared_extra_names(project_root)enumerates what a leg spelling--all-extrasnames 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 itsimageand thepythonan officialpython:X.Yimage names;pipeline_sources(project_root)chooses the files once — since BDL-083 S2F1 the ones.beadloom/config.ymlnames underrooms.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 projectinfrastructure/python_projects.census_packagingfinds; and a census that derived no room carriesnot_derived, printed asrooms: not derived — <reason>instead of0 of 0. Classified as theverdict-roomcomponent 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/*.ymlfiles and.gitlab-ci.ymlthatrooms.pipelinesin.beadloom/config.ymlnames, or every one present when the key is unset, withset_aside(a present file the key leaves out),missing(a name with no file) andrefused(an unusable value) as notes that name the key;declared_pipelines(project_root)is the key read on its own. OwnsWORKFLOW_DIR. Part of theverdict-roomcomponent node.gitlab_pipeline.py — a
.gitlab-ci.ymlread 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 itsbefore_script,scriptandafter_scriptlines, withinclude:,extends:andparallel: matrixnamed as notes rather than expanded;python_of_image(image)reads the interpreter an officialpython:X.Ytag names. Read byrooms.pyandgate_coverage.py, so one file has one reader. Part of theverdict-roomcomponent node.gate_step.py — the shape one gate step reports in (
GateStep, itsstatusproperty,Finding) and the one line the Gate prints about it (gate_step_line). Lifted out ofgate.pybybeadloom-rqma.8and re-exported from it, so none of the forty-five modules that import these names frombeadloom.application.gatechanged. 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 ofGateStep.findings— thereadme-pairleg counted a second population and printed0 finding(s)in a run whosefindingsheld one.gate_declarations.py — what an unusable opt-in declaration costs a leg, for the two legs that are opt-in (
issue-logreadsissue_log:,readme-pairreadsdocument_pairs:).unusable_phraserenders the; N entr(ies) declared, M unusable: <where> (<why>)clause,unusable_declaration_stepandundetermined_declaration_stepbuild the two steps that say nothing ran, andrefusal_findingprojects 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 tellsdeclared nonefromdeclared badlyis 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-declarationsreads, this renders, the leg composes.gate_document_pairs.py — the
readme-pairleg itself:step_readme_pair, its line, and the projection of what it found. The first leg lifted out ofgate.pyunderbeadloom-oew7, and the reason is measured rather than asserted —gate.pywent 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 fromPairReport.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 printed0 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 the1 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-logleg:step_issue_log(report), its line, and the projection of what it found. Lifted out ofgate.pyunderbeadloom-6xdtfor a reason of its own:beadloom issue-number checktakes its exit code from this step'spassed, 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 anExceptionit raises into aGateStepthat readsERROR, names the exception and where it was raised, and fails the gate, so the steps after it still run;crashed_clause(steps)is theN step(s) crashed: …clause every surface prints. Held apart fromgate.pybecause 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 andbeadloom ciprinted 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 carriesreport_raised's sentencethe <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 ciruns 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 — whileCLAUDE.mdcalls the pre-push hook "the fullbeadloom 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 ownGateStepnames 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 filespipeline_sources.pipeline_sourcesreturns —.github/workflows/*.ymlthrough the samerooms.load_jobsreader the room census uses and.gitlab-ci.ymlthroughgitlab_pipeline.load_gitlab_pipeline(BDL-083 S2a), the onesrooms.pipelinesnames or every one present (S2F1) — so one file has one reader and one wording for "this workflow could not be parsed".DUTIESrecognisespytest,ruff/flake8/pylint,mypy/pyrightand, since BDL-080 S2b, the FSD linter (steiger, or thelint:fsdscriptinitwrites for a Feature-Sliced frontend) behind any runner prefix,npm,pnpmandyarnincluded, and it deliberately does not bind the style duty to the step namelint: the gate's ownlintstep 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 CIsite-buildjob 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 everybeadloom civerdict beside the room lines, carried asnot_runin--format jsonand on the MCPcomplete_beadpayload, which passesperformed_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: sameok, same exit code, same findings. Classified as thegate-coveragecomponent 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 whoserefs: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 itsrefs: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 isownedby a bead the tracker reportsin_progresswhose commits onbase..HEAD(the basescope-checkjudges against,scope_base(), since BDL-083 S1d; listed bydoc_sync.git_baseline.commits_since; a commit is a bead's when its message carries the git trailerBead: <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 whoseBead: <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 eachclaimsentry of the JSON and MCP payload carries the same fact asunread_bead_lines, one{placement, stated, count, commits}row per placement with the commit hashes,placementthe tokenoutside_finalorunread_finalandstatedthe text's sentence since S1 fix 7) changed a file the finding is about, andunattributedotherwise. The files a finding is about are the ones its locations name (a document in the documentation root's frame re-rooted through thedocstable; 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 areasonon the whole report. It is not a step: sameok, 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 everybeadloom civerdict beside the room and coverage lines, asownershipin--format json, as::notice::lines in--format githuband asownerson the MCPcomplete_beadFAIL payload. Classified as thegate-ownershipcomponent 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 labelgt:slotand returns aSlotHold(the slot's id, its holder, the holder's status in the same records;stalefor a holder the tracker lists asclosed).check_push(project_root, pushes)reads the export at each pushed commit and theBead:trailers of the commits the push carries, throughdoc_sync.git_baseline, and returnsREFUSED,cleanorNOT CHECKEDwith the linesbeadloom landing-checkprints. The pre-push hook and thelanding-ordermedium ofbeadloom wavesare its two consumers. See the Landing Slot DOC. Classified as thelanding-slotcomponent node.status.py — the read-side of the
beadloom statuscommand (BDL-059 S4; moved down fromservices/cli.py).gather_status(conn, project_root)reads the index/coverage/health/trend counts (its not-fresh count includesmissingpairs: 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 frozenStatusDatavalue;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 CLIstatuscommand 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 (includingtest_files_indexedandtest_files_unplaced),nothing_changedflag,errors,warnings,infos(BDL-080: a kind read through its alias), andactivity_history(theGitHistorya full reindex measured activity on;Noneon an incremental run or outside git)reindex(project_root, *, docs_dir=None)->ReindexResult— full reindex with sync baseline preservationincremental_reindex(project_root, *, docs_dir=None)->ReindexResult— incremental reindex with parser fingerprint and graph YAML change detectionresolve_scan_paths(project_root)->list[str]— resolves source scan directories from config (defined ininfrastructure/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 (moduleunread_code.py, BDL-082 S2a);beadloom reindexandbeadloom initprint 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 entryactivity_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 entryimport_aliases(project_root)->tuple[tuple[str, str], ...]— the usable pairs only
Module src/beadloom/application/doctor.py:
Severity— enum:OK,INFO,WARNING,ERRORCheck— dataclass:name,severity,descriptionrun_checks(conn, *, project_root=None)->list[Check]— runs DB validation checks plus optional agent instructions freshness check whenproject_rootis 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 namesbeadloom reindex --full, because an index an older version built on Windows matches nosource:
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, andcontext_metricsgather_status(conn, project_root)->StatusData— read the full status payload (counts, coverage, health, trends, context metrics) from the indexcompute_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_populationload_debt_weights(project_root)->DebtWeightscollect_debt_data(conn, project_root, weights=None)->DebtDatacompute_debt_score(data, weights=None)->DebtReportcompute_debt_trend(conn, current_report, project_root, weights=None)->DebtTrend | Noneformat_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]sprints 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_typewatch(project_root, debounce_ms=DEFAULT_DEBOUNCE_MS, callback=None)— monitors project files viawatchfiles
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, whereERRORis a step that raised (itserroris<class>: <message>) and is read before every other flag.not_verifiedkeepspassedTrue (a project that cannot supply a baseline is not thereby broken) while stopping the step reading greenGateResult— 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;Noneon any of them means nothing derived it, so a surface that was not told makes no claim.room_reasonandcoverage_reasonare the sentence a census or a coverage report that raised left in its place; an ownership report that raised is aGateOwnershipwhosereasonis that sentencerun_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.trackeris the read port over the work tracker, supplied by the service that runs the gate because thebdseam 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 nobodygate_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:inittells the adopter whatbeadloom ciwill say about the graph it has just judged, and it saidlint - <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 rewordedlint_step(project_root)->GateStep— the gate'slint --strictstep, and the only step that is public.beadloom initcalls 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 ofpassed = not result.has_errorsat the init site is how they would disagree againRULES_CONFIG_ERROR— thelintstep's summary whenrules.ymlcould not be loaded at all. Public because that step is the one case where a finding'sruleis the step's own name rather than a rule's, so a caller rendering findings has to branch on it:beadloom initprints the loader's complaint there and rule names everywhere else (BDL-067.6)- The sync-check step carries the pair's
ref_idas the finding'snodefield, which the linter's findings have carried since BDL-067.14and these named only in English prose. It is what letsgate_ownershipattribute a stale doc — the finding this branch's two-wave red was made of — to a bead without parsing a sentence. It fails onstaleANDmissingpairs (BLOCKING_STATUSES), emits warning findings forunverifiedpairs 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, eachdoc-stalefinding names its pair (— pair <doc> <-> <code>), and its remediation is chosen bydoc_sync.engine.attestation_clears: a reason re-attesting cannot clear, such asmissing_modules, is told what does clear it instead of being told to runsync-update(BDL-UX #282) - The doctor step summary counts the CHECKS that ran, by severity —
run_checksreturns one entry per FINDING, so the oldlen(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.