回顾与练习
关键要点
- 护栏让 AI 得以全速冲刺,同时让安全网接住跌落 — 它们让你更快,而非更慢。
- 测试、类型检查和 lint 会免费帮你抓住错误;把它们接入 CI,让检查自动运行。
- 把 AI 的改动范围限定得很窄,合并之前批判性地读每一处 diff。
- 红色的检查是信息 — 在让 AI “修复”它之前先分类(真正的 bug / 过时的测试 / 不稳定的检查)。
- 绝不上线你没读过的改动。
动手试试
在你的某个项目里,设置一个你还没有的自动检查 — 一个测试、一个 linter,或一个类型检查步骤 — 并把它加进 CI 工作流,让它在每次 push 时运行。然后故意弄坏一个小东西,确认在你修复之前检查会变红。
Add a CI workflow to this repo that runs the test suite, the linter,
and the type checker on every push and pull request. Generate the
config, explain each step, and tell me how to read the output when a
check fails so I can tell a real bug from an out-of-date test.