# Spec-driven development

> Spec-Driven Development: What It Is and Where QA Fits. Canonical page: <https://zapple.tech/glossary/spec-driven-development/>

Spec-driven development is a way of building software in which a written specification, not the code, is the main artifact. You write the spec first, then an AI coding tool generates a plan, code and tests from it. In our view the spec needs a reviewer, and the code needs tests that do not come from the same spec.

## What is spec-driven development?

Spec-driven development (SDD) is a way of building software in which a written specification is the main artifact and the code follows from it. A [Microsoft for Developers post](https://developer.microsoft.com/blog/spec-driven-development-ai-native-engineering/) describes it as a "spec-first approach": teams define "guardrails, requirements, constraints, acceptance criteria, and edge cases up front, then use AI to generate code, tests, and supporting artifacts from that shared context".

The decision this page helps with is where a spec fits in your process and who checks it. An [arXiv paper from January 2026](https://arxiv.org/abs/2602.00180) separates three levels: spec-first, where the spec guides the first build and may then drift; spec-anchored, where it is kept alongside the code and tests enforce the alignment; and spec-as-source, where people edit only the spec. When a vendor says "spec-driven", ask which level it means.

## How is spec-driven development different from TDD, BDD and specification by example?

All four put something in writing before the code. They differ in what is written, by whom, and what checks the result. The table is our summary.

| Approach | Written first | Who writes it | What is generated | What verifies the result |
|:--|:--|:--|:--|:--|
| [Test-driven development](/blog/test-automation-frameworks/what-is-test-driven-development/) | A failing unit test | The developer | Nothing; the developer writes the code | The unit tests |
| [Behavior-driven development](/blog/types-of-automation-testing/what-is-behaviour-driven-development/) | Examples in plain language | Business, developers and testers together | Test automation linked to the examples | The examples run as tests |
| Specification by example | Concrete examples of behavior | Business, developers and testers together | Living documentation and acceptance tests | The examples, run against the system |
| Spec-driven development | A written spec: requirements, design, tasks | A person, alone or with AI help | A plan, code and tests, by an AI tool | Depends on the team; see below |

Cucumber's [BDD documentation](https://cucumber.io/docs/bdd/) says BDD produces "system documentation that is automatically checked against the system's behaviour". Gojko Adzic wrote up specification by example in [his book of that name](https://gojko.net/books/specification-by-example/). Look at the last cell of the table. In the older approaches a check is built in. In spec-driven development it is a choice you make.

## Is spec-driven development worth it for your team, and for which kind of work?

Our rule of thumb: the more people, the longer the life and the more AI involved, the more a spec pays back. The arXiv paper gives a similar test. It says SDD adds value when "using AI coding assistants", for complex requirements and for systems with multiple maintainers. It also lists where it "may be overkill": throwaway prototypes, solo short-lived projects, and exploratory coding, where early specifying can constrain learning.

The Microsoft post adds a limit from practice: "Not every change needs the full lifecycle", so adoption should be right-sized. If you are choosing a first area, pick a feature with unclear requirements and several people touching it, not a prototype. A [quality gate](/glossary/quality-gate/) in your pipeline then decides whether the generated code ships. The [AI QA adoption](/services/ai-qa-adoption/) service is the matching one.

## What goes into a spec for an AI coding agent?

Requirements, constraints, acceptance criteria and edge cases, as the Microsoft post lists them. Kiro's [documentation on specs](https://kiro.dev/docs/specs/) shows one concrete layout: a requirements file with "user stories, acceptance criteria, or bug analysis", a design file for architecture and sequence diagrams, and a tasks file with trackable tasks. GitHub's [Spec Kit](https://github.com/github/spec-kit) runs a similar flow from a project constitution through specify, plan, tasks and implement.

Two of those inputs are ones a tester already writes. In our reading, good [acceptance criteria](/glossary/acceptance-criteria/) are the part of the spec you can turn into checks, and a [requirements traceability matrix](/glossary/requirements-traceability-matrix/) shows which spec items have a test. In our view an unclear spec produces unclear code quickly. That is the same problem as with [vibe coding](/glossary/vibe-coding/), only better organized.

## Who reviews the spec, and who tests that the code matches it?

Our view: two different people, and neither is the AI tool. Someone with product knowledge reviews the spec, because that is where intent is decided. Someone with test knowledge checks that each requirement can be verified, and writes or reviews tests that do not come from the generated code. Spec Kit's own flow, which asks you to run the steps "one at a time, reviewing each result before continuing", puts a person at each step.

Where services talk to each other, a [contract test](/glossary/contract-testing/) checks the implementation against an API spec, independently of the code. For AI-written code that reaches review, our [AI code review checklist](/blog/types-of-automation-testing/ai-code-review-checklist/) lists what to look at. Our [guide to acceptance test-driven development](/blog/types-of-automation-testing/what-is-acceptance-test-driven-development/) shows how testers and business can agree on examples before any AI is involved.

## What does spec-driven development not solve?

In our view a spec the AI follows exactly can still be the wrong spec. Tests generated from the same spec check the code against that spec, so an error in the spec passes every one of them. A tool does not remove ambiguity either. The Microsoft post says the quality of the outcome is closely tied to the quality of the spec. Independent tests and a person who challenges the spec remain your safeguards.

## What does Zapple.Tech do about it?

If you are moving to spec-first work and want to know where your tests and release process stand, start with the evidence. Zapple.Tech starts with a one-week QA audit of one product area. It looks at its tests, pipeline and release process, and ends in a written report on what is at risk and what to fix first, plus a pilot plan you can run with Zapple.Tech or without it. Read more on the [QA audit and assessment](/services/audit-and-assessment/) page.

Tell us about your product in the form below.

## FAQ

### What is spec-driven development?

Spec-driven development is a way of building software where a written specification is the main artifact and code is generated or checked against it. A Microsoft for Developers post describes teams defining requirements, constraints, acceptance criteria and edge cases up front, then using AI to generate code, tests and supporting artifacts from that shared context.

### How is spec-driven development different from TDD and BDD?

TDD starts from a failing unit test and BDD starts from shared examples in plain language. Spec-driven development starts from a written spec that an AI tool turns into a plan and code. An arXiv paper notes that spec-first thinking is not new, and that TDD and BDD have advocated it for years.

### What goes into a spec for an AI coding agent?

Requirements, constraints, acceptance criteria and edge cases. Kiro's documentation, for example, describes a spec as three files: requirements with user stories and acceptance criteria, a design document, and a task list.

### Does spec-driven development replace testing?

No. A spec says what the software should do. Tests show whether it does. Our view is that tests written independently of the spec, and a person who challenges the spec itself, are still needed.

### What tools support spec-driven development?

Vendors document spec workflows. GitHub publishes the open-source Spec Kit and Kiro documents its specs feature. Cucumber documents the older, example-based form. This answer lists documentation, not a ranking.

## Sources

- [arXiv 2602.00180, Spec-Driven Development: From Code to Contract in the Age of AI Coding Assistants (submitted 30 January 2026)](https://arxiv.org/abs/2602.00180)
- [Microsoft for Developers, Spec-Driven Development: A Spec-First Approach to AI-Native Engineering (10 June 2026)](https://developer.microsoft.com/blog/spec-driven-development-ai-native-engineering/)
- [Kiro documentation, Specs (page updated 15 November 2026)](https://kiro.dev/docs/specs/)
- [GitHub Spec Kit, README (current)](https://github.com/github/spec-kit)
- [Cucumber documentation, Behaviour-Driven Development (current docs)](https://cucumber.io/docs/bdd/)
- [Gojko Adzic, Specification by Example (originator's book page; read 2026-12-06)](https://gojko.net/books/specification-by-example/)
