parallel-swarm-implementation
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.
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_risRelated in AI Agents
skill-development
IncludedComprehensive meta-skill for creating, managing, validating, auditing, and distributing Claude Code skills and slash commands (unified in v2.1.3+). Provides skill templates, creation workflows, validation patterns, audit checklists, naming conventions, YAML frontmatter guidance, progressive disclosure examples, and best practices lookup. Use when creating new skills, validating existing skills, auditing skill quality, understanding skill architecture, needing skill templates, learning about YAML frontmatter requirements, progressive disclosure patterns, tool restrictions (allowed-tools), skill composition, skill naming conventions, troubleshooting skill activation issues, creating custom slash commands, configuring command frontmatter, using command arguments ($ARGUMENTS, $1, $2), bash execution in commands, file references in commands, command namespacing, plugin commands, MCP slash commands, Skill tool configuration, or deciding between skills vs slash commands. Delegates to docs-management skill for official documentation.
reprompter
IncludedTransform messy prompts into well-structured, effective prompts — single or multi-agent. Use when: "reprompt", "reprompt this", "clean up this prompt", "structure my prompt", rough text needing XML tags and best practices, "reprompter teams", "repromptception", "run with quality", "smart run", "smart agents", multi-agent tasks, audits, parallel work, anything going to agent teams. Don't use when: simple Q&A, pure chat, immediate execution-only tasks. See "Don't Use When" section for details. Outputs: Structured XML/Markdown prompt, quality score (before/after), optional team brief + per-agent sub-prompts, agent team output files. Success criteria: Single mode quality score ≥ 7/10; Repromptception per-agent prompt quality score 8+/10; all required sections present, actionable and specific.
adaptive-compaction
IncludedAdaptive add-on policy and recovery layer that decides WHEN to compact, prune, snapshot, or fork -- replacing fixed-percent auto-compaction across Claude Code, Codex, and MCP-capable hosts. Trigger on auto-compact timing or damage: "when should I compact", "is it safe to compact now or start a fresh session", "auto-compact fires too early/mid-task", "switching to an unrelated task but the window still has space", "context rot", "answers get worse the longer the session runs", "the agent forgot the plan or my decisions after it summarized", "add a layer on top that manages context without changing the agent", raising autoCompactWindow to give the policy room, or installing/tuning a cross-tool compaction policy or PreCompact hook -- even when "compaction" is never said but the problem is context-window pressure or post-summarization memory loss. Do NOT use to summarize a conversation, build RAG, write a summarization prompt (decides WHEN not HOW), or answer max-context-length trivia.
agent-skill-creator
IncludedCreate cross-platform agent skills from workflow descriptions. Activates when users ask to create an agent, automate a repetitive workflow, create a custom skill, or need advanced agent creation. Triggers on phrases like create agent for, automate workflow, create skill for, every day I have to, daily I need to, turn process into agent, need to automate, create a cross-platform skill, validate this skill, export this skill, migrate this skill. Supports single skills, multi-agent suites, transcript processing, template-based creation, interactive configuration, cross-platform export, and spec validation.
llm-wiki
IncludedUse when building or maintaining a persistent personal knowledge base (second brain) in Obsidian where an LLM incrementally ingests sources, updates entity/concept pages, maintains cross-references, and keeps a synthesis current. Triggers include "second brain", "Obsidian wiki", "personal knowledge management", "ingest this paper/article/book", "build a research wiki", "compound knowledge", "Memex", or whenever the user wants knowledge to accumulate across sessions instead of being re-derived by RAG on every query.
skill-master
IncludedAgent Skills authoring, evaluation, and optimization. Create, edit, validate, benchmark, and improve skills following the agentskills.io specification. Use when designing SKILL.md files, structuring skill folders (references, scripts, assets), ingesting external documentation into skills, running trigger evals, benchmarking skill quality, optimizing descriptions, or performing blind A/B comparisons. Keywords: agentskills.io, SKILL.md, skill authoring, eval, benchmark, trigger optimization.