Global
~/.claude/CLAUDE.md
Always loaded in every Claude Code session. Behavioral rules, skill-loading triggers, universal preferences. Under ~30 lines.
Project root
[repo]/AGENTS.md
One-paragraph summary, resolved architecture decisions, repo structure, tools, conventions. Under ~40 lines.
Subdirectory
[repo]/[track]/AGENTS.md
Stack details, track-specific patterns, gotchas, schemas. Loaded only when working in that directory. Can be as detailed as needed.
Each tier inherits from the one above. An agent working in api/ sees: global rules + project root + api/AGENTS.md. The root ~40-line limit prevents context bloat; subdirectory files are loaded only in context and can be as detailed as the track requires.