WEBVTT

NOTE Sentence-level transcript of https://www.youtube.com/watch?v=IddXPepIAS4

NOTE One cue per sentence. Cue ids are the line anchors on /transcripts/IddXPepIAS4.html. A cue ends where the next begins, or 2 s after its last word.

s1
00:00:00.000 --> 00:00:09.360
Hey everyone, my name is Eric Hanchett, and today I want to tell you guys all about spec-driven development and how you might use it in your workflows today.

s2
00:00:09.360 --> 00:00:11.160
So, there's a couple of things we want to talk about.

s3
00:00:11.160 --> 00:00:14.760
First, what is spec-driven development?

s4
00:00:14.760 --> 00:00:18.280
And then, how can it make you a better and faster coder?

s5
00:00:18.280 --> 00:00:25.600
So, we just don't want you to code faster, but we want you to actually create higher-quality code from it.

s6
00:00:25.600 --> 00:00:31.240
And I think really spec-driven development helps you with this, and I'm going to explain why and how.

s7
00:00:31.240 --> 00:00:35.280
It's a structured specifications are created before any code is written.

s8
00:00:35.280 --> 00:00:43.720
That's the definition of really the specs or the requirements of this spec-driven development, and it goes to the heart of what it is.

s9
00:00:43.720 --> 00:00:54.520
So, what we're doing is we are writing these markdown files, we're writing the specifications and the design document before any of the code is written.

s10
00:00:54.520 --> 00:00:59.640
And this actually works really, really well with large language models and our coding assistants that we use.

s11
00:00:59.640 --> 00:01:02.800
And I'm going to show you exactly how that works.

s12
00:01:02.800 --> 00:01:05.120
Now, a question I sometimes get is why?

s13
00:01:05.120 --> 00:01:11.440
Like, why should we use this spec-driven development workflow and then how can we do it?

s14
00:01:11.440 --> 00:01:22.880
So, to answer that why question, I kind of like to think about our coding assistants, our large language models that we're using every day as sort of like AI interns.

s15
00:01:22.880 --> 00:01:28.720
You need to really prompt them, you really need to push them the right way, no pun intended with the prompting.

s16
00:01:28.720 --> 00:01:31.240
So, you really need to guide them.

s17
00:01:31.240 --> 00:01:37.400
Because if you give them just a little bit of of leeway, they will go off the rails.

s18
00:01:37.400 --> 00:01:41.520
And really the spec-driven development helps guide them in the right direction.

s19
00:01:41.520 --> 00:01:49.880
I remember when I was an intern in one of my first jobs, we had a VP that would walk around and he would just come up with random ideas

s20
00:01:49.880 --> 00:01:50.800
off the top of his head.

s21
00:01:50.800 --> 00:01:54.400
And when he told me it, I would drop everything and work on it.

s22
00:01:54.400 --> 00:01:58.160
And then later my boss would be like, "Hey Eric, why did you drop everything?"

s23
00:01:58.160 --> 00:02:00.520
Well, the the VP said something.

s24
00:02:00.520 --> 00:02:09.240
And then I learned about, well, you got to take his information that he gives you, write it down, put it in your schedule, talk to me talk to my manager about it.

s25
00:02:09.240 --> 00:02:10.759
So, I was a little too eager.

s26
00:02:10.759 --> 00:02:14.880
And this is what AI interns or basically these large language models do nowadays.

s27
00:02:14.880 --> 00:02:18.080
And we got to be careful about it.

s28
00:02:18.840 --> 00:02:22.000
I didn't really give you too much of introduction, so I'll give it to you now.

s29
00:02:22.000 --> 00:02:23.320
My name is Eric Hanchett.

s30
00:02:23.320 --> 00:02:26.959
I'm a senior developer advocate at AWS.

s31
00:02:26.959 --> 00:02:31.400
I have over 15-plus years of software development experience.

s32
00:02:31.400 --> 00:02:34.760
And if you want to connect with me, you can check out LinkedIn.

s33
00:02:34.760 --> 00:02:37.880
That's probably the best place to go.

s34
00:02:37.880 --> 00:02:41.240
I just look for Eric Hanchett and yeah, talk to me, follow me.

s35
00:02:41.240 --> 00:02:44.440
I'd love to talk to you more about it.

s36
00:02:44.440 --> 00:02:53.400
Another question when I that people often ask me about spec-driven development is, "Can't the latest frontier models just do everything for us already?

s37
00:02:53.400 --> 00:02:55.080
Why do we need this?"

s38
00:02:55.080 --> 00:03:04.840
And while I do say that the models are getting better and better every year and and every release, sometimes incrementally, sometimes by leaps and bounds, it's still not perfect.

s39
00:03:04.840 --> 00:03:13.480
And giving the large language model these models more context is actually really important because it does help guide it in the right direction.

s40
00:03:13.480 --> 00:03:23.680
And with our software always changing and with the requirements always changing, and with new paradigms and shifts, you always need to kind of guide it where it needs to go.

s41
00:03:23.680 --> 00:03:34.400
Some large language models, some harnesses are starting to think more about this and adding in a little bit more of a thinking or planning mode before it jumps into when it writes code.

s42
00:03:34.400 --> 00:03:45.120
But there's nothing better than actually having those documents created and having you be in the middle before it jumps into the net that next part with it creating code.

s43
00:03:46.200 --> 00:03:49.920
So, let's keep a few things in mind before we get too far.

s44
00:03:49.920 --> 00:03:53.160
There is quite a lot of information out there.

s45
00:03:53.160 --> 00:03:54.360
I have some opinions.

s46
00:03:54.360 --> 00:03:56.160
These are my opinions.

s47
00:03:56.160 --> 00:03:57.480
Uh let me know.

s48
00:03:57.480 --> 00:04:06.280
Connect with me on LinkedIn if you agree or disagree, but I think you need to keep these in mind before using spec-driven development or vibe coding or anything in between.

s49
00:04:06.280 --> 00:04:09.040
We have to You have to be careful with context.

s50
00:04:09.040 --> 00:04:17.720
Now, I told you before that spec-driven development gives you a lot of context that gets fed into that large language model, but sometimes you have too much of a good thing.

s51
00:04:17.720 --> 00:04:27.880
Uh what you need to do is when you are working with these large language models, usually you create like an agents.md or claw.md at the beginning with some information in it.

s52
00:04:27.880 --> 00:04:32.080
I would be very careful not to put too much information or too little information in that.

s53
00:04:32.080 --> 00:04:35.200
Kind of like that Goldilocks zone of information is what you need.

s54
00:04:35.200 --> 00:04:40.919
So, you just need to give it enough rules and guidelines that it knows what to do.

s55
00:04:41.680 --> 00:04:49.000
Uh we call it steering docs in Cara, which I'll mention about in a minute, but you just got to be very careful what you put in those documents.

s56
00:04:49.800 --> 00:04:54.320
I also highly recommend when you're using spec-driven development to use skills.

s57
00:04:54.320 --> 00:05:01.160
Skills are like instruction files that you can give to your coding agents that are ran on demand.

s58
00:05:01.160 --> 00:05:10.280
So, usually they have keywords in them, and when the coding assistant sees those keywords, they'll activate the skill or you can do {slash} and the skill name and then run it.

s59
00:05:10.280 --> 00:05:13.840
But, this actually really helps when you're doing the spec-driven development process.

s60
00:05:13.840 --> 00:05:18.560
You can actually add skills um when it creates your design documents or whatever else.

s61
00:05:18.560 --> 00:05:25.680
You can use those in parallel or with the spec-driven development or when you actually implement the tasks.

s62
00:05:26.640 --> 00:05:29.760
And just be careful about giving too much trust.

s63
00:05:29.760 --> 00:05:38.680
Uh remember everything in the spec-driven development flow is you, meaning that you are the human in the loop, so to speak.

s64
00:05:38.680 --> 00:05:43.640
You need to be the code reviewer of all the code that's generated through this process.

s65
00:05:43.640 --> 00:05:56.960
You need to be interactively looking at the design documents and the requirements documents that are created because at the end of the day, if something goes wrong, you are the person that are going to be blamed for it, not the agent.

s66
00:05:58.880 --> 00:06:03.400
And uh that's not to say that we don't use tools to help do code reviews.

s67
00:06:03.400 --> 00:06:07.560
Someone once told me like, are you saying you're the human in the loop, you do the code review, no one else?

s68
00:06:07.560 --> 00:06:20.760
Of course, we might have multiple be doing people doing code reviews and definitely use your normal AI coding assistants and and review tools to help you review any pull request that you create.

s69
00:06:20.760 --> 00:06:24.200
Or CRs.

s70
00:06:25.160 --> 00:06:32.240
So, let me give you a little bit of a history lesson of where we have been, especially at AWS.

s71
00:06:32.240 --> 00:06:42.480
We uh saw this need, especially from our teams and our customers, that they were vibe coding, they were using this coding assistance, but they weren't getting the outputs that they wanted.

s72
00:06:42.480 --> 00:06:57.480
And what we saw is this these customers were using this bespoke pattern of having the agents, the coding assistants, create uh these full down requirements documents and these design documents and we decided to create

s73
00:06:57.480 --> 00:07:02.600
a application to kind of do this all for them.

s74
00:07:02.600 --> 00:07:08.720
So, we released Qiro uh early late last year in a general availability.

s75
00:07:08.720 --> 00:07:11.440
It's our new AI IDE coding assistant.

s76
00:07:11.440 --> 00:07:16.200
We also have a command line interface or CLI version, which is just as popular.

s77
00:07:16.200 --> 00:07:18.680
I think right now it's switching.

s78
00:07:18.680 --> 00:07:21.800
Most people are starting to use CLIs more often than IDEs.

s79
00:07:21.800 --> 00:07:25.400
So, if you like to do that, you can use the CLI.

s80
00:07:25.400 --> 00:07:32.240
But, what we really focused in on with Qiro is, you can see in these screenshots, is this vibe and spec mode.

s81
00:07:32.240 --> 00:07:40.960
So, we're going to jump into spec mode in a little bit, but we really thought this really encompass what we were hearing from our customers, what people wanted more

s82
00:07:40.960 --> 00:07:51.600
ways to work with larger features and more complex projects and they really needed the coding system to know exactly what their project was doing.

s83
00:07:52.280 --> 00:07:55.240
We also released the website at kiro.dev.

s84
00:07:55.240 --> 00:07:57.800
Feel free to after this presentation to go check it out.

s85
00:07:57.800 --> 00:08:04.000
You can download our CLI, our IDE, and give it a whirl cuz you know, we're really proud of it.

s86
00:08:04.000 --> 00:08:04.440
It's fun.

s87
00:08:04.440 --> 00:08:07.040
When we released this, it actually went a little bit viral.

s88
00:08:07.040 --> 00:08:08.560
We got tens of thousands of downloads.

s89
00:08:08.560 --> 00:08:23.200
A lot of people were asking us asking us about Kiro so we were really happy to to release this and we actually when we set it up in preview, we had so many downloads we had to put a gate in front of it and then people found a around the gate, but now it is publicly available for

s90
00:08:23.200 --> 00:08:27.280
everyone to try and and and give it a shot.

s91
00:08:28.160 --> 00:08:32.200
But I don't want this to be a half-hour pitch for Kiro.

s92
00:08:32.200 --> 00:08:37.360
You can do this process spec-driven development without Kiro and there's a few few ways.

s93
00:08:37.360 --> 00:08:42.680
One is that you basically have to just you can do this manually with anything.

s94
00:08:42.680 --> 00:08:47.120
You could tell the your assistant, your large language model to include the following.

s95
00:08:47.120 --> 00:08:49.600
First is the user requirements.

s96
00:08:49.600 --> 00:08:54.920
You would tell them please based on XYZ create a whole set of user requirements.

s97
00:08:54.920 --> 00:09:07.000
Now, you can feed it your own user requirements beforehand and say, okay, use this as a basis or you can have the editor or the AI IDE go ahead and create it for you.

s98
00:09:07.000 --> 00:09:09.280
Then you look back and forth and make sure it's okay.

s99
00:09:09.280 --> 00:09:14.240
Then you tell the assistant to create the design document.

s100
00:09:14.240 --> 00:09:18.360
Then you look back at that and then you have it create the implementation details.

s101
00:09:18.360 --> 00:09:25.800
These are the the tasks list, the tasks one by one to actually implement it based on the requirements and the design document you created.

s102
00:09:25.800 --> 00:09:30.320
So you could do this kind of a manual way if you like.

s103
00:09:30.760 --> 00:09:32.160
I'll give a shout-out to Spec It.

s104
00:09:32.160 --> 00:09:36.040
This is GitHub's open source way of doing this process.

s105
00:09:36.040 --> 00:09:40.600
You can install it in a variety of different coding assistants.

s106
00:09:41.720 --> 00:09:45.120
Now, in Kiro, you have this lab This is the IDE version.

s107
00:09:45.120 --> 00:09:51.800
We have plan mode inside the CLI if you prefer the CLI, but in the IDE you would choose spec.

s108
00:09:51.800 --> 00:09:54.040
And then you would go ahead and give it a prompt.

s109
00:09:54.040 --> 00:10:01.680
So, in this case I could say like build a movie MCP server to keep track of movies I've watched or build an a movie website, whatever you want.

s110
00:10:01.680 --> 00:10:07.760
Now, you're probably thinking is this spec only good for greenfield brand new projects?

s111
00:10:07.760 --> 00:10:09.120
And I would say absolutely not.

s112
00:10:09.120 --> 00:10:16.360
I've seen existing apps that are years old have dozens and dozens of these different spec files in them.

s113
00:10:16.360 --> 00:10:22.320
And this example, it's kind of more of a greenfield, but you can definitely use it for existing legacy projects as well.

s114
00:10:22.320 --> 00:10:24.960
It thinks it works very well.

s115
00:10:24.960 --> 00:10:35.280
And I would just say that these are really good for when you're doing in-depth features, when you need your project needs a little more upfront planning, uh and you just want to build things in a structured way.

s116
00:10:35.280 --> 00:10:38.840
For definitely works really well with complex projects.

s117
00:10:38.840 --> 00:10:41.760
We actually added a spec mode for bug fixes, too.

s118
00:10:41.760 --> 00:10:48.160
So, you can use it for smaller things, though you may want to just kind of vibe code those things instead.

s119
00:10:49.240 --> 00:10:52.200
Here's what our requirements document looks like.

s120
00:10:52.200 --> 00:11:01.320
So, in the first part it creates this uh requirements phase where it's in this ears format and it gives you the introduction, like the requirements, the user stories.

s121
00:11:01.320 --> 00:11:05.000
Uh we also have a process where it asks you questions beforehand.

s122
00:11:05.000 --> 00:11:08.400
And so, we added in some extra question and answer.

s123
00:11:08.400 --> 00:11:14.160
So, as you put your prompt in, it'll ask you some clarifying questions before it creates this requirements phase.

s124
00:11:14.160 --> 00:11:23.160
You can also do this quick plan mode we just added, which uh will go ahead and just generate all these documents quickly for you based on the questions and answers you give.

s125
00:11:23.160 --> 00:11:26.320
So, there's a lot of different ways you can do this.

s126
00:11:26.320 --> 00:11:29.400
Then you'll create a design document, which is a higher-level design document.

s127
00:11:29.400 --> 00:11:31.640
You can also start with the design document first.

s128
00:11:31.640 --> 00:11:35.040
Some people kind of take this design and requirements, combine them.

s129
00:11:35.040 --> 00:11:40.160
But typically with with our spec-driven development flow, you can either start one or the other.

s130
00:11:40.160 --> 00:11:44.880
And then you might have mermaid diagrams here, ASCII art with all the information.

s131
00:11:44.880 --> 00:11:54.520
Now, this is at the point I would highly recommend, if you're trying this at home, to stop and go in and update it with your knowledge and expertise and taste

s132
00:11:54.520 --> 00:11:56.600
to exactly what you're looking for.

s133
00:11:56.600 --> 00:11:59.520
Because it's only as good as what you put in.

s134
00:11:59.520 --> 00:12:07.080
But you'll find out that it even with a smaller prompt it and with the clarifying questions, it does a pretty good job.

s135
00:12:07.200 --> 00:12:13.520
And course you always want to review it for markdown the markdown files for inconsistencies, hallucinations, and errors.

s136
00:12:13.520 --> 00:12:15.320
And then finally you get to the implementation phase.

s137
00:12:15.320 --> 00:12:18.560
This will be a list of tasks.

s138
00:12:18.560 --> 00:12:26.080
Uh it also has something called property-based tests in them, which are tests that are against the requirements document and design document.

s139
00:12:26.080 --> 00:12:29.120
You can additionally have those created and ran.

s140
00:12:29.120 --> 00:12:35.800
I would highly recommend it, so that way it makes sure that the the tasks actually are implemented correctly.

s141
00:12:35.800 --> 00:12:46.560
I usually also, uh quick tip here, once it creates this task list, I tell it, "Please take the top four tasks, put them at the top, and create an MVP for me first."

s142
00:12:46.560 --> 00:12:48.560
So that way I can actually see it working.

s143
00:12:48.560 --> 00:12:54.120
And then I'll implement them I'll implement the MVP version first.

s144
00:12:55.720 --> 00:12:57.640
Now, I love model context protocol.

s145
00:12:57.640 --> 00:13:05.480
I'm not going to go into exactly all the details of it, but it's a way essentially for your model providers to connect to different data sources.

s146
00:13:05.480 --> 00:13:14.240
So, in this case, I'm using Kiro, and maybe I'm using like OpenAI or Anthropic, and we want to connect to different data sources.

s147
00:13:14.240 --> 00:13:22.680
So, we have this MCP protocol in the middle, and it connects everything together for us, which is awesome.

s148
00:13:23.000 --> 00:13:27.800
Now, I get this question, "Isn't MCP 6 months old and it's dead now?"

s149
00:13:27.800 --> 00:13:38.120
Now, a lot of people on the internet have opinions that change every other day, and some people were saying that, well, you can do a lot of stuff with MCP just with command line tools.

s150
00:13:38.120 --> 00:13:39.960
I really think MCP is still maturing.

s151
00:13:39.960 --> 00:13:46.480
There's a lot uh a long road ahead for it, especially with some of the security stuff it's doing.

s152
00:13:46.480 --> 00:13:56.080
I would keep an eye out for MCP, but one of the main reasons I like it, especially for the Spec Driven Development Flow, is you can have something like in Jira or Asana,

s153
00:13:56.080 --> 00:14:08.280
all your tickets, all your uh large requirements docs, and then you can have it being pulled into your Spec Driven Development Flow when it creates your specs, which makes it much easier to work with.

s154
00:14:08.280 --> 00:14:15.360
So, if you have a product manager that has actually written a requirements document, you can pull that in.

s155
00:14:16.120 --> 00:14:17.720
And uh it just makes a little bit easier.

s156
00:14:17.720 --> 00:14:21.640
And I'm I'm talking about any any kind of project management service.

s157
00:14:21.640 --> 00:14:25.160
And grab technical details for it.

s158
00:14:25.160 --> 00:14:35.800
You can also put additional rules in your steering or your agents.md files that tells it, so if you're using Spec Driven Development Flow, make sure you grab the information out of this MCP server.

s159
00:14:35.800 --> 00:14:37.240
And that way it knows where to look.

s160
00:14:37.240 --> 00:14:43.880
Or you can just specify it in the first step, like, "Hey, look at this MCP server when you create the requirements."

s161
00:14:45.800 --> 00:14:47.960
So, let me show you a quick demo.

s162
00:14:47.960 --> 00:14:53.640
This is the latest version of Kiro, the IDE version.

s163
00:14:53.640 --> 00:14:56.000
And let me give you a a quick show of it.

s164
00:14:56.000 --> 00:15:03.839
Now, just for the sake of time, I don't have time to actually go in and create a brand new project from scratch, but I used this one.

s165
00:15:03.839 --> 00:15:05.320
It's a movie database.

s166
00:15:05.320 --> 00:15:09.560
So, this is more of a green field, brand new project, but I think you'll still get the idea.

s167
00:15:09.560 --> 00:15:10.640
I was in the spec mode here.

s168
00:15:10.640 --> 00:15:14.320
I said, "Please create me a movie website."

s169
00:15:14.320 --> 00:15:17.240
So, what it did is it started with this design document.

s170
00:15:17.240 --> 00:15:21.520
And this case In this case, I actually told it to start with design instead of requirements.

s171
00:15:21.520 --> 00:15:27.240
And then this shows the actual preview of the markdown file.

s172
00:15:27.240 --> 00:15:32.400
So you can see it created a bunch of different mermaid diagrams that show the architecture of it.

s173
00:15:32.400 --> 00:15:33.800
Gives you sequence diagrams.

s174
00:15:33.800 --> 00:15:39.080
And so I went back and forth with this and updated and edited and it created this all for me.

s175
00:15:39.080 --> 00:15:47.280
If I scroll down to the bottom of this document it created, you can see here it created a bunch of property test tests.

s176
00:15:47.280 --> 00:15:48.760
And these are really special tests.

s177
00:15:48.760 --> 00:15:58.920
It uses fast check in this TypeScript in the node world to do these tests which actually run dozens if not hundreds of times with different values to make sure that

s178
00:15:58.920 --> 00:16:04.080
it's uh these requirements are satisfied correctly, which is really nice.

s179
00:16:04.080 --> 00:16:12.320
And then it created this requirements document in once again this EARS format, so it's really uh very simple with these user stories, requirements.

s180
00:16:12.320 --> 00:16:14.680
Uh let me see if I can open it up again.

s181
00:16:14.680 --> 00:16:16.320
Here's it in preview.

s182
00:16:16.320 --> 00:16:18.480
Uh so here's the requirements document.

s183
00:16:18.480 --> 00:16:20.480
Requirements one, movie data loading.

s184
00:16:20.480 --> 00:16:23.040
When the application initialize, the filter engine shall load.

s185
00:16:23.040 --> 00:16:29.080
So it kind of gives you step-by-step exactly what's uh what it's doing here.

s186
00:16:29.080 --> 00:16:35.080
And then when I went back and forth with this, I got to the task list and I asked it, "Hey, in the task list, can we create like an MVP?"

s187
00:16:35.080 --> 00:16:45.280
So it went ahead and updated the task list and even says right here, "Task one through four deliver a working MVP, browsable movie grid with search, genre filtering, sorting,

s188
00:16:45.280 --> 00:16:47.400
and the full 80s synthwave theme."

s189
00:16:47.400 --> 00:16:56.920
So it actually redid all the requirements and to get this uh basically MVP up and running out of the door, which I really enjoyed.

s190
00:16:56.920 --> 00:17:01.040
I went ahead and just implemented all of them after that, but you could see how it works.

s191
00:17:01.040 --> 00:17:08.400
You can also see it created this property paste based tests, which are nice which I can go back in and take a look at the execution.

s192
00:17:08.400 --> 00:17:11.720
You can also, let me see if I scroll to the bottom here.

s193
00:17:11.720 --> 00:17:12.480
Here it is.

s194
00:17:12.480 --> 00:17:18.439
So if I just kind of hover, it shows like a little bit of information about the property-based test.

s195
00:17:18.439 --> 00:17:26.199
Like with property test test for genre filtering for any movie data set and if the extracted genre list must contain exactly a sorted set of unique genre.

s196
00:17:26.199 --> 00:17:28.280
So, it tells me exactly what it did at this point.

s197
00:17:28.280 --> 00:17:34.360
So, if you want to learn more, you can go to kiro.dev or you can join our Discord at discord.gg/kiro.dev.

s198
00:17:34.360 --> 00:17:40.640
I highly recommend everyone watching check it out and make sure you connect with me on LinkedIn at Eric Hanchett.

s199
00:17:40.640 --> 00:17:47.760
Love to just connect with as many people as I can and also on Blue Sky at Eric C H or X. Thanks.
