A useful AGENTS.md explains how work succeeds in this repository: layout, commands, conventions, generated files, security boundaries, and what “done” means.
Keep it short and executable. Prefer “run pnpm typecheck before handoff” over “write high-quality code.” Put specialized rules closer to the subtree they govern.
Update guidance after repeated friction, not every one-off correction. If the file becomes an encyclopedia, important constraints disappear inside it. The best agent guidance is accurate team memory that removes repeated prompting.