We put a 'Violate when:' exit clause on every AGENTS.md rule — agent over-engineering dropped from 3/10 to 8/10 A developer published arch-rule-packs, an MIT-licensed AGENTS.md rule set in which every one of 21 architecture rules carries an explicit "Violate when:" exit clause so coding agents know when a rule does not apply. In a blind benchmark of 10 small design tickets, the pack raised design-quality scores from 3/10 to 8/10, while an over-design probe passed in both arms, indicating the clauses curb speculative abstraction rather than trading one failure mode for another. AI coding agents Claude Code, Codex, anything that reads AGENTS.md obey architecture rules like dogma. So we put a Violate when: exit clause on every single rule — a rule without one does not ship. 21 rules, zero binaries, zero CI plugins. Our own bench on 10 small design tickets: 3/10 → 8/10 design-quality score, with an over-design probe proving the pack doesn't just trade one disease for another. Repo: theBigGavin/arch-rule-packs https://github.com/theBigGavin/arch-rule-packs?utm source=devto&utm medium=post&utm campaign=arp-launch-202611 You have probably seen this exact commit in your own AI-assisted repo: Here's the uncomfortable part: none of these are hallucinations. The agent is following your rules . Your AGENTS.md says "prefer composition over inheritance", "open for extension", "separate domain from infrastructure". The agent dutifully applies them, forever, at every scale — including scales where they cost 2 extra files per service and make the codebase 30% larger without removing a single coupling. Every architecture rule is conditional, but almost nobody writes the condition. "Interfaces at vendor boundaries" is great advice — right up until you put an interface in front of Math.max not a joke; we have seen the equivalent in review . When you give an LLM a rule without a condition, it optimizes for visibly obeying the rule , because that's what's checkable in its context window. The judgment call — does this rule apply here? — silently defaults to "yes", because "yes" produces visible artifacts an interface, a layer, a factory and "no" produces... nothing. Nothing looks like failure to a model trained to look like it did something. Our pack ships each rule with two hard sections: R3 — Interfaces at vendor boundaries Apply: HTTP clients, payment SDKs, model providers — anything with a network or a vendor you can swap. Violate when: the client has exactly one implementation AND no second implementation is planned in this quarter. A concrete class is fine. Delete the interface the day the second implementation appears. Two properties make it work: Violate when: is machine-checkable prose. We ran our own dogfood bench public in bench/ : 10 small design tickets — each a one-paragraph task a coding agent would plausibly get — scored blind on design quality by a hidden check that evaluates the design , not the tests. Same model, same tickets, one arm with the pack in AGENTS.md , one without. | Arm | Design-quality score | |---|---| | No pack | 3/10 | | arch-rule-packs | 8/10 | | Over-design probe tickets that punish speculative abstraction | passes in both arms | We want to be straight with you about what this is and isn't: curl -fsSL -o AGENTS.md https://raw.githubusercontent.com/theBigGavin/arch-rule-packs/main/AGENTS.md Or clone it and pick rules: each file in rules/ is standalone. 21 rules, each with Apply: / Violate when: . MIT. Repo: theBigGavin/arch-rule-packs https://github.com/theBigGavin/arch-rule-packs?utm source=devto&utm medium=post&utm campaign=arp-launch-202611 — if you've watched your agent invent a factory for a singleton, the bench README has the 10 tickets; open a PR with your score on your model. We collect them.