Skip to content

tsungtwu/specdev-flow

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1 Commit
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Specdev Flow

Spec-driven development workflow for Claude Code that combines Brainstorming, OpenSpec, and Feature-Dev into a cohesive feature development lifecycle.

Overview

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                           Specdev Flow                                       β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚                                                                              β”‚
β”‚   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”                  β”‚
β”‚   β”‚ Brainstorming │───▢│   OpenSpec   │───▢│  Feature-Dev β”‚                  β”‚
β”‚   β”‚    (Skill)    β”‚    β”‚    (CLI)     β”‚    β”‚   (Plugin)   β”‚                  β”‚
β”‚   β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜                  β”‚
β”‚         β”‚                    β”‚                    β”‚                          β”‚
β”‚         β–Ό                    β–Ό                    β–Ό                          β”‚
β”‚   Idea β†’ Design       Spec Management      Codebase-Aware                   β”‚
β”‚   Exploration         Delta-based          Architecture                      β”‚
β”‚   YAGNI               Source of Truth      Implementation                    β”‚
β”‚                                                                              β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Context Reset Flow

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                         Context Management                                   β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚                                                                              β”‚
β”‚   DESIGN PHASES                    β”‚           IMPLEMENT PHASES              β”‚
β”‚   (Phase 0-4)                      β”‚           (Phase 5-8)                   β”‚
β”‚                                    β”‚                                         β”‚
β”‚   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”                  β”‚                  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”        β”‚
β”‚   β”‚  Brainstorm β”‚                  β”‚                  β”‚  Implement  β”‚        β”‚
β”‚   β”‚  Explore    β”‚                  β”‚                  β”‚  Review     β”‚        β”‚
β”‚   β”‚  Architect  β”‚                  β”‚                  β”‚  Archive    β”‚        β”‚
β”‚   β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”˜                  β”‚                  β””β”€β”€β”€β”€β”€β”€β–²β”€β”€β”€β”€β”€β”€β”˜        β”‚
β”‚          β”‚                         β”‚                         β”‚               β”‚
β”‚          β–Ό                         β”‚                         β”‚               β”‚
β”‚   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    Phase 4.5     β”‚     Fresh Context       β”‚               β”‚
β”‚   β”‚/save-contextβ”‚ ════════════════►│═══════════════════════► β”‚               β”‚
β”‚   β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜                  β”‚                         β”‚               β”‚
β”‚          β”‚                         β”‚                  β”Œβ”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”        β”‚
β”‚          β–Ό                         β”‚                  β”‚/load-contextβ”‚        β”‚
β”‚   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”                  β”‚                  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜        β”‚
β”‚   β”‚   /clear    β”‚                  β”‚                         β–²               β”‚
β”‚   β”‚  (manual)   │─────────────────────────────────────────────               β”‚
β”‚   β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜                  β”‚                                         β”‚
β”‚                                    β”‚                                         β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Context saved to: ~/Documents/workspace/cc-shared/{repo}/CONTEXT-{name}.md

Implementation Review Loop

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                    Implementation & Review Loop (Phase 5-6)                  β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚                                                                              β”‚
β”‚    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”‚
β”‚    β”‚                                                                   β”‚    β”‚
β”‚    β”‚   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”       β”‚    β”‚
β”‚    β”‚   β”‚   Implement  │───▢│    Review    │───▢│     User     β”‚       β”‚    β”‚
β”‚    β”‚   β”‚   (Phase 5a) β”‚    β”‚  (Phase 5b)  β”‚    β”‚   Confirm    β”‚       β”‚    β”‚
β”‚    β”‚   β”‚              β”‚    β”‚              β”‚    β”‚  (Phase 5c)  β”‚       β”‚    β”‚
β”‚    β”‚   β”‚ - Read task  β”‚    β”‚ - 3 parallel β”‚    β”‚              β”‚       β”‚    β”‚
β”‚    β”‚   β”‚ - Code       β”‚    β”‚   reviewers  β”‚    β”‚ - Fix issues β”‚       β”‚    β”‚
β”‚    β”‚   β”‚ - Mark done  β”‚    β”‚ - Spec check β”‚    β”‚ - Continue   β”‚       β”‚    β”‚
β”‚    β”‚   β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β”‚ - Quality    β”‚    β”‚ - Archive    β”‚       β”‚    β”‚
β”‚    β”‚          β–²            β”‚ - Convention β”‚    β””β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”˜       β”‚    β”‚
β”‚    β”‚          β”‚            β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜            β”‚              β”‚    β”‚
β”‚    β”‚          β”‚                                        β”‚              β”‚    β”‚
β”‚    β”‚          β”‚     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”         β”‚              β”‚    β”‚
β”‚    β”‚          └─────│  More tasks remaining? β”‚β—„β”€β”€β”€β”€β”€β”€β”€β”€β”˜              β”‚    β”‚
β”‚    β”‚                β”‚  Issues to fix?        β”‚                        β”‚    β”‚
β”‚    β”‚                β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜                        β”‚    β”‚
β”‚    β”‚                                                                   β”‚    β”‚
β”‚    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β”‚
β”‚                              β”‚                                               β”‚
β”‚                              β–Ό All tasks βœ“ + User approved                   β”‚
β”‚                    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”                                  β”‚
β”‚                    β”‚  Pre-Archive (Ph 6)  β”‚                                  β”‚
β”‚                    β”‚  Archive (Ph 7)      β”‚                                  β”‚
β”‚                    β”‚  Summary (Ph 8)      β”‚                                  β”‚
β”‚                    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜                                  β”‚
β”‚                                                                              β”‚
β”‚   Exit Criteria:                                                             β”‚
β”‚   βœ“ ALL tasks.md items checked off                                          β”‚
β”‚   βœ“ No high-severity review issues                                          β”‚
β”‚   βœ“ User explicitly approved                                                 β”‚
β”‚   βœ“ Implementation matches all specs                                         β”‚
β”‚                                                                              β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Workflow Phases

Phase Description Skill
0-4.5 Design - Prerequisites, Brainstorming, Proposal, Exploration, Architecture, Context Reset /specdev-design
5-6 Implement - Implementation & Review Loop /specdev-implement
6-8 Archive - Pre-Archive Verification, Archive, Documentation Update, Summary /specdev-archive

Phase Details

Phase 0   Prerequisites      openspec init --tools claude
Phase 1   Brainstorming      Idea β†’ Design (one question at a time, 2-3 approaches)
Phase 2   Proposal           OpenSpec proposal.md, tasks.md, specs/
Phase 3   Exploration        Existing specs review + Feature-Dev Explorer
Phase 4   Architecture       Feature-Dev Architect (2-3 approaches)
Phase 4.5 Context Reset      /save-context β†’ /clear β†’ /load-context
Phase 5   Implementation     OpenSpec Apply + Code
Phase 5b  Review Loop        Feature-Dev Reviewer (iterate until done)
Phase 6   Pre-Archive        Verify all tasks complete
Phase 7   Archive            openspec archive <change-id>
Phase 7.5 Doc Update         README, CHANGELOG updates
Phase 8   Summary            Completion report

Components

Skills (included)

Skill Description
/specdev Full workflow orchestrator (Phase 0-8)
/specdev-design Design phases only (Phase 0-4.5)
/specdev-implement Implementation phases only (Phase 5-6)
/specdev-archive Archive phases only (Phase 6-8)
/brainstorming Collaborative idea exploration
/using-openspec OpenSpec quick reference guide
/save-context Save context before switching tasks
/load-context Load previously saved context

External Dependencies

OpenSpec CLI

Spec management CLI tool for delta-based specification tracking.

npm install -g openspec

Key commands:

openspec init --tools claude    # Initialize in project
openspec validate <id> --strict # Validate change
openspec archive <id> --yes     # Apply deltas to source specs

Feature-Dev Plugin

Codebase-aware development plugin with specialized agents.

Install via Claude Code:

/install-plugin feature-dev@claude-plugins-official

Agents:

  • feature-dev:code-explorer - Trace and understand existing code
  • feature-dev:code-architect - Design implementation approaches
  • feature-dev:code-reviewer - Review implementation quality

Installation

1. Install Skills

Option A: Use the install skill (recommended)

cd specdev-flow
claude
# Then run:
/install-specdev

Option B: Manual copy

cp -r skills/* ~/.claude/skills/

Option C: Manual symlink

for skill in skills/*/; do
  ln -sf "$(pwd)/$skill" ~/.claude/skills/
done

2. Install Dependencies

# OpenSpec CLI
npm install -g openspec

# Feature-Dev Plugin (in Claude Code)
/install-plugin feature-dev@claude-plugins-official

Usage

Full Workflow

/specdev implement user authentication with JWT

Partial Workflows

# Design only (stop before implementation)
/specdev-design add dark mode support

# Implementation only (after design is complete)
/specdev-implement

# Archive only (after implementation is complete)
/specdev-archive

Core Principles

  1. Brainstorm before spec - Explore and refine the idea before formalizing
  2. Spec first, code second - Define what to build before deciding how
  3. Understand before acting - Analyze existing codebase patterns before designing
  4. One question at a time - Don't overwhelm during brainstorming
  5. YAGNI ruthlessly - Remove unnecessary features from all designs
  6. Human in the loop - User confirmation required at every phase transition
  7. All specs in English - Specification documents must be in English
  8. Never modify source specs directly - Only use deltas in changes/

Directory Structure

skills/
β”œβ”€β”€ brainstorming/           # Idea exploration skill
β”‚   └── SKILL.md
β”œβ”€β”€ specdev/                 # Main workflow orchestrator
β”‚   β”œβ”€β”€ SKILL.md
β”‚   └── openspec-reference.md
β”œβ”€β”€ specdev-design/          # Design phases (0-4.5)
β”‚   β”œβ”€β”€ SKILL.md
β”‚   └── openspec-reference.md
β”œβ”€β”€ specdev-implement/       # Implementation phases (5-6)
β”‚   β”œβ”€β”€ SKILL.md
β”‚   └── openspec-reference.md
β”œβ”€β”€ specdev-archive/         # Archive phases (6-8)
β”‚   β”œβ”€β”€ SKILL.md
β”‚   └── openspec-reference.md
β”œβ”€β”€ using-openspec/          # OpenSpec quick guide
β”‚   β”œβ”€β”€ SKILL.md
β”‚   └── openspec-examples.md
β”œβ”€β”€ save-context/            # Context save skill
β”‚   └── SKILL.md
└── load-context/            # Context load skill
    └── SKILL.md

Context Management

The workflow uses /save-context and /load-context skills to manage context resets:

  • Phase 4.5: Mandatory context reset before implementation
  • During implementation: Reset when context approaches 2% remaining
  • Natural reset points: After Phase 4, after major tasks, before Phase 7

License

MIT

About

SDD flow

Resources

Stars

Watchers

Forks

Contributors