How the Claude Code team reviews 30,000 changes a day
Anthropic's Claude Code team describes its internal review pipeline, built for a repo where daily merged changes went from ~2,500 in May to over 30,000 in September. Review is split into six layers: runnable verification and a fresh-context subagent before the PR exists; a Claude reviewer on every PR that reads the diff against the whole repo and the stated intent, with findings voted on by several agents before posting; a security review that can block merge; CI; risk-tiered human approval (0/1/2 people) assigned by a classifier reading the change rather than the author; then merge queue, flags, internal dogfooding and one-step rollback. They also document the failure modes: one CLI PR ran more than fifty review rounds overnight, and git blame showed ~59% of flagged lines predated the reviewer's first pass, prompting a three-round cap and diff-only re-review. Useful for teams wiring agents into their own review flow.
We've said before that Claude writes about 90 percent of Claude Code's own code. So how do we review code at the volume we produce it? Does anyone read code anymore? And if something breaks, who catches it?
This post covers the code review flow on the Claude Code team and how it has evolved. From June to September, merged pull requests to Claude Code's codebase more than doubled while the share that had to be reverted fell by more than 40 percent.
We didn't remove review. But we did move most of the reading to machines, optimized for human time and attention, and invested heavily in making it fast and easy to undo mistakes.
我们之前说过,Claude Code 自身约 90% 的代码由 Claude 编写。那么,在以这样的规模产出代码时,我们怎么评审?现在还有人读代码吗?万一出了问题,谁来兜住?
本文讲的是 Claude Code 团队的代码评审流程,以及它如何演变。从六月到九月,合并进 Claude Code 代码库的 pull request 数量翻了一倍多,而需要回滚的比例下降了 40% 以上。
我们没有取消评审。我们做的是把大部分“读代码”的工作交给机器,把人的时间和注意力省下来,并大力投入让撤销错误变得又快又容易。
When agents write code, the number of changes goes up, fast. In Anthropic's monorepo, changes landing per day went from about 2,500 in May to more than 30,000 in September this year.
Claude Code lives in its own repository, separate from the monorepo, but it's seeing a lot of pressure too. When you are shipping this fast, manual, line-by-line code review is incredibly difficult if not impossible.
当 agent 写代码时,变更数量会迅速上升。在 Anthropic 的 monorepo 里,每天落地的变更从五月的约 2,500 个,增长到今年九月的 30,000 多个。
Claude Code 有自己的独立仓库,不在这个 monorepo 里,但它同样承受着巨大压力。以这样的速度交付,靠人工逐行评审代码即使并非不可能,也极其困难。
Code review does two jobs:
Find and fix issues before they ship
Build shared context and codebase understanding across the team
This article mainly focuses on finding and fixing issues, but we will come back to the second job near the end.
We think "did a human read the code?" is an imprecise proxy for "what could go wrong with this change, and which check—automated or human—is the right one to catch it?"
代码评审有两个职责:
在代码上线前发现并修复问题
在团队内建立共享上下文和对代码库的理解
本文主要讲第一个职责,第二个职责会在接近结尾时再谈。
我们认为,“有没有人读过代码”并不能准确回答另一个问题:“这次变更可能出什么问题,哪种检查——自动的还是人工的——才适合抓住它?”
Asking that question also changed when review happens. Before, review was a gate at the end of the road: write the code, open a PR, wait for your colleague.
Now, review runs continuously, more like spellcheck while you write. Most changes have been reviewed and fixed by Claude at least once before a human is asked to look. This catches most routine mistakes, and saves team attention for higher-level questions and scrutiny.
问出这个问题,也改变了评审发生的时机。以前,评审是流程尽头的闸门:写完代码,开 PR,等同事来看。
现在,评审持续运行,更像你写作时自动运行的拼写检查。大多数变更在请人来看之前,已经被 Claude 至少评审并修复过一轮。这样能抓住大部分常规错误,把团队的注意力留给更高层的问题和更细致的审查。
We want to preserve human time and attention for issues only humans can solve and make sure automated checks catch the rest. At our current rate of change, there is still an incredible amount of work for humans to do, and our team encounters new and novel challenges almost daily.
Human time covers both sides of review's cost: the time people spend reviewing, and the time they spend fixing what bad code breaks. Cutting the first doesn't help if the time just shows up in the second.
So the goal is that most pull requests in the Claude Code repos (the CLI, the desktop and web apps, and the mobile apps) merge with at most one human in the loop, who can be the author, with no increase in reverts or incidents. To measure human time, we track human approvals per PR (median and 95th percentile), human comments, and how long a PR waits on a person. Revert and incident rates are the guardrail: if they rise, we haven't saved human time, we've only moved it.
我们希望把人的时间和注意力留给只有人才能解决的问题,其余的交由自动检查兜住。以我们现在的变更速度,人要做的事仍然多得多,团队几乎每天都会遇到新的、没见过的挑战。
人的时间包含评审成本的两端:一端是人花在评审上的时间,另一端是人花在修复烂代码造成的破坏上的时间。如果砍掉前者,时间却从后者冒出来,那就没有意义。
所以目标是:Claude Code 各仓库(CLI、桌面端和 Web 应用、移动应用)的大多数 pull request,在最多一个人参与的情况下合并——这个人可以是作者——同时不推高回滚率或事故率。为了衡量人的时间,我们追踪每个 PR 的人工批准次数(中位数和 95 分位)、人工评论数量,以及 PR 等待某个人多久。回滚率和事故率是护栏:如果它们上升,说明我们并没有省下人的时间,只是把时间挪到了别处。
A typical change, from an engineer's laptop (or a Claude session in Slack), goes through multiple layers of code review.
The life of a change
A typical Claude Code change, from the author's machine to users
FIG A Most of the path is automated; a person's attention goes where the risk is
Layers, not one gate
Six layers of checks, with rollback under them
FIG B Each layer catches some problems and misses others. Few get through all of them, and rollback handles the rest.
一次典型变更,从工程师的笔记本电脑(或 Slack 里的一个 Claude 会话)出发,要经过多层代码评审。
一次变更的完整路径
一次典型的 Claude Code 变更,从作者机器到用户
图 A 大部分路径是自动化的;人的注意力放在风险所在之处
分层,而不是一道闸门
六层检查,下面还有回滚兜底
图 B 每一层都能抓住一些问题,也会漏掉另一些。很少有变更能穿过所有层还不被拦下,剩下的由回滚处理。
Most review now happens before a PR exists. We give Claude something it can run—like tests, a build or a screenshot to compare against the design—and ask it to show the output instead of saying it's done. Then a subagent reviews the diff with fresh context. Both habits come from our best-practices guide.
Before opening a PR, many of us also run a few internal skills: one hunts for bugs, one simplifies the diff, and one checks the behavior end to end. UI changes also get checked against our design guidelines.
Boris Cherny, who created Claude Code, has called giving Claude a way to verify its work probably the most important thing for getting good results. He estimates it makes the final result two to three times better, and writes, "Verification looks different for each domain. It might be as simple as running a bash command, or running a test suite, or testing the app in a browser or phone simulator."
现在大部分评审发生在 PR 出现之前。我们给 Claude 一些它能运行的东西——比如测试、构建,或一张用来和设计稿对比的截图——并要求它展示输出,而不是只说“做完了”。然后,一个 subagent 会用全新的上下文评审 diff。这两个习惯都来自我们的最佳实践指南。
在开 PR 之前,我们中的许多人还会运行几个内部 skill:一个找 bug,一个简化 diff,一个做端到端的行为检查。UI 变更还会对照设计规范检查。
Claude Code 的创造者 Boris Cherny 说过,给 Claude 一种验证自己工作的方式,可能是获得好结果最重要的事。他估计这能让最终结果好上两到三倍,并写道:“验证方式因领域而异。它可以简单到跑一条 bash 命令、跑一套测试,或者在浏览器或手机模拟器里测试应用。”
When the automated reviewer keeps flagging the same thing, we fix it at the source: in the skill, with a lint rule, or with updates to instructional files such as:
CLAUDE.md tells Claude what the project is: the stack, the conventions, the goals and the non-goals. Every review loads it, so in a large codebase we keep it short and point to other docs from there. The reviewer also flags code that breaks a convention in it, and changes that make a line in it out of date.
REVIEW.md, written by code owners, tells the reviewer what matters in their part of the code. We check separately whether the reviewer actually follows it. The good ones are short. They say what failure looks like in that repo (for docs it's "it lies," for config it's "it misroutes"), cap the nits, list paths to skip, and ask for a file and line as evidence instead of a guess from a name. They also ask for a summary that starts with a count and says plainly when there's nothing to fix.
当自动评审反复指出同一个问题时,我们会从源头修掉它:改 skill、加 lint 规则,或者更新指导文件,比如:
CLAUDE.md 告诉 Claude 这个项目是什么:技术栈、约定、目标和非目标。每次评审都会加载它,所以在大型代码库里,我们让它保持简短,并从那里指向其他文档。评审器也会标出违反其中约定的代码,以及让其中某一行过时的变更。
REVIEW.md 由代码 owner 编写,告诉评审器在他们负责的那部分代码里,什么才是重要的。我们会单独检查评审器是否真的遵守了它。好的 REVIEW.md 都很短。它们会说明在那个仓库里失败长什么样(对文档来说,失败是“它在说谎”;对配置来说,失败是“它把请求路由错了”),限制鸡毛蒜皮的评论,列出要跳过的路径,并要求给出文件和行号作为证据,而不是根据名字猜。它们还会要求摘要以数量开头,并在没有东西要修时直接说明。
Every pull request gets a Claude review before a person looks. It reads the diff against the whole repo and the PR's stated intent, and asks: does the change solve its problem, fit the system, or break something else?
On a bug fix, it looks for the root cause. The public version, Code Review for Claude Code, is now generally available on Team and Enterprise plans, and /code-review runs a lighter version locally.
When we launched the research preview, the share of internal PRs getting substantive review comments went from 16% to 54%. Most PRs over 1,000 lines get findings, and most small ones come back clean. Admins set each repo to Quick, Standard, or Deep. Deep is worth it where one missed bug costs more than the extra review time.
每个 pull request 在有人看之前,都会先得到一次 Claude 评审。它会结合整个仓库和 PR 声明的意图来读 diff,并问:这次变更解决了它要解决的问题吗?它是否贴合系统?会不会破坏别的东西?
在修 bug 时,它会寻找根因。公开版本 Code Review for Claude Code 现在已在 Team 和 Enterprise 套餐中正式可用,/code-review 则在本地运行一个更轻量的版本。
我们推出研究预览版时,内部 PR 中获得实质性评审评论的比例从 16% 上升到 54%。超过 1,000 行的 PR 大多能查出问题,而大多数小 PR 则干干净净地回来。管理员可以把每个仓库设为 Quick、Standard 或 Deep。如果漏掉一个 bug 的代价高于多花的评审时间,Deep 就值得用。
Findings get verified by other agents before humans review them. Several agents look for bugs at the same time. Then a separate group votes on each finding, and it only gets posted if enough of them agree it's real. Findings that are only about style, diagnostics, or cleanup get dropped. We A/B tested those filters on our own PRs before keeping them. What's left shows up as inline comments sorted by severity. Each is tagged Important, Nit, or Pre-existing, so a bug the PR didn't introduce doesn't look like the author's fault.
Every finding has to be answered. You either fix it or resolve the thread with a reason. Often an agent picks up the fix overnight, so the author comes back to a PR that's already been through another round.
在人类评审之前,发现会先由其他 agent 验证。多个 agent 同时找 bug。然后另一组 agent 对每条发现投票,只有足够多的 agent 认为它真实,才会被发布出来。只涉及风格、诊断信息或清理的发现会被丢掉。我们在自己的 PR 上对这些过滤器做过 A/B 测试,确认有效后才保留。剩下的发现会以行内评论的形式出现,按严重程度排序。每条都标记为 Important、Nit 或 Pre-existing,这样不是这个 PR 引入的 bug,就不会看起来像作者的错。
每条发现都必须有回应。你要么修掉它,要么在讨论串里说明理由并标记解决。通常 agent 会连夜把修复接过去,所以作者回来时,PR 已经又过了一轮。
Security gets its own automated review too. A PR can't merge while any finding from the bug review or the security review is still open. You either fix it or close the thread with a short reason, which is how you clear a false positive.
If a later commit fixes the issue, the finding clears on its own. You can set up the same thing with the open-source security review GitHub Action or the /security-review command. Setup is covered in automated security reviews in Claude Code.
The usual: lint, type checks, tests on every platform, and a build. (We wrote about scaling CI for this volume here.) A typical CLI pull request may run dozens of checks before anyone looks at it. The PR template asks how the change was tested and how to undo it. Claude can fill that in, but the person who asked for the change signs off on it.
安全也有自己的自动评审。只要 bug 评审或安全评审还有任何未关闭的发现,PR 就不能合并。你要么修掉它,要么用简短理由关闭讨论串——这也是清除误报的方式。
如果后续 commit 修复了问题,这条发现会自动消失。你可以用开源的安全评审 GitHub Action 或 /security-review 命令配置同样的流程。具体设置见 Claude Code 的自动安全评审文档。
还有常规检查:lint、类型检查、各平台上的测试,以及构建。(我们在这里写过如何为这种规模扩展 CI。)一个典型的 CLI pull request 在有人看之前,可能会跑几十项检查。PR 模板会问这次变更怎么测试、怎么撤销。Claude 可以帮你填,但提出这个变更的人要签字确认。
A docs fix and an auto-updater change carry different risk, so they get different review.
| Risk | Examples | Human approvals |
|---|---|---|
| Low | Docs, copy, internal-only features, additive changes behind a flag | None required once automated review and security checks are green |
| Medium | Ordinary product changes, and changes to sensitive areas such as caching, the auto-updater, or system prompts | One person |
| High | The highest-risk code, plus a small set of paths that always need two people | Two people |
The change sets the tier, not the author. A classifier reads the change and picks its risk tier. A second classifier asks whether this particular change needs another person even when its tier says it doesn't. Some paths always need a person, anything owners have listed as sensitive and any CI workflow file.
修文档和改自动更新器,风险不同,所以评审方式也不同。
| 风险 | 例子 | 人工批准 |
|---|---|---|
| 低 | 文档、文案、仅内部使用的功能、藏在 flag 后面的增量变更 | 自动评审和安全检查通过后,无需人工批准 |
| 中 | 普通产品变更,以及缓存、自动更新器、系统提示等敏感区域的变更 | 一个人 |
| 高 | 最高风险的代码,外加一小部分始终需要两个人看的路径 | 两个人 |
决定层级的是变更本身,不是作者。一个分类器会读取变更并选出风险层级。第二个分类器会问:即使层级说不需要,这次变更是否还需要另一个人来看?有些路径始终需要人:owner 列为敏感的任何内容,以及任何 CI workflow 文件。
Only trusted authors get the lighter paths. Only authors on the repo's trusted list get the lighter paths, mostly the team that owns it. Everyone else needs a second person to approve. An agent's approval never counts as a person's, either. Automated review can clear a low-risk change, but it can't fill a slot that calls for a human.
Whoever prompted the change is on the hook for it. On an agent-written PR, the person directing the agent counts as one of the required reviewers, the same as if they'd typed the code themselves.
An approval covers one specific commit. If new commits land that the system can't vouch for, like an agent's push or a merge someone resolved by hand, the approval has to be given again.
只有可信作者能走更轻的路径。具体说,只有仓库可信名单上的作者——大多是拥有该仓库的团队——才能走更轻的路径。其他人都需要第二个人批准。agent 的批准也永远不能算作人的批准。自动评审可以让低风险变更通过,但它不能填补必须由人来的位置。
谁发起了这次变更,谁就要对它负责。在 agent 写的 PR 上,指挥 agent 的人算作所需评审人之一,就像代码是他们自己敲的一样。
一次批准只覆盖一个特定 commit。如果来了系统无法担保的新 commit,比如 agent 推送的,或某人手工解决的 merge,批准就必须重新给。
The merge queue re-runs every check against main with the change applied, so two PRs that pass separately can't combine into a broken main. New behavior usually ships behind a flag to Anthropic employees first, and our heavy use often surfaces regressions before users do. Public releases go to the latest channel first. The stable channel trails it.
合并队列会把变更应用到 main 上,重新跑一遍所有检查,这样两个各自通过的 PR 不会合在一起把 main 搞坏。新行为通常会先放在 flag 后面,只对 Anthropic 员工开放;我们自己的高频使用往往能在用户之前发现回归。公开发布先走 latest 通道,stable 通道随后跟进。
Some mistakes will still get through, so the last layer is about catching them fast. Flags turn off without a deploy. Claude Code has a weekly on-call rotation, and incident reviews ask which layer should have caught the issue.
Noticing a bad merge still depends on the author and on-call as well as the revert and incident dashboards. We don't yet have circuit breakers that tighten approval when those numbers move; engineers here want them before more code moves to zero-human merges.
One colleague said slowing down does lower your error rate, but mostly because you're doing less of everything. We'd rather get faster at noticing and fixing problems.
有些错误仍然会漏过去,所以最后一层要做的就是快速抓住它们。flag 不用部署就能关掉。Claude Code 有每周轮值的 on-call,事故复盘会问:哪一层本来应该抓住这个问题?
发现坏 merge 仍然要靠作者、on-call,以及回滚和事故仪表盘。我们还没有能在这些数字变化时收紧审批的断路器;这里的工程师希望在更多代码转向零人工合并之前,先有这东西。
一位同事说过,放慢速度确实能降低错误率,但主要是因为你在少做所有事情。我们宁愿更快地发现和修复问题。
Our code review process is constantly improving in a loop.
Any incidents are now an eval. The team collected past PRs that caused incidents, with their fix-forwards and reverts, and had engineers who know that code confirm each bug and where it lived. The reviewer runs against that set daily.
Our incidents are the eval
Built from past incidents and reverts, run every day
FIG C The eval grows with every incident, and every change to the reviewer is scored against all of it.
We measure noise by watching what people do with the comments. It's easy to catch more bugs if you don't mind flagging a lot of non-bugs, so we need a check on that. We sort every comment the reviewer leaves by how the person on the PR responded: they fixed it, said it was wrong, said the behavior was intentional, or decided it didn't matter. We also run the reviewer on PRs we know are clean and count how often it reports something that would have led someone to make a harmful change. Our priority, written down, is catching real bugs first and cutting review rounds second.
我们的代码评审流程在一个循环里不断改进。
现在,任何事故都会变成一条 eval。团队收集了过去引发事故的 PR,连同它们的 fix-forward 和回滚,并让熟悉那段代码的工程师确认每个 bug 以及它藏在哪里。评审器每天都会跑这套集合。
我们的事故就是 eval
由过去的事故和回滚构建,每天运行
图 C eval 会随着每次事故增长,评审器的每一次改动都要拿整个集合来打分。
我们通过观察人们怎么处理评论来衡量噪声。如果你不介意标出大量非 bug,多抓 bug 很容易,所以我们需要一个制衡。我们会按 PR 上的人如何回应,对评审器留下的每条评论分类:他们修了、说这是错的、说这是有意行为,或者认为不重要。我们还会在已知干净的 PR 上运行评审器,统计它报告出“可能导致有害改动”的频率。我们写下来的优先级是:先抓真 bug,再减少评审轮次。
Noise costs more when the author is an agent. A person can wave off a nit in seconds. An agent fixes it, which means another commit and another round of review.
Review has to converge. An agent author and an agent reviewer can keep each other busy indefinitely. One CLI PR went through more than fifty rounds of review and fixes overnight before its author stopped it.
When we ran git blame on what the reviewer kept flagging, about 59% of it was code that had been there since the reviewer's first pass. The reviewer was rarely finding new bugs, it was finding a few more old ones each round.
We made it worse ourselves. We'd gotten used to running several rounds by default, since each pass catches something new. This can be worthwhile on a risky change, but not on every PR.
当作者是 agent 时,噪声的代价更高。人可以几秒钟就挥开一条小意见。agent 却会去修它,这意味着又一个 commit 和又一轮评审。
评审必须收敛。agent 作者和 agent 评审器可以让彼此无限忙下去。有一个 CLI PR 一夜之间经历了五十多轮评审和修复,最后作者才把它叫停。
我们对评审器反复指出的内容跑 git blame,发现大约 59% 是评审器第一轮时就已经在那里的代码。评审器很少发现新 bug,它每一轮都在找出更多旧 bug。
我们自己让情况变得更糟。我们习惯了默认跑好几轮,因为每一轮都能抓到新东西。这在风险变更上可能值得,但不该每个 PR 都这样。
The team now tracks rounds-to-pass alongside recall, and changed re-review:
A round cap. After three rounds, the reviewer asks the author to step back and reconsider the approach.
Diff-only re-review after the first few passes.
Flag the class of bug, so the author fixes every instance, not one line.
No repeats of findings already posted.
Review agents also run nightly over existing code, helping us catch old bugs before they show up somewhere else.
Review that converges
Internal pull requests, before and after the convergence changes
FIG D Fewer review rounds per internal pull request after the convergence changes
团队现在会同时追踪 rounds-to-pass 和召回率,并改掉了重新评审的方式:
限制轮次。三轮之后,评审器会请作者停下来,重新考虑方案。
前几轮之后,只评审新的 diff。
标出一类 bug,让作者修复所有实例,而不是只修一行。
不重复发布已经发过的发现。
评审 agent 还会每晚在现有代码上运行,帮我们在旧 bug 冒到别处之前抓住它们。
会收敛的评审
收敛改动前后的内部 pull request
图 D 收敛改动之后,每个内部 pull request 的评审轮次减少了
Pulling a senior engineer out of deep work to catch a routine mistake costs far more than an automated review. People on the team are still responsible for:
Deciding whether to build it. Direction, taste and scope. One team that declared its review bottleneck solved still kept human review for changes from outside the team, so someone asks "should we even do this?"
Reviewing risky code such as billing, the auto-updater and CI workflows.
Reviewing architecture that sets a pattern others will copy.
Reading the evidence. Test output, the command that ran and what it returned, a screenshot, the reviewer's findings. If you can't say what the checks would miss, ask for a real review rather than a quick approval.
Owning the outcome. A person is accountable for every change that ships, whoever typed it.
把一位资深工程师从深度工作中拉出来,只为抓一个常规错误,代价远高于一次自动评审。团队里的人仍然要负责:
决定要不要做。方向、品味和范围。有一个团队宣称自己的评审瓶颈已经解决,但仍然保留对团队外部变更的人工评审,好让有人问一句“这事到底该不该做?”
评审有风险的代码,比如计费、自动更新器和 CI workflow。
评审会立下模式、被别人照抄的架构。
读证据。测试输出、运行了什么命令以及返回了什么、截图、评审器的发现。如果你说不出这些检查会漏掉什么,那就要求一次真正的评审,而不是快速点个批准。
对结果负责。每一个上线的变更都要有一个人负责,不管代码是谁敲的。
Code review's second job has always been to spread codebase understanding. Reading a teammate's diff is how you learn what changed and how the pieces fit. If machines do most of the reading, how does anyone learn the code?
We don't have a formal process for this. Nobody on the team keeps a complete mental model of Claude Code in their head, and we don't think anyone needs to. When someone wants to understand a part of the codebase, they ask Claude to write an explainer for exactly that slice. It takes minutes and reflects the code as it is today.

Some of us go a step further and have Claude build a small artifact that visualizes that part of the code and teaches it the way that person likes to learn.
If the goal is to spend human attention well, this beats reading trivial diffs line by line. A one-line copy change teaches you almost nothing. An explainer for the module you're about to change teaches you a lot. Our culture of defaulting to working on open Slack channels helps too, since you see what others are building while they build it.
代码评审的第二个职责,一直是传播对代码库的理解。读同事的 diff,是你了解改了什么、各部分怎么拼起来的方式。如果大部分阅读都由机器完成,人又怎么学习代码?
我们没有正式流程。团队里没有人能在脑子里装下 Claude Code 的完整心智模型,我们也认为不需要。当有人想理解代码库的某一部分时,就让 Claude 为那个切片写一份讲解。几分钟就能完成,而且反映的是今天的代码。

我们中有些人更进一步,让 Claude 做一个小工具,把代码的那部分可视化,并按那个人喜欢的学习方式来教。
如果目标是把人的注意力花好,这比逐行读琐碎的 diff 强。一行文案改动几乎教不会你什么。为即将修改的模块写一份讲解,能教给你很多。我们默认在开放的 Slack 频道里工作的文化也有帮助,因为别人在做的时候,你就能看到他们在建什么。
If you land a small or medium change and something still goes wrong, it's a team norm that you usually fix it. A few things keep this from going badly:
Changes are small, so they're easy to review, debug and revert.
Everything is reversible. Flags, reverts and staged releases undo most mistakes in minutes.
Blast radius sets the bar. Expensive code gets more people and more checks.
Regressions surface fast through telemetry and internal use.
It isn't blame. Owning a fix means you have the most context; incident reviews look at the system.
Ownership is also shared. Much of the team works in open channels where anyone can see what others are building, pick up a thread, or point a Claude at a gap, and feedback comes from people who don't own the code too. That openness is a big part of how quality stays high without a gate on every line.
Agents make it cheap to start things, so some work shouldn't land. Usually someone in the channel asks why, points at an earlier decision, or suggests a simpler route, and the author closes or reshapes the PR.
Since the code was fast to write, closing the PR doesn't feel like a loss. The trick is to raise a different direction in the thread early, not as a blocking comment on a finished PR.
如果你合并了一个小或中等变更,后来还是出了问题,团队规范通常是:由你来修。有几件事能让这不至于失控:
变更很小,所以容易评审、调试和回滚。
一切皆可撤销。flag、回滚和分阶段发布能在几分钟内撤销大多数错误。
影响范围决定门槛。昂贵的代码需要更多人和更多检查。
回归会通过遥测和内部使用快速暴露。
这不是追责。拥有修复权意味着你最了解上下文;事故复盘看的是系统。
责任也是共享的。团队里很多人都在开放频道工作,任何人都能看到别人在做什么、接起一个讨论串,或让一个 Claude 去补一个缺口,反馈也来自并不拥有这段代码的人。这种开放性是质量能保持在高位、又不必对每一行设闸的重要原因。
agent 让启动事情变得很便宜,所以有些工作不该落地。通常频道里会有人问为什么做、指出早先的决定,或建议一条更简单的路,然后作者关闭或调整 PR。
因为代码写得很快,关掉 PR 不会让人觉得是损失。诀窍是在讨论串里尽早提出不同方向,而不是等 PR 完成后才留一条阻塞性评论。
Most of the pieces to do this with your team exist today.
Before the pull request
Give your agent checks it can run, listed in a short CLAUDE.md, plus hooks that run formatters and linters.
Run /code-review and /security-review locally, or a fresh-context subagent review.
Add a REVIEW.md, and move repeated review comments into it.
On every pull request
Require CI, and add "Testing", "Risk" and "How to revert" to your PR template.
Add an AI reviewer (Code Review for Claude Code, or the Claude Code GitHub Action) on one repo, tune REVIEW.md for a few weeks, then widen.
Add automated security review, and require every review thread resolved before merge.
Match review effort to risk: a quick pass on routine changes, a deep one where a missed bug is expensive (Quick, Standard or Deep in Code Review).
Cap review rounds; after the first few, re-review only the new diff.
在每个 pull request 上
要求 CI,并在 PR 模板里加上“Testing”“Risk”和“How to revert”。
先在一个仓库上加入 AI 评审器(Code Review for Claude Code,或 Claude Code GitHub Action),调几周 REVIEW.md,然后再扩大范围。
加入自动安全评审,并要求合并前每个评审讨论串都已解决。
让评审投入与风险匹配:常规变更快速过一遍,漏 bug 代价高的地方深入评审(Code Review 里的 Quick、Standard 或 Deep)。
限制评审轮次;前几轮之后,只重新评审新的 diff。
Approval
Write down risk tiers, set from the change rather than the author; start strict and loosen with evidence.
Keep the lighter approval paths for authors you trust.
Use CODEOWNERS and branch protection so auth, billing, CI and release workflows, and installers always need a person.
Never let a bot's approval replace a required human's; dismiss approvals on new commits.
Merge and after
Use a merge queue, feature flags, internal use first, staged releases and one-step rollback.
Turn incidents and reverts into an eval set, and rescore the reviewer whenever its prompts, tools or model change.
Measure human time, with revert and incident rates as the guardrail.
审批
写下风险层级,由变更而不是作者决定;先从严格开始,再根据证据放宽。
把更轻的审批路径留给你信任的作者。
使用 CODEOWNERS 和分支保护,让 auth、计费、CI 和发布 workflow、安装器始终需要人。
永远不要让 bot 的批准替代必需的人类批准;有新 commit 时撤销批准。
合并与之后
使用合并队列、feature flag、先内部使用、分阶段发布和一步回滚。
把事故和回滚变成 eval 集,并在评审器的 prompt、工具或模型变化时重新打分。
衡量人的时间,以回滚率和事故率作为护栏。
Code Review's announcement said approving a pull request is still a human call; the product posts findings, not approvals. Our own repos go further, letting owners decide which low-risk changes merge on automated checks alone, and that line keeps moving.
When a review misses something, we ask what the model didn't have in front of it and put the fix into a CLAUDE.md, a skill or a new check. The goal hasn't changed: less human time per change, and no more reverts than before.
If your team lets agents open pull requests, we'd like to hear which checks you've automated, which still need a person, and what you think we have wrong.
With thanks to Emma Webb, Michael Segner and Amie Rotherham for their reviews.
Code Review 的公告说,批准 pull request 仍然是人的决定;产品发布的是发现,不是批准。我们自己的仓库走得更远,让 owner 决定哪些低风险变更可以仅凭自动检查合并,而这条线还在移动。
当评审漏掉什么时,我们会问模型当时眼前缺了什么,并把修复放进 CLAUDE.md、skill 或一项新检查。目标没有变:每个变更花更少人的时间,回滚不比以前多。
如果你的团队让 agent 开 pull request,我们想听听你们自动化了哪些检查、哪些仍然需要人,以及你觉得我们哪里做错了。
感谢 Emma Webb、Michael Segner 和 Amie Rotherham 审阅本文。