Overview
/sb:spec implements catalog atomic flow AF-SPECIFY. It is a compiler: it reads the newest *-CLARIFY-*.md brief plus any ingest SPEC draft, writes the canonical spec artifacts, and runs artifact review before downstream planning consumes the result. Interviewing lives in /sb:clarify --spec.
It does not implement code and does not run the 9-turn interview. Its job is to compile a decision-ready brief into traceable planning inputs.
When to Use
- The feature has ambiguous scope or multiple user stories.
- You need acceptance criteria before planning or implementation.
- You are augmenting an existing
.planning/SPEC.mdand need a new spec version. - The work depends on assumptions that should be visible to reviewers and implementers.
Outputs
| Artifact | Purpose |
|---|---|
| .planning/SPEC.md | Canonical feature spec with overview, user stories, UX flows, acceptance criteria, assumptions, open questions, out-of-scope boundaries, source artifacts, and spec version. |
| .planning/REQUIREMENTS.md | Derived REQ/NFR list tied back to acceptance criteria and non-functional concerns. |
| .planning/DESIGN.md | Conditional output when a design artifact or Figma URL is part of the spec context. |
Workflow Steps
- Mode detection: detect greenfield vs augment mode by checking whether
.planning/SPEC.mdalready exists, and load the newest*-CLARIFY-*.mdbrief plus any ingest draft. - Compile inputs: map the clarify capture schema (and ingest SPEC dump, if any) onto the SB spec scaffold. Do not re-run the 9-turn interview.
- Domain completeness: treat problem, scope, stories, and AC in the brief as covered. Gap-fill questions only for required SPEC sections that are still empty.
- Assumption consolidation: honor statuses from the brief; resolve, accept, or tag remaining assumptions before writing the spec.
- Artifact injection: incorporate available source artifacts and record inaccessible sources explicitly.
- Write and review artifacts: write SPEC.md, derive REQUIREMENTS.md from SPEC acceptance criteria, optionally write DESIGN.md, then run artifact review to two consecutive clean passes.
Non-Skippable Gates
The core spec contract cannot be skipped:
- Consume newest clarify brief when present (brief-domain completeness, not a live turn-counter)
- Assumption consolidation
- Writing
.planning/SPEC.md - SPEC artifact review
- REQUIREMENTS artifact review
- DESIGN artifact review when DESIGN.md is produced
SB Handoff
After /sb:spec completes, use /sb:validate when plans already exist or proceed into the appropriate /sb feature path. SB planning consumes the spec and requirements as upstream constraints; SB hooks later maintain PR traceability and UAT freshness against the spec version.