Skip to content

Latest commit

 

History

History
 
 

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

README.md

Spec-Driven Development Plugin

Specification-driven development workflows for Claude Code using EARS, Gherkin, and multi-provider support.

Overview

This plugin enables specification-driven development using the GitHub Spec Kit 5-phase workflow:

Constitution → Specify → Plan → Tasks → Implement

It supports 7 specification providers:

Provider Format Use Case
EARS Easy Approach to Requirements Syntax Structured requirements
Gherkin Given/When/Then BDD acceptance criteria
Kiro AWS Kiro format Kiro IDE integration
SpecKit GitHub Spec Kit 5-phase workflow
ADR MADR format Architecture decisions
UserStory Agile format User stories with ACs
Canonical Internal schema Cross-provider exchange

Installation

/plugin install spec-driven-development@melodic-software

Quick Start

Run Full 5-Phase Workflow

/spec-driven-development:speckit-run "User authentication with email and OAuth"

Generate Specification Only

/spec-driven-development:specify "Add shopping cart functionality"

Check Specification Status

/spec-driven-development:status --all

Commands

Generic Workflow Commands

Command Description
/spec-driven-development:specify Phase 1: Generate specification from feature request
/spec-driven-development:plan Phase 2: Generate implementation design
/spec-driven-development:tasks Phase 3: Generate task breakdown
/spec-driven-development:implement Phase 4: Guide implementation
/spec-driven-development:validate Validate specification against schema
/spec-driven-development:convert Convert between specification formats
/spec-driven-development:refine AI-assisted specification refinement
/spec-driven-development:audit Audit specification quality

Provider Deep-Dive Commands

Command Description
/spec-driven-development:ears-author Interactive EARS pattern authoring
/spec-driven-development:ears-convert Convert to/from EARS format
/spec-driven-development:gherkin-author Interactive Gherkin scenario authoring
/spec-driven-development:gherkin-convert Convert to/from Gherkin format
/spec-driven-development:kiro-sync Sync with AWS Kiro format
/spec-driven-development:speckit-run Run full 5-phase Spec Kit workflow
/spec-driven-development:adr-create Create Architecture Decision Record
/spec-driven-development:userstory-author Author Agile user stories
/spec-driven-development:constitution Create/update project constitution
/spec-driven-development:status Show specification status dashboard

Skills

Skill Purpose
spec-management Central hub for spec-driven development
canonical-spec-format Canonical specification schema reference
ears-authoring EARS pattern expertise (6 patterns)
gherkin-authoring Gherkin/BDD syntax and best practices
speckit-workflow GitHub Spec Kit 5-phase workflow
kiro-integration AWS Kiro patterns and sync
requirements-quality INVEST criteria and quality assessment

Agents

Six unified agents provide all specification-driven development capabilities through argument-based mode selection:

spec-author (Interactive)

Interactive authoring assistant for specifications. Pass mode as argument.

Mode Purpose
ears Guide EARS pattern selection and authoring
gherkin Guide Given/When/Then scenario creation
userstory Guide user story and acceptance criteria authoring

Usage: spec-author ears, spec-author gherkin, spec-author userstory

spec-converter (Format Transformation)

Converts specifications between formats. Pass mode as argument.

Mode Purpose
ears Convert to/from EARS format
gherkin Convert to/from Gherkin/BDD format
kiro Sync with AWS Kiro format

Usage: spec-converter ears, spec-converter gherkin, spec-converter kiro

spec-processor (Generate/Refine)

Generates or refines specifications. Pass mode as argument.

Mode Purpose
generate Create new specifications from requirements
refine Improve existing specification quality

Usage: spec-processor generate, spec-processor refine

spec-reviewer (Read-Only Analysis)

Audits or validates specifications (read-only). Pass mode as argument.

Mode Purpose
audit Formal quality audit with scoring
validate Quick format and structure validation

Usage: spec-reviewer audit, spec-reviewer validate

speckit-runner (Orchestrator)

Full 5-phase Spec Kit workflow orchestration. Unchanged from previous version.

adr-creator (ADR Generation)

ADR generation from specification context. Has auto-loaded adr-management skill.

The 5-Phase Workflow

Phase 0: Constitution

Define project principles and constraints in .constitution.md:

/spec-driven-development:constitution --init

Phase 1: Specify

Generate a canonical specification from requirements:

/spec-driven-development:specify "User authentication with social login"

Output: .specs/{feature}/spec.md

Phase 2: Plan

Generate implementation design:

/spec-driven-development:plan .specs/auth/spec.md

Output: .specs/{feature}/design.md

Phase 3: Tasks

Break down into implementable tasks:

/spec-driven-development:tasks .specs/auth/spec.md

Output: .specs/{feature}/tasks.md

Phase 4: Implement

Guide implementation with AC validation:

/spec-driven-development:implement .specs/auth/spec.md

EARS Patterns

The plugin supports all 6 EARS patterns:

Pattern Template Use Case
Ubiquitous The system shall [action] Always-on requirements
Event-Driven When [trigger], the system shall [action] Triggered behavior
State-Driven While [state], the system shall [action] Conditional behavior
Unwanted If [condition], then the system shall [action] Error handling
Optional Where [feature enabled], the system shall [action] Configurable features
Complex Combination of above Multi-condition requirements

Quality Scoring

INVEST Criteria

Requirements are scored against INVEST criteria:

Criterion Score Description
Independent 0-2 Can be delivered alone
Negotiable 0-2 Describes what, not how
Valuable 0-2 Delivers user/business value
Estimable 0-2 Team can estimate effort
Small 0-2 Fits in one sprint
Testable 0-2 Has clear pass/fail criteria

Threshold: Score 7+ to proceed

Specification Grades

Grade Score Meaning
A+ 95-100 Exceptional quality
A 90-94 Excellent
B 80-89 Good
C 70-79 Acceptable
D 60-69 Needs work
F <60 Failing

Directory Structure

.specs/
├── {feature-name}/
│   ├── spec.md          # Canonical specification
│   ├── design.md        # Implementation design
│   ├── tasks.md         # Task breakdown
│   └── audit.md         # Last audit report
└── index.md             # Specification index

.constitution.md          # Project constitution

Output Style

Enable spec-focused output formatting:

/output-style spec-output

This style:

  • Emphasizes structured formats (YAML, tables, lists)
  • Uses EARS syntax for requirements
  • Uses Given/When/Then for acceptance criteria
  • Minimizes prose, maximizes traceability

Integration with Existing Infrastructure

This plugin integrates with:

  • schemas/canonical-spec.schema.json - Schema validation
  • prompts/specify.prompt.md - Generation templates
  • templates/EARS-REQUIREMENT-TEMPLATE.md - Pattern templates
  • ADR-115 - Specification Provider Abstraction architecture

Examples

Create a User Story with Acceptance Criteria

/spec-driven-development:userstory-author "Search products by keyword"

Convert Prose Requirements to EARS

/spec-driven-development:ears-convert requirements.txt --to ears

Sync with AWS Kiro

/spec-driven-development:kiro-sync .specs/auth --direction export

Create ADR from Specification

/spec-driven-development:adr-create .specs/auth/spec.md --decision "Use JWT for session tokens"

ADR Creation

The /spec-driven-development:adr-create command extracts architectural decisions that emerge during specification authoring. It creates ADRs in docs/adr/ linked to specific specifications (SPEC-xxx IDs).

When to use this vs enterprise-architecture:

  • Use /spec-driven-development:adr-create when decisions emerge FROM specifications
  • Use /ea:adr-create (enterprise-architecture plugin) for standalone architecture decisions not tied to a specific specification

Both use MADR format and can coexist in the same project.

Architecture

This plugin follows Option C (Hybrid) architecture:

  • Generic entry points for workflow-centric users
  • Provider deep-dives for format-specific expertise
  • Pure delegation to skills for domain knowledge
  • Model-appropriate agents (Opus for generation, Haiku for validation)

License

MIT