Prompt file imported from Kieransaunders/sswa (
.windsurf/workflows/sswa-apply.md). Copyright stays with the author.
Implement the SSWA change: ${1:-the active change under openspec/changes/}.
Read single-feature-flow, test-driven-development, and openspec-conventions first.
Preflight
Run the single-feature-flow preflight (environment flag + CLAUDE.md symlink). Confirm you
are on the change's sswa/<change-name> branch; if not, check it out — or, if propose
created a worktree for this change (concurrent-agent case), cd into that worktree
directory instead of checking out the branch in the current one.
GREEN — one test at a time
The failing tests already exist (written at propose time). Now make them pass:
- Read
proposal.md, the deltaspecs/,design.md(if present), andtasks.md. - Confirm the change's tests currently fail (RED). If they unexpectedly pass, stop and reconcile with the spec before writing code.
- Work the tasks in order. For each: write the minimum implementation to turn the relevant failing test green — no speculative features, no unrelated refactoring.
- After each test goes green, run the full suite to confirm nothing else broke. Then REFACTOR if useful (keep tests green, add no behavior).
- Check off the task in
tasks.md(- [x]). Commit in logical increments.
Done when
- Every task is checked, every scenario's test passes, the full suite is green, no warnings.
- Report status and the next step:
/sswa:verify.
Never edit a test to make it pass — fix the implementation. If a test is genuinely wrong, fix the spec and the test together, and re-confirm RED→GREEN.
