Does the Agent's Map Match the Territory? Architectural Claims in AI Agent Context Files and Their Fit with the Code
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.
Create a lesson
Related papers
Below the Stopwatch: Checking the Performance Claims of Coding Agents in the Kernel
Shared title terminologycs.SEYuvraj Sehgal, Sneh Patel, Mahsa Panahandeh et al.
Markdown Is Not a Firewall: four coding agents, one rules file, four boundaries
Shared title terminologycs.SESandeep Dhuri
Reliable Mining of Heterogeneous AI Coding-Agent Data: Context-Aware Prediction and Resource-Aware Ranking
Shared title terminologycs.SEHaoran Yu, Lifei Liu, Danping Zhang
Useful but Unwieldy: How Software Engineers Perceive the Design of Chain-of-Thought Explanations in Coding Agents
Shared title terminologycs.SECarlos Rafael Catalan, Lheane Marie Dizon, Patricia Nicole Monderin et al.
sudo L7: Can Coding Agents Act Like Staff Engineers?
Shared title terminologycs.SENick Heiner, Ian Niebres, Suhaas Garre et al.
RepoClean: Evaluating Coding Agents on Repository-Level Obsolete Code Cleanup
Shared title terminologycs.SEHongyixuan Yuan, Qixing Zhou, Pengcheng Huang et al.