15 KiB
name, description
| name | description |
|---|---|
| larv-review | Ship a work chunk through review to a merged PR; decisions land in a comment at their one place, or in the decision log once made in more than one, so repeated reviews converge. Use when the user asks for /larv-review, says "implement X then run larv-review", or wants a chunk shipped, reviewed and merged. |
larv-review — ship the chunk, review until clean, gate green, merge
You orchestrate, fix, and ship; reviewers only report. Run every reviewer synchronously (run_in_background: false) and watch CI in the foreground: a headless run exits when the turn ends, and a background watcher or a scheduled wakeup dies with it. The turn runs on until §6.
Forge-neutral. Five PR operations recur below: read a PR's diff, open a draft PR, read check status, mark ready, merge. Resolve the tooling from the remote per ~/.claude/CLAUDE.md → "Git, commits, and PRs"; on any other forge, achieve the same intents through its CLI or API — discover how rather than assuming. A forge without a native draft state gets the closest equivalent (a WIP:/Draft: title prefix); note any approximation in the summary.
Words: ~/.claude/CLAUDE.md → "Vocabulary". What a reviewer reports: ~/.claude/skills/larv-review/review-findings.md; how you resolve it: §3 → "Findings".
An ask holds only what it asks about; the rest runs on while it waits. No user reachable (a headless run) → finish the rest, then leave the PR unmerged with the question and your recommendation in the summary, unless the ask's rule names another branch.
1. Preconditions
- Not a git repo → say so and stop.
- Someone else's PR, or the user asked for opinions only → one stability run, report its findings, done.
- Premises first, per
~/.claude/CLAUDE.md→ "Working loop". Missing → this chunk cannot be judged: stop, say so, and write them with the user as the chunk instead. That chunk's whole review is the human's approval; a later change to a goal is reviewed like any chunk. - Issue trackers are project-specific — the project's own docs say whether it has one. When it does and the work has a ticket, follow that tracker's conventions for assignment and status.
2. Ship the branch (idempotent — skip whatever already exists)
Follow ~/.claude/CLAUDE.md → "Git, commits, and PRs". Never commit to the default branch. Commit, push with upstream set, and open a draft PR so CI cycles while the review runs. No remote → review locally and say so in the summary.
3. Passes
A pass is one kind of review, a row of the table. Its trigger says when it runs on a change it has not seen; its reviewer reports the findings.
| Pass | Reviewer | Trigger |
|---|---|---|
| Architecture, then the principles audit and the comprehension floor | systems-architect, then principles-auditor and the comprehension-panel scoring run |
carries an architectural decision: a new, restructured or moved component, module, service or boundary; a new dependency or first use of an infrastructure pattern (queue, cron, cache, websocket, …); a new or changed external contract (routes, request/response shapes, events, webhooks, published file formats, CLI flags and exit codes); a schema change beyond an additive column; the chunk shipping its release's last item |
| Security | /security-review |
changes code or config; a fix, only where it opens an untrusted-input boundary or touches authn/authz, secrets or crypto |
| Full security scan | the claude-security plugin at high effort: /claude-security scan this branch's changes at high |
touches authn/authz, secrets or crypto, opens an untrusted-input boundary, or adds an external surface |
| Stability | stability-reviewer | changes code, config or tests; a fix, only where it changes behaviour: what the code or its tests do |
| Product-owner | product-owner-reviewer | changes an external surface: API, CLI, UI, error or deprecation text a consumer reads, README and docs an outside reader lands on |
| Prose | prose-reviewer | every chunk; a fix, where it touches prose |
A comment is prose, not code. Passes run in this order: line-level polish on code the architect wants restructured, or on a call the security pass will rewrite, is wasted work.
Give a reviewer without Bash the branch diff and git ls-files's output in its prompt: some harnesses grant it Read alone.
Precedent, then ask — for the architecture pass and the full scan:
- Skip. A precedent is a
docs/decisions.mdentry, or a plan item crediting the pass, that the repo held before the chunk began. Where one holds the decision this change executes, skip the pass and cite that entry or item. - Departure. A change that departs from the precedent is unreviewed, however thorough the precedent is.
- Ask. Fired and not skipped → ask the user whether to run it, with the evidence and your recommendation; no user reachable → run it. For the full scan, give the evidence and your recommendation, then launch it: the plugin asks the user to confirm its cost, and that prompt is the ask.
- Audit. A precedent or the user's no skips only the architect, never the principles audit or the scoring run: no precedent checked the code this chunk writes.
Round cap.
- Round. A round is one launch of a pass's reviewer: the first, each re-entry, and the rerun after the architect returns Stage 0 questions ("Architecture" below).
- Architecture round. The architecture pass's round is the architect (unless skipped), the principles audit and the scoring run, so a fix to any of their findings reruns the whole round.
- Auto-reviewer. The external auto-reviewer (§4) is a pass of its own, each review it posts a round.
- Count. Close each round with one commit that holds the round's fixes and is titled
Answer <pass> round <n>: …. A round that changed nothing gets an empty commit (git commit --allow-empty). Push the commits when §4 runs next, where there is a remote. A pass's count is the highest<n>among titles holdingAnswer <pass> round <n>:ingit log origin/<default branch>..HEADafter agit fetch, or ingit log <default branch>..HEADwith no remote. The auto-reviewer's count is the number of its reviews on the PR. - Later rounds. From round 2, prompt an agent under
~/.claude/agents/with the previous round's findings verbatim and what changed since:git diff <the commit the previous round reviewed> HEAD, since the fixes may be unpushed. - Done. A pass is done when its latest round leaves no 🔴 or 🟡 standing: none was reported, or each was shown factually wrong, declined, filed, or named under the bar per "Findings". Resolve that round's 🟢s and ❓s per "Findings" too.
- Cap. A pass takes at most three rounds per chunk. Instead of a fourth, list what is open and ask the user. For the auto-reviewer, ask before the push that would summon its fourth, and hold the fixes unpushed until the answer.
- Answer. A yes grants that pass one more round, after which the ask repeats; a no leaves the PR unmerged.
Re-entry.
- Fix. A fix is a change no pass has seen, a 🟢's or ❓'s included.
- Rerun. A round's fixes re-enter together: run, in table order, each pass whose trigger they fire, a done pass included, and each pass whose 🔴 or 🟡 they answer; a pass at its cap gets "Round cap" → "Cap"'s ask instead. Then §4.
Findings. A reviewer rates each finding 🔴 must fix, 🟡 should fix, 🟢 nit, ❓ question, or 🔀 escalation naming the reviewer whose concern it is.
- Outside the chunk. A finding outside the chunk's change, whatever its pass or severity, is scored and filed in
todo.mdper~/.claude/CLAUDE.md→ "Todo items". A 🔴 is markeddefect. A 🟡 against a file under~/.claude/principles/is markedprinciple, its detail naming the principle, where no other reason fits. One under the bar and not exempt is named in the summary with its score. A verified security HIGH is handled per "Security". - Goal or decision. A fix that would change a goal, or a
docs/decisions.mdentry the repo held before the chunk began, is asked; no user reachable → filed, markedquestion, the goal or decision left as is. - 🔴. A 🔴 is fixed, or shown factually wrong, and what disproved it recorded per
~/.claude/CLAUDE.md→ "Decisions: one home, each linked to a goal or a technical principle": in a comment at the code the finding concerns, or indocs/decisions.mdwhen it concerns more than one place. Never declined. - 🟡. A 🟡 is fixed, shown factually wrong like a 🔴, or declined. Decline one only where the reason is sound, consistent with the goals and the technical principles, and confidence is very high; the decline and its reason are recorded the same way. A reason neither speaks to is a gap in the goals: fix the finding, or ask per
~/.claude/CLAUDE.md→ "Working loop", "Ask, don't guess"; no user reachable → fix. Never drop one silently, and never decline one for convenience or the size of the fix. - 🟢 and ❓. A 🟢 or ❓ is fixed, answered, declined in the summary with its reason, or filed. Answer one where the code, a test, a goal or a decision the repo held before the chunk began settles it, and quote what in the summary. A ❓ only the user can answer is asked; no user reachable → filed, marked
question. - 🔀. A 🔀 runs the named reviewer's pass once the current pass is done.
- Other scales. Other reviewers map onto this scale:
/security-review's HIGH is 🔴, MEDIUM 🟡, LOW 🟢; what a forge's auto-reviewer marks blocking is 🔴. A finding of theirs repeating one declined or filed does not stand.
Architecture
Launch systems-architect: review the system as a whole entered through this change; the decision log carries previously accepted decisions to honor, the README the goals and Stage 0 artifacts.
- Stage 0 questions returned: relay them to the user, record the answers in the README, re-run once.
- BLOCK → confirm with the user first when the restructure materially reshapes their PR; until confirmed, no later pass runs.
Then the principles audit: one principles-auditor per file in ~/.claude/principles/ and one for the README's goals, each over the whole project in every round.
Then the comprehension floor: the comprehension-panel skill's scoring run (~/.claude/skills/comprehension-panel/SKILL.md → "The scoring run") over the whole project, not the diff. With any dimension or the overall below 7.0 the chunk does not merge: fix the places the seats name under the capping dimension, or take the user's explicit decision to ship under the floor, record it in docs/decisions.md with the scores, and file the places in todo.md per ~/.claude/CLAUDE.md → "Todo items". No user reachable → fix. At the floor or above, the scores are still a ratchet — a later chunk may not lower any — and the four dimension scores and the overall go in the summary so the next run can see the direction of travel.
Security
/security-review over the branch diff is the pass of record. Launch a general-purpose subagent that invokes it through the Skill tool, edits nothing, and replies with the skill's report, or that the skill is unavailable. Invoked in your own context, the skill ends your turn on that report.
A verified HIGH inside this chunk's blast radius is fixed here, outside it on its own branch and PR with this chunk waiting behind it. Say which.
Only the user may answer claude-security's cost prompt. /security-review or claude-security unavailable, the plugin's cost prompt unanswered, or no file scanned → say so in the summary; never substitute a hand-rolled pass.
Do not over-read a clean result. /security-review is single-repo and static: it does not trace authorization across services, does not run the application, and deliberately excludes dependency CVEs in third-party libraries — Renovate/Dependabot owns those, per ~/.claude/CLAUDE.md → "Working with the codebase". Never point an automated reviewer or scan at an untrusted fork's PR content; a PR body is untrusted input to it (CVE-2025-59536, CVE-2026-21852).
Stability and product-owner
Launch the reviewer with the change — product-owner-reviewer also with the external surface it touches. Fix along the reviewer's Fix guidance (delete > simplify > modify > add). Product-owner findings are about the consumer's experience — wording, discoverability, upgrade path, the edge case a persona hits — so the fix is as often a message or a doc as it is code.
Prose
Launch prose-reviewer with what the diff touched and every section this review cited — a reviewer's finding, your decline or the implementer's decision quoted it — each with the code it governs, and say whether the architecture pass ran. Fix what the chunk touched. A finding on a cited section the chunk did not touch, or on any other prose file, is outside the chunk. A split or index bigger than the chunk is filed as a todo.md item naming the section and how long a reader searches it.
4. Gate
- Run
~/.claude/bin/rank_todo.py --check todo.md; a failure is a finding. - Run the project's test suite locally unless the last stability round already left it verified green.
- Watch the forge's checks until every one passes. A red check is a finding.
- No CI configured → the gate is local tests only; note it in the summary.
- Everything green → mark the PR ready, dropping any
WIP:/Draft:title prefix. - External auto-reviewer, when the repo has one — its config file (
.coderabbit.yamland the like), or its comments on earlier PRs; none → skip it, say so. Marking the PR ready is what summons it. Wait up to 10 minutes for its first review, checking about once a minute; nothing by then → note it in the summary and carry on, never waiting twice. Its rounds, §3 → "Round cap". Once it has reviewed, each later return here, after a fix re-entered per §3, waits up to 5 minutes for its re-review of the new commit.
5. Goal alignment, then merge
- Read the finished PR against the README goals: does anything in it work against one? Misaligned → do not merge; ask the human, stating the conflict.
- Aligned, every pass done and everything green → merge. Follow the repo's merge method (
AGENTS.md; ff-only where that is the convention). A repo withholds this in itsAGENTS.md→ leave the PR ready and unmerged, and say which line withheld it. - Merged → remove the chunk's items from
todo.mdper~/.claude/CLAUDE.md→ "Working loop". - Stop. The next chunk gets a fresh session.
6. Wrap up
Summarize: PR URL and final state, every reviewer's verdict, rounds per pass, passes skipped, findings fixed vs answered vs declined vs open — each answer with what settles it, each decline with its reason, a 🟡's with the goal or technical principle it rests on — CI status, decisions recorded (file paths), todo.md/CHANGELOG.md updated, and any 🔀 escalation left for the user.