/flowyeah:reviewfrom flowyeah
Use when reviewing a pull request or merge request. Use --own to self-audit your own PR without submitting anything, and finalize to tear down review state.
Ships in flowyeah. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Reviews a pull request or merge request. Runs review agents, validates requirements, checks for critical patterns, and submits a formal review with inline comments. With --own, collects findings for self-audit without submitting. With finalize, tears down review state.
flowyeah:review [--own] [--full] [<number>]
flowyeah:review finalize [<number>]
Every phase of the review pipeline reads the primary checkout and writes nothing to it — not its working tree, not its index, not its HEAD. Gather context with read-only commands; primary-checkout.md at the plugin root has the command table and what the rule excludes.
When deeper inspection is genuinely justified — running code at PR HEAD, applying a candidate patch to verify behavior, full-tree LSP/recursive-grep navigation against materialized files — create a dedicated review worktree at .flowyeah/review-worktrees/{N}/, perform the work there, and remove it before the session terminates. The worktree path is recorded in Worktree: inside review-state-{N}.md so finalize and crash recovery can clean it up unconditionally. The review worktree is separate from build worktrees at .flowyeah/worktrees/ — never reuse a build worktree, and finalize for review must never touch build worktrees.
If a step appears to require a primary-checkout mutation, STOP and ask the user — the skill is wrong, not your judgment.
If the first positional argument is finalize, the second positional (if present) is the PR number to finalize; otherwise, auto-detect from current branch. For non-finalize invocations, treat the positional as a PR number. The --own flag can appear in any position. finalize ignores --own — it operates on whatever active review session exists regardless of mode. --full can also appear in any position and combine with --own: this round reviews the full diff whatever code_review.incremental says (see step 2.9). finalize ignores it.
digraph review {
rankdir=TB;
node [shape=box];
validate [label="0. Validate Config\n(keys, adapters, auth)"];
identify [label="1. Identify PR/MR"];
issue [label="1b. Detect Issue"];
context [label="2. Gather Context"];
previous [label="2.8 Classify Previous\nReview Findings" style=dashed];
requirements [label="2b. Requirements Validation" shape=diamond];
agents [label="3. Run Review Agents"];
checks [label="3b. Critical Checks"];
impact [label="3c. Impact Analysis"];
score [label="4. Score & Consolidate"];
approve [label="5. Interactive Approval"];
own_check [label="--own?" shape=diamond];
type [label="6. Choose Review Type"];
submit [label="7. Submit Formal Review"];
deliver [label="5b. Deliver Findings"];
menu [label="5c. Next Action Menu"];
validate -> identify -> issue -> context;
context -> previous -> requirements;
requirements -> agents [label="issue found"];
requirements -> agents [label="no issue\nskip"];
agents -> checks -> impact -> score -> approve -> own_check;
own_check -> type [label="normal"];
type -> submit;
own_check -> deliver [label="--own"];
deliver -> menu;
}
Uses flowyeah.yml from the project root (see config-schema.md at the plugin root for full schema and defaults). If missing, load setup.md from the plugin root and follow its interactive setup instructions before proceeding.
The review skill uses: code_review.agents, code_review.optional_agents, code_review.instructions, code_review.impact_analysis, code_review.incremental, git_host, language, and adapter configs for issue detection.
If code_review.agents is empty or missing: STOP and complain.
The review adapter is determined from git_host in flowyeah.yml:
git_host | Review adapter |
|---|---|
gitlab | adapters/gitlab/review.md |
github | adapters/github/review.md |
Load the review adapter once at the start. If the git host adapter has no review.md, STOP — that adapter doesn't support code reviews. All platform-specific operations (fetch PR, post review, detect issue) go through the adapter.
Thread operations live in the respond adapter. Fetching other reviewers' open threads (step 2 item 9) and replying to existing threads (step 5's complement replies) are documented in adapters/<host>/respond.md — load it alongside the review adapter when those steps run. If the host has no respond.md, skip those steps rather than improvising API calls.
Create .flowyeah/review-state-{N}.md for compaction resilience:
# Current State
Type: review
Session: <value of $CLAUDE_CODE_SESSION_ID>
Mode: <own or absent>
Status: Reviewing
PR/MR: <number>
URL: <web URL from step 1>
Round: <n>
Head: <head SHA pinned in step 2>
Scope: <full | incremental since <short sha> | nothing new>
Branch: <source_branch>
Platform: <adapter>
Findings: <count> total, <approved> approved
Phase: <current_phase>
Worktree: <relative path under .flowyeah/review-worktrees/{N}/ or "none">
## Rounds
- Round <n> (head <short sha>): <counts written by respond --own step 10>
## Rounds exists only in --own mode. respond --own step 10 appends one line per round, and each new --own round carries the section into the state file it writes (see "Conflict: Re-invoking /review"), so it holds the PR's whole series until finalize deletes the file.
Session names the conversation driving this review: read it with echo "$CLAUDE_CODE_SESSION_ID". Write it when creating the file, and rewrite it whenever this skill is invoked on an existing review-state-{N}.md, so a review resumed in a new conversation moves with it. The hooks act only for the conversation whose session id matches: it gets the full state, approved findings, and rejection count; every other conversation in the checkout gets nothing.
Mode is absent for normal reviews. The hook does not interpret this field — it dumps the state file as raw text. The skill's crash recovery logic reads Mode to decide which path to follow on resume.
Round is the number of this review of the PR/MR by the authenticated user, counting from 1, set in step 2 (item 8).
Head is the PR/MR head this round reviews, pinned in step 2 (item 1). The review body's marker carries it, so the next round starts from what this one actually saw. Scope is what step 2.9 chose.
Worktree defaults to none. When the skill creates a review worktree (see "Invariant: Primary Checkout Is Untouched"), update this field to the path immediately and clear it back to none once the worktree is removed. The hook injects this field as-is on every prompt of the owning conversation so context recovery can verify worktree state.
Valid Phase values (map to steps, used for crash recovery):
| Phase | Step | Recovery action |
|---|---|---|
Validating Config | 0 | Re-run from start |
Identifying PR | 1-1b | Re-run from start |
Gathering Context | 2-2b | Re-run context gathering |
Running Agents | 3-3c | Re-run agents (results lost) |
Scoring | 4 | Re-run scoring (agent results lost) |
Interactive Approval | 5 | Read review-approved-{N}.md, re-present unapproved findings |
Choosing Review Type | 6 | Re-ask review type question |
Submitting Review | 7 | GitHub submits atomically — check whether the review exists, then retry or clean up. GitLab submission is N discussion POSTs + a note + the reviewer-state call + optional approve and can half-succeed: list the MR's discussions, skip findings already posted, and resume from the first missing one (see the adapter's partial-failure guidance) — never blind-retry the whole batch |
Findings Delivered | 5b-5c | Re-present the next action menu. If review-approved-{N}.md is missing, re-run from step 5 (Interactive Approval). |
Fixing | after 5c | Do not resume the review pipeline. Findings are informational context. |
Delegated | after 5c | Do not resume the review pipeline. Findings are informational context for the next session. |
Responded | after 5c | Do not resume the review pipeline. A prior respond --own cycle closed this round. A fresh review --own invocation overwrites state silently; review finalize is still valid. |
After the user makes approval decisions (step 5), persist results to .flowyeah/review-approved-{N}.md:
# Approved Findings
## Finding 1
- File: app/models/payment.rb:42
- Label: issue (blocking)
- Confidence: 75
- Scope: in-diff
- Body: |
**issue (blocking):** Race condition na criação de pagamento
...
## Finding 2
...
This file ensures that if compaction or a crash interrupts after approval, approved findings are recoverable.
Review sessions use review-state-{N}.md (not state.md) so they never interfere with build sessions in worktrees. Both can coexist — the injection hook handles them separately.
Update review-state-{N}.md after each phase transition. The hook injection ensures state survives compaction.
No mission.md, progress.md, or full findings.md — reviews are short-lived. Only review-approved-{N}.md is needed for the approval checkpoint.
If a review session is interrupted (compaction, crash, user abort):
review-state-{N}.md into the next prompt of the conversation recorded in Session:review-approved-{N}.md to recover previously approved findings and skip re-presenting them/review finalize at any time to abandon the review and clean up state filesWorktree reconciliation on resume. If Worktree: in the recovered state is not none, run git worktree list --porcelain and check the recorded path:
git worktree prune, then recreate or set Worktree: nonerm -rf the directory and set Worktree: noneWorktree: noneNever assume a recovered worktree is in the same state it was left in. Treat it as scratch.
Mode: ownWhen Mode is absent, the logic above applies unchanged (resume from recorded phase, proceed through steps 6-7).
When resuming a session with Mode: own:
Findings Delivered — recover normally (re-run from that phase), but skip steps 6-7 after completion.Findings Delivered — re-present the next action menu (step 5c).Fixing, Delegated, or Responded — do nothing. The review pipeline is not active. State files serve as context only. For Responded, a fresh /flowyeah:review --own {N} invocation will start a new round and silently overwrite state.Worktree guard: if the current working directory is inside a flowyeah build worktree (git rev-parse --show-toplevel contains .flowyeah/worktrees/) or inside another review's dedicated worktree (.flowyeah/review-worktrees/), STOP. Reviews must be invoked from the primary checkout — review session files (.flowyeah/review-state-{N}.md) belong to the primary checkout, not to any worktree. Once invoked, the pipeline may itself create a worktree under .flowyeah/review-worktrees/{N}/ for justified inspection (see "Invariant: Primary Checkout Is Untouched").
Before starting the review, validate the loaded flowyeah.yml:
config-schema.md from the plugin root.git_host must point to an adapter with review.md. code_review.agents must be non-empty.code_review.instructions is present in the config, validate the path is relative and the file exists (per validation rules in config-schema.md). Read the file contents once and carry them through the pipeline.If validation fails, STOP with actionable error messages.
If <number> is provided, use it. Otherwise, detect from current branch via the review adapter.
Display PR/MR summary: title, author, branch, additions/deletions, changed files. Record the web URL the adapter returns (url on GitHub, web_url on GitLab) in the state file's URL: field.
Extract issue slug from the branch name. The patterns depend on the project's issue tracking:
From configured adapters with source.md:
linear is configured → try Linear patterns (e.g., proj-eng-302, TEAM-123)gitlab is configured → try GitLab patterns (e.g., leading digits, feat/42)github is configured → try GitHub patterns (e.g., feat/42)Fetch issue details using the appropriate source adapter (load adapters/<source>/connection.md + adapters/<source>/source.md).
If no issue found and the PR/MR description has a ## Criteria section: use that section as the reference for step 2b, without asking. Build writes it on PRs/MRs whose work did not start from an issue.
If neither exists: treat the PR/MR as having no issue. Skip requirements validation (step 2b) and say so in one line. Do not ask: a PR/MR that names no issue in its title, description or branch has none.
Collect in parallel. All commands here are read-only against the primary checkout — no checkout, no restore, no switch. See "Invariant: Primary Checkout Is Untouched" if a step seems to require materializing files at a different ref.
gh pr diff <N> for GitHub, GitLab diff endpoint). Do NOT reconstruct via git diff <base>...<head> after a checkout. Pin the head this diff belongs to in the state file's Head: (headRefOid on GitHub, diff_refs.head_sha on GitLab) and use that SHA wherever this skill says <head_sha>. On GitHub headRefOid has been seen lagging a rebase by minutes: after git fetch origin <source_branch>, compare it with git rev-parse origin/<source_branch>, and when they differ, fetch the PR view and its diff again before going on, so Head: and the diff describe the same commit. Skip this check for a PR from a fork, whose branch is not on origin.git show <head_sha>:<file> (read-only) — do not check out the PR branch into the primary checkout.~/.claude/CLAUDE.md), project root, .claude/CLAUDE.md, .claude/standards/*.mdgit log --oneline -10 <file>git blame <base_sha> -- <file> against the base SHA reported by the adapter. Do NOT check out the base branch.Fetch Own Discussions. Fetch all discussions/review comments authored by the authenticated user on this MR/PR. Parse Conventional Comments format to extract structured findings. If none found (first review), skip previous-review logic entirely. The same list gives the round number: sort the discussions by created_at and start a new prior round wherever two consecutive ones are more than 30 minutes apart, because a submission posts all its comments within the same minute or so (on GitHub, thread replies are excluded already, since the list keeps only threads the user opened). Round: is the number of prior rounds plus 1. A round that posted no inline comment leaves no trace and is not counted. In --own mode nothing reaches the platform, so Round: is the previous file's Round: plus 1 when a Phase: Responded state file is being overwritten (see "Conflict: Re-invoking /review"), and 1 otherwiseSkip if no previous review discussions were found (first review).
For each parsed previous finding, classify using the hybrid approach:
Resolved on platform?
├── yes → ADDRESSED
└── no
└── Accepted (your 👍 on the author's last word in the thread)?
├── yes → ADDRESSED
└── no
└── Finding has file:line AND line falls within a changed hunk in the diff?
├── no → UNRESOLVED
└── yes
└── Semantic check: does the new code at that location address the concern?
├── uncertain/no → UNRESOLVED
└── yes → ADDRESSED
"Accepted" — the accepted field of the adapter's Fetch Own Discussions. A reviewer who finds the author's answer satisfactory but does not want to close the author's thread for them reacts to the answer with 👍, and closing it stays with the author. An adapter without the field (GitLab) never reports a finding as accepted.
"Line changed" — compare the finding's file:line against the MR/PR diff (already fetched in step 2.1). If the line falls within a changed hunk, it counts as changed.
Semantic check — read the previous finding's body and the new code at that location. Ask: "did the author's change target this specific concern?" When uncertain, classify as unresolved (safer to re-present than to silently drop).
Calibration examples:
| Finding | New code | Classification | Why |
|---|---|---|---|
Missing null check on user.email | Added return unless user.email guard | ADDRESSED | Directly targets the flagged concern |
| Race condition in payment creation | Added DB-level unique constraint + RecordNotUnique rescue | ADDRESSED | Solves the concurrency problem, even if differently than suggested |
| Missing error handling in API call | Line changed to rename a variable | UNRESOLVED | Change is unrelated to the concern |
N+1 query in orders#index | Added # TODO: fix N+1 comment | UNRESOLVED | Acknowledging isn't addressing |
| Performance concern on large datasets | Method rewritten with different logic in the area | UNCERTAIN → UNRESOLVED | Code changed but unclear if the concern was targeted |
Findings without file:line (review body findings) — can't be diff-checked. Classify as unresolved unless resolved on the platform.
Output (platform discussions): two lists — addressed_findings[] and unresolved_findings[].
--own RejectionsSkip if --own flag was not provided OR if .flowyeah/own-rejections-{N}.md does not exist.
In --own mode, the platform-fetch path above produces nothing (rejections were never posted as platform discussions). Instead, read each ## Rejection block from .flowyeah/own-rejections-{N}.md (schema documented in respond/SKILL.md's "Cross-Round Persistence: own-rejections-{N}.md" section) and apply the same diff-overlap rule used for platform findings:
File: line still present in changed hunks?
├── line not in any hunk → STILL_REJECTED (carry forward as agent context)
│ The line is either untouched this round or was reverted; the diff alone cannot distinguish
│ those cases, so the conservative default keeps the rejection in effect.
│ Cleared by /flowyeah:review finalize {N}.
└── line in a changed hunk
└── Semantic check: does the new code at that location address the concern?
├── uncertain/no → STILL_REJECTED
└── yes (the author's recent edits target the rejected concern) → STALE_REJECTION (drop silently — semantic check confirmed the concern was addressed; surfacing it again would be noise)
For entries with File: (general) (no precise line), the diff-overlap rule cannot apply. Treat them as STILL_REJECTED unconditionally — there is no signal that says they have been addressed. The author can clear all persisted rejections (general and specific alike) by running /flowyeah:review finalize {N}, which removes the entire ledger.
Output (persisted rejections): one list — previously_rejected_findings[]. Each entry preserves File:, Label:, Confidence:, Subject:, and Reasoning:. Confidence: is preserved but deliberately not passed to the agents in step 3 — it exists so the ledger can be read back as calibration data (which score bands get rejected), and telling an agent that a prior finding scored low would bias it against raising a legitimate concern rather than inform it.
This list is separate from unresolved_findings[]. It does not get carried forward as a user-visible finding (see step 4, consolidation rule 7) — it is used only as agent context (see step 3, Run Review Agents).
--own RoundBefore another --own round, measure convergence from the ## Rounds section of the state file being overwritten: findings per round (falling?), where they land (its files:, the deliverable or an accessory?), whether the file that attracts them is growing (git diff --stat between the rounds' heads), and how many were born from the previous round's fixes. When an accessory concentrates the findings, report the numbers to the user and stop: cutting scope is the user's decision, not the review's.
The target is what steps 3, 3b, and 3c review. Decide it in this order, record the result in Scope:, and stop at the first rule that applies:
--full was passed → Scope: full.
code_review.incremental is false → Scope: full.
No previous head → Scope: full. The previous head comes from the review adapter's Fetch Reviewed Head; in --own mode it is the Head: of the Phase: Responded state file being overwritten, read before overwriting it like Round:. Count the first review by this rule, not by Round:: item 8 does not count rounds without inline comments, so Round: can read 1 on a PR/MR that already has a marker.
Otherwise run the delta script, from the primary checkout (it only fetches objects and reads):
<plugin root>/bin/review-delta <previous head> <Head> <target branch> > .flowyeah/review-target-{N}.diff
<plugin root> is two directories above this skill's base directory, shown when the skill loads. <target branch> is baseRefName on GitHub, target_branch on GitLab.
Scope: incremental since <short previous head>; the target is .flowyeah/review-target-{N}.diff.Scope: nothing new: the author only rebased or pushed nothing. Skip steps 3, 3b, and 3c; step 4 consolidates step 2b's findings and the carried-forward unresolved_findings[], and the round still posts its summary, so the marker moves to the new head.Scope: full: the previous head or the target branch is not available locally or on the remote. Say so in the review summary.Scope: full, and quote the script's stderr in the review summary.With Scope: full the target is the step 2 diff.
Skip if step 1b found neither an issue nor a ## Criteria section.
Read requirements-check.md at the plugin root and apply its three dimensions to the diff, with the reference from step 1b. Generate a finding for each unmet requirement. Step 2b always uses the full diff, never the target from step 2.9: it asks whether the whole PR/MR delivers what was asked, and a requirement delivered in an earlier round would read as missing from a delta.
Launch agents from code_review.agents in parallel using the Task tool:
Scope: full the target is the PR diff. With Scope: incremental since …, pass .flowyeah/review-target-{N}.diff, the names of the PR's other changed files (names only, no diff), and this instruction: "The target holds what the author changed since the previous review round. Raise findings about the target and about what it affects. A finding the target causes anchors on the target line that triggers it, and its body names the affected code as file:line. Do not hunt for problems in the rest of the PR; a problem you meet there by chance is still a finding, anchored on its own line. A section starting with # undone since lists changes the PR had in the previous round and no longer has: look for code that still relies on them."If code_review.instructions is configured, include the file contents as additional context passed to each agent alongside the target and the changed file names. Instructions may reference external resources (a docs URL, a linked issue); agents resolve those using available tools (WebFetch, source adapters) to verify compliance rather than treating the reference as passive text.
If unresolved_findings[] from step 2.8 is non-empty, pass them to each agent as additional context: "The following findings were raised in a previous review and remain unresolved. Do not re-flag these — they will be carried forward separately." This prevents agents from producing duplicates.
If previously_rejected_findings[] from step 2.8a is non-empty (only possible in --own mode), pass them to each agent as a second additional context block — kept separate from unresolved_findings[] because the directives differ (the first block is an unconditional "do not re-flag"; the second is conditional on whether the agent has new information): "The author has previously reviewed and rejected the following concerns with explicit reasoning. Do not re-flag any of them unless you have substantively new information that the author's reasoning did not account for. If you genuinely have new information, raise it as a new finding — do not duplicate the rejected one." Include each entry's File:, Subject:, and full Reasoning: block. The "substantively new information" clause matters: a rejection is not permanent infallibility, but the bar is high. The operational test: the diff itself must have changed the factual basis of the rejection — e.g., a migration the reasoning relied on was reverted, a config the reasoning assumed was added, an upstream caller the reasoning ignored is now in scope. A different way of framing the same concern is NOT new information; only a change in the underlying facts is. When the test is met, the agent flags it as a fresh finding (not as a re-raised rejection).
Conditional agents from code_review.optional_agents — launch based on what changed (e.g., security analyst if auth code was touched). Use judgment.
Note: This is the same agent configuration used by flowyeah:build in step 7b (CI + Code Review Loop). Both skills share the code_review.agents and code_review.optional_agents lists from flowyeah.yml. The difference: build runs agents as a quality gate before merge; review produces a formal review artifact with inline comments.
Run directly (not delegated to agents), on the target from step 2.9. Outside the target they already ran in an earlier round, and a finding the user excluded then would come back every round, since an excluded finding is never posted for step 2.8 to see:
Database Concurrency: For any migration adding an index, verify if it should be unique. Application-level validations are NOT sufficient for concurrency — DB constraints are required. If a unique index exists, check for RecordNotUnique rescue.
CLAUDE.md Compliance: Check global and project CLAUDE.md rules against the diff (e.g., naming conventions, error handling).
Naming Consistency: Flag semantic inconsistencies — names that contradict each other, method names that don't match behavior.
Project Review Guidelines: If code_review.instructions is configured, evaluate the diff against each guideline in the instructions file. Act on guidelines that reference external resources — resolve them via available tools (WebFetch, source adapters); if a resource cannot be fetched, record the guideline as unverified rather than implying compliance. Default scoring: severity issue, confidence 75. Adjust based on how clearly the diff violates a guideline.
Scoring for critical checks: DB concurrency findings default to severity issue (blocking) with confidence 90. CLAUDE.md compliance defaults to severity issue with confidence 75. Naming consistency defaults to suggestion (non-blocking) with confidence 50. Adjust based on evidence. (API backward compatibility moved to step 3c Impact Analysis as a contract-break special case.)
Run directly (like 3b), on the target from step 2.9. Runs on every review — not gated on an issue being found — except a Scope: nothing new round, where there is no target. A signature the target changes is still traced to callers anywhere in the repository.
Executor. If code_review.impact_analysis is configured, delegate this entire step to the named agent, passing it the target from step 2.9, the identified changed public surface (below), and the trigger-line anchoring contract. That agent may create the review worktree at .flowyeah/review-worktrees/{N}/ for LSP/codegraph-grade tracing (see "Invariant: Primary Checkout Is Untouched"). Because the delegated agent runs in its own context and cannot be relied on to record or tear down that worktree, set Worktree: in review-state-{N}.md to .flowyeah/review-worktrees/{N}/ before invoking the agent — so finalize and crash recovery can reclaim it even if the agent exits without cleaning up. After the agent returns, if no worktree remains, clear Worktree: back to none (the recovery reconciliation rules handle a recorded-but-absent path). Otherwise, run the built-in logic below. The step always runs — it cannot be disabled; only its executor is swappable.
From the diff, identify the changed public surface: modified or removed method signatures, return shapes, serializers, event/webhook payloads, job arguments, and changed defaults. For each element, trace outward across three dimensions using read-only commands only (no checkout, no worktree in the built-in path):
Caller ripple: For a changed signature, return shape, or default, run git grep -n '<symbol>' <head_sha> against the PR HEAD SHA reported by the adapter to find callers. Flag callers whose behavior shifts under the change. Default severity issue, confidence 75.
Contract/interface breaks: For a changed API response, event/webhook payload, serializer, job argument, or shared schema, locate consumers (serializers, API responses, webhooks, jobs, other services) and flag those that break. Default severity issue (blocking), confidence 85.
issue (blocking), confidence 90 (concrete, enumerable consumer set).Feature interaction / coupling: Flag changes to shared services or state that adjacent features rely on, where the change creates unintended cross-feature effects. Default severity suggestion (non-blocking), confidence 60.
Out of scope: runtime/scale & operational concerns — N+1s introduced app-wide, deploy/migration ordering, rollback safety, feature-flag interactions. These are covered by code_review.optional_agents (e.g. a performance analyst), not by this step.
Anchoring. Every impact finding anchors to the trigger line — the changed line in the diff that causes the ripple (the modified signature, the removed column, the changed default). The comment body names the affected untouched code as a file:line reference in prose and describes the effect. Never place an impact finding in the review body; never anchor to an untouched line. This keeps step 7's "every finding is an inline comment" and step 4's "Touched it, own it" invariants intact.
Adjust all default scores based on evidence, the same as 3b.
Severity (determined by the Conventional Comments label):
| Severity | Label | Description |
|---|---|---|
| Blocker | issue (blocking) | Must fix before merge. Will cause production bugs. |
| Important | issue | Should be fixed. May cause problems. |
| Suggestion | suggestion (non-blocking) | Nice to have. Improves code quality. |
| Nitpick | nitpick (non-blocking) | Minor. Only mention if few other issues. |
| Informational | question, thought, note | Not a fix request — seeks clarification or shares context. |
Confidence scoring (0-100) — how certain you are that the finding is real:
| Score | Meaning |
|---|---|
| 0 | False positive |
| 25 | Might be real, couldn't verify. Stylistic issue not in CLAUDE.md |
| 50 | Verified real issue, minor or nitpick |
| 75 | Highly confident. Verified, impacts functionality, or explicitly in CLAUDE.md |
| 100 | Absolutely certain. Confirmed, will happen frequently |
Consolidate findings:
unresolved_findings[] into the consolidated list. Each gets tagged (previously raised, still unresolved). They keep their original severity — no escalation, no demotionpreviously_rejected_findings[] into the consolidated list. The user already rejected these — re-presenting them would defeat the persistence mechanism. They served their purpose as agent context in step 3. The only thing that surfaces them again is if an agent legitimately raises the same concern with new information, in which case it lands as a regular new finding (not as a rejected-and-re-raised one — the agent has attested to new facts, so the prior rejection no longer applies; annotating the finding as "previously rejected" would prejudice the user against the agent's new framing).False positive rubric — do NOT flag:
frozen_string_literal in migrations)nil, default, or swallowed branch on a path no real input reaches. Confirm input exists that produces the case before flagging; if no record in the system can produce it, it is not a findingGemfile.lock, package.json, lockfile). A behavior that changed across majors is a false positive when claimed against the wrong oneFindings that ask for a decision, not a change, are legitimate and are not covered by the damage rule above — a reviewer may reasonably want a conscious sign-off on a deliberate trade-off. Label them question or thought and say plainly that the sign-off is the ask. Do not dress them as issue or suggestion: that spends the author's attention on a fix request you are not actually making.
"Touched it, own it": If the PR touches a file (even for refactoring), the author is responsible for issues in that code. Only truly untouched lines are excluded.
Praise follows code_review.praise:
false or absent (default): surface no praise finding. Drop any praise an agent returns during consolidation.true: surface at least one sincere praise finding for the user to consider — but never false praise. Look for something genuinely good. The praise is a finding like any other: the user's batch decision in step 5 governs whether it is submitted. An excluded praise is never resurfaced — not as an inline comment, not in the review body.Present all findings at once as a numbered list. Every finding MUST be rendered as a Finding Card — read finding-card.md at the plugin root for the template, its fields, and the previously-raised and praise variants. That file is the single source of truth for the card, here and at step 5b.
Render the card for every finding, every time — even when there is only one finding, even under --own, even when you are tempted to "just summarize."
Link before the cards. Right above the first card go two lines: PR #{N} · round {n}: {title} (MR !{N} on GitLab, {n} from the state file's Round:), then the web URL from the state file's URL: field, so the user can open the diff while judging the findings. Print the URL bare, outside the code fence, where the terminal makes it clickable. This applies on every presentation, including a re-presentation after crash recovery. When step 2.8 classified previous findings, the summary of what happened to them, after the cards, is titled with the previous round's number (Round {n-1}).
Other reviewers' open threads: After the findings list, if any open threads from other reviewers were found (step 2, context item 9) and you have complementary context to add (technical justification, confirmation with evidence, expanded scope), present them separately:
───────────────────────────────────────────────────────
Other reviewers' open threads — complement opportunities
───────────────────────────────────────────────────────
Thread A (@reviewer · file:line):
Their concern: [summary]
Your complement: [what you'd add — e.g., confirming with evidence, expanding scope]
Thread B (@reviewer · file:line):
Their concern: [summary]
Your complement: [what you'd add]
These are not findings — they are reply suggestions. The user can approve, edit, or skip each. Approved complements are posted as replies to the existing threads (via the respond adapter's Reply to Thread operation — see Platform Detection) alongside the formal review submission in step 7.
Render before you ask. The cards are user-facing output, not internal notes. The batch-decision prompt below (typically a question-tool call) may only be issued in a response whose own visible message text already contains every card — before making the call, check your output for the ═══ card headers and for the code fence wrapping them; if either is missing, render the cards first. Updating the state file to Interactive Approval is not presentation, and consolidation summaries ("N findings: X suggestions, Y nitpicks") do not count as cards. A decision prompt without the cards on screen asks the user to approve findings they cannot see.
After presenting the full list, ask the user for a batch decision:
1,3,5). Everything else is skippedIf the user selects specific findings and wants to edit any before submission, ask which numbers to edit and expand them one at a time for modification.
Persist approved findings to review-approved-{N}.md after the batch decision is made.
--own Mode: Steps 5b-5cIf --own flag was NOT provided, skip to step 6.
Persist approved findings to review-approved-{N}.md (already done in step 5). Present them as Finding Cards (finding-card.md) — one card per finding, exactly as in normal mode, with the PR/MR link above them (step 5's "Link before the cards"). Step 5's "Render before you ask" rule applies to the step 5c menu: the cards must be on screen before the menu is offered.
Update review-state-{N}.md: set Phase: Findings Delivered.
Before presenting the menu: if Worktree: in review-state-{N}.md is set and not none, tear the review worktree down now (git worktree remove --force <path>, then rm -rf <path> if the directory survives) and set the field back to none — the review worktree serves the review pipeline only, and both "Fix now" and "Delegate" terminate that pipeline; leaving it behind orphans it across rounds.
Offer three options:
Fixing. State files remain as informational context (the hook injects them each prompt, but they do not trigger the review pipeline). When done, the user runs /review finalize to clean up.Delegated. Open a fresh session in the main checkout and run /flowyeah:respond --own {N} to critique, discuss, and fix. The respond pipeline will read .flowyeah/review-approved-{N}.md and the new Phase: Responded is written when the round completes, enabling a fresh review --own for the next round./review finalize)./review with an active sessionBefore starting a new review, check both directions:
review-state-{N}.md exists for the target PR, that session is the conflict — regardless of which branch you are currently on. (Matching only the current branch would silently overwrite an active session when /review N is run from elsewhere.)review-state-*.md and match Branch: against the current branch, for the auto-detect case.respond-state-{N}.md exists for the target PR, STOP: "A respond session for PR #N is mid-pipeline. Complete it (or remove its state files / run /flowyeah:status clean) before reviewing." Review and respond must not run concurrently on the same PR.For a review-state match:
Phase: Responded → proceed silently — the prior round is closed. Read its Round:, Head: and ## Rounds section first (absent Round: counts as 1; Head: is step 2.9's previous head; ## Rounds is step 2.8b's series), then overwrite the existing state files as if no session existed, and end the new review-state-{N}.md with the ## Rounds section copied unchanged. Do not prompt.Phase: Fixing or Phase: Delegated → present: "An --own review for PR #N is still active. Finalize it first, or continue fixing?"If the user chooses to finalize, run the finalize logic and stop. The user must re-invoke /review for a new session.
After all findings are processed, present the recommendation and ask the user:
Recommendation logic (based on approved findings):
issue (blocking) → recommend Request Changesissue → recommend CommentPresent the recommendation alongside the options. Mark the recommended option:
Skipping this question and picking the event yourself is never sanctioned — the recommendation is advice to the user, and the event type is theirs to choose.
MANDATORY: Always submit as a formal platform review with inline comments, through the review adapter's submit operation. A generic timeline comment is not a review, and neither is gh pr review --comment --body — that posts a body-only review with no inline threads.
Load the review adapter and follow its instructions to:
flowyeah:reviewed-head marker: without it the next round reviews the full diff again.All inline comments use Conventional Comments format:
**<label> [decorations]:** <subject>
[discussion]
Labels: praise, issue, suggestion, todo, question, thought, nitpick, chore, note
Decorations: (blocking), (non-blocking), (if-minor)
Ask for final confirmation before posting.
APPROVE review comment placement: When the event is APPROVE, split findings by type:
This differs from COMMENT and REQUEST CHANGES, where all findings (including praise) are posted as inline comments. The review adapter's event documentation has the details.
After posting (or if the user discards), remove .flowyeah/review-state-{N}.md, .flowyeah/review-approved-{N}.md, and .flowyeah/review-target-{N}.diff (if present) to end the session. If Worktree: is set in the state file, also run git worktree remove --force <path> and rm -rf the directory if anything remains. Do not remove .flowyeah/own-rejections-{N}.md here — that file persists until the user explicitly runs /flowyeah:review finalize {N} (a normal-mode submitted review is unrelated to the --own rejection ledger).
finalize SubcommandA separate entry point that tears down review state. Not a pipeline step.
flowyeah:review finalize [<number>]
With explicit number: target review-state-{N}.md directly. If absent, report "No active review for PR #{N}." and stop.
Without number (auto-detect):
review-state-*.md, extract Branch: from eachreview-state-*.md files exist at all, report "No active review sessions." and stopAfter resolving the target:
Worktree: is set and not none: run git worktree remove --force <path>, then rm -rf <path> if the directory still exists. Report any failure but proceed with the remaining cleanup — the state file deletion must not be blocked by a stuck worktree.review-state-{N}.md, review-approved-{N}.md (if present), review-target-{N}.diff (if present), and own-rejections-{N}.md (if present).respond-state-{N}.md and respond-decisions-{N}.md if present — respond has no finalize of its own, so a respond round that crashed mid-pipeline leaves them behind, and they keep tree-guard blocking the branch after "finalized" was reported..flowyeah/worktrees/ — those belong to build sessions, not to review.No confirmation prompt — the explicit finalize command is sufficient intent.
No platform interaction. No re-running agents. No verification of whether findings were addressed.
finalize works on any review session — both --own and normal. For normal reviews interrupted mid-pipeline (e.g., crashed after step 3), finalize serves as an escape hatch to discard the session without submitting.
finalize does not display the timing summary.
## Code Review
<!-- Only with `Scope: incremental since …`, in the configured `language` -->
Reviewed what changed since `<short previous head>`, the head the previous round reviewed.
<!-- Only with `Scope: nothing new`, in the configured `language` -->
No changes by the author since `<short previous head>`, the head the previous round reviewed, only updates from the target branch: nothing new to review.
### Requirements Validation
<!-- Only if step 1b found a reference; with `## Criteria`, name the PR/MR description instead of an issue -->
**Issue:** [slug](link) — "Issue title"
#### Requirement Coverage
- ✅ Requirement A — implemented in `app/services/...`
- ❌ Requirement B — not found in diff
- ⚠️ Requirement C — partial implementation
### Previous Review Follow-up
<!-- Only if previous review findings were found -->
#### Resolved
- ✅ `file:line` — [subject] ([resolution reason: resolved on platform / answer accepted with 👍 / code changed, addresses concern])
#### Still Unresolved
- ⟳ `file:line` — [subject] (see inline comment)
### Code Review Summary
[consolidated summary of findings]
<!-- flowyeah:reviewed-head <Head> -->
The last line is the marker the next round's Fetch Reviewed Head reads. Fill it with the state file's Head:, the head pinned in step 2, never re-read at submit time: the author may have pushed while the agents ran, and the next round must start from what this one reviewed. Every round writes it, --full and Scope: nothing new included. It is an HTML comment, so neither platform shows it on the page.
After the review is submitted (or discarded), display a summary:
Review complete — N findings (M approved, K skipped)
Blockers: X | Important: X | Suggestions: X
Automated phases: ~Xs | Interactive approval: ~Xs
No per-phase instrumentation needed. Just track two timestamps: start of step 0 and start of step 5 (interactive approval). The difference gives automated time; wall clock from step 5 to end gives interactive time.
Review comments are written in the language configured in language. Default: en.
| Error | Action |
|---|---|
| PR/MR not found | Ask user for number/URL |
| Agent fails | STOP. Report which agent failed and its error, then ask the user: retry it, proceed without it, or abort. Do not present findings until the user decides. |
| Remote communication failure (401, 403, 429, 5xx, timeout) | Retry up to 2 times with a short pause. If still failing, STOP and report the error to the user. Do not attempt alternative approaches or workarounds. For writes that may have landed (GitLab's per-finding discussion POSTs especially), verify what was created and retry only the missing pieces — see the Submitting Review recovery row. |
bin/review-delta exits 3 (previous head or target branch not found locally or on the remote), or any exit other than 0 | Review the full diff (Scope: full) and say in the summary why the delta was unavailable, quoting the script's stderr. |
| Inline comment position not in diff | Find the best anchor: the most relevant changed line in the same file, or the file's first changed line. If the file has no changed lines at all (finding from a cross-cutting concern), anchor on the most relevant file's first changed hunk. Every finding MUST become an inline comment — never move findings to the review body. |
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub rodrigomanhaes/flowyeah --plugin flowyeahOther plugins' skills for the same job
5 skills in this plugin
/buildUse when implementing work from an issue, error report, CI failure, plan file, or the conversation; when resuming a paused or crashed session; or with --intermittent for a flaky test/checkUse when auditing or validating flowyeah.yml, or when a flowyeah setting is not taking effect and the config may be at fault/respondUse when addressing review feedback on a pull request or merge request. Use --own to work through the findings from a prior review --own round./statusUse when checking what flowyeah work is in flight — active sessions, plans, worktrees. Use `clean` to remove stale artifacts interactively.