✅ fresh
last synced 2026-10-20T11:44:45.791774+00:00 · coverage 100% (
beadloom)Validation by Beadloom
doc_sync— same source assync-check.
Getting Started
This guide takes you from zero to a working Beadloom setup — including the configurable, multi-agent dev flow.
What Beadloom does
Beadloom keeps the architecture you intended and the code you actually shipped from drifting apart. It stores a queryable map of your system — domains, services, features, components, and the contracts between them — as plain YAML in Git, then continuously checks the real code against it:
- Docs that can't go stale. Beadloom tracks which docs describe which code and flags the ones that fall behind — on every commit, in CI, or on demand.
- Boundaries that are enforced. You write architecture rules in YAML;
beadloom lintblocks violations in CI, no matter who (or which AI tool) wrote the code. - Contracts checked across services. Federate per-repo graphs into one landscape and Beadloom reconciles what each service says it provides against what its consumers actually use — catching a broken contract before it ships.
- Context for AI agents.
beadloom primehands an agent a compact (<2K-token) picture of the architecture, andsetup-agentic-flowcomposes a full multi-agent workflow (explore, then dev → test → review → tech-writer) for Claude Code and Cursor. - A self-governing model. No shadow code: every source module must be a tracked graph node or explicitly exempt, enforced as a CI error.
Requirements
- Python 3.10+
- uv (recommended) or pip
- Optional: a git repo (for the hooks and the agentic flow),
bd(the beads tracker, for the agentic flow) - Optional:
Node.js 22or later with npm, to build the portal
Install
uv tool install beadloom # recommended
pipx install beadloom # alternative
pip install beadloom # also worksOptional extras (language parsers, TUI, file watcher):
uv tool install "beadloom[languages]" # TS/JS, Go, Rust, Kotlin, Java, Swift, C/C++, Objective-C
pip install "beadloom[languages]" # the same extra with pip
uv tool install "beadloom[tui]" # interactive terminal dashboard
uv tool install "beadloom[watch]" # file watcher for auto-reindex
uv tool install "beadloom[graphql]" # typed GraphQL contract checking (graphql-core)
uv tool install "beadloom[all]" # everythingWithout the languages extra Beadloom parses Python only: reindex records no symbol and no import from a file in any other language, so no edge is drawn from that code, and nothing warns you unless the run finds no symbol at all. Install the extra for a project in any other language.
The current release is 9.0.0. beadloom --version reports the build you actually installed. This line is the one place a document states the version as a claim, and beadloom docs audit compares it against pyproject.toml on every run — so a release that bumps the manifest and forgets the prose is reported instead of merely being wrong. Every other version literal in the documentation is a dependency pin or a historical reference to the release a feature arrived in.
Initialize
cd your-project
beadloom init --bootstrap # scan code → generate an initial graph--bootstrap scans your code structure and proposes domains, services, and features. Use --yes (-y) to skip prompts (CI / automation).
init checks its own output, and can exit 1. After the graph is written and indexed, every entry point that wrote a file under .beadloom/_graph/ — --yes in any mode, --bootstrap, --import and the interactive wizard — runs the same lint step beadloom ci runs. When the scaffold does not pass the rules the same run wrote beside it, init withdraws the completion it has already printed, names each failing rule with its node and the graph file that node was written into, and exits 1. The scaffold is left on disk: the exit code reports the state, it does not withdraw the graph. Until BDL-067 there was no such check, so a virgin beadloom init --yes --mode bootstrap exited 0 and the next command an adopter runs — beadloom ci — was red on a rule that same run had written (BDL-UX #192). A scripted beadloom init --yes && beadloom ci now stops at init instead. The CLI reference has the two report shapes, the two paths that take no verdict, and the one graph file shape that still ends init in a traceback.
No documentation is required to start — Beadloom bootstraps a skeleton from code structure alone. You fill it in by hand or with any AI agent (see
beadloom docs polish), and Beadloom keeps it current.
What init writes
.beadloom/_graph/services.yml— the architecture graph (nodes + edges).beadloom/_graph/rules.yml— auto-generated architecture lint rules.beadloom/config.yml— project configuration:languages,scan_paths, on a JVM or Swift projecttests.mirrors, and on a Python projecttests.flat_tests: true.beadloom/AGENTS.mdand.beadloom/README.mddocs/— documentation skeletons for each graph node (an existing file is never overwritten).mcp.json(or equivalent) — MCP config for the detected editor.gitignore— two additions, both appended and never rewritten:- the generated working set under
.beadloom/(the index and its SQLite sidecars, the guard firing record), written once; /site/, the directorybeadloom docs sitewrites the portal into, checked on every run.
- the generated working set under
The /site/ line is not written when a line of .gitignore already decides for site/ (site/, /site/**, or !/site/ to commit the portal), when site/ already holds files — tracked by git or only on disk, it is then your own source and must stay visible to git status — or when the project is not inside a git working tree. Untracked files of the portal beadloom docs site wrote there do not count: init recognises them by the generated marker the scaffold writes into its files, writes the line for them, and does not scan that folder as code. Files git tracks in site/ keep it yours, whatever they are. init prints which:
Ignored: /site/ (the portal `beadloom docs site` writes) appended to .gitignore
Not ignored: /site/ - site/ already holds 12 files tracked by git, so it is the project's own and new files there must stay visible to git; run `beadloom docs site --out <dir>` to write the portal elsewhere, or move that source out of site/and, when a top-level folder holds the portal docs site wrote (after init --force on a project that already built its portal):
Not scanned: site/ - holds the portal `beadloom docs site` wrote (its files carry the generated marker), which is output, not the project's codeA portal written below a top-level folder (--out build/portal) is not recognised and is scanned like the rest of the project.
With your own site/, write the portal elsewhere, for example beadloom docs site --out portal, and ignore that directory yourself.
init also runs a full reindex: code symbols are extracted, imports resolved, and depends_on edges inferred from code. It then prints the reindex's Tests: line and, when any test file is bound to no node, names each one with its placement (BDL-078). Measured on a two-module Python project with tests/test_invoice.py and tests/test_helpers.py:
Tests: 2 files (1 bound to a node (1 flat, by the module named or imported), 1 unplaced)
1 test file(s) bound to no node - lay each out under the mirror of the code it tests, or name it in that node's `tests:` list:
tests/test_helpers.py (unplaced)What init reads in each stack
init makes a node of each module it finds and draws an edge for each import between two of them. Six stacks were measured, each on a small project under tests/fixtures/site/ built from the installed wheel: every module became a node, every import between modules an edge, and no edge appeared that the code does not have. BDL-080 added two Feature-Sliced frontends, vue-fsd and rn-fsd, measured by import form rather than by module count.
| Stack | What init reads | Measured on its fixture |
|---|---|---|
| Python | the folders under the source directories; imports through the scan paths | three of three modules, three of three edges |
| JavaScript, TypeScript | the same; a relative import (./x, ../y) by the file it names; since BDL-080 a non-relative one through the governing tsconfig paths, then imports.aliases:, then baseUrl; React Native's .ios/.android/.native/.web files; .mjs and .cjs files; a file counts only when named in its exact case. CommonJS require() is not read | six of six modules, seven of seven edges |
| A Feature-Sliced frontend (Vue, React Native) | the fsd preset: a node per slice tagged with its layer, app/shared segments, legacy folders, Expo Router's app/ as one app-routes node, each Expo module with its ios/ and android/ parts; the FSD rules and Steiger's lint:fsd script; the aliases babel.config.* and vite.config.* declare | every import into the project lands on the node owning the file its bundler loads, all 49 on vue-fsd (Vite) and all 33 on rn-fsd (Metro); lint --strict right after init finds what each fixture plants: on vue-fsd a cross-import and a deep import (2 errors), on rn-fsd a slice's extra folder (1 warning) |
| Go | the folders; an import through the governing go.mod, with go.work use and local replace directives; the standard library and other modules draw no edge | five of five modules, seven of seven edges |
| Java, Kotlin (Maven, Gradle) | every module holding src/<set>/<java|kotlin>/; the packages below the common base package become nodes, the production roots the scan paths, each test tree a tests.mirrors entry; an import through the package its files declare | Java: four packages, four edges. Kotlin: three and three, on the layout Kotlin's conventions recommend, with the common root package left out of the folders |
| Swift (Swift Package Manager) | every Package.swift, read as text and never run; each library, executable, macro or plugin target holding Swift becomes a node and its folder a scan path; each test target a tests.mirrors entry; an import through the target the manifest declares | three targets, three edges |
A project mixing stacks keeps each one's reading: a Python or TypeScript service beside a Maven module or a Swift package keeps its node and its scan path. Code inside a module's folder but outside the folders its layout reads — Python scripts in backend/scripts beside a Gradle module's backend/src — is a scan path too, and its files belong to the module's node. init names it:
Also scanned: backend/scripts - code in a module's folder outside its source roots; its files belong to that module's nodeKnown limits.
- An Xcode project is reported, not read. Its targets list their files in
project.pbxproj, not by folder, soinitreads Swift throughPackage.swiftonly and says what it saw:Not read: 14 .swift files outside any Package.swift target (Xcode: App.xcodeproj) - init reads Swift through Package.swift only, so they are in no node and no scan path. Declare the nodes and the scan paths by hand. - A Gradle
sourceSetswith customsrcDirs, or a Maven<sourceDirectory>, is not read:initfinds a JVM module by the standardsrc/<set>/<java|kotlin>/layout and parses no build file. Add the source folders toscan_pathsand declare the nodes by hand. - A code file lying directly in a folder beside a JVM module or a Swift package (
services/x.pynext toservices/billing/) is in no scan path: a scan path is a folder, and that folder would scan the module's test tree too.initnames it —Not read: services/x.py - a code file lying directly in a folder that holds a module; ..., or with several files a count and the first five — and the file is read once you move it into a folder of its own. - A Java or Kotlin package declared in folders that different nodes own resolves an import of a class to the folder holding the class's file (
B.kt,B.java). A wildcard import of such a package, a top-level Kotlin function, or a class in a file named otherwise draws no edge rather than a guessed one. - CommonJS is not read (BDL-080, the owner's ruling):
require()andmodule.exportsdraw no edge and no symbol, so a.cjsor.jsfile written in CommonJS is an import target only. In a Feature-Sliced frontend CommonJS lives in configuration files, not in layer code. - An alias a bundler computes — a Babel
module-resolverroot:folder, a regular-expression alias, a value built with no string literal — is not read;initnames the last two it met. Declare the folder underimports.aliases:by hand. - A Feature-Sliced tree inside one package of a monorepo is not read as such. Slice groups are read since BDL-082 S2: a folder of a sliced layer holding neither a standard segment nor an
indexis a group when it has no code file at its top and a slice below it, at any depth, or when it has code at its top and a folder in it holds a standard segment, and one slice otherwise; each slice in a group is a node<layer>-<group>-<slice>, and the group none.
Configuration
Everything lives under .beadloom/ in your repo.
.beadloom/config.yml
| Key | Default | Description |
|---|---|---|
scan_paths | ["src", "lib", "app"] | Source directories to scan |
languages | all supported | File extensions to parse (e.g. [".py", ".ts"]) |
docs_dir | docs/ | Documentation root directory |
sync.hook_mode | warn | Pre-commit hook mode: warn or block |
tests | see below | Where your tests are and which files are tests |
site | the directory name, base /, no repository | The portal's identity: title, description, base, repo_url, forges; see the site: reference |
activity | no block | exclude:, the project's own machine-written files, left out of activity; see below |
imports | no block | aliases:, the import aliases a bundler applies and no tsconfig carries; see below |
project_name | the root manifest's name | The name the composed CLAUDE.md heading takes; config-check compares against it in a checkout, a worktree and a clean room alike (BDL-083 S2c) |
rooms.pipelines | every pipeline file present | github and/or gitlab: which of .github/workflows/*.yml and .gitlab-ci.yml the room census reads (BDL-083 S2F1); see rooms |
A monorepo
.beadloom/ sits at the git root, beside .git, never in a subfolder of a repository. Git answers in paths relative to its own root, so below it sync-check --since would compare two empty sides and read every pair fresh. Since BDL-083 S2e init refuses that layout and writes nothing, doctor reports [ERR] Project root refused: the git root is above the project root, and sync-check --since refuses, each exiting 1 and naming both roots (BDL-UX #325). In a monorepo, put .beadloom/ at the repository's root and list each package's source under scan_paths, or give the subproject a repository of its own. install-hooks, diff --since and export are not yet refused below the git root.
A monorepo with packages in several languages is read as one project: a pyproject.toml under a scan path, or between the root and one, is a Python project of its own, and the clean room measures the one that owns the files you carry, installed from its own uv.lock (BDL-083 S2b). The room census reads .gitlab-ci.yml as well as .github/workflows/, and rooms.pipelines says which. A project that names itself in no root manifest (pyproject.toml, package.json, go.mod, Cargo.toml) leaves the composed heading's name undeclared: set project_name: so the name is declared and compared.
tests: — where your tests are
Beadloom binds each test file to the graph node it tests, and never by a guess at its name. A test binds in one of three ways:
- By the mirror of its path. A file under
<root>/unit/or<root>/integration/names the code its path mirrors:tests/unit/billing/test_invoice.pynamesbilling/invoice.pyunder a scan path, or under a package directly beneath one. A file in a build tool's test tree names the code tree beside it, with the language's test affix taken off:src/test/java/shop/BillingTest.javanamessrc/main/java/shop/Billing.java, andTests/ShopTests/BillingTests.swiftnamesSources/Shop/Billing.swift. The node that owns that code binds the test. - Beside the code. A test inside a node's source, outside every root and test tree —
billing_test.gobesidebilling.go,invoice.test.tsbesideinvoice.ts— binds to that node. It must lie underscan_pathsin a language listed inlanguages. - Through
tests:in the graph. A node may list path prefixes undertests:in its graph YAML to claim tests its path does not mirror. A declaration wins over the others, and a prefix that covers no test file is a reindex warning. - Flat, when the project declares it. With
tests.flat_tests: true, a Python test directly in a root, in no kind folder (tests/test_invoice.py), binds to the node owning the module its name names (invoice.pyorinvoice/__init__.py) when exactly one node owns a module of that name (placementnamed), else to the one node its imports reach (imported), else to nothing.initwrites the key for a project whose languages include.py(BDL-078). It is not a default: an adopter who raninitbefore this version addsflat_tests: trueundertests:in.beadloom/config.yml, or re-runsinit.
No test binds by a guess the project did not declare: not by its file name or by what it imports unless flat_tests is set, and never by a folder named after a node. A file under a root that none of the three reaches is unplaced: it binds to no node, and beadloom reindex, ctx and the debt report say how many there are. A file outside every root, every test tree and every node's source is not read at all, so ctx and the debt report always state the patterns and the roots a test file is read under. A file's path decides only WHETHER it is a test, by the patterns below. Every key is optional:
| Key | Default | A declared value |
|---|---|---|
tests.roots | [tests, test, spec, __tests__], each read only where a folder of exactly that spelling exists | replaces the list |
tests.kinds | unit, integration, acceptance, self_check, each in a folder of its own name | replaces the folder of that one kind |
tests.patterns | the five groups below | replaces all five groups |
tests.mirrors | src/test/java: src/main/java, src/test/kotlin: src/main/kotlin, Tests: Sources | replaces all three trees; init writes one entry per JVM test tree and per Swift test target, so on such a project the defaults no longer apply |
tests.beside_code | true | true or false |
tests.flat_tests | false (init writes true for a Python project) | true or false; a value that is not a boolean is a reindex warning and false stands |
| Language | Framework group | Default patterns |
|---|---|---|
| Python | pytest | test_*.py, *_test.py |
| Go | go_test | *_test.go |
| JavaScript, TypeScript | jest | *.test.*, *.spec.*, __tests__/**/*.[jt]s, __tests__/**/*.[jt]sx |
| Java, Kotlin | junit | *Test.java, *Tests.java, *TestCase.java, *IT.java, *ITCase.java, *Test.kt, *Tests.kt, src/test/**/*.java, src/test/**/*.kt |
| Swift | xctest | *Tests.swift, *Tests/**/*.swift |
ctx and the debt report name only the roots that exist. A project with none of the four, and with tests read beside the code, sees a clause ending and it lies beside a node's code, since none of the roots tests, test, spec, __tests__ exists.
A pattern without a / matches the file name. A pattern with a / matches the end of the file's path, folder by folder, and ** stands for any number of folders: __tests__/** is every file under a __tests__/ folder at any depth. Matching is case-sensitive.
# .beadloom/config.yml — a Python project keeping its tests in test/
tests:
roots: [test]
patterns:
pytest: ["test_*.py"]
beside_code: falseDeclaring patterns states which frameworks the project has, so the Go, JS/TS, Java/Kotlin and Swift defaults are dropped. Switch beside_code off when your code has modules named like tests (test_utils.py under src/), because a file name cannot tell a test module from a module about tests. A key that cannot be used is a reindex warning and its default stands. A roots list naming the project itself or a folder outside it (., /, ..) is refused whole with a reindex warning, and the default roots stand.
What is deliberately not bound, and the declaration that binds it:
An Xcode test target (
ShopTests/besideShop/) is not paired by default, because the pairing depends on your project's name. Until you declare it,ShopTests/is not read:ctxshows no bound tests and the debt report counts every covered node untested. One line binds it by the mirror,ShopTests/BillingTests.swiftto the node owningShop/Billing/:yamltests: mirrors: ShopTests: ShopDeclared
mirrorsreplace the three default trees, which an Xcode project does not use.A test kept in a folder named after a node (
tests/billing/test_flows.py), or a flat test withoutflat_tests, is read and countedunplaced, and the debt report then withholds its untested count. List the folder under the node'stests:in the graph to bind it.A marker file without a test file (
conftest.py,jest.config.js, an emptysrc/test/orShopTests/) names no framework: a project with no test file readsnoneand scores that.A flat
test/orspec/folder, or a top-level__tests__/, is a default root, so its files are read without a declaration and countedunplacedunless a kind folder or a node'stests:places them, and the debt report then withholds its untested count. List the folder under the node'stests:in the graph to bind it.
The full rule is in the Test Mapping SPEC.
activity: — files a machine wrote
The activity a node card, ctx and the TUI show counts changed lines (added + deleted) over 30 and 90 days, with levels relative to the project (hot, warm, cool, quiet, dormant; see the Git Activity component). A file a machine wrote is not work, so it counts neither its lines nor its commit. Dependency lock files (package-lock.json, uv.lock, go.sum and 17 more, by file name) and files git's attributes mark linguist-generated or binary are left out without a declaration. A project adds its own:
# .beadloom/config.yml
activity:
exclude:
- "*.pb.go" # no '/': a file name, in any folder
- "web/dist/*" # with '/': the whole path from the project rootThe grammar is not .gitignore's. A pattern without a / matches a file name anywhere. A pattern with a / matches the whole path from the project root, and * crosses directories: src/*.py matches src/a/b.py too, where in .gitignore * stops at /. Matching is case-sensitive.
A key the block does not read (activity.exlude), an exclude: that is not a list and an entry that is not a non-empty string are each refused by name. beadloom config-check and the Gate's config-check step block on them, under The `activity:` block of .beadloom/config.yml (N):; the usable entries are kept.
imports: — the aliases your bundler applies
A JavaScript or TypeScript import such as @shared/api names a folder through an alias. The resolver reads tsconfig paths and baseUrl itself. Babel's module-resolver and Vite's resolve.alias live in a program it does not run, so their aliases are declared here, and beadloom init writes what a text scan of babel.config.*, .babelrc and vite.config.* found, for you to confirm:
# .beadloom/config.yml
imports:
aliases:
"@shared": src/shared # @shared/api -> src/shared/api
"~": src # ~/features/auth -> src/features/authAn alias is the string a specifier is, or starts with followed by /; the longest one that matches wins. Its value is a folder or file relative to the project root (. for the root). A non-relative specifier is read through tsconfig paths first, then these aliases, then baseUrl. An unknown key, an alias that is a pattern (@/* is tsconfig's form; write @) or a relative path, and a folder that names nothing in the project are each refused by name, and beadloom config-check and the Gate's config-check step block on them, under The `imports:` block of .beadloom/config.yml (N):.
.beadloom/flow.yml — the agentic dev flow
Declare what your project is, once. setup-agentic-flow reads this to compose the role workflow:
tools: [claude, cursor] # generate adapters for one or both
architecture: [ddd] # ddd | fsd (exactly one)
stack: [python] # python, fastapi, javascript, typescript, vuejs
quality: [clean-code, tdd]
language: en # the language the flow's documents are written inThen:
# Compose the roles, the slash commands and CLAUDE.md from
# CORE + architecture overlay + stack overlays + your project layer:
beadloom setup-agentic-flow
# Override the flow.yml selection from flags:
beadloom setup-agentic-flow --tool cursor --architecture fsd --stack typescript,vuejsThis writes .claude/agents/* (Claude Code) and/or .cursor/agents/* (Cursor) at parity, plus .claude/commands/* and .claude/CLAUDE.md. For cursor it also writes the composed core and the four commands as alwaysApply rules under .cursor/rules/ (beadloom-flow.mdc, beadloom-coordinator.mdc, beadloom-task-init.mdc, beadloom-checkpoint.mdc, beadloom-templates.mdc), each body byte-identical to the file Claude reads; up to 9.0.0 Cursor received a 17-line pointer instead (BDL-083 S2h). config-check compares each of them against its composition, so the workflow never silently drifts, and exits 1 when one declared tool's files lack a layer the other's carry.
Your project's own rules go in .beadloom/flow/{roles,commands,claude}/ rather than into the composed files: that fourth layer composes last, is never overwritten, and survives every upgrade. .beadloom/flow/claude/CLAUDE.md reaches the core of both tools, and .beadloom/flow/cursor/CLAUDE.md reaches Cursor's alone. See the Project Overlays guide for adding a fragment, declaring a suppression, and migrating an edit you already made by hand.
Git hooks — pre-commit + the pre-push Gate
beadloom install-hooksInstalls both hooks by default:
- pre-commit (lighter) — judges the commit, not the tree: ruff over the staged source files (its own exit code read, so
ruff did not runis told apart from violations), the architecture lint over the nodes that own a staged path (beadloom lint --staged --strict, BDL-083 S1a), a type check over the staged files inside the surface the project declares typed (derived per run from[tool.mypy]; a surface that could not be derived readsNOT CHECKEDwith its reason and never blocks),sync-check --stagedover the pairs the commit stages either side of, and the ACTIVE/tracker coherence step (warnorblockvia--mode). It prints how many modified or untracked files outside the commit it did not judge, so a narrow green is not read as a whole-tree green. Re-runbeadloom install-hooksafter upgrading — an already-installed hook keeps its old whole-tree behaviour until you do. - pre-push Beadloom Gate (authoritative for what it runs) — runs every step of
beadloom ciover the whole tree (the CLI reference lists them) and blocks the push on red. It does not run your test suite, and it says so: under the verdict it names the verifications your own pipeline declares that no step of the run performed, each with the command your workflow runs for it. A push the hook cannot judge is refused, not let through (BDL-083 S1a, BDL-UX #326): withoutbeadloomon thePATHgit runs the hook with, it exits 1 with a sentence saying so, where 9.0.0 exited 0 in silence. It reads the Gate's verdict line from a copy of the report (beadloom ci --format rich --tee <temporary file>), and a run that leaves no verdict line is reported asthe Gate did not runand refused, never as stale documentation. Before the Gate it runsbeadloom landing-check --stdinand refuses (exit 1) a push whose exported tracker still holds the merge slot for a bead the push carries, naming the landing sequence acquire → commit → release →bd export→ the export landed → push (BDL-083 S2g, BDL-UX #354). Until this release that push went through, and the next clone'sacquirewas refused.git push --no-verifyis the documented escape hatch. Re-runbeadloom install-hooksafter upgrading: an installed hook keeps the text it was written with.
Select one with --pre-commit / --pre-push; remove with --remove.
MCP + IDE rules
beadloom setup-mcp # .mcp.json (Claude Code) / .cursor/mcp.json (Cursor) / Windsurf config
beadloom setup-mcp --tool cursor # target a specific editor
beadloom setup-rules # thin IDE adapter files pointing at .beadloom/AGENTS.mdThe MCP configuration names the server's command as beadloom, resolved on each clone's own PATH, never one machine's absolute path (BDL-083 S2h).
The MCP server (beadloom mcp-serve) exposes 18 tools — 14 graph read/write tools plus four process tools (task_init, bead_context, checkpoint, complete_bead) that drive the agentic flow.
Usage examples
A. The core loop
beadloom prime # compact (<2K-token) project context for an agent
beadloom ctx sync-check # full context bundle for a node (add --json to parse)
beadloom why sync-check # impact analysis: upstream deps + downstream dependents
beadloom graph # Mermaid architecture diagram
beadloom search "stale" # FTS5 search across nodes, docs, and code symbols
beadloom status # node/edge/doc counts, coverage, health trendsValidate before you commit:
$ beadloom sync-check
✓ 149/149 doc-code pairs in sync
$ beadloom lint --strict # exit 1 on error-severity violations (for CI)
✓ All architecture rules satisfied
$ beadloom ci # the unified gate, one exit code
reindex PASS
lint PASS
sync-check PASS
docs-audit PASS
docs-quality WARN
doc-spaces WARN
config-check PASS
doctor PASS
✓ CI gate passed
sync-checkexits 2 when docs are stale.beadloom sync-update <ref> --yeswalks you through (or auto-applies) the fix until the stale count reaches 0.
docs-qualityanddoc-spacesare warn-only: they report and never change the exit code, so adding Beadloom to a project with existing documents cannot turn a green build red.WARNthere means the step ran and part of what it reports on was not verifiable — it is not a softer PASS. See the Document Kinds guide.
B. The agentic dev flow walkthrough
With flow.yml configured and setup-agentic-flow run, a feature flows through gated waves. The process roles live in your editor adapters (.claude/commands/* for Claude Code); the five work roles are subagents:
/task-init— scaffold the work item (PRD/RFC/CONTEXT/PLAN/ACTIVE or BRIEF) and create the beads (tracked inbd).- explore — step 0.5, mandatory and before the type is chosen: derive the
## Axessection withbeadloom impact <path|symbol> --sectionand paste it into the BRIEF or the RFC. The axis count is what says whether a work item is a bug, so the type is decided from a derivation rather than from how the request was phrased. This role creates no bead, so the bead DAG stays four-role.
- explore — step 0.5, mandatory and before the type is chosen: derive the
/coordinator— orchestrate the waves, gated by bead dependencies.beadloom waves <bead>...decides which of the ready beads may run at the same time from the code they occupy, names each wave's gate owner and each bead's clean room — whichbeadloom clean-room <bead>then builds, deriving the directory from the bead and refusing one it did not create — and states the seven media every wave shares whatever its width — the graph the plan is derived from, the working tree, the commit gate, the landing order, the focus document, the doc baseline and the tracker's id space:- dev — implement the bead (TDD), update its
SPEC.md/DOC.md. - test — write/extend tests, verify coverage.
- review — read-only quality + boundary check (
beadloom review-brief,beadloom diff,lint); the brief withholds the author's own comments until a verdict is recorded. - tech-writer — refresh the docs the change touched (
sync-update).
- dev — implement the bead (TDD), update its
- Push — the pre-push Beadloom Gate runs
beadloom ci; a red gate blocks the push ("no code reachesmainwithout current docs and clean boundaries"). - PR — opening the PR triggers CI and the AI tech-writer (below); a human merges once green.
Each agent starts from beadloom prime / beadloom ctx <ref> instead of grepping the codebase from scratch, so it works inside your architecture.
C. The AI tech-writer
On a pull request, a packaged harness repairs drifted docs on the PR branch:
# Run it manually against the drift since a git ref (the push's parent commit);
# --platform selects the CI adapter, --dry-run reports the wiring without a model/PR:
python -m beadloom.ai_agents.ai_techwriter --platform github --since "$(git rev-parse origin/main)" --dry-runIt is symbol-scoped (a doc is rewritten only when a symbol it references actually changed), bounded-parallel, and verdict-classified — ok / flagged / infra — so a genuine unresolved doc drift blocks the PR, but a dead runner or exhausted quota never freezes merges. CI is the true enforcement; the refresh is a proposal a human merges.
D. Federation — hub + satellites
Inside one repo the dangerous bugs hide between services. Each service ("satellite") exports its graph; a hub composes them and reconciles contracts:
# In each service repo — emit a deterministic, commit-stamped artifact:
beadloom export --out service-a.json
# At the hub — compose >=2 artifacts into one landscape and reconcile contracts:
beadloom federate service-a.json service-b.json service-c.json
# Arm the CI landscape gate (writes the artifact, THEN exits 1 on a bad verdict):
beadloom federate service-*.json --fail-on default
# default fail-set = breaking,drift,orphaned_consumer,undeclared_producerfederate writes .beadloom/federated.json + .beadloom/federated.txt and assigns each contract a verdict (CONFIRMED / BREAKING / ORPHANED_CONSUMER / UNDECLARED_PRODUCER / EXTERNAL / DRIFT) over AMQP and GraphQL, plus per-satellite staleness. beadloom ci --hub <export> --fail-on default folds the landscape gate into the unified CI verdict.
Publish the portal
beadloom docs site turns the graph into a VitePress site: an interactive architecture viewer with impact and neighbourhood modes, a page per node, a metrics dashboard, the contract landscape, and your docs/ with a freshness badge on each. The theme ships in the package, so nothing else needs installing besides Node.js 22 or later. From a fresh install to a published portal:
pip install "beadloom[languages]" # or: uv tool install "beadloom[languages]"
cd your-project
beadloom init --yes # the graph, the config, /site/ in .gitignore
beadloom reindex # init ran one; run it again after changing code or the graph
beadloom docs site # the content and the scaffold, into site/
cd site && npm ci && npm run docs:build # site/.vitepress/dist is the static site
npm run docs:preview # look at it locallydocs site reports what it wrote. Measured on this repository:
Generated 515 files under <out>
Scaffold (beadloom 9.0.0): 209 written, 0 updated, 0 unchanged, 0 retired, 0 empty folders retired, 0 moved pages retired, 0 copied from .beadloom/site/That is this repository's own portal written by 9.0.0 into an empty directory, <out>. Generated counts every file the run wrote, the scaffold's included, so the first number is never smaller than the second.
Give the portal your project's identity in .beadloom/config.yml. Without it the title is the directory's name, the base is / and the portal links to no repository:
site:
title: Tidewater
base: /tidewater/
repo_url: https://github.com/acme/tidewaterThe base path. GitHub Pages serves a project repository under /<repo>/. When base is still / and origin is a github.com project repository, docs site warns on stderr:
Warning: the portal is built for the base /, and GitHub Pages serves this project repository under /tidewater/, where the portal loads none of its assets. Set `site.base: /tidewater/` in .beadloom/config.yml, unless the site is served from a custom domain.Publish with GitHub Pages:
beadloom docs site --pages-workflow # also writes .github/workflows/beadloom-portal.ymlPages workflow: .github/workflows/beadloom-portal.yml written (base /tidewater/, Node 22, portal site/, branch main)Set Settings → Pages → Source = GitHub Actions, commit the workflow and push to the default branch: each push regenerates the portal from the code with the same beadloom version, builds it, checks its base against the Pages address and deploys it. Run the command again after upgrading beadloom or changing site:. On another forge, run the same commands in your CI and publish site/.vitepress/dist.
Everything under site/ is output and stays out of git. Your own pages and styles go under .beadloom/site/, which is copied last on every run. A self-hosted forge for the source links, what happens to links and HTML in your docs, and the browser tests the portal ships are in the VitePress Site guide.
Keep docs in sync
beadloom sync-check # doc↔code freshness (exit 2 = stale)
beadloom sync-update <ref> # review/apply the fix for a node (--yes to auto-apply)
beadloom docs audit # detect stale numeric/version facts in prose docs (--stale-only, --json); also the docs-audit gate step
# a claim is a whitespace-delimited token whose whole core is a number ("6,390" counts, "BDL-061.33" and "v2.2.0" do not)
beadloom docs quality # check planning documents against the writing standard (--check NAME, --json, --strict)
# exit 0 with findings unless --strict; also the docs-quality gate stepsync-check also reports an incomplete row for a document that is current and no longer carries the sections its kind's peers carry. It never blocks. See Document kinds.
Limits
- The code indexer parses Python out of the box; TypeScript/JavaScript, Go, Rust, Kotlin, Java, Swift, C/C++ and Objective-C need
beadloom[languages]. Whatinitreads per stack, and its limits, is above. - Documentation is indexed from
docs/(configurable viaconfig.yml). - The graph is YAML under
.beadloom/_graph/; rules in.beadloom/_graph/rules.yml. - Maximum documentation chunk size: 2000 characters.
Next steps
- Architecture — system design, the node-kind model, the rules engine, the agentic-flow configurator.
- Executable acceptance scenarios — Gherkin as the source of truth, and what
scenario-coveragereports. - Document kinds — required sections and the five writing-standard checks.
- Testing — where a test lives, how it binds to a node, the suite rules, and mutation per change and weekly.
- Parallel waves — what a wave of concurrent agents guarantees, and what it only reports.
- CI Setup — GitHub Actions / GitLab CI integration.
- VitePress Site — the portal: what it shows, the
site:settings, publishing and its browser tests.