/spwf:specfrom spwf
Phase 1 — Spec. Convert a challenged ideation file into a complete OpenSpec change proposal with fidelity validation. Use when you have a file in todo/ that has been through challenge and is ready to be formalised. Checks that openspec/ is initialised before starting. Hands off to `/spwf:brief`, which explains the plan before `/spwf:approve-plan` gates it.
Ships in spwf. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description, though model invocation is off: only you can start it.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Convert a challenged ideation file (in todo/) into a validated OpenSpec change proposal. Requires OpenSpec to be initialised in the current project.
test -d openspec/ || echo "MISSING"
If the openspec/ directory does not exist, halt immediately:
OpenSpec not initialised. Run: openspec init
Do not proceed until the user runs openspec init.
If $ARGUMENTS contains a file path, use it. Otherwise list files in todo/ and use the most recently created ideation file (check status: ideation in frontmatter).
Read the source file completely.
Note the ideation file's ticket: frontmatter field if present (written by
capture / issue-to-task for tracker-sourced work). Carry it into the
proposal in Step 3. If there is no ticket: field, omit the Tracker line
entirely in Step 3 — do not prompt for or invent a ticket.
Use a verb-led kebab-case slug: add-, refactor-, update-, remove-.
Verify uniqueness:
openspec list
mkdir -p openspec/changes/{change-id}/specs/{capability}/
Generate these files:
# Proposal: {Title}
**Change ID**: `{change-id}`
**Status**: Draft
**Type**: {bug | change}
**Created**: {date}
**Source**: [todo/{slug}.md](../../../todo/{slug}.md)
**Tracker**: {ticket} ← include ONLY if the ideation file had a `ticket:` field; omit this line entirely otherwise
---
## Why
{Problem or opportunity from the Context section — 1-2 sentences}
## What Changes
- {Bullet list from What we know + Rough scope}
## Impact
- **Affected areas**: {from Rough scope}
- **No breaking changes** / **BREAKING**: {if applicable}
---
## Decisions
{Any open questions from the ideation file — marked TBD}
## Success Criteria
{What "done" looks like — derived from Rough scope}
Setting Type. Derive it from the ideation file, not from a guess:
| Ideation file | Type |
|---|---|
todo/BUG-{slug}.md (bug path — capture classified it as a bug) | bug |
todo/{slug}.md (change path — feature, refactor, docs, chore) | change |
Downstream skills read this line to decide whether they apply — brief skips
bugs, for instance. Always emit it: an absent Type forces every reader to
guess, and the whole point of recording it here is that the filename convention
is not a reliable signal on its own.
Create only if the ideation file contains technical decisions, alternatives, or architectural rationale. Otherwise skip.
Tasks must be structured for TDD. Each task describes a single, testable unit of behaviour. The build cycle writes failing tests for each task before implementing it, so every task must be implementable in one Red→Green cycle.
Task quality rules:
# Tasks: {change-id}
> **Authoritative Reference:** [`todo/{slug}.md`](../../../todo/{slug}.md)
## Phase 1 — {First logical group}
- [ ] 1.1 {Behaviour: what the code does when X}
- [ ] 1.2 {Behaviour: what the code does when Y}
## ADDED Requirements
### Requirement: {name}
{Short description} SHALL {behaviour}.
#### Scenario: {description}
**WHEN** {trigger}
**THEN** {outcome}
Verify nothing from the ideation file was lost:
| Check | Target |
|---|---|
| Context captured | proposal.md Why section |
| What we know captured | proposal.md What Changes |
| Open questions addressed | proposal.md Decisions (TBD) |
| Rough scope decomposed | tasks.md |
openspec validate {change-id} --strict
Fix any validation errors, then report:
/spwf:brief — explains the plan before it is built;
it points on to /spwf:approve-plan, which remains the go/no-go gateBefore committing, make sure the spec commit lands on feature/{change-id},
not on the base branch. Delegates to
_shared/branch-management.md §3 "Auto-branch operation".
Read .spwf/branch.yaml (defaults: prefix: feature/, base: main,
auto_branch: always, enforce: true) per
§1.
Opt-outs (skip this step silently, no output):
.spwf/branch.yaml: enforce: false.spwf/branch.yaml: auto_branch: neverOtherwise classify the current branch per the detect-state table §2 and act — emitting exactly one confirmation line:
| State | Action | Confirmation line |
|---|---|---|
On base | git checkout -b feature/{change-id} (auto). If auto_branch: ask, prompt Create branch feature/{change-id} from {base}? [Y/n] first | ✓ Branched to feature/{change-id} (auto) |
On feature/{change-id} already | no-op | ✓ Already on feature/{change-id} |
feature/{change-id} exists but not checked out | git checkout feature/{change-id} (not -b). If the existing branch is behind HEAD, halt with branch exists but is behind HEAD — manual merge or rebase required | ✓ Switched to existing feature/{change-id} |
| On another branch | Ask once: You're on {current}, not {base} and not feature/{change-id}. Spec on {current} or create feature/{change-id}? — proceed per the answer | (per answer) |
If the working tree carries uncommitted changes unrelated to the spec artefacts about to be committed, halt per §3 failure handling.
Show git status so the user sees all new spec artefacts, then propose a commit:
spec: add OpenSpec change {change-id}
{1-2 sentences summarising what the change delivers and why}
Artefacts: proposal.md, tasks.md, {N} spec scenarios{, design.md if created}
{if any open decisions remain: TBD decisions: {list them}}
{if any notable structural discovery during spec work, e.g. "split into 2 phases
because task 3 depends on task 1 completing fully"}
Ask: "Ready to commit? Confirm with 'yes' or edit the message first."
After confirming, stage all new spec artefacts and commit:
git add openspec/changes/{change-id}/
git commit -m "{confirmed message}"
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub simon-potter/spwf --plugin spwf38 skills in this plugin
/address-reviewPhase 6.5 — Address Review. Turn review feedback into action. Sources feedback from either a local report file (e.g. {branch}-review.md from /spwf:pr-review or {branch}-self-review.md from /spwf:simplify) or fetched human comments on an open PR/MR. For each item runs READ → VERIFY → EVALUATE → implement-or-push-back, in priority order (blocking → important → nit). Forbids performative agreement ("you're absolutely right"). Use after pr-review, or whenever a reviewer leaves comments./agent-optimiseCross-cutting — Audit both the project .claude/ and personal ~/.claude/ for quality issues. Covers CLAUDE.md scope and length, agent descriptions, skill frontmatter, and settings.json conflicts. Always audits both scopes. Produces a prioritised P1/P2/P3 fix list./