Quick start
Two commands, then nothing to run.
Install, run graft init once, and Graft rides along in every Claude Code session. It rebuilds the graph in the background after each turn, so the map stays in sync on its own. No daemon, no MCP server, no re-indexing.
Works with
A map up front beats grepping from cold.
Same agent, same tasks: cold vs. graph read first. A separate model checks each answer is actually right, so speed can't fake it. Reproduce with npm run bench. SWE-bench is provisional.
Your coding agent reads 30 files to change 3.
The amber trail is an agent with no map: grep, open, back out, retry, on every single task. Graft hands it the map instead, and the wandering stops.
Your agent starts oriented.
graft build turns 247 files into 12 plain-English pages, one per system. The agent reads the map first and skips the wandering.
Edges speak the code's language.
Every link is a verb from the code, and each one answers a question a reviewer actually asks: what breaks if I change this?
Pick a node. See the blast radius.
Your agent knows what payments touches before it opens a single file.
what it depends on what depends on itIt's just markdown, in git.
Commit graft/ and every clone, human or agent, starts already knowing how the repo fits together. No plugin, no server: if it can read files, it can read the map.
What's in a node
Three depths in one file.
- Summary · what it does
- Plain English, written by the model, regenerated when the source changes. There whether or not anyone wrote docs.
- Crux · how it works
- The handful of lines that carry the logic, stored as code instead of line numbers, so it survives drift.
- Sources · where to go deeper
- Exact files, each tracked by content hash, so staleness is detectable.
- Links · how it connects
- Typed wikilinks your agent follows like any other file.
--- type: system sources: - src/payments/capture.ts # a41f9c - src/payments/refund.ts # 77d0e2 ---
if (charge.capturedAt) return charge; // idempotent: never double-capture await queue.push("capture", { chargeId }); // deferred, retried 3×
- uses [[db]]: writes charge rows inside one transaction
- produces [[events]]: emits charge.captured for webhooks
- validated by [[tests]]: capture idempotency suite
Four commands
No server. No database. No embeddings.
The graph is files in your repo. Git does the syncing.
Drift fails the build
A stale map is worse than no map.
Every node tracks its sources by content hash. When code moves, graft check catches it in the same pull request. The graph diff sits right next to the code that caused it.
Two minutes to a mapped repo
Onboard your agents once, not every session.
Claude Code · Codex · Cursor · Kiro · any agent that reads files