feat(pst:ready): v2 tournament repair protocol -- 3 parallel strategies, Opus judge#70
Merged
Merged
Conversation
Add best-of-N tournament to the repair phase. Three parallel foreground Sonnet agents (Conservative/Structural/Review-first) each attempt to bring the PR to ready-state in isolated sub-worktrees. Background Opus judge scores on commit-graph cleanliness, CI attempts, and review residuals. Winner's commits cherry-picked onto working branch before final push. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Opus judge is foreground (background+await was contradictory) - Tournament agents get isolated PR-repo sub-worktrees; isolation:worktree removed from Agent calls (was isolating skills repo, not PR repo) - Agents explicitly forbidden from pushing; local-only constraint stated - Result block extended: CI_ATTEMPTS, OPEN_THREADS, capped diff (500 lines), diff-stat for judge commit-graph scoring - Cherry-pick fallback replaced: git cherry-pick --abort + git reset --hard (git apply fails for identical reason cherry-pick fails) - Tournament results checkpointed per-strategy so resume skips completed agents Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
pst:readyto add a best-of-N tournament at the repair phaseTournament protocol details
git worktree addsub-worktrees of the PR repo (not the skills repo) before spawning agentsHEAD_SHA,CI_ATTEMPTS,OPEN_THREADS,DIFF_STAT, and capped diff (500 lines) so the judge has real data for all three scoring axesgit cherry-pick --abort+git reset --hard $WINNER_SHA(notgit apply, which fails for the same reason cherry-pick does)Adversarial review
Two rounds:
$WORK_DIR, strategies pushing to remote, wronggit applyfallback, unbounded diff, Opus judge background contradiction, judge missing CI/thread data, no tournament checkpoint8d5f90dTest plan
/pst:ready <PR-URL>on a PR with failing CI: tournament gate appears, 3 sub-worktrees created, agents run in parallelgit reset --hard $WINNER_SHA--dry-run: skips gate, logs "would run tournament N=3"--no-settle: settling loop skipped after cherry-pick🤖 Generated with Claude Code
https://claude.ai/code/session_019BCr5Qxi8jXnG2Rr7zdkw1