Skip to content

feat(pst:code-review): v2 tournament analysis -- 3 parallel lens agents, Opus dedup judge#72

Merged
pstaylor-patrick merged 2 commits into
mainfrom
worktree-agent-af3d9d14db741ae45
Jun 21, 2026
Merged

feat(pst:code-review): v2 tournament analysis -- 3 parallel lens agents, Opus dedup judge#72
pstaylor-patrick merged 2 commits into
mainfrom
worktree-agent-af3d9d14db741ae45

Conversation

@pstaylor-patrick

Copy link
Copy Markdown
Owner

Summary

  • Replaces single-path analysis with 3 parallel Sonnet agents (Security-first, Correctness-first, Blast-radius-first)
  • Foreground Opus judge deduplicates findings: keeps those in 2+ strategies or severity:critical from any
  • Diff-size gate selects N (< 200 lines = N=1/Strategy B; 200+ lines = N=3)

Key design decisions

  • Read-only enforced in prompt: analysis agents get Read/Grep/Glob only in their opening instruction
  • Severity taxonomy mapping table: critical/high/medium/low → critical/warning/nit/drop
  • Line format defined: "<start>-<end>", dedup overlap rule precise (max(startA,startB) <= min(endA,endB)+5)
  • Judge result block schema: ---judge-result--- with title (8-word imperative), confidence (1/3/5), strategies array
  • N=1 path: single Strategy B agent, result passes directly to pre-filter, no judge
  • grep fix: excludes +++/--- header lines from LINES_CHANGED count
  • Re-review diff: git diff $PRIOR_REVIEW_SHA..HEAD instead of gh pr diff (which returns full diff)
  • Inline comment fallback: body comment when source line is not in diff

Adversarial review (2 rounds, 9 findings resolved)

🤖 Generated with Claude Code
https://claude.ai/code/session_019BCr5Qxi8jXnG2Rr7zdkw1

pstaylor-patrick and others added 2 commits June 21, 2026 15:59
…tegies, Opus dedup judge

Replace single-path analysis with 3 parallel Sonnet agents (Security-first,
Correctness-first, Blast-radius-first). Foreground Opus judge deduplicates
and merges findings: keeps those appearing in 2+ strategies or severity:critical
from any. Diff-size gate selects N (small=1/skip, medium+large=3).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… analysis

- Analysis agents restricted to Read/Grep/Glob in prompt (no mutations)
- Severity taxonomy mapping table: critical/high/medium/low -> critical/warning/nit/drop
- Line field format defined as start-end; dedup overlap rule made precise
- Opus judge result block schema defined with title, confidence, strategies fields
- N=1 path: spawn single Strategy B agent, skip judge, pass directly to pre-filter
- grep excludes +++ and --- diff headers from LINES_CHANGED count
- Zero-findings: skip verification, proceed directly to Reporting
- Re-review diff: git diff {prior_sha}..HEAD (not gh pr diff which returns full diff)
- Inline comment: note + fallback to body comment when line not in diff

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@pstaylor-patrick pstaylor-patrick merged commit c282d82 into main Jun 21, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant