00:00 需求与工具选择
原有缩略图流程需要在画图工具中截图,再粘贴到人像旁边;位置不合适时还要重新截图,缺乏编辑灵活性。目标是在缩略图画面中直接编辑图形,同时保留人像。由于预计改动较大,Matt 选择 Grill with Docs 与 Claude Code 探索需求,而不是直接让代理一次性实现;如果规模进一步扩大,还可以转入多会话工作流。
Matt Pocock · 69:30
You've been asking again and again and again for me to show you what my development process looks like. I've done a tiny little bit of it on this channel, but not nearly enough. And since I did it, I've come into possession of one of the most starred repos in the world, which is my skills repo, and certainly the most starred skills repo in the world. And so I do think I owe it to you to show off how I use these skills in something more than a tutorial, in a real walkthrough. And in this walkthrough, we're going to focus especially hard on two skills. The first one is going to be the grill with doc skill. And I think grilling is really much more of an art form than most people assume. In this walkthrough, I really focus a lot more on the domain modeling aspects of it. In other words, the kind of classic DDD skills that allow you to basically say, okay, I've figured out the language of my application. And so once I've figured out the language, then I've actually figured out the app and figured out what I want to build. In this video, you see me go through that process on a real feature that I will use from now on, even to build the thumbnail for this video. And the next skill I go deep on is the retro skill. which is we look back on the huge chunk of sessions. i think we do like 30 sessions in this video, and we suggest a bunch of improvements. i'm going to walk through a real huge, i think, 25,000 line pr. i'm going to do some real human review on it and show you how that human review can then go back and influence and impact the system going forward. now, if you're interested in this stuff, then the ai coding crash course that i have is absolutely the place that you need to be if you want a more structured approach. but with that, Let's get cracking. Let's dive in. So this is where all of my courses get created, all of my videos get created. It's a video editor, a thumbnail editor, a AI writer. It helps me schedule things. It creates shorts. It does all sorts of stuff. And the bit that I'm particularly interested in right now is this little thumbnail creator down here. This is where I can post the video that I'm creating and editing right now, and I can create a new thumbnail. And this is essentially a process where I capture my face, and then my face goes into the thumbnail, and I can create a diagram with it. For instance, I just stopped recording so that I could take this still. This allows me to move this left and right. And then in here in my diagram creator, I can essentially screenshot this part of the window here, and. and what that will do is i can then copy and paste it into the thumbnail. so if i press control v here, you can see it gets pasted in. and then the cutout automatically gets cut out by this nice api. i can position these and i have my thumbnail. now this is pretty nice, but what i would really like to do is remove a bit of friction here. it's annoying having to swap over to the diagram view and like have my, you know, it's like an annoyingly manual process. Especially if I get things wrong, I can't quite position them correctly, I have to go back, I have to screenshot it again and try it again. Essentially, I don't have enough flexibility here. What I really want is to be able to draw on this surface here, in other words, have the diagram kind of integrated with the picture of me there. I really don't have a clue on how I'm going to build this. I just know that it's something I want. And so I thought it would make a good candidate for like a new feature or an improvement and to sort of show you the whole process end to end. And so when I enter into a new piece of work, I start thinking through this decision tree, which is essentially what skill from my skills am I going to use? In other words, you have essentially a new session here. You want to create a new piece of work. You don't know what to choose. You first think through, okay, what is the thing I'm trying to create? And the thing I'm trying to create is essentially a diff, the diff between the old code base and the new code base. and if that diff is really small, then you can probably just one shot the thing. so you don't need to worry about grilling before you continue. but in this case, i know that the thing we're creating is pretty big. and so i'm going to go with grill with docs. from there, if it ends up being a lot larger than i thought, that can always bail out into wayfinder, which is what i use for turning initial grilling sessions, running them over multiple sessions. Developing this huge, great, big concept of what we're trying to build and then going until we get there. But I prefer starting with Grill with Docs because if it ends up being smaller than I thought, then it means I don't have all the overhead of running a Wayfinder session. The place I'm going to run this is inside my personal wiki, which is a home repo. If you don't know what a home repo is, then check out my accompanying video on that. The agent I'm going to use is Claude Code because that's the one I have a subscription to, that's what I'm set up for, and that's kind of what I like. I am on the Claude Ultra plan, I have Opus 5.5, and I'm running it on medium effort. And of course, I have all of my skills installed, and I also have a bunch of custom skills that are inside my home repo. My home repo is not open source, but most of the skills you're going to see are open source. and there are aihero. dev forward slash skills. so we're going to start with grill with docs here, and then i'm going to explain my problem through dictation. and i'm using whisper flow for that. in the course video manager, we have a thumbnail viewer, and the thumbnail creator is okay. i like that it asks me and it sort of forces me to put my face onto the screen. but what i don't like is the sort of rigmarole i have to go through for attaching a diagram. most of my diagrams are built in tl draw and using the custom diagram playground that we have. but i don't have, what i would really like is for the diagram to be able to be editable in the scene that i'm viewing. so in the context of the thumbnail. in other words, i want my face visible and then to have the thing just editable next to me. i really don't know ui-wise how we're going to handle that and what that's going to look like. so i think there are a lot of questions to answer there.
你们一再要求我向你们展示我的开发流程是什么样的。 我之前在这个频道稍微展示过一点,但远远不够。 而在那之后,我拥有了世界上获得星标最多的代码仓库之一,也就是我的 skills 仓库,它肯定也是世界上星标最多的 skills 仓库。 所以我觉得,我确实有义务向你们展示,我是如何在教程之外的真实实战演练中使用这些技能的。 在这次演练中,我们会特别重点关注两项技能。 第一项是 grill with doc 技能。 我认为,深入追问实际上比大多数人想象的更像是一门艺术。 在这次演练中,我会更着重关注它在领域建模方面的应用。 换句话说,就是那些经典的 DDD 技能,让你能够说:好,我已经弄清楚了我的应用所使用的语言。 而一旦弄清楚了这套语言,我实际上也就弄清楚了这个应用,以及我想要构建的东西。 在这个视频中,你会看到我针对一个真实功能完成这个过程。今后我会一直使用这个功能,甚至会用它来制作本视频的缩略图。 接下来我要深入讲解的技能是 retro 技能。 也就是回顾大量的会话。 我想我们在这个视频里大概会处理 30 个会话,然后提出一系列改进建议。 我会带大家看一个真正庞大的 PR,我记得有 25,000 行。 我会对它进行真正的人工审查,并向你们展示人工审查的结果如何反馈回系统,影响系统今后的发展。 如果你对这些内容感兴趣,想要更系统地学习,那么我的 AI 编程速成课程绝对是你的不二之选。 好了,那我们就开始吧。 我们直接进入正题。 这里就是我制作所有课程和视频的地方。 它是一个视频编辑器、缩略图编辑器,还是一个 AI 写作工具。 它能帮我安排日程。 它还能制作短视频。 它能做各种各样的事情。 而我现在特别感兴趣的是下面这个小小的缩略图制作工具。 我可以在这里发布我正在制作和编辑的视频,还可以创建一张新的缩略图。 这个过程基本上是先拍下我的脸,然后把我的脸放进缩略图,再配上一个图示。 比如说,我刚才停止了录制,以便截取这张静帧。 这样我就可以左右移动它。 然后在我的图示制作工具里,我可以截取窗口的这一部分,然后…… 这样我就可以把它复制粘贴到缩略图里。 如果我在这里按下 Ctrl+V,就能看到它被粘贴进来了。 然后这个好用的 API 会自动把图像抠出来。 我可以调整它们的位置,这样缩略图就做好了。 这已经挺不错了,但我真正想做的是减少这里的一些繁琐步骤。 每次都要切换到图示视图,还要弄我的……你知道的,这个手动操作过程挺烦人的。 尤其是当我弄错了,没法把它们放到正确的位置时,我就得返回去,重新截图,再试一次。 说到底,这里的灵活性不够。 我真正想要的是能够直接在这个画面上绘制,换句话说,就是让图示和我在这里的照片融为一体。 我真的完全不知道该怎么实现这个功能。 我只知道这是我想要的东西。 所以我觉得它很适合作为一个新功能或改进的案例,来向你展示从头到尾的整个过程。 所以,当我开始一项新工作时,我会先思考这个决策树,核心问题是:我要使用我掌握的哪项技能? 换句话说,你现在基本上是在开始一个新的会话。 你想开展一项新工作。 但你不知道该选择什么。 你首先会思考:好,我要创建的东西是什么? 而我要创建的东西本质上是一个 diff,也就是旧代码库和新代码库之间的差异。 如果这个 diff 非常小,那你可能一次就能搞定。 所以在继续之前,你不必担心进行深入追问。 但在这个例子中,我知道我们要创建的东西规模相当大。 所以我会选择 Grill with Docs。 接下来,如果它最终比我想象的大得多,随时可以转而使用 Wayfinder。我用它把最初的深入追问延续到多个会话中。 逐步构思出我们要构建的庞大完整的概念,然后不断推进,直到实现它。 但我更喜欢从 Grill with Docs 开始,因为如果最终规模比我想象的小,我就不必承担运行 Wayfinder 会话的额外开销。 我要在自己的个人维基中运行它,那是一个 home repo。 如果你不知道 home repo 是什么,可以看看我关于这个主题的配套视频。 我要使用的代理是 Claude Code,因为我订阅了它,也已经配置好了,而且我挺喜欢它。 我使用的是 Claude Ultra 套餐,拥有 Opus 5.5,并将运行力度设为中等。 当然,我已经安装了所有技能,我的 home repo 里还有一堆自定义技能。 我的 home 仓库不是开源的,但你将看到的大多数技能都是开源的。 它们在 aihero. dev/skills 上。 所以我们先从这里的 grill-with-docs 开始,然后我会通过口述来解释我的问题。 我用的是 Whisper Flow。 在课程视频管理器中,我们有一个缩略图查看器,缩略图创建工具还算可以。 我喜欢它会提示我,某种程度上强迫我把自己的脸放到屏幕上。 但我不喜欢为了添加一张图表而必须经历的繁琐流程。 我的大多数图表都是用 tldraw 和我们自己的自定义图表演练场制作的。 但我现在做不到的是,我真正希望能够在我正在查看的场景中编辑图表。 也就是在缩略图的场景中。 换句话说,我希望能看到我的脸,而旁边的图表可以直接编辑。 我真的不知道在用户界面上该怎么处理,也不知道它最终会是什么样子。 所以我觉得这里有很多问题需要解答。
i want you to notice a couple of things about how i'm prompting there. the first thing is i'm thinking a lot about the why. i'm thinking a lot about the problem that i'm trying to get the agent to solve. i'm not necessarily giving it a decent sort of idea of what exactly to do. if i give it the why, then the agent feels a lot more empowered to go away and actually produce a solution itself or maybe have a discussion about the solution. Whereas if you come to it with a what saying I want to do X, Y, Z, then it will often not necessarily come up with that creative an answer. And so we can see here it's come back with a bunch of grilling questions here. It's asking first, what is the rigmarole? What is the part of attaching a diagram that hurts most? I would say that A, leaving the thumbnail creator is annoying, and B is also annoying, and C is also annoying. So I think you've put your finger on all three there, to be honest. Is the thumbnails diagram the same as the videos diagram? When you edit the diagram inside the thumbnail, should the changes go back to the diagram the video uses? This is kind of a question about where do we want this diagram stored, you know, like should it be inspired from existing diagrams? Because in the application, you can see if I do a search here, then I can actually search for existing diagrams. So I've found like this Wayfinder diagram. by just sort of like, oh, i've got to search, haven't i? so go to diagram, wayfinder, and then search all the diagrams that i've used. so this one, for instance, is good. this one's another one. so it's kind of asking, how do we like associate these thumbnail diagrams with this list? and i'm not quite sure there. with q2, i'm not sure. i'm kind of not sure of the trade-offs there, really. i suppose the question is, do i want the diagram to be. Sort of searchable inside the main list. Do I want it associated? I'm not quite sure what the use case is there. Q3 starting from scratch. Should you be able to draw a new diagram straight in the thumbnail without any existing diagram? Q3, yes, I agree. That sounds good. With Q3 too, I kind of maybe want to be able to search existing diagrams. I like the ability to add components that we've already got. Maybe searching for stuff that we've already got. Or maybe I could just copy stuff in from one TL drawboard to another. I want you to notice at this point how loose the language is that we're using to describe the feature. It doesn't feel like we are particularly sort of we haven't figured out the right names for things yet and so I'm having to use a lot of weird verbosity and shortcuts. It's not quite clear in my head still. As we go through this grilling process, the idea of what we're building is going to become clearer and clearer in my head until we end up with a nice set of words for the things we're building. And once we're there, we've kind of built the feature. So Q four says, should there be one editing mode or two? In the thumbnail, should there be a single edit the diagram mode and a separate arrange mode? For Q four, I think the process should probably be that we take a photo of my face first, then that face gets arranged onto the canvas. and then we, once my face is there, then we can sort of build the diagram around my face and i should have the option of retaking it. for q5, is the face fixed? for q5, i think i should have the option of moving the face horizontally. and from there, that would just give me a bit more flexibility. q6, is this only about diagrams? yeah, q6, let's make it diagram only for now. i can't think of a use case where i want to attach other stuff inside the thumbnail. We don't want to build a second Figma, we just want to make this particular flow easier. Okay, so while we were answering those questions, the agent was going off, spinning up a background agent and going to find the supporting information that we needed here. So it's actually going ahead and changing two of the questions here. And then Q seven says, should edit the diagram in place mean a live TL draw editor clipped to the thumbnail frame with the camera locked so the area you see is the thumbnail. For Q seven, I'm concerned that cramping us into that smaller space will mean that editing the thing, the thumbnail actually becomes kind of painful. And so I think we might need to prototype a few different approaches there. So that's a very detailed first response. Let's fire it off. Now you might be looking at this approach and you might be thinking, okay, what's like, what benefits this have over approaches that I'm taking over like plan mode, let's say. What this skill does and what this approach does is we align on the thing that we're building before we go ahead and build it. This means that we're going to get a much more predictable output. I'm going to have much stronger understanding over the thing that we're building. And like while it's building, I'm going to let it just sort of run by itself. but this is the moment early on when i get to maybe with my teammates align on what we're building, figure out what it actually is, what the words we're going to use about it. and then everything from that point all the way down to human review at the end is kind of going to be fairly on rails. so q2, it's reframing it. it's saying, is the thumbnails diagram a real diagram? and at this point, we should probably talk about what it actually means by a real diagram. this is inside the course video manager repo. And this is a glossary. md that is my pride and joy. When I talk about language inside a project, what I'm really talking about is the words that you're using to describe certain things. And in this pretty massive file here, which is about five hundred and sixty lines, we define all of the main concepts that sit inside this course, or sorry, that sit inside this repository that are responsible for this project. And the stuff that we're really talking about here is a diagram. And so there's a whole section on diagrams. So a diagram is really a group of diagram snapshots, which is a copy of the diagram's drawing at the moment that a clip is filmed. In other words, in my video editor. It's linked up to the diagram and so I can see what diagram I was using at each point in the video. There is the active diagram, so the diagram that the author is drawing on now. We have an action called restore to head when we load an older diagram snapshot back as the active diagram. There are preserved snapshots as well, which are diagram snapshots kept in its diagram's timeline even when no clip uses it. You can start to see that these definitions form a really nice picture of the feature. And what we're kind of doing here is we are trying to add to this, trying to figure out where our new feature lives in this existing landscape. So by asking what is a thumbnails diagram a real diagram, we're kind of asking, okay, it's a diagram, but maybe it's private to the thumbnail. For Q2, I think it makes sense to have our existing setup here. But what I'm concerned about is that the thing we're putting into the thumbnail is not really a diagram, it's just a single snapshot. In our model, a diagram is really a grouping of different snapshots of that diagram as they change through a clip, whereas this is more like a diagram snapshot. So now that probably sounds like garbage or jargon to you if you don't understand the language of the project, but I've been able to communicate something pretty rich that the model understands because the glossary. md is in its context. Q8 sounds good, all three of those sound really valuable. Q9, yes, um, the when we move the face, the diagram should just stay put. Q10, yes, when we retake, then we do the background removal and we replace the photo. Okay, it's now asking whether it should prototype a few different editing surfaces, and I love this. That's exactly what I wanted to do. The tricky thing about Q11 here is that it's really about a question about. How does it feel? How does it look? How does it feel to use? And I won't really know the trade-offs until I see the differences all laid out in front of me. In other words, until I have a go at it. And so I have a prototype skill that gives you multiple options that you can use to make these kinds of decisions. And that's what the agent is trying to do here.
我想让你注意一下我在那里编写提示词时的几个特点。 首先,我花了很多心思思考为什么。 我认真思考了我想让智能体解决的问题。 我并没有明确告诉它具体该怎么做。 如果我告诉它原因,智能体就会更有自主空间去独立提出解决方案,或者就解决方案展开讨论。 而如果你一开始就告诉它要做什么,说我想做 X、Y、Z,那么它给出的答案往往就不一定那么有创意。 所以我们可以看到,它返回了一连串刨根问底的问题。 它首先问,这一套繁琐流程是什么? 附加图表的哪个环节最让人头疼? 我会说,A,离开缩略图创建工具很烦人;B也很烦人;C也很烦人。 所以说实话,我觉得你把这三点都说中了。 缩略图里的图表和视频里的图表是同一个吗? 在缩略图中编辑图表时,改动是否应该同步回视频使用的图表? 这有点像是在问,我们希望把这个图表存在哪里,你知道,比如它是否应该以现有图表为基础? 因为在应用里,你可以看到,如果我在这里搜索,就能找到现有的图表。 所以我找到了这个Wayfinder图表。 就是这样,哦,我得先搜索,对吧? 所以进入图表,输入Wayfinder,然后搜索我用过的所有图表。 比如说,这个就不错。 这是另一个。 所以它其实是在问,我们要如何把这些缩略图中的图表和这个列表关联起来? 这一点我不太确定。 关于第二个问题,我不确定。 说实话,我不太确定这里的利弊取舍。 我想问题是,我是否希望这个图表能…… 在主列表中被搜索到。 我想把它关联起来吗? 我不太确定这里的使用场景是什么。 问题三:从零开始。 在没有现成图表的情况下,是否应该能够直接在缩略图里绘制新图表? 问题三,是的,我同意。 听起来不错。 关于问题三,我可能还想能够搜索现有的图表。 我喜欢能够添加已有组件的功能。 也许可以搜索我们已有的东西。 或者也许我可以直接把内容从一个 TL 画板复制到另一个画板。 我想让你注意一下,此时我们用来描述这个功能的语言有多不严谨。 感觉我们还没有真正想好该怎么给这些东西命名,所以我不得不用很多奇怪的冗长说法和权宜之词。 我脑子里还是不太清楚。 随着我们不断深入追问,我脑海中要构建的东西会越来越清晰,直到最终能用一套恰当的词语来描述它们。 一旦到了那一步,我们基本上就算把这个功能构建出来了。 那么问题四是:应该有一种编辑模式还是两种? 在缩略图里,应该有一个单独的图表编辑模式和一个独立的排布模式吗? 对于问题四,我觉得流程大概应该是先拍一张我的脸,然后把这张脸放到画布上。 然后,等我的脸放上去之后,我们就可以围绕它来构建图表,而且我应该可以选择重拍。 问题五:脸的位置是固定的吗? 对于 Q5,我觉得应该可以选择水平移动人脸。 这样一来,我就能多一点灵活性。 Q6,这只涉及图表吗? 对,Q6 暂时就只针对图表吧。 我想不出有什么场景需要在缩略图里附加其他东西。 我们不想再造一个 Figma,只是想让这个特定流程更简单。 好,在我们回答这些问题的时候,智能体也在行动:它启动了一个后台智能体,去查找我们这里需要的支撑信息。 所以它现在正在修改其中两个问题。 然后 Q7 问的是:“原位编辑图表”是否意味着在缩略图框架内嵌入一个实时的 TL Draw 编辑器,并锁定视角,让看到的区域就是缩略图? 对于 Q7,我担心把我们局限在那么小的空间里,会让编辑缩略图变得很痛苦。 所以我觉得我们可能需要为此制作几种不同方案的原型。 好,这就是一份非常详细的初步回复。 我们把它发出去吧。 现在你可能看着这种方法,心想:好吧,相比我正在使用的方法,比如计划模式,它有什么好处? 这个技能和这种方法的作用是,让我们在动手构建之前,先就要构建的东西达成一致。 这意味着我们会得到可预测性高得多的结果。 我也会对我们正在构建的东西有更深入的理解。 而在它构建的过程中,我会让它基本自行运行。 但在早期的这个阶段,我可以和队友一起就要构建的东西达成一致,弄清楚它究竟是什么,以及我们要用什么词来描述它。 然后从那时起,一直到最后的人工审核,整个过程基本都会按既定轨道进行。 所以,问题二换了个角度来问。 它问的是:缩略图用的图是否是一个真正的图? 说到这里,我们或许应该谈谈“真正的图”到底是什么意思。 这是在课程视频管理器的代码仓库里。 这是一个 glossary .md 文件,是我最得意的作品。 当我谈到项目中的语言时,实际上说的是你用来描述某些事物的词汇。 在这个相当庞大的文件中,大约有五百六十行,我们定义了这个课程中所有的主要概念,抱歉,是这个仓库中与项目有关的所有主要概念。 而我们这里真正讨论的是图。 所以有一整节是关于图的。 一个图其实是一组图快照,而图快照是录制一个片段时图中绘画内容的副本。 换句话说,在我的视频编辑器里, 它与图关联在一起,所以我可以看到视频每个时间点使用的是哪个图。 还有活动图,也就是作者当前正在绘制的图。 我们有一个名为“恢复到最新状态”的操作,可以将旧的图快照重新加载为活动图。 还有保留快照,即便没有任何片段使用它们,它们也会保留在所属图的时间线上。 你可以开始看出,这些定义清晰地勾勒出了这个功能的全貌。 我们现在要做的是在此基础上进行扩展,弄清楚新功能在现有体系中处于什么位置。 所以,通过问“缩略图用的图是否是一个真正的图”,我们其实是在问:好吧,它是一个图,但它可能是缩略图专用的吗? 对于问题二,我认为沿用我们现有的设置是合理的。 但我担心的是,我们放进缩略图里的东西其实并不是一个图,而只是一个单独的快照。 在我们的模型中,一个图实际上是该图在一段视频中随时间变化的不同快照的集合,而这里的东西更像是一个图的快照。 如果你不了解这个项目的术语,我刚才说的可能听起来像废话或行话,但因为 glossary. md 在它的上下文中,我已经能够传达相当丰富的信息,而且模型也能理解。 Q8 听起来不错,这三个都很有价值。 Q9,是的,嗯,当我们移动人脸时,图应该保持不动。 Q10,是的,重新拍摄时,我们会移除背景并替换照片。 好,现在它在问是否应该为几种不同的编辑界面制作原型,我很喜欢这一点。 这正是我想做的。 这里 Q11 的棘手之处在于,它实际上是在问一个问题: 感觉怎么样? 看起来怎么样? 用起来感觉怎么样? 在我看到所有区别都摆在眼前之前,我并不能真正了解其中的取舍。 换句话说,得等我亲自试过才知道。 所以我有一个原型设计技能,能提供多个选项,让你用来做这类决定。 这正是这个智能体在这里尝试做的事。
Which ones should it prototype? Q11, yes, that sounds great to me. The benefit of having multiple prototypes to look at is especially if it builds something that you don't like, that often tells you more than what you might get from something you do like. So actually exploring lots of different options can give the agent a really rich view over what you actually want to build. And there we go. We now have the glossary. The CVM glossary has no entry for the thumbnail. And it's proposing two. So it's proposing a thumbnail, the image shown for a video on YouTube, or a cutout, or rather and a cutout, the author's face with the background removed placed over the diagram. and then it's also saying there should be a third term thumbnail diagram. for q12, yes, that sounds great. all right, let's send this off. and now again, we should be getting closer and closer as we go. lots of folks ask me like, you know, why, what happens if you have a grilling session that runs for like 500 questions or something? how do you know when to stop grilling? And you should like, I should be driving this conversation. You know what I mean? Like, you should be the one in charge of it. The agent is not grilling you. You are in a conversation with it. And so you should feel free to just go, no, we've talked enough. Let's go and actually create some code now. Okay, we can see it's updated the section on thumbnails inside the glossary. That's really good. And now it's doing something cool, which is it's pinging off a subagent to go and prototype thumbnail diagrams. So that's great. We're able to continue grilling while it goes off and does some work in the background. Okay, and now we're doing some hardcore language stuff. The thumbnail's drawing is neither a diagram nor a diagram snapshot. You're right that it isn't a diagram and a diagram snapshot doesn't fit either. The glossary defines a snapshot as a copy at the moment a clip was filmed. So it's now proposing a new term, a thumbnail drawing. The drawing that belongs to one thumbnail, you edit in place and we can start from a diagram, diagram snapshot or another thumbnail's drawing. It's actually saying to avoid thumbnail diagram here. Now I know this glossary pretty well, right. right, and the better i know the glossary, the more able i'm able to make smart contributions to the application, the better i know, understand the application. and so i know there's this thing called a preserved snapshot, which is the diagram snapshot kept in its diagram's timeline, even when no clip uses it. so i can say to the agent, doesn't it make sense to have a thumbnail represent a preserved snapshot? We don't always define snapshots as the moment that a clip was filmed. I'm going to show you a technique that I sometimes use when I feel like I'm at the crux of something or when I just want to talk about one thing for a minute, which is I'm just going to say, for now, let's just focus on this question. Ask me one question at a time until I say otherwise. This is another way that you can direct the grilling if you're kind of getting a bit scatterbrained, if you just want to focus in on the thing that you actually care about and don't care about all the small stuff, then you can just say, now just go one question at a time for now. One other thing it's doing here is it's reading an architectural decision record. that we made on snapshots and preservation. this is another thing we do during grilling. we can take a look at adr003 just up in here. diagrams as first-class entities with per clip snapshots. so this is where we actually made the decision about the glossary. so the glossary kind of describes the application as it is now, as does the code, but the adrs are here to explain why we made those decisions. in other words, we are interacting with a part of the application that's relatively old, relatively mature, And if we didn't write this stuff down, then we would be guessing. This is a classic Chesterton's fence issue, right? There exists in such a case a certain institutional law, let us say for the sake of simplicity, a fence or gate erected across a road. The more modern type of reformer goes gaily up to it and says, I don't see the use of this, let us clear it away. To which the more intelligent type of reformer will do well to answer, if you don't see the use of it, I certainly won't let you clear it away. Go away and think. Then when you come back and tell me that you do see the use of it, I may allow you to destroy it. In other words, do not remove a fence until you know why it was put up in the first place. So the ADRs, the architectural decision records, help us keep track of why these fences have been put up. So it's come back and of course it's saying, yes, you're absolutely right, I was wrong to rule it out. And so it's saying, which diagram does a thumbnail's snapshot belong to? Yeah. The thumbnail pins a snapshot of some diagram's head. The question is which head you're editing in the thumbnail creator. This is a really tricky one because we're basically deciding how the thing is gonna work now. We basically in this mode we might have to choose a diagram so that we can create a snapshot inside it or we choose an existing snapshot that we then edit. It all feels a little bit clunky and weird. And what it's kind of suggesting is that we might need a diagram of its own for each thumbnail. It keeps the teaching diagram's head safe while you simplify for the thumbnail and you still get to start from the teaching version. I really don't know here. I really don't know. I'm just gonna sort of spill out what I'm thinking about, I think. So what I'm thinking about in my head is the decision between whether we kind of tie into the existing diagram diagram snapshot stuff, which is mature, there's a lot of code in there. or whether we sort of extend that work and instead apply it to a different data model, call it a different thing. and it's essentially whether to mix the streams or not mix the streams. i think probably what i'm most inclined to do here is not mixing the streams. but what i'm scared about is later down the line, we might wish that we had so that these models could be linked somehow. but i can't see the concrete use case for why we would want to. still hang on to the existing model. You can see that I'm struggling here, right? Like I, this is a hard thing to think about. And if I had colleagues, this would be the moment when I would reach out to them and go, help me, I'm not quite sure what we do here. This feels like quite a large consequential decision for this feature. So it's saying I would go with your instinct to keep them separate. The fear of wanting them linked later is mostly covered by two facts. So both sides saw store the same scene format. In other words, the way they store it in the database is the same. Copying between them is trivial in either direction. So start from a diagram or snapshot works without the models being joined. The link you're likely to want is where a drawing came from, not one model. Which thumbnails were made from which diagram is answered by one nullable started from snapshot reference recorded when you copy. So the reason we're so obsessed with language at this point is because the language is going to form the data model. that everything else fits on top of. once we understand the language, once we understand the names for these things, we then have names for database tables. we understand how they reference other parts of the system. and so we can create tables from that, create modules, and set it up. okay, so i think i've decided. okay, that suggestion sounds good. i like that we have a lot of flexibility not to quite decide the data model now. and i like your suggestion of tracking the snapshot that it came from in case that becomes relevant later down the line and we properly want to link it. i suppose i don't necessarily matter how we model this as long as the way we're modeling it is not lossy and we preserve all of the links. let's just see what it says to that. i'm not necessarily giving it a great answer, but maybe that's enough for it to go on. at its best, grilling really does feel like rubber ducking with someone with a really respected colleague. someone that understands the code base really well, and you're kind of just able to talk out your thoughts or type out your thoughts, and by talking them through, you get to a more concrete solution even before you've written any code. okay, it's gone a bit nuts here, which is it's actually gone ahead and written an entry for thumbnail drawing, which i don't like. i don't like having the concept of drawing here. let's take a step back. i really don't like the wording of thumbnail drawing. i hate the fact that we've got a drawing and a diagram. those feel like they conflict really hard. i think thumbnail diagram is just fine. can you also run me through the decision to create an adr here? why did you decide to go for a new adr? so it sort of eagerly created an adr without asking me, which is not how i usually like to do it. i like to have that decision be something i do during the grilling session. okay, he says, he says, the agent says, i've renamed it to thumbnail diagram everywhere, the glossary, the adr, and the adr's file name. Yeah, it's kind of coming back at me a little bit on here saying, one small catch to be aware of, an active diagram is a diagram, but a thumbnail diagram is not. So maybe the word diagram isn't right here. So now it's saying, why did it suggest an ADR? Why did it feel the need to write down this non-obvious decision? So it's saying it is non-obvious, right? It's surprising without context. There is a real trade-off here, and so that's another criteria, and it is strong, and it's hard to reverse. Or rather, it's saying it's not hard to reverse. We could potentially walk this back. So now it's spelled it out, I do agree with its reasoning as to why it suggested an ADR. And by the way, I'm investing time into this so that future runs understand the context for every decision. so that i continue getting better grilling sessions as i continue working on this project. without this or being lazy here would mean that my next run ends up being a lot worse because i don't have as good context as i need.
它应该为哪些选项制作原型? Q11,是的,我觉得这很棒。 有多个原型可供查看的好处是,尤其当它做出了你不喜欢的东西时,这往往比看到你喜欢的东西更能给你启发。 所以,探索各种不同的选项,其实能让智能体更全面地了解你真正想要构建的东西。 好了,完成了。 现在我们有了术语表。 CVM 术语表里没有缩略图的词条。 它提出了两个词条。 它提出了“缩略图”,即在 YouTube 上为视频显示的图片;或者说,还有“抠图”,即去掉背景后叠放在图表上的作者面部图像。 然后它还说应该有第三个术语:“缩略图图表”。 对于第 12 个问题,是的,听起来很棒。 好,我们把这个发送出去。 现在,随着进展,我们应该会越来越接近目标。 很多人问我,如果一场追问持续了 500 个问题左右,会怎么样? 你怎么知道什么时候该停止追问? 你应该,或者说,我应该主导这场对话。 明白我的意思吗? 你才应该是掌控对话的人。 不是智能体在追问你。 你是在和它对话。 所以你完全可以直接说,不,我们已经聊得够多了。 现在开始真正编写一些代码吧。 好的,我们可以看到,它已经更新了术语表中关于缩略图的部分。 这真的很好。 现在它正在做一件很酷的事:它在召唤一个子代理,去为缩略图的图稿制作原型。 这很棒。 我们可以继续深入追问,同时让它在后台工作。 好,现在我们要深入探讨一些语言方面的问题。 缩略图的图稿既不是图表,也不是图表快照。 你说得对,它不是图表,而图表快照也不合适。 术语表将快照定义为片段拍摄时刻的副本。 所以它现在提出了一个新术语:缩略图图稿。 这是属于某个缩略图的图稿,你可以直接编辑它,也可以从图表、图表快照或另一个缩略图的图稿开始。 它实际上建议在这里避免使用“缩略图图表”这个说法。 我对这份术语表已经很熟悉了,对吧。 没错,我越熟悉这份术语表,就越能为应用提出有见地的建议,也就越了解这个应用。 所以我知道有一个叫作“保留快照”的东西,也就是保留在图表时间线中的图表快照,即使没有片段使用它。 所以我可以问代理:让缩略图表示一个保留快照,难道不是更合理吗? 我们并不总是把快照定义为片段拍摄时刻的副本。 我来给你们展示一个技巧:有时我觉得自己正处在问题的关键点,或者只想暂时讨论一件事,就会说:“暂时先只关注这个问题。” 一次只问我一个问题,直到我另有指示。 这也是一种引导深入追问的方式。如果你的思绪有点散乱,只想专注于真正关心的问题,不在意那些细枝末节,就可以说:“现在暂时一次只问一个问题。” 它在这里做的另一件事是阅读一份架构决策记录。 我们就快照和保存问题所做的决定。 这是我们在深入盘问时做的另一件事。 我们可以看看这里的 ADR003。 将图表作为一等实体,并为每个剪辑保存快照。 我们就是在这里做出了关于术语表的决定。 术语表大致描述了应用程序的当前状态,代码也是如此,但 ADR 的作用是解释我们为什么做出那些决定。 换句话说,我们正在处理应用程序中相对老旧、相对成熟的一部分。如果不把这些内容记录下来,我们就只能靠猜。 这是一个典型的切斯特顿之篱问题,对吧? 在这种情况下,存在着某种制度性的规定;为了简单起见,我们可以说,一道篱笆或大门横在路上。 比较新派的改革者兴冲冲地走过去说:“我看不出这有什么用,把它拆掉吧。” 对此,更明智的改革者最好回答:“如果你看不出它有什么用,我当然不会让你把它拆掉。” “回去好好想想。” “等你回来告诉我,你确实看出了它的用处,我或许会允许你把它拆掉。” 换句话说,在弄清楚篱笆当初为什么立在那里之前,不要把它拆掉。 所以,ADR,也就是架构决策记录,帮助我们记录这些篱笆为什么会被立起来。 它回复了,当然,它说:“是的,你完全正确,我不该把它排除掉。” 然后它问:“缩略图的快照属于哪个图表?” 对。 缩略图固定了某个图表的头部状态快照。 问题是,你在缩略图创建器中编辑的是哪个图表的头部状态。 这个问题真的很棘手,因为我们现在基本上是在决定这东西要怎么运作。 基本上,在这种模式下,我们可能需要选择一张图,然后在里面创建一个快照;或者选择一个已有的快照,再对它进行编辑。 这一切感觉都有点笨拙和奇怪。 这似乎意味着,我们可能需要为每个缩略图单独建一张图。 这样你在为缩略图简化内容时,就能保护教学图的最新版本,同时仍然可以从教学版本开始制作。 在这个问题上,我真的不知道该怎么办。 我真的不知道。 我想我还是把我脑子里的想法都说出来吧。 我脑子里想的是,要不要接入现有的图和图快照机制。这套机制已经很成熟了,里面有大量代码。 还是说,我们扩展这项工作,把它应用到另一种数据模型上,并给它取个不同的名字。 本质上就是要不要把这两套东西混在一起。 我想,我现在可能更倾向于不把它们混在一起。 但我担心的是,以后我们可能会希望当初把它们混在一起,这样这些模型就能以某种方式关联起来。 但我看不到我们为什么要这么做的具体用例。 继续沿用现有模型。 你能看出来我正在纠结,对吧? 就是,我觉得这件事很难想清楚。 如果我有同事,现在就是我去找他们的时候了,说:帮帮我,我不太确定这里该怎么做。 对于这个功能来说,这感觉是一个影响相当重大的决定。 所以它的建议是,我会遵从你的直觉,把它们分开。 对于以后可能想把它们关联起来的顾虑,主要有两个事实可以打消。 两边存储的场景格式相同。 换句话说,它们在数据库中的存储方式是一样的。 它们之间无论向哪个方向复制都很简单。 所以,即使模型没有关联,也可以从图表或快照开始。 你可能真正想要的关联是图画的来源,而不是统一成一个模型。 要知道哪些缩略图来自哪张图表,只需在复制时记录一个可为空的“起始快照”引用。 所以我们现在如此纠结于用词,是因为这些用词将形成数据模型, 而其他一切都建立在这个数据模型之上。 一旦我们理解了这些用词,知道该如何称呼这些东西,就有了数据库表的名称。 我们也就明白它们如何引用系统的其他部分。 这样我们就可以据此创建表和模块,并把系统搭建起来。 好吧,我想我已经决定了。 好,那个建议听起来不错。 我喜欢我们有很大的灵活性,不必现在就完全确定数据模型。 我也喜欢你提出的跟踪其来源快照的建议,以防将来这变得重要,而我们确实想把它关联起来。 我想,具体怎么建模未必重要,只要建模方式不会丢失信息,而且能保留所有关联就行。 看看它对此会怎么说吧。 我给它的回答不一定很好,但也许已经足够让它继续了。 在最好的情况下,这种刨根问底确实感觉像是在和一位非常尊重的同事进行橡皮鸭调试。 一个非常了解代码库的人,你只需把自己的想法说出来或打出来,通过讨论这些想法,甚至在写任何代码之前,就能得出更具体的解决方案。 好吧,这里它有点乱来了:它居然直接写了一个“缩略图绘制”的词条,我不喜欢这样。 我不喜欢这里出现“绘制”这个概念。 我们退一步想想。 我真的不喜欢“缩略图绘制”这个说法。 我讨厌我们同时用了“绘制”和“图表”这两个概念。 它们感觉非常冲突。 我觉得“缩略图图表”就很好。 你能不能也给我讲讲,为什么决定在这里创建一份 ADR? 你为什么决定新建一份 ADR? 它有点急着创建了一份 ADR,都没问过我,这不是我通常喜欢的做法。 我喜欢在深入盘问的过程中自己做这个决定。 好,他说,他说,这个智能体说,我已经把所有地方都改名为“缩略图图表”了,包括术语表、ADR 和 ADR 的文件名。 对,它这里算是稍微反驳了我一下,说有个小问题需要注意:活动图表是图表,但缩略图图表不是。 所以也许“图表”这个词用在这里并不合适。 现在它在解释,为什么它建议使用 ADR? 为什么它觉得有必要把这个不那么显而易见的决定记录下来? 它说这个决定并不是显而易见的,对吧? 不了解背景的话,会觉得意外。 这里确实存在权衡,这是另一条判断标准;而且这个决定影响重大,也很难撤回。 或者更准确地说,它的意思是,这不难撤销。 我们有可能撤回这个决定。 既然它现在已经解释清楚了,我确实认同它建议采用 ADR 的理由。 顺便说一下,我在这上面投入时间,是为了让后续运行能够理解每个决定的背景。 这样我在继续开发这个项目时,就能持续获得质量越来越高的深入追问。 如果不这么做,或者在这里偷懒,下次运行的效果就会差很多,因为它没有我所需要的充分上下文。
okay, i agree with your decision on the adr, and i also agree that thumbnail diagram is a little bit awkward. can you give me some options here? and let's do some scenario testing to see how they match up against diagram versus diagram snapshot. i'm sort of leaning towards thumbnail diagram snapshot, even though that's a little bit long, but might work. scenario testing is a really great way of kind of testing your domain language, testing the language that you're trying to use. what it does is it gives you a table of different options, different sentences you could use to describe the system, and then it checks out how easy it would be to describe in different forms of language. so here we can see we have a candidate, a thumbnail diagram snapshot versus a thumbnail diagram. versus a thumbnail scene. So in the first scenario, it says I started the thumbnail from the agent loop snapshot used in clip fourteen, then I simplified it. All three there are probably fine. You open the agent loop in the playground, is the thumbnail in its timeline? Yeah, that's an interesting one because if it's saying it's a snapshot, then you would kind of expect it to be in there or, you know, expect it to be in there somewhere. If it's a thumbnail diagram, then you might try to look at it on the top level. And so yeah, by calling it a diagram or a diagram snapshot, it sort of makes it feel like it's linked in with the other stuff. it says here, i dragged an arrow in the diagram snapshot, but that's not good because snapshots can't change. you tell an agent to tweak the thumbnails diagram snapshot. it doesn't really work, but i'm starting to see why it thinks about thumbnail scene and why it thinks it's good. we can see in all of the tables here that thumbnail scene is basically fine. apart from, matt says it allowed while working. in other words, Does it match my actual mental model for thumbnail diagram snapshot? It's a bit too long, a bit too wordy thumbnail diagram seems fine because it is at what i naturally say and thumbnail scene is not a word that i would use. It's more sort of coding vocabulary. In other words, scene is not something that we sort of have throughout the application. Maybe it is actually maybe we have like a scene layer more possibly. I'm just gonna search in the glossary for scene here. And yeah, we do have a concept of a scene. And diagram, we've also got, okay, uh, that's not good either, 'cause we've got a scene in there too. So let's read its kind of, um, final part here. Yeah, even though C has all the ticks, it actually does weight number seven really high. And it says C is the clearest technically, but it's not how you talk, and it puts a code word in the domain language. B has one weakness, it reads as a kind of diagram. And so yeah, I do think it's right that thumbnail diagram makes sense as long as we have an ADR to say it's a diagram but not a diagram. And I can see why it went for thumbnail drawing as well, but I just don't like that word. It doesn't feel like it rolls off the tongue. Okay, thumbnail diagram is the right thing. I agree that thumbnail scene is poor, especially because we do actually have a concept of a scene elsewhere in the glossary. I also agree that having the ADR there means that. yet we have a concept of a diagram, but we've also got a thumbnail diagram. and i think that's okay to have that distinction. can you now widen things out? i feel like we've understood the crux of what we're building. let's now have multiple questions at once. i think this kind of ceremony feels really off to a lot of people. a lot of people go, why are you spending so much time thinking about language and sort of like, you know, about the words that you're using? why is that so important to you? And I think the reason it's so important is what you've just seen here, what we've just done. We have from almost nothing, now we have a fully realized concept of the thing that we're building and the data model that's going to go into it. We now know that we have a thumbnail and a thumbnail diagram. That thumbnail diagram is not technically a diagram, it's more like a scene, but we can't use the word scene because we've got that elsewhere. And then this is going to then go into the rest of this grilling session. Q2C says starting from a diagram's head, when you start from a diagram's head, should the CVM save that head as an unpreserved diagram snapshot? Q2C, that is absolutely correct. What the start from searches and in what order? I think it's got this idea that I want a UI where we like start from an existing diagram, but I think I always want an empty diagram to start. and then be able to search my existing diagrams from there. i think what i want from the q14 is i don't necessarily want to go from a start from list of potential different diagrams. i want to start with an empty canvas and then maybe search for existing diagrams and plonk them on. q15 says, should we have one thumbnail diagram per thumbnail? absolutely. q15. is correct. q16, no user images in the thumbnail diagram. absolutely agree with q16. q17, it's asking about a separate concept called a pitch, whether a pitch has a youtube thumbnail description with arrow text field. q17, let's not worry about pitches. they're kind of soft deprecated. i don't use them very much. and so let's not worry about integrating with them. q18, yes, let's keep existing thumbnails as they are. q19, let's give the thumbnail editor. a parity with the diagram editor in terms of saving components, inserting components. we may even want to consider a shared component there. we're seeing something a little bit awkward actually in our domain language for component. we can see that inside the diagram sections of the glossary, we have this concept of a component. this is something i'm actually pretty proud of in my user interface. we have diagram components here, which are reusable diagrams that i can plug into any. diagram that i want to. but calling them just raw components in the glossary means that they actually sort of bump up against the concept of components in react. and that's what i was just talking about. we need to have a shared component that shows a list of components. it doesn't make sense. a quick note on the component part of the glossary, which is i'm finding it a little bit awkward with the word component in there because that bumps up against react components. so i think we probably need to prefix it with the word diagram. so a diagram component. okay, we are cooking with gas now. so i'm starting to get a real sense for what we're building much, much more than when we started. i'm not feeling the need to end the grilling session just yet. i'm feeling pretty happy with where we are. these are still high quality questions. okay, it's now asking whether i want to change the way the search works. q20, no, i disagree. i still want... the way i wanted to work in the diagram playground the exact same as it works in the thumbnail editor. i like that components have one search and then diagrams and diagram snapshots have their own. if we make two subtly different diagram editors, that will be very, very annoying and users, i. e. me, will paper cut themselves all the time on it. q21, what an insert brings in, should inserting a diagram or snapshot bring in the whole drawing? Q twenty one, yes. Paste counts as a source too. So what it's saying is if we copy one diagram and then paste it in, should we track the snapshot that it came from? Q twenty two, that sounds like a lot of complexity for a feature that I'm maybe not going to use that often. So no, I don't think I care about it. One diagram component library, one UI. Should a diagram component save from the thumbnail show up in the playground and the reverse? Q twenty three, yes, absolutely. Next, deleting things that are a source. Today, deleting a video cascades and hard deletes its thumbnails. If next week's thumbnail diagram copies shapes from this week's, deleting this week's would break that link, which breaks the not lossy rule. Q24, yes, thumbnails should be archived instead of deleted. We kind of want soft delete on everything should be the rule. For those who don't know, soft delete, um, instead of deleting something from a database, which would be a hard delete, you instead mark it with a little marker like archive true or something, and then it doesn't show up in the UI, or you build your application so that it doesn't show up. Soft deletion is incredibly useful because it means that you can go back and retrieve that data if you want to. Whereas if you hard delete, then you're kind of screwed because it's literally been gone, it's gone from the system. Because this data is really valuable to me, I pretty much always go with soft delete and I don't think I have any cleanup mechanism for like cleaning up old data, I just keep it around. But in an application with lots of users, then I would want to make sure I'd eventually, let's say on a 30-day cycle or something, uh, deleted the stuff that people had soft deleted. Okay, it's asking about, uh, should Parity come from extracting the playgrounds editor into one shared diagram editor component? Q25, yes, absolutely, let's have a single source of truth for this. Q26, it's saying your step of searching for a diagram or snapshot or dropping it in doesn't exist yet. This feels to me like it's actually untrue, it's actually not noticed something about the code, which is a little annoying. Q26, I don't think that's true, we already have a like find diagram thing, right? so we would just reuse that, wouldn't we? q27, navigation results in the thumbnail editor. q27, yes, i agree, looks great. q28, soft delete everywhere is a separate piece of work. it's now taking my opinion and kind of running with it. but i'm pretty sure we already have soft delete everywhere. q28, yeah, let's not over scope this. i'm pretty sure we already have soft delete most places that i want it. this is an important part of grilling too, is like when you're talking about your system, You will often find little ways to improve it that might lead to issues that you create on your backlog that you eventually maybe grill about or maybe just like slam through. And so grilling is not only about the feature you're on, but it's also about staying in touch with the code base. It's a ritual, a ceremony for thinking about the code. This is why I spend so long on it. Q twenty six, yes, let's add a new action to the existing search. That sounds great. Okay, it's now saying this is a good one. So should past thumbnail diagrams show up in the same search? So that's actually a pretty neat idea because we probably do want the ability to search through old thumbnails that we've created since they might be useful in diagrams. and just in the same way that diagrams are useful for thumbnails. this is, again, exactly the kind of thing that grilling is really, really good at pulling together. q29, yes, that is a really smart idea. you should be able to search for thumbnails from, or thumbnail diagrams from the diagram playground, and you should be able to search for diagrams and diagram snapshots from the thumbnail editor. so that is an important thing that we need to think about in the data model that we weren't really valuing before, but i think are... our current model gets us there because thumbnail diagrams are probably going to be stored in a separate database table, or they might just be an entry on the existing thumbnail. so, yeah, interesting one.
好,我同意你关于 ADR 的决定,也同意 thumbnail diagram 这个名称有点别扭。 你能给我提供几个选项吗? 我们再做一些场景测试,看看它们和 diagram、diagram snapshot 相比怎么样。 我有点倾向于 thumbnail diagram snapshot,虽然有点长,但也许可行。 场景测试是检验领域语言和你想使用的措辞的一种非常好的方法。 它会给你一个表格,列出不同的选项和可以用来描述系统的不同句子,然后检验用不同措辞描述起来有多容易。 这里我们可以看到几个候选名称:thumbnail diagram snapshot、thumbnail diagram, 以及 thumbnail scene。 在第一个场景中,它写道:“我从片段十四中使用的 agent loop 快照开始制作缩略图,然后对它进行了简化。” 这三个名称用在这里大概都没问题。 你在 playground 中打开 agent loop,缩略图会在它的时间线上吗? 对,这个问题很有意思,因为如果称它为快照,你自然会期待它在时间线上,或者说,至少在里面的某个地方。 如果叫它 thumbnail diagram,你可能会尝试在顶层找它。 所以,是的,把它叫作 diagram 或 diagram snapshot,会让人觉得它与其他东西是关联在一起的。 这里写着,我在图表快照里拖动了一支箭头,但这不对,因为快照是不能改变的。 你让一个智能体去调整缩略图图表快照。 这其实行不通,但我开始明白它为什么会想到“缩略图场景”,以及为什么觉得这个叫法不错。 从这里所有的表格中都可以看出,“缩略图场景”基本没什么问题。 不过,Matt说它在工作时是允许的。 换句话说,它是否符合我对缩略图图表快照的实际心智模型? 它有点太长、太啰唆了。“缩略图图表”似乎不错,因为这就是我自然会说的,而“缩略图场景”不是我会用的说法。 这更像是编程术语。 换句话说,场景并不是我们在整个应用中都会用到的概念。 也许其实是,也许我们有类似场景层这样的东西,可能性更大。 我现在就在术语表里搜索一下“场景”。 嗯,没错,我们确实有场景这个概念。 图表这个词我们也有,好吧,呃,这也不太好,因为里面也有一个场景。 那我们来读一下它最后的部分。 是的,虽然C全都打了勾,但它实际上给第七项赋予了很高的权重。 它说C在技术上最清晰,但这不是你的说话方式,而且它把一个代码术语放进了领域语言。 B有一个弱点:它听起来像是一种图表。 所以,是的,我确实认为它说得对,“缩略图图表”是说得通的,只要我们有一份ADR说明它既是图表又不是图表。 我也能理解它为什么选择“缩略图绘图”,但我就是不喜欢这个词。 感觉说起来不太顺口。 好的,用“缩略图图示”是对的。 我同意“缩略图场景”这个说法不妥,尤其是因为术语表的其他地方确实已经有了“场景”这个概念。 我也同意,那里有那份 ADR 就意味着这一点。 不过,我们既有“图示”这个概念,也有“缩略图图示”。 我认为保留这种区分是可以的。 现在能把范围扩大一些吗? 我觉得我们已经理解了所构建之物的关键所在。 现在让我们同时处理多个问题。 我觉得这种郑重其事的做法让很多人感到很不适应。 很多人会问,你们为什么花这么多时间琢磨语言,琢磨自己用的那些词? 这对你们来说为什么这么重要? 我认为它之所以这么重要,原因就在于你们刚才看到的,以及我们刚才做的事情。 我们从几乎一无所知开始,现在已经对正在构建的东西及其所需的数据模型有了完整的认识。 现在我们知道,我们有一个缩略图和一个缩略图图示。 严格来说,缩略图图示并不是图示,它更像是一个场景,但我们不能用“场景”这个词,因为我们在别处已经用了。 接下来我们会在这次深入讨论的其余部分中继续探讨这些内容。 Q2C 提出,从图示的头部开始时,CVM 是否应该将该头部保存为一个未保留的图示快照? Q2C,完全正确。 “从……开始”会搜索什么,又按什么顺序搜索? 我觉得它认为我想要一个能从现有图示开始的界面,但我想我始终希望从一个空图示开始。 然后就能从那里搜索我现有的图表。 我觉得,对于Q14,我不一定想从一个列出各种可能图表的列表开始。 我想从一块空白画布开始,然后可以搜索现有图表并把它们放上去。 Q15问的是,每张缩略图是否应该对应一个缩略图图表? 绝对应该。 Q15 是对的。 Q16,缩略图图表中不使用用户图片。 我完全同意Q16。 Q17问的是一个叫作pitch的独立概念,以及pitch是否有一个带箭头文字字段的YouTube缩略图描述。 Q17,我们暂时不用考虑pitch。 它们算是处于软弃用状态。 我不怎么使用它们。 所以我们不用考虑与它们集成。 Q18,是的,我们保持现有缩略图不变。 Q19,让缩略图编辑器 在保存组件和插入组件方面与图表编辑器保持一致。 我们甚至可以考虑在这里使用一个共享组件。 实际上,我们在“组件”这个领域术语上发现了一些不太妥当的地方。 可以看到,在术语表的图表部分,我们有一个组件的概念。 这是我在用户界面中引以为傲的一点。 这里有图表组件,也就是可复用的图表,我可以把它们插入任何 我想插入的图表中。 但在术语表里直接把它们叫作组件,就会和 React 中组件的概念产生冲突。 这就是我刚才说的。 我们需要有一个共享组件来显示组件列表。 这说不通。 关于术语表中的组件部分,我想简单说一下:我觉得这里用“组件”这个词有点别扭,因为它会和 React 组件产生冲突。 所以我觉得我们可能需要在前面加上“图表”这个词。 也就是图表组件。 好了,现在我们进展顺利了。 我开始真正理解我们正在构建什么了,比刚开始时清楚得多。 我觉得暂时还没必要结束这轮深入追问。 我对目前的进展相当满意。 这些问题的质量依然很高。 好,现在它在问我是否想改变搜索的工作方式。 第20题,不,我不同意。 我仍然希望……图表演练场里的工作方式和缩略图编辑器完全一样。 我喜欢组件有一个搜索功能,而图表和图表快照有各自的搜索功能。 如果我们做出两个略有不同的图表编辑器,那会非常非常烦人,而且用户,我…… e。 我,会一直被它割到手。 问题21:插入操作会带入什么?插入图表或快照时,是否应该带入整张图? 问题21:是。 粘贴也算一个来源。 所以它的意思是,如果我们复制一张图表然后粘贴进去,是否应该追踪它所来自的快照? 问题22:对于一个我可能不常用的功能来说,这听起来太复杂了。 所以不,我觉得我不在意这个。 一个图表组件库,一个用户界面。 从缩略图中保存的图表组件是否应该出现在 playground 中,反之亦然? 问题23:是,绝对应该。 接下来,删除作为来源的内容。 目前,删除视频会级联硬删除其缩略图。 如果下周的缩略图图表复制了本周图表中的形状,删除本周的图表就会断开这个链接,违反不丢失信息的规则。 问题24:是,缩略图应该归档,而不是删除。 我们希望把所有内容都采用软删除作为一条规则。 给不知道的人解释一下,软删除,嗯,就是不从数据库中删除某个东西——那叫硬删除——而是给它加一个小标记,比如 archive true 之类的,然后让它不显示在用户界面上,或者把应用程序设计成不显示它。 软删除非常有用,因为这意味着如果你想找回那些数据,就可以找回来。 而如果你硬删除,那你就有点惨了,因为它真的没了,已经从系统里消失了。 因为这些数据对我来说非常宝贵,我基本上总是采用软删除,而且我觉得我没有任何清理旧数据之类的机制,我就是把它们一直留着。 但在一个用户众多的应用中,我会希望确保最终把人们软删除的东西真正删除,比如每隔30天清理一次。 好,它在问:是否应该通过把 playgrounds 编辑器提取成一个共享的图表编辑器组件来实现功能一致? Q25,是的,完全同意,我们应该为此建立一个单一可信来源。 Q26,它说你提到的搜索图表或快照,或者把它拖放进去这一步,目前还不存在。 我觉得这实际上不对,它其实是没注意到代码里的某些东西,有点烦人。 Q26,我觉得那不对,我们已经有一个类似查找图表的功能了,对吧? 所以我们直接复用它就好了,不是吗? Q27,在缩略图编辑器中导航到结果。 Q27,是的,我同意,看起来很棒。 Q28,全面实现软删除是另一项工作。 它现在有点拿着我的观点自行发挥了。 但我很确定我们已经到处都用了软删除。 Q28,对,我们别把范围搞得太大。 我很确定我希望使用软删除的地方,大多数都已经有了。 这也是深入盘问的一个重要部分:当你讨论自己的系统时,经常会发现一些小的改进方法,进而可以把它们作为待办事项里的问题记录下来,以后可能会深入盘问,也可能直接快速处理掉。 所以,深入盘问不仅关乎你正在做的功能,也关乎持续熟悉代码库。 这是一种思考代码的仪式,一种固定流程。 这就是为什么我会在这上面花这么长时间。 Q26,好的,我们在现有搜索中添加一个新操作吧。 听起来很棒。 好,现在它说这个不错。 那么,以前的缩略图图表也应该出现在同一组搜索结果中吗? 这其实是个相当不错的主意,因为我们可能确实需要能够搜索以前创建过的缩略图,它们在图表中可能会有用。 就像图表对制作缩略图有用一样。 再说一次,这正是 grilling 特别特别擅长汇总整理的东西。 Q29,是的,这是个非常聪明的主意。 你应该能够从图表试验场搜索缩略图或缩略图图表,也应该能够从缩略图编辑器搜索图表和图表快照。 所以,这是我们需要在数据模型中考虑的重要问题,我们之前并没有真正重视它,但我觉得……我们当前的模型能够做到这一点,因为缩略图图表很可能会存储在单独的数据库表中,或者它们可能只是现有缩略图上的一条记录。 所以,是的,这个问题挺有意思。
okay, while we've been talking, the prototype has been built. so let's check it out. okay, here we go. It's pretty surreal. Uh, it's quite surreal editing a thumbnail for my own face. This is very cool. This is pretty, um, similar to what I was imagining here. We can move my face like left and right here. It's a little bit fast there, but I mean it is a, it is a good one. And then in the top left you can actually see a preview of the composite, compositing photo there. That's nice. And this is only variant A, right? We've got a couple more variants. So we now have face inside the canvas. Whoa. This is again pretty trippy. We, this is actually worse than I thought it was going to be. It's a bit too large. I really hate this like bar over the left here with the view. This face thing again is just way too woo. Okay, B is really not as good as I thought it was going to be. And then what's this? A split view. Okay, the split view is garbage because I have to like look over on the left here and then see it update on the right. You can see I'm moving the. Blue box around and then I have to like manually line it up with my finger and I can't see my finger. This is bad. So I guess A is the one that we're kind of going for here. Oh, look at this feature. Look, it has a ghost face while pointer is in the frame. Ghost used as a verb there. So look, I can like when the pointer is in the frame, my hand disappears. That's so freaky. It's annoying that it's showing get license for production there because I do actually have a license. So something's going wrong there. So I'm going to dictate out all the things that I love and hate about this and we're going to iterate with the agent. I really love A. I think you've. really nailed something there. i especially like the ghost face thing. that's a nice feature. the moving me left and right, so moving the face left and right is a little too sensitive. so just bump that down a little bit. there appears to be in the composited diagram a little white line just to the left of, or sorry, to the, on the outside of the main block there, which is not good. i also want the composites to display below the. thumbnail editor. we're also missing a lot of the stuff that we've grilled about, such as being able to insert components and being able to drop in stuff. and i'm pretty sure we don't currently have parity with the other, with the diagram playground, right? so we probably need a version of it like that. so let's abandon the three variants now. let's just go with a and let's continue to iterate on it. it's also got a couple of questions for me after i've tried it. so it's saying which surface, i think we've added that. with q31, yeah, i want it to live inside the thumbnail page. And I think we probably need to see that in the next prototype so that we can arrange it on the page properly. Should moving the face and retaking be on the same undo history as drawing? Oh yeah! Q32, that is genius. Really, really smart. Definitely. That's really cool because I don't have an undo history in my current thumbnail editor, so I'm kind of screwed there, but we kind of get that for free because TL Draw, which is the tool that I'm using, bakes it into its data model. Very, very, very smart. Okay, so it's now gone and sent the prototype agent back to it saying, okay, drop B and C, put A inside the real thumbnail page, blah, blah, blah, blah, blah. In other words, it's confirming with me all the things that I gave it as feedback and it's now implementing all of those. This prototyping phase is so, so important because we really get to stamp how we think the product is going to look before we then like actually schedule an agent to build it. In other words, this time human in the loop with the agent is so essential because. We're really gonna like reduce the decision space for the agent. We're gonna say no, it has to look exactly like this. We know exactly the data model. All the agent then has to do once we run it AFK is plug those two things together. I find it pretty hard to like not get excited when I see a prototype, when I see things starting to come to life, you know. We've done this grilling, which feels kind of a little bit onerous sometimes, a little bit annoying, but when you actually see the thing coming together, you see how it's going to feel to use. And I'm really doing this, this is personal software for me, you know, it's just something to make my life more delightful. And seeing that actually coming together is so exciting. Okay, we are back and we have a new version here inside the thumbnail editor. So we've got the YouTube previews down the bottom. That's nice. The face is in frame here. I love that I can resize this actually. That's something I've never had before. Let's switch me around a little bit. That is really nice and smooth. Yeah, this really, really rocks. I now have access to a command palette as well, so I can insert components. Let's take a look at the list item here. Yes, that's looking excellent. I should be able to search for other diagrams, so I can insert a diagram. So let's just go for a wayfinder here. And then would you look at that? We've got all of that working too. So let's take a look at the composites. We can see, ah, still looks like there's that little white bit just there. Let's move me slightly this way, move this so it covers the whole screen. Yeah, that does, that's really cool. Oh, I love it. I can still see the little white bar on the right of the X. but overall, this is looking a lot better. it's also asked me some questions here. q34, i agree. q35, i agree. who owns the face? it's an excellent ai sentence. very good. q36, i agree. q37, i agree. q38, i agree. so at this point, the agent is pretty much aligned with us. we now have just sort of one problem to solve in the prototype. and i can feel we're nearly at the end of the grilling session. like once i just start going, yes, yes, yes, yes, yes, we are aligned, right? the agent is making decisions as if it were me and it's making decisions understanding what i care about. so this little white bar thing is actually showing something pretty nice here. this is essentially a bug in the prototype. and this is a bug that could have gone into production if we hadn't spotted it, but we have spotted it. so what is... What it's trying to do here is it's trying to verify its own findings. It's trying to construct a harness around the problem, in other words, a reproduction, and then it's going to try to fix it, whatever the issue is. In other words, it's going to reproduce the bar in its own browser first, then read pixel colors along the right edge of the export and of each preview. That should tell us where the white comes from. This generation of agents appear to be really, really good at this, in other words, verifying their own work really solidly. There might be stuff in my home repo like steering files that tell it to do this, but I'm not quite sure. I think it is just doing this off its own back. We can see too that it's opened up the existing subagent, so this one that's currently on two hundred and sixty k tokens here. so this is already punching pretty deep into its dumb zone. i would probably have preferred it to kick off a new sub-agent with just specifically this problem. i think that probably would have been better.
好,我们聊天的时候,原型已经做好了。 我们来看看吧。 好,来了。 感觉挺梦幻的。 呃,编辑一张有自己脸的缩略图,感觉相当奇妙。 这太酷了。 这和我想象中的,嗯,挺接近的。 我们可以在这里左右移动我的脸。 这里移动得有点快,不过我是说,这个做得不错。 然后在左上角,你可以看到合成照片的预览。 不错。 这还只是方案A,对吧? 我们还有另外几个方案。 现在我们把脸放进画布里了。 哇。 这个也挺迷幻的。 呃,这其实比我想象的还要糟。 有点太大了。 我真的很讨厌左边这里带视图的这个栏。 这个脸的效果也实在太花哨了。 好吧,B真的没有我想象的那么好。 那这个又是什么? 分屏视图。 好吧,分屏视图很垃圾,因为我得看着左边这里,然后再看右边的更新。 你可以看到我正在移动 蓝色方框,然后我还得手动把它和我的手指对齐,可我又看不到自己的手指。 这很糟糕。 所以我想我们要选的应该是A。 哦,看看这个功能。 看,当指针在画面里时,脸会变成半透明的。 这里的ghost用作动词。 你看,指针进入画面时,我的手就消失了。 这太诡异了。 那里显示“获取生产环境许可证”很烦人,因为我实际上有许可证。 所以那里出了点问题。 我要把我喜欢和不喜欢的地方都口述出来,然后我们和智能体一起迭代。 我真的很喜欢 A。 我觉得你们…… 在这方面确实做得很到位。 我尤其喜欢那个幽灵脸效果。 那是个不错的功能。 左右移动我的功能,也就是左右移动脸部,有点太灵敏了。 所以把灵敏度稍微调低一点。 合成图中,主区块左边似乎有一条白色细线,或者抱歉,是在主区块的外侧,这不太好。 我还希望合成图显示在…… 缩略图编辑器下方。 我们之前深入讨论过的很多功能也还没实现,比如插入组件和拖入内容。 而且我很确定,我们目前还没有和另一个,也就是图表游乐场,达到功能对等,对吧? 所以我们可能需要一个那样的版本。 那么现在就放弃这三个变体吧。 我们就选 A,然后继续在它的基础上迭代。 我试用过之后,它还给我提出了几个问题。 它问的是哪个界面,我想我们已经加上了。 关于 Q31,对,我希望它放在缩略图页面里。 我觉得我们可能需要在下一个原型中看到这一点,这样才能在页面上妥善安排它的位置。 移动人脸和重新拍摄,是否应该与绘制共用同一套撤销历史记录? 哦,对! Q32,这想法太妙了。 真的非常聪明。 绝对是。 这真的很酷,因为我目前的缩略图编辑器没有撤销历史记录,所以这方面我还挺头疼的。但我们基本上可以免费获得这个功能,因为我用的工具 TL Draw 已经把它内置在数据模型里了。 非常非常非常聪明。 好了,它现在又把任务发回给原型代理了,说,好,去掉 B 和 C,把 A 放进真正的缩略图页面里,诸如此类。 换句话说,它正在跟我确认我给出的所有反馈,现在也正在落实这些反馈。 这个原型制作阶段非常非常重要,因为在我们真正安排代理去构建产品之前,可以先把我们设想的产品样貌确定下来。 换句话说,这个时候让人参与代理的工作流程至关重要,因为…… 我们确实能缩小代理需要做决策的范围。 我们会说,不,它必须看起来完全像这样。 我们也完全清楚数据模型是什么。 这样,当我们让代理在无人值守的情况下运行时,它只需要把这两样东西连接起来。 你知道,看到一个原型,看到这些东西开始变成现实,我真的很难不兴奋。 我们已经完成了这一番刨根问底,有时候感觉有点费劲,也有点烦人,但当你真正看到它逐渐成形时,就能感受到用起来会是什么样子。 而且我做这个真的是为了自己,你知道,这是我自己的软件,只是为了让我的生活更愉快。 看到它真的逐渐成形,实在太令人兴奋了。 好了,我们回来了,缩略图编辑器里已经有了一个新版本。 底部有 YouTube 预览。 不错。 脸在画面里。 我很喜欢居然可以调整这个的大小。 这是我以前从来没有过的功能。 把我的位置稍微调整一下。 真的非常流畅。 对,这真的太棒了。 现在我还可以使用命令面板,所以能插入组件。 我们来看看这里的列表项。 对,看起来很棒。 我应该可以搜索其他图表,然后插入一个。 这里我们就选一个路径查找图吧。 然后,你看看这个! 这些也都能正常运行了。 我们来看看组合项。 我们可以看到,啊,那儿似乎还有一小块白色。 把我稍微往这边移一点,再移动这个,让它覆盖整个屏幕。 对,这样就行了,真酷。 哦,我喜欢。 我还是能看到 X 右边的那条白色小条。 不过总体来说,现在看起来好多了。 它还在这里问了我一些问题。 第34题,我同意。 第35题,我同意。 这张脸归谁所有? 这真是句绝妙的 AI 式发言。 非常好。 第36题,我同意。 第37题,我同意。 第38题,我同意。 所以到了这一步,智能体基本上和我们的想法一致了。 现在原型中大概只剩一个问题需要解决。 我感觉这轮刨根问底快要结束了。 就像我一开始连着说“是,是,是,是,是”,就说明我们的想法一致了,对吧? 智能体在像我本人一样做决定,而且它做决定时理解我在乎什么。 所以这个白色的小条其实展示了一件挺不错的事。 这基本上是原型中的一个 bug。 如果我们没有发现这个 bug,它可能就会进入生产环境,但我们已经发现了它。 所以它这是在……它在尝试验证自己的发现。 它正尝试围绕这个问题构建一个测试环境,换句话说,就是复现问题,然后再尝试修复它,不管问题是什么。 也就是说,它会先在自己的浏览器中复现这个白条,然后读取导出内容和每个预览右边缘的像素颜色。 这应该能告诉我们白色是从哪里来的。 这一代智能体似乎非常非常擅长做这件事,也就是说,能非常扎实地验证自己的工作。 我的 home 代码仓库里可能有一些东西,比如指导文件,告诉它这么做,但我不太确定。 我觉得它纯粹是自己主动这么做的。 我们也能看到,它打开了现有的子智能体,就是这个目前已经用了二十六万 token 的。 所以它已经相当深入地进入了自己的“愚笨区”。 我可能更希望它专门针对这个问题启动一个新的子智能体。 我觉得那样可能会更好。
but i mean, let's just see how it does and see if it manages to find the solution. if it doesn't manage to find the solution, then i will punch it again with a new sub-agent with a clean context. everyone's always asking me, by the way, oh, do you still stand by the smart zone, dumb zone thing? You know, this is my contention, and other people have had this contention as before, it's not original to me. Dex Horthy from Human Layer and now Factory came up with it, which is that if when your agent gets to around one hundred and fifty k tokens, it starts acting a little bit stupider and it starts getting slowly dumber and dumber. And if you think of what smart zone versus dumb zone actually means, like what we're talking about there is that the risk of hallucination slowly raises the more tokens you add to the context window. That's because if you imagine each one of these boxes in an is an individual token. then the model needs to keep track of all of the relationships between every single token. and it's not the fact that the number of tokens increases, it's the number of relationships that the model needs to keep track of just expand quadratically, and you end up with this enormous amount of memory needed and amount of work needed to hear the signal in the noise. however, making the models better at this is essentially an engineering problem, right? some kind of model design problem. that I'm sure people are trying to figure out. And the question everyone always asks me is like, what number does the dumb zone begin at? When should I clear the context? And my answer is becoming, okay, in previous generations of models, sure, okay, you pretty much had to clear the context at one hundred and twenty K sometimes, even like eighty K tokens for Sonnet three point five or something. You know, the number of token relationships would just go nuts and you would end up with loads and loads of factuality errors. But now it's more like it's a kind of cost and optimization thing really. You know that your agent will be smarter when there are fewer tokens here. So it's not necessarily about the risk of hallucinations. It's more like optimizing your agent to produce the best work. So for me, it's not so much that the agent produces hallucinations in the dumb zone. It's more that it just produces worse work and I end up with better results when I do my work in the smart zone. Plus, operating at like seven hundred and fifty K tokens in your context window is very, very expensive because even like when your cache runs out. All of those previous tokens are going to be run through again and that's going to be billed again. Okay, the next version of the prototype is ready and while it still has this little white thing in it, it actually says that it's not an issue. The little bar actually comes from the browser at Windows 125% scaling, Chrome shrinking 120 wide image into the previews left the last pixel column only partly painted. There's some other stuff here like some hazards. I agree with Q39, Q40, yes drawing edit should auto save the thumbnail and it's now asking whether I want to write it up. So I'm going to be careful here, I'm going to go back to the start of this little text input and I'm going to say to spec, let's write a. it up. i have to go back to the start because to spec is a user invoked skill. so i can invoke it essentially and i have to have it at the start when i'm using claude code. i can't just sort of scatter it throughout the text input, which is a bit annoying and something i've been wanting them to change for a long time. to spec, what it's going to do is it's going to create a specification. it's going to ask me a couple of questions about where we're going to test. And then, um, from there we'll be able to implement it. I already have a few quite robust reducers, and reducers are essentially places in the front end where you can contain lots of state together, and I find them really, really good with agents because they can just kind of extend existing ones. All of those three seams look good. I'm then going to, um, go for the to ticket skill as well. I'd like you to add some tickets too. Let's just do these in one batch. Now what spec and to tickets do is they essentially give the agent everything it needs to run a long running session. The spec acts like a destination document, so we're essentially running work over multiple sessions. And the spec is going to say, okay, once we get to the end of these sessions, this is where we want to end up. And then the tickets are essentially about scoping each individual session. So each subagent we're going to run is going to be handed a single ticket and that's going to be the scope of its piece of work. So here it's given us the proposed breakdown of all of the sessions. So the first one is like a pre-factor, like extracting the shared diagram editor into a shared component. Really useful. That's going to be very handy later. Each ticket says what it's blocked by and I'm not going to like review this too much. nine seems fine to me. i'm just going to say, yep, looks good to me. now, the plan is that once this is done, i'm then going to compact. so i'm going to take that entire session, the grilling session we've just done, compact it down. and then we're going to run a skill called implement spec, which is going to essentially afk, just create all of this stuff and merge it into a single pr. and you think of how easy that job is going to be for the agent, right? we are going to have an updated glossary by that point. we are going to have an entire spec of the thing it needs to build, all of the tickets on the how it's going to get there. and we've also got a prototype, which it essentially just needs to copy in terms of the ui. so we've already got a bunch of code written too. by the time i get to the spec and the tickets, by the time i get to implementation, like i'm really, you know, trying to give the agent no decision space in which to operate, no nuance that it can go, oh yeah, i'll just sort of fiddle around with this. because the more nuance you give to an agent, the worse it's going to perform because. as soon as you ask an agent to make a decision, it might make a bad decision. so the more decisions you give it, the more decision space it has, the more likely it is to choose a bad one. so i tend to like giving the agent very, very few options when it comes to implementation, when it comes to the decisions of the features that i want. okay, we now have our spec. and we can see that this is in github. so this is a github issue. i have a bunch of user stories here, around 47 of them, a bunch of implementation decisions. A very, very rich document, including stuff that's out of scope. We can see it's also referencing the prototype on the local branch, fantastic. And it then has a bunch of sub issues, each of which are the individual tickets. So all of these are individual tasks, and crucially, these can be parallelized. And so what I'm going to do is I'm going to compact the current conversation, in other words, just sort of take all of the context that we've had so far and squash it down. And then I'm going to say implement spec just on the, essentially just on the spec that it's just created. I've started using compact a lot more. Actually, compact has become a lot more reliable, a lot nicer to use. I still don't think it's a perfect thing, like auto compact is still a little bit dodgy, because the timing sometimes just absolutely once you, something important will be taken out of context. But compact, especially in this situation, when we've taken the conversation and just turned it into a document, is so, so safe, it's almost free. It's just a kind of like a minute it spends just compacting this conversation and bam, we're back down to essentially our starting context. Now implement spec is a skill that I've had for a little while now, I think it came out in V one point three. And this is really, it just takes the spec and the tickets and it implements them inside our local setup. And when it finishes, which for a piece of work like this might be like an hour or forty five minutes maybe, then we're going to end up with a nice PR that essentially implements the entire thing that is ready to merge. So this is the point here where I would step away, where I would trust it to run AFK. It's going to run as much in parallel as it possibly can. You can see it's starting the three tickets that can begin now. And it's able to pass them very rich context about what needs to happen because it's just a compacted version of our original conversation. So it knows exactly the parts of the code base that matter. Knows the spec, knows the prototype too. So I'm going to walk away and when I come back, I should have working code.
不过,我们还是看看它表现如何,看看它能不能找到解决方案。 如果它找不到解决方案,我就会用一个上下文干净的新子智能体再尝试一次。 顺便说一句,大家总是问我:“哦,你还坚持那个聪明区、愚笨区的说法吗?” 你知道,这是我的一个观点,其他人以前也有过这个观点,并不是我原创的。 这个说法是 Dex Horthy 提出来的,他以前在 Human Layer,现在在 Factory。说的是,当你的智能体用到大约十五万 token 时,它就会开始变得有点笨,然后慢慢变得越来越笨。 如果你想想聪明区和愚笨区到底是什么意思,我们说的是,往上下文窗口里加入的 token 越多,产生幻觉的风险就会逐渐升高。 这是因为,如果你把这些方框中的每一个都想象成一个独立的令牌, 那么模型就需要追踪每个令牌与其他所有令牌之间的关系。 问题不在于令牌数量增加,而在于模型需要追踪的关系数量呈平方增长,最终需要大量内存和计算工作才能从噪声中识别出信号。 不过,让模型更擅长处理这个问题,本质上是一个工程问题,对吧? 某种模型设计问题。 我相信人们正在努力解决它。 大家总会问我的问题是:愚笨区从多少令牌开始? 我什么时候应该清空上下文? 而我现在的回答是:好吧,在前几代模型中,确实,有时你基本上必须在十二万令牌时清空上下文,对于 Sonnet 3.5 之类的模型,甚至是八万令牌。 你知道,令牌之间的关系数量会变得异常庞大,最终导致大量事实性错误。 但现在,这更像是一个成本和优化的问题。 你知道,当这里的令牌更少时,你的智能体会更聪明。 所以这不一定关乎产生幻觉的风险。 更像是优化你的智能体,让它产出最好的成果。 所以对我来说,重点并不在于智能体会在愚笨区产生幻觉。 而是它的工作质量会变差,而我在聪明区工作时得到的结果更好。 另外,在上下文窗口中使用大约七十五万令牌非常、非常昂贵,因为即使只是缓存失效, 之前的所有令牌都会被重新处理一遍,而这又会产生费用。 好了,下一版原型已经准备好了,虽然里面仍然有这个白色的小东西,但它实际上显示这不是问题。 那条小白线实际上来自浏览器:在 Windows 缩放比例为 125% 时,Chrome 将宽 120 像素的图像缩小到预览中,导致最后一列像素只绘制了一部分。 这里还有其他一些东西,比如一些风险。 我同意 Q39、Q40,是的,编辑绘图时应该自动保存缩略图,现在它在问我要不要把它写出来。 所以我这里要小心一点,我会回到这段文本输入的开头,然后输入 to spec,咱们来写 出来。 我必须回到开头,因为 to spec 是用户调用的技能。 所以我基本上可以调用它,而使用 Claude Code 时,我必须把它放在开头。 我不能随意把它放在文本输入的任何位置,这有点烦人,我一直希望他们能改掉这一点。 to spec 会做的事情是创建一份规格说明。 它会问我几个关于我们要在哪里测试的问题。 然后,嗯,接下来我们就能实现它了。 我已经有几个相当健壮的 reducer。reducer 基本上就是前端中可以把大量状态集中管理的地方,我觉得它们跟智能体配合非常好,因为智能体可以直接扩展现有的 reducer。 那三个衔接点看起来都不错。 然后我还打算,嗯,使用 to ticket 技能。 我也想让你添加一些工单。 我们把这些一次性批量处理吧。 现在,spec 和 to tickets 的作用基本上是给智能体提供运行长时间会话所需的一切。 规格说明就像一份目标文档,所以我们基本上会跨多个会话开展工作。 规格说明会告诉我们:好,等这些会话全部结束时,这就是我们想要达到的目标。 而工单基本上是用来界定每个会话的范围。 所以,我们要运行的每个子智能体都会拿到一个工单,而那个工单就是它负责的工作范围。 这里给出了所有工作阶段的拟议划分。 第一个有点像预先重构,比如把共用的图表编辑器抽取成一个共享组件。 非常有用。 这在后面会很方便。 每张任务单都说明了被什么阻塞,我不打算过多审查这些。 九个在我看来没问题。 我就说,好,看起来没问题。 现在的计划是,完成后我会进行上下文压缩。 也就是把整个会话,我们刚刚完成的那轮深入问答,压缩一下。 然后我们会运行一个叫 implement spec 的技能,基本上让它自动完成所有这些工作,并合并到一个 PR 里。 你想想,这项工作对智能体来说会有多简单,对吧? 到那时,我们会有一份更新后的术语表。 我们会有它需要构建的东西的完整规格说明,以及说明如何实现的所有任务单。 我们还有一个原型,在 UI 方面它基本上只需要照着做。 所以我们也已经写好了一堆代码。 等我完成规格说明和任务单、进入实现阶段时,我真的在尽量不给智能体留下任何决策空间,也不留下任何模糊地带,让它觉得“哦,我就随便调整一下这个”。 因为你给智能体留下的模糊空间越多,它的表现就越差,因为…… 只要你让智能体做决定,它就可能做出错误的决定。 所以你让它做的决定越多,给它的决策空间越大,它做出错误选择的可能性就越高。 所以在实现以及我想要的功能相关的决策上,我倾向于给智能体非常、非常少的选择。 好,现在我们有了规格文档。 我们可以看到它在 GitHub 上。 所以这是一个 GitHub issue。 这里有一堆用户故事,大约 47 个,还有一堆实现决策。 这是一份非常、非常详尽的文档,还包括不在范围内的内容。 我们可以看到,它还引用了本地分支上的原型,太棒了。 然后它还有一堆子 issue,每一个都是单独的工单。 所以这些都是独立的任务,而且关键是,它们可以并行处理。 所以接下来我要压缩当前对话,换句话说,就是把到目前为止的所有上下文整合并压缩一下。 然后我要输入 implement spec,基本上就是针对它刚刚创建的规格文档来执行。 我现在使用 compact 的频率高多了。 事实上,compact 已经可靠多了,用起来也顺手多了。 我仍然不认为它是完美的,比如自动压缩还是有点不靠谱,因为时机有时不对,会导致一些重要内容从上下文中丢失。 但使用 compact,尤其是在这种情况下,我们已经把对话转换成了一份文档,所以这么做非常非常安全,几乎没有代价。 它只需要花大约一分钟压缩这段对话,然后啪,我们基本上就回到了初始上下文的状态。 现在,implement spec 是我用了有一段时间的一个技能,我记得它是在 V1.3 版本推出的。 它的作用其实就是获取规格文档和工单,然后在我们的本地环境中实现它们。 等它完成后,像这样的工作可能需要一小时或四十五分钟左右,我们就会得到一个不错的 PR,基本实现了全部内容,可以直接合并。 所以到了这一步,我就会离开电脑,放心让它自己运行。 它会尽可能并行执行。 你可以看到,它正在启动现在可以开始处理的三个任务。 它能向这些任务提供非常丰富的上下文,说明需要做什么,因为这些上下文是我们最初对话的精简版本。 所以它确切知道代码库中哪些部分是相关的。 它了解规格,也了解原型。 所以我打算先离开一下,等我回来时,应该就有能运行的代码了。
Okay, it's been a little while. We now have a massive PR and we have a code review that has run and found some violations. We can see the pull request inside the PRs here for edit a thumbnail diagram in place beside the face. We can see we've added twenty one thousand lines of code. I'm looking forward to reviewing that. And the way the implement spec works is it goes away and reviews everything with an agent. And then it checks against some existing coding standards. You should take a look at the code review skill if you want to see more of that, but basically it found one hard violation and a couple of cases of scope creep, and then it's fixing them up right now. I'm going to try something I don't usually try here, which is I think I do want to review this with you guys watching, and so I think I want to try a different way of breaking down this massive PR into smaller chunks. I don't have a skill for this yet. This isn't something that I do regularly, but for large chunks of work like this that I do want to review. this makes sense. once the review is finished, i think i want you to break it into smaller chunks using stacked diffs. these smaller chunks ideally should be reviewable on their own. and what that means is that i want them to be each a bunch of two-way doors and finish in a final one-way door. you can look for the definitions of two-way door and one-way door inside the pr skill. one-way doors and two-way doors are, it's a really nice analogy. it basically means that. When you have a PR that is a two way door, it means you can merge it and then revert it anytime. So you can walk through the door and then walk back through the door. Whereas a one way door is a PR that is merged and then is very difficult to unmerge. In other words, it might mess with some data, it might speak to an external service, it might expose like a security window that's hard to walk back. And agents are pretty good at breaking up massive PRs into small PRs. So it's given me this chunk of different PRs here. I can tell though that some of them are smaller than others. It feels like this last one is kind of the big one. Can you give me an estimate of the lines of code that would be in each PR since that's really what I want to do here? I'm also wondering whether we could utilize feature flags to make the thumbnail diagram available. and then pull it back later. in this situation, i'm kind of cosplaying as if this is a production system. you know, i'm kind of pretending as if, okay, i want to break this huge pr down into reviewable chunks that we can ship to production and not have like this big risk when we merge a single pr. usually when i merge to this repo, because it's only personal software, i don't have to care that much and i can just go, all right, bam, let's stick it in. but because if i'm imagining i've got, you know, thousands, hundreds of thousands of users, Like we really want to make sure production is as close to the change as possible and then once we finally flick it on, it should be relatively seamless. In other words, we're taking this huge chunk of or taking this a single door and turning it into lots of doors, which we can revert as we need to and then finally we're going to flick it on at the end. Okay, so now it's taken that last PR, the massive one, and turned it into four smaller ones. The upshot of this is it would basically run both implementations side by side for a bit and then when we were ready, we would merge the final PR and then that would turn the flag on. Okay, let's go with this version. Sounds good to me, but only do this once the review has finally fixed its things. Make sure you delegate this work to sub agents since you're a little bit constrained in terms of context window. So this is exciting. This is kind of an experiment. Hopefully these are going to be easy to merge individually. Okay, so we have our first PR of seven here. The first one is literally just the glossary terms diagram component. And ADR060. If we take a little more detailed look at this, this all looks fine. And so as this is, this can just go in. I'm happy to enable an auto merge here. I can press confirm auto merge and that will now go in as soon as the CI checks pass. And there we go, it has gone in and merged. Beautiful. Next, we have a new PR coming in saying extract the shared diagram editor from the editor or diagram playground. So just a few files changed here.
好了,过了一会儿。 现在我们有了一个巨大的 PR,而且代码审查已经完成,发现了一些违规问题。 我们可以在这里的 PR 列表中看到这个拉取请求,内容是在脸部旁边原位编辑缩略图。 可以看到,我们添加了两万一千行代码。 我很期待审查这些代码。 实现规格的工作方式是,它会用一个智能体去审查所有内容。 然后根据现有的编码标准进行检查。 如果想了解更多,可以看看代码审查技能。简单来说,它发现了一处严重违规和几处范围蔓延的问题,现在正在修复。 我打算在这里尝试一件平时不太做的事:我想让你们看着我审查,所以我想尝试用另一种方式把这个巨大的 PR 拆成更小的部分。 我还没有专门做这个的技能。 这不是我经常做的事,但对于这种我确实想审查的大量工作, 这样做是有道理的。 审查完成后,我想让你用堆叠式 diff 把它拆成更小的部分。 理想情况下,这些小部分应该能够单独审查。 也就是说,我希望它们各自由一堆可逆的决策构成,最后以一个不可逆的决策收尾。 你可以在 pr skill 里查找双向门和单向门的定义。 单向门和双向门是个非常贴切的类比。 它基本上是这个意思。 如果一个 PR 是双向门,就意味着你可以合并它,然后随时撤销。 就像你可以穿过这扇门,然后再走回来。 而单向门是指合并后很难撤销的 PR。 换句话说,它可能会影响某些数据、与外部服务通信,或者暴露出一个难以弥补的安全漏洞。 而智能体很擅长把庞大的 PR 拆成小 PR。 所以它在这里给了我一组不同的 PR。 不过我能看出来,有些比其他的要小。 感觉最后这个才是大头。 你能估算一下每个 PR 包含多少行代码吗?因为这才是我在这里真正想做的事。 我还在想,我们能不能利用功能开关来启用缩略图图表, 然后之后再把它关掉。 在这种情况下,我算是在假装这是一个生产系统。 你知道,我是假设自己想把这个庞大的 PR 拆成可供审查的小块,这样我们就能把它们部署到生产环境,而不会在合并单个 PR 时面临那么大的风险。 通常我向这个代码仓库合并代码时,因为它只是个人软件,我不需要太在意,可以直接说,好,啪,合进去吧。 但如果我设想自己有成千上万、几十万用户,我们就真的需要确保生产环境尽可能接近变更后的状态,这样当我们最终打开开关时,切换就能相对顺畅。 换句话说,我们是把这个庞大的整体,也就是一扇门,变成许多扇门,必要时可以撤销其中的变更,最后再打开开关。 好了,现在它把最后那个庞大的 PR 拆成了四个较小的 PR。 这样一来,两个实现基本上会并行运行一段时间,等我们准备好了,就合并最后一个 PR,然后开启这个标志。 好,我们就采用这个版本。 我觉得可以,但要等审查中发现的问题都最终修复后再做。 确保把这项工作委派给子代理,因为你的上下文窗口有点受限。 这很令人兴奋。 这算是一次实验。 希望这些能很容易地逐个合并。 好了,这里是七个 PR 中的第一个。 第一个真的就只有术语表图组件。 还有 ADR060。 如果仔细看看,所有这些看起来都没问题。 所以照现在这样,就可以合并了。 我很乐意在这里启用自动合并。 我可以点击确认自动合并,这样一旦 CI 检查通过,它就会合并。 好了,它已经合并了。 太好了。 接下来,有一个新的 PR,内容是从编辑器或图形试验场中提取共享的图形编辑器。 这里只有几个文件发生了更改。
Now while we're here, we might as well talk a little bit about human review and like what the purpose of this exercise is. For me in this situation, I'm going to do this human review because I know that you're watching and. And you're interested in how I do human review. And so I'm going to review every single line. But do, am I saying that you need to do every single line yourself or review every single line? No, I don't think you do. When I'm reviewing code like this, obviously I want to make sure that it works. And so if this was going out to a production system, then I would clone it locally or I would get some kind of playground where I could walk through it and check that it works. What I'm actually going to do is I'm going to merge everything and then because it's, I'm only, I'm the only user, I'm just then going to review it at the end. But the point of checking the code here is that I'm not just interested in like what the code does. i'm also interested in the system that produced this code. in other words, if i notice that something is going wrong inside this code or there's a pattern that i don't like, then what i'd like to do is create a lint rule or something to make sure it doesn't happen again. and by don't like, i mean that i want to have a hypothesis around that thing that i want to change. that it is affecting my environment my agent operates in in a negative way. in other words, i can see in this file here, like the command palette, i can see there's a huge comment right next to it saying the command k command palette mounted inside the active diagrams or rather the shared diagram editor over its canvas. i'm kind of not happy about these large comments and they are kind of everywhere in my code base because it's more surface that the agent needs to update. and so i'm going to add a comment here. i'm going to say. i'm not really a big fan of these comments because they leave a huge surface for the agent to update and they don't really add a lot that isn't already explained by the code. i think i'd like you to add something to coding standards to make these comments much less prevalent. and i think we should have a conversation about maybe banning comments in certain parts of the code base. so i'm going to comment here and then i'm going to show you what i'll do with those comments later on. for instance, here i really don't like the as keyword in typescript. it can be used to cheat the typescript, which i hate. So I want to say a helper function is needed here in order to ban all uses of as not inside shared utilities. This is just something I know because I am a, you know, I suppose an ex TypeScript expert. I made a course on TypeScript basically. Again, these docs here just sort of feel pretty gnarly. I don't like this. You can see how much the diff as we're going through is literally just code comments. It really is brutal. But overall, this review didn't take too long and I've noticed a couple of things that we might need to improve. So next we go to the next PR in the list, which is just a relatively small change again. We've got some reducer testers, which I really, really like. If you've never used a reducer before, It's just so nice, so easy to work with. Again, more comments that I just want to kill, man. This repo is full of comments. There's also another TypeScript thing that I really don't like, which is using this pick and this and here. Prefer using interface extends to using intersections. See if you can find a lint rule for this that we can ratchet. That phrasing, by the way, like lint rule, it's asking it to find a deterministic rule that we're not necessarily going to impose on day one, but we're going to ratchet up over time. Again, so many comments here to review. It's just, it's getting pretty disgusting, I have to say. Another one here is that even in code that is not actually touched by the PR, I'm noticing it's calling fetch and then ignoring the result. And I say it feels like a reusable function is needed here. I'm being pretty harsh in these reviews, right? Like I'm I'm trying to force it to design APIs that remove all of the nuance, all of the decisions from the agent. Another one here is I can see we have a use search params hook and we're grabbing things using magic strings here. It would be very, very easy to just change the name of this highlight or this snapshot even and we would get no type errors from it. Find a more type safe design for the way that we access search parameters since this feels like a magic strings style hole that we could potentially fall through. Create a new lint rule banning the use of use search params. And then let's create a strategy to ratchet it up. Again, I'm being super ambitious here. I'm saying, okay, everything that we find in here, I never ever want to see this again, never ever want to loot, like I want to lint it out of existence. That's my plan. Next PR again, we're up to 500 lines here. Gotta say that apart from the comments here, this is a clean, clean PR. We can see it's taken a bunch of like magic conditionals here and it's replaced them with a single source of truth for is diagram search. Phenomenal. Again, just way too many comments here, too many comments. Okay, so I'm now into the, I think, penultimate one or maybe last but couple. Let's see. Yeah, this is still a two-way door thing, I think, here. And this is now we're getting up to about 2,500 lines. Now, I think you've got the idea of what I'm reviewing for here, which is I am trying to. Give my opinion, give my feel just by looking at the code. And I think reviews are a good surface for this, but I'm not going to consider any of these blocking. In fact, out of all of these PRs, the only one where I would consider reviewing mandatory is this one. This is an additive migration for the thumbnail diagrams concept. And what I want to see is inside schema dot ts here. This adds the thumbnail diagram into the thumbnails here. Ugh, so many freaking comments here, guys. Comments are also an opportunity for the agent to do like. to specific text or text that's specific to its session. In other words, this session is or this text is basically just like a note for itself in a future session, which is really frustrating because then that is just going to live forever that comment and it's just totally useless. Overall, this looks really solid. So actually, I'm happy with the one way stuff as part of this big PR. So what I'm going to do is go back to my agent session. I'm going to compact and then I'm going to say, could you merge all of those PRs in order, please? Ignore all of the review comments for now. We're going to tackle those in a minute actually once everything is merged. Could you run the merge in a background subagent so that we can continue chatting? Okay, let's fire this off. So. now that we've decided that the merge is happening, like, i'm going to assume that in your version of this, you would have actually cloned it locally or actually, you know, check that it was all working on the final branch. i'm fine with checking it in a minute. but what i'm going to do now is i'm going to use this session to fix or make a plan to fix all of the things i found during review.
既然说到这里,我们不妨聊聊人工审查,以及这次实践的目的是什么。 在这种情况下,我会进行人工审查,因为我知道你们正在看,而且…… 你们也想了解我是如何进行人工审查的。 所以我会逐行审查。 但我是在说你们需要自己逐行处理或逐行审查吗? 不,我认为没必要。 像这样审查代码时,我显然想确保它能正常运行。 所以如果这要部署到生产系统,我会把它克隆到本地,或者找一个测试环境,逐步检查它是否正常运行。 我实际打算做的是先合并所有内容,然后因为只有我一个用户,所以最后再进行审查。 但在这里检查代码的重点是,我关心的不只是代码的功能。 我还关心生成这些代码的系统。 换句话说,如果我发现代码中有问题,或者有我不喜欢的模式,我想做的就是创建一条 lint 规则之类的东西,确保它不会再次发生。 我说的不喜欢,是指我想对想要改变的东西提出一个假设: 它正在对我的智能体运行的环境产生负面影响。 换句话说,我可以在这个文件里看到,比如命令面板旁边有一大段注释,说 Command K 命令面板挂载在活动图表内,或者更准确地说,是挂载在共享图表编辑器的画布上方。 我对这些大段注释不太满意,而且它们在我的代码库里几乎无处不在,因为这增加了智能体需要更新的内容。 所以我要在这里留一条评论。 我会这样说: 我不太喜欢这些注释,因为它们给智能体留下了大量需要更新的内容,而且除了代码本身已经说明的内容,它们并没有提供多少额外信息。 我想请你在编码规范中增加一些内容,让这类注释大幅减少。 我认为我们应该讨论一下,是否要在代码库的某些部分禁止注释。 所以我会在这里发表评论,稍后再向你们展示我会如何处理这些评论。 比如说,这里我真的不喜欢 TypeScript 中的 as 关键字。 它可以用来欺骗 TypeScript,而我讨厌这一点。 所以我想说,这里需要一个辅助函数,以便禁止在共享工具函数之外使用 as。 这只是我知道的一件事,因为我,你知道,我想我算是个前 TypeScript 专家。 我基本上做过一门 TypeScript 课程。 再说一遍,这里的文档感觉相当难搞。 我不喜欢这样。 你可以看到,我们查看的这些差异中,有多少纯粹是代码注释。 真的太夸张了。 不过总体来说,这次审查没花太长时间,而且我发现了几个我们可能需要改进的地方。 接下来我们看列表中的下一个 PR,同样只是一个相对较小的改动。 这里有一些 reducer 测试工具,我非常非常喜欢。 如果你之前从没用过 reducer,它真的很棒,用起来很方便。 又是更多我只想删掉的注释,真是的。 这个仓库里到处都是注释。 还有另一个我真的不喜欢的 TypeScript 写法,就是这里使用 Pick 和这个 and。 优先使用 interface extends,而不是交叉类型。 看看能不能找到一条可以逐步收紧的 lint 规则。 顺便说一下,像“lint 规则”这样的措辞,是在让它找一条确定性的规则;我们不一定从第一天就强制执行,但会随着时间推移逐步收紧。 又有这么多注释要审查。 只是,我得说,这变得相当糟糕了。 这里还有一个问题:即使在这个 PR 实际上没有涉及的代码里,我也注意到它调用了 fetch,然后忽略了结果。 我觉得这里需要一个可复用的函数。 我在这些审查里相当严厉,对吧? 我是想强迫它设计出这样的 API,把所有细微差别和决策都从智能体那里剥离出去。 这里还有一个问题:我看到我们用了 useSearchParams hook,而且在这里用魔法字符串获取数据。 只要改一下这个 highlight 或者 snapshot 的名字,就很容易出问题,而我们不会收到任何类型错误。 为访问搜索参数的方式找一个类型更安全的设计,因为这里感觉像是一个魔法字符串式的漏洞,我们可能会因此踩坑。 创建一条新的 lint 规则,禁止使用 useSearchParams。 然后制定一个逐步加强这条规则的策略。 再说一次,我这里的目标非常激进。 我的意思是,好吧,我们在这里发现的所有问题,我再也不想看到了,再也不想……我是说,我想用 lint 把它们彻底消灭掉。 这就是我的计划。 又是下一个 PR,这里已经到 500 行了。 不得不说,除了这里的注释之外,这是一个非常干净的 PR。 可以看到,它把这里一堆魔法条件判断替换成了 isDiagramSearch 的单一事实来源。 太棒了。 还是那句话,这里的注释实在太多了,太多了。 好,现在我看到的,我想是倒数第二个,或者倒数第三个。 看看吧。 对,我觉得这里仍然是个双向门决策。 现在代码已经增加到大约 2,500 行了。 现在,我想你已经明白我审查时关注的是什么了,也就是我正试图…… 仅凭阅读代码来发表我的看法,说说我的感受。 我觉得审查是提出这些意见的好地方,但我不会把其中任何一条视为阻碍合并的问题。 事实上,在所有这些 PR 中,我认为唯一必须审查的就是这个。 这是针对缩略图图表概念的一次增量迁移。 我想看的是这里 schema.ts 里面的内容。 这里把缩略图图表添加到了 thumbnails 中。 唉,伙计们,这里的注释也太他妈多了。 注释也给了 agent 一个机会,可以写一些…… 针对特定内容或特定于当前会话的文本。 换句话说,这个会话,或者说这段文本,基本上只是它给自己未来的会话留的一条备注。这真的很令人沮丧,因为那条注释会一直留在那里,而且完全没有用。 总体来说,这看起来很扎实。 所以,实际上,我对这个大型 PR 中那些单向门的改动很满意。 所以我要做的是回到我的 agent 会话。 我要先压缩上下文,然后说:能请你按顺序合并所有这些 PR 吗? 暂时忽略所有审查评论。 等所有内容合并后,我们马上再处理它们。 你能让后台子 agent 执行合并,这样我们就可以继续聊天吗? 好了,我们开始吧。 那么。 既然我们已经决定要合并了,我假设你在自己操作时,会先把它克隆到本地,或者检查一下最终分支上的所有功能是否正常。 我待会儿再检查也没问题。 但我现在要利用这个会话,修复我在审查中发现的所有问题,或者制定修复计划。
and for that, i'm going to use the retro skill. i'm going to say. Could you take a look at all of the agent sessions that ran as part of this? And could you also pull in my review comments? And the retro skill essentially runs a retrospective on the process that we just saw. Even though we've run compact, it still has access to all of the sessions that ran before because they're just saved locally on disk. And it's going to use the GitHub CLI to pull in all of my comments, so it's going to have access to that too. Now, I will usually run retro after a big chunk of work like this, or I'll also just run it regularly, just checking up on my agent sessions. If you have some kind of software factory setup where you can automate this, then I would save your agent sessions somewhere in the cloud and then Retro can take a look at those and see what the agent struggled with. So it's going off and sending agents through the thirty odd session transcripts and your twelve review comments and it's going to come back with a ranked list. So we're essentially throwing a bunch of tokens at this and looking for improvements or potential improvements to the environment our agents are operating in. Now we didn't pay attention at all to the implementers while they were running. I didn't look at the sub agent traces, haven't looked at that at all. This is our opportunity to apply, um, some tokens to it and actually look at those and get some improvements from it. Okay, and here we go. We have the retro back. So all 12 of my review comments have one root cause. Nothing in the CVM's written standards cover your points. The existing code in the docs model do the opposite. So existing stuff in coding standards. md and docs frontend state show the patterns you rejected and main already has thousands of instances. Thousands of instances. Blimey. Okay, so I am trying to turn an oil tanker around apparently. And also the prototype branch was copied. Okay, so its first recommendation is to turn your comments into ratcheted checks. The first one is as outside shared utilities. Yes, lovely, sounds good. There, that is 2,000 instances it will find, okay, brutal. Intersections into interface extends, oh excellent, has no rule for this, but a small parser, so it's basically saying create a custom lint uh rule for this rule, excellent. Next, I said we should kill useEffect, lovely job. We turn it off for a specific directory, so hooks, and there are currently around 230 useEffect in 140 files. Next, we have useSearchParams and magic strings, so this would point at a new typed SearchParams helper, lovely. We ban raw fetch and instead we have a typed API client module. And then it's saying too many comments, so here no lint rule fits. Yeah, I don't know what to do about comments. I mean like Lauren Tan, Potato, says they just ban comments. no comments allowed. and i kind of want to go that direction, but i wonder whether we do that in a phased approach where we ban comments in certain folders. this is interesting. so 18% of lines are comments in the new features diagrams against a 12% repo average. 12% of code in my repo is comments and 20% of the new feature is comments. it's crazy. okay, i really like number one. all of those, i think, should be raised as issues on the repo. Can we also start trialing the no comments rule in certain folders? And actually, I want you to give me your opinion on what we would lose inside features diagrams if we just deleted all the comments immediately. Is there any information contained within the comments that cannot be divined from the code itself? Okay, number two, it says fix the docs that teach the rejected patterns. Obviously, yes. Number three, prototype code was copied and not reimplemented. Yeah, this is interesting. So it's actually recommending a change to my skills about the prototype skill and the implementer implement spec implementer brief. For number three, could you raise an issue on the Matt Pocock skills repo? By the way, this is often how my skills get improved is I raise issues about my own skills based on what I find in these retros and they get subtly improved. The reviewer can't cover a big diff with one agent. Yep, so this is the code review skill kind of not being able to perform at its limits. Can you raise an issue for number four, please? And I think there might be an existing. issue, so maybe you can just add this as a kind of extra, you know, reason for me to look at it. there's an argument to say that you should do instead of like doing automated review on the spec, you should do it on every single ticket. but i found that that's just, you know, extraordinarily slow. it's an absolutely hugely slow approach. but it looks like the code review skill is kind of like, you know, taken under a 400 word limit, which doesn't make sense to me. so i think maybe the code review skill might need to change, might need to divide more chunks of it into sub-agents so that it can more easily do it. okay, it's asking some stuff about the implement spec skill. with number six, i really like that idea. it's basically saying that in implement spec, it's... creates a merger agent too early, it should just try to like merge it indirectly. For number seven, could you raise an issue about this and see if we can hill climb towards a like a faster suite. And number eight, there's a skill I have called verify CVM, which basically kicks in every time I want to verify some code or an implementation on the CVM. It runs it inside a browser, um, does all sorts of stuff. Okay, could you add eight as an issue? And all of number nine, all the smaller items should be added as separate issues. That all looks great. So honestly, this retro was extremely, extremely good. We've, I think we might get like 20 issues out of this. things that can go like that we probably don't have to grill on, things that we can just pass off to agents and get prs back from, that will over time slowly improve the repo. while this has been running, our agent has been merging. it looks like it's just sort of waiting for all of the ci checks to complete, and then it just merges each one in turn.
为此,我要使用 retro 技能。 我会这样说: 你能看看这次过程中运行过的所有智能体会话吗? 还能把我的审查评论也调取过来吗? retro 技能本质上就是对我们刚才看到的过程进行一次复盘。 即使我们运行过 compact,它仍然可以访问之前运行过的所有会话,因为它们就保存在本地磁盘上。 它会使用 GitHub CLI 调取我的所有评论,所以也能访问这些内容。 像这样完成一大块工作后,我通常会运行 retro;我也会定期运行它,检查一下我的智能体会话。 如果你有某种可以实现自动化的软件工厂环境,我建议你把智能体会话保存在云端的某个地方,这样 Retro 就可以查看它们,找出智能体遇到的困难。 它现在正在派出智能体查看那三十多个会话记录和你的十二条审查评论,然后会给出一份按优先级排序的清单。 所以我们本质上是在投入大量 token,寻找对智能体运行环境的改进或潜在改进。 刚才实现任务的智能体运行时,我们完全没有关注它们。 我没有查看子智能体的执行轨迹,一点儿都没看。 现在正是我们投入一些 token 来实际查看这些内容,并从中找到改进机会的时候。 好了,结果出来了。 复盘结果出来了。 所以我的12条审查意见都有同一个根本原因。 CVM的书面标准中没有涉及你提出的这些点。 docs model中的现有代码恰恰反其道而行。 所以,现有的coding standards md和docs frontend state展示的都是你不认可的模式,而main中已经有数千处这样的代码。 数千处。 天哪。 好吧,看来我这是在试图让一艘油轮掉头。 而且原型分支是复制过来的。 好,所以它的第一条建议是把你的意见转化为逐步收紧的检查规则。 第一条是针对共享工具之外的as。 是的,太好了,听起来不错。 这会找出2,000处,好吧,够狠的。 把交叉类型改成interface extends,哦,太好了,目前没有针对这个的规则,但可以用一个小型解析器,所以它基本上是在说为这条规定创建一个自定义lint规则,太好了。 接下来,我说我们应该去掉useEffect,干得漂亮。 我们在特定目录hooks中禁用它,目前140个文件中大约有230处useEffect。 接下来是useSearchParams和魔法字符串,所以这会指向一个新的类型化SearchParams辅助工具,很好。 我们禁止直接使用fetch,改用一个类型化的API客户端模块。 然后它说注释太多,这里没有合适的lint规则。 是啊,我不知道该怎么处理代码注释。 我是说,Lauren Tan,Potato,说他们直接禁止写注释。 不允许写注释。 我也有点想往这个方向走,但我在想是否可以分阶段实施,先在某些文件夹里禁止写注释。 这很有意思。 新功能图表里有18%的行是注释,而整个仓库的平均比例是12%。 我的仓库里有12%的代码是注释,而新功能里有20%是注释。 太疯狂了。 好,我很喜欢第一点。 我觉得所有这些都应该在仓库里提 issue。 我们能不能也开始在某些文件夹里试行禁止写注释的规则? 实际上,我想听听你的看法:如果我们立刻删除功能图表中的所有注释,会损失什么? 注释里有没有什么信息是无法从代码本身推断出来的? 好,第二点说要修正文档中教授那些已被否决的模式的内容。 显然要修。 第三点,原型代码被直接复制了,而不是重新实现。 是啊,这很有意思。 所以它实际上是在建议修改我的 skills,涉及 prototype skill 和 implementer implement spec implementer brief。 关于第三点,你能在 Matt Pocock 的 skills 仓库里提一个 issue 吗? 顺便说一句,我的 skills 经常就是这样得到改进的:我根据这些复盘中的发现,给自己的 skills 提 issue,然后它们就会得到一点点改进。 审查者没法只靠一个智能体覆盖大规模代码改动。 对,所以代码审查技能在达到能力极限时就有点力不从心了。 请你为第四项提个 issue,好吗? 而且我觉得可能已经有一个相关的 issue 了,所以也许你可以把这作为一个额外理由补充进去,让我有理由去看看。 有人可能会认为,不应该对规范进行自动化审查,而应该对每个工单都进行审查。 但我发现那样实在是太慢了。 那种方法慢得离谱。 不过看起来代码审查技能似乎被限制在 400 词以内,这让我觉得说不通。 所以我觉得代码审查技能可能需要调整,把更多部分拆分给子智能体,这样就能更轻松地完成审查。 好的,它在询问一些关于 implement spec 技能的事情。 第六项,我非常喜欢这个想法。 它基本上是在说,implement spec 过早创建了合并智能体,应该先尝试间接合并。 关于第七项,你能为此提个 issue,看看我们能不能通过逐步改进让测试套件运行得更快吗? 至于第八项,我有一个叫 verify CVM 的技能,每次我想在 CVM 上验证代码或实现时,它基本上都会启动。 它会在浏览器中运行代码,呃,还会做各种事情。 好的,你能把第八项作为一个 issue 提出来吗? 第九项中的所有小项都应该分别作为独立的 issue 提出来。 这些看起来都很棒。 说实话,这次复盘非常非常好。 我觉得我们可能能从中整理出大约20个问题。 这些事情可能就是这样,我们大概不必逐一细究,直接交给智能体,让它们返回PR,随着时间推移慢慢改进代码仓库。 在这个任务运行的同时,我们的智能体一直在合并代码。 看起来它只是在等所有CI检查完成,然后逐个合并。
all right, while that's going on, we have our comment audit has come back. so it's saying of the about 2,000 lines of comments, about 940 can go now. and about a thousand explain a reason you can't see in the code. it says seven comments are already stale. there you go. and there are no eslint disable or ts expect error directives to worry about. okay, let me lay into the agent for a second. the thing that concerns me about comments is that they allow workarounds to proliferate. and the comments kind of act as a fig leaf that the agent is able to put there and say, look, this is fine because we've got an explanatory comment. The, you know, idea behind lots of folks like Lauren Tan is that the comments are actually a safety valve that you are using too often, that you are basically saying, okay, um, because I've got this comment, I'm allowed to do the workaround. Whereas if you were banned from doing the comment, you might actually not take the workaround. All this to say, what I would like you to do is to tell me which of these could be moved into ADRs, which of these could actually just become non-workarounds, in other words, use something you don't need a comment for. and which of them could just disappear because they're not actually needed or you can actually infer it from the code. i want you to be more aggressive here. let's see what it says here. i don't know. let's see. okay, guess what? it agrees with me. the comment next to a workaround often marks a place where the code should have been designed differently, not explained. haha. it's guessing that the tl draw and command k quirks mostly become adapter wrappers. the race constraints mostly become test names. yeah, that's a legitimate place to have some kind of like... Free text is just like the name of a test. And while that has happened, our PR, the mega PR stack has now been merged to production. So I've got this loaded up. We should be able to capture my face here. And there we go. We have my face and we can see that I can add text to the thumbnail like this. So I can add a big box here that my hand is kind of pointing to. I can go all the way down and I can see that is how it's going to look. There's like a button here saying a dark panel behind the drawing. So I can take that out or put that in if I want to. And I mean it's pretty good guys. Like that is not bad. If I exit out to here, then we can see my thumbnail is ready to go. I can select it when I then upload it to YouTube. I can click back through and edit it and back we are should be back to this screen here. Nice. So you can see exactly how much fidelity it has to the prototype that we created. It seems to be working okay. I probably do have some like follow up feedback here, but overall, yeah, I can insert icons. Let's just add this one. one, for instance, bam, like that. put that on my finger. lovely. and there we go. just like that, i've built a feature, something that i will enjoy using for the rest of the time that i use this application. and inside our agents view here, we can see that, yes, okay, when i tell it to be more aggressive, it says 22 can simply be deleted. there are 18 workarounds that need changing. look at that. i mean, that is wild. i feel like there might be a skill here, you know, like. Just looking at all of your comments that are in the repo and just using those as smells and just say, okay, sniff, sniff, sniff, take a look at that comment, see what workaround it's describing. Can we just get rid of the workaround, get rid of the comment? And it does say that there are three ADRs. Yeah, there you go. So CVM custom shapes are a persistence contract, face cam centering is tuned by eye, diagram PNGs render in the running app. All three of which I agree make good ADRs. And it's giving me a suggested PR order here. So let's prompt it one more time just to tie this up. I want you to take all of these findings and put them in one more issue that will be the kind of umbrella issue for this idea. And that, as they say, is that.
好了,在这进行的同时,我们的注释审查结果已经出来了。 它说大约2,000行注释中,现在有大约940行可以删除。 还有大约1,000行解释了无法从代码中看出的原因。 它说有七条注释已经过时了。 你看吧。 而且没有需要担心的eslint disable或ts expect error指令。 好吧,让我批评一下这个智能体。 我对注释的担忧是,它们会让变通方案泛滥。 注释有点像一块遮羞布,智能体可以把它放在那里,然后说,看,没问题,因为我们有一条解释性的注释。 你知道,像Lauren Tan这样很多人的观点是,注释其实是一个被你过度使用的安全阀:你基本上是在说,好吧,嗯,因为我写了这条注释,所以我可以采用这个变通方案。 但如果不允许你写注释,你可能就不会采用这个变通方案了。 说了这么多,我希望你告诉我,这些注释中哪些可以移到ADR里,哪些对应的变通方案其实可以取消,换句话说,采用不需要注释的方案。 还有哪些可以直接删除,因为它们实际上并不需要,或者你可以直接从代码中推断出来。 我希望你在这方面更大胆一些。 我们看看它怎么说。 我不知道。 让我看看。 好,你猜怎么着? 它同意我的看法。 变通方案旁边的注释,往往标志着代码本该采用不同的设计,而不是靠注释解释。 哈哈。 它猜测,tldraw 和 Command K 的那些特殊行为大多会变成适配器封装。 竞态约束大多会变成测试名称。 对,那确实是一个可以用某种……自由文本的地方,就像测试的名称一样。 与此同时,我们的 PR,也就是那一大摞 PR,现在已经合并到生产环境了。 所以我已经把这个加载好了。 我们应该可以在这里拍到我的脸。 好了,出来了。 我的脸出现了,而且可以看到,我能像这样给缩略图添加文字。 所以我可以在这里添加一个大框,让我的手大致指向它。 我可以一直往下滚,就能看到最终的效果。 这里好像有个按钮,可以在绘图后面加一个深色面板。 所以我可以根据需要把它去掉或加上。 我是说,伙计们,这已经相当不错了。 真的不赖。 如果我退出到这里,就可以看到我的缩略图已经准备好了。 然后上传到 YouTube 时,我就可以选中它。 我可以点击返回并编辑它,然后我们应该就会回到这个界面。 不错。 所以你可以清楚地看到,它与我们创建的原型有多吻合。 看起来运行得还不错。 这里我可能还有一些后续反馈,不过总体来说,没错,我可以插入图标。 我们就添加这个吧。 比如这个,啪,就这样。 把它戴在我的手指上。 真好。 好了,搞定。 就这样,我做出了一个功能,以后使用这个应用时,我都会很乐意用它。 在我们的智能体视图里可以看到,没错,当我让它更激进一些时,它说有 22 个可以直接删除。 有 18 个变通方案需要修改。 看看这个。 我的意思是,这也太惊人了。 我觉得这里或许可以做成一个技能,你知道,就是…… 查看代码仓库里的所有注释,把它们当作代码异味的线索,然后就说,好,嗅一嗅,看看那条注释,了解它描述的是什么变通方案。 我们能不能直接去掉这个变通方案,也把注释删掉? 它确实说有 3 个 ADR。 对,就是这样。 所以,CVM 自定义形状是一项持久化契约,摄像头画面的居中位置靠目测调整,图表 PNG 在运行中的应用里渲染。 我也认为这三点都适合写成 ADR。 它还在这里给我建议了一个 PR 顺序。 所以我们再提示它一次,把这件事收个尾。 我希望你把所有这些发现整理到另一个 issue 里,让它成为这个想法的总括性 issue。 俗话说,这就算完事了。
Now what I would do next is I would go into the thing that I just created. I would um try to find anything that I could improve and QA it. And then those would go into issues, which I would then just slam through with an agent, probably not even grill them. I would then go back through the issues, get my agent to take a look at all of them and turn those into codebase improvements. And all of those, I would expect the diff to be really, really small, and so I could just one shot them. But that is it, folks. Hopefully you enjoyed this kind of deeper dive of me actually walking through how I do things. And hopefully you get a good sense for like where I am most valuable in this process. I'm most valuable early on in the alignment phase where we talk through everything, we get alignment, I understand exactly what's being built. i create a prototype, we figure that all out together. and then i am really useful at the end where my technical expertise can come in and i can impose my coding standards. and i can say, no, that looks bad, let's do this instead. in other words, grilling and retro are really the two main points at which i interact with the system. and then, of course, you know, qa and, you know, putting in my taste, making sure that everything feels right and is working how i want it to. but thank you so much for watching. hopefully you enjoyed this. wow, nearly. hour and 10 minute video so far and that you learn something from it. i love doing these deep dives. i don't get enough time to do them. so, you know, if you like this, then do share it with your friends and that will incentivize me to make more of them. thanks so much for watching. see you very soon.
接下来,我会进入刚刚创建的东西。 我会,嗯,尝试找出任何可以改进的地方,并进行质量检查。 然后把这些问题写成 issue,再交给智能体快速处理,可能连详细盘问都不用。 之后我会回头检查这些 issue,让智能体查看所有问题,并据此改进代码库。 我预计这些改动的 diff 都会非常非常小,所以可以一次性完成。 好了,各位,就是这样。 希望你喜欢这次更深入的讲解,看我实际一步步展示自己的做事方式。 也希望你能清楚地了解,我在这个过程中的价值主要体现在哪里。 我的价值主要体现在前期的对齐阶段:我们把一切讨论清楚,达成共识,让我确切了解正在构建什么。 我创建一个原型,然后我们一起把所有问题弄清楚。 然后在最后阶段,我也很有用,因为我的技术专长能派上用场,我可以贯彻自己的编码标准。 我可以说:不,这样看起来不好,我们换个方式。 换句话说,深入盘问和复盘是我与系统交互的两个主要环节。 然后,当然,还有质量测试,以及融入我的个人品味,确保一切感觉都对,并且按我想要的方式运行。 非常感谢你的观看。 希望你喜欢这个视频。 哇,到目前为止,这个视频差不多已经有 一小时十分钟了,也希望你从中学到了些东西。 我很喜欢做这种深入讲解。 但我没有足够的时间来做。 所以,如果你喜欢这个视频,就请分享给你的朋友,这会激励我制作更多这样的视频。 非常感谢你的观看。 很快再见。
Matt Pocock 以个人视频管理应用的缩略图编辑功能为例,展示从需求探索到交付复盘的完整 AI 辅助开发流程。他先通过问答澄清用户痛点、领域术语和数据模型,再用多个原型验证交互,将结果整理为规格与任务,交由代理并行实现。面对约两万一千行新增代码,他拆分 PR、进行人工审查,并用复盘把问题转化为编码规范、工具规则和后续议题。全过程强调人在前期对齐、产品体验判断及后期质量改进中的作用。
原有缩略图流程需要在画图工具中截图,再粘贴到人像旁边;位置不合适时还要重新截图,缺乏编辑灵活性。目标是在缩略图画面中直接编辑图形,同时保留人像。由于预计改动较大,Matt 选择 Grill with Docs 与 Claude Code 探索需求,而不是直接让代理一次性实现;如果规模进一步扩大,还可以转入多会话工作流。
初始提示重点描述为什么需要改进,而非规定具体方案,让代理提出关于图形存储、编辑模式和人像位置的问题。需求逐步收敛为先拍人像、允许水平移动或重拍、暂时只处理图形。现有 glossary 将 diagram 定义为一组快照,并区分 active diagram 等概念;共享术语让人与代理能讨论新功能与既有模型的关系。编辑区域是否足够好用则留给原型验证。
代理并行制作原型,同时讨论缩略图中的图形是否属于既有 diagram 或 snapshot。架构决策记录(ADR)保存了旧设计的原因,帮助避免不理解原意就修改成熟结构。最终倾向于将缩略图图形与教学图形分开:两者使用相同场景格式,可以复制内容,并可记录来源快照以保留未来关联的可能。代理擅自创建 ADR 后,Matt 要求解释,认可其记录非显而易见权衡的理由。
通过比较 thumbnail diagram snapshot、thumbnail diagram 和 thumbnail scene 在不同句子中的含义,团队选择更符合自然表达的 thumbnail diagram,并用 ADR 解释它并非既有模型中的 diagram。功能从空画布开始,每个缩略图拥有一个图形,可搜索并插入已有图形和组件;缩略图编辑器与图形编辑器应共享组件库及编辑界面。删除来源时倾向归档而非硬删除,但不把全系统软删除扩展成当前任务。
三个原型中,A 的人像与画布组合最接近需求;人像直接置于画布内的 B 过大,分屏的 C 则让用户难以对应画面。Matt 保留 A,要求降低人像移动灵敏度、加入组件和图形搜索,并让人像调整与绘图共享撤销历史。迭代版加入页面预览及插入功能。针对预览边缘白条,代理构建浏览器复现并检查像素,最终将其归因于 Windows 125% 缩放下的浏览器预览渲染。
Matt 认为较长上下文不一定有固定的失效阈值,但可能降低代理工作质量并增加成本;独立问题可考虑交给全新上下文的子代理。需求对齐后,他生成规格和九个任务:规格定义最终状态,任务限定各次实现的范围与依赖,部分任务可并行。规格包含约 47 条用户故事、实现决策和范围外内容,并引用原型;压缩对话后,代理依据这些材料离线实现。
实现产生约 21000 行新增代码,自动审查发现一项严重违规和若干范围蔓延问题并着手修复。为模拟有大量用户的生产环境,Matt 要求代理把大 PR 拆为可独立审查的堆叠变更:尽量先合并可回退的“双向门”,将难以回退的变更留到最后,并考虑用功能开关让新旧实现暂时并存。最终形成七个 PR,首个术语和 ADR 变更通过 CI 后合并。
人工审查不仅检查代码,还寻找生成过程中的系统性问题。Matt 对大量重复代码含义的注释、TypeScript 类型断言、交叉类型、忽略 fetch 结果和搜索参数中的魔法字符串提出意见,希望通过共享工具、类型安全 API 和逐步收紧的 lint 规则减少重复问题。他特别审查了涉及缩略图数据的迁移;由于这是只有自己使用的应用,他选择先按顺序合并,再实际测试,而非要求所有意见阻塞合并。
Retro 分析约 30 个代理会话和 12 条审查意见,发现现有文档与代码示例没有覆盖甚至示范了被拒绝的模式。建议包括修正文档、逐步引入类型断言及搜索参数等检查、提供类型化 API 客户端,以及改进原型复制和大型代码审查流程。Matt 要求把这些建议建成议题,并考虑让多个子代理分块审查大 diff;这些议题将用于持续改善代码库和技能。
注释审计初步认为约 2000 行注释中,约 940 行可删除,约 1000 行解释了代码中不可见的原因,另有七条已过时。Matt 担心注释成为保留变通方案的借口,要求进一步区分可删除内容、应改为设计或适配器的变通方案,以及适合写入 ADR 的理由。PR 合并后,他实际拍摄人像、添加文字和图形、查看预览并重新编辑,认为成品与原型相当接近。
后续工作包括继续试用和 QA,将发现的问题记录为议题,再交给代理处理较小改动。Matt 认为自己最有价值的环节是前期通过需求讨论和原型达成一致,以及后期运用技术判断、编码标准和产品品味审查结果;实现阶段则尽可能缩小代理需要自行决策的空间。
09:50 先明确用户痛点、领域语言和数据模型,可以让后续代理实现更可预测。
16:35 ADR 应记录关键设计背后的原因,帮助后来者理解既有约束。
36:41 多方案原型能暴露仅靠讨论难以判断的交互问题,并缩小实现阶段的决策空间。
44:07 规格定义目标,拆分后的任务限定各代理的工作范围和依赖。
49:05 大型变更可以拆成可独立审查、尽量可回退的堆叠 PR,以降低交付风险。
52:55 人工代码审查不仅用于发现当前问题,也应推动编码规范和自动检查的持续改进。
58:36 代理复盘应结合会话记录和人工审查意见,把反复出现的问题转化为具体改进任务。
68:41 人的价值集中在前期需求对齐与原型判断,以及后期技术审查和体验验证。