Skip to content

Latest commit

Β 

History

8 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

SDD Claude Workflow

A Specification-Driven Development (SDD) workflow template for Claude Code. Drop the .claude folder into any project and get a structured, AI-assisted pipeline that takes a raw task description all the way through to reviewed, production-ready code.

Want to see what the output looks like before setting anything up? Browse .claude/specs/tasks/example-task/ β€” it contains a complete real example with all six pipeline artifacts.


How it works

Every task moves through a fixed 6-stage pipeline. Each stage produces an artifact file stored in .claude/specs/tasks/{TASK_ID}/.

Stage Command Input Output
1. Spec /spec TASK_ID 00-raw-task.md + optional UI screenshots 02-spec.md
2. Spec review /review-spec TASK_ID 00-raw-task.md + 02-spec.md 03-spec-review.md
3. Plan /plan TASK_ID 02-spec.md + 03-spec-review.md 04-implementation-plan.md
4. Implement (write code) 04-implementation-plan.md source files
5. Code review /code-review TASK_ID source files + spec + plan 05-code-review.md
6. Done /done TASK_ID source files + all spec docs 06-implementation-done.md

Gate rules:

  • Stage 3 (Plan) cannot proceed if Stage 2 result is FAIL.
  • Stage 5 (Code review) cannot proceed without Stage 3 artifact.
  • Stage 6 (Done) cannot proceed without Stages 3 and 5 artifacts.

How it's organized

your-project/
β”œβ”€β”€ .claude/
β”‚   β”œβ”€β”€ commands/                    # Slash commands registered in Claude Code
β”‚   β”‚   β”œβ”€β”€ spec.md                  #   β†’ /spec TASK_ID
β”‚   β”‚   β”œβ”€β”€ review-spec.md           #   β†’ /review-spec TASK_ID
β”‚   β”‚   β”œβ”€β”€ plan.md                  #   β†’ /plan TASK_ID
β”‚   β”‚   β”œβ”€β”€ code-review.md           #   β†’ /code-review TASK_ID
β”‚   β”‚   └── done.md                  #   β†’ /done TASK_ID
β”‚   β”œβ”€β”€ context/                     # Permanent context loaded in every session
β”‚   β”‚   β”œβ”€β”€ role.md                  #   Claude's persona and tech stack expertise
β”‚   β”‚   β”œβ”€β”€ rules.md                 #   Coding and collaboration rules
β”‚   β”‚   └── conventions.md           #   Project-specific naming, structure, patterns
β”‚   β”œβ”€β”€ workflows/                   # Step-by-step workflow definitions (called by commands)
β”‚   β”‚   β”œβ”€β”€ task-to-spec.md
β”‚   β”‚   β”œβ”€β”€ review-spec.md
β”‚   β”‚   β”œβ”€β”€ spec-to-implementation-plan.md
β”‚   β”‚   β”œβ”€β”€ code-review.md
β”‚   β”‚   └── implementation-done.md
β”‚   β”œβ”€β”€ specs/
β”‚   β”‚   β”œβ”€β”€ template.md              # Output template used by the Spec stage
β”‚   β”‚   └── tasks/                   # One subfolder per task
β”‚   β”‚       └── example-task/        #   Complete worked example β€” reference only, do not edit
β”‚   β”‚           β”œβ”€β”€ 00-raw-task.md
β”‚   β”‚           β”œβ”€β”€ 02-spec.md
β”‚   β”‚           β”œβ”€β”€ 03-spec-review.md
β”‚   β”‚           β”œβ”€β”€ 04-implementation-plan.md
β”‚   β”‚           β”œβ”€β”€ 05-code-review.md
β”‚   β”‚           └── 06-implementation-done.md
β”‚   └── readme                       # Quick-start Claude reads on first session init
└── .gitignore

Prerequisites

  • Claude Code installed and authenticated
  • An existing project you want to add the workflow to

Quick start

1. Copy the workflow into your project:

git clone https://github.com/jakubstankowski/sdd-claude-workflow
cp -r sdd-claude-workflow/.claude your-project/.claude
cat sdd-claude-workflow/.gitignore >> your-project/.gitignore

Or click "Use this template" on GitHub to start a fresh repo with everything already in place.

2. Generate CLAUDE.md:

cd your-project
claude init

This scans your codebase and writes a CLAUDE.md with the tech stack, folder structure, and conventions Claude discovered.

3. Initialise the workflow context:

Open a new Claude Code session in your project and paste:

Read .claude/readme and follow the setup steps.
Then read CLAUDE.md and adjust .claude/context/conventions.md to reflect this project's actual conventions (tech stack, folder structure, naming, patterns).
Also adjust .claude/context/role.md to match the tech stack and domain found in CLAUDE.md.

Claude will load the workflow, update the context files, and confirm it is ready.

4. Review the context files:

File What to check
context/role.md Persona and tech stack match your project
context/rules.md Adjust if your team has different norms (usually fine as-is)
context/conventions.md Naming, folder structure, and patterns match your actual codebase

Everything is ready. Start your first task below.


Running a task

1. Create a task folder:

# Use your actual task ID from Jira, Linear, Azure DevOps, etc.
mkdir -p .claude/specs/tasks/PROJ-123

2. Write the raw task description:

Create .claude/specs/tasks/PROJ-123/00-raw-task.md with a plain-language description of what needs to be built. Paste directly from your issue tracker if you like.

Optionally add UI screenshots to .claude/specs/tasks/PROJ-123/ui/ β€” Claude will analyse them during the Spec stage.

3. Run the pipeline:

/spec PROJ-123
/review-spec PROJ-123
/plan PROJ-123

Implement the code based on 04-implementation-plan.md, then:

/code-review PROJ-123
/done PROJ-123

Reference example

.claude/specs/tasks/example-task/ is a complete worked example. All six output files are present so you can see exactly what each stage produces. Keep it as a reference β€” your own tasks go alongside it in separate folders.

About

Ready for use claude spec driven development workflow - feel free to check it out and use in your project πŸ˜‰

Topics

Resources

Stars

8 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors