Skip to content

Spec-Driven Development

A comprehensive guide comparing different approaches to spec-driven development when working with AI coding assistants like Claude Code, GitHub Copilot, Cursor, and others.


Spec-driven development is the practice of writing specifications before writing code—or asking an AI tool to write code. Instead of coding first and documenting later, you start with a spec that acts as a contract for how your code should behave.

When working with AI coding assistants without specifications:

  • Context loss - AI forgets previous decisions
  • Inconsistent outputs - Different results each time
  • Scope creep - AI adds unwanted features
  • Rework cycles - Constant corrections and revisions
  • Misalignment - AI misunderstands requirements

With proper specifications:

  • Predictable results - Consistent AI outputs
  • Clear expectations - Humans and AI aligned
  • Faster iteration - Less back-and-forth
  • Better quality - AI stays on track
  • Maintainability - Clear documentation from day one

ApproachTypeCostComplexityBest For
BMAD-METHODFrameworkFree (OSS)HighLarge teams, enterprise projects
OpenSpecCLI ToolFree (OSS)LowAny project size, version control
GitHub Spec KitCLI ToolkitFree (OSS)MediumGitHub users, structured workflow
Kiro.devIDE PlatformPaidMediumIndividual devs, startups
CodeGuide.devDocumentationFreeLowDocumentation-focused projects
No Spec (Traditional)Ad-hocFreeLowSmall scripts, prototypes

BMAD (Breakthrough Method of Agile AI-Driven Development) is a comprehensive AI agent framework that uses a two-phase approach: Agentic Planning followed by Context-Engineered Development.

Agentic Planning

Dedicated AI agents (Analyst, PM, Architect) collaborate to create detailed requirements and architecture documents

Context Engineering

Scrum Master agent transforms plans into hyper-detailed development stories with full context embedded

Multi-Domain

Expansion packs for creative writing, business strategy, wellness, education beyond just coding

Customizable

Build custom AI agents for specialized fields and workflows

Analyst Agent → PM Agent → Architect Agent → Scrum Master → Developer
(Research) (Requirements) (Architecture) (Stories) (Implementation)
Pros ✅Cons ❌
Comprehensive framework - Covers entire development lifecycleSteep learning curve - Complex setup and methodology
Eliminates context loss - Full context in every storyHeavy tooling - Requires Node.js v20+, web UI, IDE integration
Team collaboration - Multiple AI agents work togetherOverhead for small projects - Overkill for simple tasks
Enterprise-ready - Designed for large, complex projectsTeam coordination - Best with dedicated team members
Extensible - Supports custom agents and domains
  • Large enterprise projects
  • Teams with dedicated roles (PM, Architect, Developer)
  • Complex multi-phase projects
  • Organizations building multiple AI-driven products
  1. Clone the Repository

    Terminal window
    git clone https://github.com/bmad-code-org/BMAD-METHOD.git
    cd BMAD-METHOD
  2. Install Dependencies

    Terminal window
    bun install
  3. Start the Web UI

    Terminal window
    bun run dev
  4. Open in Browser Visit http://localhost:3000 to access the BMAD planning interface

  • Directoryyour-project/
    • Directorybmad/
      • Directoryrequirements/
        • analyst-research.md
        • pm-requirements.md
      • Directoryarchitecture/
        • system-design.md
        • tech-decisions.md
      • Directorystories/
        • story-001.md
        • story-002.md
      • Directoryagents/
        • custom-agent-config.json
    • Directorysrc/
      • (your source code)
    • Directory.bmad/
      • config.json

OpenSpec is a lightweight CLI tool that implements spec-driven development with a simple two-folder model: current specs and proposed changes. It integrates seamlessly with existing AI coding tools.

Two-Folder Model

specs/ for current truth, changes/ for proposed updates

Change Management

Draft, review, implement, and archive changes with clear audit trail

Universal Integration

Works with Claude Code, Cursor, Copilot, and any AI coding tool

No API Keys

Fully local, no external dependencies or accounts required

  • Directoryopenspec/
    • Directoryspecs/
      • feature-a.md
      • feature-b.md
    • Directorychanges/
      • add-feature-c.md
      • update-feature-a.md
Pros ✅Cons ❌
Simple and lightweight - Minimal setup, just folders and markdownManual process - Requires discipline to follow workflow
Version control friendly - Works perfectly with GitNo GUI - Command-line only
Tool agnostic - Compatible with any AI coding assistantLimited automation - No automatic spec generation
Clear audit trail - Every change is tracked and reviewableNo multi-agent - Single developer focused
No dependencies - No API keys or external services
  • Solo developers and small teams
  • Projects already using Git
  • Teams using multiple AI coding tools
  • Projects requiring clear change history
  1. Install Globally

    Terminal window
    bun add -g @fission-ai/openspec
  2. Navigate to Your Project

    Terminal window
    cd your-project
  3. Initialize OpenSpec

    Terminal window
    openspec init
  4. Verify Setup Check that openspec/ folder was created with specs/ and changes/ subdirectories

  • Directoryyour-project/
    • Directoryopenspec/
      • Directoryspecs/
        • feature-authentication.md
        • feature-dashboard.md
        • api-endpoints.md
      • Directorychanges/
        • add-payment-feature.md
        • update-auth-flow.md
      • Directoryarchived/
        • completed-change-001.md
    • Directorysrc/
      • (your source code)
    • Directory.openspec/
      • config.json

GitHub Spec Kit is an official toolkit from GitHub that streamlines software development through a structured spec-driven approach with AI assistance. It treats specifications as executable guides rather than disposable planning documents.

Slash Commands

Built-in commands like /speckit.specify, /speckit.plan, /speckit.tasks for structured workflow

Multi-Agent Support

Works with Claude, GitHub Copilot, Gemini, Cursor, and other AI coding agents

Intent-Driven

Focus on “what” and “why” before determining technical implementation

Executable Specs

Specifications become living guides for development, not throwaway documents

Constitution → Specify → Plan → Tasks → Implement
(Project setup) (Requirements) (Architecture) (Breakdown) (Code)
Pros ✅Cons ❌
Official GitHub tool - Backed by GitHub’s expertiseRelatively new - Smaller community compared to alternatives
Slash command workflow - Simple, intuitive commandsCommand-line focused - No GUI interface
Multi-agent compatible - Works with any AI coding toolPython dependency - Requires Python/uv installation
Structured process - Clear phases from spec to implementationLearning curve - Need to understand the workflow phases
Technology agnostic - Start with intent, not tech stack
  • Developers using GitHub and AI coding agents
  • Teams wanting official GitHub-backed tools
  • Projects requiring structured spec-to-code workflow
  • Organizations adopting spec-driven practices
  1. Install uv (Python package manager)

    Terminal window
    curl -LsSf https://astral.sh/uv/install.sh | sh
  2. Install Spec Kit

    Terminal window
    uv tool install specify-cli --from git+https://github.com/github/spec-kit.git
  3. Initialize a Project

    Terminal window
    specify init my-project
  4. Or Initialize in Existing Directory

    Terminal window
    specify init . --ai claude
  • Directoryyour-project/
    • Directory.speckit/
      • constitution.md
      • Directoryspecifications/
        • feature-001-spec.md
        • feature-002-spec.md
      • Directoryplans/
        • architecture-plan.md
        • implementation-plan.md
      • Directorytasks/
        • task-breakdown.md
      • config.json
    • Directorysrc/
      • (your source code)
    • README.md

Kiro is an AI-powered Integrated Development Environment designed specifically for spec-driven development. It transforms prompts into structured requirements, system design, and implementation tasks.

Spec-to-Code

Automatically turns prompts into requirements, design, and discrete tasks

Autonomous Hooks

Trigger tasks on events (file save) - generate docs, tests, optimize code

Auto Mode

Mixed frontier models for autonomous complex feature development

Multi-Modal

Support for design images, screenshots, and other inputs

User Prompt → Requirements → System Design → Implementation Tasks → Code
Pros ✅Cons ❌
All-in-one IDE - Complete development environmentPaid service - Not free (pricing varies)
Automatic spec generation - AI creates specs from promptsPlatform lock-in - Proprietary IDE, not tool-agnostic
Autonomous agents - Background tasks for docs, tests, optimizationLearning curve - New IDE to learn
Multi-language - Python, JavaScript, TypeScript, and moreCloud dependency - Requires internet connection
Import VS Code settings - Easy migration from existing setup
  • Individual developers
  • Startups building MVPs quickly
  • Teams wanting integrated spec-driven workflow
  • Developers comfortable with new IDEs
  1. Visit Kiro.dev Go to kiro.dev

  2. Sign Up Create an account (GitHub sign-in available)

  3. Import Settings (Optional) Import your VS Code settings for faster setup

  4. Start Your First Project Click “New Project” and start with a prompt

  • Directoryyour-project/
    • Directory.kiro/
      • Directoryspecs/
        • feature-001-spec.md
        • feature-002-spec.md
      • Directoryrequirements/
        • user-requirements.md
      • Directorydesign/
        • system-architecture.md
        • component-breakdown.md
      • Directorytasks/
        • implementation-tasks.json
      • settings.json
    • Directorysrc/
      • (your source code generated by Kiro)
    • Directorytests/
      • (auto-generated tests)
    • Directorydocs/
      • (auto-generated documentation)

CodeGuide focuses on creating detailed documentation for AI coding projects. It helps maintain comprehensive project documentation that serves as specifications for AI assistants.

Documentation Focus

Generate and maintain detailed project documentation

AI-Friendly

Documentation formatted for AI assistant consumption

Living Docs

Keep documentation in sync with codebase

CodeGuide emphasizes documentation as the specification layer, ensuring that:

  1. All features have clear documentation
  2. Documentation is accessible to AI assistants
  3. Changes update documentation automatically
Pros ✅Cons ❌
Documentation first - Ensures comprehensive project docsLimited scope - Primarily documentation, not full workflow
AI-optimized - Format works well with AI assistantsManual maintenance - Requires keeping docs updated
Lightweight - Minimal overheadLess structure - Not as formal as other approaches
Integration friendly - Works with existing tools
  • Documentation-focused teams
  • Projects requiring extensive API docs
  • Teams using various AI coding tools
  • Maintaining legacy projects

Visit codeguide.dev for documentation best practices.

  • Directoryyour-project/
    • Directorydocs/
      • README.md
      • ARCHITECTURE.md
      • API.md
      • Directoryfeatures/
        • authentication.md
        • dashboard.md
        • api-endpoints.md
      • Directoryguides/
        • setup.md
        • deployment.md
      • CHANGELOG.md
    • Directorysrc/
      • (your source code)
    • Directory.codeguide/
      • Directorytemplates/
      • config.json

The traditional ad-hoc approach where you directly prompt AI assistants without formal specifications or documentation.

Prompt → Code → Test → Debug → Iterate
Pros ✅Cons ❌
Quick start - No setup requiredContext loss - AI forgets previous decisions
Flexible - Change direction easilyInconsistent - Different results each time
Simple - No methodology to learnScaling issues - Breaks down on large projects
Fast for prototypes - Great for quick experimentsMaintainability - Hard to onboard new team members
No audit trail - Unclear why decisions were made
  • Quick prototypes and experiments
  • Learning and exploring new technologies
  • Very small scripts (< 100 lines)
  • Throwaway code
  • Directoryyour-project/
    • Directorysrc/
      • index.js
      • utils.js
      • (unstructured code files)
    • package.json
    • README.md
    • (no formal specs or documentation)

Choose the right approach for your needs:

Choose BMAD-METHOD if you:

  • ✅ Working on enterprise-scale projects
  • ✅ Have dedicated team roles (PM, Architect, etc.)
  • ✅ Need comprehensive planning phase
  • ✅ Want multi-agent collaboration
  • ✅ Building multiple related products

Ideal Team Size: 3-10+ members


FeatureBMADOpenSpecGitHub Spec KitKiroCodeGuideNo Spec
Learning CurveHighLowMediumMediumLowNone
Setup TimeHoursMinutes10-15 minsMinutesMinutesNone
CostFreeFreeFreePaidFreeFree
Team Size3-10+1-51-101-3Any1
Multi-Agent✅ Yes❌ No✅ Yes✅ Yes❌ No❌ No
Version Control✅ Yes✅ Yes✅ Yes⚠️ Limited✅ Yes⚠️ Manual
Auto Spec Gen✅ Yes❌ No⚠️ Guided✅ Yes⚠️ Partial❌ No
IDE Integration✅ Yes⚠️ Manual⚠️ Manual✅ Built-in⚠️ ManualN/A
Change Tracking✅ Yes✅ Yes✅ Yes✅ Yes⚠️ Manual❌ No
Documentation✅ Auto📝 Manual✅ Structured✅ Auto✅ Focus❌ None
Tool Agnostic❌ No✅ Yes✅ Yes❌ No✅ Yes✅ Yes
Offline Support✅ Yes✅ Yes✅ Yes❌ No✅ Yes✅ Yes

Recommended: OpenSpec or Kiro

If you’re working alone:

  • OpenSpec - If you want free, simple, git-integrated
  • Kiro - If you want automated specs and don’t mind paying
  1. Install your chosen tool Follow the installation instructions for your selected approach

  2. Create your first spec Start small with one feature or module

  3. Test with AI assistant Prompt your AI tool referencing the spec

  4. Iterate and refine Improve your spec format based on results

  5. Scale up Expand to more features as you get comfortable


  • Invest time in the planning phase
  • Let AI agents collaborate, don’t rush them
  • Review agent outputs before proceeding
  • Customize agents for your domain
  • Create templates for common change types
  • Use meaningful file names in changes/
  • Archive promptly after implementation
  • Commit specs with related code changes
  • Start with clear, detailed prompts
  • Use Auto mode for complex features
  • Leverage autonomous hooks for repetitive tasks
  • Import VS Code settings for faster onboarding
  • Document as you go, not after
  • Include examples in documentation
  • Keep API docs comprehensive
  • Link code to relevant documentation

Example 1: Building a Dashboard (OpenSpec)

Section titled “Example 1: Building a Dashboard (OpenSpec)”
openspec/changes/add-analytics-dashboard.md
# Add Analytics Dashboard
## Requirements
- Display key metrics: users, revenue, engagement
- Real-time updates via WebSocket
- Responsive design (mobile + desktop)
- Export data to CSV
## Technical Design
- React + Recharts for visualization
- TanStack Query for data fetching
- Cloudflare Workers for backend
- ClickHouse for analytics data
## Implementation Tasks
1. Create dashboard layout component
2. Build metric cards with Recharts
3. Implement WebSocket connection
4. Add CSV export functionality
5. Write unit tests for calculations
## Acceptance Criteria
- [ ] Dashboard loads in < 2 seconds
- [ ] Real-time updates every 5 seconds
- [ ] Mobile responsive (320px+)
- [ ] CSV export includes all visible data

After Agentic Planning, Scrum Master generates:

# Story: Create User Registration Endpoint
## Context
Part of the Authentication System (see architect-doc-001.md)
Implements requirements from PM-REQ-003.md
## Full Implementation Details
- Endpoint: POST /api/auth/register
- Validation: Email, password (8+ chars, 1 uppercase, 1 number)
- Database: Users table (see schema.sql)
- Security: bcrypt hash (cost 10), rate limit (5/min per IP)
- Response: JWT token (expires 24h)
## Error Handling
- 400: Invalid input (specific field errors)
- 409: Email already exists
- 429: Rate limit exceeded
- 500: Server error
## Testing
- Unit tests for validation logic
- Integration tests for full flow
- Load test: 100 concurrent registrations
## Dependencies
- bcrypt: ^5.1.0
- jsonwebtoken: ^9.0.0
- express-rate-limit: ^6.0.0

Prompt to Kiro:

“Create a real-time collaborative whiteboard with drawing tools, shapes, text, and multi-user cursors”

Kiro generates:

  1. Requirements document
  2. System architecture
  3. Component breakdown
  4. API specification
  5. Implementation tasks

Then Auto mode implements everything autonomously.



Spec-driven development is becoming essential for effective AI-assisted coding. The right approach depends on your:

  • Project size - Solo vs team vs enterprise
  • Budget - Free vs paid tools
  • Workflow - Existing tools vs new platform
  • Complexity - Simple scripts vs complex systems
  • Team structure - Dedicated roles vs generalists
ScenarioBest ChoiceWhy
Solo dev, small projectOpenSpecSimple, free, git-friendly
Solo dev, complex projectKiro.devAutomated specs, powerful features
GitHub user, structured workflowGitHub Spec KitOfficial tool, slash commands, multi-agent
Small teamOpenSpecEasy collaboration via Git
Large enterpriseBMAD-METHODMulti-agent, comprehensive planning
Documentation focusCodeGuide.devDocs as specs
Quick prototypeNo SpecSpeed over structure

Last updated: October 2025