Mhonn YbañezSRE, DevOps, AI Engineer
 Today I Learned
Read the full page

What is spec driven development?

Posted
Tags
ai, agents, career

Spec driven development makes a written spec the main artifact and has an AI agent build from it. The spec says what and why, including any technical choices already fixed by the environment. The plan covers the open design choices, and the tracker breaks the work into checkable steps. It shifts an engineer's effort from writing code to designing and verifying.

I first heard about spec driven development in an IBM YouTube video. It sounded like a different way of working with coding agents, so I dug in. After my posts on harness engineering and agentic vs harness engineering, this is the next step: how a person should actually brief an agent.

The question I had

What is spec driven development?

What I found

The term is loose and there is no single standard definition, so this is the common shape as I understand it.

The short version

Spec driven development (SDD) means a written specification is the main artifact, and the AI builds from it. The spec is what I review and argue about, instead of the code. It exists because "vibe coding" with an agent tends to drift: the agent guesses at anything I didn't say, and each prompt can contradict the last.

The flow

  1. Specify: what the system should do and why, plus acceptance criteria.
  2. Plan: the technical approach, such as architecture, stack, data model, and interfaces.
  3. Tasks: small, ordered steps that can each be checked.
  4. Implement: the agent works through the tasks.
  5. Iterate: if behavior needs to change, I update the spec first, then the code.

A few tools are built around this, like GitHub Spec Kit, Kiro, and Tessl. They change fast, so I'm not going to describe them in detail.

Spec versus plan

I first assumed the spec should stay free of technology, and that the "how" belongs in the plan. I don't fully accept that. Specific technical choices can go in the spec, especially when they fit the existing environment and architecture. If a project already runs on a given stack, database, or cluster, saying so in the spec stops the agent from inventing something that doesn't fit.

The rule of thumb I landed on: a technical choice goes in the spec when it is already decided, because it fits what exists or because something outside depends on it. If the choice is open and the agent can reasonably pick, it goes in the plan.

ItemGoes inWhy
Screens and user flowsSpecIt's the visible behavior of the product
Business rules ("deleting a user deletes their posts")SpecIt's a rule, not a mechanism
Performance, security, accessibility targetsSpecThey're requirements
Stack, database, or cluster already in use ("use the existing Postgres")SpecIt fits the environment, and the agent shouldn't pick another
Schema or API that others depend onSpecIt's a contract
Architecture the new feature must fit intoSpecIt's an existing constraint
New internal design (tables, components, file layout)PlanAn open choice the agent can propose and I can review
Tech stack that applies to every featureA standing docWritten once, inherited by every spec

The boundary is fuzzy. When I'm unsure, I ask whether it would be wrong for the agent to choose differently. If yes, it goes in the spec. If it's an open choice, it goes in the plan, where I can review it before any code is written.

Spec versus PRD

They overlap, and a spec is often a small slice of a PRD. A PRD argues why a product should exist: users, goals, priorities. A spec says exactly how one feature should behave, in a way that can be verified. A PRD can be vague because humans fill the gaps in conversation. A spec for an agent can't be vague, because the agent fills gaps with guesses. For a small project, a spec with a one-line goal is usually enough.

Documents to prepare for agentic coding

For full agentic coding, I need more than a spec. These are the documents I'd prepare, in three groups.

Standing context (written once, updated rarely)

DocumentWhat it holds
CLAUDE.mdTech stack, commands to build, test, and lint, coding conventions, repo layout, rules ("never touch X"), and what counts as done
Architecture overviewComponents, how they connect, data flow, and the key decisions and why
Product briefThe problem, the users, the goals, and what is out of scope, so the agent knows the why
GlossaryTerms with exact meanings, so the agent doesn't invent its own vocabulary
Design guidelinesTokens, components, tone, and accessibility rules (or a link to the design file)

Per feature (the spec driven core)

DocumentWhat it holds
SpecBehavior, user flows, business rules, edge cases, acceptance criteria, and technical choices already fixed by the environment
PlanThe technical approach, new design choices, files to touch, risks, and open questions
TrackerSmall, ordered steps, each tied to an acceptance criterion and ticked off as it is done

These three can live in one file as separate sections.

Verification assets

AssetWhat it is for
Acceptance criteria or testsThe agent's target and my checklist
A way to run checksBuild, tests, and lint commands the agent can run itself and read the failures from
Sample dataRealistic inputs for tests and manual checks
Reference materialAPI docs, contract files, and existing code to imitate, linked from the plan

What helps most is letting the agent verify its own work. If it can run the tests and see failures, it needs much less of my attention.

Where my epiphany came in

I started with the picture that SDD is just handing a document to the AI and verifying at the end. That is close, but not quite right. The handoff is not one document, and I don't only check at the end. I review the spec first (is this the right behavior?), then the plan (is this a sensible way to build it?), and only then the result. Catching a wrong decision in the plan costs minutes. Catching it after the code is written costs a rewrite.

The other half is that the acceptance criteria are what make the final check easy. If the spec says exactly what "done" looks like, my verification becomes a checklist instead of a vibe check.

Takeaway

Agentic coding is here to stay, and I think engineers should spend more of their effort on design than on writing code. Writing a clear spec, choosing a sensible plan, and checking the result is the work that is left, and it is a lot. SDD is a structure for doing that on purpose. It is still overkill for tiny fixes, and some people criticize it as waterfall in new clothes. Keeping each spec small and per feature is how I'd avoid that.