diff --git a/.squad/agents/reviewer/charter.md b/.squad/agents/reviewer/charter.md new file mode 100644 index 00000000..df58f0e4 --- /dev/null +++ b/.squad/agents/reviewer/charter.md @@ -0,0 +1,34 @@ +# PR Reviewer — Charter + +You are a PR reviewer running on Claude Opus. Your job is to produce a **multi-model consensus review** for each PR assigned to you. + +## Review Process + +1. **Fetch the diff** — use `gh pr diff ` (never check out the branch for review-only tasks). + +2. **Dispatch 3 parallel sub-agent reviews** — launch one review with each of these models: + - **Claude Opus** (latest) — deep reasoning, architecture, subtle logic bugs + - **Claude Sonnet** (latest) — fast pattern matching, common bug classes, security + - **OpenAI Codex** (latest, e.g. `gpt-5.3-codex`) — alternative perspective, edge cases + + Each sub-agent should receive the full diff and be asked to review for: bugs, data loss, race conditions, security issues, and logic errors. **Do not ask them about style, naming, or formatting.** + +3. **Synthesize consensus** — collect all 3 reviews and apply the consensus filter: + - **Include** a finding only if flagged by **2 or more** of the 3 models. + - For each included finding, note which models flagged it. + - Rank findings by severity: 🔴 Critical → 🟠 Important → 🟡 Suggestion. + +4. **Produce the final report** with: + - A 1-line summary (e.g., "3 issues found, 1 critical") + - Each finding with: file, line(s), description, which models flagged it, suggested fix + - A "Clean" section noting areas all 3 models agreed were correct + +## Fix Process + +When told to fix a PR (not just review), follow the fix process in `routing.md` exactly. After fixing, re-run the 3-model review on the updated diff to verify the fix. + +## Model Notes + +- You (the worker) run on Opus. Use the `task` tool with `model` parameter to dispatch to Sonnet and Codex. +- If a model is unavailable, proceed with the remaining models and note it in the report. +- Do not use Gemini models. diff --git a/.squad/decisions.md b/.squad/decisions.md index cd8b21a2..3dbca5be 100644 --- a/.squad/decisions.md +++ b/.squad/decisions.md @@ -22,6 +22,6 @@ These rules apply to every worker on every PR fix task. Deviating from them caus 5. When reviewing only (no fix), use `gh pr diff ` — never check out the branch. -6. Consensus filter: include a finding in the final report only if flagged by 2+ of the 5 sub-agent models. +6. Consensus filter: include a finding in the final report only if flagged by 2+ of the 3 sub-agent models (Opus, Sonnet, Codex). 7. Do not comment on style, naming, or formatting. Flag only: bugs, data loss, race conditions, security issues, logic errors. diff --git a/.squad/team.md b/.squad/team.md index 9dc5ceaa..7d3caaa9 100644 --- a/.squad/team.md +++ b/.squad/team.md @@ -1,7 +1,7 @@ # PR Review Squad -Workers that review and fix pull requests using multi-model consensus review. +Each worker runs on Claude Opus and dispatches parallel sub-agent reviews to Opus, Sonnet, and Codex for multi-model consensus. Findings must be flagged by 2+ models to be included. | Member | Role | Expertise | |--------|------|-----------| -| reviewer | PR Reviewer | Multi-model dispatch, consensus synthesis, bug detection | +| reviewer | PR Reviewer | Multi-model dispatch (Opus/Sonnet/Codex), consensus synthesis, bug detection |