/wiki-sdd:triagefrom wiki-sdd
Moves intent and user-story files through a wiki-based triage state machine. Reads/writes frontmatter, recommends transitions, promotes intents to stories, dismisses with reasons, and mirrors state to GitHub/GitLab labels.
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.
A small state machine over wiki story files. Lifts Matt Pocock's triage pedagogy onto the wiki's kind: story artifact.
WIKI_SCOPE: <scope> declared in the project instructions. If missing, suggest /wiki.projects/<scope>/intent/ or one story file under projects/<scope>/plan/<plan-name>/. With neither, suggest /to-stories.Intents carry no triage labels; their state is status plus one outcome field ([[adr-intent-kind]]):
draft — filed, unread by triageactive — scheduled: accepted, story not yet writtenarchived with exactly one of promoted_to (story slug), dismissed (reason), fixed_by (regression test path)superseded with superseded_by — merged into another intent, whose sightings absorbed the countStories carry two label roles.
Two category roles (story has exactly one):
bug — something is brokenenhancement — new feature or improvementFive state roles (story has exactly one, lives in triage_state frontmatter):
needs-triage — story needs evaluationneeds-info — agent waits on user clarification (in a solo-operator context: the agent is blocked on a user decision)ready-for-agent — fully specified, AFK-ready (an agent can pick it up with no human context)ready-for-human — needs human implementation (judgment, external access, hardware, design review)wontfix — will not be actionedState transitions: an unlabeled or needs-triage story moves to needs-info, ready-for-agent, ready-for-human, or wontfix. needs-info returns to needs-triage once the user provides the missing input. The user can override at any time — flag transitions that look unusual and confirm before proceeding.
When WIKI_ISSUE_TRACKER is github or gitlab, every comment posted to the remote tracker during triage must start with:
> *This was generated by AI during triage.*
In local mode, no remote comments are posted; the disclaimer doesn't apply.
The user invokes /triage and describes what they want in natural language. Examples:
Read state from the vault filesystem, never from an index query: the index is
disposable and the search tool returns ranked candidates, not frontmatter.
projects/<scope>/intent/intent-*.md; read status,
sightings, origin, updated.projects/<scope>/plan/*/story-*.md; read triage_state,
category, updated, and the slice tick counts.search(query, scope, kind="intent") (MCP) or
kmd search "<terms>" --scope <scope> --kind intent (CLI) finds related
candidates by content when a finding needs a twin check — the walk above is
still the state source.Present the buckets in this order, each with counts and one line per item:
draft — ordered by sightings descending, then updated
ascending. Two sightings, or a confirmed falsification, is the promotion
threshold; flag those first.active — scheduled and waiting for a story; oldest first.triage_state: ready-for-agent, status: active,
zero ticked slices, and updated more than thirty days before the clock.
Accepted work nobody started is the backlog's debt; it is offered three
actions, never left in the queue by default:
triage_state: needs-triage, a Triage Notes line naming the
age; the story re-enters evaluation.triage_state: wontfix, status: archived, the reason in
Triage Notes. A capacity call, not a design rejection: no adr-no-*
unless the operator wants rationale on record.updated moves from the clock and
the story leaves the band for another thirty days.needs-triage stories — never evaluated, oldest first.needs-info stories — blocked on user input, oldest first.ready-for-agent stories — count plus a one-line summary each, so the
AFK queue is visible.Let the user pick.
plan/plan-{name}.md for context.glossary.md for vocabulary.adr-no-*.md files in the scope — if a similar enhancement was previously rejected, surface it. (This is the wiki-native equivalent of Matt's .out-of-scope/ knowledge base.)bug category, attempt reproduction: trace the relevant code, run tests if needed.Tell the user your category and state recommendation with reasoning. Wait for direction.
Format:
"Recommendation:
category: enhancement,triage_state: needs-info.Reasoning:
- Acceptance criteria are clear (3 scenarios).
- But Slice 2 references a payment-gateway integration that isn't specified anywhere — needs an ADR or a spec stub before this can be AFK.
Specifically I need from you:
- Which payment gateway? (Stripe, Adyen, …)
- Are we using their hosted form or building our own?
Confirm and I'll update the story frontmatter and post triage notes."
For bug stories, attempt repro before grilling. Read the reporter's steps, trace the relevant code, run tests or commands. Report what happened:
ready-for-agent or ready-for-humanneeds-info signalneeds-info signalA confirmed repro makes a much stronger agent brief.
If the story body is too thin for ready-for-agent, chain into /intent to flesh it out. Don't try to grill within /triage — separation of concerns.
ready-for-agent:
blocked_by: is populated correctly (no missing dependencies).triage_state: ready-for-agent.ready-for-agent label.ready-for-human:
ready-for-agent.triage_state: ready-for-human.needs-info:
triage_state: needs-info.wontfix-bug:
## Triage Notes section.triage_state: wontfix, status: archived.wontfix-enhancement:
projects/<scope>/adr/adr-no-<slug>.md capturing the rejection rationale (see template below).triage_state: wontfix, status: archived.## Triage Notes.needs-triage:
Update the Story Index table in plan/plan-{name}.md to reflect the new state column. Don't drift — the parent plan's table is canonical for the at-a-glance view.
updated: fieldSet the story's updated: from the clock — date -u +%Y-%m-%dT%H:%M:%SZ, quoted — never composed.
Harnesses with the posttool hook validate and sync automatically. Check kmd config: if the synced line did not advance past your edits, the hook is not wired — run kmd validate, fix findings, then kmd sync.
If the user says "move story X to ready-for-agent", trust them. Confirm what you're about to do (frontmatter changes, comment, plan-table update), then act. Skip grilling.
If moving to ready-for-agent without a grilling session, ask whether the body needs an agent brief appended.
origin, sightings, the Falsification path.search with kind="intent" on the intent's distinctive terms, then read the hits. A dismissed twin carries its reason in dismissed — surface it before recommending anything.One of three outcomes, with reasoning, then wait for direction:
sightings ≥ 2, or the falsification confirmed, or the operator calls it. The story gets written now.status: active marks it scheduled.Promote:
/to-stories) with the intent as input: the story's problem, scenarios, and first slices derive from the intent's sections, under the active plan.status: archived, promoted_to: <story slug>, updated from the clock.triage_state is whatever the operator chose at promotion — ready-for-agent when the brief is complete, needs-triage otherwise.Hold:
status: active, updated from the clock. Nothing else moves.Dismiss:
status: archived, dismissed: "<one-line reason>", updated from the clock.adr-no-<slug>.md as for a rejected enhancement, linked from dismissed.Merge (two intents for one finding):
status: superseded, superseded_by: <survivor slug>. The survivor's sightings absorbs the count and its updated moves.As for stories: the posttool hook validates and syncs; if kmd config's synced line did not advance, run kmd validate then kmd sync.
A forwarded review is inbound work, like an intent: its findings are claims to weigh against the work's stop rule. Closing each finding as it arrives turns every round into a patch, and a reviewer can always find one more shape. This pattern covers what a reviewer brings; findings the session raises about its own work follow /retro.
No fix is written before Step 4. A reproduction case is not a fix.
For each finding:
Present one row per finding, lead with a recommendation for the round as a whole, and wait for direction:
| Finding | Reproduced | Class | Cause | Position | Cost |
|---|
sightings bump on the one that already covers it.A second round whose findings share a cause with an earlier round is one cause seen twice. Do not patch the new shape. Recommend one of two moves and wait: the root fix for the cause, or a scope cut that takes the cause out of this work.
Work that reaches a second review round while filed only under an intent is promoted first (Pattern D): the story carries the stop rule the rounds lacked.
ready-for-agent or ready-for-human)## Agent Brief
**What to build:** <one-sentence description of the slice path>
**Acceptance criteria** (lifted from scenarios above):
- [ ] <criterion 1 — derived from Scenario 1>
- [ ] <criterion 2 — derived from Scenario 2>
**Relevant code paths:**
- `<path/to/file.ts>` — <one line on what it does>
**Out of scope:**
- <bullet>
**Definition of done:**
- All scenarios pass as integration tests
- `<plan/{name}/story-N>` slice checkboxes all ticked
- No unresolved [[spec-X]] divergence
- <the outcome in a checkable form, and the baseline it is judged against when the work changes existing behavior>
Out of scope and Definition of done are the story's stop rule: a review of the work is weighed against them (Pattern E).
needs-info)## Triage Notes
**What we've established so far:**
- <point 1>
- <point 2>
**What we still need from you:**
- <specific actionable question 1>
- <specific actionable question 2>
Capture everything resolved during triage under "established so far" so the work isn't lost. Questions must be specific and actionable, not "please provide more info".
adr-no-{slug}.md (when rejecting an enhancement)Use wiki://template/project/adr (MCP resource, or kmd resource <uri>) with frontmatter:
---
title: "<Negative title — e.g., 'No multi-currency in v1'>"
kind: adr
scope: <scope>
status: active
summary: "Why <enhancement> was rejected from <plan-name>."
tags: [out-of-scope, ...]
supersedes:
superseded_by:
sources:
- projects/<scope>/plan/<plan-name>/story-N-<slug>.md
created: "<today>"
updated: <today>
---
Body:
# <Title>
## Status
active
## Context
The story `[[story-N-<slug>]]` proposed <enhancement>. Triage rejected this for v1.
## Decision
We will not <enhancement> in <plan-name>.
## Rationale
- <reason 1>
- <reason 2>
## Consequences
What stays simple. What's deferred. Conditions under which we'd revisit.
## Reconsider when
Specific signals that should re-open this decision (e.g., "if >5 customers ask for it", "if a related story emerges").
If prior triage notes exist in a story body, read them, check whether the user has answered any outstanding questions, and present an updated picture before continuing. Don't re-ask resolved questions.
promoted_to, dismissed, or fixed_by. A dismissal without a reason is not a dismissal.wontfix-enhancement on design grounds, always write adr-no-{slug}.md. Rejection without rationale loses institutional memory. A stale-band dismissal is a capacity call and records its reason in Triage Notes instead.kmd config's synced line did not advance, run kmd validate then kmd sync./triage — chain to /intent if needed.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
triage, state-machine, wiki, issue-tracking, story-management
Other plugins' skills for the same job
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.