spec-kitty

Spec-Driven Development Explained

Spec-driven development is the methodology at the heart of Spec Kitty. This document explains what it is, why it matters, and when to use it.

What is Spec-Driven Development?

Spec-driven development is an approach where you write a detailed specification before writing any code. The specification becomes the source of truth that guides implementation.

Traditional development:

  1. Developer has an idea
  2. Developer writes code
  3. Developer writes documentation (maybe)
  4. Requirements drift as understanding evolves

Spec-driven development:

  1. Developer writes specification
  2. Specification is reviewed and refined
  3. Implementation follows specification
  4. Documentation already exists (the spec)

The key insight: AI agents need clear, unambiguous requirements to produce quality output. Specifications provide that clarity.

Why Spec-First?

AI Agents Need Clear Requirements

Human developers can fill in gaps, ask clarifying questions mid-task, and use intuition. AI agents work better with explicit requirements:

Specifications Become Executable

In Spec Kitty, specifications aren’t just documentation—they drive the workflow:

The specification is the contract that all agents follow.

Reduces Rework and Misunderstanding

When multiple agents (or humans) work on a feature:

This becomes critical in parallel development where multiple AI agents implement different work packages simultaneously.

The Spec-Kitty Workflow

┌─────────────────────────────────────────────────────────────────┐
│                     PLANNING PHASE                              │
│                  (in main repository)                           │
├─────────────────────────────────────────────────────────────────┤
│                                                                 │
│  /spec-kitty.specify     →    Creates spec.md                   │
│         ↓                                                       │
│  /spec-kitty.plan        →    Creates plan.md                   │
│         ↓                                                       │
│  /spec-kitty.tasks       →    Creates tasks/WP01.md, etc.       │
│                                                                 │
└─────────────────────────────────────────────────────────────────┘
                              ↓
┌─────────────────────────────────────────────────────────────────┐
│                   IMPLEMENTATION PHASE                          │
│                (in separate worktrees)                          │
├─────────────────────────────────────────────────────────────────┤
│                                                                 │
│  spec-kitty implement WP01   →   Agent A implements WP01        │
│  spec-kitty implement WP02   →   Agent B implements WP02        │
│  spec-kitty implement WP03   →   Agent C implements WP03        │
│                                                                 │
└─────────────────────────────────────────────────────────────────┘
                              ↓
┌─────────────────────────────────────────────────────────────────┐
│                      REVIEW PHASE                               │
├─────────────────────────────────────────────────────────────────┤
│                                                                 │
│  /spec-kitty.review          →   Check implementation vs spec   │
│  /spec-kitty.accept          →   Approve and merge              │
│                                                                 │
└─────────────────────────────────────────────────────────────────┘

Each phase produces artifacts that feed into the next phase.

How It Differs from Traditional Development

Aspect Traditional Spec-Driven
Requirements Often implicit, evolve during coding Explicit, written upfront
Documentation Written after implementation (often skipped) Built into the process
Parallelization Difficult without clear boundaries Natural work package boundaries
AI-assisted development Agents need context each time Agents reference specifications
Rework Common when requirements misunderstood Reduced by upfront clarity
Scope creep Easy to add “just one more thing” Spec defines boundaries

When to Use Spec-Driven Development

Good Fit

Features with clear boundaries:

Multi-agent or team projects:

Non-trivial features:

Poor Fit

Exploratory work:

Simple one-off changes:

Emergency fixes:

The Three Phases in Detail

Phase 1: Specification

The specification answers: What are we building and why?

A good spec includes:

Phase 2: Planning

The plan answers: How will we build it?

A good plan includes:

Phase 3: Implementation

Implementation answers: Building the actual solution.

Each work package:

Why Specifications Enable Parallelization

Traditional development often becomes serial:

  1. Developer A implements feature foundation
  2. Developer B waits for A to finish
  3. Developer B implements dependent feature
  4. (Repeat)

Spec-driven development with Spec Kitty enables parallel work:

  1. Specification defines all work packages upfront
  2. Dependencies between WPs are explicit
  3. Independent WPs can be implemented simultaneously
  4. Each agent has clear scope boundaries

Example: A feature with 5 work packages:

See Also


This document explains the “why” behind spec-driven development. For “how” to create specifications, see the tutorials and how-to guides.

Try It

How-To Guides

Reference