/sdd-kit:spec-pr (run after a spec is written & approved; no arguments needed)from sdd-kit
Opens 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".
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.
In MediaInterface's Spec-Driven-Development flow, a spec is reviewed and merged as
its own pull request before any implementation planning or coding happens. This
skill takes the spec just written — by sdd-kit:design-spec or the superpowers
brainstorming skill — opens a PR for it (together with any Memory Bank items), and
then stops. It deliberately does not invoke writing-plans, does not write an
implementation plan, and does not write code — getting the spec merged, and any later
implementation, are separate efforts.
This skill is the SDD replacement for brainstorming's
writing-planshandoff. A SessionStart hook in this plugin injects the policy that routes here; you can also invoke it manually at any time.
The spec is a transient artifact. It is reviewed and merged, it guides the implementation — and it is deleted again at the human code review of the implementation PR, at the latest after the first review round (the implementation plan goes with it). Not in this PR: here the spec is the content under review. Nothing that is needed later may live only in the spec, which is what Step 3 checks before the PR is opened.
If the user explicitly asks for an implementation plan or to start coding, do that instead — this gate is the default next step after a spec, not a hard lock.
Find the design spec the flow just produced:
find docs/sdd/specs docs/superpowers/specs -name '*-design.md' -exec ls -t {} + 2>/dev/null | head -5
docs/superpowers/specs/ only holds specs of stories begun before the move to
docs/sdd/. Use the most recent one. If several are plausible, ask the user which to
PR. If none exists, say so and stop — there is nothing to open a PR for.
Tell the user briefly: this opens a PR for <spec path> and then stops — no
implementation plan and no code will be written now. Say as well that the spec is a
working artifact for this story and is deleted again at the human code review of the
implementation — which is why Step 3 first checks what has to be captured elsewhere.
Proceed unless they object.
Because the spec is deleted at that code review, go through it with the user before it goes up for review: for every piece of reasoning, constraint, and rule in it, ask whether it is needed beyond this story — and if it is, get it out of the spec. Each item has exactly one durable home:
| What it is | Where it belongs |
|---|---|
| The reason a piece of code is the way it is | Inline in the code, as its own reason — noted now, written with the implementation |
| Requirement, acceptance criterion, scope boundary | The work item (user story) |
| Recurring "how we write code" rule | A convention — a check, a doc comment, a CLAUDE.md section or a .claude/rules/ file, per Conventions in ../memory-bank-shared/REFERENCE.md |
| Significant decision (hard to reverse, eases future decisions, protected product decision, breaks a pattern, cross-cutting) | A Decision Record → invoke the create-decision skill (one record per decision) |
| Recurring pattern or pitfall | A Lesson Learned → invoke the create-lesson-learned skill |
Whatever matters only while this story is being built stays in the spec and goes away with it. That is the point — this check is not a reason to inflate the Memory Bank; the significance triage in ../memory-bank-shared/REFERENCE.md still decides what becomes a record.
Run that triage here, and name the evidence with the criterion:
Then the three exclusions, any of which overrides a ticked criterion — one feature without effect on others, nothing changed about appearance/stability/behavior/dev experience, a whole-app detail that is neither a product decision nor hard to revise → no record, the reason goes inline into the code.
If it stays undecidable after the evidence is named, the spec PR does not carry a record — but it does go up: the open question blocks the record, not the spec. State the decision and the evidence for and against so the user can forward it, ask them to put it to the Hüter-Trio, and say that the record follows separately once the answer is in (you cannot reach the Hüter-Trio yourself). The reasoning stays inline in the code meanwhile. A record guessed at now is binding on merge.
A record the spec's own Memory Bank section already writes out unfiltered turns
create-decision's gate into a rubber stamp.
Records and lessons created here ride in the same PR as the spec — note each
created file's path from the skills' confirmation output, because Step 5 stages
exactly these paths. (create-decision already notes that a decision ships together
with the spec, so bundling them here is intentional.) A convention written as a
.claude/rules/ file or a CLAUDE.md section can go into this PR too. Items destined
for a code comment cannot be written yet — list them for the user so they reach the
implementation.
Skip whatever the user declines.
A spec PR needs a source branch that is not the default branch.
current=$(git branch --show-current)
default=$(git symbolic-ref --quiet --short refs/remotes/origin/HEAD 2>/dev/null | sed 's|^origin/||')
If current is already a dedicated branch (not default), stay on it.
If current is the default branch, move to a new branch before committing,
so nothing lands on the default. Create and switch to it — this carries the spec
(committed or not) onto the new branch:
git checkout -b "spec/<topic>"
If the spec had already been committed to the default branch and those commits
are not yet pushed, also reset the local default pointer back so it stays clean
(safe — git branch -f touches neither the working tree nor the new branch):
git branch -f "$default" "origin/$default"
If those commits were already pushed to the default branch, do NOT rewrite history — tell the user and ask how to proceed.
Derive <topic> from the spec filename (the segment between the date and
-design.md). If default cannot be detected, ask the user for the target branch.
The brainstorming skill usually already committed the spec. Stage the spec and any
Memory Bank files and commit only if something is still pending. Memory Bank
records can live on a nested level (apps/<app>/docs/…, services/<service>/docs/…
— see ../memory-bank-shared/REFERENCE.md), and
git add errors on a pathspec that matches nothing — so stage the spec file and
every file Step 3 created by their explicit paths, no globs:
git add <spec file> <each Memory Bank file from Step 3, by explicit path>
git diff --cached --quiet || git commit -m "📝 Spec: <topic>"
git remote get-url origin
Azure DevOps remote (a …/_git/… URL, or dev.azure.com / *.visualstudio.com):
invoke ado-toolkit:ado-pr and follow its PR Creation workflow — its shared reference
brings Step 0, which comes first. Prescribe the Spec PR
conventions from ../sdd-pr-shared/REFERENCE.md: the
📝 spec-only marker and the spec description (Inhalt and Erwartetes
Umsetzungsrisiko). A linked work item is required — ADO mandates one for every PR —
so ado-pr asks for it and links it (and it appears as #<ID> in the title); if the spec
has no associated work item yet, ask the user which one to link before creating the PR.
Push the branch, create the PR, and note the pullRequestId.
GitHub remote (github.com): push and open the PR with the gh CLI, reusing
the 📝 spec-only marker:
git push -u origin "$(git branch --show-current)"
gh pr create --title "📝 <Component> - <short summary>" \
--body "$(printf 'Spec for review before implementation.\n\nSpec: %s\n' "<spec path>")"
Neither: tell the user the remote is not recognised and ask how they want the PR created.
Report the PR URL and ID, then stop. State explicitly:
writing-plans. Implementation is a separate, later effort
(e.g. driven from work items via the ado-* skills) once the spec is merged.gh is set up.What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub mediainterface/claude-marketplace --plugin sdd-kit6 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"./design-specWrites 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./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.