Team orchestration

From oimiragieo/agent-studio · View interactive version

Team orchestration is an AI agent skill from the GitHub repository oimiragieo/agent-studio. 6-phase multi-agent pipeline with approval gates. Orchestrates Plan→Design→Implement→Review→Test→Deploy phases with explicit entry/exit criteria, phase-level agent assignment, and human-in-the-loop approval checkpoints.

How to use this skill

Skill file

Team Orchestration

Overview

This skill provides a structured 6-phase multi-agent pipeline for medium-to-large feature work:

Plan → Design → Implement → Review → Test → Deploy

Each phase has:

When to Use

Use for:

Do NOT use for:

The Iron Law

NO PHASE ADVANCE WITHOUT VERIFIED EXIT CRITERIA

The orchestrator must verify every exit criterion before spawning the next phase's agent. If any criterion is unmet, the current phase remains active.

Phase Definitions

Phase 1: Plan

Entry criteria:

Assigned agent: planner

Actions:

# Planner produces implementation plan
node .claude/tools/team-orchestration/team-orchestration.cjs --phase plan --task "{{task_description}}"

Exit criteria (ALL must pass):

Approval gate: HUMAN (user approves the plan before Design starts)


Phase 2: Design

Entry criteria:

Assigned agent: architect

Actions:

# Architect produces design document
node .claude/tools/team-orchestration/team-orchestration.cjs --phase design --plan ".claude/context/plans/{{task-id}}-plan.md"

Exit criteria (ALL must pass):

Approval gate: AUTOMATED (validation script checks doc completeness)


Phase 3: Implement

Entry criteria:

Assigned agent: developer

Actions:

# Developer implements per design doc
# Uses tdd skill for code changes
Skill({ skill: 'tdd' })

Exit criteria (ALL must pass):

Approval gate: AUTOMATED (lint + format + test run)


Phase 4: Review

Entry criteria:

Assigned agent: code-reviewer

Actions:

# Code reviewer performs structured review
Skill({ skill: 'requesting-code-review' })

Exit criteria (ALL must pass):

Approval gate: HUMAN (reviewer sign-off required before Test)


Phase 5: Test

Entry criteria:

Assigned agent: qa

Actions:

# QA runs full test suite and validates coverage
Skill({ skill: 'qa-workflow' })

Exit criteria (ALL must pass):

Approval gate: AUTOMATED (test suite pass/fail)


Phase 6: Deploy

Entry criteria:

Assigned agent: devops

Actions:

# DevOps executes deployment
Skill({ skill: 'finishing-a-development-branch' })

Exit criteria (ALL must pass):

Approval gate: HUMAN (deployment sign-off before marking pipeline complete)


Phase State Tracking

Orchestrators MUST maintain phase state in a snapshot file:

// .claude/context/plans/{{task-id}}.snapshot.json
{
  "taskId": "{{task-id}}",
  "currentPhase": "implement",
  "completedPhases": ["plan", "design"],
  "approvals": {
    "plan": { "approved": true, "by": "user", "at": "2026-03-22T..." },
    "design": { "approved": true, "by": "automated", "at": "2026-03-22T..." }
  },
  "agentAssignments": {
    "plan": "planner",
    "design": "architect",
    "implement": "developer",
    "review": "code-reviewer",
    "test": "qa",
    "deploy": "devops"
  },
  "resumable": true,
  "timestamp": "2026-03-22T..."
}

Command to verify phase state:

node -e "const s=require('./.claude/context/plans/{{task-id}}.snapshot.json');console.log('Phase:',s.currentPhase,'Completed:',s.completedPhases.join(','))"

Phase Transition Protocol

Before advancing from phase N to N+1:

  1. Verify all exit criteria — use the checklist in the phase definition
  2. Request approval (if human gate) — pause and wait for user confirmation
  3. Record approval — update snapshot.json with approval metadata
  4. Spawn next agent — use Task() with explicit task_id
[ORCHESTRATOR] Phase 1 (Plan) exit criteria check:
  ✓ Plan file exists: .claude/context/plans/my-feature-plan.md
  ✓ 5 subtasks defined (within 2-10 range)
  ✓ Risk section populated
  ✓ Dependencies listed
GATE: Requesting human approval...
[HUMAN APPROVES]
[ORCHESTRATOR] Advancing to Phase 2 (Design)...

Enforcement Hooks

Input validated against schemas/input.schema.json before execution.

Output contract defined in schemas/output.schema.json.

Memory Protocol

Before starting:

Read .claude/context/memory/learnings.md for prior orchestration runs on similar tasks.

After completing:

Anti-Patterns

Related Skills

Assigned Agents

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.