- Gemini CLI: full session persistence via -o json/stream-json and
--resume <uuid>, NDJSON parsing for streaming session_id capture
- Claude Code & Gemini CLI: session naming via [name] prefix in first
message, visible in gemini --list-sessions and claude --resume
- Provider interface: startSession() now accepts optional name parameter
- Codex CLI: include stderr in error messages for better diagnostics
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Validates that PR numbers are numeric-only in postPRReview and
getPRHeadSha before passing them to shell commands.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add human-in-the-loop review for each issue before posting to GitHub.
After structured issues are displayed, users can review each issue and
choose to post as-is, edit, discuss with the original reviewer, skip,
or stop. Approved comments are batched and posted via the GitHub API.
- Add getReviewers() method to DebateOrchestrator
- Add interactiveCommentReview function with per-issue actions (p/e/d/s/q)
- Add discuss mode: back-and-forth with the AI reviewer who raised the issue
- Wire post-processing prompt into PR review flow after issue table display
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add commenter module that builds GitHub PR review payloads from merged
issues. Issues with file+line become inline review comments, issues
without line info go into the review body. Includes gh CLI wrappers for
posting reviews and fetching PR head SHA.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add formatCallChainForReviewer to display exact code snippets at each
call site, giving reviewers precise context about how changed symbols
are used across the codebase. Raw references are now stored in
GatheredContext and formatted into the reviewer prompt.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add parseFocusAreas to extract suggested review focus from analyzer
output and inject them as hints into each reviewer's first-round
prompt. Focus areas are suggestions, not constraints — reviewers are
explicitly told to also flag anything else they notice.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add parseReviewerOutput to extract structured issues from reviewer
JSON blocks and deduplicateIssues to merge similar issues across
multiple reviewers using Jaccard similarity on title words.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add reference collector module that:
- Extracts function/class symbols from git diffs
- Uses ripgrep to find where symbols are referenced in the codebase
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add onConvergenceJudgment callback to display why judge ruled converged/not
- Increase joke rotation interval from 8s to 15s
- Fix markdown rendering issues from LLMs like Codex:
- Add fixMarkdown() to convert indented lists to standard format
- Increase terminal width from 80 to 120
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The previous convergence check had two issues:
1. It could declare convergence after round 1, when reviewers hadn't
seen each other's opinions yet (independent reviews)
2. The parsing logic was too loose - any response containing "CONVERGED"
would pass, even if it was part of a sentence
Changes:
- Require at least 2 completed rounds before checking convergence
- Add stricter consensus criteria (critical issues must be cross-validated)
- Fix parsing to only accept exact "CONVERGED" as first word
- Clarify that silence on another's point is NOT agreement
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Fix readline stdin state issue causing immediate exit in -i mode
- Fix analysis content not displaying before interactive prompt
- Add follow-up Q&A after Final Conclusion in review command
- Refactor selectReviewers to accept optional shared readline instance
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Adds a new `discuss` command that enables interactive discussion sessions
with multiple AI reviewers, including session persistence and context loading.
- Add ReviewerStatus type for tracking reviewer state
- Track start/end time and duration for each reviewer
- Display live status during parallel execution:
✓ done (with duration) | ⋯ thinking | ○ pending
- Update spinner in real-time as reviewers complete
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Fix convergence check: NOT_CONVERGED was incorrectly matching CONVERGED
- Allow convergence after round 1 (was requiring 2 rounds minimum)
- Unify codex-cli streaming/non-streaming to use same bypass flag
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add Fair Debate Model and Parallel Execution to core concepts
- Update max_rounds default from 2 to 5
- Document new CLI options: --reviewers, --all/-a, --git-remote
- Add Reviewer Selection section with interactive/CLI examples
- Rewrite Workflow to show Round 1 independent → Round 2+ debate model
- Add Fair Debate Model explanation section
- Add Parallel Execution section with example output
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Each round now executes all reviewers in parallel using Promise.all:
1. Build messages for all reviewers (same info)
2. Execute all chatStream calls concurrently
3. Collect all responses
4. Display results after all complete
Benefits:
- Faster execution (N reviewers run simultaneously)
- Semantically correct (same round = simultaneous)
- Same total API usage, just concurrent
Display shows: "Round N: All reviewers thinking (parallel)"
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Changed debate model:
- Round N: each reviewer sees only rounds 1 to N-1
- Reviewers in same round have identical information (fair)
- No anchoring bias from earlier reviewers in same round
Example with 3 reviewers:
Round 2: claude sees [gemini_r1, codex_r1]
gemini sees [claude_r1, codex_r1] <- same info level
codex sees [claude_r1, gemini_r1] <- same info level
Also increased default max_rounds from 3 to 5 since convergence
may take longer with this fairer model.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Bug: Round 1 is independent (no one sees others), so session doesn't
have other reviewers' messages. When entering Round 2 debate phase,
we were only sending messages after lastSeen, missing others' Round 1.
Fix: Check if reviewer just finished Round 1 (myMessageCount === 1).
If so, send ALL other reviewers' messages, not just incremental.
Round 3+ continues to use incremental (lastSeen + 1) since debate
context is already established in session.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Round 1: Each reviewer gives independent assessment
- Only sees analysis, not other reviewers' opinions
- Avoids anchoring bias from first reviewer
Round 2+: Full debate mode
- Sees all previous discussion
- Can agree/disagree with specific points from [reviewer_id]
This ensures diverse initial perspectives before debate begins.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- claude-code: add --dangerously-skip-permissions
- codex-cli: use --dangerously-bypass-approvals-and-sandbox
- gemini-cli: already has -y (yolo mode)
This allows CLI tools to access network (e.g., gh commands to fetch PR)
without permission prompts.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Usage:
- Default: shows interactive menu to select reviewers
[0] All reviewers
[1] claude
[2] gemini
...
- --all (-a): use all reviewers, skip selection
- --reviewers claude,gemini: specify reviewers directly
Requires at least 2 reviewers for a debate.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add --git-remote argument to specify which git remote to use when
constructing PR URLs from a PR number. This is useful when working
with forks where the user wants to review PRs from a specific remote
(e.g., upstream) instead of the default origin.
If not provided, defaults to 'origin' for backward compatibility.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Now shows convergence check as a distinct step:
┌─ 🔍 Convergence Judge ─────────────────────────
⠋ Evaluating if reviewers reached consensus...
└─ Verdict: CONVERGED / NOT CONVERGED
Makes it clear this is a separate judge, not another reviewer.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Previous prompt was too lenient ("mostly agree on key points").
Now requires TRUE consensus:
- All reviewers must agree on the same verdict
- NOT converged if any reviewer says "I disagree/reject [X]'s view"
- NOT converged if they agree on problems but disagree on actions
- System prompt: "Be conservative - when in doubt, say NOT_CONVERGED"
This fixes false positives like Gemini saying "I reject [claude]'s view"
but still being marked as converged.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- "adversarial debate against" → "code review debate with"
- "opponent" → "the other reviewer"
- Add "shared goal: find real issues and reach the best conclusion"
- "agree where valid, challenge where you disagree"
- "acknowledge good points and build on them"
Keep the anti-sycophancy stance but focus on solving problems together.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>