From spwf
Pre-phase orchestrator — accepts any input (issue tracker ticket, Slack message, file, or freeform description), classifies it as a bug or a change, then routes to the appropriate path. Bug path runs systematic root-cause investigation and produces todo/BUG-{slug}.md. Change path runs a lightweight qualification check and produces todo/{slug}.md. Both outputs feed /spwf:challenge.
How this skill is triggered — by the user, by Claude, or both
Slash command
/spwf:captureThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Accept any input, classify it, and produce an ideation file ready for `/spwf:challenge`.
Accept any input, classify it, and produce an ideation file ready for /spwf:challenge.
Read $ARGUMENTS:
| Input pattern | Action |
|---|---|
| Empty | Ask: "What are you capturing? (issue tracker ticket key, file path, or describe it)" |
Tracker ticket key (e.g. ACAD-42, PROJ-123) or from {tracker} TICKET | Tracker — dispatch to the configured tracker's get_issue per _shared/tracker-dispatch.md |
File path ending .md | File — read existing file |
from slack or input explicitly attributed to a Slack message | Slack — treat body as freeform; record source as slack |
| Anything else | Freeform — treat as-is |
For tracker fetches, extract: summary, description, acceptance criteria, issue type, labels/tags, priority/state.
Fail fast on missing MCP. If the user supplied a ticket-shaped argument and no
tracker MCP is configured (no mcp__youtrack__* and no mcp__atlassian__jira_* tools
respond), stop with: "No issue tracker MCP configured. Add YouTrack or Atlassian MCP
in user settings, or set tracker: none in .spwf/tracker.yaml to skip tracker steps."
Do not silently fall back to freeform.
Tracker selection: see _shared/tracker-dispatch.md. Default is to probe YouTrack then
Jira; override via tracker: in .spwf/tracker.yaml.
Apply in order — stop at the first confident match.
Bug signals:
Bug (YouTrack Type: Bug / Jira issuetype = Bug)error, exception, crash, traceback, not working, broken, failing, regression, wrong, incorrect, 500, null pointer, undefined is notBUG: or FIX:Change signals:
Feature / Task / Epic / Jira Story / Task / Epic / Improvement)add, implement, build, create, new feature, support, allow, as a userIf ambiguous — ask one question: "Is this something that's broken, or something new to build?" Then route accordingly.
Collect as much of the following as is available:
git log --oneline -20 -- {relevant paths}For multi-component systems, identify at which boundary the failure occurs before assuming a root cause.
Trace backward from the symptom:
git log --oneline -10 -- {file}Document every difference found, however minor.
Find working code structurally similar to the broken code. Compare completely:
Write a single, specific hypothesis:
Hypothesis: {The bug is caused by X, because Y. Evidence: Z.}
Rules:
Before writing the artefact, assess the fix type:
| Fix type | Signals | Recommendation |
|---|---|---|
| Content / config only | Root cause is in database content, CMS page copy, a config file, or an environment variable — no code change required | Direct edit — no spec needed |
| Trivial code fix | Single-line change, obvious typo, missing null check | Fix directly, no spec needed |
| Non-trivial code fix | Multiple files, logic change, risk of regression | /spwf:challenge → Spec → Build |
Record the fix type in the artefact's Rough scope section.
Generate todo/BUG-{slug}.md:
---
source: youtrack | jira | linear | slack | file | scratch
tracker: youtrack # omit if source is slack | file | scratch
ticket: ACAD-42 # tracker-agnostic id; omit if no tracker ticket
created: YYYY-MM-DD
status: ideation
type: bug
---
# BUG: {Title}
## Context
{What is broken: observed behaviour vs expected behaviour}
## Reproduction
{Steps to reproduce consistently; "cannot reproduce" if applicable}
## Root cause hypothesis
{The written hypothesis from Phase 4 — specific and evidenced}
## Evidence
{Stack traces, error messages, relevant git log, working vs broken comparison}
## Affected area
{Files, components, or systems involved}
## Open questions
{What remains unclear; gaps that Challenge will surface}
## Rough scope
{Fix type: content/config only | trivial code fix | non-trivial code fix. What a fix would touch.}
Lightweight check — catch obviously incomplete inputs before Challenge. Four checks:
| Check | Passes when |
|---|---|
| Problem clarity | There is a discernible problem or opportunity being addressed |
| Actor | There is at least one named or implied user/system affected |
| Scope boundary | It is roughly clear what is in scope (even if vague) |
| Motivation | There is a reason this matters (business value, user pain, technical debt) |
For each check that fails, ask one targeted question before continuing — never more than one per message.
Limit: After two clarifying questions, proceed regardless. Record remaining gaps as open questions — Challenge will surface them.
If the input clearly passes all four checks: proceed immediately, no questions.
Generate todo/{slug}.md:
---
source: youtrack | jira | linear | slack | file | scratch
tracker: youtrack # omit if source is slack | file | scratch
ticket: ACAD-42 # tracker-agnostic id; omit if no tracker ticket
created: YYYY-MM-DD
status: ideation
---
# {Title}
## Context
{Problem or opportunity — from description or qualify dialogue}
## What we know
{Concrete facts, constraints, or acceptance criteria from the input}
## Open questions
{Gaps that remain after qualify; may be empty if input was complete}
## Rough scope
{What's in scope; note anything explicitly out of scope}
After writing the artefact, if the source was not an issue tracker (i.e. slack, file, or scratch), and a tracker MCP is configured, ask:
"Is there a ticket for this? If not, I can create one — just give me the project key."
If tracker: none is set in .spwf/tracker.yaml, or no tracker MCP is configured
(neither mcp__youtrack__* nor mcp__atlassian__jira_* available), skip this step
entirely — no error.
If the user provides a project key:
create_issue operation per
_shared/tracker-dispatch.md, with the artefact title as summary and
hypothesis/context as descriptionticket: {ID}, tracker: {tracker}) and report the created ticket URLIf the user says no or skips: proceed without creating a ticket.
Bug path:
✓ Bug artefact created: todo/BUG-{slug}.md
Source: {youtrack ACAD-42 | jira PROJ-123 | slack | scratch}
Classified as: bug ({signal that triggered classification})
Hypothesis: {one-line summary}
Fix type: {content/config only | trivial code fix | non-trivial code fix}
Open questions: {count}
Recommended next step:
{if content/config only} → Direct edit — no spec needed. Location: {where to edit}
{if trivial code fix} → Fix directly, then /spwf:retrospective
{if non-trivial} → /spwf:challenge todo/BUG-{slug}.md
Change path:
✓ Ideation file created: todo/{slug}.md
Source: {youtrack ACAD-42 | jira PROJ-123 | slack | file path | scratch}
Classified as: change ({signal that triggered classification, or "confirmed by user"})
Qualify: {passed cleanly | 1 question asked | 2 questions asked — {N} gaps remain}
Open questions: {count}
Recommended next step: /spwf:challenge todo/{slug}.md
After the report (and after the tracker prompt if applicable), propose a commit:
Bug path message:
chore: capture bug — {title}
Source: {source}
Signal: {signal that triggered bug classification}
Fix type: {content/config only | trivial code fix | non-trivial code fix}
Hypothesis: {one-line root cause}
{if any notable finding during investigation, e.g. "found recent commit X may have introduced this"}
Change path message:
chore: capture — {title}
Source: {source}
{key qualification decisions or constraints surfaced during capture}
{open questions count if > 0: N open questions remain for challenge}
Show git status, then ask: "Ready to commit? Confirm with 'yes' or edit the message first."
After confirming, run:
git add todo/{slug}.md # or todo/BUG-{slug}.md
git commit -m "{confirmed message}"
npx claudepluginhub simon-potter/spwf --plugin spwfGuides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.