Skip to content
Agentic coding

Spec-driven development: the shift-left engineers should embrace

Write down intent, requirements and constraints before your coding agent starts, version them like code, and you get fewer review cycles and a record of why the system is the way it is.

What is spec-driven development?

Spec-driven development is the practice of generating structured documentation about intent, requirements and constraints, plus a light process for producing it, all before you put your coding agent to work. The specs are version-controlled and, like code, can be refactored over time. Used well, they record both the current and the earlier intended behaviour of the system. That second point matters most in complex projects, and I’ll come back to it.

Why bother with specs?

Coding agents get a reference to verify against. Review agents get a durable blueprint to critique. People get documentation of how the system was assembled, feature by feature. Read the spec, rather than reverse-engineer it from the code.

My broader thesis is that agentic coding frees engineers to spend more time on design and specification. Software engineering is one of the few engineering disciplines left where the same person is the architect, the structural engineer and the bricklayer, at least it was before Claude Code. Most of us want to be the architect. Spec-driven development is exactly the shift-left work engineers should be embracing now.

Where it pays off

I’ve used this practice extensively over the past 12 months, especially where precise contracts and consistency matter, such as APIs and event-driven systems.

How I split my time

I spend the first fifth of my time questioning and refining the problem statement before I reach for the repository. Then about half goes on the spec and design. None goes on prompting the agent to implement, beyond typing /openspec:apply. The rest is review: 15% on the code and 15% on pull request cycles.

Where the hours go on a spec-driven changeShare of my time, from problem statement to merged pull request

What changes in code review?

I’ve seen fewer review cycles on pull requests. In general the implementation and tests are more accurate, and review agents that understand the intent find more defects and missed edge cases. I also hope colleagues, who use agents of their own to explore a codebase, feel more confident making changes when they start from a durable record of behaviour. I’ll let them be the judge of that.

Git blame for system design

Versioned specs have a fringe benefit. Agents are quick to use git history to see when and how requirements changed. That has been particularly useful for debugging and fixing defects, and for spotting where a new feature conflicts with an old one, or where an idea had already been considered and dropped.

Which framework should you use?

GitHub Spec Kit is the obvious choice. I’ve used OpenSpec almost exclusively, which I’ve found the right blend of a not-too-rigid process with most of the advertised benefits. Superpowers is worth a look too, though I found it a bit too focused on process and agent skills for my liking.

Have you tried spec-driven development? I’d like to hear how it has gone for you, good or bad.

Questions

Where does spec-driven development pay off most?

In my experience, where precise contracts and consistency matter, such as APIs and event-driven systems.

What’s the difference between a spec and a prompt?

A spec is version-controlled and, like code, can be refactored over time, so it records the current and earlier intended behaviour of the system. A prompt to implement is a single command once the spec exists.

Which spec-driven development framework should I use?

GitHub Spec Kit is the obvious choice. I’ve used OpenSpec almost exclusively for the past year because it balances a light process with most of the advertised benefits.

Want to talk about what this means for your team? Book a call.