Simon Willison·· 2 小时前AI 评分57
Geoffrey Huntley:pre-commit hook 让 Agent 自觉使用诊断库
Quoting Geoffrey Huntley
AI 导读
Geoffrey Huntley 指出,Agent 的 AGENTS.md 文档会随代码更新而漂移,于是他用一个 pre-commit hook 检查 git diff 中的直接调用,一旦发现绕过诊断模块的代码就直接失败 commit 并注入提示词,引导 Agent 使用诊断库,从而保持一致性。
来源:Simon Willison · simonwillison.net