feat(council): add configurable rounds, flow parameters, and round-specific prompts

- 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
This commit is contained in:
zap
2026-03-05 16:21:22 +00:00
parent 7274d399ce
commit da36000050
4 changed files with 224 additions and 63 deletions

View File

@@ -4,51 +4,70 @@
# This script is NOT executed directly. It documents the orchestration
# logic the main agent follows when invoking the council skill.
#
# The main agent uses sessions_spawn (mode=run) to create each subagent.
# See references/prompts.md for all prompt templates.
#
# ─── PARALLEL FLOW (default) ───────────────────────────────────────
# ─── PARAMETERS ────────────────────────────────────────────────────
#
# 1. Build advisor prompts from references/prompts.md templates.
# 2. Spawn 3 advisor subagents simultaneously:
# flow: parallel (default) | sequential | debate
# rounds: 1 (default) | 2-5
# tier: light (default) | medium | heavy
#
# sessions_spawn(
# task = "<advisor system prompt>\n\nTopic: <topic>",
# mode = "run",
# label = "council-<role>", # e.g. council-pragmatist
# model = "<chosen model tier>", # optional override
# )
# ─── PARALLEL FLOW ─────────────────────────────────────────────────
#
# 3. Wait for all 3 completion events (push-based).
# 4. Collect advisor outputs.
# 5. Spawn referee subagent:
# 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
#
# sessions_spawn(
# task = "<referee system prompt with all advisor outputs>",
# mode = "run",
# label = "council-referee",
# model = "<chosen model tier>", # may be stronger than advisors
# )
#
# 6. Deliver referee output to user with individual advisor perspectives
# included as collapsed summaries.
# 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 ──────────────────────────────────────────────
#
# Same as parallel but advisors are spawned one at a time.
# Each subsequent advisor sees prior outputs in their prompt.
# Optional rebuttal round before referee.
# 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 ──────────────────────────────────────────────────
#
# 1. Parallel initial takes (same as parallel flow steps 1-4).
# 2. Rebuttal round: respawn each advisor with all other outputs visible.
# 3. Collect rebuttals.
# 4. Spawn referee with initial takes + rebuttals.
# 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
# light: advisors=default, referee=default
# medium: advisors=default, referee=stronger (e.g. opus-tier)
# heavy: advisors=stronger, referee=stronger
#
# The main agent decides tier before spawning based on topic complexity.
# ─── 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.