Path-Specific Rules

Claude Code

Definition

CLAUDE.md files placed in subdirectories (.claude/rules/ or directly in subdirectories) that override or extend root-level CLAUDE.md for that directory subtree. Enables context-sensitive behavior: different rules for tests/, docs/, and src/ without one massive root configuration.

Example Usage

Place a CLAUDE.md in the tests/ directory specifying that Claude should always write tests for both success and failure cases.