AI编码
x.com ·
@Addy Osmani (@addyosmani)
Addy Osmani:为 Agent 建立验证机制可显著提升代码产出质量
Addy Osmani 提出,当 Agent 生成代码的速度超过人工审查能力时,瓶颈会转移到验证环节。他建议用 e2e 测试、feature maps、property tests 和多 Agent 对抗审查构建快速确定性反馈闭环,把人工审查重点从逐行读代码转向产品意图、风险评估和证据判断。他称在该流程下 Claude Code 能自行完成 90%+ 的代码,但该数字为作者自述,未提供独立验证。
AI推荐理由 Addy Osmani 分享的是一套可操作的 Agent 代码验证方法论:用 e2e 测试、feature maps、property tests 和多 Agent 对抗审查构建多层验证闭环,并称在此流程下 Claude Code 能自行写出 90%+ 的代码。具体新信息在于把代码审查瓶颈从人工逐行阅读转向自动化验证与风险评估,对 Agent 工程实践有直接参考价值。局限是 90% 这一数字来自作者自述、无独立验证,且帖子为观点性总结而非可复现实验。
72
浏览 81,620
点赞 1,554
评论 149
转发 107
正文
Give your agent a way to verify its work. This can dramatically improve the quality of output.
With this process in place, Claude Code was able to write 90%+ of its code itself. When generating software at a faster rate than you can review it, the bottleneck shifts to proving that it works. @bcherny and team invested enough in verification, we've been able to move fast while maintaining stability.
Code reviews aren't going away, but you need to think of it differently. One human reading through line-by-line is no longer going to work as a gate, it needs to evolve into a multi-layered verification system, built with fast deterministic feedback loops for your agents.
This is where e2e tests, feature maps (as @poteto has been advocating), property tests and multi-agent adversarial reviews come in. These all provide opportunities to catch errors early and fix them before things get out of hand.
You don't have enough eyeballs for the amount of code being written so your focus needs to be on product intent, risk assessment and evaluating evidence rather than reviewing code. Delegate the code checking work to your automated tests, scale your approvals based on risk, and turn your test failures into living evaluations. This approach helps maintain speed without losing reliability.
Let the agents do what they do best and let you focus on what makes you irreplaceable: judgement, direction, and ownership. We tried to capture how we handle code review and verification in this writeup. Hopefully it's helpful.