#!/bin/bash
# Start AI Council workers in tmux

cd /opt/aicouncil/council

# Kill existing sessions
tmux kill-session -t master-boss 2>/dev/null
tmux kill-session -t controller 2>/dev/null
tmux kill-session -t researcher 2>/dev/null
tmux kill-session -t coder 2>/dev/null
tmux kill-session -t validator 2>/dev/null

# Start Master (Opus)
echo "Starting master-boss..."
tmux new-session -d -s master-boss -c /opt/aicouncil/council/master-boss
tmux send-keys -t master-boss "claude --model opus-4" Enter

# Start Controller (Opus)
echo "Starting controller..."
tmux new-session -d -s controller -c /opt/aicouncil/council/controller
tmux send-keys -t controller "claude --model opus-4" Enter

# Start Researcher (Sonnet)
echo "Starting researcher..."
tmux new-session -d -s researcher -c /opt/aicouncil/council/researcher
tmux send-keys -t researcher "claude --model sonnet" Enter

# Start Coder (Sonnet)
echo "Starting coder..."
tmux new-session -d -s coder -c /opt/aicouncil/council/coder
tmux send-keys -t coder "claude --model sonnet" Enter

# Start Validator (Opus)
echo "Starting validator..."
tmux new-session -d -s validator -c /opt/aicouncil/council/validator
tmux send-keys -t validator "claude --model opus-4" Enter

echo ""
echo "Council started. Sessions:"
tmux ls
echo ""
echo "Attach: tmux attach -t master-boss"
