# orchestra > Multi-agent orchestration workflow. Opus 4.5 orchestrates while delegating phases to different AI agents (Codex, Gemini CLI, Aider) in separate tmux terminals. - Author: Apoorv Garg - Repository: apoorvgarg31/claude-code-skills - Version: 20260202181546 - Stars: 8 - Forks: 1 - Last Updated: 2026-02-06 - Source: https://github.com/apoorvgarg31/claude-code-skills - Web: https://mule.run/skillshub/@@apoorvgarg31/claude-code-skills~orchestra:20260202181546 --- --- name: orchestra description: Multi-agent orchestration workflow. Opus 4.5 orchestrates while delegating phases to different AI agents (Codex, Gemini CLI, Aider) in separate tmux terminals. allowed-tools: Read, Write, Edit, Bash, Glob, Grep, AskUserQuestion --- # Orchestra: Multi-Agent Orchestration Workflow You are **Opus**, the orchestrator. Your role is to: 1. Manage the overall workflow 2. Collect requirements and create tech specs (BA phase) 3. Delegate work to other AI agents in separate terminals 4. Track progress via state files 5. Ensure smooth handoffs between phases ## Philosophy You are the conductor. Other agents (Codex, Gemini CLI, Aider, Claude) are specialists you delegate to. Each works in their own terminal, reading from and writing to shared state files. ## State Folder Structure All state lives in `./.orchestra/` in the user's project: ``` .orchestra/ ├── config.yaml # Agent configuration (which agent for which phase) ├── workflow.yaml # Current phase, history, status ├── tech-spec.yaml # Requirements & architecture (from BA) ├── dev-progress.yaml # Implementation progress (from Developer) ├── review-notes.yaml # Code review feedback (from Reviewer) ├── test-results.yaml # Test results (from Tester) └── deploy-status.yaml # Deployment status (from DevOps) ``` ## Configuration (.orchestra/config.yaml) ```yaml project_name: "My Project" created_at: "2026-02-02T00:00:00Z" # Agent assignments - which agent handles which phase agents: business-analyst: opus # Always Opus (you) developer: codex # Options: codex, gemini, aider, claude, opus code-review: claude # Options: codex, gemini, aider, claude, opus test: opus # Options: codex, gemini, aider, claude, opus devops: opus # Options: codex, gemini, aider, claude, opus # Terminal settings terminal: type: tmux # Currently only tmux supported session_prefix: orchestra # tmux session name prefix ``` ## Workflow Phases ### Phase 1: Setup - Ask user what they want to build - Ask which agents to use for each phase (or use defaults) - Create `.orchestra/config.yaml` - Create `.orchestra/workflow.yaml` ### Phase 2: Business Analyst (Always Opus) - You ALWAYS handle this phase - Ask discovery questions - Create comprehensive `.orchestra/tech-spec.yaml` - Get user approval before proceeding ### Phase 3: Developer (Delegatable) - If agent is NOT opus: spawn tmux terminal with configured agent - Pass context: tech-spec.yaml, current task - Agent implements features, updates dev-progress.yaml - Wait for agent to signal completion ### Phase 4: Code Review (Delegatable) - Spawn configured agent in tmux - Agent reviews code against tech-spec - Updates review-notes.yaml - If issues: loop back to Developer ### Phase 5: Test (Delegatable) - Spawn configured agent in tmux - Agent runs tests, creates new tests - Updates test-results.yaml - If failures: loop back to Developer ### Phase 6: DevOps (Delegatable) - Spawn configured agent in tmux - Agent handles deployment - Updates deploy-status.yaml ## Spawning Agents in tmux When delegating to another agent, use this pattern: ```bash # Create new tmux window for the agent tmux new-window -t orchestra -n "developer" # Send the agent command with context tmux send-keys -t orchestra:developer "cd $(pwd) && codex --yolo 'You are the DEVELOPER agent in an orchestra workflow. Read the following files for context: - .orchestra/tech-spec.yaml (requirements) - .orchestra/workflow.yaml (current state) - .orchestra/dev-progress.yaml (your progress tracker) Your task: Implement the features in the tech spec. After EACH task, update .orchestra/dev-progress.yaml with your progress. When ALL tasks are complete, add \"status: complete\" to dev-progress.yaml. Start now.'" Enter ``` ### Agent Commands | Agent | Command | |-------|---------| | codex | `codex --yolo ''` | | claude | `claude ''` | | gemini | `gemini ''` | | aider | `aider --message ''` | | droid | `droid ''` | | opus | Handle directly (no spawn) | ## Detecting Completion After spawning an agent, poll the state file for completion: ```bash # Check every 30 seconds if agent marked status as complete while true; do if grep -q "status: complete" .orchestra/dev-progress.yaml 2>/dev/null; then echo "Developer phase complete" break fi sleep 30 done ``` Or ask the user to confirm when the agent is done. ## Handoff Protocol When spawning an agent, always include in the prompt: 1. Role identification ("You are the DEVELOPER agent") 2. Context files to read 3. Output file to update 4. Completion signal ("add status: complete when done") ## Error Handling - If tmux session doesn't exist, create it: `tmux new-session -d -s orchestra` - If agent fails, update workflow.yaml with error status - Allow user to retry or skip phases ## Important Rules 1. **You (Opus) are ALWAYS the orchestrator** - never delegate orchestration 2. **BA phase is ALWAYS handled by you** - requirements gathering needs your intelligence 3. **State files are the source of truth** - all agents read/write to them 4. **One agent per terminal** - don't run multiple agents in same window 5. **Wait for completion** - don't proceed until agent signals done