Run End-to-End Tests from Your Terminal with Kane CLI

Author and Run Tests Right from the Terminal in Natural Language, with an Evidence-Backed Pass or Fail from a Real Browser.

npm install -g @testmuai/kane-cli

AITesting

Spec Driven Development: Specs AI Agents Can Build From

What spec-driven development is, how Spec Kit, Kiro, OpenSpec and BMAD run it, what makes a spec buildable, and where the approach breaks down.

Last Updated on:

Spec-driven development is a way of building software where a written specification, not the prompt or the code, is the source of truth. You describe what the software must do and why, an AI coding agent turns that spec into a technical plan and a task list, and then builds from the tasks. Tools such as GitHub Spec Kit, Kiro and OpenSpec structure this loop.

An agent can now produce a thousand lines of working code from a paragraph of description. The bottleneck moved: the hard part is no longer writing the code, it is stating precisely enough what the code was supposed to do, and then proving that what came back matches.

Spec-driven development is the practice built around that shift. This guide from TestMu AI (formerly LambdaTest) covers what it actually requires, how the tooling workflow runs, what separates a spec an agent can build from off a wishlist, and the verification half that most teams adopt second or not at all.

TL;DR

Spec-driven development (SDD) is a development method in which a structured spec of requirements and acceptance criteria, kept in the repository, drives what an AI coding agent plans and builds. A change starts with an edit to the spec, the agent rebuilds the plan, tasks and code from it, and tests traced to each criterion prove the result.

Which Tools Support Spec-Driven Development?

  • GitHub Spec Kit: A toolkit from GitHub that runs one feature at a time through constitution, specify, plan, tasks, implement and converge commands inside your coding agent, saving a spec.md, plan.md and tasks.md per feature. Open source: Yes. Tied to one coding agent: No.
  • OpenSpec: A spec framework and CLI that models each change as a delta against the existing specs, in a change folder that holds proposal.md, design.md, tasks.md and the delta specs. Open source: Yes. Tied to one coding agent: No.
  • Kiro: Amazon's tool with specs built into its IDE, CLI and Web versions. Each spec is a requirements.md, design.md and tasks.md, and requirements are written in EARS notation: WHEN [condition] THE SYSTEM SHALL [behavior].
  • BMAD Method: An agile method that pairs named AI agents with workflow skills and sizes planning to the work, from one change to a whole product, through a PRD, an architecture and epics with stories. Open source: Yes.

What Makes a Specification Good Enough for an AI Agent to Build From?

  • Testable acceptance criteria: Each acceptance criterion states one observable behavior that a single test can assert, with a stable ID such as AC-1 so tests, defects and reviews point at the same line. Vague words such as fast or intuitive give an AI coding agent nothing to satisfy.
  • Non-goals and constraints: A buildable spec lists what is out of scope, which stops an AI coding agent from implementing features nobody asked for, and keeps binding constraints, such as a limit on calls to another service, apart from user-visible behavior.

Limits of Spec-Driven Development

  • Unknown requirements: Spec-driven development fits work whose behavior can be stated before it is built. Prototypes, spikes and research work fall outside it, because writing the code is how the team finds out what the software should do.
  • Generation treated as completion: Code generated from a spec is not proof that it meets the spec, so spec-driven development needs spec-driven testing: tests derived from each acceptance criterion and a CI check that fails when a criterion has no test. Across teams, TestMu AI's Test Management traces requirements to test cases, runs and defects.

Why Specifications Are Back

Writing the spec first is not a new idea, and its previous incarnations mostly failed. Model-driven engineering and behavior-driven development both asked a team to maintain a formal description of behavior alongside the implementation. The description drifted, nobody trusted it, and it became documentation.

What changed is who reads the artifact. When an agent generates the implementation from the spec, the spec stops being a parallel document that must be kept in sync and becomes an input the build consumes. The synchronization cost that killed the earlier approaches largely disappears, because there is no second thing to synchronize.

The scale of the shift is visible in the tooling. GitHub's Spec Kit repository describes itself as "an open source toolkit that gives AI coding agents structured processes, reusable templates, and documented outcomes", and it carries over 147,000 stars as of November 2026.

What Is Spec-Driven Development?

Spec-driven development (SDD) is a development method in which a structured specification of behavior, requirements and acceptance criteria drives what an AI coding agent plans and builds. The spec lives in the repository next to the code and is updated when behavior changes. Code is regenerated or edited to match the spec, not the other way round.

The definition is a claim about where intent lives. In conventional development, the code is the source of truth and the spec, if one exists, describes it after the fact. In spec-driven development that inverts: the specification is the artifact, and the code is its output.

Our Modern Web Guidance guide shows the same order at small scale: acceptance criteria for a dialog come first, and a saved test checks what the agent built.

The spec-driven.md document in the Spec Kit repository puts the consequence plainly, describing "executable specifications that generate code rather than merely guiding it." That word, executable, is what separates this from a requirements document.

QuestionCode-firstSpec-driven
Where does intent live?In the implementation, and in the heads of whoever wrote itIn the spec, which the implementation is derived from
What does a change start with?Editing the codeEditing the spec, then regenerating
What is reviewed?A diff of the implementationA diff of intended behavior, which more people can read
What proves it works?Tests written against the codeTests traced back to specific criteria in the spec

The last row is the one teams underinvest in, and later sections return to it.

The Spec Kit Workflow

Spec Kit is useful to study even if you never adopt it, because its command sequence is an opinionated answer to what the practice requires. Its integration directory lists more than 40 coding agents across CLI tools and IDE assistants, so the process is deliberately not tied to one model.

CommandWhat it producesWhy the step exists
constitutionGoverning principles and development guidelinesStanding constraints the agent should respect on every feature, not just this one.
specifyRequirements and user stories: the what and the whyDeliberately excludes the how, so implementation choices do not leak into intent.
planA technical implementation plan with the chosen stackWhere the how goes, kept separate so the spec survives a change of stack.
tasksAn actionable task list derived from the planBreaks the work into units small enough to review individually.
implementThe executed tasks, as working codeThe generation step, which is the part everyone already knows about.
convergeAn assessment of the codebase against spec, plan, and tasksNames the remaining gap, which is an admission that one pass rarely lands it.

Note what the sequence separates. Specify holds the what, plan holds the how, and keeping them apart is why the spec stays valid when the stack changes. Optional clarify, analyze, and checklist commands sit around this core for sharpening an underspecified spec.

On disk, each command is one Claude Code skill. This is what specify init installs from specify-cli 1.3.1:

$ specify init coupon-demo --integration claude --script sh --non-interactive --ignore-agent-tools
...
$ ls coupon-demo/.claude/skills
speckit-analyze
speckit-checklist
speckit-clarify
speckit-constitution
speckit-converge
speckit-implement
speckit-plan
speckit-specify
speckit-tasks

The spec-driven development command line guide runs this sequence with Spec Kit in Claude Code, from specify init to a Kane CLI coverage report.

To pick the tool that checks the built feature, see the best E2E testing tool for Claude Code.

Which Tools Support Spec-Driven Development?

The main spec-driven development tools in November 2026 are GitHub Spec Kit, OpenSpec, Kiro and the BMAD Method. Spec Kit runs one feature at a time through commands in your coding agent. OpenSpec models each change as a delta against existing specs. Kiro, from Amazon, builds specs into its IDE, CLI and Web versions. BMAD sizes planning to the work, from one change to a whole product, with named agents and workflow skills.

ToolWhat it isSpec filesRequirement style
GitHub Spec KitOpen-source (MIT) toolkit and specify CLI; 41 coding-agent integrationsspec.md, plan.md, tasks.md per feature folder under specs/Given/When/Then acceptance scenarios; FR-001 "System MUST" requirements
OpenSpecOpen-source (MIT) spec framework and CLI; works with 30+ AI toolsproposal.md, design.md, tasks.md and delta specs per change folderRequirements stating SHALL or MUST, with WHEN/THEN scenarios
KiroKiro IDE, CLI and Web from Amazon; specs built inrequirements.md, design.md, tasks.md in .kiro/specs/<name>/User stories; EARS: WHEN [condition] THE SYSTEM SHALL [behavior]
BMAD Method (v6.12 stable)Open-source (MIT) agile method: named AI agents plus workflow skillsbrief.md, prd.md, ARCHITECTURE-SPINE.md, SPEC.md, epics.md with storiesPRD FR-1 statements; stories with Given/When/Then acceptance criteria

Facts as of 5 November 2026, from each tool's official docs or repository. For a side-by-side comparison with install commands and verification steps, see Spec Kit vs OpenSpec vs Kiro vs BMAD. Kiro writes requirements in EARS notation.

Automate web and mobile tests with KaneAI by TestMu AI

What a Spec an Agent Can Build From Looks Like

Most specs that fail do so for the same reason: they describe a feeling rather than a behavior. An agent given "the orders page should be fast and intuitive" will produce something plausible, and nothing about it can be checked.

The fix is criteria that are individually testable and individually identified:

## Orders page

### Non-goals
- Pagination. The list is capped at 50 orders for this release.
- Search. Filtering ships separately.

### Constraints
- Must not call the billing service more than once per page load.

### Acceptance Criteria
- AC-1: A logged-out user visiting /orders is redirected to /login.
- AC-2: A logged-in user sees only their own orders.
- AC-3: An expired session returns 401 and clears the session cookie.
- AC-4: Orders are sorted newest first.

Four properties make that usable:

  • One behavior per criterion - Each line is something a single test can assert. A criterion covering three behaviors cannot be reported as partly done.
  • Stable identifiers - AC-1 through AC-4 exist so a test, a defect, and a review comment can all point at the same line. Without IDs, traceability is prose matching.
  • Explicit non-goals - Stating what is out of scope stops an agent helpfully implementing pagination you did not ask for and now have to review.
  • Constraints separate from behavior - The billing-service limit is not user-visible behavior, but it is binding, and burying it in a criterion makes it untestable.

Writing criteria this way is the same discipline as writing a capability spec before testing an autonomous system, which we work through in agent functional testing. For criteria written against user stories and a login page, see these acceptance criteria examples.

The Verification Half

Generating code from a spec does not prove the code matches it. An agent that misreads a requirement writes clean code that does the wrong thing. The practice that closes that gap is spec-driven testing: deriving every test from the spec and reporting a verdict per acceptance criterion.

Our comparison of acceptance criteria vs acceptance tests shows how a written criterion becomes a test with a pass or fail result.

Next-generation test execution with TestMu AI

Spec-to-Test Traceability at Team Scale

A CI check that fails when a criterion has no test works for one repository. Across several teams shipping against many specs, the question becomes which requirements have coverage, which of those tests actually ran this release, and which failures map back to which criterion.

That is the job TestMu AI's Test Management exists to do. It generates structured test cases from a description, user story, or requirement document, with steps, expected results, preconditions, and priority, which is the same transformation spec-driven development performs on the implementation side. It then maintains a traceability matrix connecting requirements to test cases to execution history to defects, and pulls manual and automated results into one pass or fail view so coverage gaps show up before a release rather than after.

The generation direction is worth noting for spec-driven teams: if a spec is precise enough for an agent to build from, it is precise enough for test cases to be generated from too. The AI test case documentation covers that workflow, and KaneAI takes the same natural-language input down to executable tests.

For how to build and read a traceability matrix, including the difference between requirements that are covered and requirements that are proven, see our requirements traceability matrix guide.

Note

Note: A spec an agent can build from is a spec you can generate test cases from. TestMu AI turns requirements into structured cases and traces every one to its runs and defects. Try TestMu AI free!

Where Spec-Driven Development Breaks Down

It is not a universal method, and the honest failure cases are worth naming before you commit a team to it.

  • Genuinely unknown requirements - Prototypes and spikes exist because writing the code is how you discover what the thing should do. A precise spec here is confident detail about the wrong problem.
  • The spec becomes the drift - The old synchronization problem returns the moment someone edits the generated code directly instead of the spec. That is now the artifact nobody trusts.
  • Criteria that cannot be tested - "The interface should feel responsive" survives review, passes into an agent, and produces something unfalsifiable. If nobody can write the test, the criterion is not finished being written.
  • Generation treated as completion - The converge step exists in the tooling precisely because a single pass often does not land it, and skipping that assessment is how a partially implemented spec ships. AI code verification covers running generated code against the acceptance criteria with an independent verifier.
  • Specs written for the tool, not the reader - A spec padded to satisfy a template is longer and no more precise, and the extra text gives an agent more to misinterpret.

The broader trade-offs of building this way are covered in our guide to AI-driven development. Verification-driven development covers the loop that produces proof alongside each change, and eval-driven development applies the same check-first order to prompts and models.

Owning those specs and their checks once agents write the code is the job of the verification engineer.

Conclusion

Take the next feature you were going to describe in a ticket and write its acceptance criteria as numbered, individually testable lines with an explicit non-goals section. That single change is most of the value, and it works whether or not you adopt any spec-driven tooling around it.

Then, before you add anything else, add a CI check that fails when a criterion has no test, because a spec-driven pipeline without it automates writing the code and leaves proving it to chance. Once more than one team is working this way, move the matrix somewhere it can be queried across releases rather than living in one repository's CI. If your specs also describe declarative config rather than behavior, YAML based testing covers the parsing traps that silently change what such a file means.

What Happens When You Go All-In on Agents covers the same ground from a practitioner's side at Testμ 2026.

Testing from the terminal? Kane CLI by TestMu AI lets SDETs and developers plan, write, run and debug tests from the command line.

To run your first test, start free, or
for a full walkthrough of the product.

Author

...

Prince Verma

Blogs: 3

  • Linkedin

Prince Verma is the VP of Engineering at TestMu AI, where he shapes the company's engineering direction and builds high-performance teams. He leads work on AI-native test automation, scalable cloud infrastructure, and developer-focused product innovation that is redefining how software gets tested. Hands-on beyond leadership, he explores AI agents that understand and operate user interfaces and actively contributes to open source.

Reviewer

...

Saksham Arora

Reviewer

  • Linkedin

Saksham Arora is an Associate Product Manager at TestMu AI, working on product-led growth across the agentic AI quality engineering platform. He pairs a software-engineering background with product ownership, connecting how teams adopt and use the platform with what gets built, and previously worked as an Associate Software Engineer at MAQ Software. Saksham holds a B.Tech in Computer Science Engineering from Thapar Institute of Engineering and Technology.

Add to Google preferred sources

Summarise with AI

Copied to Clipboard!
...

3000+ Browsers. One Platform.

See exactly how your site performs everywhere.

Try it free
...

Write Tests in Plain English with KaneAI

Create, debug, and evolve tests using natural language.

Try for free

Spec Driven Development FAQs

Did you find this page helpful?

TestMu AI forEnterprise

Get access to solutions built on Enterprise
grade security, privacy, & compliance

  • Advanced access controls
  • Advanced data retention rules
  • Advanced Local Testing
  • Premium Support options
  • Early access to beta features
  • Private Slack Channel
  • Unlimited Manual Accessibility DevTools Tests