Almost One in Five Import Rules in Agent Context Files Was Broken the Day It Was Written
A check of 3,602 CLAUDE.md, AGENTS.md and similar files found the folder maps about as accurate as READMEs. The import rules fared worse: 18% were already broken when written, usually by code older than the rule, and nearly all stayed broken.
The architecture section of a CLAUDE.md or AGENTS.md file tells a coding agent two things: where code lives, and what may import what. A new preprint from Bachan Ghimire and Daniela Damian at the University of Victoria, Does the Agent's Map Match the Territory? Architectural Claims in AI Agent Context Files and Their Fit with the Code (arXiv:2611.29916, submitted 23 Nov 2026), checks both kinds of claim against real repositories. The folder descriptions hold up well. The import rules are where the trouble sits, and most of it was there before the rule existed.
What they checked
The sample is 3,602 context files from 3,346 open-source projects in ten languages, drawn from a public dataset of engineered GitHub projects collected in early 2026 by Galster et al. The files are the ones agents load by default: AGENTS.md, CLAUDE.md, .github/copilot-instructions.md, GEMINI.md and .cursorrules.
The authors split the architecture content into two kinds of claim. A path claim names a folder or file, such as src/server/db/. A dependency rule restricts imports, such as "never import tokio directly outside of runtime/". Path claims were extracted and checked by ordinary programs. For rules, a keyword filter pulled 1,645 candidate sentences from 875 projects, an LLM (the paper names Claude Opus 5.5) turned the sentences into structured rules, and the first author reviewed every structured rule against its sentence and the repository. That left 184 rules in 115 projects that a deterministic import checker could test, along with each project's commit history.
The map is mostly right
The checker could not find 5.3% of the 41,090 path claims. Many of those misses are noise: example paths, placeholders, parse errors. In a hand-labelled sample, 42% of the missing context-file claims were real errors, which puts the estimated real error rate at 2.2%. READMEs in the same projects came out at 3.5%, so the agent files are about as accurate as the human-facing docs.
They are also maintained. Of 44,732 claims that were valid when written, 1,151 (2.6%) later pointed at a path that had been removed. Of those, 61% were fixed by the snapshot, and in 61% of the fixes the claim changed at the same time as the code. One caveat: the observation window is short, a median of 67 days per file.
The rulebook was broken from the start
The 184 rules split into 126 that restrict imports between parts of the project and 58 that restrict where an external library may be used. Of the 184, 129 held from the day they were written to the snapshot. Only 4 held at first and broke later. The other 51 were broken on the day they were written, and 50 of them were still broken at the snapshot.
Human review confirmed 33 of the 51 day-one breaks. In most of the rest, the structured check missed something the author meant, such as an exception listed in a lint config or a type-only import. Counting only confirmed cases, 18% of rules were broken when written, in 21% of the projects that had rules. The authors call this a lower bound: in a sample of 40 rules the checker passed, 5 had a break it missed.
Later commits did little of the breaking. In 26 of the 33 confirmed cases, every offending import was already in the code before the project's first context file existed. And 24 of the 33 rules came from commits with no visible agent trace. The rule went in on top of code that already ignored it.
Library rules were broken from the start more often than internal ones, 14 of 58 (24%) against 19 of 126 (15%). Several read like migration notes. One file says pkg/og/ "is legacy code being phased out". Another says the team is "actively removing" Material UI. Most files give no such hint.

The chart shows how little these counts move. The Go rule "do not import encoding/json in business code" had 107 breaking imports when it was written and 107 at the snapshot. The MUI rule is the only one with real movement, from 132 down to 74.
Why an agent cares
A new engineer who reads "do not import encoding/json in business code" and then finds it in 107 places will go ask someone. An agent reads the rule in its instructions and then reads a codebase full of counter-examples, and nothing in the file tells it which one reflects the team's intent. The paper does not test what agents do in that spot. It lists a controlled experiment on exactly that question as future work.
The paper did look at whether agents add new breaks. After rules were written there were 7,480 commits in 96 projects, and 1,728 of them were agent-assisted. Review confirmed 14 commits that added a break: 5 agent-assisted and 9 others. That works out to 2.9 per 1,000 agent-assisted commits and 1.6 for the rest. Within projects, the odds ratio is 2.6 with a 95% interval from 0.7 to 10.2 (p = 0.21). The authors report it as an early signal, and estimate that a firm answer at that effect size would take about 54,000 commits for 80% power. New breaks were rare in both groups. The larger gap in their data is between the rules and the code that was already there.
What to change in your own file
If a rule describes where the code is heading, say so, and list the current exceptions and the direction of change. If a rule matters, enforce it with a linter, as some projects in the sample already do ("enforced by ESLint no-restricted-imports"). Check new path claims when you write them. For tool builders, a checker that resolves path claims and runs stated rules at commit time could catch much of this, but it has to accept known exceptions and migration states, since so many rules start out false.
The study has limits the authors state plainly. It covers open-source projects, project-level context files only, over a short window. The rule set leans toward explicit, checkable rules, and about half the sentences that state a rule could not be checked at all, often because they name parts that cannot be mapped to folders. Agent-assisted commits were detected only from visible traces, so some agent work sits in the comparison group.
The extracted claims, rules, human labels, codebook, prompts and raw LLM outputs are in the replication package on GitHub.