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
Summary
Add
/reviewandfx reviewfor evidence-based code review. Two tiers only — no one-shot quick mode.--deep: parallel finder subagents + independent verify per findingWhy
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/review deep/fx review --deepConstraints
fx pr), not shell allowlist gymnastics