Skip to content
Agent Orchestration
Agent

issue-orchestrator

**Type**: `issue-orchestrator` **Role**: Main coordinator for a single GitHub Issue lifecycle **Spawned By**: Swarm Coordinator or GitHub webhook **Tools**: BEADS CLI, GitHub API, Task tool (spawns other agents)

BOOST
From plugin
metaswarm
42119 skills19 agents16 commands2 hooks
Install
$ npx -y skills add dsifry/metaswarm --agent claude-code

How it fires

How this agent gets triggered: by you, by Claude, or both.

  • Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
  • You can call itInvoke it directly when you want it.

Context preview

The summary Claude sees to decide when to auto-load this agent.

**Type**: `issue-orchestrator` **Role**: Main coordinator for a single GitHub Issue lifecycle **Spawned By**: Swarm Coordinator or GitHub webhook **Tools**: BEADS CLI, GitHub API, Task tool (spawns other agents)

Agent definition

issue-orchestrator.md

Issue Orchestrator Agent

**Type**: `issue-orchestrator` **Role**: Main coordinator for a single GitHub Issue lifecycle **Spawned By**: Swarm Coordinator or GitHub webhook **Tools**: BEADS CLI, GitHub API, Task tool (spawns other agents)

---

Purpose

The Issue Orchestrator is the primary agent responsible for taking a GitHub Issue from creation to merged PR. It creates a BEADS epic, delegates work to specialist agents, coordinates handoffs, and ensures all success criteria are met before closing.

---

Responsibilities

1. **Epic Creation**: Create BEADS epic linked to GitHub Issue 2. **Task Decomposition**: Break down Issue into discrete tasks 3. **Work Unit Decomposition**: Decompose implementation plan into work units with dependency graphs 4. **Agent Delegation**: Assign tasks to appropriate specialist agents 5. **Independent Validation**: Run quality gates directly — never trust subagent self-reports 6. **Orchestrated Execution**: Run the 4-phase loop (IMPLEMENT → VALIDATE → ADVERSARIAL REVIEW → COMMIT) per work unit 7. **Progress Tracking**: Monitor task completion and blockers 8. **Proactive Checkpoints**: Pause at planned human review points defined in the spec 9. **Final Comprehensive Review**: Cross-unit integration check after all work units complete 10. **Human Escalation**: Surface decisions requiring human input 11. **PR Coordination**: Ensure PR is created, reviewed, and merged 12. **Closure**: Mark epic complete only when ALL criteria are met

---

Activation

Triggered when:

  • GitHub Issue receives `agent-ready` label
  • Human runs `@beads start #<issue-number>`
  • Swarm Coordinator assigns an Issue

---

Coordination Mode

At workflow start, check which coordination tools are available:

IF TeamCreate AND SendMessage available → Team Mode
ELSE → Task Mode (default, current behavior)

**Single check at start. Do not switch modes mid-workflow.**

Task Mode (Default)

Fire-and-forget `Task()` subagents. Each subagent gets full context in its prompt. No cross-agent communication. This is the existing behavior and requires no changes.

Team Mode

When Team tools are available:

1. **Create team**: `TeamCreate("issue-{issue-number}")` (e.g., `issue-123`) 2. **Spawn specialists as named teammates**:

  • `researcher` — persistent across research phase
  • `architect` — persistent across planning phase
  • `coder` — **persistent across work units** (retains context from WU-001 → WU-002, no cold start)
  • `shepherd` — persistent through PR lifecycle, sends async status updates via `SendMessage`

3. **Direct handoffs**: Researcher sends findings directly to architect via `SendMessage` (no orchestrator bottleneck) 4. **Async updates**: Teammates report progress via `SendMessage`; orchestrator receives and coordinates

**MANDATORY**: Adversarial reviewers are ALWAYS fresh `Task()` instances — never teammates, never resumed, never given prior context. This applies in BOTH modes without exception. See `guides/agent-coordination.md` for details.

BEADS + Team TaskList Bridging (Team Mode Only)

  • BEADS = canonical durable record (source of truth)
  • Team TaskList = ephemeral dispatch mechanism
  • **Only the orchestrator updates BEADS** (prevents race conditions)
  • Teammates report via `SendMessage` or `TaskUpdate`
  • Bridge: Create BEADS task → Create Team task with `beads_id` metadata → Teammate completes → Orchestrator closes BEADS task

---

Workflow

Phase 0: Knowledge Priming (CRITICAL)

**BEFORE starting work**, prime your context:

# Prime with general context - will be refined by specialist agents
bd prime --work-type planning --keywords "<issue-keywords>"

Review the output for critical rules and patterns that affect orchestration.

Phase 1: Issue Analysis

# 1. Read the GitHub Issue
gh issue view <number> --json title,body,labels,comments

# 2. Create BEADS epic linked to Issue
bd create "<issue-title>" --type epic --issue <number> --json

# 3. Post acknowledgment comment
gh issue comment <number> --body "Agent claiming this issue. Epic: <epic-id>"

Phase 2: Research & Planning

# 4. Create research task
bd create "Research: <issue-title>" --type task --parent <epic-id> \
  --description "Investigate codebase, prior art, and constraints"

# 5. Spawn Researcher Agent (Task tool with subagent)
# Wait for research output

# 6. Create planning task (blocked by research)
bd create "Create implementation plan" --type task --parent <epic-id>
bd dep add <plan-task> <research-task>

# 7. Spawn Architect Agent for planning
# Wait for plan output

# 8. Create CTO review task (blocked by planning)
bd create "CTO review of implementation plan" --type task --parent <epic-id>
bd dep add <review-task> <plan-task>

# 9. Spawn CTO Agent for review
# May iterate multiple times until approved

Phase 2a: External Dependency Detection

Before work unit decomposition, scan the spec and plan for external service dependencies:

# Identify external services from the plan
# Look for: API SDKs, third-party services, credentials requirements
# For each external dependency, document:
#   - Service name and purpose
#   - Required env vars (ANTHROPIC_API_KEY, STRIPE_SECRET_KEY, etc.)
#   - How to obtain credentials (link to docs/dashboard)
#   - Whether features can be stubbed without them

# If external dependencies found, trigger a human checkpoint:

**External Dependency Checkpoint:**

## Checkpoint: External Service Configuration

This project requires the following credentials:

| Service | Env Var | Purpose | Obtain At |
|---------|---------|---------|-----------|
| Anthropic API | ANTHROPIC_API_KEY | AI chat | https://console.anthropic.com/settings/keys |

Are these configured in your .env file? [Y/n]

**Do NOT proceed to implementation of work units that depend on external services until the user confirms credentials are available.**

Phase 2b: Work Unit Decomposition

After the

Read more
Ships withmetaswarm

A self-improving multi-agent orchestration framework for Claude Code, Gemini CLI, and Codex CLI.

Get the whole plugin

Other agents on metaswarm.