YouTube2Text

Watch me ship a 21,000-line feature with mattpocock/skills — Transcript

by Matt Pocock · 14,494 words · 1,986 segments · language en · Watch on YouTube

Full transcript

  1. 0:00You've been asking again and again and
  2. 0:02again for me to show you what my
  3. 0:05development process looks like. I've
  4. 0:06done a tiny little bit of it on this
  5. 0:08channel, but not nearly enough. And
  6. 0:10since I did it, I've come into
  7. 0:11possession of one of the most starred
  8. 0:14repos in the world, which is my skills
  9. 0:16repo, and certainly the most starred
  10. 0:18skills repo in the world. And so, I do
  11. 0:19think I owe it to you to show off how I
  12. 0:22use these skills in something more than
  13. 0:24a tutorial, in a real walkthrough. And
  14. 0:26in this walkthrough, we're going to
  15. 0:28focus especially hard on two skills. The
  16. 0:30first one is going to be the grill with
  17. 0:32doc skill. And I think grilling is
  18. 0:35really much more of an art form than
  19. 0:37most people assume. In this walkthrough,
  20. 0:39I really focus a lot more on the domain
  21. 0:41modeling aspects of it. In other words,
  22. 0:42the kind of classic DDD skills that
  23. 0:45allow you to basically say, "Okay, I've
  24. 0:47figured out the language of my
  25. 0:48application." And so once I've figured
  26. 0:50out the language, then I've actually
  27. 0:52figured out the app and figured out what
  28. 0:53I want to build. In this video, you see
  29. 0:55me go through that process on a real
  30. 0:57feature that I will use from now on,
  31. 1:00even to build the thumbnail for this
  32. 1:01video. And the next skill I go deep on
  33. 1:03is the retro skill, which is we look
  34. 1:05back on the huge chunk of sessions. I
  35. 1:07think we do like 30 sessions in this
  36. 1:09video, and we suggest a bunch of
  37. 1:11improvements. I'm going to walk through
  38. 1:12a real huge I think 25,000 line PR. I'm
  39. 1:16going to do some real human review on it
  40. 1:18and show you how that human review can
  41. 1:20then go back and influence and impact
  42. 1:22the system going forward. Now, if you're
  43. 1:23interested in this stuff, then the AI
  44. 1:25coding crash course that I have is
  45. 1:27absolutely the place that you need to be
  46. 1:28if you want a more structured approach.
  47. 1:30But with that, let's get cracking. Let's
  48. 1:32dive in. So, this is where all of my
  49. 1:34courses get created. All of my videos
  50. 1:36get created. It's a video editor, a
  51. 1:38thumbnail editor, a AI writer. It helps
  52. 1:42me schedule things. It's creates shorts.
  53. 1:44It does all sorts of stuff. And the bit
  54. 1:46that I'm particularly interested in
  55. 1:47right now is this little thumbnail
  56. 1:49creator down here. This is where I can
  57. 1:51post the video that I'm creating and
  58. 1:53editing right now and I can create a new
  59. 1:55thumbnail. And this is essentially a
  60. 1:57process where I capture my face and then
  61. 2:00my face goes into the thumbnail and I
  62. 2:02can create a diagram with it. For
  63. 2:03instance, I just stopped recording so
  64. 2:05that I could take this still. This
  65. 2:06allows me to move this left and right.
  66. 2:08And then in here in my diagram creator,
  67. 2:10I can essentially screenshot this part
  68. 2:13of the window here. And what that will
  69. 2:16do is I can then copy and paste it into
  70. 2:18the thumbnail. So if I press Ctrl +V
  71. 2:20here, you can see it gets pasted in and
  72. 2:22then the cutout automatically gets cut
  73. 2:24out by this nice API. I can position
  74. 2:26these and I have my thumbnail. Now this
  75. 2:28is pretty nice, but what I would really
  76. 2:30like to do is remove a bit of friction
  77. 2:32here. It's annoying having to swap over
  78. 2:34to the diagram view and like have my you
  79. 2:37know it's it's like a annoyingly manual
  80. 2:39process, especially if I get things
  81. 2:41wrong. I can't quite position them
  82. 2:43correctly. I have to go back. I have to
  83. 2:45screenshot it again and try it again. I
  84. 2:47essentially I don't have enough
  85. 2:48flexibility here. What I really want is
  86. 2:50to be able to draw on this surface here.
  87. 2:52In other words, have the diagram kind of
  88. 2:54integrated with the picture of me there.
  89. 2:57I really don't have a clue on how I'm
  90. 2:59going to build this. I just know that
  91. 3:01it's something I want. And so I thought
  92. 3:02it would make a good candidate for like
  93. 3:04a new feature or an improvement and to
  94. 3:06sort of show you the whole process end
  95. 3:08to end. And so when I enter into a new
  96. 3:10piece of work, I start thinking through
  97. 3:12this decision tree, which is essentially
  98. 3:14what skill from my skills am I going to
  99. 3:17use? In other words, you have
  100. 3:18essentially a new session here. You want
  101. 3:20to create a new piece of work. You don't
  102. 3:21know what to choose. You first think
  103. 3:23through, okay, what is the thing I'm
  104. 3:24trying to create? And the thing I'm
  105. 3:26trying to create is essentially a diff.
  106. 3:28The diff between the old codebase and
  107. 3:31the new codebase. And if that diff is
  108. 3:33really small, then you can probably just
  109. 3:35oneshot the thing. So you don't need to
  110. 3:37worry about grilling before you
  111. 3:38continue. But in this case, I know that
  112. 3:40the thing we're creating is pretty big.
  113. 3:42And so I'm going to go with grill with
  114. 3:44docks. From there, if it ends up being a
  115. 3:47lot larger than I thought, that can
  116. 3:49always bail out into Wavefinder, which
  117. 3:51is what I use for turning initial
  118. 3:54grilling sessions, running them over
  119. 3:56multiple sessions, developing this huge
  120. 3:58great big um concept of what we're
  121. 4:00trying to build, and then going until we
  122. 4:02get there. But I prefer starting with
  123. 4:04grill with docs because if it ends up
  124. 4:06being smaller than I thought, then it
  125. 4:07means I don't have all the overhead of
  126. 4:09running a wayfinder session. The place
  127. 4:10I'm going to run this is inside my
  128. 4:12personal wiki, which is a home repo. If
  129. 4:16you don't know what a home repo is, then
  130. 4:17check out my accompanying video on that.
  131. 4:19The agent I'm going to use is Claude
  132. 4:21Code because that's the one I have a
  133. 4:22subscription to. That's what I'm set up
  134. 4:23for and that's kind of what I like. I am
  135. 4:25on the Claude Ultra plan. I have Opus
  136. 4:275.5 and I'm running it on medium effort.
  137. 4:30And of course, I have all of my skills
  138. 4:32installed and I also have a bunch of
  139. 4:33custom skills that are inside my home
  140. 4:35repo. My home repo is not open source,
  141. 4:37but most of the skills you're going to
  142. 4:38see are open source and there are
  143. 4:40aihero.dev/skills.
  144. 4:43So, we're going to start with grill with
  145. 4:45docs here and then I'm going to explain
  146. 4:46my problem through dictation and I'm
  147. 4:48using whisper flow for that. In the
  148. 4:50course video manager, we have a
  149. 4:52thumbnail viewer. And the thumbnail
  150. 4:54creator is okay. I like that it asks me
  151. 4:58and it sort of forces me to put my face
  152. 5:01onto the screen. But what I don't like
  153. 5:03is the sort of rigmarole I have to go
  154. 5:05through for attaching a diagram. Most of
  155. 5:07my diagrams are built in TL Draw and
  156. 5:11using the custom diagram playground that
  157. 5:13we have, but I don't have what I would
  158. 5:15really like is for the diagram to be
  159. 5:17able to be editable in the scene that
  160. 5:20I'm viewing. So, in the context of the
  161. 5:21thumbnail, in other words, I want my
  162. 5:23face visible and then to have the thing
  163. 5:26just editable next to me. I really don't
  164. 5:28know UIwise how we're going to handle
  165. 5:32that and what that's going to look like.
  166. 5:33So, I think there are a lot of questions
  167. 5:34to answer there. I want you to notice a
  168. 5:36couple of things about how I'm prompting
  169. 5:38there. The first thing is I'm thinking a
  170. 5:40lot about the why. I'm thinking a lot
  171. 5:42about the problem that I'm trying to get
  172. 5:44the agent to solve. I'm not necessarily
  173. 5:47giving it a, you know, decent sort of
  174. 5:50like idea of what exactly to do. If I
  175. 5:53give it the why, then the agent feels a
  176. 5:55lot more empowered to go away and
  177. 5:58actually produce a solution itself or
  178. 6:00maybe have a discussion about the
  179. 6:01solution. Whereas if you come to it with
  180. 6:03a what saying I want to do X Y Z then it
  181. 6:06will often not necessarily uh come up
  182. 6:09with that creative an answer. And so we
  183. 6:11can see here it's come back with a bunch
  184. 6:13of grilling questions here. It's asking
  185. 6:16first what is the rigma roll? What is
  186. 6:17the part of attaching a diagram that
  187. 6:19hurts most? I would say that A leaving
  188. 6:21the thumbnail creator is annoying and B
  189. 6:24is also annoying and C is also annoying.
  190. 6:28So I think you've put your finger on all
  191. 6:30three there to be honest. Is the
  192. 6:32thumbnails diagram the same as the
  193. 6:33videos diagram? When you edit the
  194. 6:35diagram inside the thumbnail, should the
  195. 6:36changes go back to the diagram the video
  196. 6:38uses? This is kind of a question about
  197. 6:40where do we want this diagram stored?
  198. 6:43You know, like should it be inspired
  199. 6:45from existing diagrams? Because in the
  200. 6:47application, you can see if I do a
  201. 6:48search here, then I can actually search
  202. 6:50for existing diagrams. So I found like
  203. 6:52this wavefinder diagram by just sort of
  204. 6:55like oh I've got a search, haven't I? So
  205. 6:56go to diagram wayfinder and then search
  206. 6:59all the diagrams that I've used. So this
  207. 7:01one for instance is good. This one's
  208. 7:03another one. So it's kind of asking how
  209. 7:05do we like associate these thumbnail
  210. 7:08diagrams with this list. And I'm not
  211. 7:10quite sure that with Q2. I'm not sure.
  212. 7:13I'm kind of not sure of the tradeoffs
  213. 7:14there really. I suppose the question is
  214. 7:16do I want the diagram to be sort of
  215. 7:19searchable inside the main list? Do I
  216. 7:22want it associated? I'm not quite sure
  217. 7:24what the use case is there. Q3. Starting
  218. 7:26from scratch. Should you be able to draw
  219. 7:27a new diagram straight in the thumbnail
  220. 7:29without any existing diagram? Q3, yes, I
  221. 7:32agree. That sounds good. With Q3 too, I
  222. 7:35kind of maybe want to be able to search
  223. 7:37existing diagrams. I like the be like
  224. 7:39ability to add components that we've
  225. 7:42already got. Maybe searching for stuff
  226. 7:44that we've already got or maybe I could
  227. 7:45just copy stuff in from one TL drawboard
  228. 7:47to another. I want you to notice at this
  229. 7:49point how loose the language is that
  230. 7:51we're using to describe the feature. It
  231. 7:53doesn't feel like we are particularly
  232. 7:56sort of we haven't figured out the right
  233. 7:58names for things yet. And so I'm having
  234. 8:00to use a lot of weird verbosity and
  235. 8:02shortcuts. It's not quite clear in my
  236. 8:04head still. As we go through this
  237. 8:05grilling process, the idea of what we're
  238. 8:07building is going to become clearer and
  239. 8:09clearer in my head until we end up with
  240. 8:11a nice set of words for the things we're
  241. 8:14building. And once we're there, we've
  242. 8:16kind of built the feature. So Q4 says,
  243. 8:18should there be one editing mode or two
  244. 8:19in the thumbnail? Should there be a
  245. 8:21single edit the diagram mode and a
  246. 8:23separate arrange mode? For Q4, I think
  247. 8:25the process should probably be that we
  248. 8:27take a photo of my face first. Then that
  249. 8:30face gets arranged onto the canvas and
  250. 8:33then we once my face is there, then we
  251. 8:36can sort of build the diagram around my
  252. 8:38face and I should have the option of
  253. 8:39retaking it. For Q5 is the face fixed.
  254. 8:43For Q5, I think I should have the option
  255. 8:45of moving the face horizontally. And
  256. 8:50from there, that would just give me a
  257. 8:51bit more flexibility. Q6, is this only
  258. 8:53about diagrams? Yeah, Q6, let's make it
  259. 8:56diagram only for now. I can't think of a
  260. 8:58use case where I want to attach other
  261. 9:00stuff inside the thumbnail. We don't
  262. 9:02want to build a second Figma. We just
  263. 9:03want to make this particular flow
  264. 9:04easier. Okay. So while we were answering
  265. 9:06those questions, the agent was going off
  266. 9:08spinning up a background agent and going
  267. 9:10to find the supporting information that
  268. 9:12we needed here. So it's actually going
  269. 9:14ahead and changing two of the questions
  270. 9:17here. And then Q7 says, should edit the
  271. 9:19diagram in place mean a live TLR editor
  272. 9:21clipped to the uh thumbnail frame with
  273. 9:23the camera locked so the area you see is
  274. 9:25the thumbnail? For Q7, I'm concerned
  275. 9:27that cramping us into that smaller space
  276. 9:30will mean that editing the thing or the
  277. 9:33thumbnail actually becomes kind of
  278. 9:35painful. And so I think we might need to
  279. 9:37prototype a few different approaches
  280. 9:38there. So that's a very detailed first
  281. 9:40response. Let's fire it off. Now you
  282. 9:42might be looking at this approach and
  283. 9:43you might be thinking, okay, what like
  284. 9:46what benefits this have over approaches
  285. 9:48that I'm taking over like plan mode.
  286. 9:50Let's say what this skill does and what
  287. 9:52this approach does is we align on the
  288. 9:54thing that we're building before we go
  289. 9:56ahead and build it. This means that
  290. 9:57we're going to get a much more
  291. 9:58predictable output. I'm going to have
  292. 10:00much stronger understanding over the
  293. 10:02thing that we're building. And like
  294. 10:04while it's building, I'm going to let it
  295. 10:06just sort of run by itself. But this is
  296. 10:08the moment early on when I get to maybe
  297. 10:11with my teammates align on what we're
  298. 10:13building, figure out what it actually
  299. 10:15is, what the words we're going to use
  300. 10:17about it, and then everything from that
  301. 10:19point all the way down to human review
  302. 10:20at the end is kind of going to be fairly
  303. 10:22on rails. So Q2, it's reframing it. It's
  304. 10:25saying, is the thumbnails diagram a real
  305. 10:28diagram? And at this point, we should
  306. 10:29probably talk about what it actually
  307. 10:31means by a real diagram. This is inside
  308. 10:33the course video manager repo. And this
  309. 10:36is a glossery.mmd that is my pride and
  310. 10:39joy. When I talk about language inside a
  311. 10:41project, what I'm really talking about
  312. 10:42is the words that you're using to
  313. 10:44describe certain things. And in this
  314. 10:47pretty massive file here, which is about
  315. 10:49560 lines, we define all of the main
  316. 10:54concepts that sit inside this course or
  317. 10:57sorry that sit inside this repository
  318. 10:59that are responsible for this project.
  319. 11:01And the stuff that we're really talking
  320. 11:02about here is a diagram. And so there's
  321. 11:05a whole section on diagrams. So a
  322. 11:07diagram is really a group of diagram
  323. 11:09snapshots, which is a copy of the
  324. 11:11diagram's drawing at the moment that a
  325. 11:14clip is filmed. In other words, in my
  326. 11:16video editor, it's linked up to the
  327. 11:18diagram. And so I can see what diagram I
  328. 11:20was using at each point in the video.
  329. 11:22There is the active diagram. So the
  330. 11:24diagram that the author is drawing on.
  331. 11:26Now we have an action called restore to
  332. 11:28head. when we load an older diagram
  333. 11:30snapshot back as the active diagram.
  334. 11:33There are preserved snapshots as well
  335. 11:34which are diagram snapshots kept in its
  336. 11:37diagrams timeline even when no clip uses
  337. 11:39it. You can start to see that these
  338. 11:40definitions form a really nice picture
  339. 11:43of the feature. And what we're kind of
  340. 11:45doing here is we are trying to add to
  341. 11:48this trying to figure out where our new
  342. 11:50feature lives in this existing
  343. 11:52landscape. So, by asking what a is a
  344. 11:54thumbnails diagram a real diagram, we're
  345. 11:57kind of asking, okay, it's a diagram,
  346. 11:59but maybe it's private to the thumbnail.
  347. 12:02For Q2, I think it makes sense to have
  348. 12:04our existing setup here. But what I'm
  349. 12:07concerned about is that the thing we're
  350. 12:10putting into the thumbnail is not really
  351. 12:11a diagram. It's just a single snapshot.
  352. 12:14In our model, a diagram is really a
  353. 12:17grouping of different snapshots of that
  354. 12:19diagram as they change through a clip.
  355. 12:21whereas this is more like a diagram
  356. 12:23snapshot. So now that probably sounds
  357. 12:25like garbage or jargon to you if you
  358. 12:27don't understand the language of the
  359. 12:29project, but I've been able to
  360. 12:30communicate something pretty rich that
  361. 12:32the model understands because the
  362. 12:34glossery.mmd is in its context. Q8
  363. 12:37sounds good. All three of those sound
  364. 12:38really valuable. Q9, yes, um the when we
  365. 12:42move the face, the diagram should just
  366. 12:44stay put. Q10, yes, when we retake, then
  367. 12:46we do the background removal and we
  368. 12:48replace the photo. Okay, it's now asking
  369. 12:50whether it should prototype a few
  370. 12:52different editing surfaces, and I love
  371. 12:54this. That's exactly what I want it to
  372. 12:56do. The tricky thing about Q1 here is
  373. 12:58that it's really about a question about
  374. 13:00feel. How does it look? How does it feel
  375. 13:02to use? And I won't really know the
  376. 13:05trade-offs until I see the differences
  377. 13:08all laid out in front of me. In other
  378. 13:09words, until I have a go at it. And so,
  379. 13:11I have a prototype skill that gives you
  380. 13:13multiple options that you can use to
  381. 13:15make these kinds of decisions. And
  382. 13:17that's what the agent is trying to do
  383. 13:19here. Which ones should it prototype?
  384. 13:21Q11. Yes, that sounds great to me. The
  385. 13:24benefit of having multiple prototypes to
  386. 13:25look at is especially if it builds
  387. 13:28something that you don't like, that
  388. 13:29often tells you more than what you might
  389. 13:32get from something you do like. So
  390. 13:35actually exploring lots of different
  391. 13:36options can give the agent a really rich
  392. 13:39view over what you actually want to
  393. 13:40build. And there we go. Uh we now have
  394. 13:42the glossery. The CVM glossery has no
  395. 13:44entry for the thumbnail and it's
  396. 13:46proposing two. So it's proposing a
  397. 13:48thumbnail, the image shown for a video
  398. 13:50on YouTube or a cutout or rather and a
  399. 13:53cutout, the author's face with the
  400. 13:55background removed placed over the
  401. 13:56diagram. And then it's also saying there
  402. 13:58should be a third term thumbnail diagram
  403. 14:01for Q12. Yes, that sounds great. All
  404. 14:03right, let's send this off. And now
  405. 14:05again, we should be getting closer and
  406. 14:08closer as we go. Lots of folks ask me
  407. 14:10like, you know, why what happens if you
  408. 14:14have a grilling session that runs for
  409. 14:16like 500 uh questions or something? How
  410. 14:19do you know when to stop grilling? And
  411. 14:22you should like I should be driving this
  412. 14:25conversation. You know what I mean? Like
  413. 14:27you should be the one in charge of it.
  414. 14:29The agent is not grilling you. You are
  415. 14:31in a conversation with it. And so you
  416. 14:33should feel free to just go, "Nope,
  417. 14:35we've talked enough. Let's go and
  418. 14:36actually create some code now." Okay, we
  419. 14:38can see it's updated the section on
  420. 14:40thumbnails inside the glossery. That's
  421. 14:42really good. And now it's doing
  422. 14:43something cool, which is it's pinging
  423. 14:44off a sub agent to go and prototype
  424. 14:47thumbnail diagrams. So, that's great.
  425. 14:48We're able to continue grilling while it
  426. 14:50goes off and does some work in the
  427. 14:52background. Okay. And now we're doing
  428. 14:54some hardcore language stuff. The
  429. 14:55thumbnails drawing is neither a diagram
  430. 14:57nor a diagram snapshot. You're right
  431. 14:59that it isn't a diagram, and a diagram
  432. 15:01snapshot doesn't fit either. The
  433. 15:02glossery defines a snapshot as a copy at
  434. 15:04the moment a clip was filmed. So it's
  435. 15:06now proposing a new term, a thumbnail
  436. 15:09drawing. The di drawing that belongs to
  437. 15:11one thumbnail you edit in place and we
  438. 15:13can start from a diagram diagram
  439. 15:14snapshot or another thumbnail's drawing.
  440. 15:16It's actually saying to avoid thumbnail
  441. 15:18diagram here. Now I know this glossery
  442. 15:21pretty well, right? And the better I
  443. 15:22know the glossery, the more able I'm
  444. 15:24able to make smart contributions to the
  445. 15:27application, the better I know
  446. 15:29understand the application. And so I
  447. 15:30know there's this thing called a
  448. 15:32preserve snapshot, which is the diagram
  449. 15:33snapshot kept in its diagram's timeline
  450. 15:35even when no clip uses it. So I can say
  451. 15:38to the agent, doesn't it make sense to
  452. 15:41have a thumbnail represent a preserved
  453. 15:45snapshot? We don't always define
  454. 15:48snapshots as the moment that a clip was
  455. 15:50filmed. I'm going to show you a
  456. 15:51technique that I sometimes use when I
  457. 15:53feel like I'm at the crux of something
  458. 15:55or when I just want to talk about one
  459. 15:56thing for a minute, which is I'm just
  460. 15:58going to say, "For now, let's just focus
  461. 16:00on this question. Ask me one question at
  462. 16:02a time until I say otherwise." This is
  463. 16:04another way that you can direct the
  464. 16:05grilling. If you're kind of getting a
  465. 16:07bit scatterbrained, if you just want to
  466. 16:08focus in on the thing that you actually
  467. 16:11care about and don't care about all the
  468. 16:12small stuff, then you can just say, "No,
  469. 16:14just go one question at a time for now."
  470. 16:15One other thing it's doing here is it's
  471. 16:17reading an architectural decision record
  472. 16:20that we made on snapshots and
  473. 16:22preservation. This is another thing we
  474. 16:23do during grilling. We can take a look
  475. 16:25at ADR3
  476. 16:27just up in here diagrams as first class
  477. 16:29entities with per clip snapshots. So
  478. 16:32this is where we actually made the
  479. 16:33decision about the glossery. So the
  480. 16:35glossery kind of describes the
  481. 16:37application as it is now as does the
  482. 16:39code. But the ADRs are here to explain
  483. 16:42why we made those decisions. In other
  484. 16:44words, we are interacting with a part of
  485. 16:46the application that's relatively old,
  486. 16:47relatively mature. And if we didn't
  487. 16:49write this stuff down, then we would be
  488. 16:51guessing. This is a classic Chesterton's
  489. 16:53fence issue, right? There exists in such
  490. 16:55a case a certain institution or law, let
  491. 16:57us say for the sake of simplicity, a
  492. 16:59fence or gate erected across a road. The
  493. 17:01more modern type of reformer goes gayely
  494. 17:03up to it and says, "I don't see the use
  495. 17:05of this. Let us clear it away." to which
  496. 17:07the more intelligent type of reformer
  497. 17:09will do well to answer, "If you don't
  498. 17:11see the use of it, I certainly won't let
  499. 17:13you clear it away. Go away and think.
  500. 17:15Then when you come back and tell me that
  501. 17:17you do see the use of it, I may allow
  502. 17:19you to destroy it." In other words, do
  503. 17:21not remove a fence until you know why it
  504. 17:23was put up in the first place. So the
  505. 17:25ADRs, the architectural decision
  506. 17:27records, help us keep track of why these
  507. 17:29fences have been put up. So it's come
  508. 17:31back and of course it's saying, "Yes,
  509. 17:33you're absolutely right. I was wrong to
  510. 17:34rule it out." And so it's saying which
  511. 17:36diagram does a thumbnail's snapshot
  512. 17:38belong to. Yeah, the thumbnail pins a
  513. 17:40snapshot of some diagram's head. The
  514. 17:42question is which head you're editing in
  515. 17:44the thumbnail creator. This is a really
  516. 17:46tricky one because we're basically
  517. 17:48deciding how the thing is going to work.
  518. 17:50Now we basically in this mode we might
  519. 17:53have to choose a diagram so that we can
  520. 17:56create a snapshot inside it or we choose
  521. 17:58an existing snapshot that we then edit.
  522. 18:01It all feels a little bit clunky and
  523. 18:04weird. And what it's kind of suggesting
  524. 18:05is that we might need a diagram of its
  525. 18:08own for each thumbnail. It keeps the
  526. 18:10teaching diagrams head safe while you
  527. 18:11simplify for the thumbnail and you still
  528. 18:13get to touch start from the teaching
  529. 18:15version. I really don't know here. I
  530. 18:17really don't know. I'm just going to
  531. 18:18sort of spill out what I'm thinking
  532. 18:20about. I think so what I'm thinking
  533. 18:21about in my head is the decision between
  534. 18:23whether we kind of tie into the existing
  535. 18:26diagram diagram snapshot stuff which is
  536. 18:28mature there's a lot of code in there or
  537. 18:30whether we sort of extend that work and
  538. 18:34instead apply it to a different data
  539. 18:36model call it a different thing and it's
  540. 18:39essentially whether to mix the streams
  541. 18:41or not mix the streams I think probably
  542. 18:44what I'm most inclined to do here is not
  543. 18:46mixing the streams but what I'm scared
  544. 18:48about is later down the line. We might
  545. 18:51wish that we had so that these models
  546. 18:53could be linked somehow, but I can't see
  547. 18:55the concrete use case for why we would
  548. 18:58want to still hang on to the existing
  549. 19:00model. You can see that I'm struggling
  550. 19:02here, right? Like I this is a hard thing
  551. 19:04to think about. And if I had colleagues,
  552. 19:06this would be the moment when I would
  553. 19:07reach out to them and go, "Help me. I'm
  554. 19:09not quite sure what we do here. This
  555. 19:11feels like quite a large consequential
  556. 19:13decision for this feature." So, it's
  557. 19:14saying, "I would go with your instinct
  558. 19:15and keep them separate. The fear of
  559. 19:17wanting them linked later is mostly
  560. 19:18covered by two facts. So both sides s
  561. 19:21store the same scene format. In other
  562. 19:24words, the way they store it in the
  563. 19:25database is the same. Copying between
  564. 19:26them is trivial in either direction. So
  565. 19:29star from a diagram or snapshot works
  566. 19:30without the models being joined. The
  567. 19:32link you're likely to want is where a
  568. 19:33drawing came from, not one model. Which
  569. 19:35thumbnails were made from which diagram
  570. 19:37is answered by one nullable started from
  571. 19:39snapshot reference recorded when you
  572. 19:40copy. So the reason we're so obsessed
  573. 19:42with language at this point is because
  574. 19:44the language is going to form the data
  575. 19:46model that everything else fits on top
  576. 19:48of. Once we understand the language,
  577. 19:49once we understand the names for these
  578. 19:51things, we then have names for database
  579. 19:53tables. We understand how they uh
  580. 19:56reference other parts of the system. And
  581. 19:58so we can create tables from that,
  582. 20:00create uh modules and set it up. Okay,
  583. 20:02so I think I've decided okay that
  584. 20:05suggestion sounds good. I like that we
  585. 20:08have a lot of flexibility not to quite
  586. 20:10decide the data model now and I like
  587. 20:13your suggestion of tracking the snapshot
  588. 20:15that it came from in case that becomes
  589. 20:18relevant later down the line and we
  590. 20:20properly want to link it. I suppose I
  591. 20:22don't necessarily matter how we model
  592. 20:24this as long as the way we're modeling
  593. 20:26it is not lossy and we preserve all of
  594. 20:28the links. Let's just see what it says
  595. 20:29to that. I'm not necessarily giving it a
  596. 20:31great answer, but maybe that's enough
  597. 20:33for it to go on. At its best, grilling
  598. 20:35really does feel like rubber ducking
  599. 20:37with someone with a really respected
  600. 20:39colleague, someone that understands the
  601. 20:41codebase really well. And you're kind of
  602. 20:43just able to talk out your thoughts or
  603. 20:45type out your thoughts. And by talking
  604. 20:48them through, you get to a more concrete
  605. 20:51solution even before you've written any
  606. 20:52code. Okay, it's gone a bit nuts here,
  607. 20:54which is it's actually gone ahead and
  608. 20:56written an entry for thumbnail drawing,
  609. 20:58which I don't like. I don't like having
  610. 20:59the concept of drawing here. Let's take
  611. 21:01a step back. I really don't like the
  612. 21:03wording of thumbnail drawing. I I hate
  613. 21:05the fact that we've got a drawing and a
  614. 21:07diagram. Those feel like they conflict
  615. 21:10really hard. I think thumbnail diagram
  616. 21:12is just fine. Can you also run me
  617. 21:14through the decision to create an ADR
  618. 21:16here? Why did you decide to go for a new
  619. 21:18ADR? So, it sort of eagerly created an
  620. 21:20ADR without asking me, which is not how
  621. 21:23I usually like to do it. I like to have
  622. 21:25that decision be something I do during
  623. 21:27the grilling session. Okay. He says, uh,
  624. 21:29he says, uh, the agent says, "I've
  625. 21:31renamed it to thumbnail diagram
  626. 21:33everywhere, the glossery, the ADR, and
  627. 21:34the ADR's file name." Yeah, it's kind of
  628. 21:37coming back at me a little bit on here,
  629. 21:38saying one small catch to be aware of.
  630. 21:40An active diagram is a diagram, but a
  631. 21:42thumbnail diagram is not. So maybe the
  632. 21:45word diagram isn't right here. So now
  633. 21:47it's saying, why did it suggest an ADR?
  634. 21:49Why did it feel the need to write down
  635. 21:52this non-obvious decision? So it's
  636. 21:54saying it is non-obvious, right? It is
  637. 21:56surprising without context. There is a
  638. 21:58real tradeoff here and so that's another
  639. 22:00criteria and it is strong and it's hard
  640. 22:03to reverse or rather it's saying it's
  641. 22:05not hard to reverse. We could
  642. 22:06potentially walk this back. So now it's
  643. 22:09spelled it out. I do agree with its
  644. 22:10reasoning as to why it suggested an ADR.
  645. 22:12And by the way, I'm investing it time
  646. 22:14into this so that future runs understand
  647. 22:16the context for every decision so that I
  648. 22:19continue getting better grilling
  649. 22:20sessions as I continue working on this
  650. 22:22project. without this or being lazy here
  651. 22:25would mean that my next run ends up
  652. 22:27being a lot worse because I don't have
  653. 22:29as good context as I need. Okay, I agree
  654. 22:32with your decision on the ADR, but and I
  655. 22:35also agree that thumbnail diagram is a
  656. 22:37little bit awkward. Can you give me some
  657. 22:39options here and let's do some scenario
  658. 22:41testing to see how they match up against
  659. 22:43diagram versus diagram snapshot? I'm
  660. 22:46sort of leaning towards thumbnail
  661. 22:47diagram snapshot, even though that's a
  662. 22:49little bit long, but might work.
  663. 22:50Scenario testing is a really great way
  664. 22:52of kind of testing your domain language,
  665. 22:55testing the language that you're trying
  666. 22:57to use. What it does is it gives you a
  667. 22:58table of different options, different uh
  668. 23:01sentences you could use to describe the
  669. 23:03system and then it checks out how easy
  670. 23:06it would be to describe in different
  671. 23:08forms of language. So here we can see we
  672. 23:10have a candidate a thumbnail diagram
  673. 23:12snapshot versus a thumbnail diagram
  674. 23:14versus a thumbnail scene. So, in the
  675. 23:16first scenario, it says, "I started the
  676. 23:17thumbnail from the agent loop snapshot
  677. 23:19used in clip 14, then I simplified it."
  678. 23:21All three there are probably fine. You
  679. 23:24open the agent loop in the playground.
  680. 23:25Is the thumbnail in its timeline? Yeah,
  681. 23:28that's an interesting one because if
  682. 23:29it's saying it's a snapshot, then you
  683. 23:31would kind of expect it to be in there
  684. 23:34or, you know, expect it to be in there
  685. 23:35somewhere. If it's a thumbnail diagram,
  686. 23:37then you might try to look at it on the
  687. 23:40top level. And so yeah, by calling it a
  688. 23:42diagram or a diagram snapshot, it sort
  689. 23:44of makes it feel like it's linked in
  690. 23:46with the other stuff. It says here, I
  691. 23:48dragged an arrow in the diagram
  692. 23:50snapshot, but that's not good because
  693. 23:52snapshots can't change. You tell an
  694. 23:54agent to tweak the thumbnails diagram
  695. 23:56snapshot doesn't really work, but I'm
  696. 24:00starting to see why it thinks about
  697. 24:02thumbnail scene and why it thinks it's
  698. 24:04good. We can see in all of the tables
  699. 24:06here that thumbnail scene is basically
  700. 24:08fine. Apart from Matt says it allowed
  701. 24:11while working. In other words, does it
  702. 24:13match my actual mental model? For
  703. 24:15thumbnail diagram snapshot, it's bit too
  704. 24:17long, a bit too wordy. Thumbnail diagram
  705. 24:20seems fine because it is what I
  706. 24:21naturally say. And thumbnail scene is
  707. 24:24not a word that I would use. It's more
  708. 24:26sort of coding vocabulary. In other
  709. 24:28words, scene is not something that we
  710. 24:30sort of have throughout the application.
  711. 24:33Nor maybe it is actually maybe we have
  712. 24:35like a scene layer possibly. I'm just
  713. 24:37going to search in the glossery for
  714. 24:38scene here. And yeah, we do have a
  715. 24:41concept of a scene and diagram. We've
  716. 24:44also got Okay. Uh that's not good either
  717. 24:47because we've got a scene in there too.
  718. 24:48So let's read its kind of um final part
  719. 24:52here. Yeah, even though C has all the
  720. 24:53ticks, it actually does weight number
  721. 24:55seven really high. And it says C is the
  722. 24:58clearest technically, but it's not how
  723. 24:59you talk. And it puts a code word in the
  724. 25:01domain language. B has one weakness. It
  725. 25:04reads as a kind of diagram. And so,
  726. 25:06yeah, I do think it's right that
  727. 25:08thumbnail diagram makes sense as long as
  728. 25:10we have an ADR to say it's a diagram,
  729. 25:12but not a diagram. And I can see why it
  730. 25:15went for thumbnail drawing as well. But
  731. 25:17I just don't like that word. It doesn't
  732. 25:18feel like it rolls off the tongue. Okay,
  733. 25:20thumbnail diagram is the right thing. I
  734. 25:23agree that thumbnail scene is poor,
  735. 25:25especially because we do actually have a
  736. 25:26concept of a scene elsewhere in the
  737. 25:28glossery. I also agree that having the
  738. 25:30ADR there means that yeah, we have a
  739. 25:32concept of a diagram, but we've also got
  740. 25:34a thumbnail diagram. And I think that's
  741. 25:36okay to have that distinction. Can you
  742. 25:38now widen things out? I feel like we've
  743. 25:40understood the crux of what we're
  744. 25:41building. Let's now have multiple
  745. 25:43questions at once. I think this kind of
  746. 25:44ceremony feels really off to a lot of
  747. 25:47people. A lot of people go, why are you
  748. 25:49spending so much time thinking about
  749. 25:50language and sort of like um you know
  750. 25:54about the words that you're using? Why
  751. 25:56is that so important to you? And I think
  752. 25:59the reason it's so important is what
  753. 26:01you've just seen here, what we've just
  754. 26:03done. We have from almost nothing. Now,
  755. 26:07we have a fully realized concept of the
  756. 26:09thing that we're building and the data
  757. 26:10model that's going to go into it. We now
  758. 26:12know that we have a thumbnail and a
  759. 26:14thumbnail diagram. That thumbnail
  760. 26:16diagram is not technically a diagram.
  761. 26:18It's more like a scene, but we can't use
  762. 26:20the word scene because we've got that
  763. 26:21elsewhere. And then this is going to
  764. 26:22then go into the rest of this grilling
  765. 26:24session. Q2C says starting from a
  766. 26:26diagram's head. When you start from a
  767. 26:27diagram's head, should the CVM save that
  768. 26:29head as an unpreserved diagram snapshot?
  769. 26:31Q2C, that is absolutely correct. What
  770. 26:33the start from searches and in what
  771. 26:36order? I think it's got this idea that I
  772. 26:38want a UI where we like start from an
  773. 26:40existing diagram, but I think I always
  774. 26:42want an empty diagram to start and then
  775. 26:45be able to search my existing diagrams
  776. 26:47from there. I think what I want from the
  777. 26:49Q14 is I don't necessarily want to go
  778. 26:53from a start from list of potential
  779. 26:56different diagrams. I want to start with
  780. 26:58an empty canvas and then um maybe search
  781. 27:00for existing diagrams and plunk them on.
  782. 27:03Q15 says, should we have one thumbnail
  783. 27:05diagram per thumbnail? Absolutely. Q15
  784. 27:09is correct. Q16, no user images in the
  785. 27:12thumbnail diagram. Absolutely agree with
  786. 27:14Q16. Q17 it's asking about a separate
  787. 27:17concept called a pitch with a a pitch
  788. 27:19has a YouTube thumbnail description with
  789. 27:21arot text field 17 let's not worry about
  790. 27:23pitches they're kind of soft deprecated
  791. 27:25I don't use them very much and so let's
  792. 27:27not worry about integrating with them
  793. 27:29Q18 yes let's keep existing thumbnails
  794. 27:31as they are Q19 let's give the thumbnail
  795. 27:35editor a parity with the diagram editor
  796. 27:38in terms of saving components inserting
  797. 27:40components we may even want to consider
  798. 27:43a um a shared component component. There
  799. 27:45we're seeing something a little bit
  800. 27:46awkward actually in our domain language
  801. 27:47for component. We can see that inside
  802. 27:50the diagram sections of the glossery we
  803. 27:52have this concept of a component. This
  804. 27:54is something I'm actually pretty proud
  805. 27:55of in my user interface. We have diagram
  806. 27:58components here which are reusable
  807. 28:00diagrams that I can plug into any uh
  808. 28:04diagram that I want to. But calling them
  809. 28:05just raw components in the glossery
  810. 28:07means that they actually sort of bump up
  811. 28:10against the concept of components in
  812. 28:12React. And that's what I was just
  813. 28:14talking about. We need to have a shared
  814. 28:16component that shows a list of
  815. 28:19components. It doesn't make sense. A
  816. 28:20quick note on the component part of the
  817. 28:22glossery, which is I'm finding it a
  818. 28:24little bit awkward with the word
  819. 28:27component in there because that bumps up
  820. 28:29against React components. So I think we
  821. 28:32probably need to prefix it with the word
  822. 28:34diagram. So a diagram component. Okay,
  823. 28:36we are cooking with gas now. So I'm
  824. 28:38starting to get a real sense for what
  825. 28:39we're building much much more than when
  826. 28:42we started. I'm not feeling the need to
  827. 28:43end the grilling session just yet. I'm
  828. 28:46feeling pretty happy with where we are.
  829. 28:48These are still highquality questions.
  830. 28:50Okay, it's now asking whether I want to
  831. 28:51change the way the search works. Q20,
  832. 28:54no, I disagree. I still want uh the way
  833. 28:59I I want it to work in the diagram
  834. 29:00playground the exact same as it works in
  835. 29:03the thumbnail editor. I like that
  836. 29:05components have one search and then
  837. 29:08diagrams and diagram snapshots have
  838. 29:09their own. If we make two subtly
  839. 29:11different diagram editors, that will be
  840. 29:13very, very annoying and users, i.e. me,
  841. 29:16will paper cut themselves all the time
  842. 29:17on it. Q21, what an insert brings in.
  843. 29:20Should an inserting a diagram or
  844. 29:21snapshot bring in the whole drawing?
  845. 29:23Q21, yes. Paste counts as a source, too.
  846. 29:27So, what it's saying is if we copy one
  847. 29:30diagram and then paste it in, should we
  848. 29:33track the snapshot that it came from?
  849. 29:36Q22. That sounds like a lot of
  850. 29:37complexity for a feature that I'm maybe
  851. 29:40not going to use that often. So, no, I
  852. 29:42don't think I care about it. One diagram
  853. 29:44component library, one UI. Should a
  854. 29:47diagram component save from the
  855. 29:48thumbnail show up in the playground and
  856. 29:50the reverse? Q23. Yes, absolutely. Next,
  857. 29:53deleting things that are a source today.
  858. 29:56Deleting a video cascades and hard
  859. 29:58deletes its thumbnails. If next week's
  860. 30:00thumbnail diagram copies shapes from
  861. 30:02this week's, deleting this week's would
  862. 30:03break that link, which breaks the not
  863. 30:05lossy rule. Q24. Yes, thumbnails should
  864. 30:08be archived instead of deleted. We kind
  865. 30:10of want soft delete on everything should
  866. 30:11be the rule. For those who don't know,
  867. 30:12soft delete um instead of deleting
  868. 30:15something from a database, which would
  869. 30:16be a hard delete, you instead mark it
  870. 30:19with a little marker like archive true
  871. 30:22or something and then it doesn't show up
  872. 30:24in the UI or you build your application
  873. 30:26so that it doesn't show up. Soft
  874. 30:28deletion is incredibly useful because it
  875. 30:30means that you can go back and retrieve
  876. 30:32that data if you want to. Whereas if you
  877. 30:34hard delete, then you're kind of screwed
  878. 30:37because it's literally been gone. It's
  879. 30:38gone from the system. Because this data
  880. 30:40is really valuable to me, I pretty much
  881. 30:41always go with soft delete. And I don't
  882. 30:44think I have any cleanup mechanism for
  883. 30:46like cleaning up old data. I just keep
  884. 30:47it around. But in an application with
  885. 30:49lots of users, then I would want to make
  886. 30:50sure I eventually, let's say on a 30-day
  887. 30:54cycle or something, uh deleted the stuff
  888. 30:56that people had soft deleted. Okay. It's
  889. 30:57asking about uh should parity come from
  890. 30:59extracting the playgrounds editor into
  891. 31:00one shared diagram editor component.
  892. 31:02Q25. Yes, absolutely. Let's have a
  893. 31:04single source of truth for this. Q26,
  894. 31:06it's saying your step of searching for a
  895. 31:08diagram or snapshot or dropping it in
  896. 31:10doesn't exist yet. This feels to me like
  897. 31:13it's actually untrue. It's actually not
  898. 31:15noticed something about the code, which
  899. 31:17is a little annoying. Q26, I don't think
  900. 31:19that's true. We already have a like find
  901. 31:23diagram thing, right? So, we would just
  902. 31:26reuse that, wouldn't we? Q27, navigation
  903. 31:29results in the thumbnail editor. Q27.
  904. 31:32Yes, I agree. Looks great. Q28 soft
  905. 31:34delete everywhere is a separate piece of
  906. 31:35work. It's now taking my um opinion and
  907. 31:39kind of running with it. But I'm pretty
  908. 31:41sure we already have soft elite
  909. 31:42everywhere. Q28. Yeah, let's not
  910. 31:44overcope this. I'm pretty sure we
  911. 31:46already have soft elite most places that
  912. 31:48I want it. This is an important part of
  913. 31:50grilling, too, is like when you're
  914. 31:51talking about your system, you will
  915. 31:53often find little ways to improve it
  916. 31:55that might lead to issues that you
  917. 31:57create on your backlog that you
  918. 31:59eventually maybe grill about or maybe
  919. 32:01just like slam through. And so grilling
  920. 32:03is not only about the feature you're on,
  921. 32:04but it's also about staying in touch
  922. 32:07with the codebase. It's a a ritual, a
  923. 32:09ceremony for thinking about the code.
  924. 32:11This is why I spend so long on it. Q26.
  925. 32:13Yes, let's add a new action to the
  926. 32:15existing search. That sounds great.
  927. 32:16Okay, it's now saying this is a good
  928. 32:19one. So, should past thumbnail diagrams
  929. 32:21show up in the same search? So, that's
  930. 32:23actually pretty neat idea cuz we
  931. 32:25probably do want the ability to search
  932. 32:28through old thumbnails that we've
  933. 32:30created since they might be useful in
  934. 32:32diagrams and just in the same way that
  935. 32:34diagrams are useful for thumbnails. This
  936. 32:36is again exactly the kind of thing that
  937. 32:38Grilling is really, really good at
  938. 32:40pulling together. Q29. Yes, that is a
  939. 32:43really smart idea. You should be able to
  940. 32:45search for thumbnails from or thumbnail
  941. 32:47diagrams from the diagram playground.
  942. 32:50And you should be able to search for
  943. 32:51diagrams and diagram snapshots from the
  944. 32:53thumbnail editor. So that is an
  945. 32:55important thing that we need to think
  946. 32:57about in the data model that we weren't
  947. 32:59really valuing before, but I think our
  948. 33:01our current model gets us there because
  949. 33:03it thumbnail diagrams are probably going
  950. 33:05to be stored in a separate um database
  951. 33:08table or they might just be an entry on
  952. 33:10the existing thumbnail. So, yeah,
  953. 33:14interesting one. Okay, while we've been
  954. 33:16talking, the prototype has been built.
  955. 33:18So, let's check it out. Okay, here we
  956. 33:20go. It's pretty surreal. Uh, it's quite
  957. 33:23surreal editing a thumbnail for my own
  958. 33:25face. This is very cool. This is pretty
  959. 33:28um similar to what I was imagining.
  960. 33:30Here, we can move my face like left and
  961. 33:33right here. It's a little bit fast
  962. 33:35there, but I mean, it is a it is a good
  963. 33:37one. And then in the top left, you can
  964. 33:39actually see a preview of the compos
  965. 33:41composited photo there. That's nice. And
  966. 33:44this is only variant A, right? We've got
  967. 33:45a couple more variants. So, we now have
  968. 33:47face inside the canvas. Whoa. This is
  969. 33:49again pretty trippy. We This is actually
  970. 33:52worse than I thought it was going to be.
  971. 33:54It's a bit too large. I really hate this
  972. 33:56like bar over the left here with the
  973. 33:59view. This face thing again is just way
  974. 34:01too Woo. Okay. B is really not as good
  975. 34:04as I thought it was going to be. And
  976. 34:06then what's this? It's a split view.
  977. 34:08Okay, the split view is garbage because
  978. 34:09I have to like look over on the left
  979. 34:11here and then see it update on the
  980. 34:14right. You can see I'm moving the blue
  981. 34:16box around and then I have to like
  982. 34:18manually line it up with my finger and I
  983. 34:20can't see my finger. This is bad. So, I
  984. 34:22guess a is the one that we're kind of
  985. 34:24going for here. Oh, look at this
  986. 34:26feature. Look, it has a ghost face while
  987. 34:28pointer is in the frame. Ghost used as a
  988. 34:31verb there. So, look, I can like when
  989. 34:33the pointer is in the frame, my hand
  990. 34:35disappears. That's so freaky. It's
  991. 34:38annoying that it's showing get license
  992. 34:40for production there cuz I do actually
  993. 34:41have a license. So, something's going
  994. 34:42wrong there. So, I'm going to dictate
  995. 34:43out all the things that I love and hate
  996. 34:46about this. And we're going to iterate
  997. 34:48with the agent. I really love a I think
  998. 34:50you've um really nailed something there.
  999. 34:53I especially like the ghost face thing.
  1000. 34:55That's a nice feature. The moving me
  1001. 34:58left and right, so moving the face left
  1002. 35:00and right is a little too sensitive. So,
  1003. 35:02just bump that down a little bit. There
  1004. 35:04appears to be in the composited diagram
  1005. 35:06a little white line just to the left of
  1006. 35:10or sorry to the on the outside of the
  1007. 35:13main block there which is not good. I
  1008. 35:16also want the composites to display
  1009. 35:18below the uh thumbnail editor. We're
  1010. 35:22also missing a lot of the stuff that
  1011. 35:23we've grilled about such as being able
  1012. 35:25to insert components and being able to
  1013. 35:27drop in stuff. And I'm pretty sure we
  1014. 35:29don't currently have par with the other
  1015. 35:33um with the diagram playground, right?
  1016. 35:35So we probably need a version of it like
  1017. 35:36that. So let's abandon the three
  1018. 35:38variants now. Let's just go with a and
  1019. 35:40let's continue to iterate on it. It's
  1020. 35:42also got a couple of questions for me
  1021. 35:43after I've tried it. So it's saying
  1022. 35:44which surface. I think we've added that
  1023. 35:46with Q31. Yeah, I want it to live inside
  1024. 35:49the thumbnail page. And I think we
  1025. 35:52probably need to see that in the next
  1026. 35:54prototype so that we can arrange it on
  1027. 35:56the page properly. Should moving the
  1028. 35:57face and retaking be on the same undo
  1029. 35:59history as drawing? Oh yeah, Q32. That
  1030. 36:03is genius. Really, really smart.
  1031. 36:05Definitely. That's really cool cuz I
  1032. 36:07don't have an undo history in my current
  1033. 36:08thumbnail editor. So, I'm kind of
  1034. 36:10screwed there. But we kind of get that
  1035. 36:11for free because TL Draw, which is the
  1036. 36:14tool that I'm using, bakes it into its
  1037. 36:15data model. Very, very, very smart.
  1038. 36:17Okay. So, it's now gone and sent the
  1039. 36:19prototype agent back to it saying,
  1040. 36:21"Okay, drop B and C. Put A inside the
  1041. 36:24real thumbnail page blah blah blah blah
  1042. 36:25blah." In other words, it's confirming
  1043. 36:26with me all the things that I gave it as
  1044. 36:28feedback and it's now implementing all
  1045. 36:30of those. This prototyping phase is so
  1046. 36:31so important because we really get to
  1047. 36:34stamp how we think the product is going
  1048. 36:36to look before we then like actually
  1049. 36:39schedule an agent to build it. In other
  1050. 36:41words, this time human in the loop with
  1051. 36:43the agent is so essential because we're
  1052. 36:46really going to like reduce the decision
  1053. 36:48space for the agent. We're going to say
  1054. 36:49no, it has to look exactly like this. We
  1055. 36:52know exactly the data model. All the
  1056. 36:54agent then has to do once we run it AFK
  1057. 36:56is plug those two things together. I
  1058. 36:58find it pretty hard to like not get
  1059. 37:01excited when I see a prototype, when I
  1060. 37:03see things starting to come to life. You
  1061. 37:04know, we've done this grilling which
  1062. 37:06feels kind of a little bit ownorous
  1063. 37:08sometimes, a little bit annoying, but
  1064. 37:09when you actually see the thing coming
  1065. 37:11together, you see how it's going to feel
  1066. 37:12to use. And I'm really doing this. This
  1067. 37:15is personal software for me. You know,
  1068. 37:16it's just something to make my life more
  1069. 37:19delightful. And seeing that actually
  1070. 37:21coming together is so exciting. Okay, we
  1071. 37:23are back and we have a new version here
  1072. 37:26inside the thumbnail editor. So, we've
  1073. 37:28got the YouTube previews down the
  1074. 37:30bottom. That's nice. The face is in
  1075. 37:33frame here. I love that I can resize
  1076. 37:35this actually. That's something I've
  1077. 37:36never had before. Let's switch me around
  1078. 37:38a little bit. That is really nice and
  1079. 37:40smooth. Yeah, this really, really rocks.
  1080. 37:44Now have access to a command pallet as
  1081. 37:46well, so I can insert components. Let's
  1082. 37:48take a look at the list item here. Yes,
  1083. 37:51that's looking excellent. I should be
  1084. 37:53able to search for other diagrams. So, I
  1085. 37:55can insert a diagram. So, let's just go
  1086. 37:58for wavefinder here. And then, would you
  1087. 38:01look at that? We've got all of that
  1088. 38:03working too. So, let's take a look at
  1089. 38:04the composites. We can see ah still
  1090. 38:06looks like there's that little white bit
  1091. 38:08just there. Let's move me slightly this
  1092. 38:11way. Move this so it covers the whole
  1093. 38:13screen. Yeah, that does. That's really
  1094. 38:15cool. Oh, I love it. I can still see the
  1095. 38:17little white bar on the right of the
  1096. 38:19export, but overall this is looking a
  1097. 38:21lot better. It's also asked me some
  1098. 38:23questions here. Q34, I agree. Q35, I
  1099. 38:28agree. Who owns the face? It's an
  1100. 38:30excellent AI sentence. Very good. Q36, I
  1101. 38:34agree. Q37, I agree. Q38, I agree. So,
  1102. 38:38at this point, um, the agent is pretty
  1103. 38:40much aligned with us. We now have just
  1104. 38:44sort of one problem to solve in the
  1105. 38:46prototype and I can feel we're nearly at
  1106. 38:48the end of the grilling session. Like
  1107. 38:49once I just start going yes yes yes, we
  1108. 38:52are aligned, right? The agent is making
  1109. 38:54decisions as if it were me and it's
  1110. 38:56making decisions understanding what I
  1111. 38:59care about. So this little white bar
  1112. 39:01thing is actually showing something
  1113. 39:03pretty nice here. This is essentially a
  1114. 39:05bug in the prototype and this is a bug
  1115. 39:08that could have gone into production if
  1116. 39:09we hadn't spotted it, but we have
  1117. 39:11spotted it. So what it's trying to do
  1118. 39:13here is it's trying to verify its own
  1119. 39:15findings. It's trying to construct a
  1120. 39:17harness around the problem. In other
  1121. 39:19words, a reproduction, and then it's
  1122. 39:22going to try to fix it, whatever the
  1123. 39:24issue is. In other words, it's going to
  1124. 39:25reproduce the bar in its own browser
  1125. 39:27first, then read pixel colors along the
  1126. 39:29right edge of the export and of each
  1127. 39:30preview. That should tell us where the
  1128. 39:32white comes from. This generation of
  1129. 39:33agents appear to be really, really good
  1130. 39:36at this. In other words, verifying their
  1131. 39:38own work really solidly. There might be
  1132. 39:40stuff in my home repo like steering
  1133. 39:42files that tell it to do this, but I'm
  1134. 39:44not quite sure. I think it is just doing
  1135. 39:46this off its own back. We can see too
  1136. 39:48that it's opened up the existing sub
  1137. 39:51agent. So, this one that's currently on
  1138. 39:53260k tokens here. So, this is already
  1139. 39:56punching pretty deep into its dum zone.
  1140. 39:58I would probably have preferred it to
  1141. 40:00kick off a new sub agent with just
  1142. 40:02specifically this problem. I think that
  1143. 40:04probably would have been better, but I
  1144. 40:07mean, uh, let's just see how it does and
  1145. 40:09see if it manages to find the solution.
  1146. 40:10If it doesn't manage to find the
  1147. 40:11solution, then I will punch it again
  1148. 40:13with a new, um, a new sub agent with a
  1149. 40:16clean context. Everyone's always asking
  1150. 40:18me, by the way, oh, do you still stand
  1151. 40:19by the smart zone dumb zone thing? You
  1152. 40:22know, this is my contention, and other
  1153. 40:24people have had this contention as
  1154. 40:26before. It's not original to me. Dex
  1155. 40:27Horthy from human layer and now factory
  1156. 40:29came up with it, which is that if when
  1157. 40:32your agent gets to around 150k tokens,
  1158. 40:36it starts acting a little bit stupider
  1159. 40:38and it starts getting slowly dumber and
  1160. 40:40dumber. And if you think of what smart
  1161. 40:42zone versus dumb zone actually means
  1162. 40:44like what we're talking about there is
  1163. 40:46that the risk of hallucination slowly
  1164. 40:49raises the more tokens you add to the
  1165. 40:51context window. That's because if you
  1166. 40:52imagine each one of these boxes in an is
  1167. 40:54an individual token, then the model
  1168. 40:57needs to keep track of all of the
  1169. 40:58relationships between every single
  1170. 41:00token. And it's not the fact that the
  1171. 41:02number of tokens increases. It's the
  1172. 41:04number of relationships that the model
  1173. 41:06needs to keep track of just expand
  1174. 41:08quadratically and you end up with this
  1175. 41:10enormous amount of memory needed and
  1176. 41:14amount of work needed to hear the signal
  1177. 41:16in the noise. However, making the models
  1178. 41:18better at this is essentially an
  1179. 41:20engineering problem, right? some kind of
  1180. 41:22model design problem that I'm sure
  1181. 41:24people are trying to figure out. And the
  1182. 41:26question everyone always asks me is
  1183. 41:27like, what number uh does the dumb zone
  1184. 41:30begin at? When should I clear the
  1185. 41:31context? And my answer is becoming,
  1186. 41:33okay, in previous generations of models,
  1187. 41:35sure. Okay, you pretty much had to clear
  1188. 41:37the context at 120K, sometimes even like
  1189. 41:4080k tokens for Sonet 3.5 or something,
  1190. 41:43you know, the number of token
  1191. 41:44relationships would just go nuts and you
  1192. 41:46would end up with loads and loads of
  1193. 41:49factuality errors. But now it's more
  1194. 41:51like it's a kind of cost and
  1195. 41:53optimization thing really. You know that
  1196. 41:56your agent will be smarter when there
  1197. 41:59are fewer tokens here. So it's not
  1198. 42:00necessarily about the risk of
  1199. 42:03hallucinations. It's more like
  1200. 42:05optimizing your agent to produce the
  1201. 42:07best work. So for me, it's not so much
  1202. 42:09that the agent produces hallucinations
  1203. 42:11in the dumb zone. It's more that it just
  1204. 42:13produces worse work and I end up with
  1205. 42:15better results when I do my work in the
  1206. 42:17smart zone. Plus operating at like 750k
  1207. 42:19tokens in your context window is very
  1208. 42:22very expensive because even like when
  1209. 42:24your cash runs out all of those previous
  1210. 42:27tokens are going to be run through again
  1211. 42:29and that's going to be build again.
  1212. 42:30Okay, the next version of the prototype
  1213. 42:31is ready and while it still has this
  1214. 42:35little white thing in it, it actually
  1215. 42:38says that it's not an issue. The little
  1216. 42:39bar actually comes from the browser at
  1217. 42:41Windows 125% scaling. Chrome shrinking
  1218. 42:45120 wide image into the previews. Left
  1219. 42:47the last pixel column only partly
  1220. 42:49painted. There's some other stuff here
  1221. 42:51like some hazards. I agree with Q39.
  1222. 42:54Q40. Yes, drawing edit should autos save
  1223. 42:56the thumbnail. And it's now asking
  1224. 42:58whether I want to write it up. So, I'm
  1225. 43:00going to be careful here. I'm going to
  1226. 43:02go back to the start of this little um
  1227. 43:04text input. And I'm going to say to
  1228. 43:06spec, let's write it up. I have to go
  1229. 43:09back to the start because to spec is a
  1230. 43:12userinvoked skill. So I can invoke it
  1231. 43:16essentially and uh I have to have it at
  1232. 43:18the start when I'm using clawed code. I
  1233. 43:20can't just sort of scatter it throughout
  1234. 43:22the text input which is a bit annoying
  1235. 43:23and something I've been wanting them to
  1236. 43:26change for a long time. To spec what
  1237. 43:27it's going to do is it's going to create
  1238. 43:29a specification. It's going to ask me a
  1239. 43:31couple of questions about uh where we're
  1240. 43:34going to test and then um from there
  1241. 43:37we'll be able to implement it. I already
  1242. 43:38have a few quite robust reducers and
  1243. 43:41reducers are essentially places in the
  1244. 43:43front end where you can contain lots of
  1245. 43:45state together and I find them really
  1246. 43:48really good with agents because they can
  1247. 43:49just kind of extend existing ones. All
  1248. 43:51of those three scenes look good. I'm
  1249. 43:52then going to um go for the to ticket
  1250. 43:55skill as well. I'd like you to add some
  1251. 43:58tickets too. Let's just do these in one
  1252. 44:00batch. Now, what spec and to tickets do
  1253. 44:02is they essentially give the agent
  1254. 44:04everything it needs to run a long
  1255. 44:06running session. The spec acts like a
  1256. 44:08destination document. So, we're
  1257. 44:10essentially running work over multiple
  1258. 44:12sessions. And the spec is going to say,
  1259. 44:14okay, once we get to the end of these
  1260. 44:16sessions, this is where we want to end
  1261. 44:17up. And then the tickets are essentially
  1262. 44:19about scoping each individual session.
  1263. 44:22So each sub agent we're going to run is
  1264. 44:25going to be handed a single ticket and
  1265. 44:26that's going to be the scope of its
  1266. 44:28piece of work. So here it's given us the
  1267. 44:29proposed breakdown of all of the
  1268. 44:31sessions. So the first one is like a
  1269. 44:33prefactor like um extracting the shared
  1270. 44:36diagram editor into a um shared
  1271. 44:38component. Really useful. That's going
  1272. 44:40to be very handy later. Each ticket says
  1273. 44:43what it's blocked by. And I'm not going
  1274. 44:45to like review this too much. Nine seems
  1275. 44:48fine to me. I'm just going to say yep,
  1276. 44:50looks good to me. Now, the plan is that
  1277. 44:52once this is done, I'm then going to
  1278. 44:54compact. So, I'm going to take that
  1279. 44:56entire session, the grilling session
  1280. 44:57we've just done, compact it down, and
  1281. 45:00then we're going to run a skill called
  1282. 45:01implement spec, which is going to
  1283. 45:03essentially AFK just uh create all of
  1284. 45:07this stuff and merge it into a single
  1285. 45:08PR. And you think of how easy that job
  1286. 45:11is going to be for the agent, right? We
  1287. 45:12are going to have an updated glossery by
  1288. 45:14that point. We are going to have all an
  1289. 45:17entire spec of the thing it needs to
  1290. 45:18build all of the tickets and the how
  1291. 45:20it's going to get there and we've also
  1292. 45:22got a prototype which it essentially
  1293. 45:24just needs to copy in terms of the UI.
  1294. 45:26So, we've already got a bunch of code
  1295. 45:27written, too. By the time I get to the
  1296. 45:29spec and the tickets, by the time I get
  1297. 45:30to implementation, like I'm really, you
  1298. 45:33know, trying to give the agent no
  1299. 45:35decision space in which to operate. No
  1300. 45:37nuance that it can go, "Oh, yeah, I'll
  1301. 45:39just sort of fiddle around with this."
  1302. 45:41Because the more nuance you give to an
  1303. 45:42agent, the worse it's going to perform
  1304. 45:44because as soon as you ask an agent to
  1305. 45:46make a decision, it might make a bad
  1306. 45:48decision. So, the more decisions you
  1307. 45:50give it, the more decision space it has,
  1308. 45:53the more likely it is to choose a bad
  1309. 45:54one. So I tend to like giving the agent
  1310. 45:56very very few options when it comes to
  1311. 45:58implementation when it comes to the
  1312. 46:00decisions of the features that I want.
  1313. 46:01Okay, we now have our spec and we can
  1314. 46:04see that this is in GitHub. So this is a
  1315. 46:07GitHub issue. I have a bunch of user
  1316. 46:09stories here around 47 of them. A bunch
  1317. 46:12of implementation decisions, a very very
  1318. 46:15rich document including stuff that's out
  1319. 46:16of scope. We can see it's also
  1320. 46:18referencing the prototype on the local
  1321. 46:20branch. Fantastic. And it then has a
  1322. 46:22bunch of subiss issues each of which are
  1323. 46:24the individual tickets. So all of these
  1324. 46:26are individual tasks and crucially these
  1325. 46:28can be parallelized. And so what I'm
  1326. 46:30going to do is I'm going to compact the
  1327. 46:32current conversation. In other words,
  1328. 46:33just sort of take all of the context
  1329. 46:35that we've had so far and squash it
  1330. 46:37down. And then I'm going to say
  1331. 46:39implement spec just on the essentially
  1332. 46:41just on the spec that it's just created.
  1333. 46:44I've started using compact a lot more.
  1334. 46:45Actually compact has become a lot more
  1335. 46:47reliable, a lot nicer to use. I still
  1336. 46:50don't think it's a perfect thing. Like
  1337. 46:53autoco compact is still a little bit
  1338. 46:55dodgy. Um because the timing sometimes
  1339. 46:58just absolutely wumps you. Something
  1340. 46:59important will be taken out of context.
  1341. 47:01But compact, especially in this
  1342. 47:03situation when we've taken the
  1343. 47:04conversation and just turned it into a
  1344. 47:06document is so so safe. It's almost
  1345. 47:09free. It's just a kind of like a minute
  1346. 47:11it spends just compacting this
  1347. 47:13conversation and bam, we're back down to
  1348. 47:15essentially our starting context. Now,
  1349. 47:16implement spec is a skill that I've had
  1350. 47:19for a little while now. I think it came
  1351. 47:20out in v 1.3. And this is really it just
  1352. 47:23takes the spec and the tickets and it
  1353. 47:26implements them inside our local setup.
  1354. 47:28And when it finishes, which for a piece
  1355. 47:30of work like this might be like an hour
  1356. 47:32or 45 minutes maybe, then we're going to
  1357. 47:34end up with a nice PR that essentially
  1358. 47:37implements the entire thing that is
  1359. 47:39ready to merge. So, this is the point
  1360. 47:40here where I would step away, where I
  1361. 47:42would trust it to run AFK. It's going to
  1362. 47:44run as much in parallel as it possibly
  1363. 47:46can. You can see it's starting the three
  1364. 47:48tickets that can begin now. And it's
  1365. 47:50able to pass them very rich context
  1366. 47:52about what needs to happen because it's
  1367. 47:54just a compacted version of our original
  1368. 47:56conversation. So, it knows exactly the
  1369. 47:58parts of the codebase that matter, knows
  1370. 48:00the spec, knows the um prototype, too.
  1371. 48:04So, I'm going to walk away and when I
  1372. 48:05come back, I should have working code.
  1373. 48:07Okay, it's been a little while. We now
  1374. 48:09have a massive PR and we have a code
  1375. 48:12review that has run and found some
  1376. 48:14violations. We can see the pull request
  1377. 48:16inside the PRs here for edit a thumbnail
  1378. 48:19diagram in place beside the face. We can
  1379. 48:21see we've added 21,000 lines of code.
  1380. 48:24Go. I'm looking forward to reviewing
  1381. 48:26that. And the way the implement spec
  1382. 48:27works is it goes away and reviews
  1383. 48:30everything with an agent and then it
  1384. 48:32checks against some existing coding
  1385. 48:34standards. You should take a look at the
  1386. 48:35code review skill if you want to see
  1387. 48:37more of that. But basically, it found
  1388. 48:39one hard violation and a couple of cases
  1389. 48:41of scope creep and then it's fixing them
  1390. 48:44up. Right now, I'm going to try
  1391. 48:45something I don't usually try here,
  1392. 48:48which is I think I do want to review
  1393. 48:50this with you guys watching. And so, I
  1394. 48:53think I want to try a different way of
  1395. 48:56breaking down this massive PR into
  1396. 48:57smaller chunks. I don't have a skill for
  1397. 48:59this yet. This isn't something that I do
  1398. 49:00regularly, but for large chunks of work
  1399. 49:02like this that I do want to review, this
  1400. 49:05makes sense. Once the review is
  1401. 49:06finished, I think I want you to break it
  1402. 49:08into smaller chunks using stacked diffs.
  1403. 49:12These smaller chunks ideally should be
  1404. 49:14reviewable on their own. And what that
  1405. 49:17means is that I want them to be each a
  1406. 49:20bunch of two-way doors and finish in a
  1407. 49:22final one-way door. You can look for the
  1408. 49:24definitions of two-way door and one-way
  1409. 49:26door inside the PR skill. One way doors
  1410. 49:28and two-way doors are it's a really nice
  1411. 49:30analogy. It basically means that when
  1412. 49:32you have a PR that is a two-way door, it
  1413. 49:33means you can merge it and then revert
  1414. 49:36it any time. So you can walk through the
  1415. 49:38door and then walk back through the
  1416. 49:39door. Whereas a one-way door is a PR
  1417. 49:41that is merged and then is very
  1418. 49:43difficult to unmerge. In other words, it
  1419. 49:46might mess with some data. It might um
  1420. 49:48speak to an external service. It might
  1421. 49:50expose like a security window that's
  1422. 49:52hard to walk back. And agents are pretty
  1423. 49:54good at breaking up massive PRs into
  1424. 49:56small PRs. So it's given me this chunk
  1425. 49:58of different PRs here. I can tell though
  1426. 50:00that some of them are smaller than
  1427. 50:01others. It feels like this last one is
  1428. 50:03kind of the big one. Can you give me an
  1429. 50:05estimate of the lines of code that would
  1430. 50:07be in each PR since that's really what I
  1431. 50:09want to do here. I'm also wondering
  1432. 50:10whether we could utilize feature flags
  1433. 50:12to make the thumbnail diagram available
  1434. 50:15and then pull it back later. In this
  1435. 50:17situation, I'm kind of cosplaying as if
  1436. 50:19this is a production system. You know,
  1437. 50:20I'm kind of pretending as if, okay, I
  1438. 50:23want to break this huge PR down into
  1439. 50:25reviewable chunks that we can ship to
  1440. 50:27production and not have like this big
  1441. 50:29risk when we merge a single PR. Usually,
  1442. 50:32when I merge to this repo, because it's
  1443. 50:33only personal software, I don't have to
  1444. 50:35care that much and I can just go, all
  1445. 50:37right, bam, let's stick it in. But
  1446. 50:39because if I'm imagining I've got, you
  1447. 50:41know, thousands, hundreds of thousands
  1448. 50:43of users, like we really want to make
  1449. 50:45sure production is as close to the
  1450. 50:47change as possible. And then once we
  1451. 50:50finally flick it on, it should be
  1452. 50:51relatively seamless. In other words,
  1453. 50:53we're taking this huge chunk of or
  1454. 50:55taking this a single door and turning it
  1455. 50:57into lots of doors which we can revert
  1456. 50:59as we need to. And then finally, we're
  1457. 51:01going to flick it on at the end. Okay.
  1458. 51:03So now it's taken that last PR, the
  1459. 51:06massive one, and turned it into four
  1460. 51:07smaller ones. The upshot of this is it
  1461. 51:09would basically run both implementations
  1462. 51:11side by side for a bit, and then when we
  1463. 51:14were ready, we would merge the final PR,
  1464. 51:15and then that would turn the flag on.
  1465. 51:17Okay, let's go with this version. Sounds
  1466. 51:19good to me, but only do this once the
  1467. 51:20review has finally fixed its things.
  1468. 51:22Make sure you delegate this work to sub
  1469. 51:24agents since you're a little bit
  1470. 51:25constrained in terms of context window.
  1471. 51:27So, this is exciting. This is kind of an
  1472. 51:29experiment. Hopefully, these are going
  1473. 51:30to be easy to merge individually. Okay,
  1474. 51:32so we have our first PR of seven here.
  1475. 51:35The first one is literally just the
  1476. 51:36glossery terms diagram component and
  1477. 51:39ADR060. If we take a little more
  1478. 51:42detailed look at this, this all looks
  1479. 51:44fine. And so as this is this can just go
  1480. 51:47in. I'm happy to enable an automerge
  1481. 51:49here. I can press confirm automerge. And
  1482. 51:51that will now go in as soon as the CI
  1483. 51:53checks pass. And there we go. It has
  1484. 51:55gone in and merged. Beautiful. Next we
  1485. 51:58have a new PR coming in saying extract
  1486. 52:00the shared diagram editor from the
  1487. 52:01editor or diagram playground. So just a
  1488. 52:04few files changed here. Now while we're
  1489. 52:05here, we might as well talk a little bit
  1490. 52:06about human review and like what the
  1491. 52:08purpose of this exercise is. For me in
  1492. 52:10this situation, I'm going to do this
  1493. 52:11human review because I know that you're
  1494. 52:14watching and you're interested in how I
  1495. 52:16do human review and so I'm going to
  1496. 52:18review every single line. But do am I
  1497. 52:21saying that you need to um do every
  1498. 52:23single line yourself or review every
  1499. 52:25single line? No, I don't think you do.
  1500. 52:27When I'm reviewing code like this,
  1501. 52:28obviously I want to make sure that it
  1502. 52:30works. And so if this was going out to a
  1503. 52:33production system, then I would clone it
  1504. 52:34locally or I would get some kind of
  1505. 52:36playground where I could walk through it
  1506. 52:38and check that it works. What I'm
  1507. 52:40actually going to do is I'm going to
  1508. 52:41merge everything and then because it's
  1509. 52:42I'm I'm the only user, I'm just then
  1510. 52:44going to review it at the end. But the
  1511. 52:46point of checking the code here is that
  1512. 52:48I'm not just interested in like what the
  1513. 52:50code does. I'm also interested in the
  1514. 52:53system that produced this code. In other
  1515. 52:55words, if I notice that something is
  1516. 52:57going wrong inside this code or there's
  1517. 52:59a pattern that I don't like, then what
  1518. 53:02I'd like to do is create a like a lint
  1519. 53:06rule or something to make sure it
  1520. 53:08doesn't happen again. And by don't like,
  1521. 53:10I mean that I want to have a hypothesis
  1522. 53:12around that thing that I want to change
  1523. 53:15that it is affecting my uh environment
  1524. 53:18my agent operates in in a negative way.
  1525. 53:20In other words, I can see in this file
  1526. 53:22here, like the command pallet, I can see
  1527. 53:24there's a huge comment right next to it
  1528. 53:26saying the command K command pallet
  1529. 53:28mounted inside the active diagrams or
  1530. 53:30rather the shared diagram editor over
  1531. 53:32its canvas. I'm kind of not happy about
  1532. 53:35these large comments and they are kind
  1533. 53:37of everywhere in my codebase because
  1534. 53:39it's more surface that the agent needs
  1535. 53:41to update. And so I'm going to add a
  1536. 53:43comment here. I'm going to say I'm not
  1537. 53:45really a big fan of these comments
  1538. 53:46because they leave a huge surface for
  1539. 53:48the agent to update and they don't
  1540. 53:50really add a lot that isn't already
  1541. 53:51explained by the code. I think I'd like
  1542. 53:53you to add something to coding standards
  1543. 53:54to make these comments much less
  1544. 53:57prevalent. And I think we should have a
  1545. 53:59conversation about maybe banning
  1546. 54:00comments in certain parts of the
  1547. 54:01codebase. So I'm going to comment here
  1548. 54:03and then I'm going to show you what I'll
  1549. 54:05do with those comments later on. For
  1550. 54:07instance, here I really don't like the
  1551. 54:09as keyword in Typescript. It can be used
  1552. 54:11to cheat the TypeScript which I hate. So
  1553. 54:13I want to say a helper function is
  1554. 54:14needed here on to ban all uses of as not
  1555. 54:17inside shared utilities. This is just
  1556. 54:19something I know because I am a you know
  1557. 54:21I suppose an ex typescript expert. Uh I
  1558. 54:24made a course on typescript basically.
  1559. 54:26Again these docs here just sort of feel
  1560. 54:28pretty gnarly. I don't like this. You
  1561. 54:31can see how much the diff as we're going
  1562. 54:32through is literally just code comments.
  1563. 54:35It really is brutal. But overall this
  1564. 54:36review didn't take too long and I've
  1565. 54:38noticed a couple of things that we might
  1566. 54:40need to improve. So, next we go to the
  1567. 54:42next PR in the list, which is just a
  1568. 54:44relatively small change. Again, we've
  1569. 54:46got some reducer testers, which I
  1570. 54:48really, really like. If you've never
  1571. 54:49used a reducer before, uh it's just so
  1572. 54:53nice, so easy to work with. Again, more
  1573. 54:55comments that I just want to kill. Man,
  1574. 54:56this repo is full of comments. There's
  1575. 54:58also another TypeScript thing that I
  1576. 55:00really don't like, which is using this
  1577. 55:01pick and this and here. Prefer using
  1578. 55:04interface extends to using
  1579. 55:06intersections. See if you can find a
  1580. 55:07lint rule for this that we can ratchet
  1581. 55:08that phrasing, by the way. like lint
  1582. 55:10rule. It's asking it to find a
  1583. 55:12deterministic rule that we're not
  1584. 55:14necessarily going to impose on day one,
  1585. 55:16but we're going to ratchet it up over
  1586. 55:17time. Again, so many comments here to
  1587. 55:20review. It's just it's getting pretty
  1588. 55:21disgusting, I have to say. Another one
  1589. 55:22here is that even in code that is not
  1590. 55:24actually touched by the PR, I'm noticing
  1591. 55:26it's calling fetch and then ignoring the
  1592. 55:28result. And I say it feels like a
  1593. 55:30reusable function is needed here. I'm
  1594. 55:31being pretty harsh in these reviews,
  1595. 55:33right? like I'm I'm trying to force it
  1596. 55:35to design APIs that remove all of the
  1597. 55:38nuance, all of the decisions from the
  1598. 55:40agent. Another one here is I can see we
  1599. 55:42have a use search params hook and we're
  1600. 55:44grabbing things using magic strings
  1601. 55:46here. It would be very very easy to just
  1602. 55:49change the name of this highlight or
  1603. 55:51this snapshot even and we would get no
  1604. 55:53type errors from it. Find a more type-
  1605. 55:55safe design for the way that we access
  1606. 55:57search parameters since this feels like
  1607. 55:59a magic strings style hole that we could
  1608. 56:02potentially fall through. Create a new
  1609. 56:04lint rule banning the use of use search
  1610. 56:06params. And then let's create a strategy
  1611. 56:08to ratchet it up. Again, I'm being super
  1612. 56:10ambitious here. I'm saying, okay,
  1613. 56:12everything that we find in here, I never
  1614. 56:14ever want to see this again. Never ever
  1615. 56:17want to loot. Like I want to lint it out
  1616. 56:19of existence. That's my plan. Next PR.
  1617. 56:21Again, we're up to 500 lines here. Got
  1618. 56:24to say that apart from the comments
  1619. 56:25here, this is a clean clean PR. We can
  1620. 56:28see it's taken a bunch of like magic
  1621. 56:31conditionals here and it's replaced them
  1622. 56:32with a single source of truth for is
  1623. 56:34diagram search. Phenomenal. Again, just
  1624. 56:36way too many comments here. Too many
  1625. 56:39comments. Okay, so I'm now into the I
  1626. 56:42think penultimate one or maybe last but
  1627. 56:45couple. Let's see. Yeah, this is still a
  1628. 56:47two-way door thing, I think, here. And
  1629. 56:50this is now we're getting up to about
  1630. 56:512,500 lines now. Now, I think you've got
  1631. 56:54the idea of what I'm reviewing for here,
  1632. 56:56which is I am trying to give my opinion,
  1633. 56:59give my feel just by looking at the
  1634. 57:01code. And I think reviews are a good
  1635. 57:03surface for this. But I'm not going to
  1636. 57:04consider any of these blocking. In fact,
  1637. 57:06out of all of these PRs, the only one
  1638. 57:08where I would consider reviewing
  1639. 57:10mandatory is this one. This is an
  1640. 57:12additive migration for the thumbnail
  1641. 57:14diagrams concept. And what I want to see
  1642. 57:16is inside schema.ts
  1643. 57:18here. This adds the thumbnail diagram
  1644. 57:21into the thumbnails here. So many
  1645. 57:25freaking comments here, guys. Comments
  1646. 57:27are also an opportunity for the agent to
  1647. 57:29do like two specific text or text that's
  1648. 57:33specific to its session. In other words,
  1649. 57:36this session is or this text is
  1650. 57:37basically just like a note for itself in
  1651. 57:40a future session, which is really
  1652. 57:42frustrating because then that is just
  1653. 57:44going to live forever, that comment, and
  1654. 57:45it's just totally useless. Overall, this
  1655. 57:47looks really solid. So, actually, I'm
  1656. 57:49happy with the one-way stuff as part of
  1657. 57:51this big PR. So, what I'm going to do is
  1658. 57:53go back to my agent session. I'm going
  1659. 57:55to compact. And then I'm going to say,
  1660. 57:57could you merge all of those PRs in
  1661. 58:00order, please? Ignore all of the review
  1662. 58:01comments for now. We're going to tackle
  1663. 58:03those in a minute. Actually, once
  1664. 58:05everything is merged, could you run the
  1665. 58:06merge in a background sub agent so that
  1666. 58:08we can continue chatting? Okay, let's
  1667. 58:10fire this off. So now that we've decided
  1668. 58:12that the merge is happening, like I I'm
  1669. 58:15going to assume that in your version of
  1670. 58:17this you would have actually cloned it
  1671. 58:18locally or actually you know check that
  1672. 58:20it was all working on the final branch.
  1673. 58:22I'm fine with checking it in a minute.
  1674. 58:24But what I'm going to do now is I'm
  1675. 58:26going to use this session to fix or make
  1676. 58:30a plan to fix all of the things I found
  1677. 58:32during review. And for that I'm going to
  1678. 58:34use the retro skill. I'm going to say,
  1679. 58:36could you take a look at all of the
  1680. 58:38agent sessions that ran as part of this?
  1681. 58:40And could you also pull in my review
  1682. 58:42comments? And the retroskale essentially
  1683. 58:44runs a retrospective on the process that
  1684. 58:46we just saw. Even though we've run
  1685. 58:48compact, it still has access to all of
  1686. 58:50the sessions that ran before because
  1687. 58:52they're just saved locally on disk. And
  1688. 58:54it's going to use the GitHub CLI to pull
  1689. 58:56in all of my comments. So, it's going to
  1690. 58:58have access to that, too. Now, I will
  1691. 59:00usually run retro after a big chunk of
  1692. 59:02work like this, or I'll also just run it
  1693. 59:04regularly, just checking up on my agent
  1694. 59:06sessions. Um, if you have some kind of
  1695. 59:09software factory setup where you can
  1696. 59:10automate this, then I would save your
  1697. 59:12agent sessions somewhere in the cloud,
  1698. 59:14and then Retro can take a look at those
  1699. 59:16and see what uh the agents struggled
  1700. 59:18with. So, it's going off and sending
  1701. 59:20agents through the 30 odd session
  1702. 59:21transcripts and your 12 review comments,
  1703. 59:23and it's going to come back with a
  1704. 59:25ranked list. So, we're essentially
  1705. 59:26throwing a bunch of tokens at this and
  1706. 59:28looking for improvements or potential
  1707. 59:30improvements to the environment our
  1708. 59:31agents are operating in. Now, we didn't
  1709. 59:33pay attention at all to the impleers
  1710. 59:36while they were running. I didn't look
  1711. 59:37at the sub agent traces. Haven't looked
  1712. 59:38at that at all. This is our opportunity
  1713. 59:40to apply um some tokens to it and
  1714. 59:44actually look at those and get some
  1715. 59:45improvements from it. Okay. And here we
  1716. 59:47go. We have the retro back. So, all 12
  1717. 59:50of my review comments have one root
  1718. 59:52cause. Nothing in the CVM's written
  1719. 59:55standards cover your points. The
  1720. 59:56existing code in the docs model do the
  1721. 59:58opposite. So existing stuff in coding
  1722. 1:00:00standards.mmd and docs frontend state
  1723. 1:00:02show the patterns you rejected and main
  1724. 1:00:05already has thousands of instances.
  1725. 1:00:07Thousands of instances fly me. Okay. So
  1726. 1:00:10I am trying to turn an oil tanker around
  1727. 1:00:12apparently. And also the prototype
  1728. 1:00:14branch was copied. Okay. So its first
  1729. 1:00:16recommendation is to turn your comments
  1730. 1:00:18into ratcheted checks. The first one is
  1731. 1:00:20as outside shared utilities. Yes,
  1732. 1:00:23lovely. Sounds good. There, that is
  1733. 1:00:262,000 instances it will find. Okay,
  1734. 1:00:28brutal intersections into interface
  1735. 1:00:30extends. Oxlint has no rule for this,
  1736. 1:00:32but a small passer. So, it's basically
  1737. 1:00:34saying create a custom lint uh rule for
  1738. 1:00:38this rule. Excellent. Next, I said we
  1739. 1:00:40should kill use effect. Lovely job. We
  1740. 1:00:43turn it off for a specific directory.
  1741. 1:00:45So, hooks. And there are currently
  1742. 1:00:47around 230 use effects in 140 files.
  1743. 1:00:51Next we have use search params and magic
  1744. 1:00:53strings. So this would point at a new
  1745. 1:00:55typed search params helper. Lovely. We
  1746. 1:00:58ban raw fetch and instead we have a
  1747. 1:01:00typed API client module. And then it's
  1748. 1:01:02saying too many comments. So here no
  1749. 1:01:05lint rule fits. Yeah, I don't know what
  1750. 1:01:07to do about comments. I mean like Lauren
  1751. 1:01:08Tan potato says they just ban comments.
  1752. 1:01:11No comments allowed. And I kind of I
  1753. 1:01:14kind of want to go that direction but I
  1754. 1:01:16wonder whether we do that in a phased
  1755. 1:01:18approach where we ban comments in
  1756. 1:01:19certain folders. This is interesting. So
  1757. 1:01:2118% of lines of comments in the new
  1758. 1:01:24features diagrams against a 12% repo
  1759. 1:01:26average. 12% of code in my repo is
  1760. 1:01:29comments and 20% of the new feature is
  1761. 1:01:32comments. It's crazy. Okay, I really
  1762. 1:01:34like number one. All of those I think
  1763. 1:01:36should be raised as issues on the repo.
  1764. 1:01:38Can we also start triing the no comments
  1765. 1:01:42rule in certain folders? And actually, I
  1766. 1:01:44want you to give me your opinion on what
  1767. 1:01:47we would lose inside features diagrams
  1768. 1:01:50if we just deleted all the comments
  1769. 1:01:51immediately. Is there any information
  1770. 1:01:53contained within the comments that
  1771. 1:01:55cannot be divined from the code itself?
  1772. 1:01:57Okay. Number two, it says fix the docs
  1773. 1:01:59that teach the rejected patterns.
  1774. 1:02:00Obviously, yes. Number three, prototype
  1775. 1:02:02code was copied and not reimplemented.
  1776. 1:02:05Yeah, this is interesting. So, it's
  1777. 1:02:07actually recommending a change to my
  1778. 1:02:09skills about the prototype skill and the
  1779. 1:02:11implement implement spec implement
  1780. 1:02:13brief. For number three, could you raise
  1781. 1:02:15an issue on the map PCO skills repo? By
  1782. 1:02:17the way, this is often how my skills get
  1783. 1:02:19improved is I raise issues about my own
  1784. 1:02:21skills based on what I find in these
  1785. 1:02:23retros and they get subtly improved. The
  1786. 1:02:25reviewer can't cover a big diff with one
  1787. 1:02:28agent. Yep. So, this is the code review
  1788. 1:02:30skill kind of not being able to perform
  1789. 1:02:33at its limits. Can you raise an issue
  1790. 1:02:35for number four, please? And I think
  1791. 1:02:37there might be an existing issue. So
  1792. 1:02:38maybe you can just add this as a kind of
  1793. 1:02:41extra, you know, reason for me to look
  1794. 1:02:43at it. There's no argument to say that
  1795. 1:02:44you should do instead of like doing
  1796. 1:02:47automated review on the spec, you should
  1797. 1:02:49do it on every single ticket, but I
  1798. 1:02:51found that that is just, you know,
  1799. 1:02:53extraordinarily slow. It's absolutely
  1800. 1:02:55hugely slow approach. But it looks like
  1801. 1:02:57the code review skill is kind of like,
  1802. 1:02:59you know, taken under a 400word limit,
  1803. 1:03:01which doesn't make sense to me. So I
  1804. 1:03:03think maybe the code review skill might
  1805. 1:03:05need to change, might need to um divide
  1806. 1:03:08more chunks of it into sub agents so
  1807. 1:03:10that it can um more easily do it. Okay,
  1808. 1:03:13it's asking some stuff about the
  1809. 1:03:14implement spec skill with number six. I
  1810. 1:03:17really like that idea. It's basically
  1811. 1:03:19saying that in implement spec it um
  1812. 1:03:23creates a merger agent too early. It
  1813. 1:03:25should just try to like merge it in
  1814. 1:03:27directly. For number seven, could you
  1815. 1:03:28raise an issue about this and see if we
  1816. 1:03:30can hill climb towards a like a faster
  1817. 1:03:33suite? In number eight, there's a skill
  1818. 1:03:35I have called verify CVM, which
  1819. 1:03:37basically kicks in every time I want to
  1820. 1:03:40verify some code or an implementation on
  1821. 1:03:42the CVM. It runs it inside a browser.
  1822. 1:03:45Um, does all sorts of stuff. Okay, could
  1823. 1:03:47you add eight as an issue? And all of
  1824. 1:03:49number nine, all the smaller items
  1825. 1:03:51should be added as separate issues. That
  1826. 1:03:53all looks great. So honestly, this retro
  1827. 1:03:55was extremely extremely good. We've I
  1828. 1:03:58think we might get like 20 issues out of
  1829. 1:04:01this. Things that can go like that we
  1830. 1:04:04probably don't have to grill on. Things
  1831. 1:04:05that we can just pass off to agents and
  1832. 1:04:07get PRs back from that will over time
  1833. 1:04:10slowly improve the repo. While this has
  1834. 1:04:11been running, our agent has been
  1835. 1:04:13merging. It looks like it's just sort of
  1836. 1:04:14waiting for all of the CI checks to
  1837. 1:04:16complete and then it just merges each
  1838. 1:04:18one in turn. All right, while that's
  1839. 1:04:19going on, we have our comment audit has
  1840. 1:04:23come back. So, it's saying of the about
  1841. 1:04:252,000 lines of comments, about 940 can
  1842. 1:04:28go now. And about a thousand explain a
  1843. 1:04:31reason you can't see in the code. It
  1844. 1:04:33says seven comments are already stale.
  1845. 1:04:35There you go. And there are no eslint
  1846. 1:04:37disable or ts expect error directives to
  1847. 1:04:40worry about. Okay, let me lay into the
  1848. 1:04:42agent for a second. The thing that
  1849. 1:04:44concerns me about comments is that they
  1850. 1:04:45allow workarounds to proliferate and the
  1851. 1:04:50comments kind of act as a fig leaf that
  1852. 1:04:53the agent is able to put there and say,
  1853. 1:04:55"Look, this is fine because we've got an
  1854. 1:04:57explanatory comment."
  1855. 1:04:59The, you know, idea behind lots of folks
  1856. 1:05:01like Lauren Tan is that the comments are
  1857. 1:05:05actually a safety valve that you are
  1858. 1:05:07using too often that you're basically
  1859. 1:05:09saying, "Okay, um, because I've got this
  1860. 1:05:12comment, I'm allowed to do the
  1861. 1:05:13workaround." Whereas, if you were banned
  1862. 1:05:15from doing the comment, you might
  1863. 1:05:16actually not take the workound. All this
  1864. 1:05:19to say, what I would like you to do is
  1865. 1:05:20to tell me which of these could be moved
  1866. 1:05:22into ADRs, which of these could actually
  1867. 1:05:25just become nonworkarounds. In other
  1868. 1:05:27words, use something you don't need a
  1869. 1:05:29comment for. And which of them could
  1870. 1:05:32just disappear because they're not
  1871. 1:05:34actually needed or you can actually
  1872. 1:05:36infer it from the code. I want you to be
  1873. 1:05:38more aggressive here. Let's see what it
  1874. 1:05:39says here. I don't know. Let's see.
  1875. 1:05:40Okay, guess what? It agrees with me. The
  1876. 1:05:42comment next to a workaround often marks
  1877. 1:05:43a place where the code should have been
  1878. 1:05:45designed differently, not explained.
  1879. 1:05:46Haha. It's guessing that the TL draw and
  1880. 1:05:49command K quirks mostly become adapter
  1881. 1:05:51rappers. The race constraints mostly
  1882. 1:05:54become test names. Yeah, that's a
  1883. 1:05:56legitimate place to have some kind of
  1884. 1:05:57like free text is just like the name of
  1885. 1:06:00a test. And while that has happened, our
  1886. 1:06:02PR, the mega PR stack has now been
  1887. 1:06:05merged to production. So, I've got this
  1888. 1:06:07loaded up. We should be able to capture
  1889. 1:06:09my face here. And there we go. We have
  1890. 1:06:11my face. And we can see that I can add
  1891. 1:06:14text to the thumbnail like this. So, I
  1892. 1:06:16can add a big box here that my hand is
  1893. 1:06:18kind of pointing to. I can go all the
  1894. 1:06:21way down and I can see that is how it's
  1895. 1:06:23going to look. There's like a button
  1896. 1:06:24here saying a dark panel behind the
  1897. 1:06:27drawing. So, I can take that out or put
  1898. 1:06:29that in if I want to. And I mean, it's
  1899. 1:06:31pretty good, guys. Like, that is not
  1900. 1:06:33bad. If I exit out to here, then we can
  1901. 1:06:35see my thumbnail is ready to go. I can
  1902. 1:06:37select it when I then upload it to
  1903. 1:06:39YouTube. I can click back through and
  1904. 1:06:41edit it. And back we are should be back
  1905. 1:06:44to this screen here. Nice. So, you can
  1906. 1:06:46see exactly how much fidelity it has to
  1907. 1:06:48the prototype that we created. It seems
  1908. 1:06:50to be working. Okay. I probably do have
  1909. 1:06:52some like follow-up feedback here, but
  1910. 1:06:54overall, yeah, I can insert icons. Let's
  1911. 1:06:57just add this one for instance. Bam.
  1912. 1:06:59Like that. Put that on my finger.
  1913. 1:07:01Lovely. And there we go. Just like that,
  1914. 1:07:03I've built a feature, something that I
  1915. 1:07:05will enjoy using for the rest of the
  1916. 1:07:08time that I use this application. And
  1917. 1:07:09inside our agents view here, we can see
  1918. 1:07:12that yes, okay, when I tell it to be
  1919. 1:07:14more aggressive, it says 22 can simply
  1920. 1:07:16be deleted. There are 18 workarounds
  1921. 1:07:19that need changing. Look at that. I
  1922. 1:07:21mean, that is wild. I feel like there
  1923. 1:07:23might be a skill here, you know, like
  1924. 1:07:25just looking at all of your comments
  1925. 1:07:26that are in the repo and just using
  1926. 1:07:28those as smells and just say, "Okay,
  1927. 1:07:30sniff sniff sniff. Take a look at that
  1928. 1:07:32comment. See what workound it's
  1929. 1:07:34describing. Can we just get rid of the
  1930. 1:07:36workaround? Get rid of the comment." And
  1931. 1:07:38it does say there are three ADRs. Yeah,
  1932. 1:07:40there you go. So, CVM custom shapes are
  1933. 1:07:42a persistence contract. Facecam
  1934. 1:07:44centering is tuned by I diagram PGs
  1935. 1:07:46render in the running app. All three of
  1936. 1:07:48which I agree make good ADRs. And it's
  1937. 1:07:50giving me a suggested PR order here. So,
  1938. 1:07:53let's prompt it one more time just to
  1939. 1:07:54tie this up. I want you to take all of
  1940. 1:07:57these findings and put them in one more
  1941. 1:07:59issue that will be the kind of umbrella
  1942. 1:08:01issue for this idea. And that, as they
  1943. 1:08:04say, is that now what I would do next is
  1944. 1:08:06I would go into the thing that I just
  1945. 1:08:08created. I would um try to find anything
  1946. 1:08:11that I could improve and QA it. And then
  1947. 1:08:14those would go into issues which I would
  1948. 1:08:16then just slam through with an agent,
  1949. 1:08:18probably not even grill them. I would
  1950. 1:08:19then go back through the issues, get my
  1951. 1:08:21agent to take a look at all of them and
  1952. 1:08:23turn those into codebase improvements
  1953. 1:08:25and all of those I would expect the diff
  1954. 1:08:27to be really really small and so I could
  1955. 1:08:29just one-shot them. But that is it
  1956. 1:08:30folks. Hopefully you enjoyed this kind
  1957. 1:08:32of deeper dive of me actually walking
  1958. 1:08:34through how I do things. And hopefully
  1959. 1:08:36you get a good sense for like where I am
  1960. 1:08:39most valuable in this process. I'm most
  1961. 1:08:41valuable early on in the alignment phase
  1962. 1:08:43where we talk through everything. We get
  1963. 1:08:45alignment. I understand exactly what's
  1964. 1:08:47being built. I create a prototype. We
  1965. 1:08:49figure that all out together. And then I
  1966. 1:08:50am really useful at the end where my
  1967. 1:08:53technical expertise can come in and I
  1968. 1:08:54can impose my coding standards and I can
  1969. 1:08:57say no that looks bad. Let's do this
  1970. 1:08:59instead. In other words, grilling and
  1971. 1:09:01retro are really the two main points at
  1972. 1:09:03which I interact with the system. And
  1973. 1:09:05then of course you know QA and you know
  1974. 1:09:08putting in my taste, making sure that
  1975. 1:09:10everything feels right and is working
  1976. 1:09:11how I want it to. But thank you so much
  1977. 1:09:13for watching. Hopefully you enjoyed this
  1978. 1:09:15uh wow nearly hour and 10 minute video
  1979. 1:09:17so far and that you learned something
  1980. 1:09:19from it. I love doing these deep dives.
  1981. 1:09:20I don't get enough time to do them. So
  1982. 1:09:23you know if you like this then do share
  1983. 1:09:24it with your friends and that will
  1984. 1:09:26incentivize me to make more of them.
  1985. 1:09:27Thanks so much for watching. See you
  1986. 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.