Exercise 3: PRD to Issues — Vertical Slices and Tracer Bullets
All right. So we have our PR which I'm not going to read a kind of destination document. Let's quickly scan for any good questions before we zoom ahead. And rediscovering the role of software engineer in today's world. Top three disciplines you recommend. Um, taekwondo is good. I've heard I' have no idea how to answer this question. Um, thank you for asking it though. Um, top three disciplines I recommend. I mean, sorry, plumbing. Plumbing is a good one. Yeah. Yeah. Yeah. I don't know if that's a discipline. The plumbers I've hired are not usually very disciplined.
Um, right. So, okay, we now have our destination. Okay. Um, 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 dump zone? 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." 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 I like creating a canban board out of this.
Raise your hand if you don't know what a canban board is. Cool. Okay. A camon board is essentially just a set of tickets that you put on the wall that have blocking relationships to each other. So, we're going to see what it kind of looks like here. 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 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. 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. 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. And then this one here is blocked by all of the tasks. Cool.
H. 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? Why do I need to be involved here? Right? Because 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? Now, my take here is that this is really cheap to do, like very quick to do once I've done the PR. And I can immediately see some issues here. There's a really, really important technique when you're kind of figuring out what the shape of this journey should look like. And it sort of comes to this very classic idea uh which comes from pragmatic programmer called tracer bullets or vertical slices.
And traceable. It's really transformed the way I think about actually 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. 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. Or within these deployable units, you might have different layers within those. In for instance the codebase that we're working in, we have a ton of different services servers. We have a quiz service, a team service, user service, coupon service, course service. And these services have dependencies on each other. So they're kind of like individual layers.
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. 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. 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. (audience: "Have the whole feedback loop.") 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're not until you get to phase three, you're not actually testing that all the layers work together. 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. 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.
So what this means to me is inside the PRD to issues skill up here I have got break a PRD into independently grabbable issues using vertical slices traceable it's written as local markdown files we first locate the PRD uh again explore the codebase if this is a fresh session we draft vertical slices so we break the PRD into tracer bullet issues a traceable bullet by the way is Uh, essentially when you're like an anti-aircraft gunner, it's quite a violent idea actually, uh, and you're looking up in the sky and it's night, if you're just shooting normal bullets, you have no idea what you're firing at, right? You could just be, you know, you see the plane, but you don't see where your bullets are going. Tracer bullets is they attach a tiny bit of phosphoresence 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. 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 because without that the AI is kind of coding blind until it reaches the later phases.
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 I've told it to do vertical slices, it's proposing to create the gamification service first on its own. 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. 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. Does that make sense? Okay. So I'm going to give the AI a rollicking. Uh bad boy. No, I'm not going to 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? And I think having that um what I really like about going back to those old books is that we are really trying to in this day and age like get uh verbalize best software practices in English. And these books, 20-year-old books have already done that. And it's an absolute gold mine if you want to throw that into prompts. But even with that, it's not going to um not going to do a perfect job each time.
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 going to see something visible at the end and the AI will then just be able to add to that. You see why that's preferable to the first one. Cool. Uh, looks great. So, we're getting closer now. And anyone following at home as well, you're not at home, but you get the idea. um we'll hopefully see the same thing too and start developing the same instincts.