- Parameters: flow (parallel/sequential/debate), rounds (1-5), tier (light/medium/heavy)
- Round-specific prompt templates: opening, rebuttal, final position
- Multi-round referee template tracks position evolution across rounds
- Word count guidance decreases per round to control token cost
- Subagent labeling convention: council-r{round}-{role}
- Updated from live testing with 1-round and 3-round parallel debates
74 lines
3.4 KiB
Bash
74 lines
3.4 KiB
Bash
#!/usr/bin/env bash
|
|
# council.sh — Reference implementation for council orchestration.
|
|
#
|
|
# This script is NOT executed directly. It documents the orchestration
|
|
# logic the main agent follows when invoking the council skill.
|
|
#
|
|
# See references/prompts.md for all prompt templates.
|
|
#
|
|
# ─── PARAMETERS ────────────────────────────────────────────────────
|
|
#
|
|
# flow: parallel (default) | sequential | debate
|
|
# rounds: 1 (default) | 2-5
|
|
# tier: light (default) | medium | heavy
|
|
#
|
|
# ─── PARALLEL FLOW ─────────────────────────────────────────────────
|
|
#
|
|
# Single round (rounds=1):
|
|
# 1. Spawn 3 advisors in parallel (sessions_spawn, mode=run)
|
|
# 2. Collect all 3 outputs (push-based completion)
|
|
# 3. Spawn referee with all outputs
|
|
# 4. Deliver to user
|
|
#
|
|
# Multi-round (rounds=N):
|
|
# 1. ROUND 1: Spawn 3 advisors in parallel (opening position prompt)
|
|
# 2. Collect outputs
|
|
# 3. ROUND 2..N-1: Respawn all 3 in parallel (rebuttal prompt)
|
|
# - Each gets: own prior output + all other advisors' prior output
|
|
# 4. Collect outputs each round
|
|
# 5. ROUND N: Respawn all 3 in parallel (final position prompt)
|
|
# - Each gets: full debate transcript summary
|
|
# 6. Collect final outputs
|
|
# 7. Spawn referee with FULL debate transcript (all rounds)
|
|
# 8. Deliver to user
|
|
#
|
|
# ─── SEQUENTIAL FLOW ──────────────────────────────────────────────
|
|
#
|
|
# Single round (rounds=1):
|
|
# 1. Spawn advisor 1 → collect output
|
|
# 2. Spawn advisor 2 with advisor 1's output → collect
|
|
# 3. Spawn advisor 3 with advisor 1+2 outputs → collect
|
|
# 4. Spawn referee with all outputs
|
|
#
|
|
# Multi-round (rounds=N):
|
|
# 1. ROUND 1: Sequential as above
|
|
# 2. ROUND 2..N: Each advisor sees ALL prior round outputs
|
|
# 3. Spawn referee with full thread
|
|
#
|
|
# ─── DEBATE FLOW ──────────────────────────────────────────────────
|
|
#
|
|
# Always multi-round (min 2, default 3):
|
|
# 1. ROUND 1: Parallel opening takes
|
|
# 2. ROUND 2..N-1: Cross-rebuttals (parallel, each sees all others)
|
|
# 3. ROUND N: Final positions (parallel, full transcript)
|
|
# 4. Spawn referee with full debate + evolution notes
|
|
#
|
|
# ─── MODEL TIER SELECTION ─────────────────────────────────────────
|
|
#
|
|
# light: advisors=default, referee=default
|
|
# medium: advisors=default, referee=stronger (e.g. opus-tier)
|
|
# heavy: advisors=stronger, referee=stronger
|
|
#
|
|
# ─── SUBAGENT LABELING ────────────────────────────────────────────
|
|
#
|
|
# Labels follow pattern: council-r{round}-{role}
|
|
# Examples: council-r1-pragmatist, council-r2-skeptic, council-referee
|
|
# Single-round: council-pragmatist, council-referee (no round prefix)
|
|
#
|
|
# ─── WORD COUNT GUIDANCE ──────────────────────────────────────────
|
|
#
|
|
# Round 1 (opening): 200-400 words
|
|
# Middle rounds: 200-300 words
|
|
# Final round: 150-250 words
|
|
# This keeps multi-round debates from exploding in token cost.
|