I Wrote 500 Lines of Rules for Claude Code. Here's How I Made It Actually Follow Them.
CLAUDE.md is supposed to be the operating manual for Claude Code. You write your rules, preferences, project context, and workflow instructions. Claude reads it at session start and follows your in...

Source: DEV Community
CLAUDE.md is supposed to be the operating manual for Claude Code. You write your rules, preferences, project context, and workflow instructions. Claude reads it at session start and follows your instructions. Except it doesn't. Not reliably. If you have used Claude Code for more than a few sessions, you have seen it ignore your CLAUDE.md rules. Not maliciously. It just prioritizes answering your question over following a protocol. It skips steps, forgets constraints, and does things you explicitly told it not to do. I have 500+ lines of rules across CLAUDE.md, SESSION_PROTOCOLS.md, and MEMORY.md. After months of Claude ignoring them, I stopped writing more rules and started enforcing the ones I had. The fix was not better rules. It was hooks. The Problem: Rules Without Enforcement Here is what happens with CLAUDE.md rules in practice: Claude skips the session start protocol. I have a 7-step checklist that Claude must complete before doing anything else: search the brain database, read