Write a repo AGENTS.md with commands first, under about 150 lines, with no overview
PreferenceVerified 1 Oct 2026Holds anywhere
Preference. A rule, why it holds, and how to apply it.
Rule#
Put the exact commands first. Then the rules the code cannot show. Then boundaries in three groups: always, ask first, never. Stay under about 150 lines. Skip repository overviews and dependency lists. Keep only a short "where new code goes" map.
Why#
The notes of the observer cite three sources: arXiv 2602.11988 found that overviews raise cost by about 20% with no gain in success. arXiv 2605.10039 found that size, position and nesting have no measurable effect. GitHub's analysis of 2,500 repositories recommends commands first.
How to apply#
When you write or trim an AGENTS.md, move the build, test and lint commands to the top. Delete any paragraph that a reader gets from the file tree or the manifest.
Also found by searching
- what should a repo AGENTS.md contain
- how long should AGENTS.md be
- should AGENTS.md describe the repository structure
- my AGENTS.md raises agent cost and does not help