CC-301m · Module 1
Negative Constraints That Hold Under Pressure
3 min read
Negative constraints — instructions about what not to do — are where most CLAUDE.md files fail. It is easy to write "never force-push" and assume it holds. It does not always hold. When the agent is mid-task, has encountered a merge conflict, and has been instructed to "fix this and get it working," the pressure to find a path forward can override a vague constraint. The constraint must be strong enough to survive the task context.
- Make the consequence explicit "Never use git reset --hard" is weaker than "Never use git reset --hard — this permanently discards uncommitted changes and cannot be undone." The consequence anchors the constraint. The agent understands why the constraint exists, not just that it does.
- Specify the alternative "Do not delete files" leaves the agent with no path forward when deletion seems like the solution. "Do not delete files — use git mv to rename or ask before removing anything" gives the agent an alternative action. Constraints that block without redirecting create stuck agents.
- Make scope explicit "Do not modify the database schema" is ambiguous if the project has a test database and a production database. "Do not modify the production database schema — test database modifications are pre-authorized" eliminates the ambiguity. Scope ambiguity is where constraints get rationalized away.
- Put the hardest constraints first The instructions that must survive the most pressure — the ones protecting irreversible actions — belong at the top of their section, not buried in a list. Constraint priority should be visible in document structure.
Do This
- Never use git push --force to main/master — this overwrites upstream history and cannot be recovered
- Do not drop database tables — if schema changes are needed, ask first
- Never commit .env files or files containing API keys — if in doubt, check .gitignore first
Avoid This
- Be careful with git push
- Do not make destructive database changes
- Do not commit sensitive files