對照規格審查 AI 生成程式碼的 5 種做法
5 approaches to reviewing AI-generated code against a spec
文章比較 Anthropic、AWS、GeekyAnts、GitHub 和 OpenAI 將 AI 生成程式碼對照規格審查的 5 種工作流程安排。各公司把審查放在不同節點,並透過驗收條件、規格文件或倉庫規則供審查者核對。作者建議先為 API 返回 0 與沒有總額分別訂明驗收條件,讓編碼 Agent 和審查者共用,再確認測試是否涵蓋兩種情況。
Imagine a coding agent builds an order summary screen. The UI renders and CI passes, but the screen displays $0.00 when the API can’t return a total. A missing total and a zero total mean different things. If the spec never covered that case, the reviewer has to reconstruct the expected behavior from the original request.
Five companies put that review checkpoint at different points in the development workflow.
| Company | Tool | Where review happens |
|---|---|---|
| Anthropic | Claude Code | Plan Mode lets developers review the proposed approach before the agent edits source files. |
| AWS | Kiro Specs | Developers can review acceptance criteria, design decisions, and implementation tasks before work starts. |
| GeekyAnts | AntFlow AI | A builder agent implements tasks in dependency order. A separate verifier checks the pull request against the spec, and people handle key approvals and escalations. |
| GitHub | Spec Kit | The feature spec, technical plan, and task list are stored as Markdown files that reviewers can refer back to. |
| OpenAI | Codex | Pull request review can apply rules the team has documented in its repository. |
The order summary example in the original article shows how one workflow sequences the data model, API, and UI so each task starts with the dependencies it needs.
A small experiment for the next agent-generated PR
Write two acceptance criteria before implementation:
- When the API returns a total of zero, show
$0.00. - When the API returns no total, show
Total unavailable.
Give the coding agent and reviewer the same criteria. Then check whether the tests cover both cases. If CI passes and the reviewer still catches a mismatch, there’s a concrete regression test to add.
來源:DEV Community · dev.to