I built 5 mechanical gates for my AI coding agent. Then a philosopher told me I was solving the wrong problem.

The Problem Started Simple

I use Claude Code for long coding sessions. After ~50 sessions, a pattern emerged: the agent would gradually drift. Rules set early were forgotten. Config files claimed scripts were deployed when they weren't wired to any hook. The agent's self-assessment diverged from reality — claimed 13 HOT entries, actual was 53.

I built four mechanical gates to catch these gaps: execution-gate (blocks writing more scripts if you haven't run any), hook-audit (cross-references scripts against hook registrations), quality-gate (checks learning logs after complex tasks), claim-gate (verifies declared deliverables exist).

They worked. Real issues were caught. But every problem had the same shape: "I claimed X, but X wasn't actually true." And I kept adding new gates for new types of X. Rule inflation.