address-review
Convergent comments get applied. Divergent comments get a human decision. This is the wired form of /continue step 11 and implements Human Review in an AI Workflow. It treats every reviewer the same, human or bot, and it classifies before acting so a design disagreement is never silently coded away.
1. Run the script and follow its instructions
S="${CLAUDE_PLUGIN_ROOT}/scripts/address-review.mjs"; [ -f "$S" ] || S="scripts/address-review.mjs"
node "$S" # the PR of the current branch
node "$S" 123 --repo bewith-dev/<repo> # a specific PR, or pass its URL
node "$S" --reviewer coderabbit # one reviewer, or: humans | bots
node "$S" --json # full comment bodies and reply ids
The script (scripts/address-review.mjs) reads the PR with gh, read-only. It lists the unresolved threads grouped as human, human outdated, bot, bot outdated, marks the ones where the PR author already had the last word (those wait on the reviewer), lists top-level comments and bot review summaries that have no thread, checks that the checkout is on the PR branch, and ends with == INSTRUCTIONS FOR THE AGENT (follow in order) ==. Follow that block in order. Do not re-derive the list or the order by hand. If a verdict looks wrong, fix analyze() in the script and add a fixture to scripts/address-review.test.mjs.
A top-level comment counts as answered once the author comments, reviews or replies in a thread after it. A bot review summary also counts as handled once the same bot posts a later approval. A thread the author started is listed again as soon as someone else has the last word in it.
Exit codes: 0 nothing left to address, 3 action needed or waiting on a reviewer, 1 error (for example gh not authenticated). If the developer named a single comment, restrict the work to that one. Multi-repo workspace: run the script per repo root, and skip repos with no open PR.
2. Classify (judgement, the script does not do this)
Read each listed comment in full (--json, facts.threads[].comments) against the code, then label it:
| Label | Meaning | Action |
|---|---|---|
convergent | A bounded correction with one right answer: rename, extract, handle the null case, add a test, a suggestion block. | Draft the fix, get sign-off, apply. |
divergent | Challenges the approach: "why X and not Y", "should we even", anything that changes the design rather than a line. | Never apply. Ask the developer. |
nit | Non-blocking style preference. | Treat as convergent, mark non-blocking. |
question | The reviewer asks, not requests. | Draft an answer. If a change follows, re-classify. |
no-action | An acknowledgement, praise, or automation output such as a "Task linked:" comment. | Skip it. No edit, no reply. |
When unsure, classify as divergent. Escalating a fix is cheap. Silently coding away a disagreement is the failure this skill exists to prevent. A suggestion block or a bot author is a hint, not a verdict.
Show the developer the table (comment, reviewer, label, planned action) before any edit. It is the one place they can re-bucket what you misjudged.
3. Convergent: apply one comment per edit
Dispatch one apply-agent per convergent or nit comment, in parallel, each with only that comment:
Apply this single review comment. Do NOT fetch PRs or comments, everything is below.
- Repo path: <absolute repo root>
- File: <path relative to repo> Line(s): <line or start-end>
- Comment: <exact body> Suggested code (if any): <code block or "none">
Apply with a minimal edit. Use the suggested code if given, else infer. Preserve project style,
no unrelated refactors. Lint the modified file. Return: file, one-line summary, lint result, or "skipped: <why>".
Then run /verify.
4. Divergent: ask the developer
Reviewer @<reviewer> raised an approach-level concern on <file:line>:
"<exact comment>"
Options as I see them:
(a) keep the current approach because <reason>, and reply with the rationale.
(b) change to <reviewer's suggestion>, and apply it.
(c) something else, or discuss further.
What's your call?
If the developer agrees with the reviewer, re-classify as convergent. If they keep the approach, draft a reply that states the decision and the rationale.
5. Replies, pushes and resolving need an explicit yes
Draft one reply per thread, on the reviewer's own thread (GitHub MCP add_reply_to_pull_request_comment, with facts.threads[].replyTo as the comment id):
- convergent: "Applied in
<sha>:<what changed>." - divergent, changed: "Agreed, changed the approach to
<...>in<sha>." - divergent, kept: "Keeping the current approach because
<rationale>. Open to discussing further."
Show the developer the fix commits and the reply drafts. Push and post only after they say yes. Never resolve a thread, the human does that. Never merge. Then rerun the script: it should show those threads as waiting on the reviewer.
6. Report
Summarize per repo: comments by label, convergent fixes applied (files and shas), divergent decisions (kept or changed) with the replies posted, anything skipped and why, and the threads still waiting on the reviewer.
Fast path: an all-bot PR
When every listed item is a bot comment and all classify convergent, the flow is one table, one sign-off, one batch of edits, one batch of replies. Use --reviewer coderabbit (or another bot login) to limit a run to one bot.
Boundaries
- The script only reads. Posting, pushing, resolving and switching branches are always the developer's call.
- Divergent comments are never auto-applied, and every one gets a reply stating the decision.
- Classification is by content, not by author.
- No worktree isolation: this acts on the developer's own active PR branch, which is the current task (see session-safety).
Cross-references
code-reviewer: source of the "explain the disagreement inline" rule./pr-review: the producing side. This skill is the consuming side.- scripts-end-in-agent-instructions: the pattern the script follows.