把反复纠正的错误变成自动化检查项
poteto 在 Code Summit 讲了个很实用的招:同一个错改两遍以上,就把它写成自动检查,别再靠口头发给 AI。这对天天和 Cursor、Copilot 打交道的人特别管用,错误能在提交前就被拦住。
在 AI Engineer Code Summit 上,来自 SpaceXSI 的 poteto 分享了一条工程实践:如果同一个错误需要反复纠正,就把它固化成一个确定性的检查项。演讲的核心主张是减少对人工或 AI 重复纠错的依赖,把纠正动作沉淀为可自动执行的质量关卡。
这种方法的关键在于“确定性”——检查不是靠提示词反复叮嘱,而是变成代码库中的固定规则,每次提交或生成后自动运行。poteto 还提到这样做能保持代码库“值得被复制”,即让他人复用代码时不必重新踩同样的坑。
对使用 AI 编程助手的开发者来说,这条思路很直接:与其在对话中一次次指出同一个问题,不如把纠正逻辑写进 lint、测试或 CI 流程,让错误在源头被拦截。
If you keep correcting the same mistake, make it a check. @poteto of @SpaceXSI on turning corrections into deterministic checks, and keeping the codebase worth copying. From AI Engineer Code Summit.
This report is categorized under AITOP's "How-to" desk, focusing on US frontier AI labs and Silicon Valley technology leaders. Within our cross-regional analytical framework, it directly maps to AI developer toolchains, coding agents, and engineering workflows. Key entities and technical topics under continuous tracking include AI Engineer Code Summit, coding assistants, code quality, CI.
Source attribution: curated from AI Engineer (@aiDotEngineer).