AI Team Playbook / Rule 2 of 12
One instruction file, under 200 lines
The team keeps one instruction file for every agent tool, under 200 lines, containing only what the agent cannot learn from the code.
September 16, 2026 · About 2 minutes
Why
A repository with an instruction file cut agent runtime by 28.6 percent and token use by 16.6 percent across 124 pull requests [6].
- 28.6%Less agent runtimeWall-clock time per task, with the file present.
- 16.6%Fewer tokensTokens consumed per task, with the file present.
Anthropic’s guidance is to keep the file short, to include only what the agent cannot work out from the code, and to cut any line whose removal would not cause a mistake, because a bloated file makes the agent ignore the rules that matter [13]. The 200 line cap is mine. It is the point past which a file stops fitting on two screens. Anything that must be enforced goes in a hook, which is rule 3.
How
AGENTS.md is the one file. Claude Code reads it through a one-line import in CLAUDE.md. Copilot reads it through .github/copilot-instructions.md. Cursor, Codex and Kiro read it directly.
It has five parts. Read first: the constitution, the system design, and the task’s spec. Commands: the build, test and regenerate commands the agent cannot guess. Repository etiquette: branch names, commit format, the pull request template. How to work: the rules of behaviour. Where things are: five to ten lines a new developer would ask about in their first week. Leave out anything a linter already enforces. The kit’s file also carries a short definition of done and a Code Review Rules section. Keep that heading’s exact casing, because Codex looks for it.
These are the kit’s “how to work” rules:
- Read the task’s
TouchesandDo not touchlines before editing. Stay inside them. If the task needs a file outside them, stop and say so. - Raise questions about architecture, scope or approach in prose, before code. Make smaller decisions without asking.
- Before changing anything under
contracts/, or renaming, removing or retyping a field another component reads, stop and say so. A contract change is its own task. Adding an optional field that consumers already ignore is not a contract change. - If you catch yourself adding a fix named after one specific failing test, stop and describe the pattern first.
- If the same component needs a second redesign to keep working, stop and say so.
- Never deploy or run destructive commands. Commit or push only when the developer asks; each one waits for their confirmation. Otherwise give the developer the exact commands.
CLAUDE.md then needs only this:
@AGENTS.md
# Claude Code notes
- Work in a worktree: `claude --worktree task-<id>-<slug>`. Rename its branch, `worktree-task-<id>-<slug>`, to `task/<id>-<slug>` with `git branch -m` before the first commit.
- Before opening a PR, run the reviewer subagent with fresh context.
- `/spec`, `/tasks` and `/review` are team skills. Use them instead of improvising.
- The Stop hook runs the project check before you can finish. If it blocks, fix the cause.
- Permission rules are shared in `.claude/settings.json`. Never remove a deny rule.
References
- 6Jai Lal Lulla et al., "On the Impact of AGENTS.md Files on the Efficiency of AI Coding Agents", arXiv 2601.20404, January 2026. 10 repositories, 124 pull requests. arxiv.org/abs/2601.20404
- 13Anthropic, Claude Code documentation, "Best practices for Claude Code". code.claude.com/docs/en/best-practices