pr-review
Skill2 starsChanged 30 days agoApache-2.0View on GitHub
Reviews someone else's GitHub pull request end to end: writes an unbiased summary from the diff before reading the author's description, reconciles stated and actual intent, runs code-review on a throwaway checkout, stages every comment in a local dashboard for approval, and posts one batched review. Use when the user asks to review, critique, or comment on a PR by number or URL. Flags: --fast, --panel, --verify, --claude, --challenge, --max. Don't use for reviewing local or uncommitted changes (use code-review), for responding to feedback on the user's own PR (use pr-feedback-handler), or for summarizing a PR without reviewing it (use analyze-github-pr).
- Deletes or force-pushes
195 other projects use a version of this.
Adopted by
Most recently taken up by
- static-web-server/static-web-servertheir own version, first seen Nov 9, 2026
- zerx-lab/FluxDowntheir own version, first seen Nov 9, 2026
- civitai/civitaitheir own version, first seen Nov 9, 2026
- harshitsinghbhandari/domain-expansiontheir own version, first seen Nov 8, 2026
- Azure/azure-sdk-toolstheir own version, first seen Nov 8, 2026
- databricks/clitheir own version, first seen Nov 8, 2026
Used with
Projects with it also use oss-pr, pr-automation and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
CES-LtdSkilloss-pr
Use when creating a pull request, after committing changes, or when user invokes /oss-pr. Covers branch management, quality checks, commit, push, and PR creation.
Also in 3 projects that use this
CES-LtdSkillpr-automation
PR Automation Orchestrator: poll open PRs, check CI, run review, fix, and merge eligible PRs. Use when: (1) Invoked by daemon via scripts/pr-automation.sh, (2) User says "/pr-automation".
Also in 3 projects that use this
jtenniswoodSkillexpert-reset
Reimagine this repository from first principles using the current product and user experience as the target. Use when the user says "/expert-reset", asks how the project should be rebuilt if starting again, wants bold architecture or component-structure recommendations, or wants a research-only reset plan unconstrained by current implementation details.
Also in 3 projects that use this
jtenniswoodSkillupdates
Summarize user-facing project updates from the last 7 days, ordered by importance and written as one-sentence "Feature: description" entries. Use when the user says "/updates", asks what changed recently, or wants a concise list of recent features, device support, fixes that users will notice, or other product value.
Also in 3 projects that use this
openchamberSkillclack-cli-patterns
Use when creating or modifying OpenChamber CLI commands, prompts, terminal output, non-TTY behavior, `--quiet`, or `--json` behavior.
Also in 3 projects that use this
openchamberSkilldrag-to-reorder
Use when implementing or modifying OpenChamber sortable or drag-to-reorder behavior, especially `@dnd-kit`, touch/mobile interactions, variable-width items, or wrapping layouts.
Also in 3 projects that use this
- +6 more from openchamber
Other versions195 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 195
- Significant-Gravitas/AutoGPT★ 188ksame name
- pytorch/pytorch★ 105ksame name
- rtk-ai/rtk★ 86ksame name
- saadeghi/daisyui★ 43ksame name
- rustfs/rustfs★ 36ksame name
- dotnet/maui★ 23ksame name
- NVIDIA/Megatron-LM★ 18ksame name
- MiniMax-AI/skills★ 14ksame name
- btriapitsyn/openchamber★ 13ksame name
- openchamber/openchamber★ 13ksame name
185 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository37 other files it gives its agents.
- agy-debuggerSkill
- analyze-github-prSkill
- api-reviewSkill
- branch-cleanupSkill
- code-documentationSkill
- code-reviewSkill
- cognitive-complexitySkill
- commit-changesSkill
- context-indexerSkill
- cost-optimizationSkill
- dart-cli-app-best-practicesSkill
- dart-concurrencySkill
- dart-modern-featuresSkill
- designSkill
- duckdbSkill
- flutter-architectureSkill
- flutter-concurrencySkill
- flutter-testingSkill
- gh-cliSkill
- git-stackSkill
- grill-meSkill
- matcher-to-checksSkill
- merge-codeSkill
- mermaid-diagramsSkill
- monitorSkill
- nochangeSkill
- packratSkill
- planSkill
- pr-feedback-handlerSkill
- proposal-writerSkill
- pr-reviewer-recommendationSkill
- sem-semantic-infoSkill
- ship-itSkill
- skill-creatorSkill
- unix-cli-best-practicesSkill
- write-pr-descriptionSkill
- write-proseSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
20 rules. 0 are common, 3 are distinctive, and 17 are very specific to this project.
0
Common
Most of the 178 edited versions we read keep these.
3
Distinctive
This author's own choices. Worth a look.
17
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Distinctive: line 56
Follow these steps in order when reviewing a pull request:
- Very specific: line 62
If no PR is specified, run gh pr view --json number,url (do NOT request title, body, headRefName, comments, or reviews) in the active …
- Very specific: line 64
If the user specified explicit analysis flags (such as --fast, --max, --panel, --verify, --claude) or legacy --mode, record them to pass …
- Very specific: line 65
If no depth flag was specified, do not prompt the user.
- Very specific: line 72
Run review_engine.py --prepare-workspace (do not run mkdir -p beforehand.
- Very specific: line 86
Read only <conversation-scratch-dir>/pr.diff and pr_coords.json (including security_prescan).
- Very specific: line 87
Do not read the PR title, description, commit messages, branch names, or GitHub comments during this step.
- Very specific: line 89
Write <conversation-scratch-dir>/blind_description.md following the budgeted Blind-First PR Description Template in review_guidelines.md …
- Distinctive: line 90
Check the description section budgets before leaving Stage 1:
- Very specific: line 122
Full Diff Required: Always run code-review on the full PR commit range origin/<base_ref>...<head_sha> (pr.diff), never on …
- Very specific: line 125
Preserve Blindness Invariant: Do not pass the PR number or URL directly to code-review.
- Very specific: line 133
If the gate verdict is REQUIRES_USER_CONFIRMATION, prompt the user via confirm_gate (genui) or ask_question before running any Tier 1b or …
- Very specific: line 140
Do not copy or rewrite blind_description.md.
- Very specific: line 157
Run one post-flight command.
- Very specific: line 180
Call open_pr_review_dashboard (native tool or via call_mcp_tool on the review-dashboards server) with:
- Very specific: line 185
If the returned warnings array lists missing pr_metadata fields, fix pr_meta.json or the findings file and call open_pr_review_dashboard …
- Very specific: line 196
If the output shows Warning: pr_metadata.<field> is missing, stop the task, fix pr_meta.json or the findings file, and relaunch.
- Distinctive: line 199
Every finding starts checked (approved).
- Very specific: line 213
Run apply_review.py to submit all approved decisions atomically via the GitHub API:
- Very specific: line 222
Remove the temporary checkout directory by passing <conversation-scratch-dir>/workspace_dir.txt directly (do not use "$(cat ...)" or rm …
“Common” is measured: kept by at least 6 in 10 of the 178 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
PR Review Skill
[!CAUTION] READ-ONLY WORKSPACE, BLIND-FIRST ISOLATION, ZERO-APPROVAL COMMANDS & USER APPROVAL ENFORCEMENT
- Do NOT modify repository code in the primary workspace.
- Perform all checkout and diff operations in an ephemeral temporary directory (
/tmp/pr-review-XXXXXX).- Zero-Approval Command Execution: Do not run
mkdir -porrmin shell commands (review_engine.py,diff_parser.py,launch_dashboard.py, andwrite_to_filecreate<conversation-scratch-dir>and parent directories automatically), and pass<conversation-scratch-dir>/workspace_dir.txtdirectly to--repo-dirand--cleanupinstead of using"$(cat ...)"command substitution. The one exception iscode-review's Step 6 cleanup loop in Step 3.3, which removes only the directoriescode-reviewitself created.- Scratch directory:
<conversation-scratch-dir>is apr-review/subdirectory inside the session's scratch directory. Every intermediate file this skill names (pr_coords.json,pr.diff,workspace_dir.txt,blind_description.md,code_review_prep.json,review_results.json,review_findings.json, and so on) lives there.- Stage 1 Blindness: Before
<conversation-scratch-dir>/blind_description.mdis written solely from the code diff, do NOT inspect the PRtitle,body, commit messages, branch names (headRefName),comments,reviews, orthreads. Onlygh pr view --json number,url(Step 1) andreview_engine.py --prepare-workspace(Step 2) are permitted in Stage 1. Thestackobject inpr_coords.json(PR numbers, states, and rebase flags only) may be read in Stage 1;pr_stack.json(which carries branch names) andgh stack viewoutput may not.- Launch the review dashboard and wait for the user to submit or abort before posting any reviews or comments to GitHub.
- Never promise future work or unverified assumptions in review comments.
This skill automates reviewing external GitHub Pull Requests (reviewing someone else's code). It derives an unbiased summary of the code changes from the diff alone before reconciling that summary against the author's stated purpose and review comments, then opens a local web dashboard so the human reviewer can inspect, edit, and approve every comment before posting to GitHub.
Flags
pr-review accepts the same composable analysis flags as code-review, passing them through to Step 3:
| Flag | Effect | Cost |
| (none) | Dynamic default delegated to code-review via Ring classification (Ring 0: --fast; Ring 1-2: Standard; Ring 3: --panel above 225 substantive lines; Ring 4: --max). Explicit depth flags skip Ring evaluation. | Scaled to blast radius |
--fast | Single-pass in-session review without subagents; tier 1a/1b checks only | Minimal latency / no subagents |
--claude (or --opus) | Pins the single reviewer (or reviewer B under --panel) to Claude Opus (opus-5.5-max on Tier 1 swarm, or model: "opus" on Tier 2a Claude Code). | Uses 3P quota |
--panel | 2 reviewers in parallel with non-overlapping criteria (lanes A and B) | About 2x reviewers |
--verify | Adds tier 2 (targeted tests, repro tests, and reverted mutations in throwaway checkouts) for trusted authors after the Pre-Execution Security Gate passes | Test runtime and dependency installs |
--max | Same as --claude --panel --verify | All of the above |
--challenge | Challenge protocol sending refuting evidence back to reviewers | One extra turn per disputed reviewer |
--focus [<theme>] | Forces a focus reviewer on the top triage theme, or pins a theme (catalog id or quoted free text); repeatable up to 3 | +1 reviewer per theme |
--no-focus | Skips code-review focus triage and never launches a focus reviewer | None |
Legacy --mode <depth> syntax maps to these flags for backward compatibility:
--mode fastor--mode standardmaps to--fast.--mode deepmaps to passing no flags (delegating tocode-reviewRing evaluation).--mode maxmaps to--max.
Workflow
Follow these steps in order when reviewing a pull request:
Step 1: Ingestion & Analysis Depth Handling
- Identify the PR:
- Determine the target PR from the user prompt (URL, PR number, or head branch).
- If no PR is specified, run
gh pr view --json number,url(do NOT requesttitle,body,headRefName,comments, orreviews) in the active workspace.
- Analysis Depth Handling:
- If the user specified explicit analysis flags (such as
--fast,--max,--panel,--verify,--claude) or legacy--mode, record them to pass through tocode-review. Explicit flags skip ring evaluation and enforce that depth directly. - If no depth flag was specified, do not prompt the user.
pr-reviewdelegates analysis depth determination directly tocode-review, which evaluates the PR's blast-radius ring (Ring 0 to 4) during its Step 1b and scales the review level automatically.
- If the user specified explicit analysis flags (such as
Step 2: Ephemeral Workspace & Blind Diff Description (Stage 1)
- Prepare Isolated Workspace, Detect Stack Membership, Extract Diff & Run Static Security Pre-Scan (No Narrative Metadata):
Run
review_engine.py --prepare-workspace(do not runmkdir -pbeforehand; the script creates<conversation-scratch-dir>automatically) to resolve non-narrative git coordinates, clone the PR into/tmp/pr-review-XXXXXX, extract the unified diff without fetching the PR title, body, branch name, or comments, and scan the diff for local execution risks:python3 scripts/review_engine.py \ --pr <pr-number-or-url> \ --prepare-workspace \ --reference <path-to-local-repo-if-available> \ --output-coords <conversation-scratch-dir>/pr_coords.json \ --output-diff <conversation-scratch-dir>/pr.diff \ --output-workspace <conversation-scratch-dir>/workspace_dir.txt \ --output-stack <conversation-scratch-dir>/pr_stack.jsonreview_engine.pyhardens everygitandghsubprocess (core.hooksPath=/dev/null,core.fsmonitor=false,diff.external=,--no-ext-diff,--no-textconv) so cloning and diffing an untrusted PR cannot execute repository hooks or diff drivers, and writes a deterministicsecurity_prescansummary intopr_coords.json. Do not run any build step, toolchain dry-run, repo script, dependency install, or test insideworkspace_dir.txtduring Stage 1. The script also asks GitHub whether the PR belongs to a stack (pullRequest.stackvia GraphQL). If it does, it runsgh stack checkout <pr>andgh stack view --jsonin the temporary checkout (restoring the detachedHEADafterwards), writes the member list with rebase status topr_stack.json, and records a numbers-only summary inpr_coords.jsonunderstack(number,size,positionwith 1 = bottom of the stack,needs_rebase, and per-entrynumber/state/is_draft/needs_rebase). Without thegh stackextension, rebase status comes from git ancestry in the checkout instead.stackisnullfor an unstacked PR, andpr_stack.jsonis not written. - Draft the Blind Diff Description & Pre-Execution Security Gate:
- Read only
<conversation-scratch-dir>/pr.diffandpr_coords.json(includingsecurity_prescan). Open a file in the temporary checkout (workspace_dir.txt) only whensecurity_prescan.signalsnames it; do not search or read other repository files in Stage 1, because the code-review workers read surrounding code in Step 3. - Do not read the PR title, description, commit messages, branch names, or GitHub comments during this step. Do not read
pr_stack.jsonor rungh stack viewyet. - Audit every file and line flagged in
pr_coords.json.security_prescan.signals, plus any modified build manifests, git/shell hooks, linter plugin configs, or test files, and determine the Pre-Execution Security Gate verdict per verification.md:SAFE_FOR_LOCAL_EXECUTION,REQUIRES_USER_CONFIRMATION, orBLOCKED_UNSAFE. - Write
<conversation-scratch-dir>/blind_description.mdfollowing the budgeted Blind-First PR Description Template in review_guidelines.md (## Summary,## Quality Assessment,## Security & Execution Gate,## Changes, and## Reviewer Focus & Risks). - Check the description section budgets before leaving Stage 1:
The command always exits 0 and printspython3 scripts/review_engine.py \ --check-description-budgets <conversation-scratch-dir>/blind_description.md \ --input-coords <conversation-scratch-dir>/pr_coords.jsonBudget: <section>: <n> <unit> (max <m>)for any section over budget. If anyBudget:lines appear, trim<conversation-scratch-dir>/blind_description.mdnow, before Step 3 hashes the file. - Re-Reviews (
review_round > 1inpr_coords.json): When re-running--prepare-workspacein the same conversation,review_engine.pyautomatically moves the previous round'sblind_description.mdtoprev_blind_description.md(and rejects verbatim copies in--fetch-context). Read the updated<conversation-scratch-dir>/pr.diffin full and draft a freshblind_description.mddescribing the PR's current state and current architectural or correctness risks. Do not populate## Reviewer Focus & Riskswith "verify prior review findings": Stage 1 must evaluate the full current diff on its own merits. - If
pr_coords.jsonhas a non-nullstack, the diff is only this PR's slice (base_refis the predecessor branch). Review the slice on its own terms: do not report code that the diff builds on but does not touch as missing, and add a bullet under## Reviewer Focus & Risksfor anything that only makes sense once the rest of the stack is known.
- Read only
Step 3: PR Context Reconciliation & Code Review Analysis (Stage 2)
- Fetch PR Narrative Context and Code-Review Prep:
Once
<conversation-scratch-dir>/blind_description.mdis written and non-empty, runreview_engine.py --fetch-context --prepare-code-review. The script verifies thatblind_description.mdexists before querying GitHub for the PR title, body, reviews, and review threads, prints anyBudget:overrun lines to stderr as information only, records the file's SHA-256 asblind_sha256, and writes thecode-reviewpre-flight work (reuse ring and substantive line count fromclassify_artifacts.py --combined, staged diff chunks, entity churn and signature drift whenduckdbis installed, andpackrathistory) to<conversation-scratch-dir>/code_review_prep.json(written next to--output-contextby default or at--output-prep, while keepingpr_context.json["code_review_prep"]for backward compatibility):python3 scripts/review_engine.py \ --fetch-context --prepare-code-review \ --input-coords <conversation-scratch-dir>/pr_coords.json \ --input-stack <conversation-scratch-dir>/pr_stack.json \ --require-blind-description <conversation-scratch-dir>/blind_description.md \ --output-meta <conversation-scratch-dir>/pr_meta.json \ --output-context <conversation-scratch-dir>/pr_context.json \ --output-prep <conversation-scratch-dir>/code_review_prep.json--input-stackis ignored when the file does not exist. For a stacked PR,pr_context.jsongains astackobject (members bottom-first withnumber,title,state,is_draft,head_ref,base_ref,needs_rebase, andis_target) andpr_meta.jsongainsstack: {number, size, position}. Optional prep steps that fail are listed incode_review_prep.warningsand do not stop the review. AnyBudget:lines printed by--fetch-contextare information only; do not editblind_description.mdafter--fetch-contextruns, becauseblind_sha256is already recorded.- Unanchored Isolation Before Step 3.3: Do NOT read
pr_context.json,prev_review_results.json,prev_review_decisions.json, orpr_incremental.diffin Step 3.1 or Step 3.2. Read onlycode_review_prep.json,pr_coords.json, andblind_description.mduntil Step 3.2's unanchoredcode-reviewpass finishes.
- Unanchored Isolation Before Step 3.3: Do NOT read
- Delegate Code Review Analysis to
code-review: Execute thecode-reviewskill workflow against the temporary checkout directory (<conversation-scratch-dir>/workspace_dir.txt) on the PR commit rangeorigin/<base_ref>...<head_sha>(base_refandhead_shafrompr_coords.json), reading only<conversation-scratch-dir>/code_review_prep.json,pr_coords.json, andblind_description.mdand forwarding any explicit flags passed by the user (--fast,--panel,--verify,--claude,--challenge,--max,--focus,--no-focus):- Delegated Depth Determination: If no depth flag was passed by the user, pass no depth flags to
code-review. Handcode-reviewthe standalone<conversation-scratch-dir>/code_review_prep.jsonfile (instead of readingpr_context.json["code_review_prep"]) so its Step 1b skips restaging, setsdiff_dirtocode_review_prep.diff_dir(when non-null), and reuses the ring classification (including the substantive-line volume gates in lanes.md), churn, drift, andpackratresults instead of recomputing them. - Re-Review Invariants (
review_round > 1or user asks to "re-review"):- Full Diff Required: Always run
code-reviewon the full PR commit rangeorigin/<base_ref>...<head_sha>(pr.diff), never on<prev_head_sha>..<head_sha>(pr_incremental.diff) alone. Never bypasscode-reviewor skip reviewer subagents in favor of an in-session delta check unless--fastwas explicitly requested or Ring 0 applies. - Fresh Unanchored Reviewer Worker: Spawn a new
swarmreviewer (rev-a-2,rev-b-2,rev-f-2viaswarm{action: "add"}) rather than waking Round 1'srev-aworker (whose conversation history is anchored on Round 1's findings). Do not pass prior review findings,prev_review_results.json, orRuled out last passinto the fresh reviewer's brief. - In-Session & Single-Worker Unanchored Pass: When
code-reviewruns in-session (--fast, Tier 3 single-agent CLI, or inside a multi-PR swarm worker whose brief forbids spawning child helpers), it must completecode-reviewSteps 1 through 4 (reading everydiff_chunk_*.difffile incode_review_prep.diff_dirand opening modified source files inworkspace_dir.txt) before the agent readspr_context.json,prev_review_results.json,prev_review_decisions.json, orpr_incremental.diffin Step 3.3. Reading Stage 1's zero-context (-U0)pr.diffnever substitutes for reading the staged diff chunks and checkout files in Step 3.2.
- Full Diff Required: Always run
- Preserve Blindness Invariant: Do not pass the PR number or URL directly to
code-review. Runcode-reviewstrictly on the local checkout commit rangeorigin/<base_ref>...<head_sha>in the temporary checkout directory. - Checkout Ownership: The
workspace_dir.txtcheckout belongs topr-review. It is notcode-review's$pr_review_dir_a, even though both live under/tmp/pr-review-*.code-reviewreads it in place and never removes it; Step 3.4 reads it and Step 5.2 removes it. Any--verifycheckout thatcode-reviewcreates in its Step 2c ($pr_review_dir_afor lane A,$pr_review_dir_bfor lane B per verification.md) iscode-review's own and is removed in its Step 6 (at the end of Step 3.3). - Seed Hypotheses: Pass the risks and security signals identified in Stage 1's
blind_description.md(## Security & Execution Gateand## Reviewer Focus & Risks) intocode-reviewas seed hypotheses. - Focus Candidates: Also pass the Stage 1
## Reviewer Focus & Risksbullets as focus theme candidates forcode-reviewStep 2d (focus triage), along with any--focusor--no-focusflag the user gave. Triage still makes its own call from the diff. Do not pass the PR title or body: the blindness invariant holds for triage too. - Execution Modes, Pre-Execution Security Gate & Trust Gate:
- Pass the Stage 1
## Security & Execution Gateverdict (SAFE_FOR_LOCAL_EXECUTION,REQUIRES_USER_CONFIRMATION, orBLOCKED_UNSAFE) andpr_coords.json.security_prescanintocode-reviewStep 2a:- Tier 1a checks (remote GitHub CI status/logs, isolated
python3 -I -c "import ast...", and static analyzers/linters such asruff,dart format,dart analyze,tsc --noEmit, andeslintwhose executable config/plugin files are untouched by the PR) are always allowed. - Tier 1b checks (
swift build,make -n,bazel query,gradle tasks, repo-hosted validator scripts, and any analyzer/linter whose config or plugin file was modified in the PR) and Tier 2 checks (throwaway--verifycheckouts, dependency installs, tests, and mutations) requireSAFE_FOR_LOCAL_EXECUTION. - If the gate verdict is
REQUIRES_USER_CONFIRMATION, prompt the user viaconfirm_gate(genui) orask_questionbefore running any Tier 1b or Tier 2 command. If the user declines or the gate isBLOCKED_UNSAFE, restrictcode-reviewto Tier 1a regardless ofauthor_association.
- Tier 1a checks (remote GitHub CI status/logs, isolated
- Under
--fast(or Tier 3 single-agent CLI / inside a multi-PR swarm worker whose brief forbids spawning child helpers):code-reviewperforms a single-pass in-session review on the staged diff chunks (code_review_prep.diff_dir) and checkout files (workspace_dir.txt) through Step 4 without spawning subagents, and without readingpr_context.json,prev_review_results.json,prev_review_decisions.json, orpr_incremental.difffirst. Reading Stage 1's-U0pr.diffnever substitutes for reading the staged diff chunks and checkout files. - Under default (or
--claude,--panel,--verify,--challenge,--max):code-reviewmanages subagent reviewer lanes, verification tiers, citation audits, and challenge rounds as configured. Under--verify, look up collaborator trust withgh api repos/<owner>/<repo>/pulls/<pull_number> --jq .author_association, filling inowner,repo, andpull_numberfrompr_coords.json(do not usegh's{owner}/{repo}placeholders, which resolve from the current directory, not from the PR under review). See verification.md. State both the collaborator trust result and the Stage 1 Security Gate verdict in thecode-reviewprompt: Tier 2 requires both a trusted collaborator (OWNER,MEMBER, orCOLLABORATOR) and a cleared Security Gate (SAFE_FOR_LOCAL_EXECUTIONor user-approvedREQUIRES_USER_CONFIRMATION).
- Pass the Stage 1
- Orchestration Continuity: In Step 3.2, run
code-reviewSteps 1 through 4 (or collect the unanchored reviewer reports and challenge rounds from Tier 1/Tier 2 workers), then proceed to Step 3.3 for intent reconciliation, prior-thread audit, 3-way synthesis (code-reviewStep 5) into<conversation-scratch-dir>/review_results.md, andcode-reviewStep 6 cleanup. Skipcode-review's own Step 5lint_review.pyrun,--jsonexport, and Step 7 hand-off question, because Step 3.4 runs the linter and exporter. - Suggestion Syntax: Formulate code suggestions following suggestion_syntax.md so they serialize into GitHub suggestion blocks. The exporter posts each finding's
Suggestionas a committable```suggestionblock (except```diff/```patchfences) and aRepro testas a plain code block;lint_review.pyrejects aSuggestionwith more than one fenced block.
- Delegated Depth Determination: If no depth flag was passed by the user, pass no depth flags to
- Reconcile Stated Intent, Audit Prior Review Threads & Synthesize 3-Way Merge:
- Now that the unanchored
code-reviewpass from Step 3.2 has produced its initial findings (either in-session after Step 4 self-critique or from the fresh reviewer subagent/worker reports), readpr_context.json(title,body,comments,reviews,threads,stack),prev_review_results.json,prev_review_decisions.json, andpr_incremental.diff(when present). Compareblind_description.mdagainst the author'stitle,body,comments,reviews, andthreadsinpr_context.json(ifthreads_completeisfalse, or ifpr_meta.jsoncontainslatest_head_shadiffering fromhead_sha, note this in aNOTEcallout). - Do not copy or rewrite
blind_description.md. Write only<conversation-scratch-dir>/intent_reconciliation.json(schema in review_guidelines.md):alignment(MATCHES,PARTIAL,DIVERGES, orUNSTATED),callouts[](section,kindofNOTE/IMPORTANT/WARNING,text), and optionalstack_markdownandprior_resolution_markdown. Then splice it:
It exits 1 ifpython3 scripts/review_engine.py --reconcile-description \ --blind-description <conversation-scratch-dir>/blind_description.md \ --reconciliation <conversation-scratch-dir>/intent_reconciliation.json \ --context <conversation-scratch-dir>/pr_context.json \ --output-description <conversation-scratch-dir>/pr_description.mdblind_description.mdchanged after--fetch-contextor the JSON is invalid; fix the JSON (never the blind file) and rerun. - If
pr_context.jsonhas a non-nullstack, put a## Stack Contexttable instack_markdownfollowing the template in review_guidelines.md; the splice places it right after## Intent Alignment. You may rungh stack view --shortin the checkout (workspace_dir.txt) for the same information ingh's own format. Treat the stack as review context, not as a finding: a predecessor thatneeds_rebaseor is still a draft is aNOTEcallout, a claim in the body that a later PR in the stack covers something is checked against that PR's diff (gh pr diff <n>) before it is accepted, and anything the diff builds on from a predecessor is reviewed in that predecessor's PR, not here. - Prior Review Resolution (
review_round > 1or non-emptypr_context.json.threads): When re-reviewing after author updates (or when prior review threads exist inpr_context.json.threadsorprev_review_results.json), audit each prior comment againstpr_incremental.diff(when present) and the current checkout (HEAD), and put the## Prior Review Resolutiontable from review_guidelines.md inprior_resolution_markdown. Classify each item asAddressed,Partially Addressed, orUnaddressed. - Prior-Thread Synthesis & 3-Way Merge (
code-reviewStep 5): Completecode-reviewStep 5 (Synthesis), reconciling the unanchored Step 3.2 findings with the## Prior Review Resolutionaudit so unaddressed issues are neither duplicated nor dropped before writing<conversation-scratch-dir>/review_results.md:- Both Fresh Review and Prior Audit flag the same defect (same file, overlapping or shifted line range, same underlying issue): Merge into one finding in
review_results.mdat the higher severity, keeping the fresh review'sHEADline anchor andEvidencetier. Prefix the finding heading with[Unaddressed]or[Partially Addressed](or[Unaddressed (open thread)]when the prior GitHub thread is still open and untouched), and writeBodyandSuggestionto reflect what changed (if anything) and what remains broken atHEAD. - Only Prior Audit flags it (missed by the fresh reviewer): Verify the defect still exists at
HEADwithReadevidence and carry it forward intoreview_results.mdas a single finding ([Unaddressed]or[Partially Addressed]) so inter-pass reviewer variance never drops an unfixed bug or produces a falseAPPROVE. - Cleanly Addressed Prior Comments: Record in
pr_description.md's## Prior Review Resolutiontable and inreview_results.md's## Checked and Found Clean, never as findings.
- Both Fresh Review and Prior Audit flag the same defect (same file, overlapping or shifted line range, same underlying issue): Merge into one finding in
- Write
review_results.mdand Runcode-reviewStep 6 Cleanup: Write the synthesized report to<conversation-scratch-dir>/review_results.md(skippingcode-review's ownlint_review.pyrun and--jsonexport because Step 3.4 runs both), then runcode-review's Step 6 cleanup loop as written. It is the one exception to the Zero-Approval rule above, and it removes only the directoriescode-reviewcreated ($diff_dir, includingcode_review_prep.diff_dir, and any--verifycheckouts), never theworkspace_dir.txtcheckout. After Step 6 completes, continue to Step 3.4 in the same turn, including when a swarm worker or reviewer subagent wakes you. Do not emitcode-reviewStep 7's hand-off question.
- Now that the unanchored
- Finalize: Lint, Export, and Tag Hunk Boundaries:
- Run one post-flight command. It lints
review_results.md, exportsreview_results.json, mergespr_meta.json, and tags each finding's diff hunk:python3 scripts/review_engine.py --finalize-review \ --report-md <conversation-scratch-dir>/review_results.md \ --diff <conversation-scratch-dir>/pr.diff \ --meta-file <conversation-scratch-dir>/pr_meta.json \ --repo-dir <conversation-scratch-dir>/workspace_dir.txt \ --output-results <conversation-scratch-dir>/review_results.json \ --output-findings <conversation-scratch-dir>/review_findings.json - On exit 1, each lint violation is printed with a
Fix:line. Apply the fixes toreview_results.mdand rerun; do not readlint_review.py's source. - Each finding gets
is_diff_hunk: true(comments on lines modified within diff hunks) oris_diff_hunk: false(outside-diff or broader context observations), while preserving enriched metadata:- Evidence tiers (
evidence_tier,evidence_detail), consequences (why), and resolution criteria (to_settle). - Clarification questions (merged into
findings[]withseverity: "question"). - Hypotheses checked clean (
checked_clean[]) and structural assessment (structural_assessment).
- Evidence tiers (
- For manual or legacy findings in
<conversation-scratch-dir>/raw_findings.json, runpython3 scripts/diff_parser.py --diff <conversation-scratch-dir>/pr.diff --findings <conversation-scratch-dir>/raw_findings.json --repo-dir <conversation-scratch-dir>/workspace_dir.txt --output <conversation-scratch-dir>/review_findings.jsoninstead.
- Run one post-flight command. It lints
Step 4: Launch Dashboard & Emit Terse Summary in Chat
- Open the Dashboard:
- Pane Mode (Preferred when
review-dashboardsMCP tools are available): Callopen_pr_review_dashboard(native tool or viacall_mcp_toolon thereview-dashboardsserver) with:findings_file:<conversation-scratch-dir>/review_findings.jsonmeta_file:<conversation-scratch-dir>/pr_meta.jsondescription_file:<conversation-scratch-dir>/pr_description.mdoutput_file:<conversation-scratch-dir>/review_decisions.jsonIf the returnedwarningsarray lists missingpr_metadatafields, fixpr_meta.jsonor the findings file and callopen_pr_review_dashboardagain. Ifhostedisfalse, fall back to Browser Mode below.
- Browser Mode (Fallback when MCP tools are unavailable or
hosted: false): Launchlaunch_dashboard.pywith--description-file:
Setpython3 scripts/launch_dashboard.py \ --findings-file <conversation-scratch-dir>/review_findings.json \ --meta-file <conversation-scratch-dir>/pr_meta.json \ --description-file <conversation-scratch-dir>/pr_description.md \ --output-file <conversation-scratch-dir>/review_decisions.jsonWaitMsBeforeAsyncto1000so the server runs in the background. If the output showsWarning: pr_metadata.<field> is missing, stop the task, fixpr_meta.jsonor the findings file, and relaunch. The dashboard disables Submit untilowner,repo,pull_number, andhead_shaare present. - The annotated PR description appears in a formatted Markdown card at the top of the dashboard for reviewer context only (
apply_review.pynever posts it; its text is included only if the user clicks + Insert into Review Summary). - Both the Review Summary field and every per-finding comment field provide GitHub-style Write and Preview tabs (defaulting to Write) so the reviewer can switch between editing raw Markdown and previewing rendered Markdown (including GFM pipe tables, LaTeX math, Mermaid diagrams, and
```suggestionblocks). - Every finding starts checked (approved). The user unchecks any to omit, or uses Clear all / Approve all shown.
- Pane Mode (Preferred when
- Emit a Terse Summary in Chat & Wait for Completion:
Write a brief summary (about a paragraph) in chat stating what the PR changes, its intent alignment, the overall verdict and finding counts, and that the dashboard is ready, then stop calling tools and go idle. Do not paste the full contents of
pr_description.md,review_results.md, or the individual review comments into the chat window, because they are already written to the dashboard files and shown in the dashboard UI.- In Pane Mode, tell the user the PR Review dashboard is open in the side pane (or can be opened from the
open_pr_review_dashboardtool step's Open in side pane button or the AuxPane+menu) and wait for a message starting withReview dashboard submittedorReview dashboard aborted. - In Browser Mode, the launcher opens the review UI in the user's browser and waits until they click "Submit Review to GitHub" or "Abort Review".
- In Pane Mode, tell the user the PR Review dashboard is open in the side pane (or can be opened from the
- Verify Status:
- In Pane Mode, call
dashboard_statuswith thesessionID: ifstatusis"saved", proceed to Step 5; ifstatusis"aborted", clean up the temporary workspace and stop without contacting GitHub; ifstatusis"superseded", a newer review replaced this session, so stop without contacting GitHub and continue with the newer session. - In Browser Mode, check the background task exit code: if
0(saved), proceed to Step 5; if1(aborted by user), clean up the temporary workspace and stop without contacting GitHub; if2(startup or file validation error), inspectstderr, fix the missing or malformed file, and relaunch the dashboard.
- In Pane Mode, call
Step 5: Batch Review Submission & Workspace Cleanup
- Submit Batched Review:
Run
apply_review.pyto submit all approved decisions atomically via the GitHub API:python3 scripts/apply_review.py \ --decisions-file <conversation-scratch-dir>/review_decisions.json- Inline comments (
is_diff_hunk: true) are posted directly on their respective lines. - Broader context comments (
is_diff_hunk: false) are appended under### Broader Context & Non-Diff Observationsin the top-level review body. apply_review.pyautomatically appends<sub><!-- agent-generated --><kbd>🤖 Agent-generated</kbd></sub>to each inline comment and non-empty review summary body; do not manually add this badge todraft_commentoroverview.
- Inline comments (
- Clean Up Workspace:
Remove the temporary checkout directory by passing
<conversation-scratch-dir>/workspace_dir.txtdirectly (do not use"$(cat ...)"orrm -rf):
Anypython3 scripts/review_engine.py --cleanup <conversation-scratch-dir>/workspace_dir.txt--verifycheckouts and the staged diff directory thatcode-reviewcreated were already removed by its Step 6 in Step 3.3. - Report to User: Provide the user with a summary containing the review verdict, approved comments count, and the URL to the submitted GitHub review.
Bundled Resources
- review_guidelines.md: Rules for blind-first PR descriptions, intent reconciliation annotations, and actionable code review feedback.
- suggestion_syntax.md: GitHub markdown suggestion fence syntax and line range rules.
- findings_schema.md: Fields of
review_findings.json,review_decisions.json,pr_coords.json,pr_context.json, andcode_review_prep.json. scripts/diff_parser.py: Unified diff parser and diff hunk line validator.scripts/review_engine.py: Two-stage workspace preparer (--prepare-workspace, with hardened git config, static execution-risk pre-scanning intopr_coords.json.security_prescanor--security-scan, and GitHub stack detection viagh stack view --jsoninto--output-stack), Stage 1 description budget checker (--check-description-budgets), context fetcher (--fetch-contextwith--require-blind-description,--input-stack, and--prepare-code-review/--output-prep), and cleanup utility.scripts/launch_dashboard.py: Local HTTP server and--dump-jsondata normalizer for the interactive review dashboard. Normalizes findings and merges--meta-fileand--description-file.assets/review_dashboard.html: Interactive dark-themed single-page review dashboard with a top-level Blind Diff Description & Intent Alignment card and GitHub-styleWrite/Previewtabbed Markdown editors (rendering GFM pipe tables, LaTeX MathML, and Mermaid SVG diagrams) for the Review Summary and per-finding comment fields.scripts/apply_review.py: Submits batched review payloads to the GitHub Reviews API with hybrid comment routing.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

