Repository navigation
feat(bin): review a pull request with a dedicated reviewer crewmate - #29
Merged
Merged
Conversation
Replace the in-session validation pipeline as the default rigor for a direct-PR ship with a reviewer that posts its findings on the pull request, where the captain can read them. bin/fm-brief.sh --review <github-pr-url> writes the reviewer contract and is its single owner: the four disciplines carried over from the pipeline (a finding is one instance of a class, read the primary source and name what you could not verify, separate a defect from a preference, and never decide a finding that would widen what the captain asked for), the numbered finding format, and the requirement that the review be posted and read back. A review is scout-shaped in every mechanical respect, so it is spawned and torn down as a scout and writes the local pointer the scout teardown gate requires. bin/fm-dispatch.sh --review dispatches one in a single call and refuses a brief whose review shape disagrees with the call. The new pr-review skill owns the path end to end - who pushes, when the pull request opens, who reviews, the merge gate, and what happens when checks are red - plus how firstmate rules on findings, posts the captain's words verbatim, and lands fixes one finding per commit. It states explicitly that this is one pass and not a pipeline: no rounds, no counters, no re-review requirement. AGENTS.md states the path in one bullet and points at the skill. The no-mistakes pipeline's code and documentation are untouched; projects that select it are unaffected.
BenjaminLu
commented
Sep 19, 2026
BenjaminLu
left a comment
Owner
Author
There was a problem hiding this comment.
Vendor-behaviour verification for this change, run against this pull request on 2026-09-19.
gh-axi pr review <n> --approve on a pull request opened by the same account is refused by GitHub:
error: "failed to create review: GraphQL: Review Can not approve your own pull request (addPullRequestReview)"
gh-axi pr review <n> --comment is accepted - this comment is that review. So the reviewer agent posts a COMMENT review and carries its verdict in the body text, which is what the generated brief instructs. An approve or request-changes verdict is not available to a single-account fleet and the brief says so rather than letting a reviewer discover it as a failure.
A project clone commonly carries an `upstream` fork parent beside `origin`, and gh-axi may resolve that one. Verified against this clone: `gh-axi pr view 29` returned kunchenguid#29 - a different, already merged pull request by another author - instead of the #29 under review, with no error and entirely plausible output. `gh-axi pr checks 29` reported that other pull request's checks the same way. The mismatch surfaces only on a write, and then as a confusing message about blank shas. A reviewer following a brief built on bare commands would read a stranger's pull request, review it, and post findings on the wrong repository. Every gh-axi command the review brief generates and the pr-review skill prints now carries -R <owner>/<repo>, taken from the reviewed pull request's own URL, which is the only authority on where that pull request is. The head checkout goes through `gh-axi pr checkout` rather than a hand-written fetch from `origin`, for the same reason. docs/verification/pr-review.md records this and the two other vendor facts the contract states: GitHub refuses an approve review on a pull request opened by the same account, so the reviewer posts a comment review carrying its verdict in the body, and that review reads back through `gh-axi pr view --reviews`. Tests cover the new brief kind and its dispatch, including a direct assertion that no gh-axi command in a generated review brief omits its repository. Each new assertion was confirmed to fail against a mutated source before being trusted.
fm-dispatch.sh's own contract is to validate every input before touching anything, but --review was checked only by bin/fm-brief.sh. A brief that already exists is reused without calling it, so on that path nothing stood between a malformed or non-GitHub URL and the backlog note that records it. The check now runs at step 1 through the shared PR parser, where the contract says it belongs, and a test drives the reuse path specifically.
… it names The discipline said to mark a finding `widens scope: yes` while the template field is `Widens scope:`, so the instruction did not name the field the reviewer is filling in. Also split a two-sentence line in the pr-review skill to keep the repo's one-sentence-per-line rule.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this is
A dedicated reviewer agent, and the delivery path it belongs to, replacing the in-session validation pipeline as the default rigor for a
direct-PRship.The pipeline's review happened inside a session, so nobody could see it. This one happens on the pull request.
The path, end to end
A worker implements and pushes, and opens the pull request itself. A reviewer crewmate is dispatched against that pull request and posts its findings on it. Firstmate reads the findings, rules on the ones that are its own, escalates the ones that are the captain's, and posts every ruling on the same pull request - the captain's words verbatim when the ruling is the captain's. Fixes land as commits on the same pull request, one finding per commit. The merge gate is checks green plus every finding ruled; merge authority itself is unchanged.
Red checks are the worker's to fix. The reviewer reports one as a finding so it is visible with everything else, and nothing merges red.
This is one pass, not a pipeline
One dispatch produces one review. There is no round counter, no re-review requirement, and nothing in the path counts or compares attempts. The skill says so in its own section, because the failure mode being designed against is rebuilding the thing this replaces under a new name.
What carried over from the pipeline
Each of these was paid for and is now the reviewer's contract, owned by
bin/fm-brief.sh --review:--helpoutput - and say what you could not verify under Not verified rather than implying you checked.Changes
bin/fm-brief.sh--review <github-pr-url>writes the reviewer contract; single owner of what a review owesbin/fm-dispatch.sh--reviewdispatches one in a single call; refuses a brief whose review shape disagrees.agents/skills/pr-review/SKILL.mdAGENTS.mdA review is scout-shaped in every mechanical respect - scratch worktree, no branch, no commit, no push, no pull request of its own - so it reuses the scout spawn, supervision, and teardown path unchanged rather than adding a fourth task kind through
bin/fm-spawn.sh. It writes the local pointer that the scout teardown gate requires; the posted review stays the authoritative copy.Boundaries honoured
The no-mistakes pipeline's code and documentation are untouched. Projects that select
no-mistakesare unaffected, and that mode still owns its own rigor end to end.Self-contained
Nothing here needs configuration beyond a GitHub login. The reviewer posts through
gh-axi, which bootstrap already requires, and a GitLab merge request URL is refused at scaffold time rather than producing a brief whose deliverable could not be posted.Vendor agnostic, and the one gap
The reviewer is not a Claude thing. It is briefed as plain Markdown and spawned as a scout, so it runs on any harness the fleet already verifies -
claude,codex,opencode,pi,pi-signed,grok,kimi,cursor,omp,muse,gemini,rovo,agy. It usesgh-axi,gitandechoand nothing a single vendor ships. Where it must reach a firstmate contract it reads the file by absolute path ($FM_ROOT/.agents/skills/captain-hold-lifecycle/SKILL.md) rather than invoking a skill, which is the form every agent can follow. The newpr-reviewskill lives in.agents/skills/, the neutral location, and Claude reaches it through the existing.claude/skillssymlink like every other skill here.Two dependencies that are real, stated rather than hidden:
gh-axispeaks GitHub only, so a review targets a GitHub pull request. A GitLab merge request URL is refused at scaffold time with a message naming why, rather than scaffolding a brief whose deliverable could not be posted. A clone whose project lives on GitLab gets a refusal it can act on, not a silent half-feature.~/.claude/skills/diagram-design. That line is not new here - it is the existing packet contract, already identical in the scout brief and inbin/fm-dod-lib.sh's ship definition of done, and this branch copies it rather than forking a fleet-wide contract in one brief kind. A clone without that skill installed gets a reviewer that works normally and, on the decision path only, a worker that escalates the missing skill as a blocker instead of writing a packet without figures. Making that path vendor-neutral is a change to the packet contract's single owner and belongs in its own pull request.