tribunal · diff
git:20260831.84892c0 to git:20260914.5e8ef0f
59 added, 64 removed. Audit A to A.
---
name: tribunal
- description: 'Runs multi-vendor ensemble workflows across whichever AI vendors the user has installed or configured, always DISCOVERED via ptah_agent_list and never hardcoded, treating disagreement and cross-vendor review as the signal rather than noise. Offers five moves — Council, Forge, Race, Relay, and Crucible — for deliberation, competing implementations in isolated worktrees, judged attempts, phased pipelines run on vendor lanes, and a cheap-executor/strong-judge revise loop. TRIGGER on: "tribunal", "convene a council", "council of models", "forge", "race the models", "relay", "crucible", "judge and mentor", "executor and judge", "X plans, Y implements, Z reviews", "second opinion", "multi-vendor", "ensemble", "panel of models", "cross-vendor review", "which vendor does this best". Distinct from the orchestration skill, the hierarchical default dev workflow where CLI agents are junior labor; this is a peer panel where vendor diversity is the product. Needs installed CLI vendors.'
+ description: 'Multi-vendor peer panel (Council, Forge, Race, Crucible) across installed CLI vendors. Use for second opinions, cross-vendor review, model debates, competing implementations or judged attempts, and Tribunal UI launches. Not the default build workflow — use orchestration.'
---
- # Tribunal Skill
-
- Convene **multiple AI vendors**, make them deliberate, compete, or grade each other, and render a single cited verdict. **You are the Conductor** — an arbiter who synthesizes and gates, never a boss who hands out grunt work.
-
- Four of the five moves are a flat **panel of peers**. The fifth, Crucible, is deliberately **unequal**: a cheap executor lane and a strong judge lane from a different family, looping until the work clears a frozen rubric.
-
- ## What this is — and what it is NOT
-
- | | `tribunal` (this skill) | `orchestration` (the other one) |
- | ------------------- | ------------------------------------------------------------------------------------------------------------------------------ | ----------------------------------------- |
- | Topology | Flat **panel of peers** (Crucible: an unequal executor/judge pair) | Hierarchy (you → team-leader → juniors) |
- | Why multiple agents | **Diversity is the signal** — disagreement surfaces blind spots (Crucible: independence — a judge that did not write the code) | Throughput — parallel grunt work |
- | Vendor selection | Deliberate **max spread**, one per family (Crucible/Relay: by **role fit**, and the user may pin lanes) | By task fit, from discovery |
- | Vendor output | First-class evidence; cite it, don't overwrite | Junior labor; review then absorb |
- | Use it for | Second opinions, debates, cross-vendor code review, "which model does this best" | Default dev workflow (features, bugfixes) |
+ # Tribunal
- **Do NOT use Tribunal as the default development workflow.** For ordinary "implement X / fix Y" work, use `orchestration`. Tribunal triggers only on its own phrases (council / forge / race / relay / crucible / second opinion / multi-vendor / ensemble).
+ Convene **multiple AI vendors**, make them deliberate, compete, or grade each other, and render one
+ cited verdict. **You are the Conductor** — an arbiter who synthesizes and gates, never a boss who
+ hands out grunt work.
- ## Preflight: discover the panel (ALWAYS run first)
+ | | `tribunal` | `orchestration` |
+ | ------------------- | ------------------------------------------------------------------- | ----------------------------------------------- |
+ | Topology | Flat panel of peers (Crucible: an unequal executor/judge pair) | Hierarchy; phases on subagents or CLI lanes |
+ | Why several agents | **Diversity is the signal** (Crucible: independence of the judge) | Throughput and specialization |
+ | Vendor selection | Max family spread (Crucible: by role fit; the user may pin lanes) | By task fit, or the user's roster |
+ | Vendor output | First-class evidence; cite it, don't overwrite | Work product; verify, then absorb |
+ | Use it for | Second opinions, debates, competing implementations, judged loops | Default dev work, including all-CLI pipelines |
- **First check for an explicit panel.** If the prompt already lists panelists as `[tribunal:<laneId>] … ptah_agent_spawn({ … })` lines, the user assembled the panel in the Tribunal UI — skip discovery and spawn those lanes verbatim (including duplicate vendors and per-lane `model` overrides) per [references/vendor-panel.md §0](references/vendor-panel.md). Otherwise build the panel by discovery:
+ Do not use Tribunal as the default development workflow.
- 1. Call `ptah_agent_list`.
- 2. Build the panel per [references/vendor-panel.md](references/vendor-panel.md) — one panelist per vendor **family**, where a family is each installed system CLI (its `cli` value) or each configured ptah-cli entry (its `providerName`). Take the families from the response; keep only entries reporting installed/available. Never filter against a vendor list written in these docs — new adapters and newly configured providers must join with no edit here.
- 3. **Announce the chosen panel to the user before spending any vendor calls** (each spawn is a real, paid call).
- 4. If fewer than **2** distinct families are available, say so and offer to proceed single-voice or stop. A tribunal of one is not a tribunal.
+ ## Preflight (always first)
- ## The five moves
+ 1. **Explicit panel?** If the prompt lists `[tribunal:<laneId>] … ptah_agent_spawn({ … })` lines, the
+ user built the panel in the Tribunal UI: spawn those lanes verbatim
+ ([vendor-panel.md §0](references/vendor-panel.md#0-explicit-panel-from-the-tribunal-ui)).
+ 2. **Otherwise discover** and build the panel by family spread
+ ([vendor-panel.md §1–2](references/vendor-panel.md#1-panelists-and-families)).
+ 3. **Announce** the panel, rounds and call count before spending.
+ 4. **Fewer than 2 families** → say so; offer single-voice or stop. A tribunal of one is not a tribunal.
- ### Council — deliberate (no code) · available now
+ ## The four moves
- Fan one question to the whole panel, run an **anonymized cross-critique** round, then synthesize a **cited verdict**: consensus, live disagreements, and a recommendation. Use for design decisions, research, "is this approach sound?", and second opinions.
+ **Council — deliberate, no code.** One question to the whole panel, an anonymized cross-critique
+ round, a cited verdict with consensus, live disagreements and a recommendation.
→ [references/council.md](references/council.md)
- ### Forge — build & cross-review · available now
-
- Give each panelist its **own git worktree**, have them all implement the same task, run **round-robin cross-vendor review** of each other's diffs, then judge and **merge the winner** (never auto-merge to `main`). Use when you want the best implementation of a well-specified change.
+ **Forge — build and cross-review.** Every panelist implements the same task in its own worktree,
+ round-robin cross-vendor review of the diffs, judge, merge the winner after the user sees it.
→ [references/forge.md](references/forge.md)
- ### Race — compete & verify · available now
-
- N attempts at one change, scored on a **fixed rubric**, with the top attempt **verified (tests/`/verify`) before any commit**. Losers are never committed. Use for high-stakes single changes.
+ **Race — compete and verify.** N attempts at one change, scored on a rubric fixed up front; the top
+ attempt is verified before anything is committed; losers never are.
→ [references/race.md](references/race.md)
- ### Relay — orchestrate one task across CLI lanes (no subagents) · available now
-
- Run a **single task** through a phased pipeline — plan → architect → implement → review — with each phase executed by a **CLI vendor lane** instead of a `Task`-tool subagent. The Conductor is the sole spawner; each phase's output is persisted to `.ptah/specs/TASK_[ID]/`. Unlike the moves above, lanes get **different** prompts (one per phase) and run **sequentially**, with the cross-vendor review phase as the tribunal signal. The **roster is pinnable** — the user can name a lane per phase ("codex plans, Claude architects, Ollama GLM implements, codex on another model judges"), including the same family twice on different models; honor it verbatim rather than re-picking by family spread. Reach for it when you want orchestration's structured, auditable delivery but want the work done by external vendors.
- → [references/relay.md](references/relay.md)
-
- ### Crucible — cheap executor, strong judge, bounded revise loop · available now
-
- A deliberately **unequal pair**: a cheap, fast **executor** lane writes the code; a stronger **judge** lane from a **different vendor family** scores it against a rubric frozen before the first spawn, and returns numbered defects (each citing `file:line`) plus a **mentor note** naming the pattern behind them. The executor revises; the loop repeats until `PASS`, a regression stop, or **2 revise rounds** — a 3rd only if the user asks, never a 4th. The judge never edits code, and its `PASS` is confirmed by the build before anything is presented. Use it when the quality bar can be written down in advance and you want strong-model quality at cheap-model cost.
+ **Crucible — cheap executor, strong judge.** A cheap lane writes the code; a stronger lane from a
+ different family scores it against a rubric frozen before the first spawn and returns `file:line`
+ defects plus a mentor note; the executor revises until `PASS`, a regression stop, or the round cap.
→ [references/crucible.md](references/crucible.md)
- ## The shared spine
-
- All five moves stand on the same discover → fan-out → poll → read → (cross-examine) → synthesize loop, plus the deterministic anonymization scheme. Read it once: [references/vendor-panel.md](references/vendor-panel.md).
-
- ## Your role (the Conductor)
+ **Relay** is no longer a tribunal move: running plan → architect → implement → review on CLI lanes is
+ orchestration with every phase assigned to a lane. A Relay launch from the Tribunal UI →
+ [references/relay.md](references/relay.md).
- - **Peer arbiter, not author.** Read every panelist's output as evidence. Cite who said what. Never silently overwrite a vendor's answer with your own.
- - **In Crucible you also own the bar.** You write the rubric before the first spawn, freeze it, drop unevidenced defects, enforce the round cap, and verify a `PASS` against the build.
- - **Anonymize during critique** so the round is about content, not brand (P1..Pn / Answer A..N).
- - **Fan out judging** with the `Agent`/`Task` tool when the panel is large (≥4) or the rubric is multi-criterion; sequential is fine and cheaper for ≤3.
+ ## The Conductor
- ## Concurrency & cost discipline
+ - **Peer arbiter, not author.** Cite who said what. Never silently overwrite a vendor's answer; if you
+ disagree with the whole panel, say so and why.
+ - **Anonymize during critique** so the round is about content, not brand
+ ([vendor-panel.md §3](references/vendor-panel.md#3-anonymization)).
+ - **In Crucible you own the bar**: write and freeze the rubric, drop unevidenced defects, enforce the
+ cap, confirm `PASS` with the build.
+ - **Fan out judging** with the `Agent`/`Task` tool for large panels (≥4) or multi-criterion rubrics.
- - Default **3 concurrent** spawns in flight. Council (no worktrees) may widen with the user's say-so; Forge/Race stay tight. Crucible is **sequential round over round** — the judge cannot score work that is still being written — though a single round's executors may fan out (see Crucible-fanned), which needs the same announce-before-widening treatment.
- - Every spawn — and every critique/review round — is a **real paid vendor call**. Panel size × rounds multiplies cost. Announce the panel and the number of rounds before spending. Crucible costs **2 calls per round**; announce the round cap up front and stop at it.
+ Lane mechanics — spawning, polling, resume, concurrency, messaging, cost — are the
+ [agent-lanes skill](../agent-lanes/SKILL.md). Tribunal adds only: Council may widen past the default
+ concurrency with the user's consent (no worktrees); Forge and Race stay at the default; Crucible runs
+ rounds sequentially.
- ## Runtime note
+ The panel forms only where CLI vendors are installed. With none, Tribunal degrades to a single-voice
+ answer and says so.
- The skill ships everywhere, but the panel only forms where CLI vendors are installed — realistically **Electron + the Ptah CLI**. On a VS Code box with no vendors, Tribunal degrades to a single-voice message rather than a panel.
+ ## References
- ## Reference index
+ | Reference | Load when |
+ | --- | --- |
+ | [vendor-panel.md](references/vendor-panel.md) | Every move |
+ | [council.md](references/council.md) · [forge.md](references/forge.md) · [race.md](references/race.md) · [crucible.md](references/crucible.md) | Running that move |
+ | [relay.md](references/relay.md) | A Relay launch from the Tribunal UI |
- | Reference | Load when | Status |
- | -------------------------------------------------------- | -------------------- | --------- |
- | [references/vendor-panel.md](references/vendor-panel.md) | Any move (the spine) | Available |
- | [references/council.md](references/council.md) | Running a Council | Available |
- | [references/forge.md](references/forge.md) | Running a Forge | Available |
- | [references/race.md](references/race.md) | Running a Race | Available |
- | [references/relay.md](references/relay.md) | Running a Relay | Available |
- | [references/crucible.md](references/crucible.md) | Running a Crucible | Available |
+ ## Requires
- **Loading protocol:** this SKILL.md loads on trigger; load `vendor-panel.md` for every move; load the per-move reference on demand. Never preload all references.
+ - `agent-lanes` — every move. If it is not installed, tell the user to enable the `agent-lanes`
+ skill; do not improvise lane rules.
+ - `orchestration` — Relay launches, and the task-folder rules Crucible writes into. If it is not
+ installed, say which skill to enable before running either.