autometta-run-design
Skill0 starsChanged 6 months agoMITView on GitHub
Design an Autometta run before anything is queued: decompose the work into stage cards, set pairings and gates, size the spend, and declare the parallelism plan. Use when the operator asks to "design a run", "plan the batch", "queue up a batch", or hands over a set of goals to turn into cards. This is the planning half; queueing and minding the live queue belong to add-stage.sh and the phat-controller skill.
In this repository11 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- agent-orchestratorSkill
- autometta-card-reviewSkill
- autometta-escalationsSkill
- autometta-learning-logSkill
- autometta-oracleSkill
- autometta-requeueSkill
- autometta-setupSkill
- autometta-weekly-reviewSkill
- phat-controllerSkill
- yoloSkill
The file
We split this skill into the rules it gives an agent
7 rules. About 0 are common, 4 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 21
Before writing a criterion, name the seat that will judge it and the command that produces its evidence (lessons gotcha 16).
- Distinctive: line 28
If a card in the batch improves the loop's own visibility, it goes ahead of every card it would have observed.
- Distinctive: line 93
If N fails, nothing landed and dev never moved: N+1 lands by plain fast-forward.
- Distinctive: line 95
If N passes, N+1 is rebased onto the new dev only if the two diffs are file-disjoint (a mechanical rebase, no judgement).
- Very specific: line 133
Before queue review, run scripts/readiness-headroom.sh REPO CARD BATCH RETRY for each card against the same batch and retry estimates.
- Very specific: line 137
Use nonnegative integer tokens with the same accounting basis as recorded window spend in state/budget.json.
- Very specific: line 158
Default to three total worker attempts per stage, recorded as Recovery attempts: 3.
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 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
Designing a run
A run is designed once, before the first card is queued. Everything below is decided here and written down (in the cards and in the queue order), so the tick and the controller execute a plan rather than improvising one.
1. Decompose into cards
One observable outcome per card, in the shape of templates/stage-card.md.
Before writing a criterion, name the seat that will judge it and the command
that produces its evidence (lessons gotcha 16). Never let a smoke supply the
value it is testing.
Instrumentation and alarm cards dispatch first. The 2026-08-25 run queued the outlier alarm behind the heavy refactor it should have been watching, and a 76.5M-token dispatch ran unremarked (run-lessons entry 18). If a card in the batch improves the loop's own visibility, it goes ahead of every card it would have observed.
2. Pairing
Cross-family per stage: worker in one family, verifier in the other, per the load-bearing belief. Additionally, alternate the worker family across adjacent stages. Alternation means a stage's worker and the previous stage's verifier draw on different provider windows, which is what makes the pipeline overlap class (section 4) safe against quota contention.
Route the open-ended brief to the stronger tier and the mechanical sweep to the cheaper one; record the reasoning in the card's pairing rationale.
Effort tops out at high unless the operator asks for more. Set
xhigh or max only when the operator has asked for it on this card, and
quote the request on a - **Effort approved:** metadata line;
card-lint --strict refuses xhigh or max without one. Default worker effort is high
for a fresh design or an open-ended brief, medium for a re-brief or
narrow fix, and low or omitted for a mechanical sweep. Verifiers default
to high. Effort multiplies thinking tokens on every turn of a long run,
and it does not buy consistency: explainer-batch's design card 16 failed
three times at Fable xhigh on narrow contradictions the cross-family
verifier caught. A card that failed for lack of reasoning depth, not for
inconsistency, is the case to raise effort, and only with the operator's
yes.
Place Fable and Astra by role, not by price. They are the right worker
for high-complexity work and UI work, where they land in fewer attempts
and so cost fewer tokens overall; choose them there without hesitation. They
cost most in a role that does not need them, above all as verifier:
checking criteria is a reading task, and a cheaper cross-family verifier
gets there sooner. card-lint prints a frontier-tier NOTE (never an
error) for either pin; answer it in the pairing rationale by saying why the
role needs the tier.
3. Gates
Draw the dependency DAG before ordering the list. Any stage that reads what
another stage writes carries - **Gate:** stage-completed: <full-stage-id>.
Express no gate by omitting the line (none is refused at queue time).
Cleanup and migration cards that need a quiet tree gate on queue-empty.
4. The parallelism plan
Declared here, per adjacent pair of stages, and only ever these classes:
serial(declared with- **Dispatch:** serial; there is no default,add-stage.shrefuses a card that carries neither this line norPath claims): worker N+1 dispatches after stage N lands. Correct whenever the pair shares files, either stage touchestick.shorscripts/lib/, or either card's scope is open-ended.pipeline: worker N+1 may dispatch while verifier N is still running. Permitted only when ALL of:- Both cards carry path claims (the paths the stage may modify) and the claims are disjoint.
- Worker families alternate across the pair (section 2), so the overlap draws on two provider windows, not one.
- Remaining budget headroom covers two large dispatches (p95 of
state/cost-log.jsonlfor this repo, not the median), because the cap bounds new work, not spend.
Landing policy for a pipeline pair, written into both cards:
- Strict queue order: N lands first, always.
- If N fails, nothing landed and dev never moved: N+1 lands by plain fast-forward. The conflict case is the success case.
- If N passes, N+1 is rebased onto the new dev only if the two diffs are file-disjoint (a mechanical rebase, no judgement). Any conflict aborts to a controller escalation; headless conflict resolution stays on the forbidden list.
- A FAIL in an overlapped pair drops only that pair to
serial: the tail lands by plain fast-forward, and the next eligible pair may overlap again (card 113).
Mechanical status. The bounded pipeline mechanism exists. Queue insertion
parses each card's Path claims: line, and the tick may overlap worker N+1
with verifier N only after checking claims, alternating families and two-p95
budget headroom. Landing remains ordered and actual-diff checked; a failure
drops only the affected pair to serial. A card without claims must declare
Dispatch: serial itself; queue insertion refuses one that declares neither. Cross-repo parallelism remains
independent: two subscribers with fed queues can run concurrently under one
drain.
5. Spend plan
Estimate the batch from state/cost-log.jsonl (median per role, and the
p95 for the headroom rule). If the operator authorises a drain, size its
total cap to cover recorded window spend plus the estimate and one outlier,
and set its expiry inside the current UTC window: a drain that
spans the boundary converts the self-healing daily reset into a 24-hour
halt (run-lessons entry, 2026-08-25 morning). A re-brief is not a discount;
budget attempt 2 at attempt 1's scale unless the re-brief only corrects
details on a preserved tree.
Preparation is part of this spend plan, not free orchestration overhead.
Record its allowance and actual usage separately from worker/verifier estimates,
including cache reads, reference experiments and review sessions. Use the
checkpoint and bounded-attempt rules in autometta-card-review; changing seats
or restarting a chat does not replenish that allowance. Prefer the smallest
useful preflight that makes one bounded attempt actionable. Preserve independent
verification and final acceptance instead of paying for a full implementation
in a preparation session. Explain material differences between dashboard
predictions and historical estimates before using them for the cost comparison.
Before queue review, run scripts/readiness-headroom.sh REPO CARD BATCH RETRY
for each card against the same batch and retry estimates. CARD estimates one
worker/verifier attempt. BATCH includes CARD and all planned first attempts;
RETRY is additional estimated retry demand, not a replacement for BATCH.
Use nonnegative integer tokens with the same accounting basis as recorded
window spend in state/budget.json. Estimates and retry allowance are planning
inputs; recorded spend is observed usage, not another estimate.
Report the effective cap, recorded spend, remaining headroom and card, batch and batch-plus-retry shortfalls to the operator before queue review. The helper resolves an active scoped drain, repo cap, host default and floor in that order, without changing any of them, even for an expired drain. Unknown spend or invalid inputs exit nonzero and leave readiness unresolved. A valid shortfall exits zero as information; it does not authorise dispatch or raising caps. Only the operator can authorise cap changes or opening a drain; otherwise reduce the proposed plan.
Worked example: with a 650,000-token cap and 100,000 recorded tokens spent,
scripts/readiness-headroom.sh REPO 700000 900000 400000 compares a 700,000
card estimate, a 900,000 batch estimate including that card and a 400,000 retry
allowance against 550,000 headroom. Report shortfalls of 150,000 for the card,
350,000 for the batch and 750,000 for the batch plus retries before queue review.
The report leaves the cap and recorded spend untouched.
Recovery planning
Default to three total worker attempts per stage, recorded as
Recovery attempts: 3; honour explicit operator overrides. Estimate one
attempt separately from retry headroom: the allowance is not a promise that
all three fit, and existing budgets remain binding. The escalation chat
diagnoses and repairs each failure through the standard recovery policy;
no automatic blind rerun or new model polling loop is created.
6. Hand over
Queue the cards with add-stage.sh in gate order, confirm the ticker's
NEXT section shows the intended order, and hand the queue to the tick and
the operator's escalation chat. The design session's remaining job is feedback, re-briefs
and landing-boundary commits, not driving dispatches by hand.
Where the harness got in the way of the design (a gate it cannot express, a
spend basis the caps cannot hold, a pairing a script refuses), record it with
autometta-learning-log before handing over.
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.

