πŸ“Note

Spec-Driven Development: AI Assisted Coding Explained

Tony Duong

Tony Duong

Mar 13, 2026 Β· 3 min

#ai#software-engineering#spec-driven-development#vibe-coding
Spec-Driven Development: AI Assisted Coding Explained

Overview

This video explains spec-driven development β€” a structured approach to AI-assisted coding that brings back software development life cycle (SDLC) principles into the age of coding agents. It contrasts this with vibe coding, the more common "just prompt and iterate" approach.

Vibe Coding: The Current Default

Most people using AI coding agents follow this loop:

  1. Write an initial prompt ("build me X in Python")
  2. The model generates boilerplate code
  3. You edit the prompt or give follow-up instructions
  4. Go back and forth until you reach the desired implementation

Problems with vibe coding:

  • The model may interpret your prompt differently each time β€” 100 tries could give 100 different results
  • You don't control how the model makes architectural decisions
  • It skips the traditional SDLC (planning, design, testing, deployment, maintenance)
  • Debugging is harder because you don't know why the model chose a specific approach

Where vibe coding shines: quick prototypes, testing ideas, small edits on the fly.

Spec-Driven Development: A Structured Alternative

Spec-driven development reintroduces SDLC components into AI-generated development:

The Workflow

  1. Prompt for behavior, not implementation β€” instead of "build me a login page," describe what the system should do, its constraints, and expected behavior
  2. Generate requirements β€” the LLM creates a requirements specification that acts as a contract
  3. Review and approve β€” if happy, convert requirements into a design document with todos for each implementation step; if not, edit the spec (nothing has been implemented yet)
  4. Implement β€” once the design is approved, the AI agent writes code guided by the spec
  5. Test β€” test cases can be generated directly from the spec

Example: User Authentication

Vibe coding approach:

"Hey, we need a /login page for users to authenticate" β†’ Model picks one of 30 possible implementations β†’ iterate back and forth

Spec-driven approach:

  • Feature: User Authentication
  • Endpoint: POST /login
  • Parameters: user, pass
  • Failure handling: specific error codes (e.g., missing username)
  • Test cases: valid credentials β†’ 200, missing fields β†’ specific error codes

The spec removes ambiguity β€” the agent knows exactly what to implement and why.

How It Relates to Other Development Approaches

Approach Starting Point Flow
Traditional Code first Code β†’ Documentation
Test-Driven (TDD) Tests first Tests β†’ Code
Spec-Driven (SDD) Specs first Specs β†’ Design β†’ Code β†’ Tests

Spec-driven development is essentially TDD and BDD on steroids β€” the specification becomes the primary artifact that drives all downstream work: implementation, tests, documentation, and verification.

Key Takeaways

  1. Vibe coding skips the SDLC β€” great for prototyping, but produces unpredictable results for real applications
  2. Specs reduce ambiguity β€” AI models work better with clear instructions than vague prompts
  3. Nothing is implemented until you approve β€” you review requirements and design before any code is written
  4. Specs become the contract β€” they drive implementation, testing, and documentation
  5. The primary skill shift β€” from writing/reviewing code to effectively conveying what you want to build
Tony Duong

By Tony Duong

A digital diary. Thoughts, experiences, and reflections.