agentleFS
preetamnathpreetamnath/agent-skills/skills/two-pass-review/SKILL.md

two-pass-review

Skill4 starsChanged 7 months agoMITView on GitHub

Two-pass code review — a review pass hardened by an adversarial verification pass that suppresses false positives. TRIGGER when: user wants final review of completed code changes; any review where a false positive would cost real time. SKIP when: reviewing a non-code artifact (reviewer); a quick spot-check during iteration.

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

2 rules. About 0 are common, 1 is distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Boundary: Verify only Pass 1 findings.

    line 37
  2. Very specific:

    Empty result: Write None — zero P0/P1 findings after both passes when the P0/P1 list is empty.

    line 51

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Two-Pass Review

Protocol

Pass 1 — Review

Spawn the code-reviewer agent with:

  • Artifact: the file(s) or diff to review
  • Criteria: what to review against
  • Scope: what's in-bounds
  • Output: Return a ReviewOutput; set every finding's validated_by to reviewer, leave verdict and evidence null, and list evaluated criteria and paths in checks_run.

Auto-progression:

  • Zero P0/P1 findings → terminate after Pass 1 and present the clean result in this shape:
    **Review result — clean:**
    - Checks run: [criterion / file path checked, one per line]
    - P0/P1 findings: none
  • One or more P0/P1 findings → proceed automatically to Pass 2. No user prompt.

Pass 2 — Verify

Spawn the verifier agent with:

  • Artifact: same as Pass 1
  • Findings: the reviewer's full Finding array
  • Criteria: same as Pass 1
  • Output: Return a ReviewOutput with the full findings array and populated checks_run.
    • Verdicts: Set every finding to confirmed, demoted, or rejected and provide evidence.
    • Severity: Adjust severity up under confirmed or down under demoted.
    • Validation: Set every finding's validated_by to verifier.
    • Boundary: Verify only Pass 1 findings; do not add findings.

Present to user

Report in this shape:

**Two-pass review results:**
- P0/P1 findings: [id: title — confirmed | demoted Px→Py | promoted Px→Py — evidence]
- Summary: [X] of [Y] P0/P1 confirmed, [W] demoted, [Z] rejected
- P2/P3 (FYI): [id: title — verdict]
- Disagreement: [none | reviewer/verifier split — rejected findings and verifier reasoning]
  • Empty result: Write None — zero P0/P1 findings after both passes when the P0/P1 list is empty.
  • Severity changes: Mark each demotion (demoted P0 → P1) and promotion (promoted P2 → P1).
  • All rejected: Report zero confirmed P0/P1 findings, populate Disagreement with the rejected findings and verifier reasoning, and stop without another automatic review.
  • Visibility: Hide rejected findings outside the all-rejected case and unverified P2/P3 findings unless the user asks.

Output Schema

<!-- source: references/finding-schema.md#output-schema -->

Finding

Finding {
  id: sequential number starting from 1,
  severity: "P0" | "P1" | "P2" | "P3",
  title: short title,
  body: detailed explanation with evidence,
  file: file path or null for global issues,
  line_start: number or null,
  line_end: number or null,
  confidence: 0.0-1.0,
  criterion: what was violated,
  verdict: "confirmed" | "demoted" | "rejected" | null,
  validated_by: "reviewer" | "verifier" | "machine" | null,
  evidence: reasoning for verdict | null
}

ReviewOutput

Findings are wrapped in a ReviewOutput envelope:

ReviewOutput {
  schema_version: "v1",
  findings: Finding[],
  checks_run: string[]
}

Severity calibration

  • P0 — Must fix: breaks functionality, security breach, data loss, or violates criteria
  • P1 — Fix before shipping: correct but incomplete, fragile, or reliability risk
  • P2 — Should fix: quality issue, code smell, not blocking
  • P3 — Nice to have: observation, style, minor improvement

Field notes

  • confidence — 1.0 means certain, below 0.5 means you're guessing. Be honest.
  • criterion — required for P0/P1 findings. Name the specific criterion violated.
  • verdict — initial reviewers set null; verifiers populate it after adjudication. A caller may set confirmed when routing an observed failure with honest validated_by and evidence values.
  • validated_by — reviewer means initial review only; verifier means independent verification; machine requires the exact check and observed failure. Missing or null means unverified.
  • A machine result proves only the observed failure, not an inferred cause.
  • evidence — reasoning or an exact observed result supporting the verdict; use null before adjudication.
  • checks_run — list every criterion evaluated, file path checked, or acceptance criterion verified. For ACs, use AC-NNN-XX: PASS — [evidence] or AC-NNN-XX: FAIL — [reason].
<!-- /source: references/finding-schema.md#output-schema -->

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.