Help us improve
Share bugs, ideas, or general feedback.
From solid-coder
Detailed workflow for creating and updating specs — covers spec structure, required sections, status lifecycle, dependency wiring (blocked-by/blocking), subtask breakdown, and rules for what belongs in a spec vs what doesn't. TRIGGER when: creating a new spec, modifying or editing an existing spec, updating a spec's status, adding or removing blocked-by/blocking dependencies, breaking a spec into subtasks, or resuming a draft spec.
npx claudepluginhub swift-gurus/solid-coderHow this skill is triggered — by the user, by Claude, or both
Slash command
/solid-coder:build-specThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
- **Sub-skill returns are internal values** — when a skill invocation produces JSON output, capture it silently and proceed immediately. Do NOT present the result to the user or pause for confirmation.
Mandates invoking relevant skills via tools before any response in coding sessions. Covers access, priorities, and adaptations for Claude Code, Copilot CLI, Gemini CLI.
Share bugs, ideas, or general feedback.
AskUserQuestion steps — all other steps run to completion without stopping.[default].other: <describe>). 0.1 If the user provided a spec number (e.g. SPEC-003) as an argument or in their prompt:
scan --status draft,ready,in-progress. Find the matching spec in the results.ancestors <target-SPEC-NNN>. Read each file in the returned path fields (root → leaf). Hold all content as context.Found: SPEC-NNN — <feature> [<type>, <status>]
What would you like to do?
1. Edit or extend this spec
2. Break down into subtasks
3. Resume (continue drafting)
target_spec and proceed to Phase 3.5 (Extend).target_spec and proceed to Phase 3.6 (Breakdown).target_spec and proceed to Phase 2.2 (Load context), then Phase 4.0.2 If the user provided a descriptive prompt (not a spec number, not empty):
0.3 Otherwise (no argument), ask using AskUserQuestion:
What would you like to do?
1. Create a new spec
2. Resume a draft spec
3. Edit an existing spec
1.1 Analyze prompt — if the user provided a descriptive prompt, infer as much as possible:
scan --status draft,ready,in-progress. Match the prompt topic against existing epics/features. If one clearly matches, suggest it. If ambiguous or none match, suggest root.1.2 Present inference — if any fields were inferred, present them via AskUserQuestion:
Here's what I got from your prompt:
Type: <inferred type>
Title: <inferred title>
Parent: <inferred parent or "root">
Description: <inferred description>
User Stories (draft):
- <story 1>
- <story 2>
...
1. Looks good, continue to detail questions [default]
2. Needs adjustments
3. Start fresh (full interview)
1.3 Manual create (when no prompt, or user chose "start fresh"):
python3 ${CLAUDE_PLUGIN_ROOT}/skills/build-spec/scripts/build-spec-query.py types and ask using AskUserQuestion: "What type is this?"navigate draft,ready Select as parent. Store as parent_epic. 1.4 Get next spec number — use skill solid-coder:find-spec with next-number. Store result as next_number.
Continue to Phase 4. If stories were inferred in 1.1, Phase 4.4 presents them as [default] for confirmation instead of asking from scratch. Same for any other Phase 4 question where the answer is already inferred from the prompt.
2.1 Find target — use skill solid-coder:find-spec with navigate draft Resume this. Returns selected spec as target_spec.
2.2 Load context — use skill solid-coder:find-spec with ancestors <target-SPEC-NNN>. Read each file in the returned path fields (root → leaf). Hold all content as context.
Continue to Phase 4.
3.1 Find target — use skill solid-coder:find-spec with navigate draft,ready,in-progress Edit this. Returns selected spec as target_spec.
3.2 Load spec — read the target spec file. Hold its full content as context.
3.3 Load ancestors — use skill solid-coder:find-spec with ancestors <target-SPEC-NNN>. Read each file in the returned path fields (root → leaf). Hold all content as context.
3.4 Ask using AskUserQuestion:
What would you like to do with this spec?
1. Extend or modify the spec
2. Break down into subtasks
3.5.1 Ask using AskUserQuestion: "What needs changing?" — free-text. User describes what to add, remove, or modify.
3.5.2 Apply the requested changes to the spec draft. Preserve all existing sections and frontmatter — only modify what the user asked to change.
Continue to Phase 6 (Buildability Gate) with the updated draft.
Do NOT rerun the full Phase 4 interview per child. Derive child specs from the parent's stories.
3.6.1 Analyze the target spec's user stories, acceptance criteria, and scope. Suggest a subtask breakdown — each story or story group becomes a subtask:
Based on this spec, here's a suggested breakdown:
1. <subtask title> — <one-line scope> (from story: <story reference>)
2. <subtask title> — <one-line scope> (from story: <story reference>)
...
Ask using AskUserQuestion: "Adjust, add, remove, or confirm these subtasks?"
3.6.2 Finalize the subtask list. For each subtask, get the next spec number — use skill solid-coder:find-spec with next-number before each.
3.6.3 For each subtask, generate a pre-filled draft directly from parent context:
type = subtask, parent = <target_spec number>, title from the breakdown list.Spec.md + resources/.3.6.4 After all subtasks are written, confirm to user with list of all files created.
Done — do not continue to Phase 4.
Infer suggestions from loaded ancestor context. Present inferences as [default] options. Always include a free-text fallback. The goal is 3 user interactions for Phase 4 — not 9.
Stories are the anchor. Everything else flows from them.
4.1 User Stories — type-differentiated. Ask using AskUserQuestion.
If Phase 1 inferred stories from the prompt, present them as [default] for confirmation.
Story format:
As a [user], I want [goal] so that [reason]As the system, when [trigger], [outcome]Acceptance criteria rules: each criterion must be independently verifiable. No "works correctly", no "handles edge cases" — name the specific value, behavior, or condition.
epic): after confirming stories, suggest a feature breakdown:
Here is a suggested feature breakdown:
1. <feature 1>
2. <feature 2>
...
How should I proceed?
1. Write as a single epic spec (features listed in Definition of Done)
2. Write the epic + scaffold each feature now (frontmatter only, dependencies set later)
Store choice as epic_mode (single or split).Batch related context questions into a single AskUserQuestion with multiple questions (the tool supports up to 4 questions per call). Pre-fill from ancestor context and stories.
4.2 Ask using AskUserQuestion with up to 4 questions in one call:
Q1 — Connections: "What does this connect to, depend on, or interact with?"
Q2 — Inputs & Outputs: "What goes in and what comes out? Who consumes the output?"
Q3 — Technical constraints (conditional — skip for epics/bugs):
Q4 — Dependencies: "Any specs this is blocked by or blocking?"
scan --parent <parent_spec> --status draft,ready to get siblings.Now asked AFTER stories exist — answers become acceptance criteria on specific stories.
[default] options. Ask using AskUserQuestion:
These are generated automatically and shown in the draft for review in Phase 7. No separate confirmation step.
4.4 UI / Mockup — ask using AskUserQuestion:
## UI / Mockup\nReference screenshots are in the \resources/` directory adjacent to this spec file.`## UI / Mockup section entirely.4.5 Test Plan — generate test cases from user stories and edge cases collected in steps 4.1–4.3:
"When [precondition or state], [action], [observable outcome]" — present tense, no "should", no "verify that"Here are the test cases I derived. Add, remove, or adjust:
### Unit Tests — <ComponentName>
- When ...
### UI Tests — <ScreenName>
- When ...
4.6 Diagrams — generate Mermaid diagrams from the collected answers:
## Diagrams. User reviews them in Phase 7.${CLAUDE_PLUGIN_ROOT}/spec-driven-development/specs/<type>/rule.md for the spec's type (epic/, feature/, subtask/, or bug/). Also read specs/README.md for common frontmatter fields and section rules.rule.md.type: bug, generate ONLY Phase 1 (report) sections: Description, Steps to Reproduce, Expected vs Actual, Affected Component. Leave Phase 2 (Root Cause, Fix Plan, Diagrams, Test Plan, Definition of Done) for a later pass after investigation. The spec starts at status: draft as a report artifact.The template is the single source of truth for structure — do NOT invent sections or omit required ones. For epic_mode = split: Epic = next_number, children = next_number+1…N, children get status: draft.
Use skill solid-coder:validate-spec with --batch on the draft spec. Batch mode returns all findings at once instead of asking one-by-one.
For epic specs, validate-spec applies epic-specific rules (scope clarity, subtask breakdown completeness) instead of the standard buildability scan. See validate-spec for details.
--batch on the current draft. Collect all findings.Buildability findings — select which to resolve now (rest will be marked TBD):
1. [category] location — question
2. [category] location — question
...
User selects which findings to address and provides answers.TBD.--batch. If new findings → repeat 6.2 (max 1 more round).TBD. Proceed to Phase 7.1. Yes, write it
2. Specific changes needed — describe ALL changes at once
python3 ${CLAUDE_PLUGIN_ROOT}/skills/build-spec/scripts/build-spec-query.py resolve-path <type> <SPEC-NNN> <slug> [--parent <parent-SPEC-NNN>]
If non-zero exit: stop and report error.resources/ directory alongside each Spec.md written.epic_mode = split: write epic first (status: ready), then scaffold each child with frontmatter only — number, feature, type, status: draft, parent: SPEC-{epic-N}. No blocked-by wiring — dependencies are set later. Each child gets its own folder with Spec.md + resources/.status: ready. Scaffolded children: status: draft.blocked-by entries are permanent — never remove them.split mode, write ALL specs in this session.build-spec-query.py call exits non-zero, report and stop.