parallel-chase-pr
Skill3 starsChanged 18 days agoApache-2.0View on GitHub
Three lanes, each a flame chase on its own branch and worktree, propose candidates; a candidate is merged into the integration branch only when a fresh evaluation shows it improves the score. No reviewer, the measurement decides. Run with /baton:parallel-chase-pr "<task>" --eval "<cmd>".
In this repository17 other files it gives its agents.
- author-flowSkill
- cleanup-flame-chaseSkill
- cleanup-ralphSkill
- continue-loopSkill
- fixed-interruptSkill
- flame-chaseSkill
- flowsSkill
- gen-ideaSkill
- gen-planSkill
- goalSkill
- parallel-chaseSkill
- protocolSkill
- ralph-loopSkill
- recursive-lean-proverSkill
- rlarSkill
- rlcrSkill
- stateful-ralphSkill
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 2 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 25
If --eval is missing, ask the user for it and stop.
- Distinctive: line 32
Every lane, including lane 1, gets its own worktree and branch:
- Distinctive: line 66
Evaluate: every proposal on a clean checkout, one after another, in one Bash call:
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
parallel-chase-pr
Arguments: $ARGUMENTS
Load the run protocol first (Skill tool → baton:protocol; if that fails, Read ${CLAUDE_PLUGIN_ROOT}/skills/protocol/SKILL.md) and follow it. This file only adds what is specific to parallel-chase-pr.
Idea
Like parallel-chase, but no lane writes the shared tree directly. Lanes propose; the integration branch takes a change only when a measurement on a clean checkout says it is better. Proposals are local merge candidates, not GitHub pull requests: nothing is pushed.
Flags
--eval "<cmd>"(required) and--goal max|min(defaultmax): same contract as fixed-interrupt (exit 0, number on the last line).--rounds N: default 4. It replaces--turns.--paths "<glob>,<glob>": optional. A candidate whose diff touches files outside these globs is rejected.--in-placeisn't supported.
If --eval is missing, ask the user for it and stop.
Setup additions
- The run branch
baton/<run-id>is the integration branch. The main checkout stays on it. - Pass the evaluator as the
eval:line ofstart(protocol), then score the integration branch on a clean checkout:eval <run_dir> integration-0 --sha HEAD. Store the score asintegration_score. - Coordinator (fresh,
baton:coordinator, worker model): header, TASK, evaluator and goal. ParseBATON-LANES. - Every lane, including lane 1, gets its own worktree and branch:
git worktree add -q .baton/runs/<run-id>/lanes/lane-<i> -b baton/<run-id>-lane-<i> - Each lane alternates chaser-a and chaser-b, starting with chaser-a.
Round
Spawn the current chaser of every active lane in one message:
BATON parallel-chase-pr · round <r>/<rounds> · lane <i> (<lane name>) · role <chaser> · run <run-id>
TASK:
<task, verbatim>
YOUR LANE'S APPROACH:
<approach>
STANCE (<stance name>):
<stance paragraph>
WORK ONLY INSIDE: <absolute lane directory>. cd there first.
INTEGRATION: branch baton/<run-id>, score <integration_score> (goal: <max|min>). Evaluator: `<eval>`.
<if the integration branch changed since this lane last merged it: "The integration branch moved. Start by running `git merge baton/<run-id>` in your lane and resolving any conflicts; this merge is the one git operation you may run.">
<if this lane's last candidate was rejected: "Your last candidate was rejected: <reason>.">
You start fresh; your lane's workspace is the only handoff. When your lane has a change you expect to beat the integration score, add "ready: yes" inside your BATON-REPORT. Only a measured improvement gets merged.After each round
- In one Bash call, run the protocol's
turnonce per lane, with label"r<r> lane-<i>"and-C <lane dir>. Log every merge and rejection tolog.mdtoo, one line each (evaluations log themselves). - Each lane that reported
ready: yesproposes its head commit. A newer proposal from the same lane replaces its older one. - Evaluate every proposal on a clean checkout, one after another, in one Bash call:
It checks the commit out in a temporary worktree, runssh "${CLAUDE_PLUGIN_ROOT}/scripts/baton.sh" eval <run_dir> lane-<i>-<sha7> --sha <sha> --beat <integration_score> --goal <goal>eval.shthere, removes the worktree, and writes the receiptreceipts/lane-<i>-<sha7>.json(commit, score, exit code, the evaluator's and the log's sha256, time). - Reject a proposal if its evaluation was rejected, if it touches paths outside
--paths(git diff --name-only baton/<run-id>...<sha>), or if it doesn't beatintegration_score(beats ...: no). - Take the single best remaining proposal and merge it into the integration branch:
git merge --no-ff -q -m "baton(parallel-chase-pr): merge lane-<i> <sha7> (<score>)" <sha>. If the merge conflicts, rungit merge --abortand reject it as "conflicts with integration". - Evaluate the merged integration head the same way (
eval <run_dir> integration-<r> --sha HEAD --beat <integration_score> --goal <goal>). If it doesn't beat the old score, undo the merge withgit reset -q --hard HEAD~1and reject the proposal. Otherwise updateintegration_score. - At most one merge per round. Rejected and unmerged lanes hear why in their next prompt.
- A lane whose two turns in a row failed is held.
Stop
--roundsor--minutesused up, or every lane is held.
Final report additions
Each merge with its lane, commit and score, the integration score from start to end, the rejected proposals with reasons, and the lane branches. Remove the lane worktrees with git worktree remove <dir> and keep their branches.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

