Graph structure
What’s in a node
Section titled “What’s in a node”A node is a single markdown file. Most code maps stop at an address: this thing lives in that file, on that line. That tells an agent where to look, not what it will find, so it still has to open the source and read. A Graft node holds the meaning inline, so the agent learns what it needs up front and opens the file only when it wants more.
Node anatomy
Section titled “Node anatomy”| Part | What it holds |
|---|---|
| Summary | A plain-English explanation of what the code does, written by the model and cached. It is there whether or not the code was ever documented, and it is regenerated when the source changes. |
| Crux | The handful of lines that actually carry the logic: the guard, the skip condition, the state change. Lifted straight from the source and stored inline, so the agent sees how it works, not just what. |
| Sources | The exact files the node is built from, each tracked by a content hash, so Graft can tell precisely when a node has gone stale. |
| Links | Typed connections to other nodes (depends_on, part_of, uses, implements, produces), written as [[wikilinks]] your agent can follow. |
| Notes | Anything you write below the generated block. It is preserved across regenerations, so your own context is never overwritten. |
Three depths in one file
Section titled “Three depths in one file”That is three depths in one file: the summary says what the code does, the crux shows how, and the sources point to the rest if the agent needs it. A plain index makes it read a whole file to learn one thing. A Graft node hands it the answer inline, and the follow-up read often never happens.
Summary, sources, links, and notes ship today in markdown nodes. The crux ships per-symbol in the code graph (graft build --deep); inlining it into markdown nodes is next.
What runs where
Section titled “What runs where”| Layer | What happens | Requires |
|---|---|---|
| On your machine | The structural code graph: graft build (wiring graph + per-file cards), graft check, and graft ask are deterministic tree-sitter — they never call a model. |
No key, no network |
| Through your provider key | graft build --deep adds the concept nodes (file summaries + node synthesis) and the per-symbol summaries and cruxes. |
Your GRAFT_PROVIDER, GRAFT_API_KEY, GRAFT_MODEL |
| No telemetry | No analytics — the only network calls are the LLM requests you configured. | Nothing |