AGENTS.md Files Hit 1.4 Million on GitHub as Coding Agents Edit Their Own Rules
On this page 7 sections
TL;DR
Research out of the University of Washington counts AGENTS.md files on GitHub at 1.4 million as of November 27, about 70 times the August 2025 count. The author, PhD student Reshabh K. Sharma, measured the growth with GitHub code search and then read the git history of every instruction file in the 100 most-starred repositories. In 33 of the 52 that carry one, AI has committed at least one edit to the rules that govern it, and excluding a single outlier repo, AI wrote 22% of all rule-file commits between October 1 and November 27, up from 6% in late 2025. The instruction file is turning into a constitution the governed amend, and three 2026 studies agree nothing in it is binding: compliance depends on wording, splits between rules always and never followed, and erodes the longer an agent works.
From 20,000 files to 1.4 million
AGENTS.md is a README for agents: plain Markdown that coding agents read before they touch your code. Most of them honor it now, from Codex to Jules, Cursor and Amp, and the format is stewarded by the Agentic AI Foundation under the Linux Foundation. Conventions that used to live in a CONTRIBUTING file now go in a file the machine reads first.
Sharma counted with the format's own query: path:AGENTS.md across public repositories, minus forks and archived projects. For the early baseline he used the Internet Archive, which saved agents.md every month: every copy from August 18 to December 2, 2025 says "over 20k", and every copy from January 2026 onward says "over 60k". His own run on November 27 returned 1.4 million files. For more than a year the count compounded at roughly a third per month.
Nearly half of those files are not at a repository root. Monorepos keep one per package, and OpenAI's main repository once held 88 of them. Counting repositories rather than files, 719,000 carry a root AGENTS.md. The Claude Code equivalent, CLAUDE.md, is growing faster: 700,000 files in September, 1.1 million in November, 57% growth against 46% for AGENTS.md over the same two months. Slightly more repositories now carry a root CLAUDE.md than a root AGENTS.md.
Among the 100 most-starred repositories, 52 have at least one instruction file, up from 47 in September. microsoft/vscode wrote the first, a Copilot instruction file in November 2024, before AGENTS.md existed. Twenty-one of the 52 existed by the end of 2025; the other 31 arrived during 2026, among them torvalds/linux with an AGENTS.md and anthropics/claude-code with a CLAUDE.md. openai/codex went the other way and deleted its root AGENTS.md, along with its other local agent guidance, at the end of September.
The rule files are editing themselves
Sharma counted a commit as AI-written when its author is an agent account or its message carries an explicit co-author line such as Co-Authored-By: Claude. Anything undeclared goes uncounted, so treat these numbers as floors. Across the 52 most-starred repos with instruction files, 2,573 commits touch those files and 393 of them, 15.3%, are AI-written.
One repo, garrytan/gstack, contributes 101 of those commits on its own, so the fair series excludes it: 6% of rule-file commits were AI-written in the last quarter of 2025, 8-12% through the first three quarters of 2026, and 22% between October 1 and November 27. Of the 292 AI-written commits outside gstack, Claude accounts for 196 and Copilot for 71, with Cursor, Codex and unnamed tools taking the remaining 25. Claude Code signs its commits by default and most competitors do not, so that split partly measures which tools confess.
Sometimes there is not even a human nominally in the middle: the claude[bot] account committed an edit to the CLAUDE.md of electron in August 2026. Asked by The New Stack what worries him, Sharma said: "The biggest risk is the weakening of the rules by the AI to make its work easier," including "subtle word changes that weaken the rules and are easy to miss during code reviews." An agent that relaxes a boundary in its own instruction file is not being malicious; it is removing friction. The diff on your rule file deserves the same review as the diff next to it.
Nothing enforces an AGENTS.md
An instruction file is text in the context window, sitting alongside the task, the code and the tool output, and the model decides how much weight it gets. Three preprints this year measured what that is worth.
- Tsuchida et al. inserted one policy, worded four ways, into the instruction files of 86 benchmark tasks across four harness-model combinations. Conditional phrasing, the "if X, then Y" style, was followed less often than prescriptive or explanatory phrasing, and which of those two won changed with the harness and the model.
- Voria et al. took real instruction-file snapshots and checked them against the commits agents actually produced. Agents follow written guidance more often than not, but adherence splits into two camps, instructions followed every single time and instructions never respected, and the split varies by category of instruction and by agent.
- McMillan ran 1,650 Claude Code CLI sessions (16,050 function-level observations) across two TypeScript codebases. None of the four structural variables practitioners argue about, file size, position, architecture, contradictions between files, produced a detectable effect on compliance. The one effect that surfaced: with each additional function an agent generates, the odds it is still following the rules fall by about 5.6% per step (odds ratio 0.944).
The curve is modeled from that odds ratio; the measured relationship is non-monotonic and the effect turned up during analysis rather than by design. Picture a new hire who reads the handbook on day one and remembers a little less of it with every ticket they close. In an interactive session you would notice the drift. Sharma describes workflows of more than 200 concurrent agents running for over a week, where a rule bent in function 40 surfaces late, if anyone finds it.
Compile the rules instead of trusting them
Sharma's own answer is InstructGuard, open source and formerly called ContextCov. He says the paper was accepted at ICSE 2027, and an earlier version won best paper at the Agentic Software Engineering Workshop at ACM CAIS 2026. The tool reads AGENTS.md, CLAUDE.md or Copilot instructions and compiles each rule into whichever mechanism can actually decide it: regex and Tree-sitter queries for source patterns such as "no tab indentation", import-graph checks for architecture boundaries such as "web must not import core", and PATH shims that intercept a forbidden command before it runs. An LLM review handles only the rules no analyzer can decide. Static and architectural checks need no credentials, and the exit code drops straight into CI or a pre-commit hook.
On SWE-bench Lite, 12 repositories and 300 tasks, compiled checks reached 88.3% constraint compliance against 67.0% for prompt-only guidance and 50.3% for LLM reflection, with 3.4x lower feedback cost and no loss of functional correctness. LLM reflection, an agent checking its own work against the rules, scored below plain prompt-only guidance. The model reviewed its own homework and gave itself a pass.
The README is blunt about the catch: InstructGuard generates Python with an LLM and executes it in your process, during scans and inside the shims, with your privileges. Run it on repositories and instruction files you trust, review the generated mapping before you enforce it, or pass --no-semantic and stay offline. An enforcement layer with LLM-generated code inside is a dependency like any other, so read it before you lean on it.
What to do on Monday
- Put AGENTS.md and CLAUDE.md under CODEOWNERS and review their diffs like code. A single softened verb is easy to miss and expensive later.
- Word rules prescriptively or with a reason attached, not conditionally. Conditional phrasing was the least-followed style tested.
- Move anything mechanical out of prose and into a linter rule or a CI gate. InstructGuard automates the translation; three hand-written checks cover the rules your agents ignore most.
- Prefer several short agent sessions over one marathon when compliance matters. Measured adherence odds fall about 5.6% per function generated.
- Assume AI help is undercounted everywhere. Only some tools sign their commits.
Key Takeaways
- GitHub held 1.4 million AGENTS.md files on November 27, 2026, about 70 times the August 2025 count, growing roughly a third per month for over a year. 719,000 repositories carry one at the root, and CLAUDE.md is growing faster, from 700,000 to 1.1 million files between September and November.
- Adoption reached the top of GitHub: 52 of the 100 most-starred repositories now carry an instruction file. torvalds/linux added an AGENTS.md this fall; openai/codex deleted its own at the end of September.
- AI wrote 393 of the 2,573 commits touching rule files in those repos. Excluding one outlier repository, its share rose from 6% in the last quarter of 2025 to 22% between October 1 and November 27, and the method only catches tools that sign their work.
- The files are advice, not law. Compliance depends on wording style, splits between instructions always and never followed, and the odds of adherence drop about 5.6% with each additional function an agent generates in a session.
- InstructGuard compiles instruction files into executable checks: 88.3% compliance on SWE-bench Lite versus 67.0% prompt-only and 50.3% for LLM reflection, at 3.4x lower feedback cost. It executes LLM-generated Python with your privileges, so audit it like any dependency.
Sources: Reshabh K. Sharma, The Exponential Rise of Agent Instruction Files, The New Stack, arXiv:2611.04367, arXiv:2611.13709, arXiv:2605.10039, arXiv:2603.00822, InstructGuard on GitHub, agents.md