Quick start
Run the entire toolchain end to end in about thirty seconds — offline, with no API key and zero tokens spent.
The fastest way to understand what Handbooks does is to watch it do it. This runs the whole pipeline — analysis, generation, rendering, packaging, validation — against a bundled sample project using a bundled mock LLM server.
No API key. No network. Zero tokens.
Step 1 — Run it
git clone <this repo> && cd handbooks
pnpm install
pnpm build
pnpm demoStep 2 — Read what it printed
== build ==
== start mock LLM (offline; prose will be placeholder text) ==
== 1. analyze (no LLM) ==
{ "language": "multi", "files": 5, "functions": 23, "edgesKept": 31, "edgesDropped": 4, "filesUnparsed": 0 }
== 2. generate (phases 2+3) ==
{ "phasesRun": ["2a","2b","2c","3"], "nCards": 5, "nStages": 4, "nRegisters": 2 }
== 3. render markdown + HTML site + agent index + llms.txt ==
== 4. package as an agent SKILL (with the agent locator pages) ==
== 5. validate the SKILL ==
validate: OKThe prose will be nonsense — that is expected
The mock LLM returns placeholder text. The structure is completely real — stages, file assignment, call facts, line ranges, the register table, every link. Only the sentences are fake. That is exactly the split this project is built on: facts come from the parser, prose comes from a model.
Step 3 — Open the results
open examples/work/demo/handbook/overview.md # the markdown handbook
open examples/work/demo/handbook/html/overview.html # the multi-page HTML site
open examples/work/demo/handbook/handbook.html # the whole thing in one file
open examples/work/demo/skill/SKILL.md # the agent SKILL packageThings worth looking at specifically:
| Open this | And notice |
|---|---|
handbook/overview.md | A mermaid stage map generated from the call graph |
handbook/index.md | Every stage, nested, each with a paragraph |
handbook/register.md | Cross-stage state, with the stages that touch each piece |
handbook/agent/index.md | The agent index — lookup recipes, the stage table, coverage. Read whole |
handbook/agent/symbols.tsv | Every symbol → path:startLine-endLine. This is what the prose pages never had |
skill/references/coverage.json | A content hash per file. This is the drift signal. |
work/demo/phase1/dropped-calls.json | Calls the analyzer could not resolve, kept and categorized rather than guessed |
work/demo/phase1/scan-coverage.json | Files the analyzer could not read or fully parse. [] here means all five parsed |
Step 4 — Look under the hood
Everything the pipeline produced is plain JSON and YAML in the work directory:
ls examples/work/demo/
# phase1/ phase2/ phase3/ handbook/ skill/ run-manifest.json
cat examples/work/demo/phase1/graph.json | head -40
cat examples/work/demo/phase2/skeleton.yaml
cat examples/work/demo/run-manifest.json # model, phases, timings, token usageEvery one of those is schema-validated on read. If you hand-edit one into an invalid state, the next command tells you which file and why — it does not propagate.
The other demos
pnpm demo:self # this repo as its own input, against the mock LLM
pnpm demo:self:real # same, but against the real endpoint from .env
pnpm mock-llm # just the mock server, on port 8099pnpm demo:self is the more interesting one to read: it analyzes eleven real TypeScript
packages, so the stage structure it produces is a genuine map of a genuine codebase.
What just happened
analyzeparsed every file it could read with tree-sitter into a typed call graph, and wrote what it could not read tophase1/scan-coverage.json. No LLM.generatewrote a card per file, synthesized a stage skeleton, assigned every file to a stage, grouped and ordered them, then narrated bottom-up and extracted cross-stage state registers.renderturned that into markdown, an HTML site, one self-contained page, the agent index andllms.txt. No LLM.skillrepackaged it as an agent SKILL with a content hash per file. No LLM.validatechecked the structure, the frontmatter contract, the index ↔ stage-page links and hash freshness. No LLM.
The demo stops there. The other half — plan → apply → rollback → resync — is
covered in Your first handbook and
Planning changes.