Spec-Driven Development: what it is and why I rolled it out across my team

How writing the spec before the code cut rework, sharpened reviews, and made shipping predictable for my team.

By Hamza Ghouri

Most teams I've worked on default to the same loop: read a ticket, start coding, discover halfway through that the requirements were ambiguous, guess, and then relitigate the guess in code review. The cost isn't the typing — it's the rework. Spec-Driven Development (SDD) is the practice I rolled out across my team to attack that cost directly, by moving the hard thinking to before anyone writes implementation code.

What SDD actually means

The idea is simple: the spec comes first, and the spec is a real artifact. Before implementation starts, we write down what we're building — the behavior, the inputs and outputs, the edge cases, the data shape, and the acceptance criteria. Not a novel, and not a vague paragraph in a ticket. A focused document that someone other than the author could implement from.

That document then drives everything downstream. The implementation is judged against the spec. The review checks the spec. The tests assert the spec. When something is ambiguous, we resolve it in the spec — in plain language, cheaply — instead of discovering the ambiguity three files deep into a pull request.

Why I pushed for it

I introduced SDD because, as a team lead, I was spending too much review time on a frustrating category of comment: "this works, but it's not what we needed." Those are the most expensive comments to act on, because the answer is usually "rewrite it." Every one of them traces back to a decision that was never made explicit before coding began.

Writing the spec first front-loads those decisions to the cheapest possible moment. Changing a sentence costs minutes. Changing a built feature costs days. SDD is, at its core, a bet that thinking is cheaper than rewriting — and at scale that bet pays off consistently.

What changed in practice

Reviews got faster and sharper. When a reviewer has the spec, code review stops being a debate about intent and becomes a check: does this match what we agreed? Disagreements about what to build move up to the spec stage, where they belong, instead of clogging the diff.

Onboarding got easier. A new engineer handed a clear spec can be productive immediately. They don't need every piece of tribal context in their head; the document carries it.

Estimates got more honest. It's hard to estimate a vague ticket. It's much easier to estimate a feature whose edge cases are already written down. The act of writing the spec surfaces the hidden complexity that usually ambushes you mid-sprint.

Less thrash. Fewer features got built twice. That's the whole game.

How to roll it out without bureaucracy

The failure mode of any process is that it becomes ceremony — documents nobody reads, written to satisfy a checkbox. I kept SDD lightweight on purpose:

  • Right-size the spec. A one-line bug fix doesn't need a spec. A new endpoint or a feature touching multiple systems does. Match the effort to the risk.
  • Keep specs living. When reality diverges from the spec, the spec gets updated. A stale spec is worse than none, because it lies.
  • Make it a gate, not a suggestion. Implementation review references the spec. If there's no spec for something that needed one, that's the first review comment.

The underlying principle

SDD isn't really about documents. It's about deciding what "done" means before you start, so that "done" is something you can verify instead of argue about. For a team trying to ship predictably, that shift — from coding-as-discovery to coding-as-execution — is the whole point. It made my team faster not by making us type faster, but by making us redo work far less often.

Want this kind of work on your product?

Get in touch