AI Engineer Europe 2026
Full Walkthrough: Workflow for AI Coding — Matt Pocock
Read the talk
A Practical AI Coding Workflow: Human Alignment, Autonomous Implementation, and Relentless Feedback
Matt Pocock explains how to turn an ambiguous product idea into well-scoped, parallelizable coding work while keeping humans responsible for architectural direction, product judgment, and quality.
From a talk by Matt Pocock
At a glance
Ideas worth remembering
Keep coding tasks inside a practical smart zone by limiting context growth, resetting sessions predictably, and delegating expensive exploration to isolated subagents. 3:00
Use Grill Me or an equivalent human-in-the-loop interview to resolve product ambiguity before summarizing the agreed destination in a PRD. 15:00
Organize execution as dependency-aware vertical slices that deliver integrated feedback early and expose opportunities for safe parallel work. 40:42
Automate implementation with test-driven development, fresh-context automated review, and explicit feedback loops, while keeping humans responsible for QA and code review. 59:23
Prefer deep modules with small interfaces and meaningful behavioral tests so agents can work effectively without developers surrendering their architectural understanding. 1:15:46
Treat plans as useful working artifacts rather than permanent truth: stale PRDs can create doc rot, and QA should continually feed new issues back into the implementation backlog. 1:23:16
Design the workflow around context limits and predictable resets
Matt Pocock’s central argument is that effective AI-assisted development depends less on abandoning established engineering practices than on applying them deliberately to a new collaborator. Task decomposition, shared understanding, architectural boundaries, testing, and review remain essential because coding agents have operational constraints that make undisciplined work especially fragile. 0:48
Pocock describes a practical distinction between an agent’s smart zone and dumb zone: as a conversation accumulates tokens, attention relationships become more demanding and the quality of coding decisions can deteriorate. He treats roughly 100,000 tokens as a personal working threshold, while acknowledging that capabilities may improve; a larger advertised context window can still be useful for retrieval without necessarily making long-context coding reliable. The actionable lesson is to keep individual tasks small and monitor context consumption rather than assuming that available context is equally effective throughout. 3:00
A second constraint is that a fresh agent session begins again from its persistent instructions. Pocock therefore favors a small system prompt and clean resets over repeatedly compacting conversation history, because a reset produces a predictable starting state while compaction carries forward an imperfect summary. Typical work then proceeds through codebase exploration, implementation, and testing; isolated subagents can perform expensive exploration in separate context windows and return only the useful findings to the main agent. 7:21
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Start with human alignment, then preserve the destination
The example begins with an ambiguous request to add gamification to Cadence, a course platform where students complete a few lessons and then drop off. Pocock rejects a simple specifications-to-code handoff because it encourages developers to ignore the implementation and assume that repeatedly editing a specification will eventually produce good software. His alternative begins with the Grill Me skill, which explores the repository and interviews the human about unresolved design decisions until both sides share a coherent understanding of the proposed work. 11:35
The interview exposes decisions that a short client brief does not settle: which actions earn points, whether video-watching events are too noisy or easy to game, whether existing lesson completions should receive points retroactively, how progression levels work, and where the interface belongs. Recommendations accompanying each question help the human make decisions quickly, but the human remains accountable for resolving ambiguity. Pocock notes that these sessions can grow to dozens of questions, and that meeting transcripts or other domain-expert input can supply additional material for interrogating assumptions. 16:17
This alignment stage is explicitly human-in-the-loop, not suitable for an unattended implementation loop. When a developer cannot answer a product or technical question, Pocock recommends involving the appropriate domain expert, another developer, or a broader team; research and prototypes may also send the group back to reconsider the original idea. In this framing, the workflow is iterative even though its teaching example moves from idea to implementation in a visible sequence. 24:48
Once the design concept is established, a product requirements document, or PRD, captures the destination: the problem, proposed solution, user stories, implementation decisions, testing decisions, and out-of-scope items. Pocock prefers to trust the agent’s summarization after a thorough alignment session instead of extensively reviewing or repeatedly optimizing the document, but he remains attentive to the proposed modules because the implementation must fit the existing codebase. This is a personal workflow judgment, not a claim that every team should skip document review. 28:17
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Turn requirements into vertical slices and dependency-aware work
A destination document is not yet an execution plan. Rather than asking for a rigid sequence of numbered phases, Pocock converts the PRD into a Kanban board of independently actionable issues with explicit blocking relationships. Some work can begin immediately, other work depends on earlier issues, and tasks suitable for unattended execution are identified as AFK. This structure makes dependencies visible without forcing all work through one sequential agent. 39:23
The crucial review criterion is whether issues represent vertical slices, also called tracer bullets, rather than isolated horizontal layers. Agents tend to implement an entire database layer, then an API layer, and only afterward a front end; that ordering delays discovery of integration problems until late in the process. A better initial issue crosses the necessary layers and produces a small, testable behavior that supplies immediate feedback about the complete flow. 41:57
In the gamification example, Pocock rejects an initial proposal that creates the schema and gamification service without any visible user-facing result. He steers the agent toward awarding points for lesson completion and showing those points on the dashboard, which requires enough schema, service, and interface work to prove the feature operates across boundaries. Later issues can build on that working slice, while independent branches of the dependency graph become candidates for parallel execution. 40:42
Complete the shared blocker first.
A shared prerequisite unlocks parallel issues before dependent work proceeds.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Automate implementation, not ownership of quality
After humans have shaped the idea, PRD, and issue graph, implementation can move into the night shift: an agent repeatedly selects eligible AFK issues and works through the backlog. Pocock demonstrates a simple script that supplies local issue files, recent commits, and an implementation prompt to a coding agent; a more complete unattended version runs inside a Docker sandbox. He recommends first running the single-iteration version repeatedly so developers can observe agent behavior and tune the prompt before trusting a longer loop. 51:58
The implementation prompt defines task-selection priorities and instructs the agent to explore the repository, use test-driven development, and run feedback loops. With red-green-refactor, the agent first writes a failing test, then implements the behavior needed to make it pass. Pocock argues that this sequencing makes it harder for agents to produce misleading tests after the implementation is already complete, while leaving behind useful coverage for subsequent changes. 55:44
Automated review belongs in the implementation pipeline, but it should happen in a fresh context rather than at the exhausted end of the implementation session. Resetting allows the reviewer to operate inside its own smart zone, and Pocock describes using Sonnet for implementation and Opus for review. For coding standards, his distinction is pull versus push: implementers can pull relevant guidance from available skills when needed, while reviewers should receive the applicable standards directly so they can compare the generated code against explicit expectations. 1:04:58
Automation does not remove the need for human QA and code review. During the demonstration, tests and type checks pass, but trying the feature exposes a missing database table, illustrating that automated feedback and actual user-facing behavior are different forms of evidence. Pocock also acknowledges an unresolved tradeoff: agents can generate more code than developers comfortably review, and he does not present a complete solution for reconciling rapid implementation with small, self-contained pull requests. 59:23
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Shape the architecture agents inherit and scale only what remains coherent
Pocock argues that bad codebases make bad agents because tangled dependencies and weak feedback loops make it difficult for an agent to understand, modify, and verify a system. Numerous small, interconnected shallow modules create unclear testing boundaries and encourage brittle tests around individual functions. By contrast, deep modules present a small, understandable interface while containing substantial internal functionality, making it easier to test meaningful behavior at the module boundary. 36:35
This architectural discipline also helps developers retain ownership as implementation accelerates. Humans should understand and design module interfaces, maintain a mental map of which services and routes are changing, and delegate internal implementation where robust behavioral tests provide confidence. Pocock describes using an architecture-improvement skill to identify clusters that could become deeper, more testable modules, including a video-editing flow that became substantially easier for agents to modify once it could be tested across its full path. 1:18:17
Parallel execution becomes practical when architectural boundaries, issue dependencies, and verification are already clear. Pocock describes Sandcastle, a TypeScript library that creates worktrees, isolates agent runs in Docker containers, and coordinates a planner, per-issue implementers, reviewers, and a merger agent. The planner selects compatible issues, implementations occur on separate branches, reviewers inspect resulting commits, and the merger resolves integration problems involving tests and types. 1:29:10
The workflow remains cyclical rather than fully autonomous: human QA can create new issues while implementation continues, team feedback can reshape earlier assumptions, and front-end work may require disposable prototypes because visual judgment still benefits from human inspection. Pocock also warns against doc rot: completed PRDs left in a repository can mislead future agents after requirements and code change, so he prefers closing or removing stale planning artifacts rather than treating them as permanent authority. The consistent principle is to automate bounded execution while preserving human responsibility for alignment, architecture, taste, and final quality. 1:00:53
Contains issues and blocking relationships.
Dependency-aware planning dispatches isolated implementations before review and integration.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Read the complete timestamped transcript
- 0:00
[upbeat music] Yeah, we good?
- 0:16
Three, two, one.
- 0:17
Okay, folks. We're at capacity. Let's kick off. I don't want you waiting here for twenty-five more minutes before we... Some arbitrary deadline. So welcome. My name's Matt. Uh, I'm a teacher, and I suppose now I teach AI.
- 0:33
Um, we have a link up here, if you've not already been to this, which is-- has the exercises for the, um, stuff we're gonna do today. This is gonna be around two hours, so we might just sort of kick off two hours from now.
- 0:46
Is that all right, Mike?
- 0:47
Sure.
- 0:47
Yeah, perfect. Um, and the theory behind this talk, or at least the thesis under which I've been operating for the last kind of six months or so, is that
- 0:59
we all think that AI is a new paradigm, right? AI is obviously changing a lot of things. You [REDACTED:gender] are obviously interested in this, and that's why you've come to this talk.
- 1:07
And I feel that when we talk about AI being a new paradigm, we forget that actually software engineering fundamentals, the stuff that's really crucial to working with humans, also works super well with AI.
- 1:26
And this is what my keynote is on tomorrow, really. I'm gonna sort of be fleshing that out a lot more. And in this workshop, I'm hopefully gonna be able to direct your attention to those things and, uh, hopefully show you that I'm right, but we'll see.
- 1:41
Um, can I get a quick heads-up first? How many of you [REDACTED:gender], um, are coding-- have ever coded with AI? Raise your hand if you've ever coded with AI.
- 1:49
Perfect. Okay. Uh, keep your hand raised. Uh, let's all, uh, share those armpits with the world. Um,
- 1:58
how many of you code every day with AI?
- 2:02
Cool. Okay. Uh, ra-- keep your hand raised if you've ever been frustrated with AI. [laughing]
- 2:07
Okay. Very good. You can put your hands down. Thank you for that show of obedience. I really appreciate that. And we are also being live-streamed to the Gielgud Room as well.
- 2:16
I've not, uh... Did we send someone up to the Gielgud Room to just check they're okay? Don't know. But I see you. Uh, and there is a way that you can participate, which is we have the, um, a Q&A.
- 2:28
We're gonna be doing kind of... I have a sort of hatred of Q&As 'cause they're not very democratic. The- mostly the sort of, um, most talkative people get to, um, get to participate and share.
- 2:39
And so we're gonna be going through this, um, Q&A here. So why do we have to wait till three forty-five? The room is packed, the doors are closed. Hundred percent agree.
- 2:47
And so if you want to, uh, ask a question, we're gonna be-- I would like you to pile into this async, and then we can vote on each other questions and hopefully get the best question surfaced so the-- for the entire room to enjoy.
- 3:00
So I wanna talk about first the kind of weird constraints that LLMs have. And those weird constraints are sort of what we have to base a lot of our work around.
- 3:12
Now, there's a guy called Dex Horthy who runs a company called HumanLayer, and he came up with this idea, which is that
- 3:21
when you're working with LLMs, they have a smart zone and a dumb zone. When you're first kind of like working with an LLM, and it's like you just started a new conversation, you start from nothing, that's when the LLM is gonna do its best work.
- 3:37
Because in that situation, the attention relationships are the least strained. Every time you add a token to an LLM, it's kind of like you're adding a team to a football league.
- 3:46
You think of the number of matches that get added every time you add a team to a football league. You just go, pff, pff, pff, pff. It scales quadratically.
- 3:54
And that's because you have attention relationships going from essentially each token to the other that are positional and the sort of meaning of the individual token. And so this means that by around sort of forty percent or around, I would say around a hundred K is kind of my new marker for this, 'cause it doesn't matter whether
- 4:10
you're using one million, uh, context window or two hundred K, it's always gonna be about this.
- 4:17
It starts to just get dumber. So as you continually keep adding stuff to the same context window, it just gets dumber and dumber until it's making kind of stupid decisions.
- 4:27
Raise your hand if that feels familiar to you. Yeah? Cool. So this means that we kind of want to size our tasks in a way that sticks within the smart zone, right?
- 4:39
We don't want the AI to bite off more than it can chew. And this goes back to old advice like Martin Fowler in Refactoring, uh, like, uh, the Pragmatic Programmer talks about this.
- 4:49
Don't bite off more than you can chew. Keep your tasks small so that you, as a developer, a human developer, don't freak out and don't start acting and going into the dumb zone.
- 5:01
But how do you tackle big tasks? How do you take a large task like, I don't know, cloning a company or something, or just doing something crazy, and how do you break it into small tasks so they all fit into the smart zone?
- 5:16
One way, of course, you could do is, I mean, kind of what the AI companies maybe want you to do, or the natural way of doing it is just keep going and going and going.
- 5:23
You end up in the dumb zone, charging you tons of tokens per request. You then compact back down. We'll talk about compacting properly in a minute. And you keep going, keep going, keep going.
- 5:32
Compact back down, keep going, keep going, keep going.
- 5:35
And I think that's doesn't really work very well because the more sediment... We'll talk about that in a minute. So the theory here is then, and this is what I was doing for a while, is I would use these kind of, um, multi-phase plans where I would say, "Okay, we have this sort of number four thing here,
- 5:53
this large, large task. Let's break it down into small sections so that we can then kind of chunk it up and do each little bit of work in the smart zone."
- 6:02
Raise your hand if you've ever used a multi-phase plan before. Yeah, really common practice, right? This is kind of how we've been doing it. Certainly, this is how I was doing it up until December last year, really.
- 6:14
And any developer worth their salt will look at this and go, "This is a loop." Right? This is a loop. We've just got phase one, phase two, phase three, phase four.
- 6:24
Why don't we just have phase N? Right?
- 6:29
Phase N, where we essentially just say, okay, we have, let's say, a plan operating in the background, and then we just loop over the top of it, and we go through until it's complete.
- 6:38
And this is where, um, raise your hand if you've heard of Ralph Wiggum as a software practice. Okay, cool. Raise your hand if you've not heard of Ralph Wiggum as a software practice, actually.
- 6:47
That's more like it. Okay. So there's this idea called Ralph Wiggum, uh, which is kind of, um, sort of based on this, which is essentially all you need to do is sort of specify the end of the journey, where you just say, okay, we create a PRD, a product requirements document, to say, "Woo, okay, let's describe where
- 7:06
we're going," and then we just say to the AI, "Just make a small change. Make a small change that gets us closer and closer to there." And Ralph works okay, but I prefer a little bit more structure.
- 7:17
So that's kind of where we got to in terms of thinking about the smart zone, and that's kind of where I want you to first start thinking about here.
- 7:27
Another weird constraint of LLMs is LLMs are kind of like the guy from Memento, right? They just continually forget. They could just keep resetting back to the base state.
- 7:36
Let me pull up this diagram. I sort of, I, I, I really should use slides, but I just prefer just, like, randomly scrolling around a, a infinite, uh, tldraw canvas.
- 7:46
Thank you, Steve. Um, so let's say another concept I want you to have is that every session with an LLM kind of goes through the same stages. You have, first of all, the system prompt here.
- 7:58
This gray box here is essentially the stuff that's always in your context. You want this to be as small as possible because if you have a ton of stuff in here, if you have 250k tokens, like I have seen people put in there, then that, you're just gonna go straight into the dumb zone without even being able
- 8:15
to do anything. So you want this to be tiny. You then go into a kind of exploratory phase. This blue is sort of where the coding agent is going out and exploring the code base.
- 8:26
Then you go into implementation, and then you go into testing, and so making sure that it works, running your feedback loops and things like this. Raise your hand if that feels familiar based on what you've done.
- 8:37
Yeah. Sort of the, like, the, the main cornerstones of any session. And when you clear the context, you go right back to the system prompt. Boof, you go right back there.
- 8:48
So you delete everything that's come before. And raise your hand if you've heard of compacting as well. Yeah. Okay. There are some people who've not heard of compacting, so let's just quickly show what that means.
- 9:00
For instance, I've just been having a little chat with my LLM.
- 9:06
Uh, I wanna make sure we sort of, you know, just cover the basics so we're all sort of on the same wavelength here. I've just been having a chat with my LLM.
- 9:14
I've been talking about a thing that I want to build. How's the font size? Shall I bump it up? Folks in the back? Bump, bump. Bump, bump, bump. Ugh.
- 9:24
I'm using Claude Code for this session, but you don't need to use Claude Code. Uh, in fact, it's often nice not to use Claw Code. Um, so I've been having a chat with the LLM, just sort of planning out what I'm gonna do next.
- 9:35
It's asking me a bunch of questions, and I can, I highly recommend you do this. There's this tiny little status line here that tells me how many tokens I'm using, the exact number of tokens I'm using.
- 9:47
Um, I have a article on my website, AI Hero, if you wanna copy this. This is... Oh, wow, that is, that shakes, doesn't it? Um, this is essential information on every coding session because you need to know exactly how many tokens you're using so that you know how close you are to the dumb zone.
- 10:05
Absolutely essential. And so let's watch it. So I've got two options. I can either clear,
- 10:11
wrong, and go back to nothing, or I can compact.
- 10:15
And when I compact, then it's going to squeeze all of that conversation, which admittedly isn't very much, into a much smaller space.
- 10:24
And this, in diagram terms, kind of looks like this, where you take all of the information from the session, and you essentially create a history out of it, a written record of what happened.
- 10:36
And devs love compacting for some reason, but I hate it.
- 10:40
I much prefer my AI to behave like, uh, the guy from Memento because this state is always the same. Always the same every time you do it. You clear it, and you go back to the beginning.
- 10:51
And so if you're able to do that, and you're able to optimize for that, then you're in a great spot.
- 10:56
So that's kind of the two things I want you to think about with LLMs, the two constraints that we're working with. They have a smart zone and a dumb zone, and they're like the guy from Memento.
- 11:07
So let's take a look at the first exercise. And I'm, while I'm doing this, the way I want this to work is I'm gonna sort of show you how, um, I'm gonna be sort of walking through it up here, and I want you folks to be kind of, like, tapping away and doing things as well.
- 11:21
So that was just a little lecture bit. Let's now actually get and do some coding. For anyone who arrived late or anyone in the [REDACTED:location], uh, go to this link,
- 11:32
this link up here, to see the exercises and clone the repo. You absolutely do not have to. You can just watch me do it if you fancy it. But let's go there myself, and let's see what exercises await us.
- 11:45
So essentially, I've built a, um, this is from my course. This is a, uh, a course management platform, essentially a kind of CMS for instructors, for students, and this is what we're gonna be building a feature in.
- 11:59
So I'm gonna take you from essentially the idea for the feature all the way up to building a PRD for the feature all the way up to implementing the feature.
- 12:08
And hopefully, you can take inspiration from this process and use it in your own work. So-
- 12:15
Uh, let's kick off. So we're gonna start by using a, a skill which is very close to my heart. It's the Grill Me skill. And this Grill Me skill is wonderfully small, wonderfully tiny, and it helps prevent one of, I think, the main issues when you're working with an AI, which is misalignment.
- 12:37
The, uh, the sort of silent idea that I'm talking against here, that I'm arguing against, is the specs to code movement. Has anyone heard of the specs to code movement?
- 12:47
Raise your hand. It's not really a movement, I suppose, it's just sort of people saying specs to code. Um, what it is, is people say, "Okay, you can write a program," or, you want to build an app, the best way to build that app is to take some specifications, so to write some sort of like document, and
- 13:05
then turn that document into code. So just turn it into code. How do you do that? You pass it to AI. If there's something wrong with the resulting code, you don't look at the code, you look back at the specs.
- 13:17
You change the specs, and you sort of just keep going like this. This is kind of like vibe coding by another name, where you're essentially ignoring the code. You don't need to worry about the code.
- 13:27
You just sort of keep editing the specs, and eventually you just keep going. And I tried this. I really tried it. And it sucks. It doesn't work. Because you need to keep a handle on the code.
- 13:37
You need to understand what's in it. You need to shape it because the code is your battleground. And so
- 13:44
this again is where we're going. Let's, let's get some exercises. So what I'd like you to do is go to this page, the, the Grill Me skill, and inside the repo here, we have a Slack message
- 13:57
from our pal. Uh, where is it? It's in the root of the repo, and it's under...
- 14:04
Where is it? Client Brief.md. It's a Slack message from Sarah Chen. For some reason, the Claude always chooses Sarah Chen as the name. I don't know why. Um, it's saying that in Cadence, our, um, course platform, our retention numbers are not great.
- 14:21
Students sign up, do a few lessons, then they drop off. I'd love to add some gamification to the platform. And so when you're presented with an idea like this, you need to find some way of turning it into reality.
- 14:31
Let's say Sarah Chen is your client. You're on a tight budget. You need to get this done fast. How do you go and do it? Um,
- 14:38
raise your hand if you would, um, enter plan mode when you're doing this. Anyone a big user of plan mode? Yep. Um, let's actually shout out quickly. Any other ideas about what you would do with this?
- 14:49
Or any-- Raise your hand if you... What, what would be your first port of call? Yeah.
- 14:54
Ask more.
- 14:55
Sorry?
- 14:56
Ask more. Try to clarify what is the purpose and where are current standing.
- 15:00
Yes, exactly. Let's imagine that Sarah Chen's gone on holiday. You have no idea, right? Uh, she's just posted this thing. You need to action it before you go.
- 15:07
Well, my first port of call is I go for this particular skill. I'm gonna clear my context.
- 15:15
I'm going to, uh, get rid of you. You don't need to be there. And I'm gonna say, um, I'm gonna invoke a skill, which is the Grill Me skill.
- 15:27
Let's quickly check. Raise your hands if you don't know what this is.
- 15:32
Cool. Oh, sorry, sorry. Let me be more specific. Raise your hands if you don't know what I'm doing here when I, uh, do a forward slash and then type something.
- 15:42
Anyone-- Everyone kind of understand what that is? I'm invoking a skill. I'm invoking the Grill Me skill. And what I'm gonna do is I'm gonna say, Grill Me, and I'm gonna pass in the client brief.
- 15:54
So now, the LLM really has only a couple of things here. It just has the skill, and it has the description of what I wanna do.
- 16:04
And this is virtually how I start every piece of work with AI.
- 16:09
And while it's exploring the code base, I'm just gonna show you what the Grill Me skill does. So this is inside the repo, so you can check it out.
- 16:17
It's extremely short. Interview me relentlessly about every aspect of this plan until we reach a shared understanding. Walk down each branch of the design tree, resolving dependencies one by one.
- 16:28
For each question, provide your recommended answer. Ask the questions one at a time, uh, blah, blah, blah. What this does, and what I noticed when I was working with AI, especially in plan mode, actually, is it would really eagerly try to produce a plan for me.
- 16:45
It would say, "Okay, I think I've got enough. I'm just gonna poof, plan. Plan." And what I found was that
- 16:53
I was really trying to find the words for this, for, for what I wanted instead of that. And Frederick P. Brooks in The Design of Design, he has a great quote, uh, talking about the design concept.
- 17:05
When you're working on something new with someone, when you're, uh, all trying to build something together,
- 17:12
then there's this shared idea that's shared between all participants, and that is the design concept. And that's what I realized I needed with Claude. I needed,
- 17:22
I needed to reach a shared understanding. I didn't need an asset. I didn't need a plan. I needed to be on the same wavelength as the AI, as my agent.
- 17:31
And this is an extremely effective way of doing it. So hopefully... There we go. Nice. It has done its exploration, first of all. It's invoked a sub-agent, which spent, uh, ninety-seven, ninety-three point seven k tokens on Opus.
- 17:47
Um, and it's asked me the first question. Cool. We can see that even though the sub-agent burned a l- a ton of tokens, I haven't actually, um, uh, increased my token usage that much.
- 17:59
Raise your hand if you don't know what sub-agents are. It's an important question. Everyone kind of clear what sub-agents are? Okay, I'll give a brief definition, which is that this, this sub-agents thing here, this Explore sub-agent, it has essentially gone and called another LLM, which has an isolated context window
- 18:18
And then that LLM has reported a summary back. So a sub-agent is kind of like a delegation. You're delegating a task to a sub-agent. It goes eagerly, does all the thing, explores a ton of stuff, and then just drip feeds the important stuff back up to the orchestrator agent, to the parent agent.
- 18:34
So, okay. So hopefully you [REDACTED:gender] have seen the same thing. It's done an explore. And we now have our first question. Points economy, what actions earn points and how much?
- 18:44
Ooh, okay. At this point you can ask it, by the way, questions to, um, deepen your understanding of the repo. I obviously know this repo really well because I wrote it, but you might not, um, know what's going on.
- 18:55
So let's say, "My recommendation, keep it simple, two point sources to start." What's so nice about this is that not only does it give us a question that kind of aligns us here, we get a recommendation too.
- 19:08
And often what I'll find is the AI's recommendations are really good, and so I'll just say, "Skip video-watch events, they're noisy and gameable." I agree.
- 19:16
Sarah's asked, "Will it keep the lessons in the bread and butter?"
- 19:20
Yeah. Looks good, pal. Now, what I usually do is I usually dictate to the AI. I'm usually actually chatting to the AI instead of, uh, typing here. But, uh, this is a relatively new laptop, and I couldn't get my dictation software working on it, um, because Windows is crap.
- 19:38
Um, so, should points be retroactive? There are existing lesson progress records with completed at timestamps. This is a really nasty question, right? Should we actually go back and backfill all of the lesson progress events?
- 19:53
This is a kind of question that you need to be aligned on if you're gonna fulfill the feature properly. This is not something I considered, and Sarah Chen certainly didn't consider.
- 20:01
Do I want it to be retroactive? Hmm. Let's actually do a vote inside here. Should we go back and backfill all the records? Raise your hand if you think we should backfill all the records.
- 20:13
Raise your hand if you think we shouldn't backfill all the records. There are a lot of, uh, fence sitters in the room. I'm gonna say,
- 20:22
you know, this is the kind of discussion you're sort of having with the AI. You're getting further aligned. Yes, I'm just gonna go with this recommendation because I'm lazy.
- 20:31
Notice too how I'm able to keep in the loop here with AI. I'm not-- You know, it's, it's pinging me these questions pretty quickly.
- 20:39
I'm not having to go off and check Twitter or something. Levels. What's the progression curve? Yeah, that looks about right. For instance, yes, okay. So hopefully you should be able to go and, um, kind of work through this with the AI and essentially try to reach an alignment.
- 20:56
And this Grill Me skill, this can last a long time. This can-- I've had it ask me forty questions. I've had it ask me eighty questions. Had some people it asks a hundred questions to.
- 21:06
Literally, you're sat there for an hour chatting to the AI. And what you end up with is essentially this conversation history that works really nicely and works really nicely as an asset of the design concept that you're creating.
- 21:19
This can also function like this. You can, uh, have a meeting with someone who's a, maybe a domain expert. Maybe I have a meeting with Sarah. I feed that meeting transcript into, uh, I don't know, Gemini meetings or whatever you [REDACTED:gender] are using.
- 21:33
You take that, you feed it into a grilling session, and you grill through the assumptions that you didn't have. So this ends up being a really nice kind of, um, a really nice way of just taking inputs from the world and then just turning and validating them.
- 21:49
So, okay. Let's see. I really wanna get to the end of this, but I also don't wanna just like be sat here talking to the AI in front of you for, uh, a thousand days.
- 21:58
So I'm just gonna say yes. Let's see what happens. So I tell you what, um, while you [REDACTED:gender] sort of have a little fiddle with this locally, let's start a little Q&A session now.
- 22:12
And let's see. How is this gonna work?
- 22:15
Can we keep the door closed? I'll turn up the microphone. It's quite noisy. Uh, let's see. Mike, can we, uh, door close? Oh, it has been closed. Mark as answered.
- 22:25
Beautiful. So what I'd like you to do... Is there any air con? Yeah, there is some air con, I think. There is some air con. You [REDACTED:gender] aren't being lit here.
- 22:35
I'm being, I'm being fried alive here. Uh, so what I'd like to do is go onto the Slido, which you can join here. Have a-- If, if you're not taking the exercise, go onto the Slido, have a little fiddle, and vote on some good questions.
- 22:49
I'm just going to chat to the AI for a second, uh, s- until we reach a stopping point. So do streaks earn points?
- 22:56
Um, streaks are standalone. Let's see what else it comes up with.
- 23:13
Where does gamification UI live? Let's have it in the dashboard.
- 23:19
I'm just gonna scan these and blast through them, basically. So how are we doing with our Slido?
- 23:24
Okay. Have I tried Spec Kit, OpenSpec, or Taskmaster instead of the Grill Me skill? Do I find them more verbose or a structural alternative? This is a great question. So there are a ton of different frameworks out there that allow you to, um, sort of build up this planning process for you.
- 23:41
I personally believe you, at, at this stage, when there's no clear winner, when there's no kind of like one true way, and when things are changing all the time, you need to own as much of your planning stack as you possibly can.
- 23:54
What I've noticed in a lot of my students is
- 23:59
they tend to overuse a certain stack. They get into trouble, and they, because they don't own the stack and they don't have observability over the whole thing, they just go, "Ah, this isn't working.
- 24:12
This sucks." Whereas if, um, if you have control over the whole thing, then at least you know how to fix it or potentially know how to fix it. So I'm, even though I'm sort of giving you, uh, a stack, basically, I believe in inversion of control, and you should be in control of the stack.
- 24:32
So, b-b-burr. Can I press ze-zero, please? Feedback. Sorry? Feedback. Sorry, that was a lot of sort of mumbling. Can I- Feedback. You have, uh, four options on the bottom of the Claude, and they want you to hit dismiss. [laughing]
- 24:48
Thank you. I'm so sorry. [laughing] [laughing] What, you didn't want to give Claude good feedback? Why, what's wrong with you? [laughing] [laughing]
- 24:57
Ah, okay. Cool. [laughing] Uh, many of the questions asked by the Grill Me skill are not necessarily appropriate for a developer, rather a PO. In larger teams, who should use it?
- 25:05
Yeah. Um, raise your hand if, um, you've ever done pair programming. Anyone ever done pair programming? Right. Now keep... Put your hands down and raise your hand again if you've ever done a pair programming session with an AI.
- 25:20
Right. How did it go? Was it good? You enjoy it? I think pair programming sessions with AI is a great idea because you've got a third person in the room who will relentlessly quiz you and ask you questions.
- 25:31
It should-- If you don't know the answer, it should be you, the domain expert, and the AI in the same room. If you're... have a question about implementation, it should be you, a fellow developer, and the AI in the same room.
- 25:41
You know, you can be sort of working through these questions in your team. And I think, actually, we're gonna look at implementation in a bit, and we're gonna see how you can make implementation so much faster and...
- 25:53
But I think the really crucial decisions, the ones you need humans for, you actually need a lot of humans, and it doesn't really matter how many humans are in there.
- 26:01
You can actually throw a bun- like a, kind of like mob programming with AI, essentially. Uh, what's my favorite meta-prompting tool? I think I kind of answered that. Uh, there's no aircon.
- 26:12
Let's just live with it. Uh, how do I use the conversation as an asset after the Grill Me session? Well, we're gonna get there.
- 26:20
Um, okay. So I really want to... I want to speed this up sort of artificially. Ralph loop. Just w-well- Ralph loop yourself. I c- This is the thing. [laughing] So someone just said, "Okay, Ralph loop this."
- 26:33
But this is crucial because I can't loop over this, right? I can't, um... I think of there as being two types of tasks in the AI age, where you have human in the loop tasks, where a human needs to sit there and do it, which is this.
- 26:50
We are the human in the loop. We're multiple humans in the loop. And there are AFK tasks. There are tasks where the human can be away from the keyboard, and it doesn't matter.
- 26:58
Implementation, as we'll see, can be turned into an AFK task. But planning, this alignment phase, has to be human in the loop. Has to be.
- 27:10
So I've got to do it, unfortunately. [laughing] Um, I don't know. Uh, give me a long list of all your recommendations. I'm running a workshop right now. [laughing]
- 27:24
So I artificially need you to pull more weight. [laughing]
- 27:32
So let's see what it does. Uh, let's answer a couple more questions while it's doing its thing.
- 27:37
What is my opinion on PMs or other non-dev roles vibe coding tasks? Hmm.
- 27:46
Um, I'm going to return to this later, I think. I'm gonna leave this unanswered.
- 27:51
A bit of mystery. I notice I'm not using the ask user questions UI for Grill Me. Why? Um, there's a specific, uh, UI that you can bring up in Claude Code, which I'll answer this just quickly.
- 28:03
Uh, ask me a question using the AskUserQuestion tool.
- 28:10
And this UI, um, is just sort of broken in Claude, and I really hate it.
- 28:17
You notice I'm using Claude, but I don't like Claude very much. Like, you, you really are free with this method to choose any, um, system you like. And this is what the UI looks like.
- 28:26
It's very pleasing when you first encounter it, but then you realize it is actually broken in a ton of different ways.
- 28:32
All right. What did it come back with? Oh, blimey. [laughing]
- 28:35
Oh, no. So while this is doing its thing, let me do some teaching in the meantime. The plan here is that we take our Grill Me skill, and we need to essentially find some way of turning it into a destination.
- 28:53
We need to go down to the, uh... We essentially need to f-- We're figuring out the shape of this. That's what we're doing. We're figuring out the shape of the tasks during the grilling session.
- 29:05
And in order to turn it into a bunch of actionable actions for the AI, we essentially need to figure out the destination. We need to know where we're going.
- 29:16
We need to know the shape of this entire thing. So I think of there as being two essential documents that we need. We need a document that documents the destination.
- 29:27
Oh, no. It's so not bright enough. There we go. Still not bright enough. There we go.
- 29:35
We need something to document the destination, and we need something to document the journey. In other words, we need something, a document that's going to figure out what this even looks like in all of its user stories and figure out a definition of done, and then we need to figure out what the split looks like.
- 29:53
So that's where we're gonna go to next. So once we've finished with the grilling session...
- 29:59
Yeah, it looks great. Fantastic. I love it. It answered, it answered twenty-two of its own questions. There you go. That's quite representative of what a grilling session looks like.
- 30:09
So at this point now, I have used twenty-five K tokens, and all of that, or loads of that stuff, is gold. I wanna keep that around. I've, I've got twenty-five K great tokens there.
- 30:24
And what I want to do is kind of summarize it in some kind of destination document. So this is, um, the next exercise, where we're going to,
- 30:35
uh, we're going to write a product requirements document. And the product requirements document, or the PRD, is essentially, that's its function. It's the destination document. And it sort of doesn't matter what shape it is.
- 30:51
I've got a shape that I prefer and that I quite like. But you can just choose your own shape or whatever your company uses.
- 31:00
And all we're really doing is-- Oh, no, hmm, too worried about that.
- 31:05
All we're really doing is summarizing the design concept that we have so far. And
- 31:12
the-- So let, let's try this. So I'm gonna initiate this, and I'm gonna say zoom all the way to the bottom. All I'm gonna do is just say, "Write a PRD."
- 31:23
And we can take a look at that skill now.
- 31:26
Write a PRD. So this skill, it does a few things.
- 31:34
It first asks the user for a long detailed description of the problem. You can use write a PRD without grilling first, but I just like to grill first and then write the PRD afterwards.
- 31:43
Then you can, um, get it to explore the repo, which we've kind of already done. Then we get it to interview the user relentlessly, so a kind of grilling session again.
- 31:52
And then we start, um, putting together a PRD template. So this is available in the repo if you want to check it out. And essentially, this is what it looks like.
- 32:01
We've got some problem statements, the problem the user is facing, the solution to the problem, and a set of user stories. And these user stories sort of define what this is.
- 32:09
You know, as you, you [REDACTED:gender] have probably seen things like this if you've been a developer at all. Um, you know, there are-- Cucumber is a language you can use to write these in or we just sort of, um, uh, write them ourselves essentially.
- 32:22
Then we have a list of implementation decisions that were made and a list of, crucially, testing decisions too. So
- 32:31
I'm gonna run this. Okay. And so it's finished its thing. Ah!
- 32:37
Windows, let me close the thing. Thank you.
- 32:40
I don't know why I bought a Windows laptop. I think I just, I like the challenge. Um,
- 32:46
so the first thing that it's gonna give me are a set of proposed modules it wants to modify.
- 32:54
Now, there's a deep reason why I'm thinking about this. So this is,
- 32:58
at this stage, we have an idea, we have sort of specced out the idea, we've reached a sort of understanding of what we're trying to do, and then we need to start thinking about the code.
- 33:10
Because at this point, we need to-- Th-this is not specs to code. This is not where we're ignoring the code. We actually keep the code in mind throughout the whole process.
- 33:20
And the way I like to do this is I like to just sort of think about a set of proposed modules to modify. We're gonna return to this, this idea of continually designing your system and keeping your system in mind.
- 33:33
So it's, it's saying recommend test for the gamification service. It's the only deep module with meaningful logic. These modules look right. Yeah. Looks good.
- 33:44
And it's going to ping out a PRD.
- 33:48
Now, for ease of setup, I've got it so that it creates a set of issues locally. So it's just gonna create essentially a PRD inside this issues directory. But the way I usually do it,
- 34:01
and you can check this out yourself, is you can go to my, um, essentially what I consider my work repo, which is github.com/mattpocock/coursevideomanager up here. And in here, this is essentially a app that I create, um, that I use all the time to record my videos and things like this.
- 34:22
I think I've recorded like... I pulled down the stats. I think I've recorded like a thousand videos in here or something nuts. Um, and you can see here that it's got seven hundred and forty-four closed issues.
- 34:32
And this is essentially all of the, uh, PRDs and all of the implementation issues that I've put into here. So this is how I usually like to do it.
- 34:42
So that's what I'm doing with the... There we go, yeah. I'm just gonna say yes, and, uh,
- 34:49
and get that issue out. Let's see. It is inside here. So we've got the problem statement. People sign up for courses. Uh, the solution, the user stories, uh, eighteen user stories, looks nice.
- 35:02
Some implementation decisions, level thresholds, et cetera. This is enough information. We've kind of clarified where we're going and what we're doing.
- 35:10
So that's what we do. We essentially have a grilling session, and we've created an asset out of it. Now, raise your hand. Should I be reviewing this document? Raise your hand if you think I should be reviewing the document.
- 35:23
Yeah, I don't, I don't look at these. I don't look at these. The reason I don't look at these is because, what am I testing at this point? What am I-- Like, when I read it,
- 35:33
what am I testing? What am I-- What are the failure modes I'm trying to test for? I know that LLMs are great at summarization, 'cause they are. They're really good at summarization.
- 35:42
I have reached the same wavelength as the LLM, right? Using the Grill Me skill, we have a shared design concept. So if I have a shared design concept, all I'm doing is I'm just essentially checking the LLM's ability to summarize.
- 35:56
So I don't tend to read these. Let's have, let's have a Q&A 'cause I can feel you [REDACTED:gender] are itching for it. And then I think we might have, like, I don't know, just a five-minute comfort break just to, uh, rest my voice and so you can catch up with the exercises for a minute, if that's all
- 36:10
right. So let's have a little Q&A sesh.
- 36:14
Uh, if I don't like Claude Code, which one do I actually like? Um,
- 36:19
uh, have you ever heard the phrase, um,
- 36:23
uh, democracy is the worst way to run a country apart from all the other ways? [laughs] That's how I feel about Claude Code.
- 36:30
Uh, we've answered that one. [laughs] Uh, what's your thoughts on developers needing to very deeply understand TypeScript now that Fix the TS make no mistakes exist? I don't understand the phrasing of this, but I think I understand the meaning, which is that
- 36:48
I believe that code is very important, and this is kind of gonna feed through the whole session, and that bad code bases make bad agents. If you have a garbage code base, you're going to get garbage out of the agent that's working in that code base.
- 37:02
We'll talk more about that in a bit. And so I think understanding these tools very deeply, understanding code deeply, is gonna make you a much, much better developer and get more out of AI.
- 37:14
Uh, and that answers that question too. Sweet.
- 37:19
Uh, get out of there. There you are.
- 37:24
Now that we have one million tokens available, do we ever actually want to take advantage of that?
- 37:30
I've noticed that the dumb zone has become less dumb lately. Okay, great question. This goes back to our kind of initial idea on the dumb zone.
- 37:41
Uh, I, um, I recorded my Claude Code course using a 200k context window, and on the day that I launched the course, they announced the one million context window. [laughs]
- 37:53
My take on this is that what Claude Code did is they essentially just did this. Wee! [laughs] They shipped a lot more dumb zone to you, essentially. Now, this is good for tasks where you want to retrieve things from a large context window.
- 38:07
If you want to pass five copies of War and Peace or something to it, and you want to find out all the things that, uh,
- 38:14
uh... I can't remember a character from War and Peace. Uh, why did I start with that? It's good for retrieval. It's less good for coding. So I consider that it is about 100K at the moment, is the smart zone.
- 38:28
The smart zone will get bigger, and that will be a really nice improvement. So folks, we're gonna take, like, a five-minute comfort break, if that's all right, just for my voice and to-- maybe you can have a little move around or something or grab a drink.
- 38:40
I've just noticed some sleepy eyes, and I wanna make sure that we're awake for the next bit, if that's all right. So we'll take five minutes, and I'll see you back here then.
- 38:49
All right? So we have our PRD, which I'm not gonna read, our kind of destination document. Let's quickly scan for any good questions before we zoom ahead.
- 39:02
And rediscovering the role of software engineer in today's world, top three disciplines you recommend. Um, taekwondo is good, I've heard. I've n- [laughs] I've no idea how to answer this question.
- 39:15
Um, thank you for asking it, though. Um, top three disciplines I recommend. Plumbing. I mean-- Sorry? Plumbing. Plumbing is a good one. Yeah, yeah, yeah. Yeah. [laughs] I don't know if that's a discipline.
- 39:25
Uh, the plumbers I've hired are not usually very disciplined. [laughs] Um,
- 39:30
right. So okay, we now have our destination, okay? Um,
- 39:37
perfect. So how do we actually get to our destination? How do we-- We have a sort of vague PRD. How do we split it so that we don't put things into the dumb zone?
- 39:49
In other words, we have our number four. How do we split it into this kind of multi-phase plan? Well, probably what you would do at this point is you would say, "Okay, Claude, give me a multi-phase plan that gets me to this destination."
- 39:59
Right? That sort of makes sense. This is what we've been doing before. But I have, um, a sort of better way of doing it now, which is that
- 40:08
I like creating a Kanban board out of this. Raise your hand if you don't know what a Kanban board is.
- 40:17
Mm, cool. Okay. A Kanban board is essentially just a set of tickets that you put on the wall that have blocking relationships to each other. So we're gonna see what it kind of looks like here.
- 40:27
This is how we've worked, um, as developers for a long time, really since Agile came around, and what it does, we can see it here, it has proposed that we split this setup into, um, five different tasks here.
- 40:43
We have the first one, which is the schema and the gamification service. Yeah, that looks pretty good. This is blocked by nothing. And we can even see here that it's a, it's given it a type of AFK too.
- 40:54
Remember I talked about human in the loop and AFK earlier? This is an AFK task. This is something we can just pass off to an agent to do its thing.
- 41:01
Streak tracking. Okay, that looks good. Uh, then wire points and streaks into lessons quiz completion. This is blocked by one and two. Retroactive backfill. This is blocked only by one.
- 41:13
And then this one here is blocked by all of the tasks. Cool.
- 41:19
Hmm. Now, I consider this-- You could say, why don't we just make this sort of generation of the issues? Why don't we just hand that over to the AI?
- 41:28
Why do I need to be involved here, right? 'Cause it's given us quite a good selection of tools here. Why do I need to review this and sort of figure out what's next?
- 41:37
Now, my take here is that this is really cheap to do, like very quick to do once I've done the PRD, and I can immediately see some issues here.
- 41:47
There's a really, really important technique when you're kind of figuring out what the shape of this journey should look like. And
- 41:57
it sort of comes to this very classic idea, uh, which comes from Pragmatic Programmer called tracer bullets or vertical slices.
- 42:07
And tracer bullets really transform the way I think about actually
- 42:11
getting AI to pick its own tasks. Systems have layers, right? There are layers in your system. These might be different deployable units. You might have a database that lives somewhere.
- 42:23
You might have an API that lives maybe close to the database, but in a separate bit. You might have a front end that lives somewhere totally different, like a CDN.
- 42:30
Or within these deployable units, you might have different layers within those. In, for instance, the code base that we're working in, we have a ton of different services. Service We have a quiz service, a team service, a user service, coupon service, course service, and these services have dependencies on each other, so they're kind of like individual layers.
- 42:50
Well, what I noticed is that AI loves to code horizontally. So it loves to code layer by layer. So in other words, in phase one it will do all of the database stuff, all of the schema, all of the, you know, all the stuff related to that unit.
- 43:08
Then it will go into phase two and do all of the API stuff. Then it will add the front end on top of that.
- 43:14
Does-- can anyone tell me what's wrong with that picture? Why is that not a good thing to do? Raise your hand if you have an answer. Yeah.
- 43:21
You don't have the whole feedback loop.
- 43:23
Exactly. You don't get feedback on your work until you've really started or completed phase three. So what you really need to do is you-- you're not-- until you get to phase three, you're not actually testing that all the layers work together.
- 43:41
You haven't got an integrated system that you can test against. And so, instead, you need to think about vertical layers. You need to think about thin slices of functionality that cross all of the layers that you need to.
- 43:54
And this is a much better way to work, much better way for the AI to work too, because it means at the end of phase one or during phase one, it can get feedback on its entire flow.
- 44:04
So what this means to me is inside the PRD to issues skill up here,
- 44:13
I have got, "Break a PRD into independently grabbable issues using vertical slices, tracer bullets written as local Markdown files." We first locate the PRD.
- 44:23
Uh, again, explore the code base if this is a fresh session. We draft vertical slices. So we break the PRD into tracer bullet issues. A tracer bullet, by the way, is, uh, essentially when you're like an anti-aircraft gunner, it's quite a violent, uh, idea actually, uh, and you're looking up in the sky, and it's night.
- 44:41
If you're just shooting normal bullets, you have no idea what you're firing at, right? You could just be, you know, you, you see the plane, but you don't see where your bullets are going.
- 44:49
Tracer bullets is they attach a tiny bit of phosphorescence or phosphor or something to make it glow as it goes. So this means that every sixth bullet or something, you actually see a line in the sky, so you have feedback on where you're aiming.
- 45:02
So this is what-- this is the idea here, is that we increase our level of feedback, and we get near instant feedback on what we're building. 'Cause without that, the AI is kind of coding blind until it reaches the later phases.
- 45:14
We've got some vertical slice rules, we quiz the user, and then we create the issue files. So what I see here is that even though I've s- I've told it to do vertical slices, it's proposing to create the gamification service first on its own.
- 45:34
That's just one slice there, and that to me feels like a horizontal slice. What I want to see in the first vertical slice especially, is I want to see the schema changes or some schema changes.
- 45:44
I want to see some new service being created, and I want a minimal representation of that on the front end. So I want it to go through the vertical slices, not just the horizontal.
- 45:52
Does that make sense?
- 45:54
Yeah.
- 45:54
Okay. So I'm gonna give the AI a rollicking. Uh, bad boy. No. [laughs] [laughs]
- 46:02
I'm not gonna waste tokens just being-- just memeing. Um, so the first slice is too horizontal. I'll just start with that and see if it picks it up. Does that make sense as a concept?
- 46:14
And I think having that, um... What I really like about going back to those old books is that we're really trying to, in this day and age, like, get, uh, verbalize best software practices in English.
- 46:29
And these books, twenty-year-old books, have already done that, and it's an absolute goldmine if you want to throw that into prompts. But even with that, it's not gonna, um, not gonna do a perfect job each time.
- 46:39
So, award points for lesson completion visible on dashboard. Yes, that's a beautiful vertical slice because it's definitely a big chunk of stuff. It's doing a lot of stories there, but we're gonna see something visible at the end, and the AI will then just be able to add to that.
- 46:55
You see why that's preferable to the first one? Cool. Uh, looks great.
- 47:01
So we're getting closer now. And anyone following at home as well, you're not at home, but you get the idea, um, will hopefully see the same thing too and start developing the same instincts.
- 47:11
Let's open up for questions just while I'm sort of creating these GitHub issues.
- 47:16
Ba, ba, ba, ba. Or not GitHub issues, uh, local issues.
- 47:20
When will I stop using Windows? Never. What is your, uh-- Okay, we'll get to that later. [laughs]
- 47:26
How does AI, um, decide when to stop grilling? 'Cause AI can ask incessantly. Can we have a smarter way to decide the stop point? Yeah, it does tend to really, um, those grilling sessions can be super intense.
- 47:36
And the thing about these skills is you can tune them if you want to. If you feel like the AI is just absolutely hammering you, hammering you, hammering you, then you can just tell it to just pull back a little bit or get it to do, you know, stop points and that kind of thing.
- 47:49
So if that's a failure mode that you run into a lot, then you just, you know, change the skill.
- 47:55
Uh, do I still use, uh, be extremely concise, sacrifice grammar for the sake of concision? Um, there was a tip that I gave folks, um, hmm, five months ago, which is that to basically increase the readability of your plans.
- 48:08
So when you're using plan mode, then you can put it in your CLAUDE.md, and you can say, okay, yeah, approve that.
- 48:17
Let's open up CLAUDE.md. Do I have a CLAUDE.md? Maybe I don't. I do-- I really don't use CLAUDE.md very much. I'm just gonna put a dummy inside here. Um, when-- No.
- 48:31
When talking to me, uh, sacrifice grammar for the sake of concision. [keyboard clicking]
- 48:40
And this, um, prompt was, uh, really useful to me when I was reading the plans because it meant that the plans would come out, and they would be very concise, really nice, easy to read, often very, uh, concise.
- 48:51
But I've- I've since dropped this idea in preference to a grilling session because what I noticed w- it just-- I didn't want to read the plans. I wanted to get on the same wavelength as the LLM.
- 49:02
I wanted it to ask aggressive questions to me. And when I stopped reading the plans, I stopped needing them to be concise. So I think of the plans really in the destination document as, uh, the end state, and I don't need that end state to be concise.
- 49:15
Hopefully, that answers your question. Uh, what do I think will be the outcome of the [REDACTED:origin] standoff for future roles of PMs and other roles converging? Uh, I have no idea.
- 49:26
I'm not a pundit. I have no idea.
- 49:30
Uh, okay. So we should, uh, after a couple of approvals,
- 49:37
uh, end up with a set of issues. Now,
- 49:41
these issues that we're creating, they're designed to be independently grabbable, which means that this Kanban board ends up looking kind of like this, where you have
- 49:53
essentially a set of tickets with a whole load of independent relationships. So this one needs to be done before this one. This one needs to be done before this one, and this one, let's say we've got another one over here.
- 50:05
This one needs to be done before this one. This means that you can start to parallelize. You can start to get agents working at the same time on these tasks.
- 50:15
Because, yeah, this one needs to be done first, and then these two
- 50:22
can be grabbed at the same time by independent agents. Raise your hand if you've done any kind of parallelization work with agents. Okay, cool. So this allows you, um, to turn those plans into optimally kind of like into, uh, directed acyclic graphs, essentially, where you just are able to, um, essentially have three phases here, where you have
- 50:47
phase one. Ugh, let me grab and move that.
- 50:51
Uh, above this line here, you do this one. Then phase two, you do the two below it, and then phase three, you do this third one and add it onto there.
- 51:03
And when you think about there could be-- this could-- this is a relatively simple plan, but you could have many different plans operating all at once. It means that you can do really nice parallelization, and we'll talk more about that in a bit.
- 51:13
But that's why I prefer a Kanban board set up like this to a sequential plan because a sequential plan can really only be picked up by one agent. So this-- Where did it go?
- 51:27
Over here. Yeah, this plan here, this is really only one loop, right? Only one agent can work on these because we have numbered phases, and they're not parallelizable. Does that make sense?
- 51:40
Cool. So we've got our issues. Ah, come on. Stop asking me for-- Oh, no, it's creating them on GitHub. I really don't want that. Oh, no. You fool. [laughing]
- 51:53
Create them in issues instead. Nope. That's not precise enough. Uh, you fool. [laughing] Create them in local Markdown files instead, referencing the local version.
- 52:11
Sorry about this. So once we get to this point, we have a bunch of issues locally that we can start, um, looping over and implementing, and it's at this point that the human leaves the loop.
- 52:29
So, so far-- Let me pull up a, a proper overview of this kind of flow that we're exploring here.
- 52:37
So far, we have taken an idea. Zoom this in a bit for the folks at the back.
- 52:47
And we've grilled ourselves about the idea. We can skip over research and prototype, but we turn that into a PRD, into a destination document. We've then turned that PRD into a Kanban board, and all of those steps are human-reviewed.
- 53:04
And now, the implementation stage, we step back, and we let an agent, um, work through that Kanban board or multiple agents work through the Kanban board.
- 53:15
Now, what this means is that, yeah, we've spent a lot of time planning here, but it means that we've queued up a lot of work for the agent. We can think of this as kind of like the day shift and the night shift.
- 53:25
This is the day shift for the human, right? Planning everything, getting all the, uh, all the stuff ready. And then once we kick it over to the night shift, the AI can just work AFK.
- 53:34
But what does that look like? Well, so I'm just gonna-- Oh, yeah, just allow it. That's perfect.
- 53:43
So this looks like if we head to the next exercise,
- 53:47
which is, boo, boo, boo, boo, boo. Uh, in fact, the last exercise here, running your AFK agent.
- 53:55
Now, I've called this, uh, Ralph, really, 'cause it is a, it is essentially a Ralph loop. And this prompt here, I wanna walk through this really closely.
- 54:06
The first thing it's doing here is we're essentially going to run Claude, and we're gonna basically try to encourage it to work, um, completely AFK. I'll show you what the sort of script for this looks like in a minute.
- 54:19
But you say, okay, local issue files from issues are provided at the start of context.
- 54:24
The way we do that is if you look inside once.sh here inside the repo,
- 54:29
we have, uh, it's essentially just a bash script where we grab all of the issues, um, which are inside Markdown files, and we cat them into a local variable.
- 54:41
So that issues variable contains all of the issues that are in our entire backlog.
- 54:47
Then we grab the last five commits. I'll explain why in a minute. And then we grab the prompt, and we just run Claude Code with permission mode accept edits, and then just essentially just pass it all of the information.
- 55:02
This is what the implementer looks like. So that's what a very, very simple version of this sort of loop looks like. And of course, this is not a loop.
- 55:09
This is just running it once. The loop is in the AFK version up here, which is, uh, a fair bit more complicated, and the crucial part here is we're running it in Docker sandbox as well.
- 55:22
So I, I don't want you to install Docker on your laptops because we're just gonna be like, "You need to download a special image," and we're gonna tank the conference Wi-Fi if we do that.
- 55:31
So I'm, I am gonna demo this to you, but you, um, won't need to run this yourself. But I'll talk through this in a minute. But essentially, this once loop here,
- 55:41
ba-ba-ba-bom, we're just essentially running one version of the thing that we're going to loop again and again and again. So this is kind of like the human-in-the-loop version. And this is essential.
- 55:54
Running this again and again is essential because you're gonna see what the agent does and see how it ends up working. And any tuning that you need to add to the prompt, then you can do that.
- 56:03
Let's go into the prompt. Um, so local issue files are being passed in. You're gonna work on the AFK issues only. That makes sense. If all AFK tasks are complete, output this no more tasks thing.
- 56:20
And then the next thing, pick the next task. So
- 56:26
what we're doing here is we're essentially running a backlog or curating a backlog that our AFK agent is gonna pick up. That's the purpose of all of these, um, setups in the beginning.
- 56:38
In this, uh, all the way to this Kanban board here, we're just essentially creating a backlog of tasks for the night shift to pick up. And the night shift, this sort of Ralph prompt here, it's got its own idea about what a good task looks like, so next pick up.
- 56:56
I'm, uh-- I did talk about parallelization. I, I will show you this later, but this is essentially a sequential loop here. We're just gonna run one coding agent at a time.
- 57:03
This is a good way to just sort of, um, get your feet wet, essentially.
- 57:09
So it's prioritizing critical bug fixes, development infrastructure, then tracer bullets, then polish and quick wins and refactors. And then we just have a very simple kind of instruction on how to complete the task.
- 57:21
So we explore the repo, use TDD to complete the task. I'll get to that later.
- 57:27
And we then run some feedback loops. So let's, let's just try this, and let's just see what happens. So good. It's created the issue files. We should be good to go.
- 57:36
I'm gonna cancel out of this. Gonna clear, and I'm gonna run,
- 57:40
uh, where is it? Ralph once.sh. And you can feel free if you're following along to do the same thing.
- 57:48
So we can see it's just running Claude inside here with the prompt and with all of the issues that have been passed in. And while it's doing its thing,
- 57:59
you probably have some questions about this setup and about the decisions that I've made to essentially delegate all of my coding to AI, right? So let's, let's do a quick Q&A while it's, uh, getting its feet under.
- 58:14
Uh, okay. Ba-ba-ba-ba-ba. I'm gonna just remove those.
- 58:23
How do you retain negative decisions, things that you decided against, and rationales when persisting the results from the Grill Me session? Uh, great question. That's a very simple answer, which is the, in the PRD, uh, write a PRD section, there is a stuff at the bottom, a section of the things that are out of scope.
- 58:41
So the things we're not gonna tackle in this PRD, which is very important for giving a definition of done.
- 58:47
Feel free to ping on the Slido if you've got any more questions.
- 58:51
Uh, what's my front-end workflow? Okay, that's a great question. I'm gonna, I'm gonna answer that in a minute, I think.
- 58:58
How to deal with agents producing more code than we can review? How to properly parallelize and use multiple agents in a separate way? Okay, that's, um... There's two questions there.
- 59:08
Um, raise your hand if you feel like you're doing more code review now than you used to.
- 59:16
Yeah, definitely. Um, I don't think there's a way to avoid this.
- 59:22
If we delegate all of our coding to agents,
- 59:27
you notice that the implementation here is really the only AFK bit. We then also need to QA the work and code review the work, right? And if we are running these loops where it's essentially gonna implement four issues in one, it's hard to pair that with the dictum that you should keep pull requests small and self-contained, right?
- 59:49
Like, small self-contained pull requests means you're needing to do fewer loops or shorter loops or something. Or maybe you do like a big stack of PRs, but that seems horrible as well.
- 1:00:00
That's still just more separated code to review. I don't honestly know what the answer to this yet. I think we just need to be ready to be doing more code review, essentially.
- 1:00:10
Which is not fun. That's not a fun thing to say. That's not like, I don't know, I don't feel good saying that, but I do think it's probably the, the way things are going.
- 1:00:18
It's a great question. Uh, can we grab a couple of questions from the room as well? Let's not, we won't do the mic, but, uh, raise your hand if you've got a question for me immediately.
- 1:00:31
Yeah.
- 1:00:32
So the approach looks very linear from an idea to a QA code review. Of course, the real world is a lot more messy. So you have all these ideas that are parallel and, uh, nobody has the full picture.
- 1:00:45
And, uh, while you're working on something, something else comes in as like a bug.
- 1:00:49
Yeah.
- 1:00:50
How do you deal with the messiness? How do you tighten the feedback loop?
- 1:00:53
Great question. So the question was, if this all looks great if you're a solo developer, but actually how do you implement this in a team? How do you gather team feedback on this?
- 1:01:02
And my answer to that is that if you have an idea up there and- Essentially, the sort of journey from the idea to the destination is something you need to figure out with the team, right?
- 1:01:15
So all of this stuff up here, this is kind of like team stuff. You know what I mean? This ... So if you have an idea, and you do a grilling session on it, and you have a question that you don't know how to answer, then you need to loop in your team, as we described before.
- 1:01:28
Then you might need to go, okay, look, we just need to build a prototype of this. We need to actually hash this out. We need something that the domain experts can fiddle with.
- 1:01:36
Ooh, okay, we might need to integrate a, a third-party library into this. We might need to do some research. We might need to actually kind of like, um, ping this back and forth and find a third-party service that we can get the most out of.
- 1:01:48
We might need to go back with the information that we gathered there to the idea phase. So all the way up to the sort of PRD in the journey, that's something you need to involve your team with.
- 1:01:57
That's something where these assets are gonna be shared and argued over, and you're gonna have requests for comment on them, and that, that loop is gonna just keep grinding and grinding until you figure out where you're going.
- 1:02:09
Once you figure out where you're going, then you can start doing the Kanban board implementation. But this is essentially super arguable, and the ... you'll be bouncing back and forth between the phases.
- 1:02:18
Does that make sense? Yeah.
- 1:02:20
Would you not need a PRD for your prototype?
- 1:02:23
Say again, sorry.
- 1:02:23
Would you not want to have a PRD for your prototype?
- 1:02:26
The question was, do you want to go through this whole session just to sort of create a prototype? Do you not need a PRD for your prototype as well?
- 1:02:33
Let's just quickly talk about prototypes for a second. Um, there was a question about how do you make this work for front-end?
- 1:02:39
Like, how do you ... Because front end is, like, really sensitive to human eyes. You need human eyes looking at the front end all the time to make sure that it looks good.
- 1:02:48
AI doesn't really have any eyes. It can look at code, but it ... Front end is multimodal. And so my experiences with trying to plug AI into, um, let's say agent-browser or Playwright MCP to give it ...
- 1:03:04
You can give it tools to allow it to look through a front end and sort of look at images, but in my experience, the, um, it's not very good at that yet, and it can't create a nice front end in a mature code base.
- 1:03:16
It can sort of spit one out. But what it can do is you say, "Okay, uh, I want some ideas on how, uh, this front end might look. Give me three prototypes, um, that I can click between in a throwaway, uh, throwaway route that I can decide which one looks best."
- 1:03:32
And you take the asset of that prototype, and you then feed it back into the grilling session, or you get feedback on it, blah, blah, blah, blah, blah. That answer your question kind of thing?
- 1:03:41
The prototype is just, you know, it's messy. It's supposed to give you feedback early on in the process. So that's a great way of working with front-end code, great way of looking at software architecture in general.
- 1:03:50
Let's go one more question. Yeah.
- 1:03:51
Yes. In your system, how do you integrate respecting an architecture, a design with API contracts and fitting with your larger system, uh, security constraints, all kinds of constraints like that?
- 1:04:05
Yeah. There's a lot in that question. The question was, how do you conform with existing architecture? How do you do, um,
- 1:04:12
how do you make it conform to the code standards, like, of your code base or-
- 1:04:16
Yeah, the architecture design APIs-
- 1:04:19
Yeah
- 1:04:19
... security rules that constrains your design.
- 1:04:22
Yeah. I'm gonna answer that in a bit, if that's okay. So hopefully, we have started to get some stuff co- cooking. It's just pinging on the explore phase here.
- 1:04:36
Hmm, tempted to just start running it AFK.
- 1:04:41
Maybe I will, maybe I won't. Um, what it's essentially doing is it's exploring the repo. It's going to then start implementing based on what we wanted. Let's actually a- have one more question just while it's running.
- 1:04:51
Yeah.
- 1:04:52
Why not have an AI QA step after or before the human reviews?
- 1:04:58
Yeah. So question was, why do you not get AI to QA?
- 1:05:05
AI to QA. That's ... [laughs] I just got, uh, jargon overload for a second. Um, why do you not get AI to, uh, test its own code? Now, of course, you absolutely can.
- 1:05:14
And I think while it's doing ... While it's cooking here, okay, it's got a clear picture of the code base. It's assessing the issues. It's doing issue [REDACTED:generic_id]'s next task.
- 1:05:24
I'm again gonna show you that in a bit, I think. The sort of, uh ... Because you definitely should do an automated review step as part of implementation. So you have your implementation.
- 1:05:35
You should then, because tokens are pretty cheap, and AI is actually really good at reviewing stuff, you should get it to review its own code before you then QA it.
- 1:05:43
I've found that that catches a ton of different bugs, and
- 1:05:48
the way that works is, I will just do a little diagram, is if you have, let's say, an implementation that sort of like used up a bunch of tokens in the smart zone, if you get it to sort of try to do its reviewing, it's gonna be doing the reviewing in the dumb zone.
- 1:06:05
And so the reviewer will be dumber than the thing that, that actually implemented it. If we imagine this is the, uh, let's be consistent. That's the review. That's the implementation.
- 1:06:15
Whereas if you clear the context, then you're essentially gonna be able to just review in the smart zone, which is where you wanna be.
- 1:06:27
Let's see how our implementation's doing. Okay, good. It's generating a migration. That looks pretty nice. We're getting some code spitting out.
- 1:06:37
And while I'm sort of like, aha, here we go. TDD.
- 1:06:43
Let's talk about TDD, and then I think we'll have a little, another little break. TDD, I've found, is absolutely essential for getting the most out of agents. Uh, raise your hand if, uh, you know what TDD is.
- 1:06:56
Cool. Okay. TDD is test-driven development. What it's essentially doing is it's doing a, something called red-green refactor And if you look in the code base, you'll be able to find a, um, a skill which really describes how to do red, green, refactor, and teaches the AI how to do it.
- 1:07:13
So what it's doing is it's writing a failing test first. So it's saying, "Okay, I've broken down the idea of what I'm doing, and I'm just gonna write a single test that fails, and then I need to make the implementation pass."
- 1:07:28
I have found that, first of all, this adds tests to the code base, and this, this tends to add good tests to the code base. And so we've got this kind of gamification service.
- 1:07:38
It looks like it's using some existing stuff to create a test database. Test fails because the module doesn't exist yet. Okay, we've confirmed red, and then it goes and hopefully runs it, and it passes.
- 1:07:52
I found that, uh, raise your hand if you've ever had AI write bad tests.
- 1:07:58
Yeah. It tends to try to cheat at the tests because it's sort of doing it in layers. It will do the entire implementation, and then it will do the entire test layer just below it.
- 1:08:08
Uh, I'm just gonna say, yes, you're allowed to use npx vitest. And using this technique, it generally is a lot harder to cheat because it's sort of instrumenting the code before it's then writing the code.
- 1:08:24
So I find that TDD is so, so good for places where you can pull it off, and in fact, it's so good that I sort of warp my whole, uh, technique around getting TDD to work better.
- 1:08:35
I can see some drooping eyes. It is so hot in here. You cannot imagine how hot it is up here. Let's take another five-minute comfort break. Let's come back at quarter to, I think.
- 1:08:46
Have a nice, generous one. And we'll be back in about six, seven minutes, and I'll talk about how, uh, I think about modules, think about constructing a code base to make this possible.
- 1:08:57
I've just been sort of fiddling with the AI here, and we have ended up with some, with a commit. So we have something to test. Issue number two is complete.
- 1:09:05
Here's what was done. This is kind of what it looks like when a Ralph loop completes, is you end up with a little summary. Um, and we have now something we can QA.
- 1:09:15
Because we did the feedback loops, be- or because we did the tracer bullets, because we were, uh, said, "Okay, give us something reviewable at the end of this," we can immediately go and QA it.
- 1:09:24
Now, there's nothing, uh, less exciting than watching someone else QA something, but hopefully, we can have a little play. Let's just check that it, uh, works at all. In fact, before I go there, I just want to sort of work through what just happened, which is we see that it's created some stuff on the dashboard,
- 1:09:45
and it then ran the feedback loops. So it then ran the tests and the types.
- 1:09:51
Now, TDD obv- is obviously really important, and it's really important because these feedback loops are essential to AI, essential to get AI to produce anything reasonable. Because without this, AI is totally coding blind, right?
- 1:10:06
You have to, have to, um... If, if your code base doesn't have feedback loops, you're never ever, ever gonna get decent AI, decent output out of AI. And often, what you'll find is that the quality of your feedback loops influences how good your AI can code, essentially.
- 1:10:24
That is the ceiling. So if you're getting bad outputs from your AI, you often need to increase the quality of your feedback loops. We'll talk about how to do that in a minute.
- 1:10:35
Now, so it ran, uh, npm run test, npm run type check. It got one type error, and it needed to fix it with a nice bit of TypeScript magic.
- 1:10:44
Very good. Yeah, type or level threshold's number. Okay.
- 1:10:49
Ugh, you see why I stopped teaching TypeScript? 'Cause just AI knows everything now. Um,
- 1:10:54
so and it ran the test, and it passed, and it's looking good. So we now end up with two hundred and eighty-four tests in this repo. Pretty good.
- 1:11:03
I, I do find, uh, front-end really hard to test here. We're essentially just testing the service. So we've created a gamification service, if we look up here,
- 1:11:13
and then we have a test for that service. You can see the, the service and the test itself. Now, if I was doing code review here, I would then go to rev- I would first go to review the tests, make sure the tests were testing reasonable things, and then go and kind of review the code itself just
- 1:11:28
to make sure that it's, it's not doing anything too crazy, right? The essential thing is I need to actually, um, look at the dashboard. I'm going to log in as a student.
- 1:11:40
Oh, if it'll let me. Maybe it won't let me. Come on, son. There we go. Let's log in as Emma Wilson, head into Courses. Uh, let's say I've got an introduction to TypeScript.
- 1:11:52
Continue learning. Uh, yes, I completed this lesson. Something went wrong. I imagine it's because I don't have,
- 1:12:03
uh, SQLite error. I don't have the right table. So I need a table point events. Point events is a strange table name. I'm not sure quite what it was thinking there.
- 1:12:12
Uh, let's suspend. Let's run, uh, NPMDB migrate or push, I think.
- 1:12:19
I can't remember which one it was. But you kinda get the idea, right? I, I'm not gonna subject you to, uh, watching me do QA because it's so dull.
- 1:12:28
Um, but at this point, I would essentially go back in. I would, um... Let me open the project back up.
- 1:12:35
Uh, and I would-- This, this is a crucial moment, um, and it's so important to, um, QA it manually here because QA-- Oh, dear, oh, dear, what's gone wrong?
- 1:12:46
There we go. QA is how I then, um, impose my, uh, opinions back onto the code base, how I impose my taste. What you'll often find is that, um, there are teams out there who are trying to automate everything, like every part of this process, and they will tend to-
- 1:13:06
Uh, if you try to, like, automate the sort of creation of the idea, automate, uh, the QA, automate the research, automate the prototype, you end up with, uh, apps that I feel just lack taste and are bad.
- 1:13:22
Maybe they just don't work, or they, they don't even work as intended, or there's just no eye. You need a human touch when you're building this stuff because without that, you just end up with slop.
- 1:13:32
And we are not producing slop here. We're trying to produce high-quality stuff, and so that's what the QA is for.
- 1:13:39
So I'm gonna do two things in this final section, which is I'm gonna first tell you how to-- There's probably a question in your mind here, which is, let's say I have a code base that I'm working on, and it's a bad code base.
- 1:13:54
It's a code base that's, like, really complicated, uh, the AI just never does good work in, and maybe actually most humans that go into that code base don't do good work.
- 1:14:03
How-- What-- How do I improve that code base? And the second thing is I'll show you my setup for parallelization. So let's go with, um, bad code first.
- 1:14:14
Now, where is it? Where's the diagram? Here it is.
- 1:14:20
In his book, um, The Philosophy of Software Design, John Ousterhout talks about
- 1:14:26
the ideal type of module. And let's imagine that you have a code base that looks like this. Each of these, uh, blocks here are individual files, and these files export things from them.
- 1:14:38
You know, they have, um, things that you pull from the files that you then use in other things. And so you might have these weird dependencies where this file over here might rely on this file or might rely on that file, for instance.
- 1:14:49
Now, if these files are small and they don't kind of ex-- like export many things, then John Ousterhout would call these shallow modules, essentially, where they're not very, um...
- 1:15:02
They kind of look like, uh, this. If I-- Mm, actually, no, I can't, can't make a good diagram of it. They're essentially lots and lots of small chunks. Now, this is hard for the AI to navigate because it doesn't really understand the dependencies between everything.
- 1:15:15
It can't work out where everything is. You know, it has to sort of manually track through the entire graph and go, okay, this relies on this. This one relies on this one.
- 1:15:23
This one relies on this one. And it's then also hard to test this as well because where do you draw your test boundaries here? Do you test each module individually?
- 1:15:35
Like just literally draw a test boundary-- No, don't do that. Around this one?
- 1:15:40
And then maybe another test boundary around the next one, and then the next one?
- 1:15:46
Or should you sort of do big groups of it? Should you say, okay, we're gonna test all of these related modules together and just sort of, you know, hope and pray that they work?
- 1:15:57
Now, this means that if-- I think that bad tests mostly look like that, where the AI essentially tries to sort of wrap every tiny function in its own test boundary and then just sort of test that tho-those individually work.
- 1:16:12
But what that does is it means that when, let's say, this module over here calls those two,
- 1:16:19
so it depends on both of these, then this module might misorder the functions, or there might be sort of stuff inside that poor module that's worth testing on its own.
- 1:16:29
And if you then wrap this in a test boundary, what do you do? Do you mock the other two modules? How does that work?
- 1:16:37
So actually figuring out how to, um, build a code base that is easy to test is essential here because if our code base is easy to test, then our code-- our feedback loops are gonna be better, and the AI is gonna do better work in our code base.
- 1:16:52
Does that make sense? So what does a good code base looks like-- look like?
- 1:16:57
Well, not like that. It looks like this,
- 1:17:03
where you have what John Ousterhout calls deep modules, modules that have a little interface on there that expose a small, simple interface that have a lot of functionality inside them.
- 1:17:16
Now, what this means is that these are easy to test because you just-- Let's say that there's a dependency between this one and this one.
- 1:17:25
My arrow working? Yeah, there we go. Then
- 1:17:30
what you do is you just wrap a big test boundary around that one module, around this one up here, and you're gonna catch a lot of good stuff
- 1:17:40
because there's lots of functionality that you're testing, and really the caller, the person calling the module, is gonna have a simple interface to work from. So it's not, not too tricky.
- 1:17:50
That makes sense. Deep modules versus shallow modules. This is good. This shallow version is bad. And what I find is that unaided, um, or if you don't,
- 1:18:02
uh, if you don't watch AI carefully, it's gonna produce a code base that looks like this. So you need to be really, really careful when you're directing it. And that's why, too, is that if we look inside the PRD--
- 1:18:16
Uh, where is the PRD gone? It's inside the issues. It's inside the gamification system. Uh, not found. Of course it's not. Here it is.
- 1:18:25
Then I have, uh, inside here, data model, the modules. So it's specifically saying, okay, this gamification service is a new deep module which we're going to test around. It's gonna have this particular interface, and it's going to have, um-- Okay, we're modifying the progress service too.
- 1:18:46
We're modifying the lesson route. We're modifying the dashboard route, et cetera. So it-- I'm being really specific about the modules that I'm editing, and I'm making sure that I keep that module map in my mind at all times throughout the planning and then throughout the implementation.
- 1:19:00
That make sense? Very, very useful. It's useful for one other reason too. Not only does it make your app more testable, but you get to do a little mental trick.
- 1:19:11
And I'm gonna refill my water while you wait for what that is.
- 1:19:18
Uh, let me, let me get a question from you [REDACTED:gender]. So raise your hands if you feel like,
- 1:19:27
uh, if you feel like you're working harder than ever before with AI.
- 1:19:32
Yeah. Uh, raise your hands if you feel like you know your code base less well than you used to.
- 1:19:40
Yeah. This is a real thing. Um, because we're moving fast, because we're delegating more things, we end up losing a sense of our code base, and if we lose the sense of our code base, we're not going to be able to improve it, and we're essentially delegating the shape of it to AI.
- 1:19:59
I don't think that's good. But then how do we,
- 1:20:03
how do we make it so that we can move fast while still keeping enough space in our brains? I think that this is a way to do it. Because what you're doing here is not only are you thinking about creating big shapes in your code base, big services.
- 1:20:19
What I think you should do is design the interface for these modules, but then delegate the implementation. In other words, these modules can become like gray boxes, where you just need to know the shape of them, you need to know what they do and sort of how they behave, but you can delegate the implementation of those modules.
- 1:20:38
I found this is really nice. I don't necessarily need to code review everything inside that module. I don't necessarily need to know everything of what it's doing. I just need to know that it behaves a certain way under certain conditions, and that it does its thing.
- 1:20:50
So it's kind of like, okay, I've got a big overview of my code base, and I understand kind of the shapes inside it, understand what the interfaces all do, but I can delegate what's inside.
- 1:21:01
I found that has been a really nice way to retain my sense of the code base while preserving my sanity. Make sense?
- 1:21:12
And so you might ask, how do I take a code base that looks like this, and then turn it into a code base that looks like this? How do I deepen the modules?
- 1:21:23
Well, we have, hopefully it's in here, pretty sure it is. We have a skill, and that skill is called Improve Code Base Architecture. [laughs]
- 1:21:33
Nice and direct. Uh, let's run it. What this skill is gonna do is it's essentially just gonna do a, a scan of our code base and looking for what's available here.
- 1:21:43
And feel free to run this yourself if you're, um,
- 1:21:46
uh, running the exercises. And it's exploring the architecture, exploring, um, essentially how to work within this code base, and it's going to attempt to, uh, find places to deepen the modules.
- 1:22:00
Pretty simple. One really cool, um, thing that it found here is part of my, uh, part of my course video manager app is a video editor, a video editor built in the browser, which is really hardcore.
- 1:22:13
Uh, it's a decent bit of engineering. And I wanted a way that I could wrap the entire front end all the way to the back end in, like, a single big module, so that I could test the fact that I press something on the front end, and it goes all the way to the back end.
- 1:22:27
And so I found a way, essentially by using a kind of discriminated union between the two types here, by sort of-- I, I was able to use this, uh, skill to essentially have a huge, great big module that just tested from the outside or was testable from the outside this video editor infrastructure.
- 1:22:45
And it meant that AI could see the entire flow, could act on the entire flow, and test on the entire flow. And honestly, it was just night and day in terms of the, uh, ability of AI to actually make changes.
- 1:22:57
'Cause AI working on a video editor is pretty brutal if you don't give it good tests. So that is-- Honestly, I-- If you take one thing away from today, just try running this skill on your repo and see what happens.
- 1:23:10
Let's go to Slido. Let's ask a, uh, check a couple of questions just while this is running.
- 1:23:15
So let's see. Have you tried Claude's Auto Mode with Claude enable Auto Mode? Uh, that way you can avoid many of the obvious permission checks. We'll talk about permission checks in a second.
- 1:23:24
Do I keep the markdown plans and issues for later reference?
- 1:23:29
Okay. This is a great question. So let's say that you, uh, have a great idea, you turn it into a PRD,
- 1:23:40
raise-- and you then implement that PRD, and the PRD is essentially done. Raise your hand if you keep that information in the repo. So you turn it into a markdown file.
- 1:23:50
Raise your hand if you want to keep that around.
- 1:23:53
Cool. Okay. And raise your hand if you, if you don't want to keep it around, if you want to get rid of it as soon as possible. Yeah. This is, I think, an,
- 1:24:02
a question that doesn't have a clear answer. What I'm really scared of
- 1:24:08
with any documentation decision is that, let's say that we have a PRD for this gamification system, we keep it in the repo. We go on, go on, go on.
- 1:24:17
Let's say a month later, we want some edits to the gamification system. And we go in with Claude, and it finds this old PRD and says, "Yes, I found the original documentation for the PRD system."
- 1:24:28
Well, it turns out that the actual code has changed so much from the original PRD that it's almost unrecognizable. The names of things have changed. The, um, file structure has changed.
- 1:24:36
Even the requirements may have changed. We might have actually tested it with users. This is doc rot, where the documentation for something is rotting away in your repo and influencing Claude badly, or Claude agents badly.
- 1:24:50
So I tend to not keep it around. I tend to get rid of it. And for me, because my setup uses GitHub issues, I just mark it as closed.
- 1:24:59
It can fetch it if it wants to, but it's got a visual indicator that it's done. So I tend to prefer ditching these.
- 1:25:07
Thoughts on the beads framework from Steve. Uh, I've not tested it, but it seems like sort of, um, another way to manage Kanban boards and issues. Seems, uh, very good, but I've not tried it.
- 1:25:18
Um- And let me just quickly check the, uh, setup here.
- 1:25:26
Let's take a couple of questions from the room. Anybody got any questions at this point about anything that we've covered so far, especially this last bit? Yes.
- 1:25:34
Yeah. So it was, uh, interesting your answer about, like, the Markdown files with the reason we can say we'll create like code rot. How about migrations, like with migration files?
- 1:25:44
We can also squash them after that in that case?
- 1:25:47
Like database migrations?
- 1:25:49
Yeah.
- 1:25:51
I don't know. [laughs] I hope that answers your question. I'm so sorry. [laughs] No, no. I think database migrations are a different thing because you have a sort of running record of exactly what changed, and it's more deterministic.
- 1:26:02
And I think... Yeah, it's an interesting analogy. I'm not sure. Let's talk about it afterwards.
- 1:26:09
That's a good way of saying I have no idea. [laughs] Yeah, yeah.
- 1:26:12
So you mentioned that you don't review the PRD. You mentioned you don't review the PRD once it's done.
- 1:26:16
Sorry, [REDACTED:gender]. Um, I'm just trying to listen to this guy's question.
- 1:26:18
You mentioned you don't read the PRD once it's done. Have you considered, uh, using a deep think like ChatGPT version where it tells, "Look at this PRD and tell me if you can improve it."
- 1:26:29
The f-
- 1:26:29
It takes about an hour.
- 1:26:31
Yeah. The question- [laughs] [laughs] The question here is, um,
- 1:26:35
should I, um, in the sort of early planning stage, be trying to optimize the plan? This is something I actually see a lot of people doing, and it's a really good, um, idea.
- 1:26:45
So when you... Br-br-br-br-br-br-br. Let's go back to the phases. So let's say that you have all of these phases here,
- 1:26:55
and you, uh, you get to the point where you've sort of figured out everything with the LLM. You understand where you're going. You've created this sort of, um, journey destination document here.
- 1:27:05
How do you then, uh, like should you then try to optimize and optimize and optimize that PRD until it's the perfect PRD you can possibly imagine? I don't think there's a lot of value in that because I think the journey is really just sort of a hint of where you wanna go, and the place that you need
- 1:27:23
to be putting the work is in QA. And that you can sort of do that AFK, I suppose, but in my experience, you're not gonna get a lot of juice out of it.
- 1:27:31
Like, it's the, the thing that really matters is getting alignment with the AI, which is you do in the grilling f- session initially.
- 1:27:40
Let's have one more question. Have I got any more? Yeah.
- 1:27:42
How do you get, in, in your workflow, to get it to code the way you want it to code, and so by the time you get to code review, it's at least familiar, uses the libraries you want it to use and-
- 1:27:52
Yeah. Um, we had this question before actually, which was like, uh, how do you, uh, enforce your coding standards on the agents, essentially? How do you get it to code how you want it to code?
- 1:28:02
Now, there's essentially two different ways of doing it. Um, you've got... Brr, brr. Come on. Push,
- 1:28:11
and you've got pull. What do I me-mean by push and pull?
- 1:28:17
Um, push is where you push instructions to the LLM. So you say, okay, if you put something in CLAUDE.md, uh, talk like a pirate, that instruction is always going to be sent to the agent, right?
- 1:28:31
So that is a push, actually. You're pushing tokens to it. Pull is where you give the agent an opportunity to pull more information. And
- 1:28:42
that's, for instance, like skills. So a skill is something that can sit in the repo, and it has a little description header that says, "Okay, agent, you may pull this when you want to."
- 1:28:53
My thinking, my current thinking about code review and about coding standards looks like this. When you have an implementer...
- 1:29:03
What's going on? There we go. Implementer. I'm gonna make this less red in a second.
- 1:29:09
Um, then you want the coding standards to be available via pull. If it has a question, you want it to be able to sort of answer it. But if you then have an automated reviewer afterwards, then you want it to push.
- 1:29:24
You wanna push that information to the reviewer. You wanna say, "These are our coding standards. Um, make sure that this code, um, follows them." So if you have skills, for instance, then you want to push that stuff to the reviewer, so the reviewer has both the code that's written and the coding standards to compare to.
- 1:29:42
Hopefully, that answers your question. I can show you an automated version of this as well, actually. Um, yeah, let's do that now, just while it's fresh in my mind.
- 1:29:50
I recently, um, spent, uh, maybe a week or so, uh, building this thing called Sandcastle. And Sandcastle is a-- I was sort of unhappy with the options out there for, um, running agents AFK.
- 1:30:07
And what this does is it's essentially a TypeScript library for running these loops. So you have, uh, a run function that creates a worktree, um, sandboxes it in a Docker container, and then allows you to run a prompt inside there.
- 1:30:23
And in that worktree then, it's just a Git branch, and you have that code, and you can then merge it later.
- 1:30:29
If I open up, um, there are some really, really nice ways of viewing this, and it essentially allows you to run these kind of automated loops and allows you to parallelize across multiple different agents really simply.
- 1:30:45
So I'll go into my Sandcastle file, go into main.ts here, and let's just walk through this.
- 1:30:51
So this is kind of like... I showed you, um, a sort of version of the Ralph loop earlier. This is where we take it from sequential into parallel.
- 1:31:01
We have here, first of all, a planner that takes in, it's has a plan prompt here, that looks at the backlog and chooses a certain number of issues to work on in parallel.
- 1:31:13
Remember I showed you that Kanban board where it had all the blocking relationships? It works out all of the phases. So this one will say, okay, uh, let's say we have, uh, you can ignore all this blue code here.
- 1:31:23
This is essentially Just a set of issues, GitHub issues, with a title and with a, a branch for you to work on. And then for each issue, we create a sandbox,
- 1:31:38
and then we run an implementer in that sandbox, passing in the issue number, issue title, and the branch. This is like the loop that we ran just before.
- 1:31:46
Then, if it created some commits, we then review those commits. This is essentially the loop.
- 1:31:53
What do we do with those commits? We pass those into a merger agent,
- 1:32:01
which takes in a merge prompt, takes in the branches that were created, takes in the issues, and it just merges them in. If there are any issues with the merge, you know, with the types and tests and that kind of thing, it solves them.
- 1:32:11
And this has been my, uh, flow for quite a while now for working on most projects. It works super, super well. And, uh, yeah, I recommend you check out Sandcastle if you want to sort of learn more.
- 1:32:23
And to answer your question properly is that in the reviewer,
- 1:32:27
uh, I would push the coding standards. In the implementer, I would allow it to pull. And I'm actually using, uh, Sonnet for implementation and Opus for, um, reviewing, 'cause I consider reviewing sort of...
- 1:32:40
I need, I need the smarts then. Any quest- actually, let, let me, uh, before we do more questions, let's go back here. Okay, where are we at? Okay.
- 1:32:53
We're sort of zooming everywhere in this, uh, talk because I'm kind of having to run things in parallel, so let's go back to the improve code base architecture. It has finally finished running, and it's found a bunch of architectural improvement candidates.
- 1:33:06
So it's got essentially a cluster of different modules that are all kind of related that could probably be tested as a unit. Got number one, the quiz scoring service.
- 1:33:15
There's some reordering logic extraction as well. It has arguments for why they're coupled, and it has a dependency category as well. So local substitutable in SQLite with in-memory test DB.
- 1:33:28
Quiz scoring service currently has zero tests. This is the biggest gap. So this is what it looks like when we come back of, uh, improve code base architecture.
- 1:33:37
Okay. So we have nominally kind of 17 minutes left. I don't know about you, but I'm knackered. [laughs]
- 1:33:47
Um, I want to... Let, let me kind of sum up for you, 'cause I think we're sort of reaching the end of our stamina. I'm gonna be available for the full time if you wanna, um, come and ask me questions.
- 1:33:59
Um, I might do one more check of the Slido, but let's kind of sum up where we've got to.
- 1:34:04
So this is essentially the flow, where throughout this whole process, we're bearing in mind the shape of our code base. This is not a spec-to-code compiler. This is not an AI that's sort of just, like, churning out code.
- 1:34:21
We are being very intentional with the kind of modules and the shape of the code base that we want. We are making sure that we are a- as aligned as possible by using the grilling session, by really hammering out our idea.
- 1:34:32
We're not over-indexing into the PRD. We're not trying to read every part of it. We're not thinking too much about it even. We're then just turning that into a set of parallelizable issues which can be worked on by agents in parallel.
- 1:34:44
We implement it, and we QA and code review the hell out of it and then keep going back to that implementation. One thing I didn't really mention is that in the QA phase, what the QA phase is for is creating more issues for that Kanban board.
- 1:34:57
So while it's implementing even, you can be QA-ing the stuff and going back, adding more issues, and the Kanban board just allows you to add blocking issues kind of, um, sort of infinitely really.
- 1:35:07
And then once that's all done, once you've got code that you're happy with, once you've got work that you're happy with, then you can share it with your team, and you can get a full review.
- 1:35:15
So this is kind of like, once you get here, this is kind of one developer or maybe a couple of developers sort of, um, managing this, and then it's kind of up to you to figure out how to merge it back in.
- 1:35:27
Of course, all of this can be customized by you. This is just something that I have found works. I'm not trying to, like, sell you on a kind of approach here.
- 1:35:37
What I recommend, if you take one thing away from this session, is that you should head back, you should head to Amazon and just buy a ton of those old books because, I mean, I just found it so enlightening reading them.
- 1:35:48
Uh, you know, pre-AI writing is always, like, a, a really fun to read anyway. [laughs] And
- 1:35:56
I just, on every single page, I found that there was something useful and something interesting to, to read. So thank you so much. Thank you for putting up with the heat.
- 1:36:04
Um, hopefully, your body temperatures will reset soon. Uh, thank you very much. [audience applauds] [upbeat music]