Geoffrey Huntley: enforce diagnostics library usage with a pre-commit hook, not AGENTS.md

Simon Willison · rss · 2026-10-13

Simon Willison quotes Geoffrey Huntley's technique from "nobody should type code by hand anymore": when an agent bypasses your diagnostics library, editing AGENTS.md still leaves drift. Instead, write a pre-commit hook that inspects the git diff for direct calls to observability modules that bypass the diagnostics module — fail the commit and inject a prompt telling the agent to use the library. "Boom: it's ten out of ten." A textbook case of replacing prompt constraints with deterministic engineering guardrails.

Original post →

More from coding & agent

coding & agent channel →