AGENTS.md: One Rules File Every AI Coding Tool Reads

Write it down once. Every AI coding tool reads the same kind of file.

AGENTS.md: One Rules File Every AI Coding Tool Reads

You’ve told Copilot “we use pnpm, not npm” a hundred times. Once per session. Maybe more if the session is long enough that it forgets.

The fix is older than agents themselves: write it down. In one file. Check it in. Let the tool read it.

Every major AI coding tool added this primitive in the same year - and they’re all essentially the same file under different names:

Same idea. Different filenames. Convergence on a pattern that should embarrass anyone who said this would never standardise.

What goes in it? Whatever the agent gets wrong twice. Real examples from real teams:

The test: if you’ve corrected the agent on the same thing twice across two sessions, that’s a candidate for the file. The cost of writing one line of context now is much smaller than the cost of correcting the agent for the next year.

The portability move: the convergence runs deeper than a shared shape - most tools now read AGENTS.md itself. Codex and OpenCode always did. Cursor reads it from the repo root; Copilot now reads it too, across its coding agent, code review, and JetBrains support. Claude Code reads CLAUDE.md but can @import AGENTS.md. So the clean pattern, if you’re using multiple tools, is one canonical AGENTS.md at your repo root, plus a tool-specific file only where a tool insists on its own - Claude’s CLAUDE.md, Cursor’s scoped .cursor/rules/ overrides. One source of truth; every agent in your stack walks in already knowing.


For the per-tool mechanics, see Rules for layering, path-scoping, nested files, and how each tool merges multiple sources.