/sdd-kit:design-spec <work item ID or URL>from sdd-kit
Writes a story's design spec under docs/sdd/specs/ in the MIRA form — a compact, decision-centred document for the spec PR of the SDD workflow. Use when a refined work item is to be turned into a design spec, when the user asks to plan a story or write its spec, and whenever the superpowers brainstorming skill is about to write the spec document for a story. Covers the planning conversation before writing, the section order, what belongs in a spec versus the implementation plan, and the checks before sdd-kit:spec-pr.
Ships in sdd-kit. 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.
A spec is a transient review document: it is merged in its own PR, guides the implementation plan, and is deleted at the human review of the implementation PR. It is read side by side in a diff by reviewers who know the codebase. Optimise for that reader: decisions first, reviewable line by line, nothing a reviewer cannot check.
docs/sdd/specs/,
older ones under docs/superpowers/specs/), the affected code, the Memory Bank levels
involved (docs/decisions/, apps/<app>/docs/, services/<svc>/docs/) and the repo's test
process if it defines one. Fetch the work item through ado-toolkit:ado-workitem; it should
be in the Refinement state — if not, say so, do not change it.
ado-toolkit:ado-workitem (Show), not fetched by URL. Read it as closely as the
acceptance criteria; one you cannot open (no access, an export missing) is raised with the
user, not skipped.git log -S), and whether it ever shipped — and have the user
confirm it before any single decision. A wrong premise rewrites the whole spec later. Then lay
out the implementation approach in a few sentences and list the decisions the user has to
make — contradictions in the acceptance criteria or between them and the design artifact,
gaps, choices between alternatives. Ask them directly; do not park them as open questions.
Acceptance criteria that turn out wrong are corrected in the work item (with the user's OK),
not silently reinterpreted.
If the superpowers brainstorming skill is already running, its conversation is this step;
the document it writes follows the form below instead of its own template.docs/sdd/specs/YYYY-MM-DD-<app>-<topic>-design.md at the repository root, never on an app
level. Branch spec/<id>-<topic>.sdd-kit:create-decision / create-lesson-learned triage says so).sdd-kit:spec-pr. No implementation plan, no code.# <App(s)> — <Feature>: <Story title> (US #<id>) Design Spec
- **Work items:** [#<id> <title>](<ADO URL>), epic [#<id> <title>](<ADO URL>).
- **Apps / services:** `apps/<app>`, `services/<svc>`.
- **Design:** [<artifact name>](<URL>) — the basis the UI is built on. A mockup, not a
specification of every detail: where this spec rules a detail (copy, error messages, states,
behaviour), the spec wins.
---
No date, no status, no test depth, no "builds on", no work-item state, no descriptions behind the app names. The spec is deleted after implementation; the state changes after merge; the reasons belong in the body.
The Design bullet exists only when step 1 found a design artifact — and then it is mandatory:
whoever implements works from the spec and does not go back to the work item, so a design the
spec does not link is a design the implementation never sees. Link the artifact itself (the
frame or page), not the work item that carries it; an attachment or embedded image by its
attachment URL, followed by "attached to #, download through ado-toolkit:ado-workitem" —
the URL alone does not open without authentication. Keep the precedence sentence: a mockup
cannot follow every decision of the refinement and of this spec, and the implementer has to
know which source wins.
| § | Section | Content |
|---|---|---|
| 1 | Context | Three to five sentences: what exists, what is missing, what this story adds. No history, no merge status. |
| 2 | Decisions | The core. One table Topic | Decision | Why with every choice between alternatives and every deviation from the story's wording or from the design. Mark what the user confirmed. |
| 3 | Out of scope | One paragraph naming the sibling stories by id and what stays out, and what this spec PR itself removes (a predecessor's spec or plan left behind). |
| 4 | Data / content model | Optional. The stored shape and its rules. |
| 5 | Backend | Optional. Request/response as a code block, rules as bullets. |
| 6 | Client — contract and main | Optional. Messages across the process boundary, what main owns. |
| 7 | Client — UI | Optional. One bullet list per surface; with a design, the part of it the surface follows. |
| 8 | Errors | Table Situation | Kind | User sees. |
| 9 | Edge cases | Table Case | Behaviour. |
| 10 | Tests | Depth justification in one sentence against the repo's test process, then bullets per test level as that process names them and the repo actually runs them, AC coverage as one paragraph of section references. |
| 11 | Memory Bank | Governing decision records and conventions (followed, none changed), new records as the sdd-kit skills decided them, and the list of reasons to carry inline into the code. |
Drop the optional sections the story does not need and renumber; the order stays. There is no delivery section: the split into pull requests is decided in the implementation plan.
Answer each point that applies; leave out the rest silently.
If the repo defines a test process (a process document, a test strategy per app), the tests section is written against it: its test levels, its depth classes and what each class demands and forbids (a new end-to-end journey, a contract test for a new API, a statement on critical paths), and which existing suites are extended rather than duplicated. Name what the depth excludes as clearly as what it requires. Without such a process, state the levels used and why.
Plan only against test levels and mechanisms the repo actually runs — a level the process names in the abstract but nobody has built is not a bullet; introducing a new test mechanism is a decision of its own, not a line in a story's spec. Use the process's terms by their definition (read it before writing "Green Path", "contract test", "extended"): a term that sounds right but means something else there is the finding a reviewer will make.
Whether a decision or insight becomes a record is always decided through the
sdd-kit:create-decision / sdd-kit:create-lesson-learned skills and their shared reference
(../memory-bank-shared/REFERENCE.md) — run them for
every candidate, never judge by hand, and do not restate their criteria here. The spec records
only the outcome: governing records and conventions as followed (a spec applies them, it does not
restate them), new records with the skill's verdict, and the list of reasons that go inline into
the code instead.
Why column carries the reasons that could be challenged.CLAUDE.md section,
sibling stories by id. Never reference a spec or plan from code; from a spec it is fine while
both exist.What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
6 skills in this plugin
/create-decisionCreates a new Decision Record in the Memory Bank for significant decisions — hard-to-reverse choices of stack, library, data format or build mechanism, rules that spare the team the next decision, product decisions to be protected from silent rollback, breaks with an existing pattern, and cross-cutting changes. Use during spec creation or whenever such a decision is made. Triggers on phrases like "decision record", "we decided to", "write a decision", "document the decision", "why did we choose X over Y", or "ADR". Not every decision qualifies — the skill applies the significance gate with its exclusions first and routes implementation details to conventions, learnings, a CLAUDE.md, or an inline reason in the code instead, and it checks the finished record against the form rules./create-lesson-learnedCreates a new Lesson Learned entry in the Memory Bank, placed on the right Memory Bank level (repo root, or an app/service subtree like apps/<app>/docs/learnings/). Use this skill when a recurring pattern, pitfall or insight should be captured, e.g. when Claude repeatedly makes the same mistake, when a pattern emerges in reviews, or when something was learned during debugging. Also triggers on phrases like "this keeps happening", "we should document this", "lesson learned", "AI mistake", "I've seen this for the third time now"./pr-reviewUse when you want a thorough, triage-first review of an Azure DevOps pull request — you have a PR ID or URL and want more than the diff checked. Covers security, CI/pipeline status, code smells, dead code and drift, duplicate or divergent implementations across the wider codebase, test quality in both directions (tests that cannot fail if the behavior breaks, and tests that are redundant or over-broad), and decision records (ADRs) — violations of active ones, code following superseded ones, and decisions missing a record. Also checks whether the story's design spec and implementation plan are deleted here, and whether anything still needed was left only in them. A spec PR gets its own, much smaller review instead — the spec against its work item, against the decision records and the existing code, and its planned test approach against the repo's test process — because a spec has no code, no tests, and nothing to drift. The branch is checked out in an isolated worktree; findings are reported for your triage and only posted after you approve them. For a deep look — not the quick working-tree /code-review./pr-screenshotsTests a UI change by hand in the real, running app and puts screenshots of it into the description of its Azure DevOps pull request. Use when a pull request whose change alters what users see — a screen, dialog, layout, style, icon or UI text — is about to be created, when the user asks for screenshots in a PR, or when review fixes changed a state a PR already pictures. Runs once, when the UI is final — never per plan task or for interim states. Web and Electron apps are driven with Playwright; for WPF and every other UI that Playwright cannot drive, it tells the user to add the screenshots by hand. Not for spec PRs, nor for changes nobody sees in the UI./spec-prOpens a pull request for a just-written Spec-Driven-Development spec (plus any Memory Bank items) and then STOPS — no implementation plan, no code — until the PR is merged. Use immediately after a spec is written (by sdd-kit:design-spec or the superpowers brainstorming skill) and the user approves it, INSTEAD of writing-plans. Auto-detects the git remote: Azure DevOps → the ado-toolkit:ado-pr workflow, GitHub → the gh CLI. Also triggers on "PR the spec", "open a spec PR", or "ship the spec for review".npx claudepluginhub mediainterface/claude-marketplace --plugin sdd-kit