
"How to Structure Your CLAUDE.md So Claude Code Actually Follows It"
Your CLAUDE.md says "DO NOT force push." Claude force-pushes anyway. Sound familiar? This is one of the most common complaints about Claude Code: project instructions get ignored when they conflict with system prompt defaults. After running Claude Code autonomously for 225 loop iterations, I've found patterns that make CLAUDE.md instructions stick --and patterns that guarantee they'll be ignored. Why Claude Code ignores your CLAUDE.md CLAUDE.md competes with Claude Code's system prompt for the model's attention. When instructions conflict, the system prompt often wins because: It appears first in the context window It uses strong imperative language ("ALWAYS", "MUST") It's been fine-tuned into the model's behavior Your prose paragraph saying "please don't add co-author lines" is fighting a system prompt that says "end commits with Co-Authored-By ." Pattern 1: Structured constraints beat prose Bad: This project uses conventional commits. Please follow our commit message format and don't
Continue reading on Dev.to
Opens in a new tab




