try_all
Run several distinct strategies for the same coding task in parallel sandboxes, then return tested diffs and benchmark rankings to identify and apply the best-performing approach.
Instructions
Run several genuinely different strategies for the same task, each in its own forked machine (real repo + uncommitted edits + seeded DB + running services), all at once, and return the finished outcome of each: diff, test result, wall-clock, cost.
Call this instead of picking one approach yourself whenever a task has more than one plausible strategy (e.g. a perf fix: add-index vs cache vs query-rewrite). Pass 2-8 approaches, each a short strategy label + one sentence of instruction.
If benchmark_cmd is given, it runs in each fork after the tests pass and should
print a line SUPERPOSE_METRIC=<number> (lower is better, e.g. p95 latency in ms).
The winner is then chosen by the best measured metric — so you pick the approach that
is actually fastest, not just one that happens to pass. Land it with apply_winner.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"task": "<task>",
"approaches": "<approaches>",
"repo_path": "<repo_path>"
},
"name": "try_all"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| task | Yes | ||
| test_cmd | No | pytest -q | |
| repo_path | Yes | ||
| approaches | Yes | ||
| benchmark_cmd | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||