A navy blueprint on a desk with glowing gold lines rising off the paper into a three-dimensional golden structure
← All guides

The 2027 Series · Building

Spec-driven development: say it clearly, build it right

AI writes code fast, but only builds what you clearly describe. What spec-driven development is, what a great spec contains, when to edit it, and how to keep it healthy.

8 min read Building
By NextGenOra Editorial TeamResearched from primary sources, linked below

AI can now write software faster than any team in history. That has exposed an old truth: the hard part was never typing the code. It was knowing exactly what to build. Give an AI a vague request and it fills the gaps with guesses, quickly and confidently. Spec-driven development flips the order. You write down what you want, clearly, before anything gets built, and that document becomes the source of truth for people and AI alike. Here's what it is, how to do it well, when to change the spec, and how to keep it healthy.

Key takeaways

  • A spec is a clear, written description of what to build and why, including how you'll know it's done. It's not a long prompt and it's not a 50-page binder.
  • Spec-driven development makes the spec the source of truth. Code, tests and AI instructions all trace back to it.
  • The golden rule for changes: when what the product should do changes, update the spec first, then the code.
  • Match the rigor to the job. A one-line fix doesn't need a spec. A new feature, a long-lived product or a regulated system does.

What spec-driven development is

A specification, or spec, describes what a piece of software should do: who it's for, what problem it solves, how it should behave and what "done" looks like. Spec-driven development (SDD) is the practice of writing that spec first and treating it as the single source of truth while the software is designed, built, tested and changed.

The idea isn't new. Engineers have written requirements documents, API contracts and test scenarios for decades. What's new is the reason it suddenly matters to everyone: AI coding agents. In 2025, GitHub released an open-source toolkit for spec-driven development, Amazon launched Kiro, a coding tool built around specs, and Thoughtworks added the technique to its Technology Radar as one worth assessing. By 2027 it's a standard conversation in any team building with AI.

Vibe coding asks the AI to guess what you mean. Spec-driven development tells it.

Why it matters more in the age of AI

A human developer who gets a vague request will usually ask questions. An AI agent often won't. It fills every gap with a plausible assumption and keeps going. That's how you end up with an app that looks finished but handles refunds the wrong way, forgets about users on slow connections, or quietly ignores a rule your business can't break.

Without a spec

Fast, then slow

A demo appears in hours. Then come weeks of "that's not what I meant", rework and surprises.

With a spec

Slower start, faster finish

An hour or two of clear thinking up front, then the AI and the team build the right thing the first time far more often.

Bonus

Shared memory

Months later, anyone (or any AI) can read why the product works the way it does.

A January 2026 technical report on SDD argues the approach adds the most value for AI-assisted work, complex requirements, long-lived systems with several maintainers, and regulated industries, and that it can be overkill for throwaway prototypes and quick experiments.

Three levels of commitment

Writing in late 2025, Thoughtworks' Birgitta Böckeler described three levels of spec-driven development. They're a useful way to decide how far to go.

LevelWhat happens to the specBest for
Spec-firstWritten before building, then set aside once the feature shipsOne-off features, small projects
Spec-anchoredKept and updated as the product evolves, and used for every changeMost real products, and the sweet spot for most teams
Spec-as-sourcePeople edit only the spec, and code is regenerated from itNarrow, well-tooled areas. Still experimental for typical apps

Most teams start spec-first. The real payoff comes from spec-anchored work, where the spec stays alive for the whole life of the product.

What a great spec contains

A great spec is short enough to read in one sitting and precise enough that two different builders would produce roughly the same thing. These sections cover most products:

  1. The goal and the why. One or two sentences on the problem and who has it. "Busy clinic managers lose hours each week chasing appointment confirmations."
  2. Users and their key journeys. Who uses it and the handful of things they must be able to do, written as short user stories.
  3. Acceptance criteria. Testable statements of "done". A popular format is Given / When / Then: Given a patient hasn't confirmed, when it's 24 hours before the appointment, then they receive one reminder by text.
  4. Scope and non-goals. What's in, and just as important, what's deliberately out for now. Non-goals stop scope creep and stop AI from "helpfully" building extras.
  5. Rules and constraints. Business rules, privacy and security requirements, accessibility, performance and brand guidelines. GitHub's toolkit calls a project's always-true principles its "constitution".
  6. Edge cases. Empty states, errors, cancellations, time zones, duplicate submissions: the places where software usually breaks.
  7. Open questions and decisions. What's still undecided, and a short log of decisions made and why.
Keep "what" separate from "how". The spec says what the product must do and why. Technical choices, like which database or framework, belong in a separate plan. That way you can change the how without rewriting the what.

The workflow

SpecifyWrite the goal, users, acceptance criteria, scope and rules.
PlanDecide the technical approach that will satisfy the spec.
Break downSplit the plan into small tasks, each traceable to the spec.
BuildPeople and AI build in small increments, checking as they go.
ValidateTest against the acceptance criteria. Fix the code, or fix the spec.

The loop matters: validation sometimes shows the code is wrong, and sometimes shows the spec was.

How to write a spec well

When to edit the spec

This is where most teams go wrong. Either the spec is never touched again and slowly becomes fiction, or it's rewritten on every whim and nobody trusts it. A simple rule solves most of it: if a change affects what the product does or why, it goes in the spec first. If it only affects how it's built, it doesn't.

SituationEdit the spec?Why
A new feature or a change in behaviorYes, before buildingThe spec defines what "correct" now means
Users or the client change their mindYes, and log the decisionFuture readers need to know why it changed
Building reveals a gap or a contradictionYes, then continueThe spec was incomplete. Fix the source, not just the symptom
A bug shows a case nobody thought ofYes, add an acceptance criterionSo it's tested forever after
A new law, policy or brand ruleYes, in the rules sectionConstraints apply to every future change
Switching a library or refactoring codeNo, update the planBehavior doesn't change, only the how
Fixing a typo or a one-line bugNoNot worth the ceremony

Code that disagrees with the spec is a bug. A spec that disagrees with reality is a bigger one.

How to keep a spec in top shape

  1. Store it next to the code. Keep specs in the same repository as the software, with version history, so every change to behavior and every change to the spec can be seen together.
  2. Review spec changes like code changes. A change to the spec deserves a second pair of eyes, just as a code change does.
  3. Give it an owner. One person is responsible for the spec making sense as a whole, even if many people contribute.
  4. Link it to tests. Each acceptance criterion should map to an automated test or a clear check. Then drift shows up as a failing test, not a surprise in production (see how to tell if AI works).
  5. Keep a short decision log. One line per decision: what, why, when. It answers "why does it work like this?" months later.
  6. Prune regularly. Delete what no longer applies. A spec full of outdated sections is worse than a short one.
  7. Watch for spec debt. Warning signs: people say "ignore that part of the spec", the AI keeps getting a feature wrong, or new teammates can't use it to understand the product.

Common traps

SpecA written description of what software should do, for whom and how "done" is judged.
SDDSpec-driven development: building and changing software with the spec as the source of truth.
Acceptance criteriaTestable statements that define when a requirement is met.
Given / When / ThenA format for acceptance criteria: a starting situation, an action, an expected result.
Non-goalsThings deliberately left out of scope.
Vibe codingBuilding by loosely prompting AI and accepting what it produces, without a clear spec.

Have an idea that needs a clear plan?

NextGenOra's experts help turn your idea into a clear spec, with goals, user journeys and what "done" looks like, then build it with you. Bring us your idea.

Talk to an expert

Frequently asked questions

What is spec-driven development?

Spec-driven development is a way of building software where a clear written specification of what to build, for whom and how success is judged comes first, and stays the source of truth for people and AI coding tools throughout the build and every later change.

How is spec-driven development different from vibe coding?

Vibe coding means loosely prompting an AI and accepting what it produces. Spec-driven development defines requirements, acceptance criteria and constraints first, so the AI builds to a clear target and the result can be checked against it.

When should you update a software spec?

Update the spec before changing code whenever what the product does or why changes: new features, changed requirements, gaps discovered while building, bugs that reveal missing cases, and new rules. Purely technical changes like refactoring belong in the technical plan instead.

Is spec-driven development worth it for small projects?

For quick prototypes and tiny fixes, a light approach is usually enough: a short goal, a few acceptance criteria and a list of non-goals. The fuller process pays off for real products, long-lived systems, teams and regulated domains.

Sources

  1. Birgitta Böckeler, martinfowler.com, Understanding Spec-Driven-Development: Kiro, spec-kit, and Tessl (October 2025).
  2. GitHub Blog, Spec-driven development with AI: Get started with a new open source toolkit (September 2025).
  3. Thoughtworks Technology Radar, Spec-driven development (November 2025).
  4. D. B. Piskala, arXiv, Spec-Driven Development: From Code to Contract in the Age of AI Coding Assistants (January 2026).

Turn these ideas into your product.

We build what we write about. Tell us your idea and a NextGenOra expert will reply within 24 hours.