What problem does it solve? When an AI coding agent makes a mistake, the reflex is to add another warning line to AGENTS.md — which rarely works because natural-language instructions are probabilistic. This Skill diagnoses where a failure actually originates (missing context, broken process, excessive authority, or missing evidence) and selects the control layer that actually prevents or detects it. ## Core Features & Use Cases - Four-origin diagnosis: Classifies failures as context (agent didn't know), process (didn't follow the flow), authority (shouldn't be able to), or evidence (nothing caught it), with decision tests to separate them. - Control selection matrix: Maps each origin to the right mechanism — AGENTS.md rules, skills, permissions in .claude/settings.json, readAllow, .claudeignore, tests, linters, PostToolUse hooks, or PR approval gates. - Replay-based verification: Requires reproducing the exact failing input to prove the control blocks or flags it, then versioning the fix with an ADR. - Use Case: An agent ran git push origin main without approval. Instead of writing "never push to main" in AGENTS.md, the Skill identifies this as an authority failure and adds a deny permission, then replays the command to confirm it is blocked. ## Quick Start Ask the agent to diagnose why it repeated a mistake and choose the right control layer instead of adding another rule to AGENTS.md.