Why CLAUDE.md alone stops working around turn ten
Coding agents follow instructions at the start of a session and drift when they fix a nearby bug. A refactor to next.js middleware or proxy.ts suddenly wraps /api/webhooks/* behind a login redirect. A cleanup turns `await request.text()` into `await request.json()`, breaking Stripe or Polar HMAC signature verification in production while local dev still looks green.
Prose rules rely on the agent remembering them. Deterministic hooks enforce the boundary before a file write lands.