Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/jorgeferrando/sdd-skills/llms.txt

Use this file to discover all available pages before exploring further.

This guide walks through the complete SDD setup for a brand new project — from initializing the openspec/ directory to completing your first feature cycle. By the end you will have steering files capturing your project’s context, a working spec-to-code pipeline, and a closed, archived change that proves the workflow end to end.

Prerequisites

  • SDD Skills installed (see Installation)
  • An AI coding assistant (Claude Code, Cursor, Codex, or GitHub Copilot)
  • A git repository initialized (git init)

1

Run /sdd-init

/sdd-init is the first command of any SDD project. It creates the openspec/ directory structure, scans your environment, runs a short questionnaire, and generates 7 steering files that every other skill reads to understand your project.
/sdd-init
The questionnaire is split into four groups:
GroupQuestions about
A — ProjectWhat the system builds, who uses it, what is explicitly out of scope
B — StackLanguage, framework, database, testing stack
C — Team & rigorTeam size, quality level (MVP/production/open-source), CI/CD
D — ToolsAvailable MCPs (only asked when MCPs are detected in the environment scan)
E — PatternsArchitecture style, TDD approach, commit format
If a stack is already detected (existing package.json, pyproject.toml, go.mod, Cargo.toml, etc.), Group B is skipped automatically. Use /sdd-init --quick for minimal questions with sensible defaults — only Groups A and B are asked, and C/D/E use sensible defaults.
When complete, openspec/steering/ contains these 7 files:
FileContent
product.mdWhat the project builds and for whom
tech.mdStack, dependencies, dev/test commands
structure.mdDirectory layout, layers, responsibilities
conventions.mdRules that cause PR failures (RFC 2119: MUST/SHOULD/MAY)
environment.mdAvailable MCPs, CLIs, runtimes, Docker containers
project-skill.mdQuick-reference index pointing to the other steering files
project-rules.mdEmpty at first — grows as the AI learns from your corrections
/sdd-init is safe to re-run. If steering files already exist, it shows the current state instead of re-running the questionnaire.
2

Start your first feature — /sdd-new

Once openspec/ is initialized, start your first feature with /sdd-new. This single command combines codebase exploration and proposal writing.
/sdd-new "user registration"
Internally, /sdd-new runs two steps:
  1. Explore — reads the codebase in read-only mode to find relevant patterns, affected files, and any existing specs in openspec/INDEX.md. Writes findings to notes.md.
  2. Propose — reads the exploration notes, checks for gaps, asks clarifying questions if needed, and generates proposal.md.
The resulting proposal.md follows this structure:
# Proposal: User Registration

## Metadata
- **Change:** user-registration
- **Ticket:** N/A
- **Date:** YYYY-MM-DD

## Context
Why this change is needed and what triggered it.

## Problem
What is wrong or missing in the current system.

## Scope
What is in scope and what is explicitly out of scope.

## Proposed Solution
High-level approach — what to build, not how.

## Alternatives Discarded
| Alternative | Reason discarded |
|-------------|-----------------|

## Risks & Mitigations
| Risk | Likelihood | Impact | Mitigation |
|------|-----------|--------|------------|

## Impact
Files affected, domains, tests needed.

## Dependencies
- None

## Acceptance Criteria
- [ ] Verifiable condition 1
- [ ] Verifiable condition 2
Review the proposal and give feedback or approve it before moving on.
3

Advance through spec, design, and tasks with /sdd-continue

With proposal.md approved, run /sdd-continue three times — once for each remaining documentation phase. Continue detects which phase is pending by reading your change directory, so you never need to remember the order.First call → Spec
/sdd-continue
/sdd-spec identifies the affected domain, checks whether a canonical spec already exists at openspec/specs/{domain}/spec.md, and writes a delta spec — only what changes, not a full rewrite. It uses Given/When/Then format and resolves edge cases interactively before writing.
openspec/changes/user-registration/specs/auth/spec.md
Second call → Design
/sdd-continue
/sdd-design runs as a subagent (non-interactive), reads the proposal and spec, then produces a concrete implementation plan covering files to create, files to modify, architecture decisions, and a scope assessment. Changes touching more than 20 files trigger a split recommendation before continuing.
openspec/changes/user-registration/design.md
Third call → Tasks
/sdd-continue
/sdd-tasks reads design.md and produces an ordered task list. Tasks are sorted by dependency: interfaces first, base files before files that use them, tests interleaved or after. Each task maps to exactly one file and one commit.
## Implementation Tasks

- [ ] **T01** Create `src/auth/user.entity.ts` — User entity and types
  - Commit: `[user-registration] Add User entity`

- [ ] **T02** Create `src/auth/user.repository.ts` — persistence interface
  - Commit: `[user-registration] Add UserRepository interface`
  - Depends on: T01

- [ ] **T03** Create `src/auth/register.use-case.ts` — registration logic
  - Commit: `[user-registration] Add RegisterUser use case`
  - Depends on: T01, T02

## Quality Gate

- [ ] **QG** Run tests and quality checks
Review and approve the task list before moving to implementation.
4

Implement with /sdd-apply

With tasks.md approved, run /sdd-apply to implement the change task by task.
/sdd-apply
Before writing any code, /sdd-apply verifies that conventions.md exists — it refuses to start without it. Then for each pending task it launches a subagent that:
  1. Reads similar existing code to follow established patterns
  2. Implements the change
  3. Runs tests and lint on the modified file
  4. Makes an atomic commit: [user-registration] Description
  5. Marks the task [x] in tasks.md
  6. Reports a one-line summary back to the orchestrator
Unplanned work is never silently absorbed. If something comes up that isn’t in tasks.md, it gets registered as BUG01 or IMP01 before being implemented — tasks.md is always the complete record of what was done.Use /sdd-apply --auto to skip the between-task confirmation prompt on small, low-risk changes. Use /sdd-apply T03 to resume from a specific task.
5

Verify and archive

Once all tasks are marked [x], verify the change and close the cycle.Verify:
/sdd-verify
Runs as a subagent and checks:
  • Full test suite (not just changed files)
  • Linter and formatter on changed files
  • Self-review checklist: test coverage, input validation, method size, no hardcoded values, no duplication, type hints, spec compliance
  • Convention audit against conventions.md
  • Creates the PR with context pulled from proposal.md
Output is either READY FOR PR or a list of issues to fix before merging.Archive:
/sdd-archive
Closes the cycle by merging delta specs into canonical specs at openspec/specs/{domain}/spec.md, updating openspec/INDEX.md, and moving the change directory to openspec/changes/archive/{date}-user-registration/. Canonical specs now reflect the current system state.

Command sequence

Quick reference for the complete new-project flow:
/sdd-init
/sdd-new "user registration"
/sdd-continue   # spec
/sdd-continue   # design
/sdd-continue   # tasks
/sdd-apply
/sdd-verify
/sdd-archive
Once you’re comfortable with the standard flow, use /sdd-ff instead of the three /sdd-continue calls. Fast-forward generates proposal, spec, design, and tasks in a single pass — ideal for changes with clear, well-understood scope.

Fast-Forward Mode

Run the full propose → spec → design → tasks cycle in one command for clear-scope changes.

Build docs developers (and LLMs) love