In short
Without project docs, Claude Code found 32% of the rules a change had to respect. With the docs in the repository, 54%. With Segmently Modules, a simple setup that reads the docs of every module a task touches, 70%. Code-indexing tools did not add rules: Serena, Trail and Graphify found no more than Claude Code alone.
If the rules a change needs are not in the agent’s context when the spec is written, the architecture designed and the code implemented, at best you catch the miss in testing. At worst your users catch it in production, and that can cost you the business.

Code tells the agent what to do. It rarely tells it what must never be done.
We measured the delivery step on our own repository. A coding agent got 12 real past tasks, and we counted how many of the 75 rules those changes had to respect reached its plan.
Module docs are the project’s memory. Every important part of the project gets a short doc for each role that works on it: developer, QA, product, architect, designer. Each doc holds the rules learned so far.

Without the docs, every tool lost rules in 9 to 11 of the 12 tasks. The code-indexing tools found no more rules than Claude Code alone, with the docs or without. Reading more code does not close the gap: almost half the rules, 47%, cannot be learned from the code at all, and even the rules a comment states outright reached only 31–42% of the plans without the docs. Details in Can the code teach the rule?.
70% still leaves 30% of the rules out, and it can surely be improved. That is why we publish the stand we measured with, so the same measurement can run on any repository and any tool: see Measure it on your repository.
A development system should accumulate experience, so that a new task does not relearn what an earlier one learned the hard way. Code holds the result of that experience. It rarely holds the reason, or the rule that the next change must not break.
The module docs are kept by Segmently Modules, an open-source tool we built for this. Each doc carries a section of critical rules, and the rules a task discovers go back into the docs after the change. Its module-discover skill is the setup we measured against the alternatives; below we call it our discover.
We count a rule two ways. Found, or stated: the brief says what must or must never be done. Provided: stated, and the brief also says where the rule is written, so the planner can check it.
Our discover works differently from the other tools in three ways. It reads the card of every module and judges each one by meaning instead of searching by keyword. It reads the docs it keeps to the end. And it carries the rules that apply into the brief word for word, with their source.

Reading the module docs by meaning provided 67% of the rules with their source, against 43% for Claude Code alone and 34–36% for Serena, Trail and Graphify. The difference against the baseline held in 11 of 12 tasks.
On rules, the code-navigation tools added nothing over Claude Code alone, at the same cost. They are built to answer questions about symbols, calls and structure, and these rules were mostly not in the code.
Finding the files is not where the setups differ. Every one found 62–68% of the files the real change edited. Ours listed more files at lower precision: 48% of its list was edited, against 56–61% for the others.
Reading the docs this way costs about three times a plain session: $1.46 and 3.4 minutes, against $0.41–0.52 and about 1.5 minutes. That comes to $0.35 per rule provided, against $0.18–0.24.
Then we removed the module docs from the copies and ran the four tools again: the same tasks, the same instruction, two sessions each. The root CLAUDE.md and the general documentation folders stayed, which leaves an ordinary, well-kept repository. Our discover cannot run this way, because reading the module docs is what it does.
The share of rules stated fell from 46–54% to 24–32%. Every tool lost rules in 9 to 11 of the 12 tasks, and no 95% interval of the loss reaches zero. Claude Code alone lost 22 points, Serena 23, Graphify 19 and Trail 17.
Rules provided with a source fell harder, from 34–43% to 9–21%: without the docs there is little to cite. Instead of the rule, a brief named its topic, something like “check how the date range is built”. That outcome grew from 25–33% of the rules to 41–49%.
The files were not affected. The tools found 62–69% of them with the docs or without, at the same cost per session.
A separate agent searched for each rule in the snapshot with every Markdown file removed, and a script checked each code reference it gave. 70 of the 75 rules got a class:
So at most 53% of the rules can be learned from the code at all. The agents did not reach even that. The rules a comment states outright, often in the very file the change edits, were named in only 31–42% of the briefs without docs, against 52–65% with them. The agent reads the code, but it does not take a comment as a rule it must not break.
And 57 of the 70 rules have no test, type or check that fails when they are broken. Catching a miss in testing is the good case, and for most of these rules there is no test to do the catching.

Each count below is over 8 sessions: four tools, two sessions each. Our discover, with the docs, stated every one of these rules in both of its sessions. They run from rules the code states outright to rules it leaves no trace of.
The 75 rules above are the ones a doc held before the change. The real changes needed more. Across our wider set of 15 traced tasks, 55 of the 162 rules the changes needed were written in no doc at the snapshot. They come in three kinds:
Each of them was paid for in building and debugging. Unless it is written down after the task, the next task that meets it pays the same price again. Writing it into the module’s memory is the only way this share falls.
An LLM judge can move a result on its own, so we checked it. Claude Opus 5.5 judged again the saved briefs of the two tasks with the most rules: all nine variants, 36 briefs, 396 rule verdicts, with the same prompt and the same blinding.
It agreed with the Sonnet judge on 87% of the verdicts (Cohen’s kappa 0.81), and on 91% for provided against not provided. The two judges differ almost only on the line between provided and partial, where Opus is a little stricter. Our discover provided 66% under both, and the ranking did not change. For how far model judges can be trusted, see Judging LLM-as-a-Judge.
The brain does not store the day as it was lived. In sleep and quiet rest it replays recent experience and folds what matters into long-term memory. Anthropic already uses the same mechanism for agents: dreaming in Claude Managed Agents reviews past sessions and a memory store, merges duplicates, replaces stale entries and surfaces new insights.
We are fitting the idea to a project’s memory, split by module and by role: a pass per module that turns sessions, fixes and failed checks into rules, kept only if the measurement shows more rules reaching the plan. It is not built yet. It is the direction we are working in.
The rule classes above give the metrics. Move rules from “no trace” into memory, from “implied” to “stated”, from “stated” to “enforced”. Track the share of critical rules that are enforced, the share delivered before the plan, and the number of new unwritten rules each task uncovers. That last one should fall.
Which tool to use is a call for your repository, not ours. The stand we measured with is open source: context-recall (MIT, docs under CC BY 4.0), a Claude Code plugin. Take your own past tasks, snapshot the repository before each change, run any tool as an arm, judge blind and compare. It also compares runs before and after a docs edit. Our own tool is not in the kit.
Segmently Modules is open source. It keeps a module registry and per-role docs next to the code, and gives coding agents skills to work with them: module-discover writes the brief, module-check checks a plan or a diff against the critical rules, module-sync brings the docs up to date after a change, and module-init starts from an existing codebase.