CLAUDE.md gives Claude the overview. "This is a website, use dark colors, here's how the folders are organized." But what happens when you need detailed instructions for specific topics?
You could stuff everything into CLAUDE.md. But at 200 lines, it becomes a wall of text. Claude reads all of it every time, even when it's doing a task that only relates to one section.
Rule files solve this. They're focused documents that live in .claude/rules/. Claude reads them automatically based on what it's working on.
Rules vs. CLAUDE.md
Think of it this way:
- CLAUDE.md = "What is this project?" The overview. The elevator pitch. 10-30 lines.
- Rule files = "How do we do X correctly?" The detailed manual. One topic per file.
You wouldn't put your entire company handbook in a one-page summary. Same principle. CLAUDE.md is the summary. Rules are the handbook chapters.