Skip to content
View original post on X: Dongxi NLP
Published

Anthropic's code review approach for AI-written code, explained step by step

AIDongxi NLP shares a summary of how Anthropic runs code review for Claude Code, where Claude writes about 90% of the code. The author says merged PRs more than doubled from June to September while the share of reverted PRs fell more than 40%, citing Anthropic's own post.
Dongxi NLPVerified on X
@dongxi_nlp
View on X

推荐阅读,Anthropic 如何做 Code Review!

1. 保留 code review,但大部分审核交给机器,人的时间只花在高风险判断上,同时让出错后能快速回滚。

2. 提 PR 前:Claude 自己跑测试和构建,再由一个新开的 agent 审一遍 diff。

3. 每个 PR:AI 多 agent 找 bug,投票过滤掉误报,再加一轮安全审查和 CI。每条发现都必须处理,否则不能合并。

4. 人工审批按风险分级:低风险 0 人,中风险 1 人,高风险 2 人,由分类器判定。bot 的批准不能替代人,驱动 agent 的人对改动负责。

5. 上线:合并队列、feature flag、先内部使用再灰度发布,出问题一键回滚。

6. 持续改进:历史事故整理成每日 eval,用来评估 reviewer。审查轮数设上限,避免 agent 之间无限互审。

ClaudeDevs@ClaudeDevs
Claude writes about 90% of Claude Code's code. From June to September, merged PRs more than doubled while the share reverted fell by more than 40%. We wrote about how we changed code review to get there, and how to adopt it: https://claude.dev/blog/solving-code-review-at-anthropic/
View quoted post on X
Source details

Dongxi NLP · x.comPublished

Original title: 推荐阅读,Anthropic 如何做 Code Review!