/code-review:watchfrom code-review
Reviews the current branch's merge request, posts findings, then monitors via background task until all blockers and suggestions are resolved or refuted. Implements a handshake protocol to avoid reviewing work-in-progress.
Ships in code-review. 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.
Run a full code review of the current branch's merge request, post it, hand the work back to the author, and then watch it with a glab-watch background task until every blocking finding and every suggestion has been addressed in code or refuted with a reply.
The handshake invariant. The ticket carries the ball, as teamwork:review-handshake defines it; Phase 0.4 loads that skill.
That is what paces this command. After posting a round of findings, hand the work back per teamwork:review-handshake; the next round runs only when the handshake reads ready-for-review again. This keeps the review out of work-in-progress instead of commenting on every half-finished push.
review → post → hand back (teamwork:review-handshake) → [wait]
→ the author hands over again
→ sync the local branch onto the author's new head
→ revisit every open thread, reply, resolve what is settled
→ review the delta, post new findings
→ anything still open? hand back, wait again
→ nothing open? leave it handed over and stop
This command is the reviewer side of an MR. It is the mirror image of /sdlc:mr-babysit, which is the author side. The distinction matters and is enforced below: this command never edits, commits, pushes, or rebases locally.
$ARGUMENTS
For the whole lifetime of this command, including every follow-up round:
Edit, no Write into the repo, no git commit, no git push, no local git rebase, no git checkout of a different branch, no stash. If a finding has an obvious fix, describe it in the comment. Do not apply it.teamwork:review-handshake.Exactly two kinds of write to git are authorized (the MR draft flag and the ticket status are metadata, not code — see the autonomy grant below):
glab mr rebase — Phase 1, once, never repeated.git reset --hard of the local sync procedure — after that rebase, and again at the start of every follow-up round. It fast-forwards the checkout onto the author's current head so re-reviews read fresh code. It never runs over a dirty tree or over local-only commits.Nothing else writes to git. Note what the sync is not: it moves the branch pointer to match the remote. It never creates a commit, never pushes, and never changes a line the author did not write.
These are pre-authorized for the duration of this command, and you do not stop mid-pass to ask permission for any of them: posting review comments, replying in threads, publishing them as a review with a reviewed or requested-changes verdict, resolving your own threads, un-resolving your own threads, moving the ticket between WORK_STATE and REVIEW_STATE, commenting on the ticket, the single Phase 1 server-side rebase, the guarded local sync, starting and stopping the watcher, and arming or deleting the watchdog cron job. This override is scoped to those operations and ends when the watch ends.
The hand-back moves are pre-authorized as teamwork:review-handshake defines them, its no-tracker mode included.
Stop and hand back only for the halt conditions under Termination.
The top-level session is the orchestrator. It never sleeps, never polls, and never uses the Monitor tool. This command has nothing to wait for: it waits on a human, and a human hands the work back hours later. The waiting is the watcher's job, and the watcher tells you when something moved.
The watcher is a glab-watch mr background task, started once in Phase 6 from this session. It reports every change on the MR as a <glab-watcher> message: a push, a draft flip, new or changed threads, the pipeline finishing, the MR merging. Those messages are what re-invoke you. It reads GitLab only, so the ticket and the handshake reading are yours (Phase 6). You never poll the MR yourself after Phase 6; a round still reads threads and code as 7.4 and 7.5 say, but what starts a round is a watcher message or a watchdog firing, then the ledger. It is read-only and posts nothing.
Five things re-invoke you, and nothing else: a watcher message, the watcher's background task ending, the watchdog cron every 30 minutes, the review agents returning during a round, and the user. Between them you are idle.
The one-shot state read in 0.2 and 7.1 goes through a subagent on sonnet whose prompt opens with First, run glab-mr-status --help to learn its output before running any other command. It runs glab-mr-status once, reports the scorecard and the fields 0.2 names, and ends its turn. Read its result back before acting on it; a subagent that timed out read nothing.
The review round is the one wide fan-out. /code-review:full runs its review agents in parallel, past the usual ceiling of three subagents at a time. That is deliberate here; leave it as it is.
Every round runs fresh review agents. This is the documented exception to preferring a resumed subagent over a new one: an agent that already argued a finding in round 1 would defend it in round 2 instead of reading the new code, and a verdict has to come from a cold read.
Invoke the glab:glab skill and the glab:glab-discussion skill before making any GitLab calls. glab and glab-cli-extras are required: glab-cli-extras provides glab-mr-status, glab-watch, glab-discussion and glab-pipeline. When a command is missing, tell the user which, give the install command uv tool install glab-cli-extras, and ask before installing.
This command also uses skills from other plugins: glab:glab-watch for the watcher (Phase 6), teamwork:mr-state-judge for judging what the watcher and glab-mr-status report, and teamwork:workflow-identify and teamwork:review-handshake for the tracker, its state names and the handshake (0.4). The glab and teamwork plugins are declared dependencies. If the teamwork skills are unavailable, say so in one line and resolve the workflow states by listing the tracker's actual state names rather than guessing them.
The MR is the one for the branch currently checked out. Spawn the one-shot state-read subagent from Subagents and waiting to read it with glab-mr-status, and record: iid, state, draft, web_url, source_branch, target_branch, sha, head_pipeline.status, blocking_discussions_resolved.
Stop and report if there is no MR for this branch, or if state is merged or closed. This command has nothing to watch in those cases.
If the MR is already draft at invocation, warn and proceed. A draft MR means the author has not handed the work over, so the review reads code they may still be changing. Say so in one line, then run the initial review anyway — the user asked for it explicitly. The gate in 7.2 enforces the invariant for every later round; the draft flag stays the author's unless the push gate is in play.
Review what is on the remote, not what is in the local working tree. The local checkout may be stale, dirty, or ahead of what the author actually pushed, and a server-side rebase in Phase 1 changes the MR head without touching the local branch.
git fetch origin "$TARGET_BRANCH" "$SOURCE_BRANCH"
Then define, for this command and every phase it delegates to:
REVIEW_BASE = origin/<target_branch>REVIEW_HEAD = origin/<source_branch>Fetching the source branch is safe here because this command never pushes — the --force-with-lease hazard that makes a source-branch fetch dangerous in /sdlc:mr-babysit does not apply to a read-only reviewer.
The watch is paced by the handshake, not by pushes, so resolve the ticket now and fail fast if you cannot.
Invoke the teamwork:workflow-identify skill and carry its output block for the whole watch, every round included; the watchdog reads the ticket with it. It names the tracker, the ticket ID pattern, and the WORK_STATE / REVIEW_STATE names this command moves the ticket between, and it asks the user once when a role has several plausible names. Then load the installed skill that covers the resolved tracker — that skill holds the command syntax, and this command names no tracker CLI of its own.
Invoke teamwork:review-handshake as well: it holds the two flags this watch is paced by, the rules for whose threads each side resolves, the comment signature, and the ledger paths.
Take the ticket as teamwork:workflow-identify says, with the ticket pattern from the block. Record the ticket ID and both state names in the ledger.
If the block says tracker: none, or no ticket is identifiable, say so: teamwork:review-handshake defines the no-tracker mode, which this command calls the push gate — a round starts on the MR not draft with a new head SHA. Everything else in this command is unchanged.
Check whether the MR is behind its target branch:
git rev-list --count "$REVIEW_HEAD".."$REVIEW_BASE"
If the count is 0, the MR is up to date — skip to Phase 2.
If the count is > 0, first capture the remote tip. The rebase is about to move it, and the local sync afterwards needs to know where it was:
git rev-parse "$REVIEW_HEAD" # PRE_REMOTE
Then trigger a server-side rebase, once:
glab mr rebase "$IID"
glab mr rebase calls GitLab's PUT /projects/:id/merge_requests/:iid/rebase — the same thing the Rebase button in the MR UI does. GitLab performs the rebase on its own runner and force-pushes the source branch itself.
Do not pass --skip-ci. The review reads the pipeline status, so the rebased head needs a real pipeline.
Rules for this step:
Exactly one attempt, in the initial run only. Never retry it, and never repeat it in a follow-up round. If the branch falls behind again later, that is the author's to handle.
Never fall back to a local rebase. Whatever the failure, do not rebase locally, do not resolve conflicts, do not push. Record it as a finding for the author and carry on with the review against the un-rebased head. The documented failure modes are all the author's to resolve:
merge_error: "Rebase failed. Please rebase locally". There is no partial or interactive rebase through this endpoint.403 Forbidden — you lack push access to the source branch.Say so in the review if a rebase landed. A server-side rebase rewrites the commits: it strips GPG/SSH signatures, and with "Prevent approval by users who add commits" enabled it resets existing approvals. Note both in the report when the rebase succeeds — the author needs to know why their approvals vanished.
The API call is asynchronous. Do not sleep or poll in a tight loop waiting for it. Trigger it, then continue straight into Phase 2's context loading (MR description, threads, ticket) — that work takes long enough for the rebase to land. Before computing the diff range, check the outcome once:
glab api "projects/:fullpath/merge_requests/$IID?include_rebase_in_progress=true" | jq '{rebase_in_progress, merge_error, sha}'
rebase_in_progress: false and merge_error: null → the rebase landed. Do not trust the sha from this response — GitLab returns a stale sha for a moment after the flag flips. Derive the head from git instead: re-run git fetch origin "$SOURCE_BRANCH", take git rev-parse "$REVIEW_HEAD", and record that as the reviewed SHA. Then sync the local branch — see below.merge_error is set → the rebase failed. Record the exact message verbatim as a Blocking finding titled "MR is behind <target> and the server-side rebase failed", quoting the error and stating that the author needs to rebase it. Review the un-rebased head.rebase_in_progress: true → check once more after the ticket lookup. If it is still in progress then, review the current head and note in the report that the review ran against the pre-rebase state.The server-side rebase rewrote the branch, so the local checkout is now on commits that no longer exist upstream. Run the local sync procedure with PREV_REMOTE = PRE_REMOTE before continuing.
Used twice: after the Phase 1 rebase, and at the start of every follow-up round (7.3). Both callers rewrite the local branch onto the current remote head.
It takes one input, PREV_REMOTE — the remote head as it stood before it moved:
PRE_REMOTE before triggering the rebase.Last reviewed SHA from the ledger.git pull is never correct here. Both callers follow a history rewrite — a server-side rebase, or the author's own force-push. A pull either refuses or builds a merge commit that pollutes the branch. A git fetch alone is not enough either: it moves origin/<source_branch> and leaves the local branch untouched. The branch must be reset.
git fetch origin "$SOURCE_BRANCH"
LOCAL=$(git rev-parse HEAD)
[ "$LOCAL" = "$(git rev-parse "$REVIEW_HEAD")" ] && echo "already in sync — nothing to do"
git status --porcelain # guard 1 — must be empty
git branch --show-current # guard 2 — must equal $SOURCE_BRANCH
git rev-list --count "$PREV_REMOTE".."$LOCAL" # guard 3 — must be 0
The guards, in order of what they protect:
Guard 3 compares against
PREV_REMOTE, not againstREVIEW_HEAD. A rewrite gives every carried-over commit a new SHA, soREVIEW_HEAD..HEADcounts the whole branch as local-only and the guard would refuse every single time. Measuring against where the remote was asks the real question: did this checkout hold anything the remote did not?
All guards pass → move the local branch onto the remote head:
git reset --hard "$REVIEW_HEAD"
Any guard fails → do not touch the local branch. Report it prominently: name the failing guard, say the checkout is behind the MR, and for guard 3 list what would have been discarded (git log --oneline "$REVIEW_HEAD".."$LOCAL"). Do not try to rescue the divergence — stash, cherry-pick, and merge are all the user's call, not yours. Carry on with the review regardless, because it reads REVIEW_HEAD, not the working tree.
Recovery is always available after a successful reset: git reflog holds the previous tip, so git reset --hard <old-sha> rewinds it.
Read ${CLAUDE_PLUGIN_ROOT}/skills/full/SKILL.md and execute it, with these substitutions:
REVIEW_BASE and REVIEW_HEAD are already defined by Phase 0.3 above; full.md reads the same two names, so its 1.2 definition is skipped.$ARGUMENTS through as its focus-area argument.Add any Phase 1 rebase failure to the report's Blocking section.
A head pipeline that is not green is itself a Blocking finding. Read head_pipeline.status on REVIEW_HEAD. The accepted-green set is success alone, as teamwork:mr-state-judge states — canceled ran nothing to completion, manual is an unfinished blocking gate, and skipped means no pipeline ran for this head. Any other value gets a Blocking finding titled "head pipeline is not green", naming the status, the SHA, and the pipeline URL. Do not diagnose the failure and do not propose the fix — that is the author's side.
running and pending are not a verdict, and a head in flight is not reviewable. Read the pipeline status before the review agents start. If it is still running, do not wait for it: treat the gate as closed for this round, record the pipeline and the head as Deferred in the ledger, note the pipeline in flight in the one-line report, and let the watcher's pipeline_finished event start the round — a review of a head that then goes red is a review the author has to redo. On the initial run, skip ahead: write the ledger (Phase 5) with Last reviewed SHA empty and start the watcher (Phase 6); its pipeline_finished event opens the gate on the same handshake and runs the round then.
Read ${CLAUDE_PLUGIN_ROOT}/skills/post/SKILL.md and execute it against the report you just produced. Two additions:
Anchor inline comments against the SHAs of REVIEW_HEAD, not the local branch.
Every body post.md writes ends with <!-- code-review:post -->. Replace that line, inline and summary alike, with your own signature, so later passes can recognize your own threads by an exact last-line match:
<!-- code-review:watch -->
Once the review is published, hand the work back per teamwork:review-handshake.
Write a ledger next to the review report, at ./.claude/review-report/<topic>.watch.md. Every round re-reads and rewrites this file, so the watch survives context compaction and does not depend on remembering what it posted.
# Watch ledger: <branch-name> (MR !<iid>)
- MR: <web_url>
- Target: <target_branch>
- Ticket: <TICKET-ID> (<url>) — gate: ticket-status | push-gate
- Work state: <WORK_STATE> · Review state: <REVIEW_STATE>
- Last reviewed SHA: <sha>
- Last handshake reading: <ready-for-review | back-to-work | half-set> at <UTC timestamp>
- Rounds completed: <n>
- Last movement: <UTC timestamp>
- Last round: <UTC timestamp>
- Last author comment: <UTC timestamp>
- Deferred: <pipeline id on sha | none>
- Watcher: <background task id> · `glab-watch mr <web_url> --idle-after=4h`
- Watchdog cron id: <id>
## Findings
| # | Severity | Title | File:line | Thread id | Status | Evidence |
|---|---|---|---|---|---|---|
| 1 | Blocking | ... | src/a.py:42 | <discussion-id> | open | — |
| 2 | Suggestion | ... | (summary) | <discussion-id> | open | — |
Last movement is the timestamp of the last thing that actually moved: an author push, a draft toggle either way, a new comment from anyone, or a finding changing status. The first three come from the watcher's events, the last from your own rounds. The idle cap under Termination reads it.
Thread ids come from the glab-discussion read --dump that follows each publish; a draft has no discussion id until it is published.
Status is one of open, addressed, refuted, superseded. Only Blocking and Suggestion rows gate termination. Record Nitpick and Positive rows for completeness, but they never keep the watch alive.
Record each migration safety thread as a row with Migration safety in the Severity column and the verdict in the Title. These rows never gate on their own — a Do not run as written verdict gates through its matching Blocking row.
Load the glab:glab-watch skill: it says how to start a watcher, read its startup header, react to each event, and stop it. This phase adds only what the review watch needs.
Start the watcher by calling the Bash tool, not by describing it, with run_in_background: true, from this session and never from a subagent:
glab-watch mr <web_url> --idle-after=4h
Never pass --events-stream. Record the background task id in the ledger; if you cannot name it, nothing is watching. Read the startup header in the task output before anything else. A stream fallback: line means no event will reach this session: stop the task, tell the user the reason that line gives, and end the watch as under Termination.
The events arrive as <glab-watcher> messages. Classify each per the glab:glab-watch and teamwork:mr-state-judge skills, reading only the thread files in its artifacts. On top of that:
teamwork:review-handshake on draft_changed and reviewers_changed, on every watchdog firing, which reads the ticket state, on any event while the last reading is half-set, and on every thread_created or thread_updated that is not your own while the last reading is back-to-work, reading the ticket again each time: a hand-over flips the draft flag, when it is not ready already, and moves the ticket one after the other, and a note signed <!-- sdlc:mr-babysit --> usually comes with it. The note alone never starts a round. Evaluate it once when Phase 6 starts too, so the ledger has a reading to gate on. Under the push gate the reading is the draft flag and the head SHA. Record the reading and its UTC time as Last handshake reading; a reading that did not change is not news.reviewers_changed when the publish added the user as a reviewer, approvals_changed when it revoked the user's approval, and thread_resolved or thread_unresolved for the threads the round resolved or re-opened. Recognize a comment as yours by its last line, <!-- code-review:watch --> or <!-- code-review:post -->, and the rest by the round you just ran. None of them updates Last movement.watch_ended with reason merged or closed goes to Termination, and reason idle is the idle cap there. On any other reason, restart the watcher as glab:glab-watch says and record the new task id; a repeat that skill says not to restart is a halt under Termination.Then arm the watchdog with CronCreate, recurring, every 30 minutes on an off-minute (cron: "7,37 * * * *"), with a one-sentence plain-text prompt naming the MR !iid, the ticket, and the ledger path — never a slash command, which would re-enter this command on every firing. Record its id in the ledger. The watcher cannot read the ticket, so the cron is the clock for it. Each firing reads the ticket state once with the tracker skill, evaluates the handshake as above, and writes one line to the user, even when nothing changed — the gate it is waiting on, the count of findings still open, and how long the MR has been idle: "!123 still with the author, 2 findings open, idle 1h40m". Under the push gate it only writes the line. A Last movement more than 4 hours old goes to Termination as the idle cap. A watch that says nothing for an hour is a dead watch. The watchdog never reads the MR itself; a ready-for-review reading it finds starts a round as in Phase 7.
Do not warn the user that the cron job is session-only or that it expires after 7 days. They know, and it is not a problem.
Then report the initial pass to the user and end the turn. Do not sleep, poll, or wait for the author.
A round starts when your handshake reading flips to ready-for-review — or, when Last reviewed SHA is still empty because the initial run found the pipeline in flight, when pipeline_finished reports a settled status while the last handshake reading is ready-for-review; that round is the initial review, Phases 2 to 5, not 7.3 to 7.7. A round deferred because its pipeline was in flight, recorded as Deferred in the ledger, starts on that pipeline's pipeline_finished while the reading is still ready-for-review, as 7.1 to 7.7. Every other event is information: a pushed, a draft_changed, or a thread event that is not your own updates the ledger's Last movement, and a comment by the author also Last author comment; then write one line to the user if it changes what they would do, and end the turn. A push while the ticket is still in WORK_STATE is not a round. A new note is not a round; you read it in the next round. state_changed to merged or closed goes to Termination.
Do not trust what you believed last round. Re-read the ledger, then take state, draft, sha and the pipeline status from a one-shot state read, as in 0.2, and fetch the refs:
git fetch origin "$TARGET_BRANCH" "$SOURCE_BRANCH"
Pin the round to a SHA. Set REVIEW_HEAD to the head SHA that read names, never to origin/<source_branch>: a push can land while the review agents run, and a ref would move under them so that some read the old tree and some the new. A pushed event during a round means "re-review next round", never a ref update. REVIEW_BASE stays origin/<target_branch>.
The gate is your ready-for-review reading; a half-set reading is a no-op, per teamwork:review-handshake.
Watch for a stale review state. If the gate opens but the head SHA still equals Last reviewed SHA and no thread_created or thread_updated from anyone but you arrived since your last round, the author changed nothing; Last author comment older than Last round says no comment came. Do not re-review the same code and do not re-post. Reply once in the last summary's thread naming the findings still open, as a plain published reply (glab-discussion write --no-draft --reply-to <id>) since there is no review to publish, then hand the work back as in Phase 4 and end the turn.
Push-gate fallback. When Phase 0.4 found no ticket, or the Phase 4 ticket move failed, the round starts when the MR is not draft and the head SHA, the to of the last pushed event, differs from Last reviewed SHA. Otherwise it is a no-op.
The gate has opened, so the author has handed the work back. Before reading a single line of code, bring the local worktree onto the branch head you are about to review. A follow-up round that reads a stale checkout reviews code the author already replaced, and every finding it produces is wrong.
Run the local sync procedure with PREV_REMOTE = Last reviewed SHA from the ledger; with Last reviewed SHA empty there is no previous round, so use the SHA recorded in 0.3. The author may have force-pushed after their own rebase, so treat history as rewritten and never use git pull.
If the sync is refused by a guard, say so loudly in the pass report and continue the round anyway — the review itself reads REVIEW_HEAD, so it stays correct. What breaks on a refused sync is any tooling that reads the working tree (a build, a test run, an editor), so the user needs to know the checkout is behind.
Every round revisits every still-open finding from every previous round, and every one of them gets a reply. This is not optional and it is not limited to the findings the author happened to mention. A finding you posted in round 1 and never returned to is a finding the author cannot close.
Read all threads with glab-discussion read --dump, and sort any pending drafts as post.md Phase 3 says before you write. Then, for each ledger row still open, verify it against the code at the current REVIEW_HEAD and reach a verdict. A finding leaves open only on evidence, never on the author's assertion alone:
open and your reply gives the specific counter-argument.Then act on the verdict, in the thread, in this pass. Every reply is a draft, glab-discussion write --draft --reply-to <id> --body - < <file>, and a reply that resolves adds --resolve, so the thread resolves when the round is published in 7.6:
| Verdict | Reply | Resolve (--resolve) |
|---|---|---|
addressed | Confirm what you verified, citing the SHA and the file:line that now satisfies it | Yes |
refuted | State that you accept the author's reasoning, and why | Yes |
superseded | State that the code moved and the finding no longer applies | Yes |
still open | State precisely what is still missing — the line, the case, the counter-argument. Never a bare "still open" | No |
Resolve only your own threads, and only on a verdict of addressed, refuted, or superseded.
Un-resolve your own thread when it was resolved over a problem that is still there. A verdict of still open on a thread that shows as resolved means somebody closed it without the code satisfying it. Re-open it and reply naming the exact line at REVIEW_HEAD that still shows the problem:
glab-discussion resolve <discussion_id> --unresolve
resolve --unresolve has no draft form, so run it after the round's publish in 7.6; a thread re-opened earlier would sit open without the reply that explains why. A resolved thread without your verdict behind it was closed by a person: un-resolve on evidence only, and address that person.
Never resolve without a reply. A silently resolved thread destroys the record of why the finding went away.
One reply per thread per round. Do not re-state an unchanged verdict every round — a thread that was still open last round and is unchanged this round gets one fresh reply only if the author changed something in it or in the code it points at. Otherwise leave it and let the round's summary carry the status.
Reply bodies state findings and verification results, and promise nothing — see teamwork:review-handshake. End every body with a blank line and <!-- code-review:watch -->.
Record the evidence for each transition in the ledger's Evidence column: a SHA and file:line for addressed, the note id for refuted.
Compare the MR's current sha with Last reviewed SHA in the ledger. If they match, the author changed no code this round — skip to 7.6, which still publishes the replies.
git diff <last_reviewed_sha>..<new_sha> is the wrong tool here. If the author rebased, that diff mixes their edits together with every commit master gained in the meantime, and the author's actual work drowns in unrelated churn. The two questions are separate, so ask them separately.
First, what the author actually changed. Establish both fork points, then compare the two patch series with git range-diff:
OLD_BASE=$(git merge-base "$LAST_REVIEWED_SHA" "$REVIEW_BASE")
NEW_BASE=$(git merge-base "$REVIEW_HEAD" "$REVIEW_BASE")
git range-diff "$OLD_BASE".."$LAST_REVIEWED_SHA" "$NEW_BASE".."$REVIEW_HEAD"
range-diff compares the patches, not the trees, so a rebase onto a moved master shows as unchanged commits rather than as a wall of new code. Read its markers:
| Marker | Meaning | Attention |
|---|---|---|
= | Commit carried over, patch identical | None — the rebase moved it, the author did not touch it |
! | Commit reworked — the nested interdiff shows exactly what changed inside it | This is the author's edit. Review it |
> | New commit added since last round | Review it in full |
< | Commit dropped or squashed away | Check that dropping it was intended, and that no finding anchored to it is now orphaned |
This works whether or not a rebase happened. With no rebase, OLD_BASE equals NEW_BASE and the output reduces to the added and reworked commits.
Second, what master brought in. A rebase can invalidate the branch without the author touching a line — a changed signature upstream, a renamed column, a new constraint. Read it as its own question:
git log --oneline "$OLD_BASE".."$NEW_BASE"
git diff --stat "$OLD_BASE".."$NEW_BASE"
Skip this when OLD_BASE equals NEW_BASE. Otherwise skim it for anything that interacts with the files the MR touches, and diff in full only where they overlap. You are not reviewing master — you are checking whether the branch still holds on top of it.
Scope the re-review proportionally, using the agent-selection judgment from full.md Phase 3.0. A three-line lint fix does not need eight agents. A new module does. Validate any new findings against the actual code exactly as full.md Phase 4.1 requires, and drop what you cannot confirm.
Watch for fixes that introduce new problems — a hurried fix for a blocking finding is a common source of fresh bugs, and the ! interdiffs are where they show up.
Then write the update as drafts, following post.md:
open is carried by its existing thread (7.4), not by a new one.! interdiff or a > commit touching it) gets a fresh assessment from review-release, because the old one describes a statement that no longer exists. Write it as a new draft thread, reply in the old thread with a draft that resolves it (--resolve) and names the file and line of the new assessment, since a draft has no link yet, and mark its ledger row superseded. A migration the round did not touch keeps its thread untouched.addressed / refuted / open).### Coverage section for this round, in the shape post.md Phase 7 uses: the agents run, the agents skipped with a one-line reason, and the count of findings dropped in validation. A round that re-reviewed only part of the delta says which part.open rows.Each round is one review. Publish its drafts, the 7.4 replies and the 7.5 findings, with the round's summary as the body:
glab-discussion drafts publish --body - --verdict <requested-changes | reviewed> < <summary file>
The round's summary is always the publish body, a new top-level note, never a --reply-to into an earlier round's summary thread. The verdict is requested-changes while any Blocking finding stays open and reviewed once they are all settled, never approve. Always pass --verdict: every round after the first follows an earlier verdict, and a publish without one refuses. post.md Phase 7 says how to report a failed publish; if it fails, do not hand back, tell the user, and leave the drafts in place for the next attempt.
After the publish succeeds, un-resolve the threads 7.4 found closed over a problem that is still there, then run glab-discussion read --dump once and record the new thread ids in the ledger.
The publish moves the MR in ways the watcher reports, as Phase 6 lists. They are this run's own action: they do not update Last movement, and they are not reviewer movement.
If any gating finding is still open — carried over or newly found — hand the work back as in Phase 4, after the publish succeeded. The next round waits for the author to hand over again.
If nothing is left open and no pushed to a SHA other than REVIEW_HEAD arrived during the round, leave the handshake as it is and go to Termination. Otherwise the new head gets its own round.
Rewrite the ledger with the new statuses, the new Last reviewed SHA, the new handshake reading, the round count, and the new Last movement and Last round timestamps. Then end the turn. The next watcher message or watchdog firing resumes you.
Report what changed: what the author pushed, which findings moved status, what you posted and resolved.
Stop the watch — stop the watcher's background task, delete the watchdog cron job with CronDelete, write the final ledger, and report — when every Blocking and Suggestion row in the ledger is addressed, refuted, or superseded, each transition has recorded evidence, and each corresponding thread has a reply and is resolved.
Open Nitpick rows never keep the watch alive.
On a clean termination: leave the handshake at ready-for-review, and publish one final review whose body states that every gating finding is settled, with the outcome per finding: glab-discussion drafts publish --body - --verdict reviewed < <summary file>. The handshake stays on ready-for-review because the review is what finished, not the merge — the MR is now a human's to approve and merge.
Also stop early, stopping the watcher, deleting the watchdog cron job and reporting, on any of:
glab or the tracker starts failing authentication;open and a claimed fix three times without converging. Report it as a stalemate that needs a human conversation, and name it explicitly rather than watching it forever;Last movement is more than 4 hours old. Nobody is working the MR. The watcher ends itself with watch_ended reason idle after 4 hours without an event; your Last movement also counts a finding changing status, so you may end the watch before the watcher does.Leave nothing running. A stop is complete only when the watcher's task has ended, by its watch_ended or by the task stop tool, and the watchdog cron is deleted.
On termination, present a final summary to the user: the MR state, the round count, the per-finding outcome table from the ledger, every finding that was refuted and why you accepted the refutation, and anything you deliberately left to the author (the Phase 1 rebase failure belongs here if it happened). When the idle cap ended it, say so plainly — it stopped on an idle timeout, not because the review settled — name what is still open, and name the way back in: running /code-review:watch again picks the MR back up.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub fprochazka/claude-code-plugins --plugin code-review3 skills in this plugin
/fullcode-review:fullFull multi-agent code review of current branch — context, exploration, parallel review, validation/postcode-review:postPublish the existing code-review report to the current GitLab MR as one review — inline diff comments written as drafts, published together with a summary and a verdictOther plugins' skills for the same job