I8Advanced
Rules File Hierarchy Design
45 minComplex projects
Format: Design a multi-layered context file structure.
Hierarchy:
~/.claude/rules/ ← Global rules (apply to all projects)
coding-style.md ← Coding style
security.md ← Security standards
project/.claude/rules/ ← Project rules (apply to current project)
architecture.md ← Architectural decisions
conventions.md ← Project conventions
CLAUDE.md ← Project entry point (most important context)
SPEC.md ← Feature specification
Exercise: Design this hierarchy for your project, ensuring:
- No duplication (each rule appears in only one place)
- No contradictions (lower levels don't override critical higher-level rules)
- Concise enough (each file no more than 50 lines)