Skip to content

Add two-tier /review for PR and branch code review #1009

Description

@puri-adityakumar

Summary

Add /review and fx review for evidence-based code review. Two tiers only — no one-shot quick mode.

  • Default: one read-only find → verify pass
  • --deep: parallel finder subagents + independent verify per finding

Why

fx can draft PRs (fx pr) and delegate work (subagent), but has no dedicated review flow. Free-form "review this diff" prompts are inconsistent, and a truncated one-shot pass invents issues easily.

Behavior

/review / fx review

pre-flight (host, 0 model tokens)
  resolve target (branch | PR | current vs merge-base)
  verify ref · require non-empty diff
  prepare truncated patch + file list
       │
       ▼
ONE finder agent (tool loop, enforced read-only)
  prepared diff · read_file · grep_files · glob_files
  budget: bounded tool calls
       │
       ▼
self-verify (same agent)
  re-read every cited file:line
  confidence 0-100 · drop < 80
       │
       ▼
report: P0 / P1 / nit · severity · mandatory file:line

/review deep / fx review --deep

same pre-flight + bounded repo context pack
       │
       ├─▶ subagent.run ①  bug hunt
       ├─▶ subagent.run ②  standards (AGENTS.md / repo conventions)
       └─▶ subagent.run ③  intent (PR/issue description when available)
       │        root-spawned in parallel · read-only · citations mandatory
       ▼
VERIFY FAN-OUT (one independent subagent.run per finding)
  0-100 confidence · keep only ≥ 80
       │
       ▼
dedupe + rank → report
optional --json for CI / editor integrations

Constraints

  • Slash and CLI share one workflow
  • Read-only is enforced, not just prompted
  • Diff prep is host-side (like fx pr), not shell allowlist gymnastics
  • Separate from permission/safety review
  • v1: no GitHub review comments, no branch mutation, deep stays opt-in

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions