Watch me ship a 21,000-line feature with mattpocock/skills — Transcript
Full transcript
- 0:00You've been asking again and again and
- 0:02again for me to show you what my
- 0:05development process looks like. I've
- 0:06done a tiny little bit of it on this
- 0:08channel, but not nearly enough. And
- 0:10since I did it, I've come into
- 0:11possession of one of the most starred
- 0:14repos in the world, which is my skills
- 0:16repo, and certainly the most starred
- 0:18skills repo in the world. And so, I do
- 0:19think I owe it to you to show off how I
- 0:22use these skills in something more than
- 0:24a tutorial, in a real walkthrough. And
- 0:26in this walkthrough, we're going to
- 0:28focus especially hard on two skills. The
- 0:30first one is going to be the grill with
- 0:32doc skill. And I think grilling is
- 0:35really much more of an art form than
- 0:37most people assume. In this walkthrough,
- 0:39I really focus a lot more on the domain
- 0:41modeling aspects of it. In other words,
- 0:42the kind of classic DDD skills that
- 0:45allow you to basically say, "Okay, I've
- 0:47figured out the language of my
- 0:48application." And so once I've figured
- 0:50out the language, then I've actually
- 0:52figured out the app and figured out what
- 0:53I want to build. In this video, you see
- 0:55me go through that process on a real
- 0:57feature that I will use from now on,
- 1:00even to build the thumbnail for this
- 1:01video. And the next skill I go deep on
- 1:03is the retro skill, which is we look
- 1:05back on the huge chunk of sessions. I
- 1:07think we do like 30 sessions in this
- 1:09video, and we suggest a bunch of
- 1:11improvements. I'm going to walk through
- 1:12a real huge I think 25,000 line PR. I'm
- 1:16going to do some real human review on it
- 1:18and show you how that human review can
- 1:20then go back and influence and impact
- 1:22the system going forward. Now, if you're
- 1:23interested in this stuff, then the AI
- 1:25coding crash course that I have is
- 1:27absolutely the place that you need to be
- 1:28if you want a more structured approach.
- 1:30But with that, let's get cracking. Let's
- 1:32dive in. So, this is where all of my
- 1:34courses get created. All of my videos
- 1:36get created. It's a video editor, a
- 1:38thumbnail editor, a AI writer. It helps
- 1:42me schedule things. It's creates shorts.
- 1:44It does all sorts of stuff. And the bit
- 1:46that I'm particularly interested in
- 1:47right now is this little thumbnail
- 1:49creator down here. This is where I can
- 1:51post the video that I'm creating and
- 1:53editing right now and I can create a new
- 1:55thumbnail. And this is essentially a
- 1:57process where I capture my face and then
- 2:00my face goes into the thumbnail and I
- 2:02can create a diagram with it. For
- 2:03instance, I just stopped recording so
- 2:05that I could take this still. This
- 2:06allows me to move this left and right.
- 2:08And then in here in my diagram creator,
- 2:10I can essentially screenshot this part
- 2:13of the window here. And what that will
- 2:16do is I can then copy and paste it into
- 2:18the thumbnail. So if I press Ctrl +V
- 2:20here, you can see it gets pasted in and
- 2:22then the cutout automatically gets cut
- 2:24out by this nice API. I can position
- 2:26these and I have my thumbnail. Now this
- 2:28is pretty nice, but what I would really
- 2:30like to do is remove a bit of friction
- 2:32here. It's annoying having to swap over
- 2:34to the diagram view and like have my you
- 2:37know it's it's like a annoyingly manual
- 2:39process, especially if I get things
- 2:41wrong. I can't quite position them
- 2:43correctly. I have to go back. I have to
- 2:45screenshot it again and try it again. I
- 2:47essentially I don't have enough
- 2:48flexibility here. What I really want is
- 2:50to be able to draw on this surface here.
- 2:52In other words, have the diagram kind of
- 2:54integrated with the picture of me there.
- 2:57I really don't have a clue on how I'm
- 2:59going to build this. I just know that
- 3:01it's something I want. And so I thought
- 3:02it would make a good candidate for like
- 3:04a new feature or an improvement and to
- 3:06sort of show you the whole process end
- 3:08to end. And so when I enter into a new
- 3:10piece of work, I start thinking through
- 3:12this decision tree, which is essentially
- 3:14what skill from my skills am I going to
- 3:17use? In other words, you have
- 3:18essentially a new session here. You want
- 3:20to create a new piece of work. You don't
- 3:21know what to choose. You first think
- 3:23through, okay, what is the thing I'm
- 3:24trying to create? And the thing I'm
- 3:26trying to create is essentially a diff.
- 3:28The diff between the old codebase and
- 3:31the new codebase. And if that diff is
- 3:33really small, then you can probably just
- 3:35oneshot the thing. So you don't need to
- 3:37worry about grilling before you
- 3:38continue. But in this case, I know that
- 3:40the thing we're creating is pretty big.
- 3:42And so I'm going to go with grill with
- 3:44docks. From there, if it ends up being a
- 3:47lot larger than I thought, that can
- 3:49always bail out into Wavefinder, which
- 3:51is what I use for turning initial
- 3:54grilling sessions, running them over
- 3:56multiple sessions, developing this huge
- 3:58great big um concept of what we're
- 4:00trying to build, and then going until we
- 4:02get there. But I prefer starting with
- 4:04grill with docs because if it ends up
- 4:06being smaller than I thought, then it
- 4:07means I don't have all the overhead of
- 4:09running a wayfinder session. The place
- 4:10I'm going to run this is inside my
- 4:12personal wiki, which is a home repo. If
- 4:16you don't know what a home repo is, then
- 4:17check out my accompanying video on that.
- 4:19The agent I'm going to use is Claude
- 4:21Code because that's the one I have a
- 4:22subscription to. That's what I'm set up
- 4:23for and that's kind of what I like. I am
- 4:25on the Claude Ultra plan. I have Opus
- 4:275.5 and I'm running it on medium effort.
- 4:30And of course, I have all of my skills
- 4:32installed and I also have a bunch of
- 4:33custom skills that are inside my home
- 4:35repo. My home repo is not open source,
- 4:37but most of the skills you're going to
- 4:38see are open source and there are
- 4:40aihero.dev/skills.
- 4:43So, we're going to start with grill with
- 4:45docs here and then I'm going to explain
- 4:46my problem through dictation and I'm
- 4:48using whisper flow for that. In the
- 4:50course video manager, we have a
- 4:52thumbnail viewer. And the thumbnail
- 4:54creator is okay. I like that it asks me
- 4:58and it sort of forces me to put my face
- 5:01onto the screen. But what I don't like
- 5:03is the sort of rigmarole I have to go
- 5:05through for attaching a diagram. Most of
- 5:07my diagrams are built in TL Draw and
- 5:11using the custom diagram playground that
- 5:13we have, but I don't have what I would
- 5:15really like is for the diagram to be
- 5:17able to be editable in the scene that
- 5:20I'm viewing. So, in the context of the
- 5:21thumbnail, in other words, I want my
- 5:23face visible and then to have the thing
- 5:26just editable next to me. I really don't
- 5:28know UIwise how we're going to handle
- 5:32that and what that's going to look like.
- 5:33So, I think there are a lot of questions
- 5:34to answer there. I want you to notice a
- 5:36couple of things about how I'm prompting
- 5:38there. The first thing is I'm thinking a
- 5:40lot about the why. I'm thinking a lot
- 5:42about the problem that I'm trying to get
- 5:44the agent to solve. I'm not necessarily
- 5:47giving it a, you know, decent sort of
- 5:50like idea of what exactly to do. If I
- 5:53give it the why, then the agent feels a
- 5:55lot more empowered to go away and
- 5:58actually produce a solution itself or
- 6:00maybe have a discussion about the
- 6:01solution. Whereas if you come to it with
- 6:03a what saying I want to do X Y Z then it
- 6:06will often not necessarily uh come up
- 6:09with that creative an answer. And so we
- 6:11can see here it's come back with a bunch
- 6:13of grilling questions here. It's asking
- 6:16first what is the rigma roll? What is
- 6:17the part of attaching a diagram that
- 6:19hurts most? I would say that A leaving
- 6:21the thumbnail creator is annoying and B
- 6:24is also annoying and C is also annoying.
- 6:28So I think you've put your finger on all
- 6:30three there to be honest. Is the
- 6:32thumbnails diagram the same as the
- 6:33videos diagram? When you edit the
- 6:35diagram inside the thumbnail, should the
- 6:36changes go back to the diagram the video
- 6:38uses? This is kind of a question about
- 6:40where do we want this diagram stored?
- 6:43You know, like should it be inspired
- 6:45from existing diagrams? Because in the
- 6:47application, you can see if I do a
- 6:48search here, then I can actually search
- 6:50for existing diagrams. So I found like
- 6:52this wavefinder diagram by just sort of
- 6:55like oh I've got a search, haven't I? So
- 6:56go to diagram wayfinder and then search
- 6:59all the diagrams that I've used. So this
- 7:01one for instance is good. This one's
- 7:03another one. So it's kind of asking how
- 7:05do we like associate these thumbnail
- 7:08diagrams with this list. And I'm not
- 7:10quite sure that with Q2. I'm not sure.
- 7:13I'm kind of not sure of the tradeoffs
- 7:14there really. I suppose the question is
- 7:16do I want the diagram to be sort of
- 7:19searchable inside the main list? Do I
- 7:22want it associated? I'm not quite sure
- 7:24what the use case is there. Q3. Starting
- 7:26from scratch. Should you be able to draw
- 7:27a new diagram straight in the thumbnail
- 7:29without any existing diagram? Q3, yes, I
- 7:32agree. That sounds good. With Q3 too, I
- 7:35kind of maybe want to be able to search
- 7:37existing diagrams. I like the be like
- 7:39ability to add components that we've
- 7:42already got. Maybe searching for stuff
- 7:44that we've already got or maybe I could
- 7:45just copy stuff in from one TL drawboard
- 7:47to another. I want you to notice at this
- 7:49point how loose the language is that
- 7:51we're using to describe the feature. It
- 7:53doesn't feel like we are particularly
- 7:56sort of we haven't figured out the right
- 7:58names for things yet. And so I'm having
- 8:00to use a lot of weird verbosity and
- 8:02shortcuts. It's not quite clear in my
- 8:04head still. As we go through this
- 8:05grilling process, the idea of what we're
- 8:07building is going to become clearer and
- 8:09clearer in my head until we end up with
- 8:11a nice set of words for the things we're
- 8:14building. And once we're there, we've
- 8:16kind of built the feature. So Q4 says,
- 8:18should there be one editing mode or two
- 8:19in the thumbnail? Should there be a
- 8:21single edit the diagram mode and a
- 8:23separate arrange mode? For Q4, I think
- 8:25the process should probably be that we
- 8:27take a photo of my face first. Then that
- 8:30face gets arranged onto the canvas and
- 8:33then we once my face is there, then we
- 8:36can sort of build the diagram around my
- 8:38face and I should have the option of
- 8:39retaking it. For Q5 is the face fixed.
- 8:43For Q5, I think I should have the option
- 8:45of moving the face horizontally. And
- 8:50from there, that would just give me a
- 8:51bit more flexibility. Q6, is this only
- 8:53about diagrams? Yeah, Q6, let's make it
- 8:56diagram only for now. I can't think of a
- 8:58use case where I want to attach other
- 9:00stuff inside the thumbnail. We don't
- 9:02want to build a second Figma. We just
- 9:03want to make this particular flow
- 9:04easier. Okay. So while we were answering
- 9:06those questions, the agent was going off
- 9:08spinning up a background agent and going
- 9:10to find the supporting information that
- 9:12we needed here. So it's actually going
- 9:14ahead and changing two of the questions
- 9:17here. And then Q7 says, should edit the
- 9:19diagram in place mean a live TLR editor
- 9:21clipped to the uh thumbnail frame with
- 9:23the camera locked so the area you see is
- 9:25the thumbnail? For Q7, I'm concerned
- 9:27that cramping us into that smaller space
- 9:30will mean that editing the thing or the
- 9:33thumbnail actually becomes kind of
- 9:35painful. And so I think we might need to
- 9:37prototype a few different approaches
- 9:38there. So that's a very detailed first
- 9:40response. Let's fire it off. Now you
- 9:42might be looking at this approach and
- 9:43you might be thinking, okay, what like
- 9:46what benefits this have over approaches
- 9:48that I'm taking over like plan mode.
- 9:50Let's say what this skill does and what
- 9:52this approach does is we align on the
- 9:54thing that we're building before we go
- 9:56ahead and build it. This means that
- 9:57we're going to get a much more
- 9:58predictable output. I'm going to have
- 10:00much stronger understanding over the
- 10:02thing that we're building. And like
- 10:04while it's building, I'm going to let it
- 10:06just sort of run by itself. But this is
- 10:08the moment early on when I get to maybe
- 10:11with my teammates align on what we're
- 10:13building, figure out what it actually
- 10:15is, what the words we're going to use
- 10:17about it, and then everything from that
- 10:19point all the way down to human review
- 10:20at the end is kind of going to be fairly
- 10:22on rails. So Q2, it's reframing it. It's
- 10:25saying, is the thumbnails diagram a real
- 10:28diagram? And at this point, we should
- 10:29probably talk about what it actually
- 10:31means by a real diagram. This is inside
- 10:33the course video manager repo. And this
- 10:36is a glossery.mmd that is my pride and
- 10:39joy. When I talk about language inside a
- 10:41project, what I'm really talking about
- 10:42is the words that you're using to
- 10:44describe certain things. And in this
- 10:47pretty massive file here, which is about
- 10:49560 lines, we define all of the main
- 10:54concepts that sit inside this course or
- 10:57sorry that sit inside this repository
- 10:59that are responsible for this project.
- 11:01And the stuff that we're really talking
- 11:02about here is a diagram. And so there's
- 11:05a whole section on diagrams. So a
- 11:07diagram is really a group of diagram
- 11:09snapshots, which is a copy of the
- 11:11diagram's drawing at the moment that a
- 11:14clip is filmed. In other words, in my
- 11:16video editor, it's linked up to the
- 11:18diagram. And so I can see what diagram I
- 11:20was using at each point in the video.
- 11:22There is the active diagram. So the
- 11:24diagram that the author is drawing on.
- 11:26Now we have an action called restore to
- 11:28head. when we load an older diagram
- 11:30snapshot back as the active diagram.
- 11:33There are preserved snapshots as well
- 11:34which are diagram snapshots kept in its
- 11:37diagrams timeline even when no clip uses
- 11:39it. You can start to see that these
- 11:40definitions form a really nice picture
- 11:43of the feature. And what we're kind of
- 11:45doing here is we are trying to add to
- 11:48this trying to figure out where our new
- 11:50feature lives in this existing
- 11:52landscape. So, by asking what a is a
- 11:54thumbnails diagram a real diagram, we're
- 11:57kind of asking, okay, it's a diagram,
- 11:59but maybe it's private to the thumbnail.
- 12:02For Q2, I think it makes sense to have
- 12:04our existing setup here. But what I'm
- 12:07concerned about is that the thing we're
- 12:10putting into the thumbnail is not really
- 12:11a diagram. It's just a single snapshot.
- 12:14In our model, a diagram is really a
- 12:17grouping of different snapshots of that
- 12:19diagram as they change through a clip.
- 12:21whereas this is more like a diagram
- 12:23snapshot. So now that probably sounds
- 12:25like garbage or jargon to you if you
- 12:27don't understand the language of the
- 12:29project, but I've been able to
- 12:30communicate something pretty rich that
- 12:32the model understands because the
- 12:34glossery.mmd is in its context. Q8
- 12:37sounds good. All three of those sound
- 12:38really valuable. Q9, yes, um the when we
- 12:42move the face, the diagram should just
- 12:44stay put. Q10, yes, when we retake, then
- 12:46we do the background removal and we
- 12:48replace the photo. Okay, it's now asking
- 12:50whether it should prototype a few
- 12:52different editing surfaces, and I love
- 12:54this. That's exactly what I want it to
- 12:56do. The tricky thing about Q1 here is
- 12:58that it's really about a question about
- 13:00feel. How does it look? How does it feel
- 13:02to use? And I won't really know the
- 13:05trade-offs until I see the differences
- 13:08all laid out in front of me. In other
- 13:09words, until I have a go at it. And so,
- 13:11I have a prototype skill that gives you
- 13:13multiple options that you can use to
- 13:15make these kinds of decisions. And
- 13:17that's what the agent is trying to do
- 13:19here. Which ones should it prototype?
- 13:21Q11. Yes, that sounds great to me. The
- 13:24benefit of having multiple prototypes to
- 13:25look at is especially if it builds
- 13:28something that you don't like, that
- 13:29often tells you more than what you might
- 13:32get from something you do like. So
- 13:35actually exploring lots of different
- 13:36options can give the agent a really rich
- 13:39view over what you actually want to
- 13:40build. And there we go. Uh we now have
- 13:42the glossery. The CVM glossery has no
- 13:44entry for the thumbnail and it's
- 13:46proposing two. So it's proposing a
- 13:48thumbnail, the image shown for a video
- 13:50on YouTube or a cutout or rather and a
- 13:53cutout, the author's face with the
- 13:55background removed placed over the
- 13:56diagram. And then it's also saying there
- 13:58should be a third term thumbnail diagram
- 14:01for Q12. Yes, that sounds great. All
- 14:03right, let's send this off. And now
- 14:05again, we should be getting closer and
- 14:08closer as we go. Lots of folks ask me
- 14:10like, you know, why what happens if you
- 14:14have a grilling session that runs for
- 14:16like 500 uh questions or something? How
- 14:19do you know when to stop grilling? And
- 14:22you should like I should be driving this
- 14:25conversation. You know what I mean? Like
- 14:27you should be the one in charge of it.
- 14:29The agent is not grilling you. You are
- 14:31in a conversation with it. And so you
- 14:33should feel free to just go, "Nope,
- 14:35we've talked enough. Let's go and
- 14:36actually create some code now." Okay, we
- 14:38can see it's updated the section on
- 14:40thumbnails inside the glossery. That's
- 14:42really good. And now it's doing
- 14:43something cool, which is it's pinging
- 14:44off a sub agent to go and prototype
- 14:47thumbnail diagrams. So, that's great.
- 14:48We're able to continue grilling while it
- 14:50goes off and does some work in the
- 14:52background. Okay. And now we're doing
- 14:54some hardcore language stuff. The
- 14:55thumbnails drawing is neither a diagram
- 14:57nor a diagram snapshot. You're right
- 14:59that it isn't a diagram, and a diagram
- 15:01snapshot doesn't fit either. The
- 15:02glossery defines a snapshot as a copy at
- 15:04the moment a clip was filmed. So it's
- 15:06now proposing a new term, a thumbnail
- 15:09drawing. The di drawing that belongs to
- 15:11one thumbnail you edit in place and we
- 15:13can start from a diagram diagram
- 15:14snapshot or another thumbnail's drawing.
- 15:16It's actually saying to avoid thumbnail
- 15:18diagram here. Now I know this glossery
- 15:21pretty well, right? And the better I
- 15:22know the glossery, the more able I'm
- 15:24able to make smart contributions to the
- 15:27application, the better I know
- 15:29understand the application. And so I
- 15:30know there's this thing called a
- 15:32preserve snapshot, which is the diagram
- 15:33snapshot kept in its diagram's timeline
- 15:35even when no clip uses it. So I can say
- 15:38to the agent, doesn't it make sense to
- 15:41have a thumbnail represent a preserved
- 15:45snapshot? We don't always define
- 15:48snapshots as the moment that a clip was
- 15:50filmed. I'm going to show you a
- 15:51technique that I sometimes use when I
- 15:53feel like I'm at the crux of something
- 15:55or when I just want to talk about one
- 15:56thing for a minute, which is I'm just
- 15:58going to say, "For now, let's just focus
- 16:00on this question. Ask me one question at
- 16:02a time until I say otherwise." This is
- 16:04another way that you can direct the
- 16:05grilling. If you're kind of getting a
- 16:07bit scatterbrained, if you just want to
- 16:08focus in on the thing that you actually
- 16:11care about and don't care about all the
- 16:12small stuff, then you can just say, "No,
- 16:14just go one question at a time for now."
- 16:15One other thing it's doing here is it's
- 16:17reading an architectural decision record
- 16:20that we made on snapshots and
- 16:22preservation. This is another thing we
- 16:23do during grilling. We can take a look
- 16:25at ADR3
- 16:27just up in here diagrams as first class
- 16:29entities with per clip snapshots. So
- 16:32this is where we actually made the
- 16:33decision about the glossery. So the
- 16:35glossery kind of describes the
- 16:37application as it is now as does the
- 16:39code. But the ADRs are here to explain
- 16:42why we made those decisions. In other
- 16:44words, we are interacting with a part of
- 16:46the application that's relatively old,
- 16:47relatively mature. And if we didn't
- 16:49write this stuff down, then we would be
- 16:51guessing. This is a classic Chesterton's
- 16:53fence issue, right? There exists in such
- 16:55a case a certain institution or law, let
- 16:57us say for the sake of simplicity, a
- 16:59fence or gate erected across a road. The
- 17:01more modern type of reformer goes gayely
- 17:03up to it and says, "I don't see the use
- 17:05of this. Let us clear it away." to which
- 17:07the more intelligent type of reformer
- 17:09will do well to answer, "If you don't
- 17:11see the use of it, I certainly won't let
- 17:13you clear it away. Go away and think.
- 17:15Then when you come back and tell me that
- 17:17you do see the use of it, I may allow
- 17:19you to destroy it." In other words, do
- 17:21not remove a fence until you know why it
- 17:23was put up in the first place. So the
- 17:25ADRs, the architectural decision
- 17:27records, help us keep track of why these
- 17:29fences have been put up. So it's come
- 17:31back and of course it's saying, "Yes,
- 17:33you're absolutely right. I was wrong to
- 17:34rule it out." And so it's saying which
- 17:36diagram does a thumbnail's snapshot
- 17:38belong to. Yeah, the thumbnail pins a
- 17:40snapshot of some diagram's head. The
- 17:42question is which head you're editing in
- 17:44the thumbnail creator. This is a really
- 17:46tricky one because we're basically
- 17:48deciding how the thing is going to work.
- 17:50Now we basically in this mode we might
- 17:53have to choose a diagram so that we can
- 17:56create a snapshot inside it or we choose
- 17:58an existing snapshot that we then edit.
- 18:01It all feels a little bit clunky and
- 18:04weird. And what it's kind of suggesting
- 18:05is that we might need a diagram of its
- 18:08own for each thumbnail. It keeps the
- 18:10teaching diagrams head safe while you
- 18:11simplify for the thumbnail and you still
- 18:13get to touch start from the teaching
- 18:15version. I really don't know here. I
- 18:17really don't know. I'm just going to
- 18:18sort of spill out what I'm thinking
- 18:20about. I think so what I'm thinking
- 18:21about in my head is the decision between
- 18:23whether we kind of tie into the existing
- 18:26diagram diagram snapshot stuff which is
- 18:28mature there's a lot of code in there or
- 18:30whether we sort of extend that work and
- 18:34instead apply it to a different data
- 18:36model call it a different thing and it's
- 18:39essentially whether to mix the streams
- 18:41or not mix the streams I think probably
- 18:44what I'm most inclined to do here is not
- 18:46mixing the streams but what I'm scared
- 18:48about is later down the line. We might
- 18:51wish that we had so that these models
- 18:53could be linked somehow, but I can't see
- 18:55the concrete use case for why we would
- 18:58want to still hang on to the existing
- 19:00model. You can see that I'm struggling
- 19:02here, right? Like I this is a hard thing
- 19:04to think about. And if I had colleagues,
- 19:06this would be the moment when I would
- 19:07reach out to them and go, "Help me. I'm
- 19:09not quite sure what we do here. This
- 19:11feels like quite a large consequential
- 19:13decision for this feature." So, it's
- 19:14saying, "I would go with your instinct
- 19:15and keep them separate. The fear of
- 19:17wanting them linked later is mostly
- 19:18covered by two facts. So both sides s
- 19:21store the same scene format. In other
- 19:24words, the way they store it in the
- 19:25database is the same. Copying between
- 19:26them is trivial in either direction. So
- 19:29star from a diagram or snapshot works
- 19:30without the models being joined. The
- 19:32link you're likely to want is where a
- 19:33drawing came from, not one model. Which
- 19:35thumbnails were made from which diagram
- 19:37is answered by one nullable started from
- 19:39snapshot reference recorded when you
- 19:40copy. So the reason we're so obsessed
- 19:42with language at this point is because
- 19:44the language is going to form the data
- 19:46model that everything else fits on top
- 19:48of. Once we understand the language,
- 19:49once we understand the names for these
- 19:51things, we then have names for database
- 19:53tables. We understand how they uh
- 19:56reference other parts of the system. And
- 19:58so we can create tables from that,
- 20:00create uh modules and set it up. Okay,
- 20:02so I think I've decided okay that
- 20:05suggestion sounds good. I like that we
- 20:08have a lot of flexibility not to quite
- 20:10decide the data model now and I like
- 20:13your suggestion of tracking the snapshot
- 20:15that it came from in case that becomes
- 20:18relevant later down the line and we
- 20:20properly want to link it. I suppose I
- 20:22don't necessarily matter how we model
- 20:24this as long as the way we're modeling
- 20:26it is not lossy and we preserve all of
- 20:28the links. Let's just see what it says
- 20:29to that. I'm not necessarily giving it a
- 20:31great answer, but maybe that's enough
- 20:33for it to go on. At its best, grilling
- 20:35really does feel like rubber ducking
- 20:37with someone with a really respected
- 20:39colleague, someone that understands the
- 20:41codebase really well. And you're kind of
- 20:43just able to talk out your thoughts or
- 20:45type out your thoughts. And by talking
- 20:48them through, you get to a more concrete
- 20:51solution even before you've written any
- 20:52code. Okay, it's gone a bit nuts here,
- 20:54which is it's actually gone ahead and
- 20:56written an entry for thumbnail drawing,
- 20:58which I don't like. I don't like having
- 20:59the concept of drawing here. Let's take
- 21:01a step back. I really don't like the
- 21:03wording of thumbnail drawing. I I hate
- 21:05the fact that we've got a drawing and a
- 21:07diagram. Those feel like they conflict
- 21:10really hard. I think thumbnail diagram
- 21:12is just fine. Can you also run me
- 21:14through the decision to create an ADR
- 21:16here? Why did you decide to go for a new
- 21:18ADR? So, it sort of eagerly created an
- 21:20ADR without asking me, which is not how
- 21:23I usually like to do it. I like to have
- 21:25that decision be something I do during
- 21:27the grilling session. Okay. He says, uh,
- 21:29he says, uh, the agent says, "I've
- 21:31renamed it to thumbnail diagram
- 21:33everywhere, the glossery, the ADR, and
- 21:34the ADR's file name." Yeah, it's kind of
- 21:37coming back at me a little bit on here,
- 21:38saying one small catch to be aware of.
- 21:40An active diagram is a diagram, but a
- 21:42thumbnail diagram is not. So maybe the
- 21:45word diagram isn't right here. So now
- 21:47it's saying, why did it suggest an ADR?
- 21:49Why did it feel the need to write down
- 21:52this non-obvious decision? So it's
- 21:54saying it is non-obvious, right? It is
- 21:56surprising without context. There is a
- 21:58real tradeoff here and so that's another
- 22:00criteria and it is strong and it's hard
- 22:03to reverse or rather it's saying it's
- 22:05not hard to reverse. We could
- 22:06potentially walk this back. So now it's
- 22:09spelled it out. I do agree with its
- 22:10reasoning as to why it suggested an ADR.
- 22:12And by the way, I'm investing it time
- 22:14into this so that future runs understand
- 22:16the context for every decision so that I
- 22:19continue getting better grilling
- 22:20sessions as I continue working on this
- 22:22project. without this or being lazy here
- 22:25would mean that my next run ends up
- 22:27being a lot worse because I don't have
- 22:29as good context as I need. Okay, I agree
- 22:32with your decision on the ADR, but and I
- 22:35also agree that thumbnail diagram is a
- 22:37little bit awkward. Can you give me some
- 22:39options here and let's do some scenario
- 22:41testing to see how they match up against
- 22:43diagram versus diagram snapshot? I'm
- 22:46sort of leaning towards thumbnail
- 22:47diagram snapshot, even though that's a
- 22:49little bit long, but might work.
- 22:50Scenario testing is a really great way
- 22:52of kind of testing your domain language,
- 22:55testing the language that you're trying
- 22:57to use. What it does is it gives you a
- 22:58table of different options, different uh
- 23:01sentences you could use to describe the
- 23:03system and then it checks out how easy
- 23:06it would be to describe in different
- 23:08forms of language. So here we can see we
- 23:10have a candidate a thumbnail diagram
- 23:12snapshot versus a thumbnail diagram
- 23:14versus a thumbnail scene. So, in the
- 23:16first scenario, it says, "I started the
- 23:17thumbnail from the agent loop snapshot
- 23:19used in clip 14, then I simplified it."
- 23:21All three there are probably fine. You
- 23:24open the agent loop in the playground.
- 23:25Is the thumbnail in its timeline? Yeah,
- 23:28that's an interesting one because if
- 23:29it's saying it's a snapshot, then you
- 23:31would kind of expect it to be in there
- 23:34or, you know, expect it to be in there
- 23:35somewhere. If it's a thumbnail diagram,
- 23:37then you might try to look at it on the
- 23:40top level. And so yeah, by calling it a
- 23:42diagram or a diagram snapshot, it sort
- 23:44of makes it feel like it's linked in
- 23:46with the other stuff. It says here, I
- 23:48dragged an arrow in the diagram
- 23:50snapshot, but that's not good because
- 23:52snapshots can't change. You tell an
- 23:54agent to tweak the thumbnails diagram
- 23:56snapshot doesn't really work, but I'm
- 24:00starting to see why it thinks about
- 24:02thumbnail scene and why it thinks it's
- 24:04good. We can see in all of the tables
- 24:06here that thumbnail scene is basically
- 24:08fine. Apart from Matt says it allowed
- 24:11while working. In other words, does it
- 24:13match my actual mental model? For
- 24:15thumbnail diagram snapshot, it's bit too
- 24:17long, a bit too wordy. Thumbnail diagram
- 24:20seems fine because it is what I
- 24:21naturally say. And thumbnail scene is
- 24:24not a word that I would use. It's more
- 24:26sort of coding vocabulary. In other
- 24:28words, scene is not something that we
- 24:30sort of have throughout the application.
- 24:33Nor maybe it is actually maybe we have
- 24:35like a scene layer possibly. I'm just
- 24:37going to search in the glossery for
- 24:38scene here. And yeah, we do have a
- 24:41concept of a scene and diagram. We've
- 24:44also got Okay. Uh that's not good either
- 24:47because we've got a scene in there too.
- 24:48So let's read its kind of um final part
- 24:52here. Yeah, even though C has all the
- 24:53ticks, it actually does weight number
- 24:55seven really high. And it says C is the
- 24:58clearest technically, but it's not how
- 24:59you talk. And it puts a code word in the
- 25:01domain language. B has one weakness. It
- 25:04reads as a kind of diagram. And so,
- 25:06yeah, I do think it's right that
- 25:08thumbnail diagram makes sense as long as
- 25:10we have an ADR to say it's a diagram,
- 25:12but not a diagram. And I can see why it
- 25:15went for thumbnail drawing as well. But
- 25:17I just don't like that word. It doesn't
- 25:18feel like it rolls off the tongue. Okay,
- 25:20thumbnail diagram is the right thing. I
- 25:23agree that thumbnail scene is poor,
- 25:25especially because we do actually have a
- 25:26concept of a scene elsewhere in the
- 25:28glossery. I also agree that having the
- 25:30ADR there means that yeah, we have a
- 25:32concept of a diagram, but we've also got
- 25:34a thumbnail diagram. And I think that's
- 25:36okay to have that distinction. Can you
- 25:38now widen things out? I feel like we've
- 25:40understood the crux of what we're
- 25:41building. Let's now have multiple
- 25:43questions at once. I think this kind of
- 25:44ceremony feels really off to a lot of
- 25:47people. A lot of people go, why are you
- 25:49spending so much time thinking about
- 25:50language and sort of like um you know
- 25:54about the words that you're using? Why
- 25:56is that so important to you? And I think
- 25:59the reason it's so important is what
- 26:01you've just seen here, what we've just
- 26:03done. We have from almost nothing. Now,
- 26:07we have a fully realized concept of the
- 26:09thing that we're building and the data
- 26:10model that's going to go into it. We now
- 26:12know that we have a thumbnail and a
- 26:14thumbnail diagram. That thumbnail
- 26:16diagram is not technically a diagram.
- 26:18It's more like a scene, but we can't use
- 26:20the word scene because we've got that
- 26:21elsewhere. And then this is going to
- 26:22then go into the rest of this grilling
- 26:24session. Q2C says starting from a
- 26:26diagram's head. When you start from a
- 26:27diagram's head, should the CVM save that
- 26:29head as an unpreserved diagram snapshot?
- 26:31Q2C, that is absolutely correct. What
- 26:33the start from searches and in what
- 26:36order? I think it's got this idea that I
- 26:38want a UI where we like start from an
- 26:40existing diagram, but I think I always
- 26:42want an empty diagram to start and then
- 26:45be able to search my existing diagrams
- 26:47from there. I think what I want from the
- 26:49Q14 is I don't necessarily want to go
- 26:53from a start from list of potential
- 26:56different diagrams. I want to start with
- 26:58an empty canvas and then um maybe search
- 27:00for existing diagrams and plunk them on.
- 27:03Q15 says, should we have one thumbnail
- 27:05diagram per thumbnail? Absolutely. Q15
- 27:09is correct. Q16, no user images in the
- 27:12thumbnail diagram. Absolutely agree with
- 27:14Q16. Q17 it's asking about a separate
- 27:17concept called a pitch with a a pitch
- 27:19has a YouTube thumbnail description with
- 27:21arot text field 17 let's not worry about
- 27:23pitches they're kind of soft deprecated
- 27:25I don't use them very much and so let's
- 27:27not worry about integrating with them
- 27:29Q18 yes let's keep existing thumbnails
- 27:31as they are Q19 let's give the thumbnail
- 27:35editor a parity with the diagram editor
- 27:38in terms of saving components inserting
- 27:40components we may even want to consider
- 27:43a um a shared component component. There
- 27:45we're seeing something a little bit
- 27:46awkward actually in our domain language
- 27:47for component. We can see that inside
- 27:50the diagram sections of the glossery we
- 27:52have this concept of a component. This
- 27:54is something I'm actually pretty proud
- 27:55of in my user interface. We have diagram
- 27:58components here which are reusable
- 28:00diagrams that I can plug into any uh
- 28:04diagram that I want to. But calling them
- 28:05just raw components in the glossery
- 28:07means that they actually sort of bump up
- 28:10against the concept of components in
- 28:12React. And that's what I was just
- 28:14talking about. We need to have a shared
- 28:16component that shows a list of
- 28:19components. It doesn't make sense. A
- 28:20quick note on the component part of the
- 28:22glossery, which is I'm finding it a
- 28:24little bit awkward with the word
- 28:27component in there because that bumps up
- 28:29against React components. So I think we
- 28:32probably need to prefix it with the word
- 28:34diagram. So a diagram component. Okay,
- 28:36we are cooking with gas now. So I'm
- 28:38starting to get a real sense for what
- 28:39we're building much much more than when
- 28:42we started. I'm not feeling the need to
- 28:43end the grilling session just yet. I'm
- 28:46feeling pretty happy with where we are.
- 28:48These are still highquality questions.
- 28:50Okay, it's now asking whether I want to
- 28:51change the way the search works. Q20,
- 28:54no, I disagree. I still want uh the way
- 28:59I I want it to work in the diagram
- 29:00playground the exact same as it works in
- 29:03the thumbnail editor. I like that
- 29:05components have one search and then
- 29:08diagrams and diagram snapshots have
- 29:09their own. If we make two subtly
- 29:11different diagram editors, that will be
- 29:13very, very annoying and users, i.e. me,
- 29:16will paper cut themselves all the time
- 29:17on it. Q21, what an insert brings in.
- 29:20Should an inserting a diagram or
- 29:21snapshot bring in the whole drawing?
- 29:23Q21, yes. Paste counts as a source, too.
- 29:27So, what it's saying is if we copy one
- 29:30diagram and then paste it in, should we
- 29:33track the snapshot that it came from?
- 29:36Q22. That sounds like a lot of
- 29:37complexity for a feature that I'm maybe
- 29:40not going to use that often. So, no, I
- 29:42don't think I care about it. One diagram
- 29:44component library, one UI. Should a
- 29:47diagram component save from the
- 29:48thumbnail show up in the playground and
- 29:50the reverse? Q23. Yes, absolutely. Next,
- 29:53deleting things that are a source today.
- 29:56Deleting a video cascades and hard
- 29:58deletes its thumbnails. If next week's
- 30:00thumbnail diagram copies shapes from
- 30:02this week's, deleting this week's would
- 30:03break that link, which breaks the not
- 30:05lossy rule. Q24. Yes, thumbnails should
- 30:08be archived instead of deleted. We kind
- 30:10of want soft delete on everything should
- 30:11be the rule. For those who don't know,
- 30:12soft delete um instead of deleting
- 30:15something from a database, which would
- 30:16be a hard delete, you instead mark it
- 30:19with a little marker like archive true
- 30:22or something and then it doesn't show up
- 30:24in the UI or you build your application
- 30:26so that it doesn't show up. Soft
- 30:28deletion is incredibly useful because it
- 30:30means that you can go back and retrieve
- 30:32that data if you want to. Whereas if you
- 30:34hard delete, then you're kind of screwed
- 30:37because it's literally been gone. It's
- 30:38gone from the system. Because this data
- 30:40is really valuable to me, I pretty much
- 30:41always go with soft delete. And I don't
- 30:44think I have any cleanup mechanism for
- 30:46like cleaning up old data. I just keep
- 30:47it around. But in an application with
- 30:49lots of users, then I would want to make
- 30:50sure I eventually, let's say on a 30-day
- 30:54cycle or something, uh deleted the stuff
- 30:56that people had soft deleted. Okay. It's
- 30:57asking about uh should parity come from
- 30:59extracting the playgrounds editor into
- 31:00one shared diagram editor component.
- 31:02Q25. Yes, absolutely. Let's have a
- 31:04single source of truth for this. Q26,
- 31:06it's saying your step of searching for a
- 31:08diagram or snapshot or dropping it in
- 31:10doesn't exist yet. This feels to me like
- 31:13it's actually untrue. It's actually not
- 31:15noticed something about the code, which
- 31:17is a little annoying. Q26, I don't think
- 31:19that's true. We already have a like find
- 31:23diagram thing, right? So, we would just
- 31:26reuse that, wouldn't we? Q27, navigation
- 31:29results in the thumbnail editor. Q27.
- 31:32Yes, I agree. Looks great. Q28 soft
- 31:34delete everywhere is a separate piece of
- 31:35work. It's now taking my um opinion and
- 31:39kind of running with it. But I'm pretty
- 31:41sure we already have soft elite
- 31:42everywhere. Q28. Yeah, let's not
- 31:44overcope this. I'm pretty sure we
- 31:46already have soft elite most places that
- 31:48I want it. This is an important part of
- 31:50grilling, too, is like when you're
- 31:51talking about your system, you will
- 31:53often find little ways to improve it
- 31:55that might lead to issues that you
- 31:57create on your backlog that you
- 31:59eventually maybe grill about or maybe
- 32:01just like slam through. And so grilling
- 32:03is not only about the feature you're on,
- 32:04but it's also about staying in touch
- 32:07with the codebase. It's a a ritual, a
- 32:09ceremony for thinking about the code.
- 32:11This is why I spend so long on it. Q26.
- 32:13Yes, let's add a new action to the
- 32:15existing search. That sounds great.
- 32:16Okay, it's now saying this is a good
- 32:19one. So, should past thumbnail diagrams
- 32:21show up in the same search? So, that's
- 32:23actually pretty neat idea cuz we
- 32:25probably do want the ability to search
- 32:28through old thumbnails that we've
- 32:30created since they might be useful in
- 32:32diagrams and just in the same way that
- 32:34diagrams are useful for thumbnails. This
- 32:36is again exactly the kind of thing that
- 32:38Grilling is really, really good at
- 32:40pulling together. Q29. Yes, that is a
- 32:43really smart idea. You should be able to
- 32:45search for thumbnails from or thumbnail
- 32:47diagrams from the diagram playground.
- 32:50And you should be able to search for
- 32:51diagrams and diagram snapshots from the
- 32:53thumbnail editor. So that is an
- 32:55important thing that we need to think
- 32:57about in the data model that we weren't
- 32:59really valuing before, but I think our
- 33:01our current model gets us there because
- 33:03it thumbnail diagrams are probably going
- 33:05to be stored in a separate um database
- 33:08table or they might just be an entry on
- 33:10the existing thumbnail. So, yeah,
- 33:14interesting one. Okay, while we've been
- 33:16talking, the prototype has been built.
- 33:18So, let's check it out. Okay, here we
- 33:20go. It's pretty surreal. Uh, it's quite
- 33:23surreal editing a thumbnail for my own
- 33:25face. This is very cool. This is pretty
- 33:28um similar to what I was imagining.
- 33:30Here, we can move my face like left and
- 33:33right here. It's a little bit fast
- 33:35there, but I mean, it is a it is a good
- 33:37one. And then in the top left, you can
- 33:39actually see a preview of the compos
- 33:41composited photo there. That's nice. And
- 33:44this is only variant A, right? We've got
- 33:45a couple more variants. So, we now have
- 33:47face inside the canvas. Whoa. This is
- 33:49again pretty trippy. We This is actually
- 33:52worse than I thought it was going to be.
- 33:54It's a bit too large. I really hate this
- 33:56like bar over the left here with the
- 33:59view. This face thing again is just way
- 34:01too Woo. Okay. B is really not as good
- 34:04as I thought it was going to be. And
- 34:06then what's this? It's a split view.
- 34:08Okay, the split view is garbage because
- 34:09I have to like look over on the left
- 34:11here and then see it update on the
- 34:14right. You can see I'm moving the blue
- 34:16box around and then I have to like
- 34:18manually line it up with my finger and I
- 34:20can't see my finger. This is bad. So, I
- 34:22guess a is the one that we're kind of
- 34:24going for here. Oh, look at this
- 34:26feature. Look, it has a ghost face while
- 34:28pointer is in the frame. Ghost used as a
- 34:31verb there. So, look, I can like when
- 34:33the pointer is in the frame, my hand
- 34:35disappears. That's so freaky. It's
- 34:38annoying that it's showing get license
- 34:40for production there cuz I do actually
- 34:41have a license. So, something's going
- 34:42wrong there. So, I'm going to dictate
- 34:43out all the things that I love and hate
- 34:46about this. And we're going to iterate
- 34:48with the agent. I really love a I think
- 34:50you've um really nailed something there.
- 34:53I especially like the ghost face thing.
- 34:55That's a nice feature. The moving me
- 34:58left and right, so moving the face left
- 35:00and right is a little too sensitive. So,
- 35:02just bump that down a little bit. There
- 35:04appears to be in the composited diagram
- 35:06a little white line just to the left of
- 35:10or sorry to the on the outside of the
- 35:13main block there which is not good. I
- 35:16also want the composites to display
- 35:18below the uh thumbnail editor. We're
- 35:22also missing a lot of the stuff that
- 35:23we've grilled about such as being able
- 35:25to insert components and being able to
- 35:27drop in stuff. And I'm pretty sure we
- 35:29don't currently have par with the other
- 35:33um with the diagram playground, right?
- 35:35So we probably need a version of it like
- 35:36that. So let's abandon the three
- 35:38variants now. Let's just go with a and
- 35:40let's continue to iterate on it. It's
- 35:42also got a couple of questions for me
- 35:43after I've tried it. So it's saying
- 35:44which surface. I think we've added that
- 35:46with Q31. Yeah, I want it to live inside
- 35:49the thumbnail page. And I think we
- 35:52probably need to see that in the next
- 35:54prototype so that we can arrange it on
- 35:56the page properly. Should moving the
- 35:57face and retaking be on the same undo
- 35:59history as drawing? Oh yeah, Q32. That
- 36:03is genius. Really, really smart.
- 36:05Definitely. That's really cool cuz I
- 36:07don't have an undo history in my current
- 36:08thumbnail editor. So, I'm kind of
- 36:10screwed there. But we kind of get that
- 36:11for free because TL Draw, which is the
- 36:14tool that I'm using, bakes it into its
- 36:15data model. Very, very, very smart.
- 36:17Okay. So, it's now gone and sent the
- 36:19prototype agent back to it saying,
- 36:21"Okay, drop B and C. Put A inside the
- 36:24real thumbnail page blah blah blah blah
- 36:25blah." In other words, it's confirming
- 36:26with me all the things that I gave it as
- 36:28feedback and it's now implementing all
- 36:30of those. This prototyping phase is so
- 36:31so important because we really get to
- 36:34stamp how we think the product is going
- 36:36to look before we then like actually
- 36:39schedule an agent to build it. In other
- 36:41words, this time human in the loop with
- 36:43the agent is so essential because we're
- 36:46really going to like reduce the decision
- 36:48space for the agent. We're going to say
- 36:49no, it has to look exactly like this. We
- 36:52know exactly the data model. All the
- 36:54agent then has to do once we run it AFK
- 36:56is plug those two things together. I
- 36:58find it pretty hard to like not get
- 37:01excited when I see a prototype, when I
- 37:03see things starting to come to life. You
- 37:04know, we've done this grilling which
- 37:06feels kind of a little bit ownorous
- 37:08sometimes, a little bit annoying, but
- 37:09when you actually see the thing coming
- 37:11together, you see how it's going to feel
- 37:12to use. And I'm really doing this. This
- 37:15is personal software for me. You know,
- 37:16it's just something to make my life more
- 37:19delightful. And seeing that actually
- 37:21coming together is so exciting. Okay, we
- 37:23are back and we have a new version here
- 37:26inside the thumbnail editor. So, we've
- 37:28got the YouTube previews down the
- 37:30bottom. That's nice. The face is in
- 37:33frame here. I love that I can resize
- 37:35this actually. That's something I've
- 37:36never had before. Let's switch me around
- 37:38a little bit. That is really nice and
- 37:40smooth. Yeah, this really, really rocks.
- 37:44Now have access to a command pallet as
- 37:46well, so I can insert components. Let's
- 37:48take a look at the list item here. Yes,
- 37:51that's looking excellent. I should be
- 37:53able to search for other diagrams. So, I
- 37:55can insert a diagram. So, let's just go
- 37:58for wavefinder here. And then, would you
- 38:01look at that? We've got all of that
- 38:03working too. So, let's take a look at
- 38:04the composites. We can see ah still
- 38:06looks like there's that little white bit
- 38:08just there. Let's move me slightly this
- 38:11way. Move this so it covers the whole
- 38:13screen. Yeah, that does. That's really
- 38:15cool. Oh, I love it. I can still see the
- 38:17little white bar on the right of the
- 38:19export, but overall this is looking a
- 38:21lot better. It's also asked me some
- 38:23questions here. Q34, I agree. Q35, I
- 38:28agree. Who owns the face? It's an
- 38:30excellent AI sentence. Very good. Q36, I
- 38:34agree. Q37, I agree. Q38, I agree. So,
- 38:38at this point, um, the agent is pretty
- 38:40much aligned with us. We now have just
- 38:44sort of one problem to solve in the
- 38:46prototype and I can feel we're nearly at
- 38:48the end of the grilling session. Like
- 38:49once I just start going yes yes yes, we
- 38:52are aligned, right? The agent is making
- 38:54decisions as if it were me and it's
- 38:56making decisions understanding what I
- 38:59care about. So this little white bar
- 39:01thing is actually showing something
- 39:03pretty nice here. This is essentially a
- 39:05bug in the prototype and this is a bug
- 39:08that could have gone into production if
- 39:09we hadn't spotted it, but we have
- 39:11spotted it. So what it's trying to do
- 39:13here is it's trying to verify its own
- 39:15findings. It's trying to construct a
- 39:17harness around the problem. In other
- 39:19words, a reproduction, and then it's
- 39:22going to try to fix it, whatever the
- 39:24issue is. In other words, it's going to
- 39:25reproduce the bar in its own browser
- 39:27first, then read pixel colors along the
- 39:29right edge of the export and of each
- 39:30preview. That should tell us where the
- 39:32white comes from. This generation of
- 39:33agents appear to be really, really good
- 39:36at this. In other words, verifying their
- 39:38own work really solidly. There might be
- 39:40stuff in my home repo like steering
- 39:42files that tell it to do this, but I'm
- 39:44not quite sure. I think it is just doing
- 39:46this off its own back. We can see too
- 39:48that it's opened up the existing sub
- 39:51agent. So, this one that's currently on
- 39:53260k tokens here. So, this is already
- 39:56punching pretty deep into its dum zone.
- 39:58I would probably have preferred it to
- 40:00kick off a new sub agent with just
- 40:02specifically this problem. I think that
- 40:04probably would have been better, but I
- 40:07mean, uh, let's just see how it does and
- 40:09see if it manages to find the solution.
- 40:10If it doesn't manage to find the
- 40:11solution, then I will punch it again
- 40:13with a new, um, a new sub agent with a
- 40:16clean context. Everyone's always asking
- 40:18me, by the way, oh, do you still stand
- 40:19by the smart zone dumb zone thing? You
- 40:22know, this is my contention, and other
- 40:24people have had this contention as
- 40:26before. It's not original to me. Dex
- 40:27Horthy from human layer and now factory
- 40:29came up with it, which is that if when
- 40:32your agent gets to around 150k tokens,
- 40:36it starts acting a little bit stupider
- 40:38and it starts getting slowly dumber and
- 40:40dumber. And if you think of what smart
- 40:42zone versus dumb zone actually means
- 40:44like what we're talking about there is
- 40:46that the risk of hallucination slowly
- 40:49raises the more tokens you add to the
- 40:51context window. That's because if you
- 40:52imagine each one of these boxes in an is
- 40:54an individual token, then the model
- 40:57needs to keep track of all of the
- 40:58relationships between every single
- 41:00token. And it's not the fact that the
- 41:02number of tokens increases. It's the
- 41:04number of relationships that the model
- 41:06needs to keep track of just expand
- 41:08quadratically and you end up with this
- 41:10enormous amount of memory needed and
- 41:14amount of work needed to hear the signal
- 41:16in the noise. However, making the models
- 41:18better at this is essentially an
- 41:20engineering problem, right? some kind of
- 41:22model design problem that I'm sure
- 41:24people are trying to figure out. And the
- 41:26question everyone always asks me is
- 41:27like, what number uh does the dumb zone
- 41:30begin at? When should I clear the
- 41:31context? And my answer is becoming,
- 41:33okay, in previous generations of models,
- 41:35sure. Okay, you pretty much had to clear
- 41:37the context at 120K, sometimes even like
- 41:4080k tokens for Sonet 3.5 or something,
- 41:43you know, the number of token
- 41:44relationships would just go nuts and you
- 41:46would end up with loads and loads of
- 41:49factuality errors. But now it's more
- 41:51like it's a kind of cost and
- 41:53optimization thing really. You know that
- 41:56your agent will be smarter when there
- 41:59are fewer tokens here. So it's not
- 42:00necessarily about the risk of
- 42:03hallucinations. It's more like
- 42:05optimizing your agent to produce the
- 42:07best work. So for me, it's not so much
- 42:09that the agent produces hallucinations
- 42:11in the dumb zone. It's more that it just
- 42:13produces worse work and I end up with
- 42:15better results when I do my work in the
- 42:17smart zone. Plus operating at like 750k
- 42:19tokens in your context window is very
- 42:22very expensive because even like when
- 42:24your cash runs out all of those previous
- 42:27tokens are going to be run through again
- 42:29and that's going to be build again.
- 42:30Okay, the next version of the prototype
- 42:31is ready and while it still has this
- 42:35little white thing in it, it actually
- 42:38says that it's not an issue. The little
- 42:39bar actually comes from the browser at
- 42:41Windows 125% scaling. Chrome shrinking
- 42:45120 wide image into the previews. Left
- 42:47the last pixel column only partly
- 42:49painted. There's some other stuff here
- 42:51like some hazards. I agree with Q39.
- 42:54Q40. Yes, drawing edit should autos save
- 42:56the thumbnail. And it's now asking
- 42:58whether I want to write it up. So, I'm
- 43:00going to be careful here. I'm going to
- 43:02go back to the start of this little um
- 43:04text input. And I'm going to say to
- 43:06spec, let's write it up. I have to go
- 43:09back to the start because to spec is a
- 43:12userinvoked skill. So I can invoke it
- 43:16essentially and uh I have to have it at
- 43:18the start when I'm using clawed code. I
- 43:20can't just sort of scatter it throughout
- 43:22the text input which is a bit annoying
- 43:23and something I've been wanting them to
- 43:26change for a long time. To spec what
- 43:27it's going to do is it's going to create
- 43:29a specification. It's going to ask me a
- 43:31couple of questions about uh where we're
- 43:34going to test and then um from there
- 43:37we'll be able to implement it. I already
- 43:38have a few quite robust reducers and
- 43:41reducers are essentially places in the
- 43:43front end where you can contain lots of
- 43:45state together and I find them really
- 43:48really good with agents because they can
- 43:49just kind of extend existing ones. All
- 43:51of those three scenes look good. I'm
- 43:52then going to um go for the to ticket
- 43:55skill as well. I'd like you to add some
- 43:58tickets too. Let's just do these in one
- 44:00batch. Now, what spec and to tickets do
- 44:02is they essentially give the agent
- 44:04everything it needs to run a long
- 44:06running session. The spec acts like a
- 44:08destination document. So, we're
- 44:10essentially running work over multiple
- 44:12sessions. And the spec is going to say,
- 44:14okay, once we get to the end of these
- 44:16sessions, this is where we want to end
- 44:17up. And then the tickets are essentially
- 44:19about scoping each individual session.
- 44:22So each sub agent we're going to run is
- 44:25going to be handed a single ticket and
- 44:26that's going to be the scope of its
- 44:28piece of work. So here it's given us the
- 44:29proposed breakdown of all of the
- 44:31sessions. So the first one is like a
- 44:33prefactor like um extracting the shared
- 44:36diagram editor into a um shared
- 44:38component. Really useful. That's going
- 44:40to be very handy later. Each ticket says
- 44:43what it's blocked by. And I'm not going
- 44:45to like review this too much. Nine seems
- 44:48fine to me. I'm just going to say yep,
- 44:50looks good to me. Now, the plan is that
- 44:52once this is done, I'm then going to
- 44:54compact. So, I'm going to take that
- 44:56entire session, the grilling session
- 44:57we've just done, compact it down, and
- 45:00then we're going to run a skill called
- 45:01implement spec, which is going to
- 45:03essentially AFK just uh create all of
- 45:07this stuff and merge it into a single
- 45:08PR. And you think of how easy that job
- 45:11is going to be for the agent, right? We
- 45:12are going to have an updated glossery by
- 45:14that point. We are going to have all an
- 45:17entire spec of the thing it needs to
- 45:18build all of the tickets and the how
- 45:20it's going to get there and we've also
- 45:22got a prototype which it essentially
- 45:24just needs to copy in terms of the UI.
- 45:26So, we've already got a bunch of code
- 45:27written, too. By the time I get to the
- 45:29spec and the tickets, by the time I get
- 45:30to implementation, like I'm really, you
- 45:33know, trying to give the agent no
- 45:35decision space in which to operate. No
- 45:37nuance that it can go, "Oh, yeah, I'll
- 45:39just sort of fiddle around with this."
- 45:41Because the more nuance you give to an
- 45:42agent, the worse it's going to perform
- 45:44because as soon as you ask an agent to
- 45:46make a decision, it might make a bad
- 45:48decision. So, the more decisions you
- 45:50give it, the more decision space it has,
- 45:53the more likely it is to choose a bad
- 45:54one. So I tend to like giving the agent
- 45:56very very few options when it comes to
- 45:58implementation when it comes to the
- 46:00decisions of the features that I want.
- 46:01Okay, we now have our spec and we can
- 46:04see that this is in GitHub. So this is a
- 46:07GitHub issue. I have a bunch of user
- 46:09stories here around 47 of them. A bunch
- 46:12of implementation decisions, a very very
- 46:15rich document including stuff that's out
- 46:16of scope. We can see it's also
- 46:18referencing the prototype on the local
- 46:20branch. Fantastic. And it then has a
- 46:22bunch of subiss issues each of which are
- 46:24the individual tickets. So all of these
- 46:26are individual tasks and crucially these
- 46:28can be parallelized. And so what I'm
- 46:30going to do is I'm going to compact the
- 46:32current conversation. In other words,
- 46:33just sort of take all of the context
- 46:35that we've had so far and squash it
- 46:37down. And then I'm going to say
- 46:39implement spec just on the essentially
- 46:41just on the spec that it's just created.
- 46:44I've started using compact a lot more.
- 46:45Actually compact has become a lot more
- 46:47reliable, a lot nicer to use. I still
- 46:50don't think it's a perfect thing. Like
- 46:53autoco compact is still a little bit
- 46:55dodgy. Um because the timing sometimes
- 46:58just absolutely wumps you. Something
- 46:59important will be taken out of context.
- 47:01But compact, especially in this
- 47:03situation when we've taken the
- 47:04conversation and just turned it into a
- 47:06document is so so safe. It's almost
- 47:09free. It's just a kind of like a minute
- 47:11it spends just compacting this
- 47:13conversation and bam, we're back down to
- 47:15essentially our starting context. Now,
- 47:16implement spec is a skill that I've had
- 47:19for a little while now. I think it came
- 47:20out in v 1.3. And this is really it just
- 47:23takes the spec and the tickets and it
- 47:26implements them inside our local setup.
- 47:28And when it finishes, which for a piece
- 47:30of work like this might be like an hour
- 47:32or 45 minutes maybe, then we're going to
- 47:34end up with a nice PR that essentially
- 47:37implements the entire thing that is
- 47:39ready to merge. So, this is the point
- 47:40here where I would step away, where I
- 47:42would trust it to run AFK. It's going to
- 47:44run as much in parallel as it possibly
- 47:46can. You can see it's starting the three
- 47:48tickets that can begin now. And it's
- 47:50able to pass them very rich context
- 47:52about what needs to happen because it's
- 47:54just a compacted version of our original
- 47:56conversation. So, it knows exactly the
- 47:58parts of the codebase that matter, knows
- 48:00the spec, knows the um prototype, too.
- 48:04So, I'm going to walk away and when I
- 48:05come back, I should have working code.
- 48:07Okay, it's been a little while. We now
- 48:09have a massive PR and we have a code
- 48:12review that has run and found some
- 48:14violations. We can see the pull request
- 48:16inside the PRs here for edit a thumbnail
- 48:19diagram in place beside the face. We can
- 48:21see we've added 21,000 lines of code.
- 48:24Go. I'm looking forward to reviewing
- 48:26that. And the way the implement spec
- 48:27works is it goes away and reviews
- 48:30everything with an agent and then it
- 48:32checks against some existing coding
- 48:34standards. You should take a look at the
- 48:35code review skill if you want to see
- 48:37more of that. But basically, it found
- 48:39one hard violation and a couple of cases
- 48:41of scope creep and then it's fixing them
- 48:44up. Right now, I'm going to try
- 48:45something I don't usually try here,
- 48:48which is I think I do want to review
- 48:50this with you guys watching. And so, I
- 48:53think I want to try a different way of
- 48:56breaking down this massive PR into
- 48:57smaller chunks. I don't have a skill for
- 48:59this yet. This isn't something that I do
- 49:00regularly, but for large chunks of work
- 49:02like this that I do want to review, this
- 49:05makes sense. Once the review is
- 49:06finished, I think I want you to break it
- 49:08into smaller chunks using stacked diffs.
- 49:12These smaller chunks ideally should be
- 49:14reviewable on their own. And what that
- 49:17means is that I want them to be each a
- 49:20bunch of two-way doors and finish in a
- 49:22final one-way door. You can look for the
- 49:24definitions of two-way door and one-way
- 49:26door inside the PR skill. One way doors
- 49:28and two-way doors are it's a really nice
- 49:30analogy. It basically means that when
- 49:32you have a PR that is a two-way door, it
- 49:33means you can merge it and then revert
- 49:36it any time. So you can walk through the
- 49:38door and then walk back through the
- 49:39door. Whereas a one-way door is a PR
- 49:41that is merged and then is very
- 49:43difficult to unmerge. In other words, it
- 49:46might mess with some data. It might um
- 49:48speak to an external service. It might
- 49:50expose like a security window that's
- 49:52hard to walk back. And agents are pretty
- 49:54good at breaking up massive PRs into
- 49:56small PRs. So it's given me this chunk
- 49:58of different PRs here. I can tell though
- 50:00that some of them are smaller than
- 50:01others. It feels like this last one is
- 50:03kind of the big one. Can you give me an
- 50:05estimate of the lines of code that would
- 50:07be in each PR since that's really what I
- 50:09want to do here. I'm also wondering
- 50:10whether we could utilize feature flags
- 50:12to make the thumbnail diagram available
- 50:15and then pull it back later. In this
- 50:17situation, I'm kind of cosplaying as if
- 50:19this is a production system. You know,
- 50:20I'm kind of pretending as if, okay, I
- 50:23want to break this huge PR down into
- 50:25reviewable chunks that we can ship to
- 50:27production and not have like this big
- 50:29risk when we merge a single PR. Usually,
- 50:32when I merge to this repo, because it's
- 50:33only personal software, I don't have to
- 50:35care that much and I can just go, all
- 50:37right, bam, let's stick it in. But
- 50:39because if I'm imagining I've got, you
- 50:41know, thousands, hundreds of thousands
- 50:43of users, like we really want to make
- 50:45sure production is as close to the
- 50:47change as possible. And then once we
- 50:50finally flick it on, it should be
- 50:51relatively seamless. In other words,
- 50:53we're taking this huge chunk of or
- 50:55taking this a single door and turning it
- 50:57into lots of doors which we can revert
- 50:59as we need to. And then finally, we're
- 51:01going to flick it on at the end. Okay.
- 51:03So now it's taken that last PR, the
- 51:06massive one, and turned it into four
- 51:07smaller ones. The upshot of this is it
- 51:09would basically run both implementations
- 51:11side by side for a bit, and then when we
- 51:14were ready, we would merge the final PR,
- 51:15and then that would turn the flag on.
- 51:17Okay, let's go with this version. Sounds
- 51:19good to me, but only do this once the
- 51:20review has finally fixed its things.
- 51:22Make sure you delegate this work to sub
- 51:24agents since you're a little bit
- 51:25constrained in terms of context window.
- 51:27So, this is exciting. This is kind of an
- 51:29experiment. Hopefully, these are going
- 51:30to be easy to merge individually. Okay,
- 51:32so we have our first PR of seven here.
- 51:35The first one is literally just the
- 51:36glossery terms diagram component and
- 51:39ADR060. If we take a little more
- 51:42detailed look at this, this all looks
- 51:44fine. And so as this is this can just go
- 51:47in. I'm happy to enable an automerge
- 51:49here. I can press confirm automerge. And
- 51:51that will now go in as soon as the CI
- 51:53checks pass. And there we go. It has
- 51:55gone in and merged. Beautiful. Next we
- 51:58have a new PR coming in saying extract
- 52:00the shared diagram editor from the
- 52:01editor or diagram playground. So just a
- 52:04few files changed here. Now while we're
- 52:05here, we might as well talk a little bit
- 52:06about human review and like what the
- 52:08purpose of this exercise is. For me in
- 52:10this situation, I'm going to do this
- 52:11human review because I know that you're
- 52:14watching and you're interested in how I
- 52:16do human review and so I'm going to
- 52:18review every single line. But do am I
- 52:21saying that you need to um do every
- 52:23single line yourself or review every
- 52:25single line? No, I don't think you do.
- 52:27When I'm reviewing code like this,
- 52:28obviously I want to make sure that it
- 52:30works. And so if this was going out to a
- 52:33production system, then I would clone it
- 52:34locally or I would get some kind of
- 52:36playground where I could walk through it
- 52:38and check that it works. What I'm
- 52:40actually going to do is I'm going to
- 52:41merge everything and then because it's
- 52:42I'm I'm the only user, I'm just then
- 52:44going to review it at the end. But the
- 52:46point of checking the code here is that
- 52:48I'm not just interested in like what the
- 52:50code does. I'm also interested in the
- 52:53system that produced this code. In other
- 52:55words, if I notice that something is
- 52:57going wrong inside this code or there's
- 52:59a pattern that I don't like, then what
- 53:02I'd like to do is create a like a lint
- 53:06rule or something to make sure it
- 53:08doesn't happen again. And by don't like,
- 53:10I mean that I want to have a hypothesis
- 53:12around that thing that I want to change
- 53:15that it is affecting my uh environment
- 53:18my agent operates in in a negative way.
- 53:20In other words, I can see in this file
- 53:22here, like the command pallet, I can see
- 53:24there's a huge comment right next to it
- 53:26saying the command K command pallet
- 53:28mounted inside the active diagrams or
- 53:30rather the shared diagram editor over
- 53:32its canvas. I'm kind of not happy about
- 53:35these large comments and they are kind
- 53:37of everywhere in my codebase because
- 53:39it's more surface that the agent needs
- 53:41to update. And so I'm going to add a
- 53:43comment here. I'm going to say I'm not
- 53:45really a big fan of these comments
- 53:46because they leave a huge surface for
- 53:48the agent to update and they don't
- 53:50really add a lot that isn't already
- 53:51explained by the code. I think I'd like
- 53:53you to add something to coding standards
- 53:54to make these comments much less
- 53:57prevalent. And I think we should have a
- 53:59conversation about maybe banning
- 54:00comments in certain parts of the
- 54:01codebase. So I'm going to comment here
- 54:03and then I'm going to show you what I'll
- 54:05do with those comments later on. For
- 54:07instance, here I really don't like the
- 54:09as keyword in Typescript. It can be used
- 54:11to cheat the TypeScript which I hate. So
- 54:13I want to say a helper function is
- 54:14needed here on to ban all uses of as not
- 54:17inside shared utilities. This is just
- 54:19something I know because I am a you know
- 54:21I suppose an ex typescript expert. Uh I
- 54:24made a course on typescript basically.
- 54:26Again these docs here just sort of feel
- 54:28pretty gnarly. I don't like this. You
- 54:31can see how much the diff as we're going
- 54:32through is literally just code comments.
- 54:35It really is brutal. But overall this
- 54:36review didn't take too long and I've
- 54:38noticed a couple of things that we might
- 54:40need to improve. So, next we go to the
- 54:42next PR in the list, which is just a
- 54:44relatively small change. Again, we've
- 54:46got some reducer testers, which I
- 54:48really, really like. If you've never
- 54:49used a reducer before, uh it's just so
- 54:53nice, so easy to work with. Again, more
- 54:55comments that I just want to kill. Man,
- 54:56this repo is full of comments. There's
- 54:58also another TypeScript thing that I
- 55:00really don't like, which is using this
- 55:01pick and this and here. Prefer using
- 55:04interface extends to using
- 55:06intersections. See if you can find a
- 55:07lint rule for this that we can ratchet
- 55:08that phrasing, by the way. like lint
- 55:10rule. It's asking it to find a
- 55:12deterministic rule that we're not
- 55:14necessarily going to impose on day one,
- 55:16but we're going to ratchet it up over
- 55:17time. Again, so many comments here to
- 55:20review. It's just it's getting pretty
- 55:21disgusting, I have to say. Another one
- 55:22here is that even in code that is not
- 55:24actually touched by the PR, I'm noticing
- 55:26it's calling fetch and then ignoring the
- 55:28result. And I say it feels like a
- 55:30reusable function is needed here. I'm
- 55:31being pretty harsh in these reviews,
- 55:33right? like I'm I'm trying to force it
- 55:35to design APIs that remove all of the
- 55:38nuance, all of the decisions from the
- 55:40agent. Another one here is I can see we
- 55:42have a use search params hook and we're
- 55:44grabbing things using magic strings
- 55:46here. It would be very very easy to just
- 55:49change the name of this highlight or
- 55:51this snapshot even and we would get no
- 55:53type errors from it. Find a more type-
- 55:55safe design for the way that we access
- 55:57search parameters since this feels like
- 55:59a magic strings style hole that we could
- 56:02potentially fall through. Create a new
- 56:04lint rule banning the use of use search
- 56:06params. And then let's create a strategy
- 56:08to ratchet it up. Again, I'm being super
- 56:10ambitious here. I'm saying, okay,
- 56:12everything that we find in here, I never
- 56:14ever want to see this again. Never ever
- 56:17want to loot. Like I want to lint it out
- 56:19of existence. That's my plan. Next PR.
- 56:21Again, we're up to 500 lines here. Got
- 56:24to say that apart from the comments
- 56:25here, this is a clean clean PR. We can
- 56:28see it's taken a bunch of like magic
- 56:31conditionals here and it's replaced them
- 56:32with a single source of truth for is
- 56:34diagram search. Phenomenal. Again, just
- 56:36way too many comments here. Too many
- 56:39comments. Okay, so I'm now into the I
- 56:42think penultimate one or maybe last but
- 56:45couple. Let's see. Yeah, this is still a
- 56:47two-way door thing, I think, here. And
- 56:50this is now we're getting up to about
- 56:512,500 lines now. Now, I think you've got
- 56:54the idea of what I'm reviewing for here,
- 56:56which is I am trying to give my opinion,
- 56:59give my feel just by looking at the
- 57:01code. And I think reviews are a good
- 57:03surface for this. But I'm not going to
- 57:04consider any of these blocking. In fact,
- 57:06out of all of these PRs, the only one
- 57:08where I would consider reviewing
- 57:10mandatory is this one. This is an
- 57:12additive migration for the thumbnail
- 57:14diagrams concept. And what I want to see
- 57:16is inside schema.ts
- 57:18here. This adds the thumbnail diagram
- 57:21into the thumbnails here. So many
- 57:25freaking comments here, guys. Comments
- 57:27are also an opportunity for the agent to
- 57:29do like two specific text or text that's
- 57:33specific to its session. In other words,
- 57:36this session is or this text is
- 57:37basically just like a note for itself in
- 57:40a future session, which is really
- 57:42frustrating because then that is just
- 57:44going to live forever, that comment, and
- 57:45it's just totally useless. Overall, this
- 57:47looks really solid. So, actually, I'm
- 57:49happy with the one-way stuff as part of
- 57:51this big PR. So, what I'm going to do is
- 57:53go back to my agent session. I'm going
- 57:55to compact. And then I'm going to say,
- 57:57could you merge all of those PRs in
- 58:00order, please? Ignore all of the review
- 58:01comments for now. We're going to tackle
- 58:03those in a minute. Actually, once
- 58:05everything is merged, could you run the
- 58:06merge in a background sub agent so that
- 58:08we can continue chatting? Okay, let's
- 58:10fire this off. So now that we've decided
- 58:12that the merge is happening, like I I'm
- 58:15going to assume that in your version of
- 58:17this you would have actually cloned it
- 58:18locally or actually you know check that
- 58:20it was all working on the final branch.
- 58:22I'm fine with checking it in a minute.
- 58:24But what I'm going to do now is I'm
- 58:26going to use this session to fix or make
- 58:30a plan to fix all of the things I found
- 58:32during review. And for that I'm going to
- 58:34use the retro skill. I'm going to say,
- 58:36could you take a look at all of the
- 58:38agent sessions that ran as part of this?
- 58:40And could you also pull in my review
- 58:42comments? And the retroskale essentially
- 58:44runs a retrospective on the process that
- 58:46we just saw. Even though we've run
- 58:48compact, it still has access to all of
- 58:50the sessions that ran before because
- 58:52they're just saved locally on disk. And
- 58:54it's going to use the GitHub CLI to pull
- 58:56in all of my comments. So, it's going to
- 58:58have access to that, too. Now, I will
- 59:00usually run retro after a big chunk of
- 59:02work like this, or I'll also just run it
- 59:04regularly, just checking up on my agent
- 59:06sessions. Um, if you have some kind of
- 59:09software factory setup where you can
- 59:10automate this, then I would save your
- 59:12agent sessions somewhere in the cloud,
- 59:14and then Retro can take a look at those
- 59:16and see what uh the agents struggled
- 59:18with. So, it's going off and sending
- 59:20agents through the 30 odd session
- 59:21transcripts and your 12 review comments,
- 59:23and it's going to come back with a
- 59:25ranked list. So, we're essentially
- 59:26throwing a bunch of tokens at this and
- 59:28looking for improvements or potential
- 59:30improvements to the environment our
- 59:31agents are operating in. Now, we didn't
- 59:33pay attention at all to the impleers
- 59:36while they were running. I didn't look
- 59:37at the sub agent traces. Haven't looked
- 59:38at that at all. This is our opportunity
- 59:40to apply um some tokens to it and
- 59:44actually look at those and get some
- 59:45improvements from it. Okay. And here we
- 59:47go. We have the retro back. So, all 12
- 59:50of my review comments have one root
- 59:52cause. Nothing in the CVM's written
- 59:55standards cover your points. The
- 59:56existing code in the docs model do the
- 59:58opposite. So existing stuff in coding
- 1:00:00standards.mmd and docs frontend state
- 1:00:02show the patterns you rejected and main
- 1:00:05already has thousands of instances.
- 1:00:07Thousands of instances fly me. Okay. So
- 1:00:10I am trying to turn an oil tanker around
- 1:00:12apparently. And also the prototype
- 1:00:14branch was copied. Okay. So its first
- 1:00:16recommendation is to turn your comments
- 1:00:18into ratcheted checks. The first one is
- 1:00:20as outside shared utilities. Yes,
- 1:00:23lovely. Sounds good. There, that is
- 1:00:262,000 instances it will find. Okay,
- 1:00:28brutal intersections into interface
- 1:00:30extends. Oxlint has no rule for this,
- 1:00:32but a small passer. So, it's basically
- 1:00:34saying create a custom lint uh rule for
- 1:00:38this rule. Excellent. Next, I said we
- 1:00:40should kill use effect. Lovely job. We
- 1:00:43turn it off for a specific directory.
- 1:00:45So, hooks. And there are currently
- 1:00:47around 230 use effects in 140 files.
- 1:00:51Next we have use search params and magic
- 1:00:53strings. So this would point at a new
- 1:00:55typed search params helper. Lovely. We
- 1:00:58ban raw fetch and instead we have a
- 1:01:00typed API client module. And then it's
- 1:01:02saying too many comments. So here no
- 1:01:05lint rule fits. Yeah, I don't know what
- 1:01:07to do about comments. I mean like Lauren
- 1:01:08Tan potato says they just ban comments.
- 1:01:11No comments allowed. And I kind of I
- 1:01:14kind of want to go that direction but I
- 1:01:16wonder whether we do that in a phased
- 1:01:18approach where we ban comments in
- 1:01:19certain folders. This is interesting. So
- 1:01:2118% of lines of comments in the new
- 1:01:24features diagrams against a 12% repo
- 1:01:26average. 12% of code in my repo is
- 1:01:29comments and 20% of the new feature is
- 1:01:32comments. It's crazy. Okay, I really
- 1:01:34like number one. All of those I think
- 1:01:36should be raised as issues on the repo.
- 1:01:38Can we also start triing the no comments
- 1:01:42rule in certain folders? And actually, I
- 1:01:44want you to give me your opinion on what
- 1:01:47we would lose inside features diagrams
- 1:01:50if we just deleted all the comments
- 1:01:51immediately. Is there any information
- 1:01:53contained within the comments that
- 1:01:55cannot be divined from the code itself?
- 1:01:57Okay. Number two, it says fix the docs
- 1:01:59that teach the rejected patterns.
- 1:02:00Obviously, yes. Number three, prototype
- 1:02:02code was copied and not reimplemented.
- 1:02:05Yeah, this is interesting. So, it's
- 1:02:07actually recommending a change to my
- 1:02:09skills about the prototype skill and the
- 1:02:11implement implement spec implement
- 1:02:13brief. For number three, could you raise
- 1:02:15an issue on the map PCO skills repo? By
- 1:02:17the way, this is often how my skills get
- 1:02:19improved is I raise issues about my own
- 1:02:21skills based on what I find in these
- 1:02:23retros and they get subtly improved. The
- 1:02:25reviewer can't cover a big diff with one
- 1:02:28agent. Yep. So, this is the code review
- 1:02:30skill kind of not being able to perform
- 1:02:33at its limits. Can you raise an issue
- 1:02:35for number four, please? And I think
- 1:02:37there might be an existing issue. So
- 1:02:38maybe you can just add this as a kind of
- 1:02:41extra, you know, reason for me to look
- 1:02:43at it. There's no argument to say that
- 1:02:44you should do instead of like doing
- 1:02:47automated review on the spec, you should
- 1:02:49do it on every single ticket, but I
- 1:02:51found that that is just, you know,
- 1:02:53extraordinarily slow. It's absolutely
- 1:02:55hugely slow approach. But it looks like
- 1:02:57the code review skill is kind of like,
- 1:02:59you know, taken under a 400word limit,
- 1:03:01which doesn't make sense to me. So I
- 1:03:03think maybe the code review skill might
- 1:03:05need to change, might need to um divide
- 1:03:08more chunks of it into sub agents so
- 1:03:10that it can um more easily do it. Okay,
- 1:03:13it's asking some stuff about the
- 1:03:14implement spec skill with number six. I
- 1:03:17really like that idea. It's basically
- 1:03:19saying that in implement spec it um
- 1:03:23creates a merger agent too early. It
- 1:03:25should just try to like merge it in
- 1:03:27directly. For number seven, could you
- 1:03:28raise an issue about this and see if we
- 1:03:30can hill climb towards a like a faster
- 1:03:33suite? In number eight, there's a skill
- 1:03:35I have called verify CVM, which
- 1:03:37basically kicks in every time I want to
- 1:03:40verify some code or an implementation on
- 1:03:42the CVM. It runs it inside a browser.
- 1:03:45Um, does all sorts of stuff. Okay, could
- 1:03:47you add eight as an issue? And all of
- 1:03:49number nine, all the smaller items
- 1:03:51should be added as separate issues. That
- 1:03:53all looks great. So honestly, this retro
- 1:03:55was extremely extremely good. We've I
- 1:03:58think we might get like 20 issues out of
- 1:04:01this. Things that can go like that we
- 1:04:04probably don't have to grill on. Things
- 1:04:05that we can just pass off to agents and
- 1:04:07get PRs back from that will over time
- 1:04:10slowly improve the repo. While this has
- 1:04:11been running, our agent has been
- 1:04:13merging. It looks like it's just sort of
- 1:04:14waiting for all of the CI checks to
- 1:04:16complete and then it just merges each
- 1:04:18one in turn. All right, while that's
- 1:04:19going on, we have our comment audit has
- 1:04:23come back. So, it's saying of the about
- 1:04:252,000 lines of comments, about 940 can
- 1:04:28go now. And about a thousand explain a
- 1:04:31reason you can't see in the code. It
- 1:04:33says seven comments are already stale.
- 1:04:35There you go. And there are no eslint
- 1:04:37disable or ts expect error directives to
- 1:04:40worry about. Okay, let me lay into the
- 1:04:42agent for a second. The thing that
- 1:04:44concerns me about comments is that they
- 1:04:45allow workarounds to proliferate and the
- 1:04:50comments kind of act as a fig leaf that
- 1:04:53the agent is able to put there and say,
- 1:04:55"Look, this is fine because we've got an
- 1:04:57explanatory comment."
- 1:04:59The, you know, idea behind lots of folks
- 1:05:01like Lauren Tan is that the comments are
- 1:05:05actually a safety valve that you are
- 1:05:07using too often that you're basically
- 1:05:09saying, "Okay, um, because I've got this
- 1:05:12comment, I'm allowed to do the
- 1:05:13workaround." Whereas, if you were banned
- 1:05:15from doing the comment, you might
- 1:05:16actually not take the workound. All this
- 1:05:19to say, what I would like you to do is
- 1:05:20to tell me which of these could be moved
- 1:05:22into ADRs, which of these could actually
- 1:05:25just become nonworkarounds. In other
- 1:05:27words, use something you don't need a
- 1:05:29comment for. And which of them could
- 1:05:32just disappear because they're not
- 1:05:34actually needed or you can actually
- 1:05:36infer it from the code. I want you to be
- 1:05:38more aggressive here. Let's see what it
- 1:05:39says here. I don't know. Let's see.
- 1:05:40Okay, guess what? It agrees with me. The
- 1:05:42comment next to a workaround often marks
- 1:05:43a place where the code should have been
- 1:05:45designed differently, not explained.
- 1:05:46Haha. It's guessing that the TL draw and
- 1:05:49command K quirks mostly become adapter
- 1:05:51rappers. The race constraints mostly
- 1:05:54become test names. Yeah, that's a
- 1:05:56legitimate place to have some kind of
- 1:05:57like free text is just like the name of
- 1:06:00a test. And while that has happened, our
- 1:06:02PR, the mega PR stack has now been
- 1:06:05merged to production. So, I've got this
- 1:06:07loaded up. We should be able to capture
- 1:06:09my face here. And there we go. We have
- 1:06:11my face. And we can see that I can add
- 1:06:14text to the thumbnail like this. So, I
- 1:06:16can add a big box here that my hand is
- 1:06:18kind of pointing to. I can go all the
- 1:06:21way down and I can see that is how it's
- 1:06:23going to look. There's like a button
- 1:06:24here saying a dark panel behind the
- 1:06:27drawing. So, I can take that out or put
- 1:06:29that in if I want to. And I mean, it's
- 1:06:31pretty good, guys. Like, that is not
- 1:06:33bad. If I exit out to here, then we can
- 1:06:35see my thumbnail is ready to go. I can
- 1:06:37select it when I then upload it to
- 1:06:39YouTube. I can click back through and
- 1:06:41edit it. And back we are should be back
- 1:06:44to this screen here. Nice. So, you can
- 1:06:46see exactly how much fidelity it has to
- 1:06:48the prototype that we created. It seems
- 1:06:50to be working. Okay. I probably do have
- 1:06:52some like follow-up feedback here, but
- 1:06:54overall, yeah, I can insert icons. Let's
- 1:06:57just add this one for instance. Bam.
- 1:06:59Like that. Put that on my finger.
- 1:07:01Lovely. And there we go. Just like that,
- 1:07:03I've built a feature, something that I
- 1:07:05will enjoy using for the rest of the
- 1:07:08time that I use this application. And
- 1:07:09inside our agents view here, we can see
- 1:07:12that yes, okay, when I tell it to be
- 1:07:14more aggressive, it says 22 can simply
- 1:07:16be deleted. There are 18 workarounds
- 1:07:19that need changing. Look at that. I
- 1:07:21mean, that is wild. I feel like there
- 1:07:23might be a skill here, you know, like
- 1:07:25just looking at all of your comments
- 1:07:26that are in the repo and just using
- 1:07:28those as smells and just say, "Okay,
- 1:07:30sniff sniff sniff. Take a look at that
- 1:07:32comment. See what workound it's
- 1:07:34describing. Can we just get rid of the
- 1:07:36workaround? Get rid of the comment." And
- 1:07:38it does say there are three ADRs. Yeah,
- 1:07:40there you go. So, CVM custom shapes are
- 1:07:42a persistence contract. Facecam
- 1:07:44centering is tuned by I diagram PGs
- 1:07:46render in the running app. All three of
- 1:07:48which I agree make good ADRs. And it's
- 1:07:50giving me a suggested PR order here. So,
- 1:07:53let's prompt it one more time just to
- 1:07:54tie this up. I want you to take all of
- 1:07:57these findings and put them in one more
- 1:07:59issue that will be the kind of umbrella
- 1:08:01issue for this idea. And that, as they
- 1:08:04say, is that now what I would do next is
- 1:08:06I would go into the thing that I just
- 1:08:08created. I would um try to find anything
- 1:08:11that I could improve and QA it. And then
- 1:08:14those would go into issues which I would
- 1:08:16then just slam through with an agent,
- 1:08:18probably not even grill them. I would
- 1:08:19then go back through the issues, get my
- 1:08:21agent to take a look at all of them and
- 1:08:23turn those into codebase improvements
- 1:08:25and all of those I would expect the diff
- 1:08:27to be really really small and so I could
- 1:08:29just one-shot them. But that is it
- 1:08:30folks. Hopefully you enjoyed this kind
- 1:08:32of deeper dive of me actually walking
- 1:08:34through how I do things. And hopefully
- 1:08:36you get a good sense for like where I am
- 1:08:39most valuable in this process. I'm most
- 1:08:41valuable early on in the alignment phase
- 1:08:43where we talk through everything. We get
- 1:08:45alignment. I understand exactly what's
- 1:08:47being built. I create a prototype. We
- 1:08:49figure that all out together. And then I
- 1:08:50am really useful at the end where my
- 1:08:53technical expertise can come in and I
- 1:08:54can impose my coding standards and I can
- 1:08:57say no that looks bad. Let's do this
- 1:08:59instead. In other words, grilling and
- 1:09:01retro are really the two main points at
- 1:09:03which I interact with the system. And
- 1:09:05then of course you know QA and you know
- 1:09:08putting in my taste, making sure that
- 1:09:10everything feels right and is working
- 1:09:11how I want it to. But thank you so much
- 1:09:13for watching. Hopefully you enjoyed this
- 1:09:15uh wow nearly hour and 10 minute video
- 1:09:17so far and that you learned something
- 1:09:19from it. I love doing these deep dives.
- 1:09:20I don't get enough time to do them. So
- 1:09:23you know if you like this then do share
- 1:09:24it with your friends and that will
- 1:09:26incentivize me to make more of them.
- 1:09:27Thanks so much for watching. See you
- 1:09:28very soon.
About this transcript
This page contains the full transcript of Watch me ship a 21,000-line feature with mattpocock/skills by Matt Pocock, generated from the public captions YouTube serves with the video. The transcript has 14,494 words across 1,986 segments, with the original timestamps preserved so you can click any line to jump to that moment in the embedded player.
What you can do with it
Use the transcript to take notes, quote the speaker, build a study guide, generate a summary with ChatGPT or Claude via the YouTube Summary tool, or export it as a timed subtitle file with YouTube to SRT. You can also re-open it in the transcriber to choose a caption track available on the video.
Free YouTube transcript tool
YouTube2Text is a free YouTube transcript generator — no signup, no daily limit. Paste any YouTube link and get the full transcript instantly, with timestamps, click-to-jump, caption language selection, AI prompts for ChatGPT, Claude, and Gemini, and exports to TXT, SRT, VTT, or Markdown.