/sdd:spec-designfrom sdd
Generative fork - research the active feature (discovery by classification) and write design.md with boundary-first architecture, considered alternatives with trade-offs, and a mermaid diagram. Use after /sdd:spec-requirements; the main context presents the result and runs the confirm gate.
Ships in sdd. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
You are a FORK: a fresh subagent with no conversation history. This skill body is your entire task prompt - everything you need is resolved from beans and files below. You NEVER ask the user questions (no AskUserQuestion exists in your path) and you never dispatch subagents: when you cannot proceed, return the BLOCKED status contract from the Return contract section. The main context that invoked you owns all dialogue and the confirm gate.
Your job: research the feature (classified discovery), then draft, review,
and write .sdd/specs/<feature>/design.md - the HOW to the requirements'
WHAT.
mkdir, and read-only inspection.validated-tag and Doc-hash writes - belongs to the
main context (Return contract), and task-bean lifecycle
belongs to /sdd:spec-tasks. Never write progress, approval, or
blocked state into documents.Query beans: beans list --json -t epic -s in-progress.
Spec path: line in the bean body
(.sdd/specs/<feature>/); if the body names none, return BLOCKED
asking the main context where the feature lives./sdd:spec-init (a spec is already shaped) or /sdd:discovery
(nothing shaped yet).Gate: the design phase runs only after the requirements phase is approved. If the
Phase — requirementsbean is notcompleted, STOP - return BLOCKED naming/sdd:spec-requirements.
Query the epic's children once:
beans query --json '{ bean(id: "<epic-id>") { children { id title status tags blockedByIds } } }'
(the resolved relation blockedBy is broken in beans v0.4.2 - always
read blockedByIds). Identify the phase beans by exact title plus the
phase tag: Phase — requirements, Phase — design, Phase — tasks.
Phase — requirements bean under the epic -> return BLOCKED:
the epic predates phase gates; the main context resolves the missing
gate beans with the user (spec-init creates them at feature birth).Phase — requirements not completed -> the gate above: BLOCKED
naming /sdd:spec-requirements.Phase — design already completed -> re-entry into an approved
phase (spec Revision 5): return BLOCKED stating the re-entry and that
the main context must escalate (reopen the phase, then re-invoke; or
stop). Never rewrite an approved design silently - the tasks phase
gates on this bean.Phase — design bean missing while requirements is completed ->
partial legacy state: the design work may proceed, but the confirm
gate cannot close the phase - it names /sdd:spec-init (whose heal
path creates missing phase beans) before completion. Carry the gap as
a CONCERNS line so it reaches the gate.Keep the design phase bean id at hand (when present); return it in the summary block (PHASE line) - the main context validates onto it and completes it at the confirm gate.
Read, under the spec directory from Step 1:
.sdd/specs/<feature>/requirements.md - REQUIRED. Missing -> return
BLOCKED pointing to /sdd:spec-requirements..sdd/specs/<feature>/workspace/qa-digest.md and .sdd/brief.md -
interview intent and workstream narrative, when present..sdd/specs/<feature>/research.md - prior discovery or validate-gap
output, when present.${CLAUDE_PLUGIN_ROOT}/assets/rules/design-principles.md - design
rules (boundary first, type safety, visual communication).${CLAUDE_PLUGIN_ROOT}/assets/templates/design.md - document
structure.${CLAUDE_PLUGIN_ROOT}/assets/templates/research.md - discovery log
structure.Existing design.md (.sdd/specs/<feature>/design.md present): treat
it as the edit-merge base - improve and extend it, do not rewrite
untouched sections - unless an edit round below says otherwise.
Edit rounds: if .sdd/specs/<feature>/workspace/design-edits.md
exists, it holds cumulative edit intent from the user. Every recorded
## Round <K> must be satisfied by the document you produce. A round
titled Regenerate from scratch overrides the edit-merge base: rewrite
fully. Append nothing to the digest yourself.
Classify from the epic description, requirements, brief, and codebase:
${CLAUDE_PLUGIN_ROOT}/assets/rules/design-discovery-full.md.${CLAUDE_PLUGIN_ROOT}/assets/rules/design-discovery-light.md;
escalate to full discovery when its own escalation criteria fire.Research discipline:
lsp-code-analysis skill (LSP operations
first; Grep/Glob fallback). Map the existing patterns, integration
points, and boundaries the design must respect.Apply ${CLAUDE_PLUGIN_ROOT}/assets/rules/design-synthesis.md to the
full discovery picture - generalization, build-vs-adopt, simplification.
Persist findings: create or update .sdd/specs/<feature>/research.md
per its template - key findings, evaluated options, decisions with
rationale, risks. The design document stays self-contained; research.md
holds the raw investigation behind it.
Draft in memory against the template. Where this skill and
${CLAUDE_PLUGIN_ROOT}/assets/templates/design.md conflict, this skill
wins - the rule is general. Keep it unwritten until the review gate
passes. Mandatory content:
_Boundary:_ annotations
and implementation briefs.Review gate: apply
${CLAUDE_PLUGIN_ROOT}/assets/rules/design-review-gate.md -
bounded at 2 repair passes.
If the gate exposes a real requirements gap or ambiguity, do NOT write a
patched-over design: return BLOCKED naming the exact gap and pointing
back to /sdd:spec-requirements.
Write .sdd/specs/<feature>/design.md (and research.md, Step 5) only
after the gate passes, then return the summary block.
To the fork (your final message). Return exactly this block - the
caller parses the heading and the - STATUS: line mechanically:
## Design Summary
- STATUS: <DONE | BLOCKED>
- DISCOVERY: <full | light | skipped - one line on what was researched>
- APPROACHES: <one line per approach considered, marking the recommended one>
- CONCERNS: <one line each, if any>
- PATH: <.sdd/specs/<feature>/design.md, or - when BLOCKED>
- PHASE: <design phase bean id from Step 2, or `missing` - the gate closes with it>
- BLOCKERS: <BLOCKED only - the gap or condition, and the command to run>
To the main context. You invoked this fork; it cannot ask the user anything, so you own the confirm gate. On DONE: present a SHORT summary in chat - discovery type, the approaches considered with the recommended one, boundary highlights, and concerns.
The full document is .sdd/specs/<feature>/design.md; point the
user at the path. Do not dump the document into chat.
No new open questions from you here - confirm-only. Then AskUserQuestion:
Approve (Recommended) - the design phase is settled. Approval runs the independent validator FIRST (spec Revision 6): the phase completes only on its GO.
model: opus, paths only:
Agent(
description: "Validate design for <feature>",
subagent_type: general-purpose,
model: opus,
prompt: (paths only)
Apply: <abs-path>/skills/validate-design/SKILL.md
Feature dir: .sdd/specs/<feature>/
Document: .sdd/specs/<feature>/design.md
Return exactly the summary block the validate-design skill
defines.
)
Parse discipline: only the exact summary block and its
- STATUS: and - VERDICT: lines count; resume the fork once
(SendMessage) if the block is missing,
ambiguous, or replaced with prose. Present its verdict, any
criterion verdicts, findings, and fixes to the user - short
lists in chat, the file when PATH names one.completed IS the approval record, spec Revision 5):
beans update <design-phase-id> --tag validatedshasum -a 256 .sdd/specs/<feature>/design.md## Validation round to the PHASE BEAN body
(--body-append; create the section on the first round,
later rounds append beneath it - only the latest
Doc-hash: counts at later gates): date, verdict GO,
Doc-hash: <the sha256 just computed>
(this freshness write mirrors ${CLAUDE_PLUGIN_ROOT}/bin/sdd-gate's read)beans update <design-phase-id> -s completed
Then name the next command in a code block:/sdd:spec-tasks
MINOR findings travel with the document into the next phase -
name them at the completion presentation. (Legacy case from
the phase-gate check - no design phase bean: skip the writes
above and name /sdd:spec-init for its heal path; a heal run
creates the bean, and a re-run of this gate validates onto it.)1. Per plan: approval requires a validated design document -
zero BLOCKING findings
2. Actual: the validator returned NO_GO - <the BLOCKING
findings>
3. Why it matters: approving now would carry the defects into
every downstream phase
4. Options: revise now / stop
The phase stays open - no tag, no hash, no completion.
Revise now takes the Edit option below with the findings as
the seed feedback - and the next Approve re-dispatches the
validator. Loop edit -> validate until GO or the user stops.A standalone /sdd:validate-design run stays available anytime
as a formative check; the approve gate above runs its own
validation regardless.
Edit - the user supplies feedback. Append it under
## Round <K> in
.sdd/specs/<feature>/workspace/design-edits.md (create the file if
needed; workspace files are append-only), then re-invoke
/sdd:spec-design - a NEW fork reads the digest plus the existing
document and edit-merges. Edit rounds are user-driven with no fixed
cap, but each round must carry concrete feedback.
Regenerate from scratch - offer when design.md existed before
this run. Append ## Round <K> - Regenerate from scratch to the
digest and re-invoke /sdd:spec-design.
Stop - the user takes over; the document stays on disk.
The re-entry BLOCKED case escalates with the Revision 5 triple:
Reopen (Recommended) - set the design AND tasks phase beans to
todo (beans update <phase-id> -s todo each) with a one-line reason
appended to each, then re-invoke /sdd:spec-design: the fork runs
under the reopened gate and the confirm gate re-completes it; Accept
desync risk - set only the design phase bean to todo (the gate must
open for the redo) and append a one-line dated note to the epic body
(Desync accepted: design re-entered while the tasks gate reads completed), then re-invoke /sdd:spec-design: the redone design lands
while the tasks phase stays completed - the risk is on record, not
silent; Cancel - nothing changes.
What SKILL.md sets; muted values are Claude Code's defaults
opusnpx claudepluginhub jazz-man/claude-marketplace --plugin sdd15 skills in this plugin
/debugRoot-cause-first debugging protocol - reproduce, isolate, confirm the root cause, then plan the minimal fix. Use when an implementer is blocked, verification fails, or repeated remediation does not converge./discoveryEntry point for new work. Researches the user's idea against the codebase, the workstream brief, and beans state, then routes it via AskUserQuestion - extend an existing spec, no spec needed (answered directly in chat), a single new feature, or a sequential multi-spec initiative queued in beans. Writes .sdd/brief.md./implExecute the active feature's approved task plan one task at a time - dispatch subagent implementers and reviewers, run the bounded fix loop, verify completion with fresh evidence, and stop after every task for the user's review.