Command reference
Every command takes --root <dir> (the shell function sets it to your current
directory) and most take --auto for non-interactive runs. Every AI command opens
with a model · root preamble and ends with a Next: hint;
sdd help (or -h) lists them all.
The pipeline
| Command | What it does |
|---|---|
| sdd [dir] sdd setup |
Bootstrap a project. First it asks the default model (a specific version —
Opus 4.8 / Sonnet 5 / Haiku 4.5), then runs evidence-based passes — operational
(detect stack + commands, run the safe ones for a real baseline), purpose
(draft PRODUCT.md and interrogate you to correct it; a greenfield repo is
interviewed about the product, its users' needs, first feature, success
criteria, constraints, non-goals, domain, ambition, and stack → a substantive
PRODUCT.md), process (how you ship) — plus a domain-expert
picker that suggests 3 experts from your PRODUCT.md (or name any). Writes
CLAUDE.md, PRODUCT.md, .sdd/config.json, and an editable
experts/<name>.md per expert. A greenfield repo is also
git init-ed. Re-runs never clobber your edits. |
| sdd · sdd interactive | Once set up, a bare sdd opens the master-detail navigator:
features left, the selected feature's full state right (stage glyphs, build progress bar,
next step), a persistent activity strip (a toggles), and
token/limit usage in the footer. ↵ runs the next stage in the same frame — a
reviewed feature is ready to ship and ↵ shows the
commit/PR/merge commands instead of re-reviewing. v opens the
kanban board (columns from the gate labels; ↵ runs a card's
stage, a/b advance/bounce its gate, i/o
open it on GitHub). w watches a background build;
+/- sets the agent count. Piped/CI prints the static summary;
-i forces the navigator. |
| sdd help · sdd --version | The full command list (-h; an unknown command prints it too, rather than
failing silently); --version / sdd version prints the installed
version, also shown in help and the navigator. |
| sdd spec "<desc>" | Draft specs/<slug>/spec.md. The expert panel (product, UX, security +
your domain roster) raises considerations; you answer the combined questions one at a
time, watch the spec stream in live, and at the preview you can
refine it in plain English (e) before writing. |
| sdd plan <slug> | Decompose the spec into plan.md — an ordered list of small,
independently-testable tasks, built for trunk-based CI/CD (feature-flag what isn't ready
to expose). Same guided flow, live streaming, and e to refine. Re-planning
over an existing plan confirms before overwriting. |
| sdd build <slug> sdd build --agents N |
Implement a task and run the implement → test → fix loop, bounded. With no
--task N it advances to the first unbuilt task (progress is
tracked, so it won't redo task 1); --all does the rest, or a at the
gate. The whole plan shows as a ✓ / ▸ / ○ checklist so you see what's left. Branches to sdd/<slug> first when you're on a
trunk (--no-branch to opt out). Edits auto-apply; the agent cannot run shell
commands — the CLI verifies. Never commits, and a task that changes nothing is a
⚠ warning, not a false ✓.
A live build panel shows the current task N/M, what
the agent is doing, per-task tokens in/out, and your Claude plan
usage (the 5-hour and weekly windows) — dollar costs appear only on API-key runs. A retry names why it happened
(the failing test), rather than looping silently.
The build runs in the background: press esc to leave
it running and go back to the navigator (a live chip tracks it; w re-attaches),
or x to stop it. --agents N (or +/-
in the navigator) runs independent tasks concurrently — each in its own
git worktree, merged back and verified one at a time — with a panel row per agent. |
| sdd review [<slug>] | Review the diff against the spec + plan with the multi-lens panel, adversarially
verified. Writes review.md; --comment posts to the current
branch's PR (--pr N to target one). --base <ref> to diff
against a ref. |
| sdd feature "<desc>" | The whole pipeline in one shot: spec → plan → build (all tasks) → review, branching first. For when you've calibrated trust. |
| sdd status | Every feature's position in the pipeline — which artifacts exist, and any review findings. |
The board & the runner
| Command | What it does |
|---|---|
| sdd link | Connect this repo's GitHub board: detects the origin remote, records it in
.sdd/config.json, and provisions the gate labels. No remote?
It offers to create one under your gh-authed account
(gh repo create) and wire origin — rather than erroring.
--project also creates an aggregating GitHub Project and prints a
clickable link to the board. Either way it then
populates the board from your existing local features — one issue per
feature, labelled for its next step (plan / build / review / done) — so the board mirrors
sdd status. Idempotent: re-running never duplicates. |
| sdd board [--project] | Provision the gate labels (sdd:spec … sdd:done,
sdd:awaiting-you) on the configured repo. With --project, also
create/reuse a GitHub Project as an aggregating view. When nothing's connected yet it falls
through to the sdd link create-a-repo flow. With a product registry, provisions
every owned part's repo + one org-level Project. |
| sdd new "<title>" | Open a ticket already in the pipeline (labelled sdd:spec).
--body "…" for detail. |
| sdd approve <n> | Approve a ticket at a review gate → advance to the next stage
(spec-review → plan, plan-review → build,
build-review → review). |
| sdd bounce <n> | Send a review-gate ticket back to its stage for another pass.
--note "why" posts your feedback as a comment the next pass reads. |
| sdd draft <n> | Pull a ticket into the interactive TUI — draft → interrogate → refine, with experts — then push the result back onto the ticket and advance its gate. The synchronous alternative to the comment-thread dialogue. |
| sdd run | The headless runner: poll the board, dispatch actionable tickets under a concurrency cap.
--once for a single cycle, --max-agents N (default 3).
Inert until runnerActive: true in .sdd/config.json. Unattended
use wants ANTHROPIC_API_KEY; --allow-subscription overrides for
personal, hands-on runs. |
Multi-repo products
| Command | What it does |
|---|---|
| sdd product init | Scan the current folder's child git repos and scaffold the product registry
(.sdd/project.json) + a shared PRODUCT.md.
--name "<product>", --reference "a,b" to mark
context-only parts. With a registry present, spec/plan ground
across the parts and the runner's build fans out a PR per repo. |
Flags & environment
| Flag / variable | Effect |
|---|---|
| --verbose · --vv | Narrate what's happening. Setup shows each pass live — detecting the stack, running `pnpm test` for a baseline… ✓ in 3.2s, drafting PRODUCT.md. This is the answer to "why is sdd slow": it runs your real test/build commands for a baseline. |
| -i / --interactive · --no-interactive | Force the live navigator on / off for a bare sdd (default: navigator on a terminal, static summary when piped). |
| --auto · --root <dir> · --all | Non-interactive run · act on a specific project dir (the shell function sets it) · build all remaining tasks. |
| --agents N | sdd build: run N independent tasks concurrently, each in its own worktree, integrated + verified serially. Default 1 (sequential). In the navigator, +/- sets it (persisted to .sdd/config.json). |
| SDD_MODEL | Route the AI stages to a specific model — an id like claude-sonnet-5 / claude-opus-4-8 / claude-haiku-4-5-20251001 (or the sonnet/haiku aliases). Setup records the chosen model into .sdd/config.json; every AI command shows it in its preamble. Default: your Claude Code model. |
| ANTHROPIC_API_KEY | API-key auth for the unattended runner (a subscription is for interactive use, per Anthropic's terms). |
| GH_TOKEN | Standard gh auth override for board/PR operations. |
Files it reads & writes
PRODUCT.md # north star — created by setup, corrected by you
CLAUDE.md # `sdd-framework` block: stack, commands, process
.sdd/config.json # roster names, model, stack, agent count, board connection, runner flag
experts/<name>.md # one editable persona per domain expert — tune by hand
.sdd/project.json # multi-repo only: the parts registry
specs/<feature>/spec.md # the what
specs/<feature>/plan.md # the how — ordered task list
specs/<feature>/review.md # the panel's verified findings
All committed, all human-editable. Setup and product-init never overwrite an existing file without your explicit approval.