跳到正文
Simon Willison·· 3 小时前AI 评分60

Geoffrey Huntley:用 pre-commit hook 强制编码智能体使用诊断库

Quoting Geoffrey Huntley

AI 导读

Geoffrey Huntley 表示,如果智能体不用他的诊断库,与其更新 AGENTS.md(仍会有偏差并漂移),不如写一个 pre-commit hook 检查 git diff 中绕过诊断模块直接调用可观测性模块的代码,让提交失败并注入提示词要求智能体改用诊断库,效果十次有十次。他还表示现在已经不应该再手写代码了。

来源:Simon Willison · simonwillison.net