Benefits of Spec-Driven Development for AI Coding Agents
Hand a coding agent a one-line ticket and it will fill the silence with its own opinions. Spec-driven development fixes that by making you write the intent down first: a user story, acceptance criteria and constraints, in a file the agent reads before it touches code. For product managers it is the cheapest way to steer an agent, because you review a page instead of a diff. Below are five benefits, a template you can copy, and the cases where you should skip it.
Spec-driven development with AI in one paragraph
The loop is spec, plan, tasks, code. GitHub Spec Kit is an open-source toolkit that walks an agent through it, and Kiro generates requirements.md, design.md and tasks.md for each feature. You don't need either: a markdown file in the repo gets you most of the benefit. If you want the tooling, Spec Kit starts like this:
uv tool install specify-cli
specify init invoices-app --integration copilot
cd invoices-app
This needs Python 3.11+ and uv. Swap copilot for the integration key of your agent. Then, in the agent's chat, run /speckit-specify with your feature description, followed by /speckit-plan, /speckit-tasks and /speckit-implement. Invocation syntax can differ between agents, so check the integrations reference linked from the repo. Standing project rules belong in /speckit-constitution (or an AGENTS.md); the spec covers one change.
A spec template for product managers to copy
This is the smallest version that still earns its keep. Each section answers a question the agent would otherwise guess at.
# Spec: CSV export for the invoices page
## Why
Finance copies invoice rows into spreadsheets by hand every month.
## User story
As a finance analyst, I want to download the filtered invoice list as CSV,
so that I can reconcile it in a spreadsheet.
## Acceptance criteria
1. Given a filtered invoice list, when I click "Export CSV", then the file
contains only the rows matching the filter.
2. Given any export, then the columns are Invoice ID, Customer, Amount,
Issued date and Status, in that order, and internal notes are never included.
3. Given an empty list, then the "Export CSV" button is disabled.
4. Given a successful export, then the file is named invoices-YYYY-MM-DD.csv.
## Constraints
- Reuse the existing `formatDate` helper. Do not modify it.
- No new dependencies.
- Change only files under `src/invoices/`.
## Out of scope
PDF export, scheduled exports, a column picker.
## Open questions
- Which delimiter for locales that use a comma as the decimal separator?
Ask before implementing.
## Done when
Every criterion has a test, and the existing test suite passes.
Two sections do the heavy lifting: Out of scope and Open questions. Tell the agent to stop and ask about anything under Open questions before it writes code.
Before and after: one ticket, two outcomes
Here is a typical case, illustrative rather than measured. The ticket says "Add CSV export to the invoices page." The agent exports every column including internal notes, ignores the active filter, adds a CSV library, and tweaks the shared date formatter so the file looks nicer. The reviewer finds all four problems in the diff and sends it back.
With the spec above, the same agent has little left to guess. Review becomes ticking off four criteria, confirming a test exists for each, and checking that the diff stays inside src/invoices/.
Five benefits of writing the spec first
1. You review intent, not only code. A spec is a page. Catching "export every column" there costs one comment; catching it in a diff costs a rewrite and a second review.
2. Output is checked against criteria, not vibes. Each Given/When/Then maps to one test, so "done" becomes a list a reviewer can tick. Kiro uses the same idea with EARS-style lines such as WHEN a user submits a form with invalid data THE SYSTEM SHALL display validation errors next to the relevant fields (Kiro feature specs). Still run the tests yourself: Martin Fowler's hands-on look at Kiro and Spec Kit saw agents ignore some instructions and follow others too eagerly.
3. Scope creep drops. Agents fill gaps with extras. An Out of scope list and a constraint such as "no new dependencies" turn a quiet addition into a visible violation.
4. Fewer rework loops. Open questions force ambiguous decisions, like the CSV delimiter, to the surface before any code exists. They then cost one chat message instead of a re-run.
5. A durable record of why. Commit the spec with the pull request. Six months later, "why does the export have five fixed columns?" has an answer in the repo. Fowler calls keeping the spec after the task spec-anchored.
When spec-driven development is not worth it
Skip the ceremony for tiny fixes: a typo, a renamed variable, a one-line config change. The spec would be longer than the diff. If you can state the change and its check in one sentence, put that sentence in the pull request description and move on.
The heavy tooling has costs too. Thoughtworks put spec-driven development in the Assess ring of its Radar and found the workflows elaborate and opinionated, with some generating long spec files that are hard to review. In Fowler's test, Kiro turned a small bug into 4 user stories with 16 acceptance criteria, which he compared to using a sledgehammer to crack a nut. Keep specs short, or nobody will read them.
An agent in production work needs a written definition of done, and the spec is the cheapest place for a product manager to write it.