Write rules for an AI agent that actually change what it does. Use when editing CLAUDE.md, AGENTS.md, a system prompt or a team playbook, when the same mistake happens again with the rule already written down, or when a brief has grown a long list of must/never. Three tests for every rule — it says why (the incident, when there is one), it is enforced by something that exists and runs, and it is a checkable step at the point where the default behaviour happens rather than a prohibition — plus scripts/rules_check.py to audit a rules file for rules that only exist on paper. Not a prompt-writing guide.