/spwf:address-reviewfrom spwf
Phase 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.
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.
Turn a review report — or human comments on the open PR/MR — into committed fixes (or reasoned push-backs). This is the receiving side of the review cycle.
Source: obra/superpowers — receiving-code-review — "Code review requires technical evaluation, not emotional performance."
Review feedback is a hypothesis about the code, not an instruction to obey. Every item gets evaluated against codebase reality before action.
Required loop, per item:
openspec/changes/*/design.md?Forbidden responses (these violate the posture and produce slop):
Acknowledge through action: a one-line description of the fix or the push-back beats any gratitude expression.
The skill takes one optional argument; resolution order:
$ARGUMENTS value | Source |
|---|---|
| Empty | Look for {branch}-review.md then {branch}-self-review.md in the cwd. Halt with usage hint if neither exists. |
A path ending in .md | Read that file as the report. |
A number, or a #/!-prefixed ref, or a forge URL | Treat as PR/MR ref; fetch comments via the forge CLI. |
Usage hint on halt:
Usage: /spwf:address-review [report.md | <PR/MR number or URL>]
Examples:
/spwf:address-review # auto-pick {branch}-review.md
/spwf:address-review feature-foo-review.md # explicit report file
/spwf:address-review 42 # fetch comments from PR/MR !42 / #42
/spwf:address-review https://gitlab.com/org/repo/-/merge_requests/42
cat "$REPORT"
The report follows the pr-review / self-review shape — pull items out of the Required Changes, Suggestions, and Questions sections.
Detect the active forge per _shared/forge-dispatch.md (auto-detect from git remote get-url origin, or read .spwf/forge.yaml).
Fail fast on missing CLI. Run {cli} auth status. If the required CLI (glab for GitLab, gh for GitHub) is missing or unauthenticated, halt with:
"Forge CLI
{cli}not installed or not authenticated. Install (brew install {cli}) and run{cli} auth login. Seeplugins/spwf/skills/_shared/forge-dispatch.md."
Dispatch the fetch:
# GitLab (default)
glab mr view "$REF" --comments
# GitHub
gh pr view "$REF" --comments
# Also fetch review-level threads (line comments aren't always in --comments output):
gh api repos/{owner}/{repo}/pulls/{REF}/comments --jq '.[] | {path, line, body, user: .user.login}'
Normalise each comment into an item with: author, file (if line-anchored), line (if line-anchored), body, thread_id (for replies).
Group items into Blocking, Important, Nit, Question, using these rules:
🔴, 🟡, 🟢, 💡, ❓) are authoritative.Print the grouping summary before processing:
Loaded {N} review items from {source}:
🔴 Blocking: {N}
🟡 Important: {N}
🟢 Nit: {N}
❓ Question: {N}
Working order: Blocking → Important → Nit. Questions handled inline as they block their parent item.
Process in priority order: Blocking first, then Important, then Nit. Within a priority, easier fixes (single-file, no public API change) come before complex refactors — this surfaces wins fast and gives test signal on the rest.
For each item:
Echo the item verbatim with its origin (file:line if anchored, or section in the report). Then restate the requirement in one line — your own words.
Don't take the reviewer's premise on faith. Use:
Read the named file at the named line.Grep for the symbol or pattern.openspec/changes/*/design.md — is the current behaviour an explicit decision?Record a one-line VERIFY result: "premise holds" / "premise wrong — {why}" / "needs clarification — {what}".
Decide which bucket the item lands in:
| Bucket | When | Action |
|---|---|---|
| Implement | Premise holds and fix is technically sound. | Edit code. Run targeted tests. Commit. |
| Push back | Premise wrong, fix would break a working contract, conflicts with a recorded design decision, or violates YAGNI ("proper implementation" of an unused feature). | Draft a one-paragraph response with the evidence. Do not edit code. |
| Clarify | Premise unclear, scope ambiguous, or you can't reproduce the issue. | Draft a specific question. Do not edit code. Batch all clarifications into one reply — partial understanding produces incoherent half-fixes. |
| Defer | Valid point, but out of scope for this PR (separate concern, larger refactor, existing-code issue). | Note in a todo/REVIEW-{slug}.md for later capture. Do not edit code in this PR. |
Implement path:
# Make the fix using Edit
# Run targeted tests for the touched file(s) — not the full suite
# Stage and commit with a reference to the review item
Commit message template — short and concrete:
fix(review): {one-line description of what changed}
Addresses: {report path or PR ref}#{item-anchor or line ref}
If the item came from a forge thread with an ID, append Thread: {thread_id} so the reply (Step 4) can resolve it.
Push back path:
Draft the response now (do not post yet — collect into the Step 4 reply bundle). Format:
On {item-anchor}:
Premise: {what the reviewer assumed}
Reality: {what the codebase actually does, with evidence — file:line or test name}
Therefore: keeping current behaviour because {one-line rationale}.
Technical reasoning only. No "respectfully", no "I think", no hedging. Cite tests and design decisions by name.
Clarify path:
Draft a specific question. Hold for Step 4 batching.
Defer path:
Append an entry to a new or existing todo/REVIEW-{branch}.md:
- [ ] {one-line item} — from review of {ref}, deferred because {reason}
After all items are processed, produce one structured response.
Update the report with a status column (or append a "Resolution" section):
## Resolution — {today's date}
| Severity | Item | Disposition | Commit |
|---|---|---|---|
| 🔴 | {short item} | Implemented | {sha} |
| 🟡 | {short item} | Pushed back | — |
| 🟡 | {short item} | Clarification needed | — |
| 🟢 | {short item} | Deferred to todo/REVIEW-{branch}.md | — |
### Push-backs
{full text of each push-back}
### Clarifications needed
{batched list of questions}
Post one consolidated reply per thread (don't spray multiple short replies). For each thread, choose one of:
glab mr note create {REF} --message "..." / gh pr comment {REF} --body "..." referencing the commit SHA. One line, factual.If the forge supports thread resolution (gh pr review --comment-id / glab discussion APIs) and the disposition is Implemented or Pushed back with acceptance, resolve the thread.
✓ {N} items processed: {N_implemented} implemented, {N_pushedback} pushed back, {N_clarify} clarifications, {N_deferred} deferred.
Next:
- {if clarifications pending}: wait for reviewer reply.
- {if push-backs posted}: wait for reviewer reply.
- {if all resolved}: re-run /spwf:pr-review {REF} to confirm clean, or proceed to /spwf:close.
When a reviewer is right, describe the fix. Don't perform agreement. Compare:
find() with the safer get_or_404() per your note on handlers/user.py:42."The second sentence proves you read, verified, and acted. The first proves nothing.
style: address review nits commit.What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub simon-potter/spwf --plugin spwf38 skills in this plugin
/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./approve-planPhase 2 — Approve plan. Reviews the task list from spec for quality (atomicity, testability, clarity), then applies four adversarial lenses (Skeptic, Architect, Minimalist, Security) as advisory input for the human reviewer. Quality issues are blocking; adversarial findings are advisory. Security lens identifies tasks touching auth, billing, user input, or secrets so the builder has explicit awareness before writing those tasks. Presents everything for explicit human go/no-go before building starts./