/sdd:specifyfrom sdd
Turns a raw feature idea into a reviewed spec.md via a Socratic interview, then drafts a full product spec with context, goals, user stories, acceptance criteria, NFRs, and KPIs. Validates each criterion Socratically and runs a clean-context critic before writing.
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.
Read when SKILL.md points to them.
Turns a one-line idea into a reviewed spec.md: a lightweight interview captures and stress-tests the idea, then the skill drafts a product spec (context → goals → user stories → acceptance criteria → NFRs → KPIs), validates it Socratically, and runs a clean-context critic before writing. Less typing, more reviewing. This file is the spine; detail lives in references/.
The Socratic machine, the critic, and the size matrix are shared — this skill keeps only its deltas:
→ ../_shared/socratic-loop.md · ../_shared/critic.md · ../_shared/size-matrix.md · ../_shared/ask-style.md
Depth governs question volume + autonomy (and which ideation analyses run) → ../_shared/interview-depth.md.
Document prose follows the project's artifact_language setting — section headings, frontmatter and machine tokens stay English → ../_shared/artifact-language.md.
PM + Tech Lead (co-authors). PM drives goals / non-goals / KPIs; Tech Lead drives context patterns and the acceptance-criteria coverage.
<slug> — kebab-case feature slug.CONTEXT.md — the two-level glossary: read both repo-root (project-wide) and docs/features/<slug>/CONTEXT.md (feature-scoped); per-feature wins on conflict → ../glossary/SKILL.md. If present, its roles/terms are canonical and override anything that contradicts them.docs/features/<slug>/.size — depth hint (MVP vs Full per the size matrix). Read if present; established here if absent (step 1 classifies + writes it), so downstream stages never silently default to M. classify-size re-classifies when scope changes.docs/idea-brief.md — read before repeating discovery; identity, readiness and reuse
follow ./references/brief-reuse.md. A brief is not mandatory..claude/sdd.local.md is absent, create it now from the canonical template — documented defaults + the self-documenting body — and patch .gitignore; if it exists, read it and never overwrite. The one procedure lives in ../_shared/settings-file.md. Creating is unconditional; changing values is only ever offered by config. Say one line: «.claude/sdd.local.md created with documented defaults — /sdd:config to tune it». Then read context + set the interview depth. If a CONTEXT.md exists (read both repo-root and docs/features/<slug>/ — per-feature wins on conflict), load its ## Glossary as session state (canonical roles + terms). If .size exists, read it to size the spec's depth; if it's absent, establish it now — run the classify-size protocol inline (the canon: ../classify-size/SKILL.md + the mapping in ../_shared/size-matrix.md); the four signals fold into one bundled AskUserQuestion here (at easy depth, take the matrix default and record it in the assumptions ledger), and write docs/features/<slug>/.size + .route (the route defaults from the size — XS/S→quick, M→standard, L/XL→full — and is confirmed in the same bundled question, per the Routes table in ../_shared/size-matrix.md) — so every later stage reads a real size instead of silently defaulting to M (the gap that otherwise surfaces only at plan-tests). classify-size stays the utility to re-classify when scope changes. If docs/architecture-map.md exists (from survey), read it so the spec is architecture-aware — it informs §1 Context, §2 Constraints, and §3 Non-goals (what the existing system already does / can't do). Absent → suggest running survey first, but proceed (the spec is product-level and can be captured without it). Do not leak the map's tech into §5 AC — AC stay business-observable; the map shapes constraints, not acceptance criteria. Then set the interview depth (the opening question): read interview_depth from the settings file ensured in the first sentence of this step (else default medium), and — unless a --depth=easy|medium|hard arg was passed (which skips the question) — ask ONE depth-selection AskUserQuestion phrased per ../_shared/ask-style.md, with the saved/medium value as the «(Recommended)» first option, overridable per run. The chosen level governs the step-2 deep-dive volume, the step-3 ideation suite, and the step-7 Socratic volume → ../_shared/interview-depth.md. (Completeness — §5's 5-type AC floor — is unaffected by depth.) Bootstrap spec.md: copy ./templates/spec.md to docs/features/<slug>/spec.md now (frontmatter stamped, sections still placeholders) — from here on every resolved section lands in that file immediately, never held in memory until the end → ../_shared/write-and-commit.md../references/brief-reuse.md: read the existing brief, check scope/readiness, reuse accepted answers and relevant evidence, and ask only specification gaps. For an already supplied idea, do not ask the user to repeat it. Without a usable brief, the standalone interview front follows: if the raw idea is absent, ask for it in 1–3 sentences; otherwise reuse the user's original words as the baseline. Then a Socratic deep-dive across problem clarity / success criteria / constraints / strategic fit, delivered in batches of 2–3 — its volume scales with the depth dial (easy: only the few un-inferable ones, then a stated-assumptions ledger; medium: 3–5; hard: walk every angle, foreground each trade-off). Phrase every question per ../_shared/ask-style.md../references/brief-reuse.md before dispatch: reuse covered signals at every depth, run only remaining/reopened gaps, and never manufacture absent RICE/matrix outputs. Without a usable brief, run the ideation analyses as named-subagent dispatches gated by the interview-depth dial (size as a secondary trimmer) → ./references/ideation.md: easy → skip the suite (deep-dive only; the chosen approach is recorded as a ledger assumption); medium → researcher (sdd:researcher, competitive/web) + devils-advocate (sdd:devils-advocate, failure-mode mode); hard → full suite researcher + strategist (sdd:strategist, 3 approaches) + analyst (sdd:analyst, multi-perspective) + devils-advocate, then the Claude-proposed RICE/feasibility confirm. Analyses stay product-level (no tech names — that's design); the confirmed recommendation becomes §1 ¶3. Dispatch with subagent_type: "sdd:<name>" per ../_shared/agent-roster.md (general-purpose fallback); researcher needs web — accept its RESEARCH_LIMITED output as a noted gap if web is unavailable.glossary <slug> for it immediately — compare it against CONTEXT.md and add/update the definition before continuing. By the time the spec is written, every §4 role and §5 domain term is already glossary-canonical; the glossary is never a deferred batch. (Plan-mode nuance: still decide add/update per term in-flow; if writes are blocked until the spec write-point, persist the reconciled terms together with the spec, but never skip the per-term compare.)AskUserQuestion): reference module code / project docs / MCP-Atlassian (Confluence/Jira) / knowledge-base / none. For each picked channel ask the specific path/query — no silent broad scans../templates/spec.md (its <!-- instruction --> comments are the per-section contract). Draft per ./references/draft-generation.md: per-section sources, the 5 AC coverage types (happy / error / authorization / domain invariant / cross-context), and the stack-agnostic forbidden-token rule for acceptance criteria. §1–§3 (not per-item walked) go into spec.md as soon as they are drafted../references/socratic.md: AC has a 5th option «Add another AC»; the §5 coverage gate enforces two floors after drops/OQ-migrations — (a) ≥1 AC of each of the 5 coverage types, and (b) ≥1 AC per retained §4 user story (regenerate/add a replacement if a type or a user story is left empty). Both are floors, not dials — enforced at every depth; only the question volume scales. The (b) floor closes the §4→§5 link so the downstream sequences use-case coverage + review trace can't be undermined by a user story that lost its only AC. Maintain the edits-log. Write each section into spec.md right after its last decision resolves (§8 gets each save_as_oq row as it happens).critic agent — subagent_type: "sdd:critic" (model per judgment_model, effort high — xhigh on L/XL via CLAUDE_CODE_EFFORT_LEVEL; clean-isolated context per ../_shared/agent-roster.md) — with the specify delta in ./references/critic.md (over ../_shared/critic.md) — inline the edits-log + current owner corrections, it Reads docs/features/<slug>/spec.md from disk + CONTEXT.md + the idea source (including the reused brief) itself and checks preservation of accepted constraints and evidence limits. Resolve findings via AskUserQuestion (Accept revert / Accept amendment / Override-with-rationale → §1 ¶4 bullet). Patch spec.md on disk with every accepted revert/amendment as it is resolved. Run the forbidden-token regex scan over the file as the F6 backstop (glossary already reconciled in-flow per step 4). Register on the roadmap: in docs/roadmap.md (via roadmap) set the matching step's Status: spec'd and link this feature folder; no matching step → append one (source anchor = this spec). (If there's no roadmap yet, skip — it's optional.) Commit per ../_shared/write-and-commit.md — only after the critic + F6 scan pass; one commit per document: specify: <slug> spec.md, specify: <slug> .size+.route (one commit), specify: <slug> CONTEXT.md (each glossary file the in-flow reconciliation changed), specify: roadmap.md — skipping any that didn't change. Then emit the stage-handoff block per ../_shared/handoff.md — What I did + Review (spec.md, .size, .route) + Run next — resolve the next stage per .route (the Routes table in ../_shared/size-matrix.md; route-resolved variant in handoff.md): forward /sdd:clarify <slug>; clarify's N/A condition = zero §8 open questions and no AC flagged ambiguous, skip target /sdd:ux-flows <slug> (on quick — auto-skip with the reason + inverted ↳ or; on standard — offer the ↳ or; on full — no skip line). When clarify is legally skipped, carry the next condition forward: evaluate ux-flows' N/A condition too (no human-facing UI — every §4 actor a system/service, or the repo has no UI at all, per ../_shared/size-matrix.md) → holds ⇒ the skip target becomes /sdd:design <slug>. (If critic is unavailable, fall back to a general-purpose Agent with the same delta.)docs/features/<slug>/spec.md written; all sections filled (or <!-- N/A: reason -->).docs/features/<slug>/.size and .route exist after this stage (read if present, else classified + written here) — the backbone no longer reaches design…plan-tests on a silent M default, and every handoff resolves per a real route.module.error_name strings / JSON fragments / SQL constructs).CONTEXT.md glossary exactly (no invented user/admin).spec.md read from disk; every finding resolved or overridden.spec.md was bootstrapped in step 1 and filled section by section; after the self-check, one commit per changed document (spec.md, .size+.route, CONTEXT.md, roadmap.md), SHAs listed in the handoff — per ../_shared/write-and-commit.md.../_shared/self-check.md); its result is reported in the handoff.design.api and decide-adr.easy depth — over-production. The depth dial gates it (easy skips entirely; medium runs research + devil's-advocate; hard runs all). Feature size only trims volume within a level — it's no longer the gate.N/A — internal tool than fake research; accept the researcher agent's RESEARCH_LIMITED over fabricated rows../references/ideation.md — depth-gated ideation orchestration: which named subagent (researcher / strategist / analyst / devils-advocate) runs at which level, what each returns, how outputs feed the spec.../_shared/interview-depth.md — the easy/medium/hard dial set in step 1 (question volume, autonomy, which analyses run)../references/draft-generation.md — per-section sources, 5 AC coverage types, stack-agnostic forbidden tokens../references/socratic.md — specify's delta over the shared Socratic loop../references/critic.md — specify's delta over the shared critic (F6 = forbidden tokens)../templates/spec.md — output scaffold; inline comments are the per-section generation contract.What SKILL.md sets; muted values are Claude Code's defaults
inherithighnpx claudepluginhub genkovich/sdd --plugin sdd23 skills in this plugin
/apiUse to derive the API contract for a feature — an OpenAPI 3.1 document at docs/features/{slug}/contracts/openapi.yaml plus a drift/sync report (and an events doc when the feature has async flows). Triggers on "api for {slug}", "openapi for {slug}", "API contract for {slug}", "lock the interface for {slug}", "events for {slug}", "/sdd:api {slug}", "контракт API для {slug}", "OpenAPI для {slug}", "опиши ендпоінти". The contract is never hand-written: it is a derived function of data-model.md (typed fields + constraints), the sad.md §6 sequence diagrams (error branches, async actors), and spec.md acceptance criteria. Runs an inline drift check (does the contract match the model and the sequences?) and a reconcile mode. Hard-refuse if data-model.md is missing AND the feature changes the schema → run `data-model {slug}` first; on a legal no-schema-change skip it derives from the existing schema instead.
/clarifyUse to run an ambiguity sweep over a written spec.md and close every under-specified point before planning or design proceeds — so two engineers can't reasonably build different things from the same spec. Triggers on "clarify {slug}", "find ambiguities in {slug}", "is the spec ready", "sharpen the spec", "/sdd:clarify {slug}", "прояснити специфікацію", "знайди неоднозначності {slug}", "чи готова специфікація". Re-reads the spec, dispatches a clean-context devil's-advocate subagent to list where the spec forks, then for each ambiguity runs AskUserQuestion to RESOLVE it (tighten §1/§5/§6 in place) or DEFER it (→ §8 Open questions with owner+due). Output: an updated docs/features/{slug}/spec.md with every ambiguity resolved or deferred — none dangling. Hard-refuse if spec.md is missing.
/classify-sizeUse to classify a feature into XS/S/M/L/XL and write docs/features/{slug}/.size plus the pipeline route docs/features/{slug}/.route (quick|standard|full) so later skills know how much of each artifact to produce and how handoffs resolve skips. Triggers on "classify size", "feature size", "is this XS or M for {slug}", "size {slug}", "change route", "/sdd:classify-size {slug}", "класифікуй розмір {slug}", "який розмір фічі", "XS чи M". Asks four AskUserQuestion (PR count / time / new module-API-migration / breaking changes), maps to a size class via the shared size matrix, derives the default route (XS/S→quick, M→standard, L/XL→full), confirms size + route in ONE question, and writes the one-line .size and .route files — the source of truth; the feature_size: frontmatter mirrors in spec.md and sad.md are re-synced to it on every (re)classification.
/configUse to create and tune the per-project settings file `.claude/sdd.local.md` — the one place that decides how deeply the pipeline interviews you, which model tier its judgment agents run at, how strict the TDD gates are, how tasks execute and commit, and what language your documents are written in. Triggers on "config", "settings", "configure sdd", "tune the pipeline", "change the judgment model", "set the interview depth", "write documents in Ukrainian", "/sdd:config", "налаштування", "налаштуй sdd", "зміни модель", "глибина опитування", "мова документів". Creates the file with documented defaults FIRST (so you have a working config before answering anything), reads what already differs from the defaults, then asks six grouped questions and patches only the keys you confirm — preserving your comments, key order and unknown keys. Never touches the pipeline's artifacts; the settings file is gitignored, only the .gitignore patch is committed.
/data-modelUse to design the data model AND generate the actual forward + rollback migrations in one pass — shippable SQL, not a plan. Triggers on "data model for {slug}", "schema for {slug}", "generate migrations for {slug}", "DB design + migration", "/sdd:data-model {slug}", "модель даних для {slug}", "схема для {slug}", "згенеруй міграції". Reads spec.md §5 + sad.md §5 building blocks + the §6 sequence diagrams, then writes docs/features/{slug}/data-model.md plus paired *.up.sql / *.down.sql migrations STAGED under docs/features/{slug}/migrations/ (NOT the live migrations/ tree — implement promotes them when the feature is actually built) and an audit report. Greenfield-first; brownfield delta via --mode brownfield; drift-only via --drift-only. Hard-refuses if spec.md or sad.md is missing. Stack-agnostic: detects and FOLLOWS the repo's DB + migration conventions and domain layer — it imposes no DB philosophy and writes no rules file.
/decide-adrUse to record a post-hoc or asynchronous architecture decision as a MADR ADR when it was NOT captured during the synchronous design pass — a choice made in code, in a chat, on a whiteboard, or one a tasks/review gate flagged as missing. Triggers on "ADR for {decision}", "adr for {slug}", "document the decision on {topic}", "lock in the decision about {X}", "MADR for {topic}", "/sdd:decide-adr {slug} {title}", "створи ADR для рішення", "задокументуй рішення", "ADR на {тему}". Confirms the decision is ADR-worthy via the blast-radius gate, picks the next 4-digit number, copies design's MADR template, and fills context / drivers / considered options / outcome / honest consequences. Supports a Proposed → Accepted review flow. Output: docs/features/{slug}/adr/NNNN-{title}.md. For decisions made live with the user, use `design` — it spawns ADRs inline (Accepted).
2 plugins ship this exact skill · first indexed Oct 14, 2026
Other plugins' skills for the same job