AI 编程 4.0 · 优秀 2026-10-15 · 文章

How the Claude Code team does code review

Claude Code 团队公开其代码评审流程:6 月到 9 月合并 PR 数量翻倍的同时,需要回退的比例下降超过 40%核心变化是把大部分阅读交给机器:PR 创建之前就让 Claude 跑测试构建或对照设计截图来自证工作,再由全新上下文的子代理审查 diff;每个 PR 都先经过 Claude 对照全仓与 PR 意图的机器评审;CLAUDE.md 讲项目约定,代码所有者维护的 REVIEW.md 告诉评审器什么算失败要求给出文件与行号证据;人只做风险导向的最后把关,目标是最多一次人工介入,用人工审批数等待时长和回退与事故率作为守门指标

打开原文回到归档

How the Claude Code team does code review

中文导读

Claude Code 团队公开其代码评审流程:6 月到 9 月合并 PR 数量翻倍的同时,需要回退的比例下降超过 40%。核心变化是把大部分阅读交给机器:PR 创建之前就让 Claude 跑测试、构建或对照设计截图来自证工作,再由全新上下文的子代理审查 diff;每个 PR 都先经过 Claude 对照全仓与 PR 意图的机器评审;CLAUDE.md 讲项目约定,代码所有者维护的 REVIEW.md 告诉评审器什么算失败、要求给出文件与行号证据;人只做风险导向的最后把关,目标是最多一次人工介入,用人工审批数、等待时长和回退与事故率作为守门指标。

为什么值得关注

agent 高速产出代码下评审体系的一手工程实践:分层自动化、把人的注意力当稀缺资源来度量,并以回退率验证没有把成本转移,可直接对照改进自家 agent 工作流;HN 198 分 188 评论。

关键信息

  • Title: How the Claude Code team does code review
  • Author: Addy Osmani (claude.dev blog)
  • URL: https://claude.dev/blog/solving-code-review-at-anthropic/
  • Published: 2026-10-15
  • Key numbers: merged PRs more than doubled June-September; reverted share fell >40%; Anthropic monorepo daily changes ~2,500 (May) to >30,000 (September)
  • Public tooling: Code Review for Claude Code GA on Team/Enterprise plans; /code-review lighter local version
  • HN: 198 points, 188 comments (story 50122951)

原文要点

  • Anthropic monorepo changes landing per day went from about 2,500 in May to more than 30,000 in September 2026 (engineering post on redesigning source control).
  • Layer 1: work verified before anyone looks - give Claude something runnable (tests, build, screenshot to compare), ask it to show output, then a subagent reviews the diff with fresh context; internal skills hunt for bugs, simplify diffs, and check end-to-end behavior.
  • Boris Cherny: giving Claude a way to verify its work is probably the most important thing for good results, estimating it makes the final result 2-3x better.
  • REVIEW.md written by code owners says what failure looks like in that repo, caps nits, lists paths to skip, and asks for file-and-line evidence instead of guesses; teams separately check whether the reviewer actually follows it.
  • When the automated reviewer keeps flagging the same thing, fix it at the source: in the skill, with a lint rule, or by updating CLAUDE.md/REVIEW.md.
  • Goal: most PRs merge with at most one human in the loop (who can be the author); revert and incident rates are the guardrail that human time was actually saved, not moved.

Obsidian Notes

  • Fetch: opencli hackernews top discovery; opencli web read saved full body under web-articles/How_the_Claude_Code_team_does_code_review_claude.dev_Blog/ (20.3 KB).
  • 中文导读与价值判断锚定在已抓取的摘要或正文上,未补充来源之外的细节。
  • 内容页写入 canonical content/ 目录(content/7fd7e06a.md),避开 openclaw/content/ 符号链接陷阱。