/sdd:validate-gapfrom sdd
Generative fork - analyze the gap between the active feature's requirements and the existing codebase, writing findings with quoted evidence to research.md and returning a gap-list with an implementation-approach recommendation. Use for brownfield features, after requirements, before or during design.
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: measure the distance between what the requirements demand and what the codebase already provides, and write it down as evidence-backed findings - the gap-list and approach recommendation that design decisions rest on.
file:line and quotes the relevant snippet verbatim.
Every gap states the requirement it threatens, by its exact ID.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).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>/research.md - prior discovery output, when
present: read it, extend it, never overwrite it.${CLAUDE_PLUGIN_ROOT}/assets/rules/gap-analysis.md - the analysis
framework (current state, feasibility, approach options, effort/risk)
and its output checklist. Follow it.Map what already exists against what the requirements need:
lsp-code-analysis skill for domain-related
files, modules, reusable components, and directory layout (LSP first,
Grep/Glob/Read fallback). Quote the decisive snippets.Every claim above carries file:line evidence or a URL. "Looks like"
without a citation is a Research Needed item, not a finding.
Apply the gap-analysis framework:
Missing / Unknown /
Constraint. Unknowns are recorded as Research Needed items - deep
research belongs to the design phase.Write .sdd/specs/<feature>/research.md. If the file already exists
(prior discovery or a previous run), APPEND your analysis as a new
## Gap Analysis - <date> section after a --- separator - earlier
content survives untouched (the workspace is append-only). Follow the
gap-analysis rule's output checklist for the section's structure.
Verify the write by reading the file back.
To the fork (your final message). Return exactly this block - the
caller parses the heading and the - STATUS: line mechanically:
## Gap Analysis Summary
- STATUS: <DONE | BLOCKED>
- GAPS: <one line per gap: requirement ID, Missing/Unknown/Constraint, one-phrase impact>
- APPROACHES: <one line per approach, marking the recommended one>
- EFFORT_RISK: <S/M/L/XL and High/Medium/Low with one-line justification>
- RESEARCH_NEEDED: <one line each, if any>
- CONCERNS: <one line each, if any>
- PATH: <.sdd/specs/<feature>/research.md, or - when BLOCKED>
- 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 - the gap-list, the approaches with the recommended one, effort/risk, and the research.md path (point the user at the path; do not dump it into chat). Then AskUserQuestion, confirm-only:
/sdd:spec-design
## Follow-up Focus section to
research.md, then re-invoke /sdd:validate-gap: the fork reads the
existing file (Step 2), investigates the focus, and appends a new
dated analysis section.On BLOCKED: present the blocker and the named command, then AskUserQuestion on how to proceed (resolve via that command / adjust inputs / stop).
What SKILL.md sets; muted values are Claude Code's defaults
opusOther plugins' skills for the same job
npx 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./initWrite the user-owned .claude/rules/sdd.md workflow-rules file from the plugin's default workflow map (single source of truth - no second copy anywhere). Refuses politely when the file exists and offers a read-only diff instead of overwriting. User-invoked./reviewAdversarial task-local review protocol - verify an implementation is real, complete, bounded, spec-aligned, and backed by mechanical evidence. Use after an implementer finishes a task, after remediation, or before accepting a task as complete./spec-designGenerative 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.