/sdd:fixfrom sdd
Fixes bugs spec-first: reproduce, trace to acceptance criteria, write failing test, apply minimal fix, patch spec. Handles regression, ambiguous spec, and gap triage.
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.
The bugfix entry point — the backbone in miniature, sized for «it's broken», not «build a feature». A bug is treated as evidence about the spec, not only about the code: either an acceptance criterion is violated (the code regressed), the AC was ambiguous enough to permit the behaviour (the spec is the root cause), or nothing covers it (a gap). So the fix always lands in two places — the code (RED → GREEN through the same gate implement runs) and the spec (a surgical AC patch) — tied together by a small fix record.
This skill keeps only its own machinery. Question phrasing → ../_shared/ask-style.md; RED-classification semantics → ../implement/references/tdd-loop.md (reused, never duplicated); dispatch policy → ../_shared/agent-roster.md.
Fix-record prose follows artifact_language — but a spec patch matches the existing spec's language (the file wins over the setting); code, tests and commits stay English → ../_shared/artifact-language.md.
The engineer on the bug (drives). PM / Tech Lead is consulted only when triage lands on «spec-bug» or «gap» — changing an AC is a product decision, not a code one.
<slug> — optional; pass it when you know which feature owns the bug, otherwise step 2 finds it from the symptom.docs/features/ with ≥1 spec.md. Absent (a brownfield repo that never ran the backbone) → still run, in no-spec mode: steps 1 → 3 → 4 → record, skip the spec patch, and recommend /sdd:survey in the handoff..claude/sdd.local.md — gate command overrides; otherwise the commands are detected per implement's cascade.No depth dial and no .size here — a fix is one size, and the interview is the bug report itself.
AskUserQuestion (phrasing per ../_shared/ask-style.md), only for what the report doesn't already say: expected vs actual, the steps, the scope (one user? all? since when?). Outcome: a one-line reproduction statement — «doing X, expected Y, got Z». A bug you can't state this way isn't ready to fix.docs/features/*/spec.md (+ the candidate slug's _fixes/ for a recurrence) for the reproduction's domain terms; locate the owning slug and the closest §5 AC. In parallel, dispatch explorer — subagent_type: "sdd:explorer" (fallback Explore / inline per ../_shared/agent-roster.md) — to localize the code path. Three outcomes (decision table → ./references/triage.md):
<!-- added-by-fix: <date> -->.docs/features/ (or no spec plausibly owns the symptom): skip the spec patch, say so in the record, recommend survey.../implement/references/tdd-loop.md — it must be a GOOD red (fails on the assertion that encodes the expected behaviour); quote the failing line. A bug that can't be pinned by a test → STOP and say so — an unverifiable fix is a guess.implement runs: unit + lint + vet (+ integration when available), via the detected commands (detection cascade → ../implement/references/command-detection.md). Red gate → fix it, never commit around it.AskUserQuestion (before/after wording shown). Then write docs/features/<slug>/_fixes/<date>-<short-slug>.md from ./templates/fix-record.md: symptom → root cause → the pinning test → the spec patch (or why there is none).../_shared/write-and-commit.md — separate commits: the code fix + its pinning test as fix: <slug> <short summary> with trailers SDD-Fix: <date>-<short-slug> and SDD-AC: <id> (when an AC was traced); the record as fix: <slug> record <date>-<short-slug>; the spec patch (if any) as fix: <slug> spec.md <AC id>. A red gate → no commits. Then emit the stage-handoff block per ../_shared/handoff.md (utility variant — /clear optional): What I did (incl. the commits with short SHAs) + Review (the diff, _fixes/<date>-<short-slug>.md, the spec patch if any) + Run next: resume what you were doing; when the fix touched >5 files or crossed a module boundary, recommend /sdd:review <slug> — a recommendation, not a gate.docs/features/<slug>/_fixes/<date>-<short-slug>.md exists: symptom, root cause, the test, the spec patch, follow-ups.SDD-Fix: trailer (+ SDD-AC: when traced); any spec change was user-confirmed.../_shared/self-check.md); its result is reported in the handoff.survey, never block._fixes/ shows the same symptom was fixed before. That's a recurrence — read the old record and strengthen its test instead../references/triage.md — the symptom→spec trace: grep strategy, the regression / spec-bug / gap decision table, the added-by-fix marker, no-spec mode, the recurrence check../templates/fix-record.md — the fix-record scaffold (symptom → root cause → pinning test → spec patch → follow-ups).../implement/references/tdd-loop.md — RED classification (GOOD red / BAD red / false-pass) — the semantics step 3 reuses.../implement/references/command-detection.md — how the step-4 gate commands are resolved (settings override → Makefile → package scripts → language manifests).../_shared/ask-style.md · ../_shared/agent-roster.md · ../_shared/handoff.md.User: «/sdd:fix — discounts are applied twice when the user clicks pay twice fast» Skill: intake confirms: expected one discount per order, got two on a double-click (all users, since the checkout-discounts release). Trace:
docs/features/checkout-discounts/spec.mdAC-04 says «a discount is applied to an order at most once» → the code violates it → regression.explorerlocalizes the apply-discount handler (no idempotency check). RED: an integration test posting the same apply twice asserts one discount row — fails withgot 2, want 1(GOOD red). GREEN: guard on the existing uniqueness key; gate clean. Spec: nothing to patch (AC-04 was right). Record_fixes/2026-06-12-double-discount.md; commitfix: checkout-discounts double-applied discount+SDD-Fix:/SDD-AC: AC-04trailers. Handoff: 2 files touched → no review push; resume.
What SKILL.md sets; muted values are Claude Code's defaults
inherithighThree short reads, in order
bugfix, tdd, spec-driven-development, regression, acceptance-criteria
23 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
npx claudepluginhub genkovich/sdd --plugin sddOther plugins' skills for the same job