---
title: "How to Use Spec Driven Development | Agrim Intelligence"
description: "Spec driven development sets a written plan before an agent generates code, letting teams review architectural decisions before inspecting diffs."
source: https://agrim.ai/insights/how-to-use-spec-driven-development
---

# How to Use Spec Driven Development

By Swapnil Dubey · Published December 4, 2026 · 6-minute read

In short

Spec driven development sets a written plan before an agent generates code, letting teams review architectural decisions before inspecting diffs.

**In short:** Spec driven development for AI coding agents means writing down what a feature does, getting the plan reviewed, and only then letting the agent generate code. The guide follows that order in four stages and ends with when to skip the routine.

Spec driven development moves the architectural decision into a written specification that people approve before an AI coding agent writes code. Approving that document, not the pull request, is the gate that bounds the agent. [Enact notes](https://www.enactapp.io/blog/spec-approval-workflow-ai-coding-agents) that human engineers make architectural choices gradually over days through discussions, while an AI coding assistant resolves hundreds of structural decisions within seconds.

By the time a diff exists, those structural decisions are already made. A team that wants the agent bounded needs the review earlier, with a written plan and named owners, so the practical question is what that plan contains and who checks it.

## Stage 1: Define the specification in a spec driven development workflow

Spec driven development means a specification states what a feature does for users and what it does not do, and the agent works from it step by step. [Spec-Kit defines](https://github.com/github/spec-kit/blob/main/docs/reference/agentic-sdd.md) its core Spec-Driven Development process as an agentic process that a coding agent runs step by step, driven by slash commands.

The /speckit.specify command focuses on user-facing behavior and goals. The tech stack belongs to /speckit.plan, according to Spec-Kit's reference. We read this as a clean split: the specification holds scope, and the plan holds the how that reviewers will approve.

Vague scope is the failure to prevent here. [IBM Bob documentation](https://bob.ibm.com/docs/ide/tutorials/create-a-plan-and-implement-complex-features) says that because Bob is an autonomous agent, it fills gaps with its own assumptions when given a vague prompt, and those assumptions may not match user intent even if technically accurate. The same documentation says that answering what a feature does and does not do sets an explicit scope that prevents Bob from adding unrequested work. We would give the "does not do" list its own heading in every specification, so that reviewers have a written scope to approve.

## Stage 2: Conduct human review of the specification as the primary architectural gate

Once the scope is written down, an AI coding agent spec review has Product, Engineering and Security each review the part of the specification they own, before the agent generates any code. Enact says a specification holds three decisions that each need a named owner: Product owns functional scope, Engineering owns architecture and performance, and Security owns regulatory posture.

Enact calls the procedure a spec approval workflow: designated personnel evaluate and approve the agent's plan before code generation. Reviewing later is weaker. Enact notes that inspecting 800-line AI-created pull requests flags syntax problems but seldom reveals systemic architectural flaws or absent domain constraints. Reviewers can work from three concrete checks, each taken from a source:

- **Vague phrases.** IBM Bob's documentation tells reviewers to watch for wording like "add as needed" or "update appropriately" and to replace those unstated assumptions with specific instructions before approving a plan.
- **Named files.** The same documentation says each implementation step should identify the files it touches, rather than referencing components without filenames.
- **Rejected alternatives.** Tom Ballard, in [his article on preventing architectural drift from AI coding agents](https://asdecided.com/articles/how-to-prevent-architectural-drift-from-ai-coding-agents), writes that teams should record them, such as evaluating and rejecting direct database access from HTTP handlers. Otherwise a later agent can bring the pattern back, since it looks straightforward within a local task.

We use Ballard's HTTP handler case as an illustration of how a plan can record a decision. When the approved plan carries the rejection as written text, the next agent can meet the decision in the document instead of reintroducing the pattern. In our view, that is the practical meaning of an architectural gate: reviewers check a record of decisions, and the diff no longer has to reveal them.

## Stage 3: Generate code from the reviewed specification

With the plan approved, code generation starts from the approved specification, and approval is not repeated at every step. Ashif Anwar, in [a Computer.org item on specification-driven agentic software](https://www.computer.org/publications/tech-news/research/specification-driven-agentic-software), states that approving a specification once, before any code is written, allows uninterrupted execution and inverts the typical model where humans approve at the end.

Anwar adds that his team set a rule that the agent writing code never grades it. Test agents challenge the implementation agents and classify findings as blocker, warning or question, across up to three rounds before escalating to a human. What counts as a blocker is a decision for the people who approved the specification, and we would settle that before generation starts.

Scope what the agent receives. Ballard warns against using the repository root as the scope for every decision, because that turns routing into a full-document dump and forces one relevant rule to compete with many unrelated rules. We read this as handing each task the decisions for the part of the code it changes. In the handler example, a task touching handlers could carry the rejected database-access pattern with it. Even so, a scoped task can still wander past the plan.

## Stage 4: Handle step failures in the specification workflow

When a specification has gaps, Spec-Kit's /speckit.clarify command asks up to five targeted questions about underspecified areas and writes the answers back into spec.md before planning begins.

Planning can still miss boundaries. Ballard recommends re-routing the actual final diff, because implementation often crosses boundaries that planning failed to anticipate. We would run that check on every generated change, so a diff that touches a decision the plan never mentioned goes back to the owner of that decision.

Not every step applies to every task. Spec-Kit states that its commands are intended to execute sequentially, though only /speckit.specify must precede /speckit.plan. Beyond that one dependency, the order is an intention, so a team that skips a step should record which one and why. When the test agents' rounds run out, the finding reaches a person, under the rule Ashif Anwar describes.

## When not to use spec driven development for AI agents

Spec driven development does not rest on a speed result, so a team in a mature codebase should time its own work. The Computer.org item reports a METR randomized controlled trial in which developers took 19% longer. That figure was measured among experienced open-source developers handling real tasks within their own mature repositories when AI tools were permitted. It concerns permitted AI tools, not a specification process, and we would not read it as a verdict on either.

The strongest objection is that a written plan cannot foresee everything, which Ballard's final-diff point concedes. That moves our conclusion only partway: specification review decides structure before generation, and the diff check stays as a second line.

We would skip the full routine when a change is small enough that writing its specification takes longer than the change itself. Before adopting it for a team, we would check these points:

- Product, Engineering and Security own their decisions in the specification, as Enact lists them.
- Plans are reviewed for vague phrases and unnamed files, as the IBM Bob documentation advises.
- Rejected alternatives are written down where the next agent will find them.
- Final diffs are re-routed against the plan.
- Delivery time is measured on your own repositories.

## Frequently asked questions

### What is spec driven development for AI coding agents?

Spec driven development moves the architectural decision into a written specification that people approve before an AI coding agent writes code, and approving that document, not the pull request, is the gate that bounds the agent. Spec-Kit defines its core Spec-Driven Development process as an agentic process that a coding agent runs step by step, driven by slash commands.

### How do engineering teams review specifications before agents write code?

Designated personnel evaluate and approve the agent's plan before code generation in a spec approval workflow, as Enact describes. Reviewers watch for vague phrases like "add as needed" to replace unstated assumptions with specific instructions, confirm each step identifies the files it touches, and record rejected alternatives, as IBM Bob's documentation and Tom Ballard advise.

### Who should review agent-generated implementation plans?

Product, Engineering and Security each review the part of the specification they own, before the agent generates any code. Enact says a specification holds three decisions that each need a named owner: Product owns functional scope, Engineering owns architecture and performance, and Security owns regulatory posture.

## Sources

- [Spec-Kit reference: agentic Spec-Driven Development](https://github.com/github/spec-kit/blob/main/docs/reference/agentic-sdd.md)
- [IBM Bob documentation: create a plan and implement complex features](https://bob.ibm.com/docs/ide/tutorials/create-a-plan-and-implement-complex-features)
- [Enact: spec approval workflow for AI coding agents](https://www.enactapp.io/blog/spec-approval-workflow-ai-coding-agents)
- [Tom Ballard: how to prevent architectural drift from AI coding agents](https://asdecided.com/articles/how-to-prevent-architectural-drift-from-ai-coding-agents)
- [Computer.org: specification-driven agentic software](https://www.computer.org/publications/tech-news/research/specification-driven-agentic-software)

## About the author

**Swapnil Dubey**, Co-founder and CTO

More than a decade in engineering leadership, most recently leading a 110-engineer team at Games24x7 that built high-volume transaction systems. IIM Calcutta.

[Swapnil Dubey on LinkedIn](https://www.linkedin.com/in/swapnilkumardubey/)
