/wiki-sdd:to-storiesfrom wiki-sdd
Synthesizes conversation or promoted intents into wiki stories with Gherkin scenarios and slice lists. Reads glossary.md and ADRs for project vocabulary. Does not interview; suggests /intent if unclear.
Ships in wiki-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.
Two inputs, one output shape. From the current conversation, a thin orchestration plan plus per-story files. From a promoted intent, one story under the active plan. Does not interview — synthesizes what is already established. If intent isn't clear, suggest /intent first and stop.
When /triage promotes an intent, or the user names one:
projects/<scope>/intent/intent-<slug>.md in full, then glossary.md and the ADRs it links.projects/<scope>/plan/<active-plan>/story-N-<slug>.md — next N in that plan — with [[intent-<slug>]] under References. No new plan for one story.triage_state is what the operator chose at promotion: ready-for-agent when the brief is complete, needs-triage otherwise.promoted_to and archives the intent (the intent's frontmatter is triage's to close, not this skill's).Everything below is Input A — the conversation.
WIKI_SCOPE: <scope> declared in the project instructions. If missing, suggest /wiki and stop.projects/<scope>/index.md exists. If missing, suggest /intent and stop./intent to nail it down first.projects/<scope>/
├── plan/
│ ├── plan-<name>.md ← thin orchestration (~60-100 lines)
│ └── <name>/
│ ├── story-1-<slug>.md ← Gherkin + slices (~40-60 lines)
│ ├── story-2-<slug>.md
│ └── story-3-<slug>.md
Each story file ships with triage_state: needs-triage. The user runs /triage next to evaluate readiness.
prime(<scope>) via the wiki MCP, or kmd prime <scope> where the harness exposes no MCP tools — get identity, primer, active ADRs, top tags, current plan.projects/<scope>/glossary.md if it exists — use canonical vocabulary throughout.projects/<scope>/adr/ to respect existing decisions.From the conversation, extract:
Plan slug — kebab-case, descriptive, ≤4 words. e.g. billing-mvp, void-and-amend, auth-rewrite. The slug becomes both the parent file (plan-{slug}.md) and the sub-folder ({slug}/).
Problem — 1-3 sentences from the user's perspective. Use vocabulary from glossary.md. If you can't write this without inventing, the conversation hasn't established the problem — stop and suggest /intent.
Solution — 2-3 sentences describing the approach. Reference existing specs/ADRs by wikilink ([[spec-cart-model]], [[adr-postgres]]).
User stories — extract from the conversation. Each story:
If you can identify <3 stories, the workstream may be too small. Two paths: (a) still create the parent plan-{slug}.md + {slug}/ sub-folder + the 1-2 story files — architectural consistency wins (skills downstream don't have a special-case path), or (b) skip the plan entirely and write a single standalone story under an existing related plan. Default to (a) unless the user prefers (b).
If you can identify >12 stories, the workstream is too large for one plan — propose splitting into multiple plans (plan-billing-foundation + plan-billing-rollout).
Out of Scope — 3-5 bullets capturing things explicitly not part of this plan. Lift these from the conversation.
Walk the synthesized plan and ask:
spec-{topic}.md? → propose creating one.Don't write specs/ADRs in this skill — flag the gaps and reference future skill work. Or, if the gap is small enough to fill inline (a single new term in glossary.md), do it now.
Write projects/<scope>/plan/plan-<slug>.md using wiki://template/project/plan (MCP resource, or kmd resource <uri>) as the frontmatter base, with body:
# <Plan Title>
## Problem
<1-3 sentences from the user's perspective.>
## Solution
<2-3 sentences. Reference [[spec-X]] and [[adr-Y]] by wikilink.>
## Stories
| # | Story | State | Category |
|---|---|---|---|
| 1 | [[story-1-<slug-1>]] | needs-triage | enhancement |
| 2 | [[story-2-<slug-2>]] | needs-triage | enhancement |
| 3 | [[story-3-<slug-3>]] | needs-triage | enhancement |
## Out of Scope
- <bullet 1>
- <bullet 2>
- <bullet 3>
## References
- [[glossary]] — vocabulary
- [[spec-<topic>]] — system overview
- [[adr-<decision>]] — relevant decision
Frontmatter:
---
title: <Plan Title>
kind: plan
scope: <scope>
status: active
summary: "<one-sentence summary>"
tags: [...]
created: "<today>"
updated: <today>
---
For each user story, write projects/<scope>/plan/<slug>/story-N-<story-slug>.md using wiki://template/project/story (MCP resource, or kmd resource <uri>). Body:
# <Story Title>
## User Story
As a <actor>, I want <capability>, so that <benefit>.
## Scenarios
**Scenario: <happy path name>**
- Given <precondition>
- When <action>
- Then <expected outcome>
**Scenario: <edge case name>**
- Given <precondition>
- When <action>
- Then <expected outcome>
## Slices
- [ ] **Slice 1** — <description> · `AFK` · [[spec-<related>]]
- [ ] **Slice 2** — <description> · `AFK` · [[adr-<related>]]
## References
- [[spec-<related>]]
- [[adr-<related>]]
Frontmatter:
---
title: <Story Title>
kind: story
scope: <scope>
parent: plan-<slug>
status: active
triage_state: needs-triage
category: enhancement
blocked_by: []
tags: [...]
sources: []
created: "<today>"
updated: <today>
---
Rules for scenarios:
/triage if a story needs more clarity.Rules for slices:
AFK (autonomous-runnable) or HITL (needs human judgment).Slice ownership across skills: /to-stories writes a rough slice draft (1-3 slices, coarse, mostly to ground the story shape). /to-issues is the refinement pass — it validates vertical-slice rules, splits coarse slices into proper tracer bullets, sets blocked_by between stories, and (in GH/GitLab mode) mirrors ready-for-agent slices to remote issues. Don't over-invest in slice quality here; that's /to-issues's job.
After writing, confirm the resync: the posttool hook syncs automatically; if kmd config's synced line did not advance, run kmd validate then kmd sync.
This makes the new plan and stories searchable via prime and search (MCP tools, or kmd prime / kmd search).
"Wrote
plan-<slug>with N stories, all atneeds-triage. Run/triageto evaluate readiness and move stories toready-for-agent(AFK) orready-for-human."
/intent./triage. Stories ship at needs-triage and wait for the user to invoke triage explicitly.glossary.md. Don't invent terms.summary: "...") to avoid breaking the sync walker./intent fill them.updated: field after every edit.created once at creation; never bump it — only updated changes on later edits.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
story-generation, gherkin, wiki, planning, intent-elaboration
npx claudepluginhub bartolli/kmd --plugin wiki-sdd10 skills in this plugin
/handoffThis skill should be used to close a session so the next one starts cold from corrected truth. Operator-invoked, gated on a retro note newer than the scope's last edit. Rewrites the primer within its budget first, then runs the status sweep (fully-resolved stories proposed for archiving, flipped only on approval) and reconciles every plan's Story Index — Focus, Next, Open, Read order, about 300 words, nothing another surface derives — confirms the index synced, and prints the one line the next session starts with. Use when the user says "/handoff", "hand off", "close the session", "wrap up the session", "prep the primer", "get the primer ready", "cold session prep", or "what does the next session start with"./intentInterview-style grilling that captures intent, sharpens vocabulary, and scaffolds wiki structure for a project scope. Use when the user wants to start a new workstream, refine an existing scope's intent, stress-test a plan against the project's domain language, or write a `glossary.md` (terms + relationships). Walks one question at a time, recommends an answer for each, and creates artifacts (`index.md`, `primer.md`, `glossary.md`, lazy ADRs) inline as decisions crystallize. Auto-detects greenfield (scope folder missing → scaffold) vs brownfield (scope exists → refine + cross-reference code). Triggers on phrases like "grill me", "grill the plan", "let's nail down what we're building", "set up a new scope", "refine the intent", "capture the intent", "write an intent", or `/intent`./retroThis skill should be used for a session retrospective at any point in a session — mid-session when drift is suspected, after a bug-hunting detour, after compaction, before a release cut, and always before /handoff. Asks three questions — 'What are you least confident about?', 'What's the biggest thing we're missing? What don't I realize?', and 'Where are we relative to the slice we started, and what were the detours?' — then works each finding while the context is hot — fixes it, prepares it up to the operator's approval, or asks — and files an intent only for what is blocked, with the blocker named — never a new story and never the primer. Use when the user says "/retro", "run the retro", "lightweight retro", "mid-session retro", "session retro", "retro protocol", "check for drift", "what are we least confident about", "what are we missing", or "what don't you realize"./signal-denseCanonical-vocabulary mode for agentic threads where assistant output re-enters context. Composable register predicates (technical, affect, safety, beginner) bind rule application; canonical handles, typed entities, and direct predicates extend an implicit KG across turns. Trigger on "signal-dense", "dense mode", "canonical mode", /dense, /signal-dense. Activate proactively in long technical threads, architecture reviews, ontology and KG work, and extended implementation sessions.
/tddImplement a single `ready-for-agent` slice from a wiki user story using disciplined red-green-refactor with vertical tracer bullets. Reads the slice description, the story's Gherkin scenarios (as the test specification), `glossary.md` (for vocabulary), and the referenced specs/ADRs. Refuses horizontal slicing (write-all-tests-then-all-impl). Ticks the slice checkbox when done. Use when the user says "let's TDD slice X", "implement slice 2 of story Y", "/tdd", "red-green-refactor this", or wants to start vertical-slice implementation on a wiki-tracked story./to-issuesBreak a wiki user story into vertical-slice tracer-bullet checkboxes (or refine existing slices), and in `github`/`gitlab` mode mirror `ready-for-agent` slices to the remote issue tracker with wikilinks back to the story file. Operates on `kind: story` files in the wiki. Quizzes the user on slice granularity, AFK vs HITL, and blocked-by dependencies. Use when the user says "break this story into slices", "refine the slicing", "/to-issues", "post these to GitHub", "publish issues from this story", or wants to validate vertical-slice rules on an existing story.Other plugins' skills for the same job