Claude
Skills
Sign in
Back

parallel-swarm-implementation

Included with Lifetime
$97 forever

Loop 2 of the Three-Loop Integrated Development System. META-SKILL that dynamically compiles Loop 1 plans into agent+skill execution graphs. Queen Coordinator selects optimal agents from 86-agent registry and assigns skills (when available) or custom instructions. 9-step swarm with theater detection and reality validation. Receives plans from research-driven-planning, feeds to cicd-intelligent-recovery. Use for adaptive, theater-free implementation.

AI Agents

What this skill does


# Parallel Swarm Implementation (Loop 2) - META-SKILL

## Purpose

**META-SKILL ORCHESTRATOR** that dynamically compiles Loop 1 planning packages into executable agent+skill graphs, then coordinates theater-free parallel implementation.

## Specialist Agent Coordination

I am **Queen Coordinator (Seraphina)** orchestrating the "swarm compiler" pattern.

**Meta-Skill Architecture**:
1. **Analyze** Loop 1 planning package
2. **Select** optimal agents from 86-agent registry per task
3. **Assign** skills to agents (when skills exist) OR generate custom instructions
4. **Create** agent+skill assignment matrix
5. **Execute** dynamically based on matrix with continuous monitoring
6. **Validate** theater-free execution through multi-agent consensus

**Methodology** (9-Step Adaptive SOP):
1. **Initialization**: Queen-led hierarchical topology with dual memory
2. **Analysis**: Queen analyzes Loop 1 plan and creates agent+skill matrix
3. **MECE Validation**: Ensure tasks are Mutually Exclusive, Collectively Exhaustive
4. **Dynamic Deployment**: Spawn agents with skills OR custom instructions per matrix
5. **Theater Detection**: 6-agent consensus validation (0% tolerance)
6. **Integration**: Sandbox testing until 100% working
7. **Documentation**: Auto-sync with implementation
8. **Test Validation**: Reality check all tests
9. **Completion**: Package for Loop 3

**Integration**: Loop 2 of 3. Receives → `research-driven-planning` (Loop 1), Feeds → `cicd-intelligent-recovery` (Loop 3).

---

## When to Use This Skill

Activate this META-SKILL when:
- Have validated plan from Loop 1 with research and risk analysis
- Need production-quality implementation with 0% theater tolerance
- Require adaptive agent+skill selection based on project specifics
- Want parallel multi-agent execution (8.3x speedup)
- Building complex features requiring intelligent coordination
- Need comprehensive audit trails for compliance

**DO NOT** use this skill for:
- Planning phase (use Loop 1: research-driven-planning first)
- Quick prototypes without validated plans
- Trivial single-file changes (direct implementation faster)

**Meta-Skill Nature**: Unlike Loop 1 (fixed 6+8 agent SOPs), Loop 2 is **adaptive**. The Queen Coordinator dynamically selects which agents to use and whether they should follow existing skills or custom instructions based on the specific project.

---

## Input Contract

```yaml
input:
  loop1_planning_package: path (required)
    # Location: .claude/.artifacts/loop1-planning-package.json
    # Must include: specification, research, planning, risk_analysis

  execution_options:
    max_parallel_agents: number (default: 11, range: 5-20)
      # Concurrent agents (more = faster but higher coordination cost)
    theater_tolerance: number (default: 0, range: 0-5)
      # Percentage of theater allowed (0% recommended)
    sandbox_validation: boolean (default: true)
      # Execute code in sandbox to prove functionality
    integration_threshold: number (default: 100, range: 80-100)
      # Required integration test pass rate

  agent_preferences:
    prefer_skill_based: boolean (default: true)
      # Use existing skills when available vs. custom instructions
    agent_registry: enum[claude-flow-86, custom] (default: claude-flow-86)
      # Which agent ecosystem to use
```

## Output Contract

```yaml
output:
  agent_skill_matrix:
    total_tasks: number
    skill_based_agents: number  # Agents using existing skills
    custom_instruction_agents: number  # Agents with ad-hoc instructions
    matrix_file: path  # .claude/.artifacts/agent-skill-assignments.json

  implementation:
    files_created: array[path]
    tests_coverage: number  # Target: ≥90%
    theater_detected: number  # Target: 0
    sandbox_validation: boolean  # Target: true

  quality_metrics:
    integration_test_pass_rate: number  # Target: 100%
    functionality_audit_pass: boolean
    theater_audit_pass: boolean
    code_review_score: number (0-100)

  integration:
    delivery_package: path  # loop2-delivery-package.json
    memory_namespace: string  # integration/loop2-to-loop3
    ready_for_loop3: boolean
```

---

## Prerequisites

Verify Loop 1 completion and load planning context:

```bash
# Validate Loop 1 package exists
test -f .claude/.artifacts/loop1-planning-package.json && echo "✅ Loop 1 Complete" || {
  echo "❌ Run research-driven-planning skill first"
  exit 1
}

# Load planning data
npx claude-flow@alpha memory query "loop1_complete" \
  --namespace "integration/loop1-to-loop2"

# Verify research + risk analysis present
jq '.research.confidence_score, .risk_analysis.final_failure_confidence' \
  .claude/.artifacts/loop1-planning-package.json
```

**Expected Output**: Research confidence ≥70%, failure confidence <3%

---

## Step 1: Queen Analyzes & Creates Agent+Skill Matrix (META-ORCHESTRATION)

**Objective**: Queen Coordinator reads Loop 1 plan and dynamically generates agent+skill assignment matrix.

### Execute Queen's Meta-Analysis SOP

**Agent**: Queen Coordinator (Seraphina) - `hierarchical-coordinator`

```javascript
// STEP 1: META-ANALYSIS - Queen Creates Agent+Skill Assignment Matrix
// This is the "swarm compiler" phase

[Single Message - Queen Meta-Orchestration]:
  Task("Queen Coordinator (Seraphina)",
    `MISSION: Compile Loop 1 planning package into executable agent+skill graph.

    PHASE 1: LOAD LOOP 1 CONTEXT
    - Load planning package: .claude/.artifacts/loop1-planning-package.json
    - Extract: MECE task breakdown, research recommendations, risk mitigations
    - Parse: $(jq '.planning.enhanced_plan' .claude/.artifacts/loop1-planning-package.json)

    PHASE 2: TASK ANALYSIS
    For each task in Loop 1 plan:
    1. Identify task type: backend, frontend, database, testing, documentation, infrastructure
    2. Determine complexity: simple (1 agent), moderate (2-3 agents), complex (4+ agents)
    3. Extract required capabilities from task description
    4. Apply Loop 1 research recommendations for technology/library selection
    5. Apply Loop 1 risk mitigations as constraints

    PHASE 3: AGENT SELECTION (from 86-agent registry)
    For each task:
    1. Match task type to agent type:
       - backend tasks → backend-dev, system-architect
       - testing tasks → tester, tdd-london-swarm
       - quality tasks → theater-detection-audit, functionality-audit, code-review-assistant
       - docs tasks → api-docs, docs-writer
    2. Select optimal agent based on:
       - Agent capabilities matching task requirements
       - Agent availability (workload balancing)
       - Agent specialization score

    PHASE 4: SKILL ASSIGNMENT (key meta-skill decision)
    For each agent assignment:
    1. Check if specialized skill exists for this task type:
       - Known skills: tdd-london-swarm, theater-detection-audit, functionality-audit,
         code-review-assistant, api-docs, database-schema-design, etc.
    2. If skill exists:
       - useSkill: <skill-name>
       - customInstructions: Context-specific parameters for skill
    3. If NO skill exists:
       - useSkill: null
       - customInstructions: Detailed instructions from Loop 1 + Queen's guidance

    PHASE 5: GENERATE ASSIGNMENT MATRIX
    Create .claude/.artifacts/agent-skill-assignments.json:
    {
      "project": "<from Loop 1>",
      "loop1_package": "integration/loop1-to-loop2",
      "tasks": [
        {
          "taskId": "string",
          "description": "string",
          "taskType": "enum[backend, frontend, database, test, quality, docs, infrastructure]",
          "complexity": "enum[simple, moderate, complex]",
          "assignedAgent": "string (from 86-agent registry)",
          "useSkill": "string | null",
          "customInstructions": "string (detailed if useSkill is null, contextual if using skill)",
          "priority": "enum[low, medium, high, critical]",
          "dependencies": ["array of taskIds"],
          "loop1_research": "relevant research findings",
          "loop1_ris

Related in AI Agents