Claude loads memory files in a defined hierarchy. More specific context wins when rules conflict. I'll walk you through each level.
The levels:
Managed policy: your IT team's system-wide CLAUDE.md. The path is OS-specific: /etc/claude-code/CLAUDE.md on Linux, /Library/Application Support/ClaudeCode/CLAUDE.md on macOS.
Project: ./CLAUDE.md or ./.claude/CLAUDE.md. Checked into git. Shared with your team.
Project rules: ./.claude/rules/*.md. Modular files with YAML paths: frontmatter so rules apply only to matching files.
User: ~/.claude/CLAUDE.md. Your personal rules across all projects.
Local: ./CLAUDE.local.md. Personal overrides for one project. Auto-gitignored.
Auto-memory: ~/.claude/projects/.../memory/. Claude writes this itself as it learns.