dispatch
Skill3 starsChanged 19 days agoApache-2.0View on GitHub
Orchestrate verified worker loops with `pillbox dispatch` — fork-k best-of-k diversity and/or in-session segment chains, selected by an execution-grounded reward. Use when deciding whether to delegate a task to forked workers vs work inline, how to author a segment spec, and how to read a verdict without drowning in transcripts. Libkrun-only.
40 other projects use a version of this.
Adopted by
Most recently taken up by
- renzrollon/interlocktheir own version, first seen Nov 5, 2026
- dan-myles/skillstheir own version, first seen Nov 1, 2026
- bestony/skillstheir own version, first seen Nov 1, 2026
- AcKeskin/contexturetheir own version, first seen Nov 1, 2026
- mhlaghari/stuntmantheir own version, first seen Nov 1, 2026
- noahowsh/birdieapi-mcptheir own version, first seen Oct 25, 2026
Used with
Projects with it also use edge-detection, odds-analysis and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
noahowshSkilledge-detection
Comparing a tennis model's probability with the market: no-vig close, expected value at the best available price, closing line value, fractional Kelly sizing, and the checks that separate an estimated edge from noise. Use when the user has a probability and wants to know whether a price is better than fair, how large a stake is reasonable, or whether an edge is real. Requires a probability the user trusts. Do not use for fetching prices: see odds-explorer. Do not use for devig math alone: see odds-analysis. Do not use for historical testing: see backtesting.
Also in 4 projects that use this
noahowshSkillodds-analysis
Odds math for two-way tennis markets: American to implied probability, margin, devigging (multiplicative, power, Shin), no-vig fair odds, consensus across books, favorite-longshot bias, and expected value of a price. Use when the user asks what a price implies, how to remove the vig, what the true probability is, or how to compare books. Do not use for fetching or comparing live prices: see odds-explorer. Do not use for deciding a bet against a model: see edge-detection.
Also in 4 projects that use this
agiprolabsSkillwalk-forward-validation
Walk-forward validation framework for trading strategies and ML models with time-series-aware splits, overfit detection, and regime-aware validation
Also in 4 projects that use this
Yahmez3Skillbacktesting
Use when backtesting a trading strategy — evaluating a signal series against historical price data and computing performance metrics (Sharpe, Sortino, max drawdown, CAGR, win rate, expectancy). Triggers on "backtest this strategy", "what's the Sharpe on X", "run a walk-forward test", or "compare strategies A and B". Produces equity curves, trade logs, and tear sheets.
Also in 4 projects that use this
ffsshhttiikkSkillfeature-engineering
Machine learning feature engineering
Also in 4 projects that use this
varun29ankuSSkillorchestrate
This skill should be used when the user asks to 'orchestrate a task', 'break down work into parallel agents', 'coordinate subtasks', 'run agents in parallel', or mentions 'multi-agent'. Decomposes complex tasks into tracked subtasks, dispatches parallel subagents, and coordinates until completion.
Also in 4 projects that use this
- +3 more from noahowsh
Other versions40 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 40
- your-papa/obsidian-Smart2Brain★ 1.3ksame name
- s2b-dev/smart-second-brain★ 1.3ksame name
- bassimeledath/dispatch★ 411same name
- renzrollon/interlock★ 61same name
- fagemx/edda★ 36same name
- phj128/autoworker★ 18same name
- clonable-eden/cekernel★ 17same name
- mhlaghari/stuntman★ 16same name
- YippeeXuXu/dsh-collab-mode★ 5same name
- BigY0shi/super-skills★ 4same name
30 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
The file
We split this skill into the rules it gives an agent
5 rules. 0 are common, 1 is distinctive, and 4 are very specific to this project.
0
Common
Most of the 38 edited versions we read keep these.
1
Distinctive
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 55
Default mental model: if the task decomposes, segment it.
- Very specific: line 120
--restate-task: when retries or later segments drift off the task — off by default, a retry carries only the failure summary and only … - Very specific: line 132
Run with --json and read the envelope (full schema in docs/dispatch.md):
- Very specific: line 150
Read winner + per-worker score/status/segments — the trajectory stays in each worker's §0 log so your context doesn't drown in fan-out.
- Very specific: line 171
Don't session rm a loser before you've read its evidence — rm removes the record, which orphans its log from the read surface.
“Common” is measured: kept by at least 6 in 10 of the 38 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Dispatching verified worker loops
You are the interactive seat (a chat orchestrator). pillbox dispatch is your
delegation primitive: it forks detached worker sessions from a snapshot bookmark,
drives each to idle, grades each with an execution-grounded reward, retries the
ones that fail, then selects the highest-scoring worker and pulls its result
workspace. You consume the verdict (winner + per-segment outcomes), not the
transcripts. Contract: docs/dispatch.md — program against that, never invent flags.
Libkrun-only today (PILLBOX_BACKEND=libkrun). On any other backend dispatch is
not wired — do the work inline instead.
When to dispatch vs work inline
Dispatch when all hold:
- The task is verifiable — you can write a command or rubric that passes/fails it objectively (tests green, a build clean, a script exits 0, an invariant holds). A task with no machine-checkable success signal has no reward → don't dispatch it.
- The work is self-contained in a workspace you can snapshot to a bookmark.
- Either variance/luck matters (fork-k), or the task has a real sequential decomposition (segments), or both.
Work inline when the task is exploratory, conversational, needs your judgment in the loop, or has no objective grader. Dispatch is for closing a well-posed unit of work, not for thinking out loud.
The two axes (the load-bearing distinction)
Dispatch has two orthogonal levers. They are not the same thing; keep them straight.
| Axis | Flag | What it buys | Use when |
| diversity (best-of-k) | -k N + --temperature F | k independent attempts at one prompt, select the best | one horizon, but variance/luck matters — pick the lucky run |
| segmentation | --segments SPEC | drive focused, checkpoint-gated sub-prompts sequentially in ONE session | the task has a genuine sequential decomposition |
- fork-k is diversity, not decomposition.
kworkers each attempt the whole task; you keep the best. With identical deterministic workers allkscore the same and best-of-k buys nothing — so pair-kwith--temperature(e.g.0.7) to make the attempts diverge. --segmentsis the proven variance-cutter + mean-lifter (the σ̂ experiments). Context accumulates across segments; the horizon never resets. This is NOT fork-per-segment — it is one session walking a checkpoint-gated chain. If a task naturally splits into "do A, verify A, then do B, verify B," segment it.- They compose.
--segments -k NrunsNindependent segmented chains and selects the best chain by the final reward — best-of-k over decomposed work. Reach for this when a decomposed task also has run-to-run variance.
Default mental model: if the task decomposes, segment it; if it's one horizon with luck variance, fork it; if both, compose.
The Goodhart line (do not conflate gate and reward)
There are two distinct grading channels — keep them separate or the loop games itself:
- Per-segment gate (
gate_rubric/gate_cmdin the spec) — only steers progression within a chain and feeds distilled retry feedback. A failed gate does not abort the chain; it advances. The gate is a checkpoint, not the verdict. - Run-level reward (
--rubric/--cmdon the dispatch command) — the authoritative, forge-resistant selector. This picks the winner. It is required in every mode, including--segments.
Reward = session score (execution-grounded), never self-report. An agent saying
"done" is not a pass. Never let a gate substitute for the reward, and never let the
reward be a model's opinion of its own work where a real verifier exists.
Authoring a segment spec
The spec is TOML — an ordered list of [[segment]], each a focused sub-prompt and a
gate. See rubrics/example-segments.toml for the canonical copy-me example.
[[segment]]
name = "reroot"
prompt_file = "segments/01-reroot.txt" # xor: prompt = "..."
gate_rubric = "segments/01-reroot.rubric" # xor: gate_cmd = "python3 -m pytest -k reroot"
[[segment]]
name = "pathfind"
prompt = "Implement Tree.path_to(from, to) so it returns the node list."
gate_cmd = "python3 -m pytest -k path"Rules (from the contract):
- Each segment needs
promptxorprompt_file, andgate_rubricxorgate_cmd. Unknown keys are a parse error. - Relative paths resolve against the spec file's directory — keep prompt/rubric files next to the spec.
- Gates run on a protected copy, in the grader microVM — the worker's workspace
with tests, test config, CI and rubrics reset to the bookmark (docs/dispatch.md,
Grading). A test the worker writes under
tests/is removed first, so check tests that exist on the bookmark or come from--grader-files DIR(run as.pillbox-grader/…). Write each gate to test only what this segment produced, so a checkpoint fails for the right reason. - The grader VM is the runner image — no Rust toolchain, no pytest. A missing
tool makes the worker
errored, notfailed; layer the toolchain into an image builtFROMthe runner and setPILLBOX_RUNNER_IMAGE. - Segments are ordered and cumulative — segment N may rely on N-1's output. Order them so each gate is checkable the moment that segment finishes.
Sensible defaults
-k 3for short horizons (k=3–5 saturates; diversity gains flatten beyond).-k 1= pure segmentation with no diversity. Pass it explicitly: the CLI default is-k 3.--retries 1(the default) — one distilled retry per failing gate. Raise only for flaky/hard checkpoints; it costs a full re-drive each. With a--rubricgrade,--stall-limit 2(the default) stops a worker after two retries in a row that don't raise its score, so a raised budget isn't spent on a worker going in circles. Astalled: trueworker is a signal to re-plan or escalate, not to retry.--baseline-checkwhenever you wrote the reward yourself — it grades the untouched bookmark first and refuses (exit 2) a reward that already passes there, which would otherwise pick a worker that did nothing.--restate-taskwhen retries or later segments drift off the task — off by default, a retry carries only the failure summary and only segment 1 sees the positional task; on, each of those turns repeats it verbatim in an<original-task>block (the tag gains-Nif the task already contains that markup). It only changes prompts for server agents (opencode,codex-serve); agents with no server profile never take a retry turn.--temperature 0.7whenever-k > 1— without it the forks are degenerate.- Reward is always required — give exactly one of
--cmd/--rubric(a missing or doubled grader is a usage error, exit 2).
Consume the verdict, not the transcripts
Run with --json and read the envelope (full schema in docs/dispatch.md):
pillbox dispatch --from-bookmark base --segments spec.toml -k 3 --temperature 0.7 \
--rubric rubrics/rust-change.rubric --agent opencode --json \
-- "Refactor the parser into staged passes."{ "version": 1, "dispatch": {
"winner": "abc123…", // selected worker, or null if none passed
"workers": [ { "session": "abc123…", "score": 1.0, "passed": true,
"retries_used": 1, "status": "scored",
"segments": [ {"name":"reroot","passed":true,"score":1.0} ] } ],
"pulled_to": "/path/to/session-abc123…", // winner workspace; check this, not just exit code
"selection_rationale": "only passing worker (score 1.00)" } }- Read winner + per-worker
score/status/segments— the trajectory stays in each worker's §0 log so your context doesn't drown in fan-out. - Check
pulled_to, not just the exit code: exit0reports the winner even if its pull failed (thenpulled_tois null; recover withpillbox session pull). - Exit codes:
0= a winner was selected and pulled;1= no winner (read per-workerstatusto tell all-failedfrom all-errored);2= usage error. - Need why a worker passed/failed? Each worker writes a
dispatch.worker_summary§0 artifact on its own log:pillbox session log <worker-id> --type artifact→pillbox session artifact get <worker-id> --ref <blobRef>.
Cleanup (workers are left running)
dispatch does not auto-kill workers — the winner and every loser stay live so their §0 evidence stays readable. Reap them yourself:
- One-off: inspect losers, then
pillbox session rm <id>each when done. - Campaign: pass
--ttl 24h(30m/24h/7d) so every worker gets anexpires_at, thenpillbox session prune(cron/orchestrator) reaps the expired ones — evidence-safe until prune.
Don't session rm a loser before you've read its evidence — rm removes the record,
which orphans its log from the read surface.
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.

