AI & prompting

Spec Driven Development With AI: What It Is and How to Start

Spec driven development with AI means you write a specification of what the software should do before an AI coding agent writes any code, and the agent then plans, breaks down and implements work against that spec. The spec, not the chat history, becomes the source of truth you review.

The term is still loose and tools disagree on details. This article describes the common workflow, shows what two real tools (GitHub Spec Kit and Kiro) produce, and covers where the approach costs more than it returns. Tool details are as of November 2026 and change quickly.

What is spec driven development?

The Spec Kit README describes it in one line: define what to build and why, then turn the specification into a plan, tasks, and working code. Compare that with the usual way of working with a coding agent, where you type a request, read the result, and correct it in a long conversation. The requirements live in the chat and disappear when the session ends.

In spec driven development the requirements live in files. You and the agent agree on them first. Every later step refers back to them, and you can review a short document instead of a large diff.

Martin Fowler separates three levels of commitment to the spec:

  • Spec-first: a spec guides the task at hand, then is set aside.
  • Spec-anchored: the spec is kept and updated to maintain the feature over time.
  • Spec-as-source: humans edit only the spec, and code is generated from it.

His assessment is that most spec driven approaches today are spec-first, and few aim at the other two.

The basic workflow

Different tools use different names, but the sequence is the same:

  1. Requirements. Describe the behavior: who uses the feature, what they can do, and how you will know it works. Leave out the technology.
  2. Design or plan. Choose the architecture, libraries and data shapes that satisfy the requirements.
  3. Tasks. Split the plan into small, ordered, checkable steps.
  4. Implementation. The agent works through the tasks, ideally one at a time, and you review each result against the requirements.

The value is in the checkpoints between steps. A wrong assumption is cheaper to fix in a half-page requirements file than after the agent has written 20 files.

How GitHub Spec Kit does it

Spec Kit is a command-line tool that sets up a project for a supported AI coding agent. According to its README, it needs Python 3.11 or newer and uv. The README's quick start is:

uv tool install specify-cli
specify init my-project --integration copilot
cd my-project

You then run slash commands in your agent's chat, one at a time. The README lists these:

CommandWhat it does
/speckit-constitutionCreates the project's principles, once per project. The README's example asks for principles on code quality, testing and maintainability.
/speckit-specifyWrites the specification from a description of what to build.
/speckit-planCreates the technical plan, such as the stack to use.
/speckit-tasksBreaks the plan into tasks.
/speckit-implementBuilds the feature from the tasks.
/speckit-convergeChecks the result. You repeat implement and converge until it reports Converged.

The constitution is written once and the remaining steps repeat for each feature. Command names and the install flow have changed between releases, so check the current README before copying these. The README also says you need a supported agent and points to an integrations page for the list. The syntax shown above is the one used for GitHub Copilot; other agents invoke commands in their own way.

How Kiro does it

Kiro, an AI IDE, builds the same idea into the editor. Its documentation describes specs as structured artifacts that formalize the development process for features and bug fixes. Each spec produces three files:

  • requirements.md holds user stories and acceptance criteria. For bug fixes the file is bugfix.md instead, describing current, expected and unchanged behavior.
  • design.md documents the technical architecture, sequence diagrams and implementation considerations.
  • tasks.md is the implementation plan, split into discrete tasks. Their status updates as the work proceeds, and you can run tasks one at a time or all at once.

Fowler's write-up adds that Kiro's acceptance criteria use a GIVEN/WHEN/THEN form and that its reusable project context is called "steering".

Write a spec by hand

You do not need either tool to try the idea. Create three markdown files in a feature folder and give the agent one at a time. A minimal requirements file looks like this (example content):

# Feature: CSV export

## Behavior
- A signed-in user can export their invoices as a CSV file.
- The file has one row per invoice, with a header row.
- Exporting more than 10,000 rows shows a message instead of starting the download.

## Acceptance criteria
- GIVEN a user with 3 invoices, WHEN they click Export, THEN the file has 4 lines.
- GIVEN a user with no invoices, WHEN they click Export, THEN the file has only the header.

## Out of scope
- Scheduled exports, other file formats.

Notice that it says nothing about frameworks. Ask the agent to propose a plan, read it, and correct it before any code exists. Then ask for a task list where each task can be checked on its own, for example by running a named test. The "out of scope" section is worth keeping because agents tend to add features nobody asked for.

Good specs share a few traits: they are specific enough to test, they list what is excluded, and they stay short enough that you actually read them. Pair this with the habits in how to write a good prompt, since each step is still a prompt to the model.

Where spec driven development falls short

Fowler tried Kiro and Spec Kit and reported several problems. These are his observations, not universal facts:

  • One workflow for every size. Kiro turned a small bug into four user stories with 16 acceptance criteria. Spec Kit felt like overkill for a mid-sized feature.
  • Review burden. Spec Kit generated many repetitive markdown files that were tedious to review. He would rather review code.
  • A false sense of control. Agents sometimes ignored instructions, such as duplicating a class that already existed, or applied them too eagerly. A detailed spec does not guarantee compliance.
  • Unclear boundary between functional and technical detail. It is hard to know when a spec should stay about behavior and when it should include design.
  • Existing codebases. Two of the three tools were harder to introduce into code that already exists than into a new project.

He also raises a concern about spec-as-source: it may combine the inflexibility of older model-driven development with the non-determinism of language models.

When to use it

The approach pays off when a change is large enough that a wrong assumption would be expensive, when more than one person must agree on behavior, or when you will hand the work to an agent for a long unattended run. For those cases a reviewed spec is a cheap safeguard. A long-running agent that has no spec will fill gaps with guesses; see what is an AI agent for why agents behave that way.

Skip the full workflow for small fixes, exploratory prototypes and anything you can state in two sentences. A short prompt, a quick look at the diff and a test run is less overhead than three documents.

If the agent ignores the spec

Point it at the specific requirement by name and ask it to explain which task the code belongs to. Keep the task list small so each change is reviewable. If the same mistake repeats, add a line to your project principles (the constitution in Spec Kit, or steering in Kiro) so the rule applies to every session. Finally, run the tests that correspond to your acceptance criteria yourself rather than relying on the agent's statement that it is done.

Frequently asked questions

Is spec driven development the same as writing a detailed prompt?
No, though the terms get mixed up. A spec is a structured, behavior-oriented document that you keep in the repository and review, while a prompt is a one-off instruction. Martin Fowler notes that some people use 'spec' as a synonym for 'detailed prompt', which is part of why the term is vague.
Do I need GitHub Spec Kit or Kiro to do spec driven development?
No. Both tools automate a workflow that you can follow by hand with three markdown files: what to build, how to build it, and a task list. The tools add commands, templates and tracking around that idea.
What is the difference between spec-first, spec-anchored and spec-as-source?
Spec-first means a spec guides one task and is then set aside. Spec-anchored means the spec is kept and updated as the feature evolves. Spec-as-source means humans edit only the spec and the code is generated from it. Fowler observes that most current tools are spec-first.
Is spec driven development worth it for small changes?
Usually not. Fowler reports that Kiro turned a small bug into four user stories with 16 acceptance criteria, which is far more review than the fix needed. For a change you can describe in a sentence or two, a normal prompt is faster.

Sources