Marketplace

Unnamed Skill

Multi-agent orchestration system that coordinates specialized agents (PM, Architect, DevOps, QA, Tech Lead, Security) to work together on complex tasks. Implements hierarchical orchestrator-worker pattern. Activates for complex multi-step requests requiring multiple roles/skills. Keywords: build product, create SaaS, full implementation, end-to-end, multi-agent, orchestrate, coordinate roles, complex project.

$ Install

git clone https://github.com/anton-abyzov/specweave /tmp/specweave && cp -r /tmp/specweave/plugins/specweave/skills/role-orchestrator ~/.claude/skills/specweave

// tip: Run this command in your terminal to install the skill


name: role-orchestrator description: Multi-agent orchestration system that coordinates specialized agents (PM, Architect, DevOps, QA, Tech Lead, Security) to work together on complex tasks. Implements hierarchical orchestrator-worker pattern. Activates for complex multi-step requests requiring multiple roles/skills. Keywords: build product, create SaaS, full implementation, end-to-end, multi-agent, orchestrate, coordinate roles, complex project.

Role Orchestrator - Multi-Agent Coordination

Self-contained orchestration that works in ANY user project after specweave init.


Purpose

Coordinate multiple specialized agents for complex, multi-step tasks through intelligent decomposition and role assignment.

Architecture: Hierarchical Orchestrator-Worker Pattern

User Request โ†’ Orchestrator โ†’ PM โ†’ Architect โ†’ Tech Lead โ†’ Implement โ†’ QA โ†’ Deploy

When to Activate

Activates for requests requiring 3+ agents or full product development:

User SaysAgents NeededPattern
"Build a SaaS for X"PM โ†’ Architect โ†’ Tech Lead โ†’ Implement โ†’ QA โ†’ DevOpsSequential
"Create real-time chat"Architect โ†’ Backend + Frontend (parallel) โ†’ QAParallel
"Secure authentication"Security โ†’ Tech Lead โ†’ Backend โ†’ QASequential
"Optimize performance"Tech Lead โ†’ Performance โ†’ Backend โ†’ DevOpsIterative

Agent Roles

Strategic Layer

PM Agent (pm-agent)

  • Product strategy, user stories, prioritization
  • When: Starting new products/features

Architect Agent (architect-agent)

  • System design, ADRs, technology stack
  • When: Designing systems or major features

Execution Layer

Tech Lead Agent (tech-lead-agent)

  • Technical planning, code review, quality standards
  • When: Complex technical decisions

Backend Agents

  • nodejs-backend, python-backend, dotnet-backend
  • When: Server-side implementation

Frontend Agent (frontend-agent)

  • React/Next.js, UI/UX implementation
  • When: Building user interfaces

Quality & Operations Layer

QA Lead Agent (qa-lead-agent)

  • Test strategy, quality assurance, coverage
  • When: Defining testing approach

Security Agent (security-agent)

  • Security architecture, threat modeling, compliance
  • When: Security-critical features

DevOps Agent (devops-agent)

  • Infrastructure, CI/CD, deployment, monitoring
  • When: Operations tasks

CRITICAL: Safe Orchestration Pattern

Rule: Orchestrator creates structure, guides user to invoke agents in MAIN context (NOT nested spawning).

Phase 0: Create Increment Structure FIRST

Before invoking ANY agents, create increment folder:

// 1. Parse user request
const projectName = extractProjectName(userRequest);
// "event management" โ†’ "event-management"

// 2. Get next number
const nextNumber = getNextIncrementNumber();
// e.g., 0001, 0002, 0003

// 3. Create structure
const incrementPath = `.specweave/increments/${nextNumber}-${projectName}/`;
mkdir -p ${incrementPath}
mkdir -p ${incrementPath}logs/
mkdir -p ${incrementPath}scripts/
mkdir -p ${incrementPath}reports/

// 4. Create placeholder files (ORDER MATTERS!)
// metadata.json MUST be created FIRST (metadata-json-guard.sh blocks spec.md otherwise)
write ${incrementPath}metadata.json (MANDATORY - CREATE FIRST!)
write ${incrementPath}spec.md (basic template)
write ${incrementPath}plan.md (basic template)
write ${incrementPath}tasks.md (basic template)

metadata.json template (CREATE FIRST!):

{
  "id": "0001-project-name",
  "status": "planned",
  "type": "feature",
  "priority": "P1",
  "created": "2025-11-24T12:00:00Z",
  "lastActivity": "2025-11-24T12:00:00Z"
}

spec.md template (create AFTER metadata.json):

---
increment: 0001-project-name
title: "Project Name"
type: feature
priority: P1
status: planned
created: 2025-11-24
---

# Project Name

## Overview
(To be filled by PM Agent)

## User Stories
(To be filled by PM Agent)

Phase 1: Guide User Through Agent Workflow

Output this workflow to user:

โœ… Increment structure created: .specweave/increments/0001-project-name/

๐ŸŽฏ Complete workflow (run these commands in MAIN conversation):

STEP 1: Product Strategy & Requirements
Tell Claude: "Complete the spec for increment 0001-project-name"
(PM agent will activate automatically)

STEP 2: Architecture & Design
Tell Claude: "Design architecture for increment 0001-project-name"
(Architect agent will create ADRs and system design)

STEP 3: Technical Planning
Tell Claude: "Create technical plan for increment 0001-project-name"
(Tech Lead agent will create implementation approach)

STEP 4: Implementation Tasks
Tell Claude: "Create tasks for increment 0001-project-name"
(Test-aware planner will generate tasks with tests)

STEP 5: Security Review (if needed)
Tell Claude: "Review security for increment 0001-project-name"
(Security agent will perform threat modeling)

STEP 6: Implementation
Tell Claude: "Implement increment 0001-project-name"
(Backend/Frontend agents will implement code)

STEP 7: Quality Assurance
Tell Claude: "Run QA for increment 0001-project-name"
(QA agent will verify tests and coverage)

STEP 8: Deployment Planning
Tell Claude: "Plan deployment for increment 0001-project-name"
(DevOps agent will create infrastructure)

โš ๏ธ  Run these sequentially in MAIN conversation to prevent context explosion!

DO NOT spawn all agents from this skill using Task() tool!


Orchestration Patterns

Pattern 1: Sequential (Default)

When: Dependencies between steps

PM โ†’ Architect โ†’ Tech Lead โ†’ Backend โ†’ Frontend โ†’ QA โ†’ DevOps

User workflow:

  1. Create increment structure
  2. Guide user to invoke agents one by one
  3. Each agent completes before next starts
  4. User tracks progress

Pattern 2: Parallel Execution

When: Independent work streams

PM + Architect (parallel)
    โ†“
Backend + Frontend (parallel)
    โ†“
QA + DevOps (parallel)

User workflow:

  1. Create increment structure
  2. Identify parallel opportunities
  3. Guide user: "You can run these in parallel: [list]"
  4. User invokes agents concurrently

Pattern 3: Adaptive (Context-Aware)

When: Requirements discovered during execution

PM โ†’ Architect โ†’ [Discover need] โ†’ Security โ†’ Tech Lead โ†’ ...

User workflow:

  1. Start with basic plan
  2. Agent discovers additional needs
  3. Inject new agents mid-workflow
  4. Adjust plan dynamically

Quality Gates (Checkpoints)

Gate 1: After PM (Requirements Complete)

Check:

  • User stories defined with AC-IDs
  • Success criteria measurable
  • Dependencies identified
  • Out of scope defined

Decision: Proceed to architecture OR refine requirements

Gate 2: After Architect (Design Complete)

Check:

  • System design documented
  • ADRs created (โ‰ฅ3)
  • Technology stack chosen
  • Data model defined

Decision: Proceed to implementation OR redesign

Gate 3: After Implementation (Code Complete)

Check:

  • All P1 tasks completed
  • Tests passing (โ‰ฅ80% coverage)
  • Code reviewed
  • Documentation updated

Decision: Proceed to deployment OR fix issues

Gate 4: Before Deployment (Production Ready)

Check:

  • Security review passed
  • Performance acceptable
  • Monitoring configured
  • Rollback plan exists

Decision: Deploy OR address blockers


Error Handling

Agent Failure

If agent fails:
1. Capture error details
2. Retry with backoff (max 3 attempts)
3. Try fallback agent if available
4. If critical: pause and notify user
5. NEVER fail silently

Graceful Degradation

If PM fails โ†’ Use basic template
If Architect fails โ†’ Tech Lead creates simple design
If Backend fails โ†’ Create manual implementation guide
If DevOps fails โ†’ Create manual deployment steps

User Intervention

If orchestrator stuck:
1. Show current state
2. Present options to user
3. Let user decide next step
4. Resume from checkpoint

Progress Tracking

Real-Time Updates

Show user current phase and progress:

๐Ÿš€ Building SaaS for Event Management

Progress: 3/8 phases complete (37.5%)

โœ… Phase 1: Requirements (PM) - COMPLETE
โœ… Phase 2: Architecture (Architect) - COMPLETE
โœ… Phase 3: Technical Planning (Tech Lead) - COMPLETE
๐Ÿ”„ Phase 4: Implementation (Backend + Frontend) - IN PROGRESS
โณ Phase 5: QA - PENDING
โณ Phase 6: Security Review - PENDING
โณ Phase 7: DevOps - PENDING
โณ Phase 8: Deployment - PENDING

Current: Backend implementing user authentication (T-015/45)

Example Workflows

Example 1: Build SaaS Product

User request: "Build a SaaS for event management"

Orchestrator response:

๐ŸŽฏ Creating increment for Event Management SaaS

Created: .specweave/increments/0001-event-management/

๐Ÿ“‹ 8-Phase Workflow:

Phase 1: Requirements & Strategy
Tell Claude: "Complete spec for increment 0001"
โ†’ PM will define user stories, features, success criteria

Phase 2: System Architecture
Tell Claude: "Design architecture for increment 0001"
โ†’ Architect will create system design and ADRs

Phase 3: Technical Planning
Tell Claude: "Create technical plan for increment 0001"
โ†’ Tech Lead will plan implementation approach

Phase 4: Test Strategy
Tell Claude: "Create test strategy for increment 0001"
โ†’ QA Lead will define testing approach

Phase 5: Backend Implementation
Tell Claude: "Implement backend for increment 0001"
โ†’ Backend agent will build APIs and services

Phase 6: Frontend Implementation
Tell Claude: "Implement frontend for increment 0001"
โ†’ Frontend agent will build UI

Phase 7: Security Review
Tell Claude: "Review security for increment 0001"
โ†’ Security agent will validate security

Phase 8: Deployment Setup
Tell Claude: "Setup deployment for increment 0001"
โ†’ DevOps agent will create infrastructure

Start with Phase 1!

Example 2: Critical Hotfix

User request: "Fix critical security vulnerability CVE-2024-1234"

Orchestrator response:

๐Ÿšจ CRITICAL HOTFIX WORKFLOW

Created: .specweave/increments/0016-security-fix-cve-2024-1234/
Type: hotfix (expedited workflow)

โšก 4-Phase Fast Track:

Phase 1: Security Assessment (5 min)
Tell Claude: "Assess security vulnerability for increment 0016"

Phase 2: Fix Implementation (15 min)
Tell Claude: "Implement security fix for increment 0016"

Phase 3: Validation (10 min)
Tell Claude: "Validate security fix for increment 0016"

Phase 4: Emergency Deploy (5 min)
Tell Claude: "Deploy hotfix for increment 0016"

Total estimated time: 35 minutes

Best Practices

โœ… DO:

  • Create increment structure FIRST
  • Guide user through sequential workflow
  • Use quality gates between phases
  • Track progress and show user updates
  • Handle errors gracefully with retry
  • Allow user to skip optional phases

โŒ DON'T:

  • Spawn all agents at once (context explosion)
  • Skip increment creation
  • Proceed without quality gate checks
  • Fail silently on agent errors
  • Assume agents are infallible
  • Block user from manual intervention

Integration with SpecWeave Commands

After orchestration complete:

# Check status
/sw:status

# Sync to external tools
/sw:sync-progress 0001

# Validate quality
/sw:qa 0001

# Close increment
/sw:done 0001

This skill is self-contained and works in ANY user project after specweave init.