Spec driven development: what it is and when it is worth it

Spec-Driven Development in Sentia

Spec driven development (SDD) is a way of building software with AI coding agents where a written specification comes first: the spec says how a feature should behave, the agent writes code to match it, and engineers check the result against the spec and its tests. It pays off for well understood features and costly business rules, and gets in the way on small fixes.

Sentia specialises in test driven development, and our delivery is agentic first: AI assisted, supervised by senior engineers. This guide explains what spec driven development is, where it came from, when it is worth the effort and the criticisms worth taking seriously.

What is spec driven development?

The term is still settling. Birgitta Böckeler, a Distinguished Engineer at Thoughtworks, describes it as writing a spec before writing code with AI, so the spec becomes the source of truth for both the human and the AI. The Thoughtworks Technology Radar describes workflows that start with a structured functional specification and then break it down, step by step, into smaller pieces and tasks.

A spec is different from the general context an agent reads in every session. Böckeler separates specs from the rules files that apply across a whole codebase: rules matter in every coding session, while a spec only matters to the work that creates or changes one feature. A file such as AGENTS.md, which sets coding standards and project structure, is context. A document that says how cancellation fees are calculated is a spec.

Where it came from

Writing down expected behaviour before writing code is not new. Kent Beck set out test driven development (TDD) in his 2003 book on the subject: write a failing test that defines the behaviour you want, then write the code that makes it pass.

Dan North introduced behaviour driven development (BDD) in the mid 2000s, with the given, when, then format he developed with Chris Matts. BDD moved the focus from tests to examples that describe how an application should behave, written in language the business can read.

Spec driven development keeps that idea and changes the reader. The spec is written in natural language for an AI agent, which generates the code, and tests still do the checking.

The trigger was the speed of AI coding. Liu Shangqi, a technology director at Thoughtworks, argues that vibe coding is too fast, spontaneous and haphazard, and that because convincing prototypes are so easy to generate, people skip sound engineering practices and end up with unmaintainable, one off code. That is the problem our vibe coding review exists for, and our engineers have written about AI tools ignoring a framework's conventions in Cursor is breaking your Rails migrations. A written spec and clear rules files give an agent less room to guess.

Both approaches use the same AI agent, so the difference is easiest to see in where the checks happen.

Comparison of a vibe coding prompt and retry loop with a six step spec driven development workflow, showing where people review the spec and code and where acceptance tests run

In the spec driven loop, a person and a test both stand between the agent's output and the codebase. That is why the size and quality of the spec matter so much.

The three levels of spec driven development

Böckeler identifies three levels.

Level

What happens to the spec

Who edits the code

Status

Spec first

Written before the work, used for that task, then left behind

People and AI

Shared by every approach Böckeler reviewed

Spec anchored

Kept after the task and updated as the feature changes

People and AI

An aim for some tools, often left vague in practice

Spec as source

The spec is the main file people edit, and code is generated from it

AI only

Explored by few tools and still experimental

Böckeler found that the plan for maintaining specs over time was often vague, even in tools that aimed beyond spec first. For most teams, spec first is where to start. Spec anchored suits the parts of a system where behaviour must stay exactly right.

What goes in a good spec

A good spec describes what the software must do in terms someone can check:

  • What the feature is for

  • The inputs and outputs

  • The rules, with clear boundaries

  • The edge cases

  • What is out of scope

  • Acceptance criteria written as given, when, then examples

It leaves the technical approach to the rules files, unless a constraint matters for this one feature. Here is a short example for a booking platform:

Each rule has an exact boundary, so a cancellation at exactly 48 or 24 hours has one answer. Each acceptance criterion can become an automated test, and the out of scope list stops the agent building things nobody asked for.

Spec, scoping document, user story and tests

These documents overlap, which confuses teams new to SDD. Each does a different job.

Document

Answers

Main reader

When it is written

Scoping document

What are we building, for whom and why?

Business stakeholders and the delivery team

Before a project starts

User story

What does one type of user need, and why?

Product owner and team

When planning work

Spec

Exactly how should this feature behave?

AI coding agent and the reviewing engineer

Before the feature is built

Rules file

How should code in this project be written?

AI coding agent

Once per project, then maintained

Tests

Does the software behave as specified?

The build pipeline

With or before the code

A scoping document sits upstream of everything else. Our guide on how to write a scoping document covers that stage.

When spec driven development is worth it

The size and clarity of the work decide whether a spec helps or gets in the way.

The work

What fits

A small bug or tweak with an obvious fix

A clear prompt and a failing test. A spec adds overhead without benefit.

A medium feature whose behaviour is well understood

A short spec first document, one page or less, with rules, acceptance criteria and an out of scope list

A large feature that is still unclear

Discovery first: talk to users, prototype and agree the scope. Then write specs one slice at a time.

A change to existing code

Describe and test the current behaviour first, then specify the change

Business rules where errors are costly, such as payments, permissions or eligibility

Spec anchored, with tests that keep the spec and code in step

The small fix case is not theoretical. When Böckeler asked one SDD tool to fix a small bug, it turned the bug into four user stories with sixteen acceptance criteria, which she compared to using a sledgehammer to crack a nut.

Existing systems are where the method can earn its keep. The Thoughtworks Radar's April 2026 entry on GitHub Spec Kit notes that much rework in brownfield systems comes from unclear intent, hidden assumptions and late discovery of constraints, and reports a team that used a spec, plan, tasks, coding and review sequence to surface those issues earlier.

How we use it at Sentia

Agentic first is how we deliver, not only a service we sell: AI assisted delivery, supervised by senior engineers. Spec driven development fits the way we already work:

  • Behaviour agreed first. Acceptance criteria are what we review against with clients during user acceptance testing, as our approach explains, so they are written before the work, not after.

  • Tests decide. We specialise in test driven development, so the expected behaviour is captured in automated tests that the code, however it was written, has to pass.

  • Engineers own the result. Senior engineers supervise the AI assisted work and are accountable for what ships, in the same way as for code written by hand.

The same discipline sits behind our AI development work for clients, where the checks and the point where a person takes over are designed before anything goes live.

The criticisms, taken seriously

Spec driven development has sceptics, and several of their objections come from engineers who have tested the tools on real projects. Most can be managed by keeping specs short and reviews in place.

Is it waterfall again?

Liu Shangqi argues it is not: waterfall's problem was long feedback loops, while SDD aims for shorter, more effective loops than unstructured AI coding allows. That holds only if specs stay small. A spec that tries to describe a whole product up front brings the old problem back.

Review overload

Böckeler found that one tool produced so many repetitive markdown files that she would rather have reviewed the code. Teams quoted in the Radar reported verbose markdown output too, and limiting the number of generated files helped.

A false sense of control

A long spec does not guarantee the agent reads all of it. Böckeler saw agents ignore instructions, and also saw them follow some instructions too eagerly. Tests and human review still decide whether the code is right.

Rules that keep growing

Teams reported agent instructions that kept growing until they degraded the agent's results; one team kept instructions lean by loading detailed guidance only when it was needed. In November 2025, the Radar warned that handcrafting detailed rules for AI ultimately does not scale.

Who benefits most

Thoughtworks observed that experienced engineers with strong clean coding and architectural practices get the most value from spec driven workflows. SDD amplifies good engineering judgement and depends on it.

Keeping specs from drifting

A spec that no longer matches the code can be worse than no spec, because people trust it. Four habits keep them in step:

  • Turn acceptance criteria into automated tests, so the build fails when spec and code diverge.

  • Store specs in the repository next to the code, and change them in the same pull request.

  • Delete or archive spec first documents once the feature ships, unless you have decided to keep that feature spec anchored.

  • Record lasting technical decisions separately, for example in short architecture decision records, so specs stay about behaviour.

What it means if you are commissioning software

If an agency or internal team builds software for you with AI tools, spec driven development raises the value of your input. The most useful things you can provide are the business rules, real examples, the edge cases you already know about and a clear list of what is out of scope. These go straight into specs and acceptance criteria, and reviewing a one page spec before a feature is built is a far better use of your time than finding a misunderstanding in a demo.

When you compare development partners, ask:

  • How do you write acceptance criteria?

  • Where do specs and rules files live, and are they in our repository?

  • Who reviews AI generated code before it merges?

For more questions to ask, see how to choose a custom software development company.

Frequently asked questions

Do you need a dedicated tool for spec driven development?
No. A spec can be a markdown file in your repository, read by whichever coding agent your team uses. Frameworks such as GitHub Spec Kit and OpenSpec structure the workflow, and the Thoughtworks Radar lists both. Tools in this space change quickly, so choose the habit first and the tool second.
Is a spec just a long prompt?
No. A prompt is a one off instruction in a chat. A spec is a document that is versioned, reviewed by a person, linked to tests and readable by the next engineer or agent who touches the feature.
Who should write the spec in a small team?
The person closest to the problem should draft the behaviour: the rules, examples and edge cases. That may be a product owner or the client. An engineer then adds the constraints that matter for that feature, and both agree the acceptance criteria before any code is generated. If one person writes and approves the spec alone, the review step that makes SDD useful disappears.
Does spec driven development make software cheaper?
It can reduce rework, because misunderstandings surface in a one page spec rather than in a demo. Writing and reviewing specs takes time too, so the saving depends on the work. Sentia estimates every project individually after a free scoping.