Intro
- With all the new AI tools and agents available I’ve been trying to find the most efficient way to program
- One major breakthrough was realizing how important task requirements were before letting an LLM try to build something
- I started writing and prompting more and more docs before even starting to write/generate code
- Then saw the term spec-driven development pop up and that is what has taken over
What is Spec Driven Development
- A document or set of documents that define the feature from a functionality, limitations, requirements and implementation details
- Good to have code snippets and types created in the spec
- Has completion criterion (When is this feature considered done?)
- Would not have full code implementations, just smaller snippets with mix of code and pseudo code
- Entire IDE’s are now being adjusted and developed to support this. Ex. Amazon’s Kiro (https://kiro.dev/)
Why Spec Driven Development Works Well With LLMs
- Lowers hallucinations by fixing inputs/outputs (schemas, examples)
- Improves prompt compression (shorter, clearer context = cheaper, faster)
- Enables automated evals (acceptance criteria ⇢ tests ⇢ pass/fail gates)
- Supports parallelization (split spec into small, independent contracts)
- Easier handoffs (humans review spec; LLMs implement; repeat)
Example Spec
Dark Mode Toggle (Example Spec)
What’s next?
- Use the specs to creation implementation documents
- typically break the docs up by feature and keep each scope small
- these docs will include todo’s and more detailed implementation startegies and code snippets for implementing the feature
- Either implement the feature yourself or use these docs to prompt the LLM to begin implementation step by step while reviewing the todo’s it has tackled and hasn’t
- Giving the LLM very strict scopes and smaller chunks to work on will give it a much high chance at success
- You can also figure out which parts can be done in parallel once you create all the implementation docs and kick off multiple agents at once working on seperate features
- Have the LLMs create tests first for even more accurate output
How to support the show
Patreon
Prices subject to change and are listed in USD
- Support the show from as little as ~$1/month
- Get a shoutout at the end of the episode (while supplies last) for just ~$3/month
- Help support the HTML All The Things Podcast: Click Here
Scrimba Discount - Coding Courses!
Learn to code using Scrimba with their interactive follow-along code editor.
Join their exclusive discord communities and network to find your first job!
Use our affiliate link for a 20% discount!!
- Click the link to take you to the Scrimba site
- A pop-up should appear on your screen with the discount amount and instructions on how to claim it
- Discount is for new accounts only
We receive a monetary kickback if you use our affiliate link and make a purchase.