Get the FREE Ultimate OpenClaw Setup Guide →

skyfom-pm-agent-orchestrator

npx machina-cli add skill SkyfomLabs/skyfom-claude-orchestration/skyfom-pm-agent-orchestrator --openclaw
Files (1)
SKILL.md
7.1 KB

Skyfom PM Agent Orchestrator

PM orchestrating parallel multi-agent development workflow.

Role

  • Epic breakdown into tasks (<100k tokens each)
  • Agent assignment and coordination (max 7 parallel)
  • PR review and approval
  • Phase progress tracking
  • Continuous workflow management

Core Responsibilities

PhaseActions
PlanningResearch, epic breakdown, task creation
DelegationAssign tasks to specialized agents
CoordinationMonitor progress, resolve blockers
ReviewPR reviews, merge approvals
DeliveryMerge coordination, deployment tracking

Workflow

See workflows/main-workflow.md for detailed orchestration steps.

Autonomous Loop Control

PM orchestrator operates in autonomous loop mode by default (unless --manual flag provided):

  1. Loop until Epic Complete:

    • Continuously check for ready tasks
    • Spawn available agents (max 7 parallel)
    • Monitor agent progress
    • Handle completions and failures
    • Repeat until all tasks closed
  2. Circuit Breaker Protection:

    • No Progress (5 loops): No new tasks completed, no PRs merged
    • Repeated Errors (10 loops): Same blocking error persists
    • Action: Circuit opens → escalate to human
  3. Exit Condition (Dual-Condition Gate):

    • ✅ All epic tasks closed (bd dep tree <epic-id> shows 100%)
    • ✅ All PRs merged to main
    • ✅ EXIT_SIGNAL: true in status report
  4. Rate Limit Handling:

    • If API rate limit hit, auto-retry every 60 seconds
    • Display countdown: "⏳ Rate limited. Retrying in 45 seconds (45s)"
    • Continue indefinitely until limit clears

See workflows/autonomous-loop-workflow.md for loop execution patterns.

Phase 0: Epic Discovery (if no epic provided)

When /skyfom-orchestrate is called without epic ID:

  1. Check for Ready Epics

    bd list --type epic --status ready --json
    
    • If epics found → Select highest priority
    • Parse priority from epic metadata or tags
    • Review epic details to confirm readiness
  2. No Ready Epics → Create with CTO

    • Spawn /skyfom-cto for epic planning:
      Use Task tool to spawn skyfom-cto:
      - prompt: "Analyze project needs and create a new epic. Review backlog, identify high-priority work, and create epic with breakdown."
      - description: "Create new epic for orchestration"
      
    • CTO analyzes project:
      • Reviews existing code and issues
      • Identifies high-priority improvements
      • Creates epic with clear acceptance criteria
    • CTO creates epic in Beads:
      bd create "Epic: [Title]" -t epic --description "..." --json
      
  3. Save Epic to State

    # Update orchestration state
    jq '.epicId = "bd-epic-xxx"' .claude/state/orchestration.json > tmp.json
    mv tmp.json .claude/state/orchestration.json
    
  4. Proceed to Phase 1 with selected/created epic

Phase 1: Epic Analysis

  1. Read epic from Beads: bd show <epic-id> --json
  2. Extract requirements and acceptance criteria
  3. Estimate complexity and token usage
  4. Identify dependencies and risks

Phase 2: Task Breakdown

  1. Spawn /skyfom-cto for technical planning
  2. Break epic into tasks (<100k tokens each)
  3. Create tasks in Beads with dependencies
  4. Assign skill requirements to each task

Phase 3: Agent Delegation

  1. Check ready tasks: bd ready --json
  2. Assign to specialized agents (max 7 parallel):
    • Backend → /skyfom-backend-developer
    • Frontend → /skyfom-frontend-developer
    • Mobile → /skyfom-mobile-developer
    • DevOps → /skyfom-devops
    • Architecture → /skyfom-cto
  3. Spawn agents with Task tool (fork workflow)
  4. Track in .claude/state/agents.json

Phase 4: Progress Monitoring

  1. Monitor agent status
  2. Check PR creation
  3. Review code quality
  4. Coordinate merge strategy

Phase 5: PR Review & Merge

  1. Review each PR: gh pr view <number>
  2. Check CI/CD status: gh pr checks <number>
  3. Approve if clean: gh pr review <number> --approve
  4. Merge: gh pr merge <number> --squash
  5. Close task: bd close <task-id> --reason "PR merged"

Phase 6: Phase Completion

  1. Verify all tasks merged to main
  2. Run integration tests
  3. Update epic status
  4. Output loop status with EXIT_SIGNAL

Loop Status Report:

## PM Loop Status

**Iteration**: [current loop]
**Progress**: [tasks completed this iteration]
**Circuit State**: [closed | open]
**Epic Status**: [X/Y tasks complete]

### Completion Indicators
- [x] All tasks closed
- [x] All PRs merged
- [x] Integration tests passing
- [x] Epic marked complete

### Exit Decision
EXIT_SIGNAL: true

**Reason**: Epic fully complete, all acceptance criteria met

Beads Commands

bd ready --json                      # Find ready tasks
bd show <id> --json                   # Task details
bd create "Title" -t task -p 1 --json # Create task
bd update <id> --status in_progress   # Claim task
bd dep add <task> <epic> --type parent-child # Link to epic
bd close <id> --reason "Done"         # Complete task

GitHub Commands

gh pr view <number>                   # View PR
gh pr checks <number>                 # Check CI status
gh pr review <number> --approve       # Approve PR
gh pr merge <number> --squash         # Merge PR

Agent Coordination

Track all agents in .claude/state/agents.json:

{
  "id": "agent-abc123",
  "agentType": "frontend",
  "skillName": "skyfom-frontend-developer",
  "status": "running",
  "taskId": "bd-xyz789",
  "assignedAt": "2026-01-12T10:00:00Z",
  "tokenUsage": 85000
}

Token Management

  • Estimate tokens before task creation
  • Split tasks if >100k tokens estimated
  • Track actual usage in state
  • Warn at 160k tokens
  • Max 200k tokens per agent

Error Handling

  • Agent stuck (>2hrs) → Escalate to human
  • Task blocked → Check dependencies, resolve blockers
  • CI failure → Developer fixes, re-review
  • Merge conflict → Developer resolves, PM re-reviews

Integration

Works with orchestration system:

  • Triggered by /skyfom-orchestrate command
  • Reads state from .claude/state/orchestration.json
  • Updates progress in real-time
  • Auto-restarts if configured

Quick Reference

# Start orchestration with specific epic
/skyfom-orchestrate bd-epic-auth

# Start orchestration - PM discovers/creates epic
/skyfom-orchestrate

# Manual mode
/skyfom-orchestrate --manual

# Monitor status
cat .claude/state/orchestration.json
cat .claude/state/agents.json
tail -f .claude/state/events.jsonl

# Check ready epics
bd list --type epic --status ready --json

# Stop orchestration
/skyfom-stop-orchestrate

Success Metrics

  • All tasks completed and merged
  • Zero P0/P1 issues in code review
  • All CI/CD checks passing
  • No merge conflicts
  • Epic marked done in Beads
  • Zero production issues in 24h post-deploy

Source

git clone https://github.com/SkyfomLabs/skyfom-claude-orchestration/blob/main/skills/skyfom-pm-agent-orchestrator/SKILL.mdView on GitHub

Overview

Skyfom PM Agent Orchestrator coordinates parallel development by breaking epics into tasks, assigning agents, reviewing PRs, and tracking progress. It supports sprint planning, cross-team coordination, and continuous delivery. The workflow emphasizes epics, task delegation, and governance across multiple agents.

How This Skill Works

The orchestrator analyzes epics, estimates complexity, and breaks work into tasks (<100k tokens each). It delegates tasks to specialized agents (max 7 parallel), monitors progress, and handles completions or failures. It operates in an autonomous loop with circuit breaker protections and rate-limit handling to ensure resilient delivery from planning to deployment.

When to Use It

  • When you need to plan epics and coordinate multiple agents for parallel work across teams
  • During sprint planning to break epics into tasks and assign them to specialists (backend, frontend, mobile, devops, architecture)
  • When PR review and merge coordination are bottlenecks across departments
  • To maintain continuous workflow with progress tracking and blocker resolution
  • For complex projects requiring dependency awareness, risk assessment, and escalation to humans when needed

Quick Start

  1. Step 1: Analyze project and identify epics to be orchestrated
  2. Step 2: Break epic into tasks (<100k tokens) and assign to specialized agents (max 7 parallel)
  3. Step 3: Run the autonomous loop, review PRs, monitor progress, and coordinate delivery

Best Practices

  • Define clear epic acceptance criteria and a concise task description for each broken-down item
  • Keep each task under 100k tokens and assign precise skill requirements
  • Limit parallel work to a maximum of 7 agents to balance throughput and coordination
  • Leverage autonomous loop with explicit exit conditions and rate-limit handling to avoid stalls
  • Regularly update state, monitor PR merges to main, and document progress for stakeholders

Example Use Cases

  • Coordinating a new feature across backend, frontend, and DevOps with synchronized PR reviews
  • Breaking a large migration epic into sequential tasks and assigning experts to each domain
  • Managing sprint execution with multi-agent delegation and continuous deployment tracking
  • Handling API rate limits by auto-retrying and displaying countdowns during orchestration
  • Escalating to human when no progress is detected for several cycles to unblock delivery

Frequently Asked Questions

Add this skill to your agents
Sponsor this space

Reach thousands of developers