AGM-006: Nested AGENTS.md Hierarchy - AGENTS.md
Summary
- Rule ID:
AGM-006 - Severity:
MEDIUM - Category:
AGENTS.md - Normative Level:
BEST_PRACTICE - Auto-Fix:
No - Verified On:
2026-02-09
Applicability
- Tool:
all - Version Range:
unspecified - Spec Revision:
unspecified
Evidence Sources
- https://developers.openai.com/codex/guides/agents-md
- https://docs.cline.bot/prompting/cline-memory-bank#cline-memory-bank-custom-instructions-[copy-this]
- https://github.blog/changelog/2025-08-28-copilot-coding-agent-now-supports-agents-md-custom-instructions/
Test Coverage Metadata
- Unit tests:
true - Fixture tests:
true - E2E tests:
false
Examples
The following examples demonstrate what triggers this rule and how to fix it.
Invalid
# Root AGENTS.md
Project instructions.
# src/AGENTS.md (nested, separate file)
Component-specific instructions that create hierarchy ambiguity.
Valid
# Project
Single AGENTS.md at the project root with all instructions.
## Commands
- npm test