Guide

Spec-driven development: what it is and how it works

Spec-driven development is a way of building software where you write a clear spec for each feature before any code is generated. The AI builds against that spec instead of guessing from a chat, and every later change goes through the spec first, so the plan and the app stay in step.

Why spec-driven development matters now

AI can write code fast. The problem shows up as an app grows. When the only record of what you want lives in a chat, the AI starts mixing up rules: it applies old decisions, misses new ones and changes things nobody asked it to change. Hand the project to a teammate and the context has to be rebuilt from scratch.

Spec-driven development fixes this by making the plan the source of truth. The spec holds the rules, the AI follows them, and anyone on the team can read what is being built and why.

How spec-driven development works

  1. Step 1

    Write the spec

    Describe each feature: who uses it, what it does, its rules, edge cases and how it connects to the rest of the app.

  2. Step 2

    Review and approve it

    The team checks the spec before any code exists, when changes are cheapest.

  3. Step 3

    Build against the spec

    Designs and code are generated to follow the spec, not a loose prompt.

  4. Step 4

    Change through the spec

    Update the spec first. Only the parts that change affects are rebuilt.

Spec-driven development vs vibe coding

Vibe coding compared with spec-driven development, row by row
What you compareVibe codingSpec-driven development
Starting pointA chat promptA written spec
Source of truthThe conversationThe spec
As the app growsThe AI drifts from earlier decisionsEvery change follows the spec
Working as a teamContext lives in one person's chatEveryone works from the same spec
Reviewing decisionsBuried in generated codeWritten down before it's built
Best forQuick prototypes and experimentsApps a team has to deliver and keep changing

See a spec for your own idea in about 7 seconds.

Generate my PRD & plan

What goes in a good spec

A useful spec has two readings of the same feature.

For whoever signs off

  • Summary and who uses it
  • What changes in the app
  • User flows
  • Error states and edge cases

For whoever builds and tests it

  • Business rules and acceptance criteria
  • Permissions by role
  • Data model and API endpoints
  • Technical notes

Requirements that apply to the whole product, such as security, privacy and accessibility standards, belong in the spec too, so they are built in from the start instead of added later.

Static spec files vs a living spec

Many teams start by writing context files by hand, such as AGENTS.md, CLAUDE.md or Cursor rules, or by using a spec toolkit. These help, but static files go stale the moment the project changes, and someone has to keep them current.

A living spec stays current on its own. In OneSpark, our agentic system continually updates the spec as features are added, removed or reshaped, and your team approves every change before anything is rebuilt.

A feature's Living Spec in OneSpark, with the product view open on the user flows
Spec change ready for review2 screens and 1 endpoint followApprove

One spec for your whole technical team

Most AI tools are built for one person in one chat. Spec-driven development pays off most when the whole team works from the same spec, end to end.

  • Product managers

    Write and approve the plan, and see exactly what is being built.

  • Designers

    Every screen and state comes from the spec, in your brand.

  • Engineers

    Code is built against each feature's rules, data model and API contract.

  • QA

    Test against the acceptance criteria already written in the spec.

In OneSpark, all four work in one workspace, from plan and design through build, test and publish. Compliance requirements such as HIPAA, SOC 2 and GDPR are written into the spec from day one, and the PRD, architecture and test strategy stay current as the project changes.

Spec-driven development tools

  • GitHub Spec Kit

    An open-source toolkit for writing specs, plans and tasks that AI coding assistants then follow.

  • Kiro

    An AI development environment that turns prompts into requirements, design and task specs.

  • OpenSpec

    A lightweight open-source workflow for keeping specs alongside your code.

  • OneSpark

    A spec-driven AI app builder where your PM, designer, engineers and QA work from one Living Spec, end to end, and our agentic system continually updates it.

Frequently asked questions

Writing a clear spec for each feature before code is generated, so the AI builds against it instead of guessing. Every change goes through the spec first.

Get started

Start your first spec-driven project.

Describe your idea or paste a brief. Get your PRD and plan in about 7 seconds.

Start building free