Lv.1 0 XP

CLAUDE.md Hierarchy — The Layered Configuration System

⚡ Exam Tested 10 min +40 XP
💡
THE ANALOGY

A company's policy hierarchy. Company-wide policies (user-level) apply to everyone. Department policies (project-level) apply within that department. Team-specific guidelines (directory-level) apply to specific workflows. Each level refines the one above — lower levels add specificity without invalidating higher ones.

⚠️ EXAM TRAP — The Wrong Answer People Choose

Assuming user-level CLAUDE.md is shared via git and applies to all team members. It is NOT committed to version control — it lives in ~/.claude/CLAUDE.md on each individual machine. A new team member joining has no user-level settings until they create them manually.

KEY POINTS
1 Three levels: user-level (~/.claude/CLAUDE.md), project-level (.claude/CLAUDE.md in repo root), directory-level (CLAUDE.md in subdirectories).
2 User-level is personal and NOT version-controlled — exists on one machine only, never shared via git.
3 Project-level is committed to git — shared across the entire team and applies to the whole project.
4 Directory-level applies only when Claude is working within that directory — used for module-specific conventions.
5 Settings cascade: lower level (more specific) settings supplement but do not replace higher level settings.