One codebase in. Two handbooks out — one your team reads, one your agent routes with.
Your coding agent greps for a symbol, finds three of the seven places that matter, and ships a half-change. That is a routing failure, not a reasoning one. Handbooks gives it the map.
# full pipeline, offline, no API key, ~30s
pnpm install && pnpm build
pnpm demoBundled sample project, bundled mock LLM. Zero tokens spent.
Seven commands, one loop
Teal steps are deterministic — no LLM, no network, free to re-run in CI. Amber steps talk to your endpoint, and cache what they learn.
- 1
analyzeNO LLMParse every file into a typed call graph.
- 2
generateLLMCards, stages, prose, cross-stage state.
- 3
renderNO LLMMarkdown, HTML, agent index, llms.txt.
- 4
skillNO LLMPackage it for your coding agent.
- 5
planLLMLocalize a change into byte-exact edits.
- 6
applyNO LLMAll-or-nothing patch, with rollback.
- 7
resyncLLMRoll the handbook forward. No rebuild.
- How each phase works →
Why you can trust what you read
Facts come from a parser
tree-sitter builds the call graph: functions, resolved edges, boundary calls, and the calls it could not resolve — quarantined, never guessed. This layer never touches an LLM, so it is the same every run.
Prose sits on top, and says so
An LLM writes what a file is for and how a subsystem hangs together, always anchored to the graph. Where it fails, the structure still ships with an empty description. A missing sentence beats an invented one.
Built for routing, not reading
The output answers “which files, functions and state does this change touch?” — including the scattered, non-obvious ones a text search misses. Then the planner reads the real source at every address.
Applying is boring on purpose
Anchors must match byte-exactly and uniquely. Everything is verified before anything is written. Every touched file is backed up with its pre-patch hash, so rollback can prove what it is restoring.
It stays current incrementally
Resync diffs the old graph against the new one and regenerates only what actually changed. Touch three files, pay for three files. Documentation stops rotting because updating it stopped being expensive.
And it discloses its own limits
Languages read by the config-driven analyzer are named in the overview, so “best-effort call relations” can never be read as “exact”.
Analysis fidelity →One run. Six shipping formats.
Generation is the expensive part and it happens once. Everything below is a deterministic re-render you can run on every commit.
Markdown handbook
overview · index · one page per stage · state-register table
Multi-page HTML site
sticky TOC, breadcrumbs, theme toggle — works over file://
One self-contained page
a single .html you can email or attach to a ticket
Agent locator index
duty · entry concepts · state · exemplars · co-change hints
llms.txt + llms-full.txt
the llms.txt convention, plus the whole thing flattened
Agent SKILL package
SKILL.md + references/ + a content hash per file
Start with the free command
handbook analyze never needs an API key. Run it on your repo, look at the file and function counts, and decide whether the rest is worth a single token.