Claude Code with a CLAUDE.md
The default setting reads AGENTS.md only when no CLAUDE.md exists. Keep an @AGENTS.md import in CLAUDE.md, or set "Project instructions" in /config to read both. Claude Code also ignores AGENTS.override.md.
Put portable rules in AGENTS.md; nearly every major agent reads it. The exceptions are where teams get burned: an agent that skips it when another file exists, one that needs a setting, one that ignores nested copies. This page lists the files, the precedence rules and the built-in spec features for eleven agents, each checked against the vendor's own documentation.
"AGENTS.md" means the vendor documents native support. Precedence describes what happens when several files apply; most agents concatenate rather than override.
| Agent | Its own instruction files | AGENTS.md | Precedence | Spec or plan feature |
|---|---|---|---|---|
| Claude Code Anthropic | CLAUDE.md (managed, ~/.claude/, project, CLAUDE.local.md), .claude/rules/*.md with paths: globs, skills in .claude/skills/*/SKILL.md | Yes, since 2.1.277 (Sep 18, 2026). Default: only if no CLAUDE.md exists | All levels concatenated, root first; subdirectory files load when Claude reads there; @path imports up to 4 hops | Plan mode (Shift+Tab or --permission-mode plan) |
| Codex OpenAI, CLI / app / cloud | ~/.codex/AGENTS.md or AGENTS.override.md; skills in .agents/skills | Yes, native; its home format | Walks Git root to current directory; concatenated, closer file wins; 32 KiB cap (project_doc_max_bytes) | Plan mode (/plan) |
| Cursor Anysphere | .cursor/rules/*.mdc with alwaysApply, description, globs; User and Team Rules | Yes, root and subdirectories | Team, then Project, then User | Plan Mode; plans can be saved to the workspace |
| Kiro AWS | .kiro/steering/*.md (product, tech, structure suggested), ~/.kiro/steering/; hooks in .kiro/hooks/ | Yes; nested AGENTS.md since v1.0.309 (Aug 13, 2026) | Workspace steering wins over global; AGENTS.md always included | Specs: requirements.md (EARS), design.md, tasks.md |
| Gemini CLI | GEMINI.md: global, workspace and parents, then just-in-time; @./file.md imports | Only if configured: "context": {"fileName": ["AGENTS.md", ...]} | Concatenated | Plan Mode (/plan), read-only |
| Jules | None of its own | Yes, root AGENTS.md | n/a | Plan you approve before code changes |
| Copilot coding agent GitHub, cloud | .github/copilot-instructions.md, .github/instructions/*.instructions.md; also CLAUDE.md / GEMINI.md at root | Yes, anywhere; nearest wins | Personal, then repository, then organization, but all are sent | Not documented |
| Copilot in VS Code GitHub / Microsoft | Same files, *.instructions.md with applyTo, prompt files .github/prompts/*.prompt.md; CLAUDE.md behind a setting | Yes (chat.useAgentsMdFile); nested files need chat.useNestedAgentsMdFiles, off by default | Additive; docs say not to rely on order | Plan agent (/plan) |
| Junie JetBrains | .junie/AGENTS.md, .junie/playbook.md, .junie/rules/*.md; legacy .junie/guidelines.md | Yes, root or .junie/ | .junie/AGENTS.md first; project beats ~/.junie/AGENTS.md; duplicates removed (CLI docs) | Not documented |
| Devin Desktop Cognition, formerly Windsurf | .devin/rules/ (legacy .windsurf/rules/), 12,000 chars per file; global rules 6,000 chars | Yes; root always on, subdirectories glob-scoped | trigger: always_on, model_decision, glob, manual | Not documented |
| Amp Amp | Falls back to AGENT.md or CLAUDE.md | Yes, its primary file | Workspace, personal, parents up to $HOME, subtree on read, system | Not documented |
| Cline Cline | .clinerules/ or .cline/rules/, global rules folder; also reads .cursorrules, .windsurfrules | Yes | Workspace wins over global; paths: conditional rules | Not checked |
"Not documented" means we found no plan or spec feature in the vendor's docs for that surface, not that none exists. "Not checked" means we did not look.
The default setting reads AGENTS.md only when no CLAUDE.md exists. Keep an @AGENTS.md import in CLAUDE.md, or set "Project instructions" in /config to read both. Claude Code also ignores AGENTS.override.md.
It reads GEMINI.md. Add AGENTS.md to context.fileName in settings.json, and check with /memory show.
A root AGENTS.md works; per-package files in a monorepo do nothing until chat.useNestedAgentsMdFiles is on.
Codex caps project instructions at 32 KiB by default (project_doc_max_bytes). In a monorepo with several long AGENTS.md files on the path, check the limit before assuming the nearest file made it in.
An instruction file that grows a feature's acceptance criteria is loaded on every task, for every change. Per-change rules belong in the spec for that change.
In our recorded agent runs, deleting a 13-line contract doc turned a safe API cleanup into one that broke the shipped mobile app in 2 of 3 runs.
AGENTS.md # stack, commands, boundaries, readers packages/billing/AGENTS.md # rules only true inside billing CLAUDE.md # "@AGENTS.md" + Claude-only notes GEMINI.md # or set context.fileName instead .github/copilot-instructions.md # optional, Copilot-only specs/2026-09-coupon/spec.md # goal, non-goals, ACs, evidence
The only agent here with a spec workflow built in: requirements.md or bugfix.md, design.md, tasks.md. Requirements use EARS ("WHEN [condition/event] THE SYSTEM SHALL [expected behavior]"). Variants: Requirements-First, Design-First, and Quick Spec without approval gates. "Run all tasks" runs independent tasks in parallel waves.
Claude Code, Codex, Cursor, Gemini CLI and Copilot in VS Code all have a read-only planning mode. Cursor can save the plan into the repo; VS Code keeps local plans in session memory, outside the project. A plan is not a spec: it describes steps, not the behaviour that must be true when the steps are done.
GitHub Spec Kit reached v1.0 on August 21, 2026 (v1.0.12 on September 25). OpenSpec is at v1.13.2 (September 23). BMAD-METHOD is at v6.12.0 (September 4) after cutting its core skills from 14 to 8. Our OpenSpec vs Spec Kit vs Superpowers comparison covers how to combine them.
Vendors shipped a lot between May and September 2026. Three claims matter for how much you write down; all are the vendors' own words, linked below.
Anthropic reports a tester's Opus 5.5 task running "for over 18 hours" unattended; Meta describes Muse Code sessions of "1,000+ tool calls (up to 24 hours)"; Alibaba describes a 10+ day autonomous build with Qwen3.8-Max. The longer an agent runs without you, the more of its decisions happen where nobody reviews them.
Claude Code dynamic workflows plan and "run hundreds of parallel subagents", with "the existing test suite as its bar"; Grok Build ships a plan mode with parallel subagents, and Muse Code bundles /plan and /goal skills. When tests are the bar, acceptance criteria written as tests are what the agent actually checks against.
Anthropic reports Sonnet 5.5 above Opus 5.5 on Terminal-Bench 4.0. In our own runs, a spec lifted Haiku 4.5 from 2–5 of 8 checks to 8 of 8 on the API task. See the cross-model runs.
Checked on September 29, 2026. Vendor docs move; if a link here has changed, the file names and settings above are what to search for.
The spec packet generator turns a ticket into goal, non-goals, acceptance criteria and evidence you can commit next to AGENTS.md.
Every row was checked against the vendor's documentation or changelog on the date below. We re-check this page when a major agent changes how it loads instructions; tell us if something here is out of date.