推荐微信扫码登录以获得更好的体验!另:🎉建议更新到最新版,以体验新功能!🎉 版本更新记录→

MattPocock | 解决 PR 瓶颈:用 AI 智能体

字幕摘录

时间英文中文
0:02I'm here to talk about fixing the PR bottleneck, and this is kind of a grand title for trying to我是来讨论修补公关瓶颈的 这是种伟大的头衔 试图
0:10fix the thing that most organizations struggle with, I think, and have kind of historically我认为,要解决大多数组织斗争的问题,而且有某种历史意义。
0:14struggled with before AI, you know.在人工智能之前挣扎过
0:17We have always had huge numbers of PRs just laying around that我们总是有大量的公关 仅停留在周围
0:20no one's bothered to review, and this has now increased massively because of the new strains没有人会考虑的, 而现在,由于新的压力,这已经大大增加
0:25on us because of AI imposing all these weird constraints.因为大赦国际施加了这些奇怪的限制
0:29And to do this, I'm going to use为了做到这一点,我要使用
0:31the rubric of My Skills, which you've kind of heard about, maybe you've used them, and I have a你听说过的 "我的技巧"的题材 或许你用过了 我有一个
0:36couple of new skills to announce that are going to hopefully improve the way that you do PRs,两种新技能宣布 希望能改善你做公关的方式
0:41improve the way that, or improve the speed at which you can review them and do them.改进方法,或者提高你审查它们的速度。
展开字幕全文(469 条)
序号英文中文
1I'm here to talk about fixing the PR bottleneck, and this is kind of a grand title for trying to我是来讨论修补公关瓶颈的 这是种伟大的头衔 试图
2fix the thing that most organizations struggle with, I think, and have kind of historically我认为,要解决大多数组织斗争的问题,而且有某种历史意义。
3struggled with before AI, you know.在人工智能之前挣扎过
4We have always had huge numbers of PRs just laying around that我们总是有大量的公关 仅停留在周围
5no one's bothered to review, and this has now increased massively because of the new strains没有人会考虑的, 而现在,由于新的压力,这已经大大增加
6on us because of AI imposing all these weird constraints.因为大赦国际施加了这些奇怪的限制
7And to do this, I'm going to use为了做到这一点,我要使用
8the rubric of My Skills, which you've kind of heard about, maybe you've used them, and I have a你听说过的 "我的技巧"的题材 或许你用过了 我有一个
9couple of new skills to announce that are going to hopefully improve the way that you do PRs,两种新技能宣布 希望能改善你做公关的方式
10improve the way that, or improve the speed at which you can review them and do them.改进方法,或者提高你审查它们的速度。
11Speed速.
12Now, we're being pushed to do more with less, essentially, or more PRs, more work, more stuff,现在,我们被迫做更多的 用更少,本质上,或更多的公关, 更多的工作,更多的东西,
13and this is kind of the central promise of AI, that we're going to be able to use these agents这是AI的核心承诺 我们就能使用这些特工
14to scale ourselves up to do more work, and this has resulted in the Software Factory,扩大我们自己 做更多的工作, 这导致了软件厂,
15probably the biggest buzzword of the day.可能是今天最流行的词
16Everyone's talking about Software Factory that I've大家都在说我的软件厂
17chatted to, and I think of a Software Factory as primarily something where instead of the human聊天,我认为一个软件厂 主要是一些 在那里而不是人类
18initiating all of this work, we're going to pass some of that initiation, some of the initiation发起所有这些工作, 我们将通过一些启动, 一些启动
19is going to be done by agents, and I think of there, maybe from there, you have a classifier我想也许从那里你有个分类员
20like Jev come in and say, okay, let's turn that into a fix, or turn that into a reproduction,像Jev进来说,好吧,让我们把它变成一个固定, 或者把它变成一个复制,
21or maybe I ping people straight away, and maybe you have other things, maybe you have planet scale或者我马上打人 或许你还有别的事情
22hooked up, so it gives you query reports on the slow queries on your database, maybe that then连接,所以它给你查询报告 在您的数据库中的慢查询, 也许那时
23triggers a different thing of your Software Factory.触发了你的软件厂的异端。
24All of this is not humans triggering it,所有这一切都不是人类触发它,
25it's deterministic code triggering it, right, and so these accelerate your Software Factory,这是决定性的代码触发它,对, 所以这些加速你的软件厂,
26they push more code through it, but then you need breaks, right?他们推更多的代码通过它, 但你需要休息,对不对?
27If you just have permanent如果你只拥有永久
28acceleration pushing stuff through your factory, you're going to end up with a slop cannon, right?加速推进的东西通过你的工厂, 你会有一个斜谷炮,对不对?
29You're just going to end up with a ton of slop crappy PRs that you're not going to be able to你只会有一堆烂公关 你无法做到
30touch or review or even freaking look at, so you need breaks.触摸或检讨 甚至吓坏了的看, 所以你需要休息。
31These are mechanisms that slow down,这些是减速的机制,
32that increase quality, that make sure that your code base doesn't turn into a software提高质量,确保你的代码基础不会变成软件
33entropy nightmare, because code is the environment your agent operates in, and if you have bad code因为代码是您的代理操作环境 如果你有坏代码
34in your code base, that is going to beget more bad code, and so I'm going to talk about these three在你的代码库里,那会得到更多的坏代码, 所以我要谈谈这三个
35breaks in this talk, and talk about how we can use them to counterintuitively go faster.说说我们如何用它们来反射 更快地前进
36So, automated checks.所以,自动检查。
37These are the deterministic checks in your repo that we've had for这些是你们重案组的确定性检查
38thousands of years, or, you know, since the 50s.几千年,或者,你知道,50年代以后。
39Deterministic checks where we have linting and决定性检查,我们在哪里 内衣和
40tests and type checking and code quality metrics, all of these things going together, and they all测试和类型检查 密码质量度量, 所有这些事情一起进行, 他们都
41work the same every time.每次都一样
42Layered on top of that, we have automated review, so we have agents who此外,我们还有自动审查,所以我们有特工
43look at our code and say, okay, you know, these are for the things that the tests didn't catch,看看我们的代码,然后说,好吧,你知道, 这些是为了测试没有赶上的东西,
44or this is looking at the structure of the code base in general, and then on top of that, the或这是从总体上看代码基础的结构, 然后在其中,
45third layer, the final layer is human review, so people looking at the PR, and these three layers第三层,最后一层是人类审查, 所以人们看公关, 而这三层
46form this kind of cake that we end up with when we get to human review, and so more speed, of course,组成这种蛋糕,当我们到达人类审查, 如此快,当然,
47means more PRs, and so the goal here is to make human review faster by leaning on those first意味着更多的公关,所以这里的目标是 通过靠着那些先让人类的审查更快
48two phases, and we've got to stop the slop.分两个阶段,我们得阻止它。
49That's the first principle here, which is if you raise这是第一条原则 如果你提出
50the quality of the code that you're shipping, you're going to end up doing less human review你运输的代码的质量, 你最后会做更少的人文审查
51because it's just going to be better work, and so you're going to end up needing to make fewer因为它只是会是更好的工作, 所以你最终会需要 减少
52interventions.干预。
53Automated checks.自动检查。
54Now, automated checks are cheap.现在,自动检查是便宜的。
55That's the cool thing about这才是最酷的
56them is that they don't cost tokens like automated review does.他们不会像自动检阅那样花费代币
57They don't cost human effort.他们不花费人类的努力。
58They他们
59just cost CPU cycles, so these are, for instance, you know, you run your tests on every code change.只是花费了CPU周期, 所以这些,例如,你知道, 你运行你的测试 每一次代码更改。
60Maybe those tests do incur some tokens because, let's say, an agent creates a bug and the tests也许这些测试确实会产生一些征兆 因为,比如说,一个代理制造一个错误和测试
61catch it, then you need to spend some tokens to go and fix it, but those are tokens pretty well抓住它,然后你需要花费一些符号 去修复它,但这些是标志 相当不错
62spent, in my opinion.花了,在我看来。
63So, checks are cheap.所以,支票是廉价的。
64That means you can layer on loads and loads and loads也就是说,你可以堆积 负载和负载
65of them on your repos, and you're probably not using enough of them or not being creative enough你可能用得不够,或者没有创造力
66with your use, but checks can lie.使用,但支票可以说谎。
67Does a green CI mean that the code is ready for merge?绿色CI是否意味着代码可以合并?
68No, it不,这是
69does not, and so we've always needed on top of these checks some extra layer to figure out if没有,所以我们一直需要 在这些检查之上 一些额外的层以确定是否
70there's anything catastrophically wrong with the code before we ship it, and so all of the other在我们发货前 密码有灾难性的毛病 所以其他的
71ways is the human review and automated review, these are lie detectors.这些是测谎仪
72These are for finding lies这些是用来寻找谎言的
73in the automated checks.在自动检查。
74Now, I want to show you some of these lies, first of all, because this现在,我想告诉你一些这些谎言, 首先,因为这个
75helps when we're thinking about code and thinking about automated checks to see how bad it is and帮助我们思考代码和思考 自动检查,看看它有多糟糕和
76how bad things can get.事情会有多糟糕
77The first is tautological tests, a test that just reasserts the implementation.第一项是同义测试,这项测试只是重申执行。
78Opus 5 got addicted to these.Opus 5 迷上了这些。
79I don't quite understand why.我不太明白为什么
80It would have, for instance,譬如说,
81x post character limit equals 280.x 职位字符限制为 280。
82Can anyone guess the test that was written to test this behaviour?有人能猜到 用来测试这种行为的测试吗?
83You've probably seen this a thousand times.你可能已经看过上千次了
84This is real code from agents or from stuff that I found这是特工或我发现的东西的真实密码
85my agents doing.我的探员在做
86It said expect x post character limit to be 280.它说,预计x职位字符限制为280个。
87So the implementation looked like因此,执行看起来像
88that, and the test essentially reasserted the implementation.并且考验基本上重申了执行工作。
89That is a tautological test.这是一个同义测试。
90And tautological tests are bad because they're extremely structure sensitive.而同声测试也因为结构上极其敏感而不好.
91They're very他们非常
92sensitive to the actual internal workings of the system.对系统的实际内部运作十分敏感。
93So it means I cannot change that constant也就是说我不能改变这个常数
94without a test failing, but I cannot rename that constant without a test failing.测试没有失败, 但我不能重命名该常数 没有测试失败。
95But I have to但我必须
96do it so tied into the structure of my system.把它绑在我的系统中
97And I found another one which is even more egregious,我找到了另一个更惊人的
98I would say.我会说。
99This is incredible test.这是不可思议的考验。
100What it's doing here is it's essentially testing whether它在这里所做的是 它实质上是测试是否
101two things in the UI appear in the right order.在UI中,有两件事情以正确的顺序出现.
102So it's checking that the pitch detail page or所以它正在检查 投球细节页或
103rather the video section comes after the content plan.视频部分是在内容计划之后
104What it does is it doesn't render it to a它所做的是 它不使它成为一个
105screen.屏幕。
106It just reads the actual file, the module, into its own memory, and then it finds the right它只是把实际文件,模块, 读到自己的记忆, 然后它找到正确的
107image, and then it expects the videos to be after it in the source material.图像,然后它期望视频在源材料中会追随它.
108Which is crazy这太疯狂了
109if you think about it, because I can just change the way the source material looks and this test如果你考虑一下 因为我可以改变源材料的外观和测试
110will fail.将失败。
111It's too sensitive to the structure of my code base.对我的密码基础结构太敏感了
112So that's another way that automated所以这是另一种自动化方式
113checks can fail.检查可能失败。
114And there are also, or sorry, automated checks can lie.还有,或者抱歉, 自动检查可以说谎。
115There are also tests还有测试
116that literally cannot fail.这绝对不能失败。
117And this will feel familiar to you if you've abused mocking in the这对你来说很熟悉 如果你虐待嘲笑
118use audio boost function.使用音频助推功能。
119And this use audio boost function, its internals use the audio context API使用音频助推功能,其内部使用音频上下文 API
120在DOM中。
121Don't worry if you don't know any of this.别担心,如果你不知道这些。
122But what we're doing here is we're just但我们在这里所做的是
123stubbing it out with some fake methods.用一些假方法把它挖出来
124And it turns out the audio context has some complicated原来音频上下文有点复杂
125error modes, and it will fail if you use it under strange conditions.错误模式,如果在奇异条件下使用,则会失败。
126And so just doing this means所以,只要这样做就意味着
127our tests cannot fail using those modes, and we're going to hit strange errors in production我们的测试不能失败 使用这些模式, 我们将击中奇怪的错误生产
128that our tests can't fix.我们的测试无法修复。
129And so the question is then, if you can cheat on automated checks,所以问题是 如果你能通过自动检查作弊
130if, you know, and even in good faith ways as well, the AI isn't trying to write bad tests here.如果,你知道,甚至诚信的方式, AI不是试图在这里写不好的测试。
131It's just taking our instructions and writing tests that are too tied into the structure instead它只是接受我们的指示 和写作测试 太多绑在结构中
132of actually executing code.实际执行代码。
133So how do we make automated checks harder to cheat?那么我们如何使自动检查更难欺骗?
134If we can do如果可以的话
135that, then we can increase the quality of those checks, which means which increases our quality这样我们就能提高检查的质量,这意味着提高我们的质量
136bar.栏。
137And the first thing I really like about this is code-based design.我最喜欢的是密码设计。
138So you can actually这样你就可以
139design your way out of these bad checks.设计你的出路 这些糟糕的支票。
140So what does good code-based design look like?那么,什么是良好的基于代码的设计看起来像什么?
141I've talked about this before in previous AI engineering talks I've given, which are deep我在之前的人工智能工程演讲中 已经说过了,很深
142modules.模块。
143These are modules that hide complex behavior behind simple interfaces.这些模块将复杂的行为隐藏在简单的界面之后.
144This is a这个是
145John Osterhout idea from the philosophy of software design.约翰·奥斯特豪特(John Osterhout)从软件设计哲学出发的想法.
146If we look at these two modules,如果我们看这两个模块,
147we've got A, which has a large implementation hiding behind a tiny little interface at the top.我们得到了A, 它有一个很大的执行 隐藏在一个小界面后面 在顶端。
148Okay?好吗?
149And then B is a large interface, lots of functions you can call, and those functions然后B是一个大的界面, 你可以调用很多功能, 和这些功能
150individually don't do very much.个人做不太多。
151Does that make sense?这有道理吗?
152Yeah?是吗?
153Now, if you have a deep module like现在,如果你有一个深 模块像
154A here, you're going to have fewer structure-sensitive tests because you're hiding more在这里,你会得到更少的结构敏感测试 因为你隐藏更多
155of the implementation behind that interface.该接口背后的执行。
156If it's just testing at that interface, you're如果只是测试一下界面,你就
157going to get better tests.会得到更好的测试。
158So your job here is to force the agent to use that little interface所以,你在这里的工作是强迫代理 使用这个小接口
159instead of reaching into the implementation to test these weird implementation details.而不是深入执行,测试这些奇怪的执行细节。
160So I've got a skill for this.所以我有这个技巧。
161You can have, like, the weirdest vibe-coded code base, the你可以有一样, 最怪异的氛围编码 代码基础,
162crappiest code base that you've ever set your eyes on, and you can run this skill on it and你见过最烂的代码基础, 你可以运行这个技能在它上,
163it will make it better.它会使它更好。
164What this does is essentially gives you opportunities for deepening这基本上让你有机会深化
165modules.模块。
166And it kind of looks like this.看起来像这样
167Raise your hands if you've used this skill, by the way.顺便说一句,如果你用过这种技巧的话,举起手来
168Not sure how many of my folks are in this room.不知有多少家人在这间屋子里
169Yeah, okay.是啊,没关系。
170It's really freaking nice.真他妈的不错
171Essentially,其实,
172gives you a HTML document, and I'll get out of the way here, of all of the different potential给您一个HTML文档, 我会离开这里,所有不同的潜力
173opportunities it sees.机会
174So we can see here we have a before and we have an after where we're sort of所以,我们可以看到,我们有一个前,我们有一个后
175like reducing duplication.像减少重复。
176We're creating a nice deep testable module.我们正在制造一个很好的深层测试模块。
177And then you can go ahead然后你可以继续
178and implement that.并落实这一点。
179And attached to this, there's also this kind of language that I've put together并附着于此, 也有这种语言,我已经拼凑在一起
180for describing modules.用于描述模块。
181Because, like, if you ever try and read up about how to structure a code base,因为,就像,如果你曾经尝试 和阅读如何构建一个代码基础,
182you're going to find 20 different approaches and they're all going to be called DDD.你会找到20种不同的方法,它们都会被称为DDD.
183And,还有,
184like, what you need is a consistent language that you can use in your team to talk about this stuff.比如,你需要的是一个一致的语言 你可以使用在你的团队 谈论这些东西。
185And so I have a little code-based design skill that defines what locality is, defines what所以我有一点基于代码的设计技巧 来定义地点,定义什么
186leverage is, defines what a seam is.杠杆是,定义什么是接缝。
187I was using seams before they were called.在他们被叫来之前我一直在用缝合器
188And what locality和哪个地方
189means is kind of how well located together all of the code is.意思是所有代码都定位得很好
190How can you change like a small你怎么会变小?
191change in one module and have it ripple out?在一个模块中更改,并有波折吗?
192And also leverage is what you get when you have a deep杠杆也是你深处得到的
193module.模块。
194Because the caller, the person who's actually calling that module, gets a lot of因为打电话的人 真正在呼叫那个模块的人 得到很多
195calling a simple function.调用一个简单的函数。
196Both of those are very good in code bases.两者都非常擅长代码基础.
197And good for agents, too,对特工也有好处
198it turns out.原来如此
199But I'm sort of describing all of these highfaluting coding standards.但我正在描述所有这些高脂编码标准。
200But how do但怎样
201we actually make sure the agent does them, right?我们真的要确保代理 做他们,对不对?
202How do you make sure the agent creates deep modules您如何确保代理创建深层模块
203and creates good tests and doesn't write these crap tautological ones or structure-sensitive tests?并创造良好的测试, 不写这些废话的同义测试 或者结构敏感测试?
204Well, I do think most people get this wrong.我觉得大多数人都搞错了
205And my first piece of advice is don't put coding我的第一点建议是 不要把编码
206standards in your implementer agent.执行者代理中的标准。
207Okay?好吗?
208Let me explain this.让我解释一下
209If you imagine the implementer如果你想象到执行者
210agent kind of looks like this, where this is all of the things the agent needs to be able to do in特工的外表是这样的 这正是特工需要做的
211its single context window.它的单个上下文窗口。
212It needs to be able to explore, like to look for the code that it's它需要能够探索, 像寻找它的代码
213using.使用 。
214And then it needs some budget for actually debugging the thing.然后它需要一些预算 实际调试的东西。
215So for running those所以,运行这些
216automated checks.自动检查。
217For actually checking and verifying that it works.为了核实和核实它是否有效
218Now, this is quite a现在,这是相当的
219lot of work, it turns out.工作很多,结果发现。
220And if you try to impose your coding standards on it as well,如果你试图将你的编码标准也强加于它,
221it's going to perform worse.情况会更糟
222So implementation is overloaded.因此,执行工作负担过重。
223That's the mental model I want you to这就是我要你做的心理模型
224have.有过
225And so can we find a way to impose those coding standards in a way that isn't so overloaded?我们能否找到一种方法 以不超载的方式 强制那些编码标准?
226Well, this is my effort.这是我的努力
227This is my code review skill.这是我的代码审查技巧
228And it receives a diff.而且它接收一个diff。
229And it reads a它读到一个
230file inside the repository called coding standards, which you can write, you can customize.在寄存器内的文件名为编码标准,您可以写,也可以自定义。
231And then it checks if the code follows those standards.然后它检查密码是否符合这些标准。
232And so if we look at the reviewer所以,如果我们看看评论员
233agent here, it also crucially runs it in a subagent.这里的特工 也非常需要用副特工操作
234So it's got its own context window所以它有自己的上下文窗口
235to kind of handle here.给这里的手柄
236It's got its own budget.它有自己的预算。
237This one, it needs to do some exploration, right?这个,它需要做一些探索,对不对?
238Because sure, it receives the diff.因为肯定,它接收diff。
239So it knows exactly where it's located, where the code is.所以它确切知道它的位置,代码的位置.
240But it should probably do a bit of exploration just so it has the wider context,但它也许应该做一点 探索 只是因为它有更广泛的背景,
241understands the code.理解密码。
242But it doesn't need to do any implementation, doesn't need to do any debugging.但是它不需要做任何执行,不需要做任何调试.
243So while implementation is overloaded, review is actually underloaded.因此,虽然执行工作负担过重,但实际上审查负担过重。
244So it doesn't have that所以它没有这个
245many jobs to do.还有很多工作要做。
246This means you can pile in a bunch of coding standards to it, and it will do a这意味着你可以堆成一堆 编码标准它会做一个
247much better job than if you try to do it with implement.比你努力执行好得多
248So I think of this, and this is所以我想,这是
249uncomfortable, right?不舒服,对不对?
250Because we all want to be able to just get good code out the first time.因为我们都希望 能够只是得到好的代码 第一次。
251But I think of this as the two-part process for writing good code, which is implement,但我认为这是两部分的过程 写好代码, 正在执行,
252you make it work.你让它工作。
253And then code review, you actually make it good.然后代码审查, 你实际上使它好。
254You impose your coding你强制你的编码
255standards.标准。
256And for the retro developers among us, this is essentially a red-green refactor approach.对于我们中间的复古开发者来说, 这基本上是一个红绿色的复古方法。
257We use one context window to make it okay, do the red-green, and then we do another context window我们用一个上下文窗口来让它好起来,做红绿,然后我们做另一个上下文窗口
258to refactor it.来重塑它。
259That's at least how it works in my head.至少我脑子里是这样想的
260And it's been very successful for me.这对我来说非常成功。
261This means that when you have coding standards, you don't put them in global scope.这意味着当你有编码标准的时候,你不会把它们放到全球范围.
262You don't你没有
263put them in agents.md.让他们加入特工
264Because then they sort of drown out your implementer.因为他们会淹死你的执行者
265It may read them,它可能读到它们,
266it may not.可能不会
267You put them in coding standards.md.你把它们放在编码标准上
268And that way, just the code review agent does it.这样,只有代码审查代理才做。
269Now, I've got another idea here, which is I've been talking to lots of people today,现在,我还有一个想法,那就是,我今天和很多人谈过了,
270lots of people saying, you know, I've been talking about review and automated review,很多人说,你知道, 我一直在谈论审查 和自动化审查,
271increasing, you know, fixing the PR bottleneck.增加,你知道, 修复公关瓶颈。
272So many folks say, oh, yeah, we just use a third这么多人说,哦,是的,我们只是用三分之一
273party service.派对服务。
274We use Cursor Bug Bot.我们使用光圈虫瓶。
275We use Code Rabbit or something like that.我们使用代码兔子之类的。
276I think that我觉得
277I've really tried to make a generic code review skill in the past that finds all the bugs and我过去真的尝试过 做一个通用代码审查技术 找到所有错误和
278does security review and that kind of thing.安全审查之类的
279It turns out it's really, really hard.事实证明它真的,真的很难。
280Because因为
281you either make it too general, and it just gives you false positives that aren't actually你要么把它太笼统, 它只是给你 假阳性,其实不是
282relevant to your use case, or you make it too specific.和你的用法有关, 或者你把它说得太具体了。
283你说,好吧,找到所有的TypeScript
284stuff, and then Rust people can't use it.东西,然后Rust的人不能使用它。
285So I would say don't outsource automated review.所以我说不要外包自动审查。
286Build your own.自己盖.
287Build up your own coding standards over time.逐步建立自己的编码标准.
288Share them across your team.在你们团队中分享
289And if you have an opportunity to impose coding standards, if you've got some docs sitting如果你有机会强制规定编码标准 如果你有医生在场
290around that no one reads, this is the place to put them in.没有人读过,这里是放它们的地方。
291And also, when you have this automated还有,当你有了这个自动
292reviewer, a really natural inclination for lots of people is to say, oh, yeah, my code review agent,评论员,对很多人来说 一个很自然的倾向是, 哦,是的,我的代码审查代理,
293what it does is it reads the code, and then it comments on the PR.它所做的是读代码,然后评论PR.
294So what your code review你的代码审查
295agent is doing in that case is it's providing more work for the human reviewer.代理正在做在这种情况下是 它为人类审查员提供了更多的工作。
296The human人类
297reviewer then has to read all of these verbose comments and figure out, okay, do we implement然后,审查者必须阅读所有这些动词评论 并找出,好吧,我们是否执行
298this?这个?
299Do we implement that?我们要执行吗?
300The reviewer should commit.复审人员应当承诺.
301It should make fixes.它应该做出修正。
302So it should所以应该
303actually change the things that it finds.实际改变它发现的东西。
304Because then when the human comes around,因为当人类出现时
305you're reviewing a really nice artifact.你正在审查一件非常好的艺术品
306If it finds anything that it has any questions over,如果发现有问题
307then, of course, it can comment.当然,它可以评论。
308But the default should be commits.但是,违约应当承担。
309Stop trying to one-shot good别再试一枪了
310code.代码。
311Stop trying to make the implementer agent the only thing that you do and go, okay, I'm going停止试图使执行者代理 你做的唯一,走,好吧,我走了
312to force it to be amazing.迫使它变得惊人。
313It takes a little bit of, you know, thinking your way out of there.它需要一点点,你知道, 想你的出路在那里。
314But不过
315once you realize it, it's fabulous.一旦你意识到它, 这是美妙的。
316So, okay.所以,还好。
317With all of that process, we've run our automated有了这些过程,我们自动运行
318checks.检查。
319We've now run our automated review to make sure the automated checks aren't lying.我们现在进行自动审查 以确保自动检查不是假的
320How do we then maximize the PR's quality in terms of human review?那么我们如何在人文审查方面最大限度地提高公关的质量?
321How do we get it, like,我们如何得到它,喜欢,
322working the best it can?尽力而为?
323So we need a human-friendly PR.所以我们需要一个人性友好的公关。
324And this is a new skill这是新技巧
325coming into the repo, which is currently in progress, but I'll be releasing it soon,进入重案组, 目前正在进行中, 但我会很快释放它,
326which is the PR skill.这是公关技术。
327This is one I've been mulling over for a long, long time,我很久以来一直在想这个
328haven't quite figured out what the state of the art is.还没有完全明白什么是 艺术状态。
329And I've realized the best way to我意识到最好的办法
330make a PR skill is just to steal all the best ideas that everyone's got.做一个公关技术只是 窃取所有最好的 想法,每个人都有。
331And it's very nice.且道甚处来.
332Now, what does a good PR body look like?现在,一个良好的公关身体是什么样子?
333How would you recreate this skill on your own?你怎么自己再创造这种技能?
334Well,那个
335the first principle is some reviews are more important than others.第一项原则是,有些审查比其他审查更重要。
336Not every review is并不是每个审查都是
337essential, right?关键,对不对?
338And once you understand this, you realize, okay, that means I can focus my energy一旦你明白这一点, 你意识到,好吧, 这意味着我可以集中我的能量
339on the really important reviews.关于真正重要的审查。
340But how do we categorize that?但我们怎么分类呢?
341Well, you've got to think about你该想想
342the PR as using this AWS terminology, which is, is it a one-way door or is it a two-way door?公关是使用这种AWS术语,也就是说,是单向门还是双向门?
343Now, most PRs that you have will be two-way doors.现在,你拥有的大多数公关将是双向的门。
344You can merge the PR and then always pull it你可以合并公关 然后总是拉它
345back later.回头再说
346It's the glorious benefit of being a software engineer as opposed to a civil engineer,作为软件工程师而不是土木工程师的光荣好处
347right?对吧?
348Mostly when you're a civil engineer, it's a one-way door, right?主要是当土木工程师的时候,是单向门,对吗?
349If you get something wrong,如果你搞错了
350that bridge is going down.桥要塌了
351But if you have a two-way door, it means that you can easily但如果你有一个双向门, 这意味着你可以轻松
352revert the change.退回更改。
353Now, that might be a bit more nuanced than you might expect.这也许比你想象的要细微些
354It might be that a这可能是一个
355very simple change accidentally blasts out an email to 60,000 people or something, in which case很简单的改变 意外地向六万人发邮件
356that is a one-way door.这是单向的门。
357You want to review that very, very carefully.你想非常非常仔细地审查一下
358It involves expensive费钱的
359migrations or data loss.迁移或数据损失。
360That is a one-way door.这是一个单向的门。
361Review the hell out of that PR.从公关里检查一下
362But also, tied还有,捆绑
363onto that, we need to understand the blast radius of this PR.我们需要了解这个公关的爆炸半径
364What can go wrong?怎么会出问题?
365And if things do如果事情发生
366wrong, how bad is it?错了,有多糟?
367And this means I end up with a nice little sort of summary right at the bottom这说明我最后在底部有个小的总结
368of all of my PRs, which is the merge danger.我所有的公关, 这就是合并的危险。
369I can see this one is a two-way door.可见此二门.
370Its blast它的爆炸声
371radius is localized.半径是局部的。
372And so I can see, fantastic, I don't need to pay that much attention to this.因此我可以看到,太棒了,我不需要 关注这个。
373I'm just going to sort of review it a little.我只是来看一下
374That's really important.这很重要
375Next, we need to understand接下来,我们需要了解
376what the PR is even doing, right?公关在干嘛?
377And I've tried lots of different ways of figuring this out.我尝试了很多不同的方法来找出来。
378And还有
379the best thing I've come up with is using pseudocode.最好的办法就是用假密码
380Now, a huge point of gratitude here to the现在,一个巨大的 感谢在这里,
381show me skill from the human layer skills repo by Dex Hawley.展示一下Dex Hawley从人类层面获得的技能
382This is a phenomenal skill that just这是一个惊人的技巧,只是
383essentially dispenses with most text and shows things to you in images and diagrams instead.主要是去除大多数文本,然后在图像和图表中向您显示。
384This makes it a lot easier to grasp actually what's changing and why it's changing.这使得人们更容易理解什么在变化,为什么在变化。
385So you get the kind of standard sort of set of like mermaid diagrams and UML for, you know,所以,你得到的标准类型 类像人鱼图 和UML的,你知道,
386this is a sort of sequence of things that happened.这是发生的一系列事情。
387You also just get these lovely simple ones like你也只是得到这些可爱的简单 喜欢
388this, for instance.比如说这个
389We can look at this and go, okay, we're working in a CLI.我们可以看看这个,然后走, 好吧,我们正在工作 在CLI。
390We can see a new我们可以看到新的
391command has been added.命令已被添加。
392And we've got two new things, little flags up the top here, just little上面有两面新旗子
393summaries like this.像这样的总结。
394It really does make a massive difference.这确实有很大的区别。
395It's hard to overstate.难为过分.
396So you're trying to, like, make understanding the why as fast as possible.所以,你试图一样, 使理解为什么 尽可能快。
397And I think a third我想还有第三个
398principle here is something you should be thinking about whenever you do human review.这里的原则是,每当你做人检讨时,你都应该考虑一些事情。
399Because we're因为我们是
400not doing, like, because our processes now are so sort of streamlined and all we're all collaborating不这样做,像,因为我们现在的程序 如此精简 和我们所有的合作
401around these same skill files, these same steering files.围绕这些相同的技能文件, 这些相同的方向文件。
402We're all building an environment for our我们都在为我们创造环境
403agents to operate in together.探员要一起行动
404You should think of the process that produces your code as just as你该想想产生代码的过程
405important as the code itself.代码本身很重要
406In other words, when you do a human review, you're not just reviewing换句话说,当你做人文审查时, 你不只是审查
407the code, you're reviewing the system that creates it.代码,你正在审查创建它的系统。
408And the theory here is that you never want to这里的理论是 你永远不想
409write the same comment twice, right?写同样的评论两次,对不对?
410You never want to catch the agent doing the same thing你从来就不想抓到做同样工作的探员
411over two PRs.超过两个公关。
412And so what's the mechanism by which you can make your human review matter?那么,你可以用什么机制 让你的人类审查重要?
413Well, this is a new skill.嗯,这是一个新的技能。
414This is called retro.这叫做复古。
415Retro for retrospective.反省回顾.
416You essentially take a你基本上拿一个
417session that you've done.你做错什么了
418It can either be like a single agent session or it can be a PR plus the可以是单一的代理会话 也可以是公关+
419session or you can just get it to look at, okay, look at all of the PRs that we've done over the或者你可以让它看看, 好吧,看看所有的公关 我们已经完成了
420last week, all of the reviews, pull them all in.上周,所有的评论, 把他们全部拉进来。
421Let's do a retrospective on them.我们来回顾一下
422And it will它会
423suggest automated checks and coding standards to make the next one better.建议自动检查和编码标准,使下一个标准更好。
424So this is the所以这是
425compounding effect where you essentially, by doing human review, you're making the quality of在你基本上通过做人文审查 使质量达到
426the next human review higher.下一次人类评论会更高
427And you're sort of saving less work from yourself next time.下次你还省了点工作
428And retro is a really smart skill.复古是一种非常聪明的技能。
429It adds a bunch of stuff.它增加了一堆东西。
430So obviously, it suggests automated很明显,它暗示自动化
431checks.检查。
432It suggests updates to coding standards.它建议更新编码标准。
433It does other smart stuff, too.它做其他聪明的东西,太。
434So it looks at所以它看着
435navigation pointers.导航指针。
436How easily did the agent find its information?探员有多容易找到信息?
437Can we provide a pointer我们能提供指针吗?
438inside agents.md to help it out next time?内线MD来帮助它下一次?
439It looks at tool economy.它看的是工具经济.
440Are there different tools有没有不同的工具
441that we're using in the session that can, you know, could be made more token efficient?我们在会话中使用的, 你知道,可以使 更象征性的效率?
442It's这是
443amazing how many things this catches, actually, because those are often really hard to debug from令人惊奇的是,实际上有多少事情, 因为那些往往是很难调试的
444the outside.外边
445It just looks at bloat as well.它也只是看血肿。
446So are there bloated steering files?那么有没有膨胀的引导文件?
447Are there bloated是否有胀
448skills that contribute to these bad results?导致这些不良结果的技巧?
449Can we make them more organized?我们能让他们更有条理吗?
450So that's the goal,这就是目的
451to make human review faster.让人类评论更快
452We do that by layering up automated checks.我们这样做是通过分层自动检查。
453We're layering up我们正在分层
454automated review.自动审查。
455And we make the human review as painless, as simple, and as kind of optional as我们让人类的检讨 变得无痛无痛 简单
456we need it to.我们需要它。
457You really don't need to review every single two-way door.你真的不需要审查每个双向门
458Every single one-way每个单向
459door you do.门你做。
460So these are my skills.这些是我的技能。
461Aihero.dev前锋刀术。
462I'm shipping version 1.3我在运输1.3版
463this week.这周
464It's been glorious hanging out with you.跟你在一起真是光荣
465It's been a really nice conference.这是一个非常好的会议。
466I'mи琌
467happy to have a chat.很高兴有聊天。
468Thank you so much for having me.谢谢你邀请我
469Thank you, Paris.谢谢你,巴黎。
该视频共有字幕 469 条。解锁更多字幕为会员功能,请移动到 价格