From Agent Behaviour to Agent-Friendly Documentation · Zhijun Gao and Jing Chen, Peking University · arXiv, August 20, 2026
Agents take their operating knowledge from instruction files, not API references
The study traces documentation behaviour across 557 real agentic coding sessions and 33,097 agent-authored pull requests, 94,813 development events in all. Instruction files and working notes account for 60.5 percent of the documentation interactions observed; API references, where most human documentation effort goes, account for 1.3 percent. The assumed read-the-docs-then-write-code sequence effectively does not occur, with an adjacent transition probability the paper puts at 0.002. The corpus contains no observed case of an agent explicitly validating its work against documentation, and documentation trails code changes 4.7 times more often than it leads them.
Why it matters: If agents get their working knowledge from instruction files and notes, those files are the documentation surface worth engineering. In this corpus, documentation never served as a validation check, so teams must add that check deliberately rather than assume it already happens.