Spec-driven development is a way of working with AI coding tools where the AI writes down what it is going to build, and how, before it writes any code.
You agree a spec, then a plan, and only then does the code start. It is slower to get going than prompting and hoping, and it produces software that does what you meant far more often.
Vibe coding and its limits
The usual way to build with an AI assistant is to describe the app in a sentence and let it start typing. That is vibe coding: you steer by feel, look at what appears, and prompt again when something is off.
For a small script or a throwaway prototype, that works well. On anything bigger, the cracks show:
- The AI fills every gap with a guess. 'Build me a habit tracker' says nothing about accounts or what happens when you miss a day, so the model picks something for each. Some guesses match what you wanted and some don't.
- Nobody knows why it works. Features appear, some run and some fail, and there is no record of what was decided or why.
- Fixes collide. Each follow-up prompt patches one thing, often by undoing a choice an earlier prompt made, and the code drifts away from any single design.
The model is being asked to make dozens of product and design decisions with no input from you, then judged on whether it read your mind.
How spec-driven development works
Spec-driven development moves those decisions to the front, where they are cheap to change. The workflow has five steps.
1. Say what you want
Instead of 'build me an app', you describe the features, the rules and the goals: who uses it, what they can do and what must never happen. It can be rough, as long as it is specific.
2. The AI writes a spec
The AI turns your description into a document. A good spec covers:
Wondering how this was made? How we make these