Quoting Geoffrey Huntley
Geoffrey Huntley fails commits that bypass his diagnostics library and prompts coding agents to comply.
Simon Willison highlights a quote from Geoffrey Huntley about steering coding agents. Huntley says updating AGENTS.md still drifts, so he added a Git pre-commit hook that rejects diffs calling observability modules while bypassing his diagnostics library. The failed commit injects a prompt telling the agent to use that library, which he says made compliance consistent.
- A pre-commit hook scans diffs for bypassed diagnostics calls.
- Failing the commit injects a prompt back to the coding agent.
- The method is meant to stop AGENTS.md instructions from drifting.
- Huntley says compliance became consistent after the hook.
From the original article
If the agent isn't using my diagnostics library, I could introspect and update AGENTS. md, but there's still a delta, and it'll drift. Instead, I write a pre-commit hook that checks the git diff for direct calls to observability modules that bypass my diagnostics module.
simonwillison.net
A short excerpt; the article and its images belong to the publisher. Summary, key facts and assessment above are AI-written from the article and can be wrong.