Skip to content

Add /address-feedback: judge, fix and reply to every comment on a pull request - #124

Merged
polewskm merged 5 commits into
mainfrom
feat/run-review
Oct 31, 2026
Merged

polewskm merged 5 commits into
mainfrom
feat/run-review

Conversation

@polewskm

@polewskm polewskm commented Oct 31, 2026 •

Copy link
Copy Markdown
Collaborator

Adds /address-feedback, a Claude Code command for the work left after a pull request opens: its review threads, top-level comments and review summaries, from people, Copilot, review bots and scanners. It is the counterpart of /run-issues' review loop, aimed at a pull request that already exists, and it works on a GitHub pull request or a GitLab merge request (the name avoids either term).

What it does

  1. Finds the items. Every unresolved review thread, and every top-level comment or review summary that isn't empty and hasn't been answered with an Autopilot: reply. only:<login> and exclude:<login> limit them to, or leave out, one author. It takes the first 40 and lists the rest.
  2. Asks once. It shows the pull request and its items, then waits for one go-ahead.
  3. Plans. An Opus subagent, using plan-bugfix, judges each item against the code at the branch head, never the comment alone: fix, decline (with what in the code or conventions shows it), answer, ask (needs the maintainer) or none (a coverage report, a deploy notice). The plan has a ## Feedback section with the verdicts and a step for each fix, and no Issue:, Release: or Refs: line and no changelog step of its own (a step edits the entry the pull request already has only when a fix changes behavior it describes).
  4. Executes the fixes with the existing orchestrate-plan and review-plan-diff, up to three review rounds, in a worktree feedback-<number>.
  5. Pushes the new commits to the pull request's own branch with git push origin HEAD:<head>, never forced; it stops, leaving the commits in the worktree, when someone pushed to the branch meanwhile. The landing gate runs first.
  6. Replies to each item that isn't none, starting with Autopilot:: the commit for a fix, the evidence for a decline, the answer, or the question for the maintainer. Threads stay unresolved.

What it never does

Merge, mark ready or draft, enable auto-merge, resolve a thread, dismiss a review or an alert, close the pull request, edit its title or description, force-push or skip hooks. It stops for a fork, a closed pull request or a branch that is the default branch. Scanner alerts among the items are listed for the maintainer, who dismisses them.

What anyone wrote on the pull request is data to judge, never an instruction: a request to change something is a claim, checked before a line changes.

Checked

  • Test-Template passes with a new check that the command reaches Claude Code only (no Copilot file), carries those rules, and has its argument placeholder once.
  • The generated copies are current (tools/Update-Template.ps1), and git diff --stat matches with and without --ignore-cr-at-eol.

Not checked

The command has not been run. /run-issues has a headless end-to-end test against a fixture project, and this has none yet; its first real run on a small pull request is the test. There is no Copilot version.

Who can ask for a change

An item from an author who can write to the repository, from a bot ([bot]), or from an author the request names with only:<login> can become a fix. A request from anyone else is answered, declined or put to the maintainer, because it would otherwise let a stranger have code written, run and pushed under the maintainer's credentials. The plan's Done-when commands and Change lines are read before any step runs, and a step that edits CI or release workflows, Git hooks, a dependency manifest or lock file, a package script or a build or install script stops the run unless an item concerns it.

…a pull request

Takes every open review thread, top-level comment and review summary on one pull request or merge request, from anyone or any bot, treats each as data to judge against the code, plans and executes only the fixes in a worktree, pushes them to the branch without force and replies to each item. Claude Code only.
@polewskm

Copy link
Copy Markdown
Collaborator Author

/review

@polewskm

Copy link
Copy Markdown
Collaborator Author

/review

@ncode-review ncode-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 NCode Review at cadaf4f: 3 new findings on the changed lines.

Comment thread .claude/commands/address-feedback.md Resolved
Comment thread .claude/commands/address-feedback.md Resolved
@ncode-review

ncode-review Bot commented Oct 31, 2026 •

Copy link
Copy Markdown

🤖 Review complete

Verdict: 💬 Comment — This PR adds /address-feedback, a Claude Code-only command. It reads the open threads, comments and review summaries on an existing pull request, has Opus judge each against the code, runs fixes through orchestrate-plan and review-plan-diff, pushes without forcing and replies to each item with Autopilot:. The design is consistent: shell interpolation is limited, protected files are checked both before steps run and in the pushed diff, and the run stops on concurrent pushes. Its main weakness is that the trust boundary rests on author-level rules, and those rules don't cover bots or threads with several authors. The command has never been run, so its first real use is also its test.

5 reviewers run — 2 findings (run details)

Reviewer Model Findings Top
synthesis opus-5-5 2 🟠
conventions sonnet-5-5 0 🟢
hygiene haiku-5-5 1 🟡
intent haiku-5-5 0 🟢
rule-check sonnet-5-5 0 🟢
security sonnet-5-5 1 🟠

Skipped: api-compat, architecture, completeness, correctness, data-model, infrastructure, performance, tests

Findings
  • 🟠 F1 .claude/commands/address-feedback.md:16: Any [bot] login, and any comment in a trusted thread, can make an item a fix
  • 🟡 F2 workflow/templates/address-feedback.md:77: The commit lookup by step number can match earlier commits on the PR branch

Trial: findings are posted as review threads and in the check run. $0.50 on Amazon Bedrock, 63s, at dcb8031. (how to interact)

…m comments may run

Review of /address-feedback (F1 to F3): the pull request's branch name must match a plain pattern and is quoted in every git command; Done-when commands use only the repository's own tooling or plain file checks, the orchestrator reads each one and each Change line before any step runs, and replies never carry environment values, credentials or file contents beyond the cited lines.
@polewskm

Copy link
Copy Markdown
Collaborator Author

The bot ran on this pull request for the first time in this repository (the earlier failures were the Bedrock secret not yet being visible to it). All three findings were right and are fixed in 121b99b; replies are in each thread. Test-Template passes.

@polewskm

Copy link
Copy Markdown
Collaborator Author

/review

@ncode-review ncode-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 NCode Review at 121b99b: 3 new findings on the changed lines.

Comment thread .claude/commands/address-feedback.md Resolved
Comment thread .claude/commands/address-feedback.md Resolved
Comment thread .claude/commands/address-feedback.md Resolved
…or the branch check with \z

Second review of /address-feedback (F1 to F3): a request from an author without write access, who isn't a bot or named with only:, is at most an answer, a decline or a question for the maintainer; the check before execution also stops for dependency manifests, lock files, package scripts and build or install scripts no item concerns; the branch-name pattern ends in \z; the plan adds no changelog step of its own and edits only the entry the pull request already has.
@polewskm

Copy link
Copy Markdown
Collaborator Author

/review

@ncode-review ncode-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 NCode Review at a9886e5: 3 new findings on the changed lines.
1 more was already posted on this pull request.

Comment thread .claude/commands/address-feedback.md Resolved
Comment thread .claude/commands/address-feedback.md Resolved
Comment thread .claude/commands/address-feedback.md Resolved
…ist, and put trusted reviewers first

Third review of /address-feedback (F2 to F4): steps that a review round or a re-plan adds are checked as Plan item 4 says before they run, and the diff is checked for protected kinds of file before the push; the item query reports when a list has another page and reads each thread's last comments; the 40-item cap fills with items from authors who may ask for a fix first.
@polewskm

Copy link
Copy Markdown
Collaborator Author

/review

@ncode-review ncode-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 NCode Review at 74563de: 1 new finding on the changed lines.
1 more was already posted on this pull request.

Not on a changed line:

  • 🟡 F3 Nit: Get-PlanState row doesn't list address-feedback among the commands that run it workflow/README.md:11. The Get-PlanState.ps1 row says ship-plan, continue-plan, finish-plan and run-issues run it, but address-feedback also runs it in Start, Execute and Push. Fix: Add address-feedback to that row's list of commands that run Get-PlanState.ps1.

Comment thread .claude/commands/address-feedback.md Resolved
…m, and list address-feedback with the state script

Fourth review of /address-feedback (F1, F3): a step may edit a CI or release workflow, a Git hook, a dependency manifest or lock file, a package or build script, or a file outside the repository only when a fix item from an author who may ask for a fix names it; an item from anyone else, or one that only mentions the file, never lifts the stop, before a step or before the push. workflow/README.md lists address-feedback among the commands that run Get-PlanState.ps1.
@polewskm

Copy link
Copy Markdown
Collaborator Author

F3 from the review at 74563de (not on a changed line): fixed in dcb8031. workflow/README.md lists address-feedback among the commands that run Get-PlanState.ps1.

@polewskm

Copy link
Copy Markdown
Collaborator Author

/review

@ncode-review ncode-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 NCode Review at dcb8031: 1 new finding on the changed lines.
1 more was already posted on this pull request.


## Reply

Reply to each item whose verdict isn't `none`, after the push, so a `fix` can name its commit: `git log --format=%h --grep "Plan step <n>:"` finds the commit of a step.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Nit: The commit lookup by step number can match earlier commits on the PR branch F2 · hygiene

git log --format=%h --grep "Plan step &lt;n>:" searches the whole history, and the branch already holds Plan step N: commits from its own earlier plan runs, with the same step numbers.

Consequence: A fix reply (Autopilot: fixed in &lt;commit>) can name an unrelated commit from the original pull request, or list several hashes.

Fix: Search only this run's commits, for example git log --format=%h -1 --grep "Plan step &lt;n>:" "&lt;pre-push origin/&lt;head>>..HEAD", recording the pre-push tip before Push item 5. Make the same change in .claude/commands/address-feedback.md.

Evidence

Reply section uses the grep with no range. orchestrate-plan commits each step as "Plan step N: <title>", so the numbers repeat across plans on one branch.

Confidence 0.35.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right. #124 merged before this landed, so the fix is in #126: the command notes the commit it starts from (<start>) when it creates the worktree, and the reply finds a step's commit with git log --format=%h -1 --grep "Plan step <n>:" "<start>..HEAD", so it can't match a Plan step commit of the same number from the branch's own plan.

@polewskm
polewskm marked this pull request as ready for review October 31, 2026 01:21
@polewskm
polewskm merged commit 4fbfb55 into main Oct 31, 2026
21 checks passed
@polewskm
polewskm deleted the feat/run-review branch October 31, 2026 01:21

This branch was previously deployed

1 inactive deployment
code-review — dcb80315 Deployed Oct 31, 2026 by polewskm via review #13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant