Your AI configuration is a living document. It should evolve as your project matures, patterns emerge, and tools change.
This guide covers when and how to update CLAUDE.md, .cursorrules, and similar AI configuration files.
If you correct AI behavior three times for the same issue, add a rule.
| Correction | Action |
|---|---|
| Once | Normal iteration |
| Twice | Note the pattern |
| Three times | Add to config |
- Repeatedly saying "no, use X instead of Y"
- Explaining the same context in multiple sessions
- AI suggesting patterns your team has abandoned
- New team members making the same mistakes
Promote when:
- Violations cause production issues
- New team members consistently miss it
- The rule has zero valid exceptions
Demote when:
- Legitimate exceptions keep appearing
- The rule was overreaction to one incident
- Technology changes make it less critical
Remove when:
- The underlying tool/pattern no longer exists
- The rule has been superseded by automation
- Nobody can explain why it exists
Your config needs reorganization when:
- File exceeds 200 lines
- Scrolling to find relevant sections
- Rules contradict each other
- New team members can't parse it
- Related information is scattered
- Group by purpose - Rules, Working Context, Reference (not by when added)
- Use tables - Scannable reference beats prose
- Extract details - Move lengthy docs elsewhere, link to them
- Apply MUST/SHOULD syntax - Clear priority for rules
Schedule a 30-minute review each quarter:
- Audit rules - Are all MUST rules still critical? Any SHOULD rules earned promotion?
- Check defaults - Still accurate? Projects renamed? Repos moved?
- Prune stale content - Remove references to deprecated tools, old epics, former team members
- Validate structure - Still scannable? Need reorganization?
Review immediately when:
- Major project milestone (launch, migration complete)
- Team composition changes (new members, reorg)
- Tooling changes (new MCP server, tool deprecated)
- Post-incident (if AI-assisted work contributed to issue)
If your team uses multiple AI tools, keep configurations aligned.
| Content | Share Across Tools | Tool-Specific |
|---|---|---|
| Project rules (MUST/SHOULD) | Yes | No |
| Working context/defaults | Yes | No |
| Code patterns | Yes | No |
| MCP configuration | No | Yes (different formats) |
| IDE-specific features | No | Yes |
Manual: Review both files when updating either. Works for small teams.
Template-based: Maintain a source doc, generate tool-specific files.
# Example: shared source, tool-specific output
./scripts/generate-ai-config.sh --claude > CLAUDE.md
./scripts/generate-ai-config.sh --cursor > .cursorrulesShared sections: Reference common markdown files or use symlinks for shared content.
Problem: CLAUDE.md says one thing, .cursorrules says another, codebase does a third.
Solution: Single source of truth. Update config when patterns change, not after.
Problem: Rules accumulate but never get removed. Config becomes a graveyard of old decisions.
Solution: Every rule needs a reason. If you can't explain why, remove it.
Problem: Adding rules after one bad experience. Config fills with edge cases.
Solution: Wait for the pattern. One incident = note it. Three incidents = rule.
Problem: Copying another team's config wholesale without adaptation.
Solution: Start minimal. Add rules as your team discovers its own patterns.
Start with minimal config:
- Project description (one paragraph)
- Tech stack
- How to run tests
- One or two MUST rules (the truly critical ones)
Add more as patterns emerge. Resist the urge to front-load rules.
Audit what you have:
- Read entire config - does it reflect current reality?
- Remove anything outdated
- Reorganize into Working Context / Rules / Reference sections
- Fill gaps based on common AI questions