/sb:spec

Spec compiler that produces canonical .planning/SPEC.md and .planning/REQUIREMENTS.md from the newest clarify brief (and any ingest draft) before implementation begins.

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.

Core value: SB prevents premature implementation by requiring a spec with acceptance criteria, out-of-scope boundaries, assumptions, and source-artifact references before planning starts.

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.md and need a new spec version.
  • The work depends on assumptions that should be visible to reviewers and implementers.

Outputs

ArtifactPurpose
.planning/SPEC.mdCanonical feature spec with overview, user stories, UX flows, acceptance criteria, assumptions, open questions, out-of-scope boundaries, source artifacts, and spec version.
.planning/REQUIREMENTS.mdDerived REQ/NFR list tied back to acceptance criteria and non-functional concerns.
.planning/DESIGN.mdConditional output when a design artifact or Figma URL is part of the spec context.

Workflow Steps

  1. Mode detection: detect greenfield vs augment mode by checking whether .planning/SPEC.md already exists, and load the newest *-CLARIFY-*.md brief plus any ingest draft.
  2. 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.
  3. 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.
  4. Assumption consolidation: honor statuses from the brief; resolve, accept, or tag remaining assumptions before writing the spec.
  5. Artifact injection: incorporate available source artifacts and record inaccessible sources explicitly.
  6. 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.

/sb:spec Add scheduled report exports for admins /sb:validate /sb Build the scheduled report export feature