Conventions
Persistent markdown instructions Claude loads every session. The first thing you reach for, and the thing most problems actually need. Soft: Claude reads it and tries to comply, but there is no guarantee.
Analogy โ the onboarding doc & house style guide you hand a new teammate. They’ll read it and mostly follow it; they won’t always. For anything that must happen, you need a lock on the door (a hook) or a company policy (a managed policy), not a style guide.
Mechanism
Plain markdown, concatenated by walking up the directory tree (broad โ specific) and loaded as a
user message after the system prompt — not as enforced config. Supports @path
imports (max depth 4) and modular .claude/rules/*.md files (optionally path-scoped via
paths: frontmatter).
Load order (broad โ specific)
managed CLAUDE.md (org, can't be excluded) ~/.claude/CLAUDE.md (you, all projects) ./CLAUDE.md or ./.claude/CLAUDE.md (project, committed) ./CLAUDE.local.md (local, gitignore it)
Auto-memory: Claude-written notes at ~/.claude/projects/<project>/memory/MEMORY.md (first 200
lines / 25KB loaded each session; v2.1.59+, on by default; toggle autoMemoryEnabled).
When to reach for it
/api only) โ a .claude/rules/ file.When not to
Best practices
.claude/rules/, hard rules into hooks./init to scaffold one; /memory to edit; # at the start of a message to append a memory.