Real GitHub issues where AI coding tools ignored their rules. Every example is a public link. Every story is true.
Seven incidents that demonstrate the range of the problem — from production outages to silent rule dilution after compaction. All are publicly reported and linked.
Across every incident in this list — from force-pushed production deletions to silent compaction drift — the same three mechanisms appear.
CLAUDE.md, .cursorrules, and AGENTS.md are text in the model's context window. They influence generation probabilistically, but they do not block anything. The model can read the rule and then violate it in the next tool call — because nothing is actually gating the tool call.
Compaction, truncation, and long-context drift all reduce the attention weight on earlier instructions. A rule that worked on turn 5 can be silently forgotten by turn 500. Every single "long session" issue in this list is a variant of this.
The model can quote a rule perfectly and then violate it on the next action. Several issues in this list explicitly document the model narrating its own awareness of a rule immediately before ignoring it. Awareness and behavior are not the same mechanism.
“Hooks with exit 2 are the only mechanism that actually enforces anything.”
SpecLock reads your existing CLAUDE.md, .cursorrules, or AGENTS.md, extracts the rules, and installs a semantic pre-commit hook that runs outside the model. Rules become laws. Compaction can't touch them. Session length doesn't matter. The model can't quote rules and then bypass them — the commit check happens on the diff, not on intent.
The semantic engine catches euphemisms ("clean up" = delete), synonym substitution ("wipe" / "purge" / "sweep away"), temporal evasion ("temporarily disable"), and positive-form locks ("ALWAYS use TypeScript" catches "convert to Python").
One command. MIT licensed. Works with Claude Code, Cursor, Copilot, Windsurf, Cline, Aider, and every other tool that commits via git.
The featured cases are the tip. Here are the rest of the 35 — all publicly reported, all linked, all documenting the same fundamental problem: rules in context, not behavior.
Want to make sure your project never ends up here? One command. No configuration needed.