Quoting Geoffrey Huntley
AI-generated summary of reporting by Simon Willison’s Weblog. Read the original for the full story. The source provided limited text, so this summary is brief.
Why it matters
Geoffrey Huntley's advice suggests AI coding agents are best steered not with more prompt text but with hard, mechanical enforcement via git hooks.
Simon Willison quotes developer Geoffrey Huntley on a trick for making AI coding agents follow his rules. Instead of writing ever-longer instruction files, which the agent may ignore or drift from, Huntley adds a pre-commit hook: a script that blocks a git commit if the code calls observability tools directly instead of his diagnostics library, then injects a message telling the AI to use the right library. He says this took the results from unreliable to 'ten out of ten'.
Geoffrey Huntley argues that prompt files like AGENTS.md drift and fail to control AI coding agents, so teams should enforce rules mechanically instead. His example: a pre-commit hook that rejects commits whose code bypasses his diagnostics module and injects a corrective instruction. Teams adopting AI coding tools gain reliability by encoding standards as code rather than prose; those relying on instructions alone face ongoing inconsistency.
Huntley describes replacing instruction drift in AGENTS.md with enforcement: a pre-commit hook inspects the git diff for direct calls to observability modules that bypass his diagnostics library, fails the commit, and injects a prompt telling the agent to use the diagnostics library. This closes the gap between stated agent instructions and actual behavior. The post is a single quoted passage; no tooling details, benchmark numbers, or implementation specifics are given.
Read the original
This summary exists to save you time, not to replace the source.
Key terms
Was this summary useful?
One click, anonymous. It tells us which summaries to re-run.
Related reading
Code-driven AI illustrations are more useful than images from dedicated image models
Code-driven AI illustrations let designers edit assets directly in code, saving time on iteration and ensuring consistency, which is a game-changer for teams that need rapid, reusable visual content.
A hierarchical note-taking app for building large personal knowledge bases
Trilium lets users build and navigate massive personal knowledge bases without duplicating content, saving time on organization and retrieval.
Desktop apps in Go with native UI or web frontend
Go developers can now ship cross-platform desktop and mobile apps in a single small binary without cgo or heavy runtimes, cutting build complexity and deployment size.
OpenBitFun: an agent workspace with four harness modes and phone remote control
OpenBitFun lets agents run on any machine and be controlled from a phone, eliminating the need to choose between local power and remote access, saving developers time switching contexts.
Intel One Mono: a monospaced font designed with low-vision developers
Developers with low vision or eye fatigue can read code more clearly, reducing errors and improving productivity.