Adversarial Review
Use this when ordinary review is not enough. The workflow is independent
criticism, root-cause clustering, attempted takedown of findings, synthesized
action items, and reruns after fixes when edits are in scope.
The goal is not to generate more comments. The goal is to find the issues that
survive skeptical validation.
Core Rules
- Reviewer and validator passes are readonly. Edit only after synthesis, and
only to address validated action items.
- Do not reuse the implementation chat as evidence. Reviewers get the review
packet, not the builder's defense of the code.
- No issue quota. A clean review is valid if the probes were meaningful.
- Every finding needs a concrete failure path, target file or symbol, evidence,
and suggested fix.
- Vague concerns are not findings.
- The user gets a synthesized action list, not raw reviewer transcripts.
- Default to the hardening loop unless the user asks for report-only review.
If your runtime supports subagents, use fresh readonly subagents for reviewer and
validator passes. If it does not, run the same lanes sequentially in fresh notes:
reset assumptions between lanes, do not edit during lane work, and do not let one
lane's findings bias another until clustering.
Scope Selection
Pick the narrowest concrete scope before launching reviewer lanes:
- If the user gives a PR URL or number, review that PR with the local GitHub
tooling available in the environment.
- If the user names files or directories, review those paths plus directly
relevant callers.
- If the user gives a base or revision range, review that diff.
- If the current branch has a resolvable PR, review that PR.
- Otherwise review the branch diff from the default branch using the merge
base.
- Otherwise review staged, unstaged, and untracked changes.
If the resolved diff is empty, stop and say there is nothing to review.
Dimension Selection
Choose lanes from the user's requested dimensions, changed surfaces, and risk
profile. Do not run the same fixed panel every time.
- Extract explicit dimensions and exclusions from the prompt.
- Infer additional dimensions only when materially relevant.
- Skip unrelated default lanes.
- Use one lane for a narrow requested dimension, two or three for moderate
risk, and four or more only for broad PRs or explicit high-scrutiny requests.
- Ask for clarification only when two plausible lane sets would produce
materially different reviews.
Record selected lanes and skipped obvious lanes in the final coverage section.
Review Packet
Create one lean packet and pass the same packet to every reviewer lane.
Include:
- user request, requested dimensions, exclusions, and selected scope;
- PR title/body or local change summary when available;
- issue/ticket links when available;
- diff command used and changed file list;
- full diff or focused patch for the selected scope;
- on reruns, the disposition ledger from prior rounds.
Reference project guidance by path instead of inlining it. Reviewers may read
AGENTS.md, local skill docs, package docs, and full files needed to prove or
kill a finding.
Do not include implementation plans, parent-agent notes, or private reasoning
unless the user explicitly asks to review against them.
Lane Templates
Use these as starting points. Add or remove lanes based on the task.
| Lane |
Focus question |
Use for |
| Correctness Critic |
How does this break in production? |
Runtime behavior, data flow, state, cache, idempotency, regression risk. |
| Security Critic |
What can a hostile user, integration, or prompt do with this? |
Auth, authorization, injection, secret exposure, unsafe logs, trust boundaries. |
| Architecture Minimalist |
Is this the smallest maintainable shape? |
Abstractions, duplicated pathways, wrong-layer fixes, interface bloat. |
| Interface Critic |
Does the public boundary make the caller's job clear? |
APIs, schemas, hooks, component props, CLI flags, cross-package contracts. |
| Test And Ops Critic |
What will make this hard to verify, deploy, roll back, or debug? |
Missing failure-path tests, migrations, observability, version skew, flaky assumptions. |
| Product Or UX Critic |
Does behavior match the expected user outcome? |
Visible behavior, copy, loading/error states, accessibility, workflow fit. |
Add domain lanes when warranted: migration safety, performance, prompt injection,
data correctness, accessibility, payments, privacy, or package publishing.
Reviewer Output Contract
Each reviewer returns Markdown with this shape:
## <Reviewer Lane>
Verdict: BLOCK | CONCERNS | CLEAN
### Findings
1. ID: <stable lane-local id>
Severity: CRITICAL | WARNING | NOTE
Confidence: HIGH | MEDIUM | LOW
Target: `<path>` / `<symbol or line if known>`
Problem: <one sentence>
Evidence: <specific code path and why existing guards do not cover it>
Failure path: <input/event/state that triggers the issue>
Suggested fix: <concrete remediation>
### Probes That Survived
- <meaningful checks that did not produce findings>
Severity rubric:
CRITICAL: merge-blocking correctness, data loss, security, or broken
existing contract.
WARNING: should be fixed, but not merge-blocking.
NOTE: informational; never becomes an action item on its own.
If there are no findings, the reviewer still lists probes that survived.
Clustering And Validation
Cluster first, then validate clusters. Never run one validator per raw finding.
- Cluster candidate findings by root cause, not by file or reviewer.
- Drop clusters made only of NOTE-severity or evidence-free findings.
- Run one fresh readonly validator pass per remaining cluster.
- The validator's job is to kill the finding, not defend it.
Validator output:
## Validation
1. Cluster: <finding ids>
Disposition: action-item | omit | needs-human
Evidence: <code evidence for or against the finding>
Use omit for disputed, unproven, or confirmed-but-trivial findings. Keep a
disputed finding only when the disagreement itself changes what the user should
decide.
Synthesis
The parent agent synthesizes. Do not paste raw reviewer reports.
- Convert
action-item clusters into action items.
- Route
needs-human clusters to a human-decision bucket.
- Rank by merge-blocking impact, then user risk, then maintenance cost.
Verdict mapping describes the final diff after any fixes:
BLOCK: at least one validated CRITICAL finding remains unfixed.
CONCERNS: validated non-blocking action items or human decisions remain.
CLEAN: no validated findings remain.
Iterative Hardening Loop
Use this loop by default when edits are in scope.
- Run reviewer lanes, clustering, validation, and synthesis.
- If validated action items remain and the local worktree is editable, fix them.
- Run targeted checks for touched surfaces.
- Refresh the packet and append a disposition ledger:
- fixed, with fix location;
- omitted, with killing evidence;
- needs-human, with the decision needed.
- Rerun only lanes that produced a validated finding or whose surfaces the fix
touched.
- Stop at a terminal state.
Terminal states:
clean: fresh review leaves no validated actionable findings.
human-decision: remaining findings require product, architecture, rollout, or
risk-tolerance decisions.
broad-refactor-required: credible fix exceeds the requested scope; name the
subsystem boundary and why a local fix would be misleading.
report-only-requested: user explicitly requested readonly review.
cycle-cap-reached: three full cycles ran and validated findings remain.
Final Report
Use this shape:
## Independent Critical Review
Verdict: BLOCK | CONCERNS | CLEAN
### Action Items
**Before merge**
- <owner action> in `<path>` / `<symbol>` because <validated risk>.
**Verification**
- <test, check, or manual verification needed>.
**Needs human decision**
- <decision and why code alone cannot answer it>.
### Findings
1. **CRITICAL | WARNING | NOTE** - `<path>` / `<symbol>`
<problem and failure path>
Evidence: <why this survived validation>
Suggested fix: <concrete remediation>
### Coverage
- Scope reviewed: <diff/path/PR>
- Lanes run: <lanes>
- Lanes intentionally skipped: <lanes and why>
- Validation: <commands or checks>
If no findings survive, say so directly and include the probes that mattered.
1---2name: adversarial-review3description: Use when the user asks for adversarial, independent, skeptical, panel, multi-agent, second-opinion, high-scrutiny, security-minded, or critical review of a PR, branch diff, uncommitted changes, changed files, plan, or specific paths.4---56# Adversarial Review78Use this when ordinary review is not enough. The workflow is independent9criticism, root-cause clustering, attempted takedown of findings, synthesized10action items, and reruns after fixes when edits are in scope.1112The goal is not to generate more comments. The goal is to find the issues that13survive skeptical validation.1415## Core Rules1617- Reviewer and validator passes are readonly. Edit only after synthesis, and18 only to address validated action items.19- Do not reuse the implementation chat as evidence. Reviewers get the review20 packet, not the builder's defense of the code.21- No issue quota. A clean review is valid if the probes were meaningful.22- Every finding needs a concrete failure path, target file or symbol, evidence,23 and suggested fix.24- Vague concerns are not findings.25- The user gets a synthesized action list, not raw reviewer transcripts.26- Default to the hardening loop unless the user asks for report-only review.2728If your runtime supports subagents, use fresh readonly subagents for reviewer and29validator passes. If it does not, run the same lanes sequentially in fresh notes:30reset assumptions between lanes, do not edit during lane work, and do not let one31lane's findings bias another until clustering.3233## Scope Selection3435Pick the narrowest concrete scope before launching reviewer lanes:36371. If the user gives a PR URL or number, review that PR with the local GitHub38 tooling available in the environment.392. If the user names files or directories, review those paths plus directly40 relevant callers.413. If the user gives a base or revision range, review that diff.424. If the current branch has a resolvable PR, review that PR.435. Otherwise review the branch diff from the default branch using the merge44 base.456. Otherwise review staged, unstaged, and untracked changes.4647If the resolved diff is empty, stop and say there is nothing to review.4849## Dimension Selection5051Choose lanes from the user's requested dimensions, changed surfaces, and risk52profile. Do not run the same fixed panel every time.53541. Extract explicit dimensions and exclusions from the prompt.552. Infer additional dimensions only when materially relevant.563. Skip unrelated default lanes.574. Use one lane for a narrow requested dimension, two or three for moderate58 risk, and four or more only for broad PRs or explicit high-scrutiny requests.595. Ask for clarification only when two plausible lane sets would produce60 materially different reviews.6162Record selected lanes and skipped obvious lanes in the final coverage section.6364## Review Packet6566Create one lean packet and pass the same packet to every reviewer lane.6768Include:6970- user request, requested dimensions, exclusions, and selected scope;71- PR title/body or local change summary when available;72- issue/ticket links when available;73- diff command used and changed file list;74- full diff or focused patch for the selected scope;75- on reruns, the disposition ledger from prior rounds.7677Reference project guidance by path instead of inlining it. Reviewers may read78`AGENTS.md`, local skill docs, package docs, and full files needed to prove or79kill a finding.8081Do not include implementation plans, parent-agent notes, or private reasoning82unless the user explicitly asks to review against them.8384## Lane Templates8586Use these as starting points. Add or remove lanes based on the task.8788| Lane | Focus question | Use for |89| --- | --- | --- |90| Correctness Critic | How does this break in production? | Runtime behavior, data flow, state, cache, idempotency, regression risk. |91| Security Critic | What can a hostile user, integration, or prompt do with this? | Auth, authorization, injection, secret exposure, unsafe logs, trust boundaries. |92| Architecture Minimalist | Is this the smallest maintainable shape? | Abstractions, duplicated pathways, wrong-layer fixes, interface bloat. |93| Interface Critic | Does the public boundary make the caller's job clear? | APIs, schemas, hooks, component props, CLI flags, cross-package contracts. |94| Test And Ops Critic | What will make this hard to verify, deploy, roll back, or debug? | Missing failure-path tests, migrations, observability, version skew, flaky assumptions. |95| Product Or UX Critic | Does behavior match the expected user outcome? | Visible behavior, copy, loading/error states, accessibility, workflow fit. |9697Add domain lanes when warranted: migration safety, performance, prompt injection,98data correctness, accessibility, payments, privacy, or package publishing.99100## Reviewer Output Contract101102Each reviewer returns Markdown with this shape:103104```markdown105## <Reviewer Lane>106107Verdict: BLOCK | CONCERNS | CLEAN108109### Findings1101111. ID: <stable lane-local id>112 Severity: CRITICAL | WARNING | NOTE113 Confidence: HIGH | MEDIUM | LOW114 Target: `<path>` / `<symbol or line if known>`115 Problem: <one sentence>116 Evidence: <specific code path and why existing guards do not cover it>117 Failure path: <input/event/state that triggers the issue>118 Suggested fix: <concrete remediation>119120### Probes That Survived121122- <meaningful checks that did not produce findings>123```124125Severity rubric:126127- `CRITICAL`: merge-blocking correctness, data loss, security, or broken128 existing contract.129- `WARNING`: should be fixed, but not merge-blocking.130- `NOTE`: informational; never becomes an action item on its own.131132If there are no findings, the reviewer still lists probes that survived.133134## Clustering And Validation135136Cluster first, then validate clusters. Never run one validator per raw finding.1371381. Cluster candidate findings by root cause, not by file or reviewer.1392. Drop clusters made only of NOTE-severity or evidence-free findings.1403. Run one fresh readonly validator pass per remaining cluster.1414. The validator's job is to kill the finding, not defend it.142143Validator output:144145```markdown146## Validation1471481. Cluster: <finding ids>149 Disposition: action-item | omit | needs-human150 Evidence: <code evidence for or against the finding>151```152153Use `omit` for disputed, unproven, or confirmed-but-trivial findings. Keep a154disputed finding only when the disagreement itself changes what the user should155decide.156157## Synthesis158159The parent agent synthesizes. Do not paste raw reviewer reports.1601611. Convert `action-item` clusters into action items.1622. Route `needs-human` clusters to a human-decision bucket.1633. Rank by merge-blocking impact, then user risk, then maintenance cost.164165Verdict mapping describes the final diff after any fixes:166167- `BLOCK`: at least one validated CRITICAL finding remains unfixed.168- `CONCERNS`: validated non-blocking action items or human decisions remain.169- `CLEAN`: no validated findings remain.170171## Iterative Hardening Loop172173Use this loop by default when edits are in scope.1741751. Run reviewer lanes, clustering, validation, and synthesis.1762. If validated action items remain and the local worktree is editable, fix them.1773. Run targeted checks for touched surfaces.1784. Refresh the packet and append a disposition ledger:179 - fixed, with fix location;180 - omitted, with killing evidence;181 - needs-human, with the decision needed.1825. Rerun only lanes that produced a validated finding or whose surfaces the fix183 touched.1846. Stop at a terminal state.185186Terminal states:187188- `clean`: fresh review leaves no validated actionable findings.189- `human-decision`: remaining findings require product, architecture, rollout, or190 risk-tolerance decisions.191- `broad-refactor-required`: credible fix exceeds the requested scope; name the192 subsystem boundary and why a local fix would be misleading.193- `report-only-requested`: user explicitly requested readonly review.194- `cycle-cap-reached`: three full cycles ran and validated findings remain.195196## Final Report197198Use this shape:199200```markdown201## Independent Critical Review202203Verdict: BLOCK | CONCERNS | CLEAN204205### Action Items206207**Before merge**208- <owner action> in `<path>` / `<symbol>` because <validated risk>.209210**Verification**211- <test, check, or manual verification needed>.212213**Needs human decision**214- <decision and why code alone cannot answer it>.215216### Findings2172181. **CRITICAL | WARNING | NOTE** - `<path>` / `<symbol>`219 <problem and failure path>220 Evidence: <why this survived validation>221 Suggested fix: <concrete remediation>222223### Coverage224225- Scope reviewed: <diff/path/PR>226- Lanes run: <lanes>227- Lanes intentionally skipped: <lanes and why>228- Validation: <commands or checks>229```230231If no findings survive, say so directly and include the probes that mattered.