wiki / concepts / agents-md-spec
AGENTS.md Specification
loading…
AGENTS.md Specification
AGENTS.md is an emerging industry standard markdown file placed at the root of a project workspace to orient AI coding agents (such as Hermes, Claude Code, Cursor, and Codex) as soon as they inspect a repo.
The Core Philosophy: “Never Run /init”
Auto-generated agent initialization files typically produce hundreds of lines of generic prose describing basic language syntax and obvious git commands. High-signal AGENTS.md files are strictly hand-crafted, concise, and focused exclusively on non-obvious project reality.
Essential Sections of AGENTS.md
- Layout & Entry Points: The high-level file tree and where persistent vs ephemeral files live.
- Toolchain & Non-Obvious Commands: The exact build, test, and typecheck commands (e.g.
uv run ...orpnpm test), highlighting environment quirks like PEP 668 or package manager constraints. - Architecture Seams & Decisions: References to
CONTEXT.mdand ADR records. - Pitfalls & Hard Guardrails: Things the agent must NEVER do (e.g. “Do not push directly to main”, “Do not mock database calls in unit tests”).
AGENTS.md vs System Prompts
AGENTS.md belongs in the project filesystem, not baked into a static system prompt. This allows agent behaviour to evolve dynamically with repository commits and branch checkouts.
Related
context engineering, prompt bloat, progressive disclosure, ai coding taxonomy.
| aihero-dev-homepage-2026 | https://www.aihero.dev/ | ingested 2026-08-22 sha256:231157fed45f… |
| agentic-engineering-trends-2026-synthesis | https://pyweb.dev/wiki/raw/articles/agentic-engineering-trends-2026-synthesis | ingested 2026-08-24 sha256:6c78ca873a4d… |
| aihero-ai-coding-dictionary-2026 | https://www.aihero.dev/ai-coding-dictionary | ingested 2026-08-27 sha256:52b0a5da7c9f… |