/spwf:buildfrom spwf
Phase 3 orchestrator — Full Red-Green-Refactor cycle. For each pending task: invokes write-tests (Red: write failing tests), then opsx:apply (Green: implement via OpenSpec), then run-tests (Verify: confirm green before moving on). Loops until all tasks complete. After all tasks complete, runs opsx:verify (spec sign-off), then recommends simplify (Refactor).
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.
Orchestrate the Red → Green → Verify cycle for every pending task in the active OpenSpec change, then sign off against the spec and recommend Refactor.
For each pending task:
Red → write-tests (write failing tests that define the task's behaviour)
Green → opsx:apply (implement the task via OpenSpec)
Verify → run-tests (confirm full suite is green before moving to the next task)
On all tasks complete:
Spec sign-off → opsx:verify
Refactor → recommend simplify
If the suite is still red after implementation, invoke debug-recovery before proceeding.
Before any test or commit, confirm the build is not about to commit per-task
onto the base branch. Delegates to
_shared/branch-management.md §2 "Detect-state decision table".
Read .spwf/branch.yaml (defaults: base: main, prefix: feature/,
enforce: true).
Opt-out: if enforce: false, skip Phase 0 silently and begin Phase 1 — the
build commits on the base branch as the pre-change baseline did.
Otherwise classify the current branch:
On feature/{change-id} → pass silently; begin Phase 1.
On base with an active change (openspec/changes/{change-id}/ exists
with incomplete tasks) → halt with the offer:
You're on `{base}` with active change `{change-id}`. Build will commit per
task — that pollutes `{base}`. Switch to `feature/{change-id}` (I'll create
it from HEAD)? [Y/n]
On Y / enter: run git checkout -b feature/{change-id} (or
git checkout feature/{change-id} if it already exists ahead of HEAD), then
begin Phase 1.
On n: halt with:
Build cancelled — set `.spwf/branch.yaml: enforce: false` to commit on
`{base}` intentionally.
This is the safety net for Layer 1 (spec): legacy specs predating this change,
imported specs, auto_branch: never, or a manual checkout between spec and
build all surface here.
Invoke spwf:write-tests:
- [ ] task from the active OpenSpec tasks.mdDo not proceed to Green until the tests are genuinely red. If a test passes before implementation, write-tests will flag this as a problem.
Invoke opsx:apply:
[x] on completionThe implementation constraint: write only what makes the failing tests pass. Nothing more.
Invoke spwf:run-tests:
spwf:debug-recoverydebug-recovery diagnoses the failure, applies a minimal fix, and re-runs. If unresolvable after two attempts, stop and report.
When all pending tasks are complete, invoke opsx:verify:
If opsx:verify reports misalignment, stop with:
⚠ Spec artefact misalignment detected.
Review the opsx:verify findings. Then either:
• Update the spec artefacts to reflect what was built, or
• Revise the implementation to match the spec
Re-run /spwf:build when resolved.
Do NOT invoke debug-recovery on a spec misalignment — this is a human decision, not a code bug.
After opsx:verify passes for a task, before looping to the next task, propose a commit.
Show git diff --stat HEAD so the user sees exactly what was written, then propose:
feat({change-id}): {task description — the exact task text from tasks.md}
{1-2 sentences on what was implemented — not what the task says, what was actually built}
{if any unexpected discovery: e.g. "found existing X was incompatible — worked around by Y"}
{if any design decision made during implementation that wasn't in the spec}
{if any edge case discovered and handled that the tests didn't originally cover}
Ask: "Ready to commit task {N}? Confirm with 'yes' or edit the message first."
After confirming:
git add -p # show a patch-mode summary so nothing accidental is staged
git commit -m "{confirmed message}"
If the user declines: note "Skipped — changes are unstaged" and continue to the next task. Do not force commits.
If pending tasks remain, return to Phase 1 for the next task.
If all tasks are complete and spec sign-off passed:
✓ All tasks complete for change: {change-id}
Tests passing: {count}/{count}
Spec sign-off: ✓
Recommended: /spwf:simplify (Refactor)
Clean up the implementation while tests stay green, then /spwf:pr-create → /spwf:pr-review
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub simon-potter/spwf --plugin spwfOther plugins' skills for the same job
38 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./