跳到正文
Simon Willison·· 2026-10-13AI 评分42

Geoffrey Huntley 如何用 pre-commit hook 让 Agent 使用诊断库

Quoting Geoffrey Huntley

AI 导读

Geoffrey Huntley 用 pre-commit hook 检查 git diff 中的可观测性模块直接调用,阻止 Agent 绕过诊断库。失败提交时注入提示词,他称结果从“还是会有偏差并逐渐漂移”变为“十次全中”。

来源:Simon Willison · simonwillison.net