pr-followup · diff
git:20260922.52ece44 to git:20260929.b3d2e7c
34 added, 21 removed. Audit A to A.
---
name: pr-followup
- description: Auto-chain review, test, and code-review immediately after a PR is opened, with no human trigger needed for any of the three. Invoke right after a PR is created, or manually against an existing PR.
+ description: Auto-chain code-review and review immediately after a PR is opened, with no human trigger needed for either. Invoke right after a PR is created, or manually against an existing PR.
disable-model-invocation: true
---
# PR Followup Agent
- Auto-chains `/review`, `/test`, and `code-review:code-review` immediately
- after a PR is opened — none of the three need a human trigger.
+ Auto-chains `code-review:code-review` and then `/review` immediately after a PR
+ is opened, and records each result where the `review-evidence` CI check reads
+ it (`scripts/check_review_evidence.py`).
+ `code-review:code-review` runs first so its fixes land before the `/review`
+ rounds; a fix after an APPROVED verdict would otherwise need `/review --confirm`.
+
Note: `code-review:code-review` is a Claude Code skill and may not be
invocable at all — either because your project sets
`disable-model-invocation`, which removes it from the agent-invocable skill
- list, or because this coding agent has no such skill mechanism. Either way,
- step 4 below catches the invocation error and continues to reporting rather
- than halting the whole command; you'll still need to run an equivalent
- review yourself before merging.
+ list, because the plugin is not installed at a scope this session loads, or
+ because this coding agent has no such skill mechanism. Either way, step 3
+ below catches the invocation error and continues to reporting rather than
+ halting the whole command; you'll still need to run an equivalent review
+ yourself before merging.
## Trigger
Invoked right after `gh pr create` succeeds, or manually against an existing
PR: `/pr-followup 71` or `/pr-followup fix/some-branch`.
## Process
- 1. Run `/review <PR>`.
- 2. If the verdict is **CHANGES REQUESTED**, stop — do not run `/test` or
- `code-review:code-review` until the issues are addressed and the branch is
- re-reviewed.
- 3. If the verdict is **APPROVED**, run `/test <PR>`.
- 4. Run `code-review:code-review` against the PR. If the invocation errors
- (e.g. `Unknown skill`, whether from `disable-model-invocation` or from
- running on an agent without this skill), don't stall — print this line
- instead and continue to step 5:
- `⚠️ code-review:code-review couldn't be invoked here (disable-model-invocation, or unsupported on this agent) — run an equivalent review yourself before merging.`
- 5. Report all three verdicts (or the fallback warning in place of the third).
+ 1. Run `python3 scripts/check_pr_lane.py --git origin/<base> --head-branch <head> --base-branch <base>`.
+ For the `docs`, `release` and `sync` lanes, report the lane and stop: they
+ need neither step below. For the `pipeline` lane (or a PR that also touches
+ pipeline paths), make sure the PR body has a non-empty
+ `Motivating incident: <what went wrong, with a link or date>` line (or
+ `none (<reason>)`); add it if missing, since `review-evidence` fails without it.
+ 2. Run `code-review:code-review` against the PR once. Fix any issue it posts,
+ commit and push. Then add or replace one line in the PR body with the head
+ SHA it reviewed: `code-review: <comment URL> at <sha>`, or
+ `code-review: no issues at <sha>` when it posted nothing.
+ 3. If the invocation errors (e.g. `Unknown skill`), don't stall. Print
+ `⚠️ code-review:code-review couldn't be invoked here (disable-model-invocation, plugin scope, or unsupported on this agent) — run an equivalent review yourself before merging.`
+ and continue.
+ 4. Run `/review <PR>`. It posts the verdict and updates the PR body's `Review:`
+ line. Stop at CHANGES REQUESTED until the issues are fixed; `/review` allows
+ at most two full rounds.
+ 5. Report both results and the lane.
+ `/test` is not in this chain: it runs between `/feature` and `/gates`.
+
## Done when
- `/review` and `/test` have reported, and `code-review:code-review` has either
- reported or printed the fallback warning. Do not merge — merging is the
- user's call once every configured check is clean.
+ Both results are reported and recorded in the PR body (or the fallback warning
+ printed). Do not merge — per AGENTS.md/CLAUDE.md's Merge rule, the required
+ checks decide mergeability and the user merges.