sswarm
Social swarm -- Agent Teams delegate mode 6-phase pipeline with competing agents coordinated via task dependency chains (dispatch ordering) and SendMessage (live coordination overlay), with per-phase lead consolidators
What this skill does
# Social Swarm Pipeline
Agent Teams delegate mode 6-phase development pipeline with **competing parallel agents** and **per-phase lead consolidators**. The command creates a team with dependency-chain task graphs, spawns 5 teammates, then enters a monitoring loop. Phases A1 and A2 feature multiple competing agents whose outputs are consolidated by dedicated lead agents (plan-arbiter, review-lead) via **blockedBy task dependency chains** for dispatch ordering, with **SendMessage as a live coordination overlay** for status broadcasts and handoff signals. Competing agents write to independent temp files (source of truth for hooks); consolidator tasks are blockedBy all competitors and read their output files directly.
## Key Architecture
- `pipeline: "sswarm"` in state.json
- `plugin: "ants"` -- so ants hooks fire
- All agents are `ants:*` prefixed -- they exist in the ants plugin
- **Agent Teams delegate mode** with Command-as-Active-Lead monitoring loop
- Command creates team first (TeamCreate), then populates task graph via TaskCreate with **blockedBy dependency chains**
- Competing agents (3 architects, 3 reviewers) have **no dependencies on each other** -- they run in parallel
- Consolidator tasks (plan-arbiter, review-lead) are **blockedBy all competitors** -- they run after all competitors complete
- A4 verdict is evaluated **inline** by `handle_a3_arbiter()` in the TaskCompleted hook -- no separate agent dispatch
- State schema v6 with additional `phaseLeads` map
- All existing hooks are compatible -- TeammateIdle routes by currentPhase, TaskCompleted validates and advances
- Teammates are routed by the TeammateIdle hook (hook-driven routing, not self-assignment from TaskList)
- Command monitoring loop MUST NOT stop or exit until a terminal condition is met (`<COMPLETION-GATE>` enforcement)
## Key Differences from Swarm
| Feature | swarm | sswarm |
|---------|-------|--------|
| A1 planning | 1 architect | 3 competing architects + plan-arbiter (lead) via blockedBy dependency chain |
| A2 review | 1 blueprint-reviewer | 3 competing reviewers + review-lead (lead) via blockedBy dependency chain |
| Lead agents | None | plan-arbiter (A1), review-lead (A2) -- read competitor output files directly |
| Competitor coordination | N/A | blockedBy task dependencies + SendMessage live overlay |
| Teammate count | 3 | 5 (more parallelism for competing agents) |
| Agent count per run | ~15 agents | ~21 agents (6 more for competing + leads) |
| A0, A3, A4, A5 | Identical | Identical |
| State schema | v6 | v6 + `phaseLeads` map |
| Hooks | All hooks | Same hooks, unchanged |
## 6-Phase Pipeline
```
Phase A0 | EXPLORE | Colony Exploration | foragers + cartographer + explore-aggregator (lead)
Phase A1 | PLAN | Competing Architects | 3 architects (parallel, no deps on each other) → plan-arbiter (blockedBy all 3)
Phase A2 | PLAN | Competing Reviews | 3 blueprint-reviewers (parallel) → review-lead (blockedBy all 3)
Phase A3 | BUILD | Dual-Track Execution | workers (task pool) + 6 sentinels + guardian + simplifier + arbiter
Phase A4 | SYNC | Verdict | TaskCompleted hook evaluates inline (handle_a3_arbiter)
Phase A5 | SHIP | Documentation + Ship | nurse + drone
```
### Pipeline Diagram
```
Command creates team (TeamCreate first), then initial sswarm task graph (12 tasks):
A0-forager-1 ────────┐
A0-forager-2 ────────┤
A0-cartographer ─────┤
└─► A0-explore-aggregator
|
┌────────────┼────────────┐
▼ ▼ ▼
A1-architect-1 A1-architect-2 A1-architect-3 (parallel, no deps on each other)
| | |
└────────────┼────────────┘
▼
A1-plan-arbiter (blockedBy all 3 architects)
reads competitor files, selects/merges -> A1-plan.md + A1-tasks.json
|
┌────────────┼────────────┐
▼ ▼ ▼
A2-reviewer-1 A2-reviewer-2 A2-reviewer-3 (parallel, no deps on each other)
| | |
└────────────┼────────────┘
▼
A2-review-lead (blockedBy all 3 reviewers)
consolidates -> A2-review.json
|
+────────────────+────────────────+
| Phase A3 |
| (dual-track) |
| |
| Build Track | Quality Track (Adversarial)
| (task pool) |
| workers | sentinel-correctness \
| claimed from | sentinel-security \
| pool by | sentinel-perf } parallel
| TeammateIdle | sentinel-style /
| | | guardian /
| build results | simplifier /
| | |
| | review-arbiter consolidates
+────────────────+────────────────+
|
A4 Verdict (evaluated INLINE by handle_a3_arbiter)
/ \
ship loop
| |
A5 Ship A1 (needsLoopReset → command creates fresh competing task graph)
Command spawns 5 teammates (hook-driven routing via TeammateIdle), enters monitoring loop
```
### sswarm Task Graph Structure
The sswarm task graph uses **blockedBy dependency chains** for dispatch ordering, with **SendMessage as a live coordination overlay** for status broadcasts and handoff signals (dual-channel model):
- **Competing agents** (architects at A1, reviewers at A2): 3 independent tasks with no dependencies on each other -- they run in parallel when their phase prerequisites complete
- **Consolidator tasks** (plan-arbiter, review-lead): blockedBy all 3 competitors -- they run only after all competing outputs exist
- **File-based input (primary)**: Consolidator agents read competitor output files at known paths (specified in dispatch prompt). Files are the source of truth validated by hooks.
- **SendMessage (overlay)**: Agents send coordination messages (status updates, completion signals) alongside their file output. SendMessage accelerates coordination but is never required for phase gates.
- **No spawn order constraint**: All tasks are created upfront with dependency declarations; the Agent Teams runtime schedules them automatically
## Phase Details
### Phase A0: Colony Exploration
Same as swarm — foragers + cartographer + explore-aggregator.
Output: `.agents/tmp/phases/A0-explore.md`
### Phase A1: Competing Architects
The command creates **3 architect tasks** (A1-architect-1, A1-architect-2, A1-architect-3) all blockedBy the A0 explore-aggregator task -- they run in parallel with no dependencies on each other. Each architect independently explores the context and writes a plan to a unique temp file.
The command also creates an **A1-plan-arbiter** task blockedBy all 3 architect tasks. The plan-arbiter reads all 3 competitor output files (specified in its dispatch prompt), evaluates on five criteria (completeness, feasibility, task count, risk, dependency correctness), selects the best plan or synthesizes a merged plan, and writes the canonical output files.
**Dependency chain (replaces spawn order):**
- `A1-architect-1`, `A1-architect-2`, `A1-architect-3` -- all blockedBy `[A0Related 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.