Give your agent persistent repo memory โ€” and pay for it only when it helps

On a big repo, your agent has amnesia. Every session it greps again, re-reads the same files again, rebuilds the same mental map โ€” then throws it away. Asking "how does this subsystem work?" or "what breaks if I change this signature?" blows the context window and your token budget, and you can't tell when the effort actually paid off.

My Architect's Claude Code plugin gives the agent persistent memory of the repository โ€” a local code graph it can navigate instead of re-ingesting everything. The honest part: the graph doesn't make every question cheaper. We measured it, and we'll show you exactly where it earns its keep and where it doesn't.

The problem, measured

We profiled this on our own repository first. Gathering facts about a codebase the agent already "knew" cost roughly 77k tokens and 20 tool calls โ€” every session, on repeat, because none of that understanding survives past the conversation. Impact questions ("who consumes this symbol, what breaks if I change it?") are worse: answering them correctly means finding every consumer, which means a full pass over the repo โ€” knowledge that, again, has nowhere to live.

That is the pain this use case removes: repeated whole-repo ingestion, and no way to know when the spend was worth it.

How My Architect fixes it

The plugin ships two skills that work together: recursive-context (index-don't-ingest discipline for oversized inputs) and code-graph awareness (Graphify integration). Neither is a new engine you have to trust blindly โ€” they're discipline plus a local tool.

Step 1. Connect the agent

Connect Claude (or any MCP agent) to your project the usual way โ€” see connecting an AI agent. The plugin installs the skills alongside the MCP tools in one step; you don't wire anything up per repo.

Step 2. Let it build the graph โ€” on consent

Graphify is open source (MIT), parses your code via tree-sitter across 36 languages, and runs fully local: no API calls, no telemetry. It stores a graph of symbols and relations, plus an interactive HTML map and a text report, right next to your code.

You don't run a wizard. On a heavy task with no graph present, the agent offers โ€” once โ€” to install and build it, and only proceeds after you say yes. Silent installs are forbidden. On our repo the build took seconds and produced thousands of nodes and edges plus auto-found clusters, immediately surfacing "god nodes," import cycles and forgotten links. The important part for your budget: building and querying the graph spend zero model tokens โ€” both are local utilities, not model calls.

Step 3. Ask the hard question

Now "what calls this function across 2125 files?" comes back from a near-instant local query, with paths โ€” not a full grep pass. The agent answers subsystem and impact questions by navigating the graph instead of re-reading the tree.

The discipline that keeps a stale index honest

An index is a cache, and a cache can lie โ€” it lags the code between rebuilds. So the feature is built on three rules, not on commands:

The payoff โ€” and the honest ceiling

Here is the aha, and we're going to give you the numbers instead of a slogan. We ran a controlled A/B on NestJS (2125 files โ€” an order of magnitude larger than our own repo): two identical clones, one with the graph and one without, with prompts identical down to the path and not one word about the graph. The with-graph arm had to find it itself.

The result is selective, on purpose:

And a methodological catch worth your attention: by top-line numbers the graph-less arm on "understanding" looked cheaper โ€” until we opened its transcripts and found 205.8k tokens of nested agents the summary never counted. An honest measurement counts the whole tree of agents. We suspect a fair share of "90% savings" benchmarks don't.

So the aha isn't a multiplier. It's this: the agent answers what calls this across 2125 files from a near-instant local query, and the A/B tells you precisely when the graph earned its keep and when it didn't. No universal multiplier โ€” a task class that saves, not a slogan. If you want the full write-up, the complete code-graph experiment with the token-savings measurements and the index-check discipline lays out the method and its limits (n=1 per cell, one repo, one model tier).

How to try it

  1. Sign in and create a project โ€” see getting started.
  2. Connect your agent following connecting an AI agent; the plugin brings the recursive-context and code-graph skills along.
  3. Point the agent at a large, unfamiliar repo and ask a subsystem question. When it offers to build the graph, say yes โ€” then watch whether the answer comes from a query or a full read.

The index says where to look; only the code becomes a fact โ€” and now the meter tells you which questions were worth indexing for.