Spec-Driven Development: Write the Spec First
A quick first try passed 1 of 7 spec rules; code written to the spec passed 7 of 7.
Video #180 ยท AI coding and productivity
Steps in the video
- 0:00 A quick first try passed 1 of 7 spec rules. Written to the spec, 7 of 7.
- 0:29 The idea
- 1:08 Setup
- 1:29 The spec
- 2:13 Read the spec
- 2:24 Each rule becomes a check
- 2:45 A quick first try
- 2:56 Written to the spec
- 3:19 Run it
- 3:54 What this does not show
- 4:34 Mistakes to avoid
- 5:19 My take and next steps
- 5:58 Recap
Files
- check.py (22 lines)
- first_try.py (5 lines)
- run.py (14 lines)
- slug.py (15 lines)
- spec.txt (12 lines)
Tested with
Python 3.12.15
What this does not show
Both versions of the function are hand-written for this video; no assistant wrote any code, so this does not test how well an assistant follows a spec.
Sources
Learning IT by Example.