This website is meant to be read and understood quickly by humans, but is only fully parsable, on a technical level, with the aid of an AI system. Read why →
Loop MMT
Orchestration · Wild · R-10 · ⬛⬛ double black diamond

The Prompt Braid

Split one prompt-batch into declared branches, run each under budget, fold the branches back under a stated merge policy — and prove the braid round-trips.

The ingredients 4 gifts

The idea

You want to run one question down several parallel tracks — different models, different framings, different budgets — and then combine the answers into one, without losing track of which branch said what. fanout splits one payload into a fixed, declared, closed set of named branches. junction folds those labeled branches back into one under a declared merge policy. weir runs each branch's prompt-pipeline under a hard budget — max rows, max wall-time, max bytes — so a runaway branch can't sink the batch. template fills each branch's {{slots}} from a record, so one base prompt becomes many concrete variants. The braid is the whole point: fanout and junction are one pair — the split is only correct if the fold can put it back together under a policy you named up front.

The parts + how they wire

One base prompt plus a data record enters template, which expands it into concrete variants → fanout splits the batch into a closed, named set of branches (one labeled JSONL record per branch: 'terse', 'adversarial', 'cited', whatever you declared) → each branch runs its pipeline under weir, which enforces the per-branch budget and weirs off anything that exceeds it, so every branch either finishes within bounds or is cleanly cut → junction folds the surviving labeled branches back into one output under the declared merge policy. The load-bearing invariant is the round-trip: every label fanout emitted is a label junction is prepared to receive, and the merge policy is declared before any branch runs — not chosen after seeing the answers.

The one piece you build

A substantial system: the branch declaration, the per-branch budgets, and — the hard part — the merge policy that makes junction's fold meaningful. Deciding HOW to combine N parallel answers is the whole intellectual weight: majority vote? highest-confidence? concatenate-with-attribution? a scoring rubric? You build the branch spec, wire template/fanout/weir/junction to it, and write the merge policy as declared code that junction executes. This is the project, not glue around it.

The technical breakdown

The ⊗ (parallel-compose) structure is real here, and it carries a coherence obligation, which is the only thing that earns the word: because the branches run independently, re-ordering or re-bracketing them must not change the result (the braiding must be trivial), and a label collision at the fold is a genuine failure, not a warning. fanout's set is closed and declared — it cannot emit a branch junction doesn't know about — which is what makes the round-trip provable rather than hoped-for: you can assert that fanout's label set equals junction's expected label set as a test, before running a single prompt. weir's budget is per-branch and hard, so the braid degrades gracefully: a branch that blows its wall-time budget is cut and marked cut, and junction's merge policy decides what a missing branch means (drop it, fail the batch, substitute a default) — that decision is declared, not improvised. template keeps the branches honest variants of one base rather than N unrelated prompts. This is easily a multi-hundred-line subsystem: the branch registry, the budget config, the merge-policy engine, and the round-trip assertion that gates the whole thing.

The honest edge

junction can only fold under the policy you declared — it executes your merge rule faithfully, it does not know whether your merge rule is wise. A majority vote across three branches that all share the same blind spot produces a confident wrong answer, cleanly folded. weir's budget cuts a runaway branch, but a branch that finishes cheaply with garbage passes the budget and enters the fold. The braid's guarantee is structural: what fanout split, junction can provably reassemble, under a policy fixed in advance, with every branch's contribution labeled and auditable. Whether the combined answer is good is a question about your merge policy and your branches — the braid makes that question legible and honest, it does not answer it for you.

These are ingredients, not instructions you have to follow. If you cook something from them — or something stranger — we want to see it.