Does the Agent's Map Match the Territory? Architectural Claims in AI Agent Context Files and Their Fit with the Code
Bachan Ghimire, Daniela Damian
Key points
From the paper's conclusion- We check 41,090 path claims and 184 dependency rules from 3,602 context files in 3,346 open-source projects against the code and its history.
Abstract
AI coding agents start every session without memory of how a system is built. Developers fill this gap with context files, such as CLAUDE.md and AGENTS.md. Agents treat these files as true, so it matters whether they match the code. We study two kinds of architectural claims that can be checked against a repository: path claims, which name folders and files, and dependency rules, which say what may import what. We check 41,090 path claims and 184 dependency rules from 3,602 context files in 3,346 open-source projects against the code and its history. About 5% of path claims point to paths we cannot find, but we estimate that only 2.2% are real errors, similar to READMEs (3.5%). When code moves, 61% of claims that became stale are fixed, most in the same commit. Dependency rules behave differently: 33 of 184 (18%) were confirmed broken on the day they were written, usually by older code, and nearly all stayed broken. Context files are good maps but less reliable rulebooks: their rules often describe the architecture a team wants, not the one it has. In an exploratory comparison of 7,480 commits, new rule breaks were rare. Agent-assisted commits broke rules about 1.8 times as often as other commits (0.29% vs. 0.16%), but with only 14 breaks this is not significant: an early signal, not evidence of a difference or of its absence. We used an LLM with human review at each step, and discuss what this offers and risks for mining studies.
Read the paper
Discussion
Science Skim's AI key points, plus readers' public thoughts
Readers' thoughts
No reader thoughts yet.
Related papers
- AI Cannot Review What Humans Catch: A First Look at the Reviews of Agent Instruction FilesarXiv · 2026
- What Open-Source Projects Tell Their Coding Agents: A Census of AGENTS.md and CLAUDE.mdarXiv · 2026
- Lessons Outlive Their Failures: A Case Study of Rules for AI Coding AgentsarXiv · 2026
- When Instruction Files Go Stale: Documentation Debt and Hidden Cost in Coding AgentsarXiv · 2026
- Do They Do as They Are Told? Investigating Coding Agents' Adherence to Explicit Instructions in Context FilesarXiv · 2026
- Toward an Evidence-Based Template for Agent Instruction Files: An Empirical Study of Adoption, Consistency, and MaintenancearXiv · 2026