Fixing the PR Bottleneck — Matt Pocock, AIHero

Fixing the PR Bottleneck — Matt Pocock, AIHero

AI 让 PR 越写越快,真正的瓶颈却在审查环节

AI Engineer14 位订阅者

36 分钟阅读10 次阅读AI

【AI 工程实践】代理写 PR 不费吹灰之力,为什么值得审的 PR 依然稀缺? 本文整理自 Matt Pocock 在 AI Engineer Paris 2026 的演讲。AI 代理让提交 PR 变得轻而易举,却让本就存在的审查瓶颈更加严重。他认为代码库就是代理工作的环境,应像对待开发者体验一样认真打磨代理体验。为此他提出三层质量保障:确定性检查、代理自动审查和人工审查。他还讲到用深模块防止测试作弊、把编码规范交给独立的审查代理、按单向门与双向门区分审查力度、可视化 PR,以及用复盘持续改进生产代码的系统。 🎙️ 主讲人介绍 Matt Pocock:开发者教育者,TypeScript 与 AI 工程社区的知名人物,创建了 AI Hero 平台和 AI Coding for Real Engineers 课程。 核心议题:软件工厂与 PR 瓶颈、三层质量保障机制、深模块与可测试设计、实现与审查分离、单向门风险分级审查、复盘驱动的持续改进。 关键词:Pull Request、AI 代理、代码审查、深模块、代理体验、复盘

章节 1:软件工厂模式:AI 加速下的 PR 瓶颈

📝 本节摘要:

Matt Pocock 开场指出,PR 堆积无人审阅本是许多组织在 AI 出现前就有的老问题,如今 AI 带来的新压力让它急剧加剧。他将借助自己的 skills,并发布几个新 skill 来提升审阅和处理 PR 的速度。他把软件工厂定义为由智能体和确定性代码(而非人)来发起部分工作,例如由分类器生成修复或复现、由 PlanetScale 报告慢查询触发后续流程。这些机制会加速产出,但如果没有“刹车”,工厂就会变成“垃圾炮”,制造出大量无法审阅的劣质 PR。

[原文] [Matt Pocock]: All right. I'm here to talk about fixing the PR bottleneck, and this is kind of a grand title for trying to fix the thing that most organizations struggle with, I think, and have kind of historically struggled with before AI. You know, we have always had huge numbers of PRs just laying around that no one's bothered to review, and this has now increased massively because of the new strains on us, because of AI imposing all these weird constraints. And to do this, I'm going to use the rubric of my skills, which you've kind of heard about, maybe you've used them. And I have a couple of new skills to announce that are going to hopefully improve the way that you do PRs, improve the way that's... or improve the speed at which you can review them and do them.

[译文] [Matt Pocock]: 好的。我今天要讲的是如何解决 PR 瓶颈。这个标题有点大,说白了就是想解决一个我认为大多数组织都头疼的问题,而且早在 AI 出现之前就一直头疼。你懂的,我们一直都有大量 PR 就那么搁着,没人愿意去审。而现在,AI 给我们带来了新的压力,强加了各种奇怪的约束,这个问题一下子严重了很多。为此,我会以我的那套 skills 为框架来讲,大家可能听说过,也许还用过。我还要发布几个新的 skill,希望能改进你们处理 PR 的方式,或者说,提升你们审阅和处理 PR 的速度。

[原文] [Matt Pocock]: Speed. Now, we've been pushed to do more with less, essentially, or more PRs, more work, more stuff. And this is kind of the central promise of AI, that we're going to be able to use these agents to scale ourselves up to do more work. And this has resulted in the software factory, probably the biggest buzzword of the day. Everyone's talking about the software factory that I have a chance to. And I think of a software factory as primarily something where, instead of the human initiating all of this work, we're going to pass some of that initiation, some of the initiation is going to be done by agents. And I think of that... Maybe from there you have a classifier like Jeff come in and say, "Okay, let's turn that into a fix or turn that into a reproduction." Or maybe it pings people straight away. And maybe you have other

[译文] [Matt Pocock]: 速度。现在我们被要求事半功倍,或者说要提更多 PR、干更多活、做更多事。这基本上就是 AI 的核心承诺:我们可以用这些智能体来放大自己,完成更多工作。由此诞生了“软件工厂”,这大概是当下最火的流行词,我接触到的每个人都在聊软件工厂。在我看来,软件工厂的核心在于:不再由人来发起所有工作,而是把一部分发起工作交出去,交给智能体来完成。我是这么理解的……也许接下来会有一个像 Jeff 那样的分类器介入,说:“好,我们把它变成一个修复,或者变成一个复现。”又或者它直接去通知相关的人。也许你还会有别的

[原文] [Matt Pocock]: things. Maybe you have PlanetScale hooked up, so it gives you query reports on the slow queries on your database. Maybe that then triggers a different thing in your software factory. All of this is not humans triggering it, it's deterministic code triggering it, right? And so these accelerate your software factory. They push more code through it. But then you need brakes, right? If you just have permanent acceleration pushing stuff through your factory, you're going to end up with a slop cannon, right? You're just going to end up with a ton of sloppy, crappy PRs that you're not going to be able to touch or review, or even freaking look at.

[译文] [Matt Pocock]: 东西。比如你接入了 PlanetScale,它会给你出数据库慢查询的报告,然后这又会触发你软件工厂里的另一个流程。这些都不是人触发的,而是确定性的代码触发的,对吧?所以它们会给你的软件工厂加速,推着更多代码流过它。但这时你就需要刹车了,对吧?如果只是一味地加速,不停地往工厂里塞东西,最后你就会造出一门“垃圾炮”,对吧?你会得到一大堆粗制滥造的烂 PR,根本没法碰、没法审,甚至连看都懒得看。

  1. 章节 2:为代码质量踩下「刹车」:三层质量保障机制
  2. 章节 3:识别糟糕的测试模式:重述实现与结构敏感测试
  3. 章节 4:用深模块的代码库设计,让自动化检查更难作弊
  4. 章节 5:解耦实现:别把编码规范塞给实现代理
  5. 章节 6:定制代码审查流程:先实现,再审查
  6. 章节 7:优化人工审查:单向门、影响范围与伪代码
  7. 章节 8:可视化 PR,并通过复盘改进代码生产系统
  8. 章节 9:持续改进循环:用复盘让每次人工评审更轻松

正在加载后续章节…