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

Copilot, Cursor, Claude Code, Codex, and opencode all converged on the same primitive — a rules file the agent reads on every session. Use it.

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

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: Codex and opencode read AGENTS.md natively. Claude Code reads CLAUDE.md but can @import AGENTS.md. Cursor and Copilot read their own files. The clean pattern, if you’re using multiple tools, is one canonical AGENTS.md at your repo root, then minimal tool-specific files that import or reference it. One source of truth; every agent in your stack walks in already knowing.

For the full mechanics — layering, path-scoping, nested files, the differences between how each tool merges multiple sources — see Rules.