Usage Examples

Real-world scenarios demonstrating effective use of the Spec-Driven Development plugin for various project types and complexity levels.

Examples

New Project Setup

Scenario: You're starting a new TypeScript backend project and want to establish consistent development standards.

# Initialize project constitution
/sdd:00-setup Use NestJS with TypeScript, PostgreSQL database, follow Clean Architecture and SOLID principles, use Jest for testing

Expected Flow:

  1. Downloads constitution template to specs/constitution.md

  2. Creates spec, plan, and tasks templates in specs/templates/

  3. Fills in project-specific principles:

    • Technology stack: NestJS, TypeScript, PostgreSQL

    • Architecture: Clean Architecture layers

    • Testing: Jest with >80% coverage requirement

    • Code style: SOLID principles

  4. Generates sync impact report

Generated Constitution (excerpt):


Simple Feature Implementation

Scenario: Adding a basic user profile feature to an existing application.

Expected Specification (excerpt):

Generated Tasks (excerpt):


Complex Feature with Multiple Stakeholders

Scenario: Implementing a multi-tenant billing system with Stripe integration.

Expected Brainstorming Flow:

After Brainstorming:

Expected Architecture Options:

Generated Data Model:


Bug Fix with Root Cause Analysis

Scenario: Users report intermittent payment failures during checkout.

Expected Specification:

Generated Tasks:


Iterative Design with Architecture Changes

Scenario: Mid-project pivot requiring architecture changes.

Handling the Change:

Expected Plan Update:


Documentation-First Development

Scenario: Creating a public API that external developers will consume.

Expected Contract Output:

Documentation Command:

Expected Documentation:


Integration with Other Plugins

Full Feature Cycle with Quality Gates

Research-Heavy Features

Refactoring with SDD


Best Practices Summary

When to Use Full SDD Workflow

  • New features with unclear requirements

  • Complex integrations with multiple systems

  • Features affecting multiple parts of codebase

  • Public APIs or features with external consumers

  • Refactoring with high regression risk

When to Use Abbreviated Workflow

  • Simple bug fixes: /sdd:01-specify then direct implementation

  • Small enhancements: Skip /sdd:02-plan if architecture is clear

  • Documentation updates: Start at /sdd:05-document

Common Patterns

  1. Brainstorm before Specify: Use /sdd:brainstorm for vague requirements

  2. Review at Each Stage: Don't rush through plan reviews

  3. Iterate on Architecture: It's cheaper to change plans than code

  4. Keep Tasks Small: 1-2 day tasks are ideal

  5. Document as You Go: Don't save all docs for the end

Anti-Patterns to Avoid

  1. Skipping specification validation

  2. Ignoring high-risk task warnings

  3. Proceeding with unresolved clarifications

  4. Not reviewing generated artifacts

  5. Treating tasks as immutable after generation

Last updated