From 99685319fd672ab398e4a9854208ecb58ac28f4d Mon Sep 17 00:00:00 2001
From: Kieran Klaassen
Date: Sun, 25 Jan 2026 19:38:05 -0500
Subject: [PATCH 1/3] feat(commands): add /slfg swarm-based autonomous
engineering workflow
Add new /slfg command that uses TeammateTool to spawn specialized agents
(Planner, Researcher, Worker, Reviewer, Tester, Resolver, Video) that work
in parallel on different phases of the development lifecycle.
Key features:
- Parallel execution: planning + research run simultaneously
- Shared task list with dependencies for coordination
- Team lead orchestrates and approves plans before implementation
- Review + testing run in parallel after implementation
- Full autonomous workflow from feature description to PR with video
This provides maximum parallelism compared to the sequential /lfg command.
Co-Authored-By: Claude Opus 4.5
---
.../2026-01-25-feat-swarm-lfg-command-plan.md | 453 ++++++++++++++
.../.claude-plugin/plugin.json | 4 +-
plugins/compound-engineering/CHANGELOG.md | 20 +
plugins/compound-engineering/README.md | 15 +-
plugins/compound-engineering/commands/slfg.md | 557 ++++++++++++++++++
5 files changed, 1043 insertions(+), 6 deletions(-)
create mode 100644 docs/plans/2026-01-25-feat-swarm-lfg-command-plan.md
create mode 100644 plugins/compound-engineering/commands/slfg.md
diff --git a/docs/plans/2026-01-25-feat-swarm-lfg-command-plan.md b/docs/plans/2026-01-25-feat-swarm-lfg-command-plan.md
new file mode 100644
index 0000000..a77755c
--- /dev/null
+++ b/docs/plans/2026-01-25-feat-swarm-lfg-command-plan.md
@@ -0,0 +1,453 @@
+---
+title: "feat: Add /slfg Swarm-Based Autonomous Engineering Workflow"
+type: feat
+date: 2026-01-25
+---
+
+# feat: Add /slfg Swarm-Based Autonomous Engineering Workflow
+
+## Overview
+
+Create a new `/slfg` (Swarm LFG) command that transforms the existing sequential `/lfg` workflow into a fully autonomous, parallel swarm-based engineering pipeline. The swarm uses Claude's TeammateTool to spawn specialized teammates that work concurrently on different phases of the development lifecycle, with a team lead orchestrating the work.
+
+**Key difference from `/lfg`:** Instead of running commands sequentially (plan → deepen → work → review → resolve → test → video), the swarm spawns specialized agents that work in parallel where possible, coordinate through task lists, and communicate via the TeammateTool messaging system.
+
+## Problem Statement / Motivation
+
+The current `/lfg` command runs phases sequentially:
+1. `/workflows:plan` (blocking)
+2. `/deepen-plan` (blocking)
+3. `/workflows:work` (blocking)
+4. `/workflows:review` (blocking)
+5. `/resolve_todo_parallel` (parallel within phase, but phase is blocking)
+6. `/test-browser` (blocking)
+7. `/feature-video` (blocking)
+
+This means:
+- **Total time = sum of all phases** - no overlap
+- **No concurrent research** - research agents in deepen-plan could run while planning continues
+- **Sequential bottlenecks** - waiting on slow phases blocks everything
+- **Single context** - one agent holds all context, risking context overflow
+
+**The swarm approach:**
+- **Parallel execution** - Multiple agents work simultaneously
+- **Shared task list** - Coordination through structured tasks with dependencies
+- **Specialized teammates** - Each agent focuses on their specialty
+- **Autonomous operation** - Team lead orchestrates, teammates execute independently
+- **Context distribution** - Each agent manages its own context
+
+## Proposed Solution
+
+### Architecture: Swarm-Based Engineering Team
+
+```
+┌─────────────────────────────────────────────────────────────────┐
+│ TEAM LEAD │
+│ (Orchestrates, assigns tasks, approves plans, handles decisions)│
+└─────────────────────────────────────────────────────────────────┘
+ │
+ ┌───────────────────┼───────────────────┐
+ ▼ ▼ ▼
+ ┌──────────┐ ┌──────────┐ ┌──────────┐
+ │ Planner │ │Researcher│ │ Worker │
+ │ Agent │ │ Agent │ │ Agent │
+ └──────────┘ └──────────┘ └──────────┘
+ │ │ │
+ ▼ ▼ ▼
+ ┌──────────┐ ┌──────────┐ ┌──────────┐
+ │ Reviewer │ │ Tester │ │ Video │
+ │ Agent │ │ Agent │ │ Agent │
+ └──────────┘ └──────────┘ └──────────┘
+```
+
+### Workflow Phases
+
+```mermaid
+graph TD
+ A[Start /slfg] --> B[Team Lead: Create Team & Tasks]
+ B --> C[Spawn Planner Agent]
+ B --> D[Spawn Researcher Agent]
+ C --> E{Plan Complete?}
+ D --> F[Research Results Ready]
+ F --> E
+ E -->|Yes| G[Team Lead: Approve Plan]
+ G --> H[Spawn Worker Agent]
+ H --> I{Implementation Complete?}
+ I -->|Yes| J[Spawn Reviewer Agent]
+ I -->|Yes| K[Spawn Tester Agent]
+ J --> L{Review Complete?}
+ K --> M{Tests Pass?}
+ L --> N[Spawn Resolver Agents in Parallel]
+ M --> N
+ N --> O{All Resolved?}
+ O -->|Yes| P[Spawn Video Agent]
+ P --> Q[Create PR with Video]
+ Q --> R[Team Lead: Cleanup & Report]
+```
+
+### Agent Roles
+
+| Agent | Role | Tools/Skills | Works With |
+|-------|------|--------------|------------|
+| **Team Lead** | Orchestrate, approve plans, handle decisions | TeammateTool, TaskList, AskUserQuestion | All agents |
+| **Planner** | Create implementation plan | workflows:plan, AskUserQuestion | Researcher |
+| **Researcher** | Deepen plan with research | deepen-plan, Context7, WebSearch | Planner |
+| **Worker** | Implement the plan | Edit, Write, Bash, git | Team Lead |
+| **Reviewer** | Review implementation | All review agents (kieran, dhh, security, etc.) | Worker |
+| **Tester** | Run browser tests | agent-browser, test-browser skill | Worker |
+| **Resolver** | Fix review findings | pr-comment-resolver pattern | Reviewer |
+| **Video** | Record feature demo | feature-video skill | Worker |
+
+### Coordination Mechanisms
+
+#### 1. Task List (Shared Workspace)
+```
+~/.claude/tasks/{team-name}/
+├── 001-pending-p1-create-plan.md
+├── 002-pending-p1-research-best-practices.md
+├── 003-blocked-p1-implement-feature.md # blockedBy: [001, 002]
+├── 004-blocked-p2-review-implementation.md # blockedBy: [003]
+├── 005-blocked-p2-run-browser-tests.md # blockedBy: [003]
+├── 006-blocked-p3-resolve-findings.md # blockedBy: [004, 005]
+└── 007-blocked-p3-record-video.md # blockedBy: [006]
+```
+
+#### 2. Teammate Messaging
+- **Team Lead → Teammate**: Task assignment, plan approval, shutdown requests
+- **Teammate → Team Lead**: Idle notification, completion status, blockers
+- **Teammate → Teammate**: Direct coordination when needed
+
+#### 3. Plan Mode for Critical Phases
+- **Planner Agent** uses `plan_mode_required: true`
+- Team Lead receives plan approval requests
+- Plan must be approved before Worker begins
+
+## Technical Approach
+
+### Phase 1: Command Setup
+
+**File:** `plugins/compound-engineering/commands/slfg.md`
+
+```markdown
+---
+name: slfg
+description: Swarm-based autonomous engineering workflow
+argument-hint: "[feature description]"
+---
+
+# Swarm LFG - Full Autonomous Engineering
+
+## Step 1: Create Swarm Team
+
+Use TeammateTool to create a new team:
+
+\`\`\`
+Teammate operation: spawnTeam
+team_name: "slfg-{timestamp}"
+description: "Autonomous engineering swarm for: {feature_description}"
+\`\`\`
+
+## Step 2: Create Task List
+
+Use TaskCreate to create the full task dependency graph:
+
+1. **Plan Feature** (P1, no dependencies)
+ - Subject: "Create implementation plan"
+ - Description: "Run /workflows:plan for: {feature_description}"
+
+2. **Research & Deepen** (P1, no dependencies - runs parallel with planning)
+ - Subject: "Research best practices"
+ - Description: "Run /deepen-plan research agents"
+
+3. **Implement Feature** (P1, blockedBy: [1, 2])
+ - Subject: "Implement the approved plan"
+ - Description: "Run /workflows:work on the plan file"
+
+4. **Review Implementation** (P2, blockedBy: [3])
+ - Subject: "Review code changes"
+ - Description: "Run /workflows:review agents"
+
+5. **Test in Browser** (P2, blockedBy: [3])
+ - Subject: "Run browser tests"
+ - Description: "Run /test-browser on affected pages"
+
+6. **Resolve Findings** (P2, blockedBy: [4, 5])
+ - Subject: "Fix review findings and test failures"
+ - Description: "Run /resolve_todo_parallel"
+
+7. **Record Video** (P3, blockedBy: [6])
+ - Subject: "Record feature demo"
+ - Description: "Run /feature-video for PR"
+
+8. **Create PR** (P3, blockedBy: [7])
+ - Subject: "Create pull request"
+ - Description: "Push and create PR with video"
+
+## Step 3: Spawn Teammates
+
+Spawn teammates for parallel phases using Task tool:
+
+\`\`\`
+# Spawn Planner (with plan_mode_required)
+Task general-purpose:
+ team_name: "slfg-{timestamp}"
+ name: "planner"
+ mode: "plan"
+ prompt: "You are the Planner. Claim task #1 (Create implementation plan).
+ Run /workflows:plan for: {feature_description}
+ When complete, use ExitPlanMode to request approval."
+
+# Spawn Researcher (runs in parallel)
+Task general-purpose:
+ team_name: "slfg-{timestamp}"
+ name: "researcher"
+ prompt: "You are the Researcher. Claim task #2 (Research best practices).
+ Research patterns, best practices, and documentation for: {feature_description}
+ Write findings to docs/research/{feature}.md
+ Mark task complete when done."
+\`\`\`
+
+## Step 4: Orchestration Loop
+
+Team Lead monitors and orchestrates:
+
+1. **Wait for Plan Approval Request**
+ - Receive `plan_approval_request` message from Planner
+ - Review the plan
+ - Use `approvePlan` or `rejectPlan` with feedback
+
+2. **Spawn Worker After Approval**
+ - Once plan approved + research complete
+ - Spawn Worker agent to implement
+
+3. **Spawn Review + Test in Parallel**
+ - Once implementation complete
+ - Spawn Reviewer and Tester simultaneously
+
+4. **Spawn Resolvers**
+ - Once review + tests complete
+ - Spawn resolver agents for each finding (parallel)
+
+5. **Spawn Video Agent**
+ - Once all findings resolved
+ - Record and upload feature demo
+
+6. **Create PR & Cleanup**
+ - Create PR with video
+ - Use `cleanup` operation to remove team resources
+ - Report final status to user
+
+## Step 5: Completion
+
+Output summary:
+- PR URL
+- Time taken
+- Agents spawned
+- Tasks completed
+```
+
+### Phase 2: Teammate Agent Prompts
+
+Each spawned teammate needs specific instructions:
+
+#### Planner Agent
+```markdown
+You are the **Planner** for the slfg swarm.
+
+Your job:
+1. Read your assigned task using TaskGet
+2. Run /workflows:plan for the feature
+3. Use ExitPlanMode when plan is ready for approval
+4. Wait for approval before marking task complete
+
+You have plan_mode_required enabled. You MUST get approval before implementation begins.
+
+When you finish or are blocked, send a message to the team lead.
+```
+
+#### Worker Agent
+```markdown
+You are the **Worker** for the slfg swarm.
+
+Your job:
+1. Read the approved plan file
+2. Implement following /workflows:work patterns
+3. Create incremental commits
+4. Mark your task complete when implementation is done
+
+Push to a feature branch, not main.
+```
+
+#### Reviewer Agent
+```markdown
+You are the **Reviewer** for the slfg swarm.
+
+Your job:
+1. Run all review agents in parallel against the changes
+2. Create todos for each finding in todos/ directory
+3. Synthesize findings
+4. Mark your task complete
+
+Do NOT fix the issues - just document them for the Resolver agents.
+```
+
+### Phase 3: Error Handling & Recovery
+
+| Scenario | Handling |
+|----------|----------|
+| Teammate fails | Team Lead receives error, can respawn or handle manually |
+| Plan rejected | Planner revises and resubmits |
+| Tests fail | Create P1 todos, spawn resolvers to fix |
+| Context overflow | Checkpoint/resume with fresh context |
+| User interrupt | Cleanup team, preserve work |
+
+### Phase 4: Progress Visibility
+
+The team lead maintains visibility:
+
+```markdown
+## Swarm Status: slfg-20260125-123456
+
+**Feature:** Add user authentication
+
+| Task | Status | Agent | Progress |
+|------|--------|-------|----------|
+| Create plan | Complete | planner | 100% |
+| Research | Complete | researcher | 100% |
+| Implement | In Progress | worker | 60% |
+| Review | Pending | - | - |
+| Test | Pending | - | - |
+| Resolve | Pending | - | - |
+| Video | Pending | - | - |
+
+**Active Agents:** 1 (worker)
+**Messages:** 12 received
+**Elapsed:** 4m 32s
+```
+
+## Acceptance Criteria
+
+### Functional Requirements
+- [ ] `/slfg` command creates a team and task list
+- [ ] Planner and Researcher run in parallel at start
+- [ ] Plan requires team lead approval before implementation
+- [ ] Worker implements after plan approval
+- [ ] Reviewer and Tester run in parallel after implementation
+- [ ] Resolver agents fix findings in parallel
+- [ ] Video agent records demo
+- [ ] PR created with all artifacts
+- [ ] Team resources cleaned up on completion
+
+### Non-Functional Requirements
+- [ ] Faster than sequential `/lfg` for multi-phase workflows
+- [ ] Graceful handling of agent failures
+- [ ] Progress visible to user throughout
+- [ ] Context distributed across agents (no single-agent overflow)
+- [ ] Works with existing commands/skills (composition)
+
+### Quality Gates
+- [ ] All spawned agents complete their tasks
+- [ ] No orphaned team resources after completion
+- [ ] Plan approval gate enforced
+- [ ] Final PR includes video and proper description
+
+## Dependencies & Prerequisites
+
+1. **TeammateTool** - Already available in Claude Code
+2. **Task tools** (TaskCreate, TaskUpdate, TaskList, TaskGet) - Already available
+3. **Existing commands** - /workflows:plan, /workflows:work, etc.
+4. **Agent spawning** - Task tool with team_name and name parameters
+
+## Risk Analysis & Mitigation
+
+| Risk | Likelihood | Impact | Mitigation |
+|------|------------|--------|------------|
+| Agent coordination failures | Medium | High | Explicit task dependencies, team lead oversight |
+| Context overflow in team lead | Medium | Medium | Delegate work, keep lead context light |
+| Deadlock from circular dependencies | Low | High | Linear task dependency graph |
+| Orphaned agents | Medium | Low | Shutdown requests, timeout cleanup |
+| Plan approval bottleneck | Medium | Medium | Clear approval criteria, fast feedback |
+
+## Implementation Phases
+
+### MVP (Phase 1)
+- [ ] Create `/slfg` command with basic team creation
+- [ ] Implement task list creation with dependencies
+- [ ] Spawn Planner + Researcher in parallel
+- [ ] Plan approval flow with team lead
+- [ ] Spawn Worker after approval
+- [ ] Basic completion and cleanup
+
+### Enhanced (Phase 2)
+- [ ] Parallel Reviewer + Tester spawning
+- [ ] Dynamic Resolver agent spawning
+- [ ] Video agent integration
+- [ ] Progress dashboard output
+- [ ] Error recovery and retry
+
+### Polished (Phase 3)
+- [ ] Checkpoint/resume for interrupted swarms
+- [ ] Cost tracking per agent
+- [ ] Performance metrics (time savings vs /lfg)
+- [ ] User configuration options
+
+## Files to Create/Modify
+
+| File | Action | Description |
+|------|--------|-------------|
+| `commands/slfg.md` | Create | Main swarm command |
+| `skills/swarm-engineering/SKILL.md` | Create | Skill with teammate prompts |
+| `README.md` | Update | Add /slfg to command list |
+| `CHANGELOG.md` | Update | Document new feature |
+| `.claude-plugin/plugin.json` | Update | Bump version, update counts |
+
+## References & Research
+
+### Internal References
+- `/lfg` command: `plugins/compound-engineering/commands/lfg.md`
+- Agent-native architecture: `plugins/compound-engineering/skills/agent-native-architecture/SKILL.md`
+- Execution patterns: `plugins/compound-engineering/skills/agent-native-architecture/references/agent-execution-patterns.md`
+- Parallel resolution: `plugins/compound-engineering/commands/resolve_parallel.md`
+
+### TeammateTool Operations
+From system prompt:
+- `spawnTeam` - Create a new team
+- `write` - Send message to ONE teammate
+- `broadcast` - Send to ALL teammates (use sparingly)
+- `approvePlan` / `rejectPlan` - Handle plan approval requests
+- `requestShutdown` / `approveShutdown` - Graceful shutdown
+- `cleanup` - Remove team and task directories
+
+### Task Tool Integration
+- `team_name` parameter to join spawned agents to team
+- `name` parameter to give agents identifiable names
+- `mode: "plan"` for plan_mode_required behavior
+
+## Alternative Approaches Considered
+
+### Alternative 1: Enhanced Sequential (Rejected)
+Keep `/lfg` sequential but add more parallelism within phases.
+- **Rejected because:** Doesn't leverage full swarm capabilities, still fundamentally sequential.
+
+### Alternative 2: Background Agents Only (Rejected)
+Use `run_in_background` instead of teams for parallelism.
+- **Rejected because:** No coordination mechanism, no shared task list, harder to monitor.
+
+### Alternative 3: Hybrid Sequential/Parallel (Considered)
+Some phases sequential (plan→implement), some parallel (review+test).
+- **This is actually what we're proposing** - Respects natural dependencies while maximizing parallelism.
+
+## Success Metrics
+
+1. **Time to PR** - Should be faster than sequential `/lfg` for non-trivial features
+2. **Context efficiency** - No single agent exceeds context limits
+3. **Completion rate** - High percentage of swarms complete successfully
+4. **User satisfaction** - Clear progress visibility, fewer interruptions
+
+---
+
+**Next Steps:**
+1. Review and approve this plan
+2. Implement MVP (Phase 1)
+3. Test with a real feature implementation
+4. Iterate based on learnings
diff --git a/plugins/compound-engineering/.claude-plugin/plugin.json b/plugins/compound-engineering/.claude-plugin/plugin.json
index 97ea742..a9f29f9 100644
--- a/plugins/compound-engineering/.claude-plugin/plugin.json
+++ b/plugins/compound-engineering/.claude-plugin/plugin.json
@@ -1,7 +1,7 @@
{
"name": "compound-engineering",
- "version": "2.28.0",
- "description": "AI-powered development tools. 28 agents, 24 commands, 15 skills, 1 MCP server for code review, research, design, and workflow automation.",
+ "version": "2.29.0",
+ "description": "AI-powered development tools. 28 agents, 25 commands, 15 skills, 1 MCP server for code review, research, design, and workflow automation.",
"author": {
"name": "Kieran Klaassen",
"email": "kieran@every.to",
diff --git a/plugins/compound-engineering/CHANGELOG.md b/plugins/compound-engineering/CHANGELOG.md
index dd1c7f9..3f9eb59 100644
--- a/plugins/compound-engineering/CHANGELOG.md
+++ b/plugins/compound-engineering/CHANGELOG.md
@@ -5,6 +5,26 @@ All notable changes to the compound-engineering plugin will be documented in thi
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
+## [2.29.0] - 2026-01-25
+
+### Added
+
+- **`/slfg` command** - Swarm-based autonomous engineering workflow using TeammateTool
+ - Spawns specialized agents (Planner, Researcher, Worker, Reviewer, Tester, Resolver, Video) that work in parallel
+ - Coordinates through shared task list with dependencies
+ - Team lead orchestrates and approves plans before implementation
+ - Maximizes parallelism: planning + research run simultaneously, review + testing run simultaneously
+ - Full autonomous workflow from feature description to PR with video
+
+---
+
+## [2.28.1] - 2026-01-22
+
+### Fixed
+
+- **Documentation** - Updated component counts and added missing entries in README, HTML docs, and metadata to reflect 28 agents, 24 commands, and 15 skills
+- **Slash Commands** - Corrected documentation for recently added commands (`lfg`, `release-docs`, `deploy-docs`)
+
## [2.28.0] - 2026-01-21
### Added
diff --git a/plugins/compound-engineering/README.md b/plugins/compound-engineering/README.md
index b1a710d..78ef65e 100644
--- a/plugins/compound-engineering/README.md
+++ b/plugins/compound-engineering/README.md
@@ -6,9 +6,9 @@ AI-powered development tools that get smarter with every use. Make each unit of
| Component | Count |
|-----------|-------|
-| Agents | 27 |
-| Commands | 20 |
-| Skills | 14 |
+| Agents | 28 |
+| Commands | 25 |
+| Skills | 15 |
| MCP Servers | 1 |
## Agents
@@ -34,13 +34,14 @@ Agents are organized into categories for easier discovery.
| `security-sentinel` | Security audits and vulnerability assessments |
| `julik-frontend-races-reviewer` | Review JavaScript/Stimulus code for race conditions |
-### Research (4)
+### Research (5)
| Agent | Description |
|-------|-------------|
| `best-practices-researcher` | Gather external best practices and examples |
| `framework-docs-researcher` | Research framework documentation and best practices |
| `git-history-analyzer` | Analyze git history and code evolution |
+| `learnings-researcher` | Research and synthesize team learnings and patterns |
| `repo-research-analyst` | Research repository structure and conventions |
### Design (3)
@@ -85,12 +86,17 @@ Core workflow commands use `workflows:` prefix to avoid collisions with built-in
| Command | Description |
|---------|-------------|
+| `/agent-native-audit` | Audit features for agent-native compliance |
| `/deepen-plan` | Enhance plans with parallel research agents for each section |
| `/changelog` | Create engaging changelogs for recent merges |
| `/create-agent-skill` | Create or edit Claude Code skills |
+| `/deploy-docs` | Deploy documentation to GitHub Pages |
| `/generate_command` | Generate new slash commands |
| `/heal-skill` | Fix skill documentation issues |
+| `/lfg` | Sequential autonomous engineering workflow |
+| `/slfg` | Swarm-based autonomous engineering with parallel agents |
| `/plan_review` | Multi-agent plan review in parallel |
+| `/release-docs` | Build and release plugin documentation |
| `/report-bug` | Report a bug in the plugin |
| `/reproduce-bug` | Reproduce bugs using logs and console |
| `/resolve_parallel` | Resolve TODO comments in parallel |
@@ -108,6 +114,7 @@ Core workflow commands use `workflows:` prefix to avoid collisions with built-in
| Skill | Description |
|-------|-------------|
| `agent-native-architecture` | Build AI agents using prompt-native architecture |
+| `brainstorming` | Expert guidance for brainstorming and exploring ideas |
### Development Tools
diff --git a/plugins/compound-engineering/commands/slfg.md b/plugins/compound-engineering/commands/slfg.md
new file mode 100644
index 0000000..b9fb506
--- /dev/null
+++ b/plugins/compound-engineering/commands/slfg.md
@@ -0,0 +1,557 @@
+---
+name: slfg
+description: Swarm-based autonomous engineering workflow with parallel agents
+argument-hint: "[feature description]"
+---
+
+# Swarm LFG - Full Autonomous Engineering with Parallel Agents
+
+Transform a feature description into a shipped PR using a coordinated swarm of specialized agents working in parallel.
+
+## Feature Description
+
+ #$ARGUMENTS
+
+**If the feature description above is empty, ask the user:** "What feature would you like to build? Please describe it clearly."
+
+Do not proceed until you have a clear feature description.
+
+## Swarm Architecture
+
+```
+ ┌─────────────────┐
+ │ TEAM LEAD │
+ │ (You - Orchestrator) │
+ └────────┬────────┘
+ │
+ ┌───────────────────┼───────────────────┐
+ ▼ ▼ ▼
+ ┌──────────┐ ┌──────────┐ ┌──────────┐
+ │ Planner │ │Researcher│ │ Worker │
+ └──────────┘ └──────────┘ └──────────┘
+ │ │ │
+ ▼ ▼ ▼
+ ┌──────────┐ ┌──────────┐ ┌──────────┐
+ │ Reviewer │ │ Tester │ │Resolver(s)│
+ └──────────┘ └──────────┘ └──────────┘
+ │
+ ▼
+ ┌──────────┐
+ │ Video │
+ └──────────┘
+```
+
+## Step 1: Create Swarm Team
+
+Create a new team for this engineering swarm:
+
+```
+TeammateTool:
+ operation: spawnTeam
+ team_name: "slfg-{YYYYMMDD-HHMMSS}"
+ description: "Swarm for: {feature_description}"
+```
+
+Store the team name for use throughout this workflow.
+
+## Step 2: Create Task List with Dependencies
+
+Create all tasks upfront with their dependency relationships:
+
+### Task 1: Create Implementation Plan
+```
+TaskCreate:
+ subject: "Create implementation plan"
+ description: |
+ Run /workflows:plan for: {feature_description}
+ Write plan to docs/plans/ following naming convention.
+ Use ExitPlanMode when ready for approval.
+ activeForm: "Planning feature"
+```
+
+### Task 2: Research Best Practices (Parallel with Task 1)
+```
+TaskCreate:
+ subject: "Research best practices and patterns"
+ description: |
+ Research using:
+ - Context7 for framework documentation
+ - WebSearch for current best practices
+ - Codebase patterns via repo-research-analyst
+ Write findings to enhance the plan.
+ activeForm: "Researching patterns"
+```
+
+### Task 3: Implement Feature (Blocked by 1 & 2)
+```
+TaskCreate:
+ subject: "Implement the approved plan"
+ description: |
+ Run /workflows:work on the approved plan.
+ Create incremental commits.
+ Push to feature branch.
+ activeForm: "Implementing feature"
+```
+Then: `TaskUpdate taskId: 3, addBlockedBy: ["1", "2"]`
+
+### Task 4: Review Implementation (Blocked by 3)
+```
+TaskCreate:
+ subject: "Review code changes"
+ description: |
+ Run parallel review agents:
+ - kieran-rails-reviewer
+ - dhh-rails-reviewer
+ - code-simplicity-reviewer
+ - security-sentinel
+ - performance-oracle
+ Create todos for findings in todos/ directory.
+ activeForm: "Reviewing implementation"
+```
+Then: `TaskUpdate taskId: 4, addBlockedBy: ["3"]`
+
+### Task 5: Run Browser Tests (Blocked by 3, Parallel with 4)
+```
+TaskCreate:
+ subject: "Run browser tests"
+ description: |
+ Run /test-browser on affected pages.
+ Create P1 todos for any failures.
+ activeForm: "Running browser tests"
+```
+Then: `TaskUpdate taskId: 5, addBlockedBy: ["3"]`
+
+### Task 6: Resolve Findings (Blocked by 4 & 5)
+```
+TaskCreate:
+ subject: "Fix review findings and test failures"
+ description: |
+ Run /resolve_todo_parallel on all pending todos.
+ Re-run tests after fixes.
+ activeForm: "Resolving findings"
+```
+Then: `TaskUpdate taskId: 6, addBlockedBy: ["4", "5"]`
+
+### Task 7: Record Feature Video (Blocked by 6)
+```
+TaskCreate:
+ subject: "Record feature demo video"
+ description: |
+ Run /feature-video for the PR.
+ Upload and embed in PR description.
+ activeForm: "Recording demo video"
+```
+Then: `TaskUpdate taskId: 7, addBlockedBy: ["6"]`
+
+### Task 8: Create Pull Request (Blocked by 7)
+```
+TaskCreate:
+ subject: "Create pull request"
+ description: |
+ Push all changes.
+ Create PR with summary, screenshots, video.
+ Include Compound Engineered badge.
+ activeForm: "Creating pull request"
+```
+Then: `TaskUpdate taskId: 8, addBlockedBy: ["7"]`
+
+## Step 3: Spawn Phase 1 Agents (Parallel)
+
+Spawn Planner and Researcher agents to work simultaneously:
+
+### Spawn Planner Agent
+```
+Task:
+ subagent_type: general-purpose
+ team_name: "{team_name}"
+ name: "planner"
+ mode: "plan"
+ prompt: |
+ # Planner Agent
+
+ You are the **Planner** for the slfg engineering swarm.
+
+ ## Your Task
+ TaskGet taskId: "1" to read your full assignment.
+
+ ## Instructions
+ 1. Claim your task: TaskUpdate taskId: "1", status: "in_progress", owner: "planner"
+ 2. Run /workflows:plan for: {feature_description}
+ 3. Create a comprehensive plan in docs/plans/
+ 4. When plan is ready, use ExitPlanMode to request team lead approval
+ 5. After approval, mark complete: TaskUpdate taskId: "1", status: "completed"
+
+ ## Communication
+ - You are part of team: {team_name}
+ - Your name is: planner
+ - Send messages to team-lead if you have questions or are blocked
+
+ Work autonomously. Your plan will be reviewed before implementation begins.
+```
+
+### Spawn Researcher Agent
+```
+Task:
+ subagent_type: general-purpose
+ team_name: "{team_name}"
+ name: "researcher"
+ prompt: |
+ # Researcher Agent
+
+ You are the **Researcher** for the slfg engineering swarm.
+
+ ## Your Task
+ TaskGet taskId: "2" to read your full assignment.
+
+ ## Instructions
+ 1. Claim your task: TaskUpdate taskId: "2", status: "in_progress", owner: "researcher"
+ 2. Research best practices for: {feature_description}
+ 3. Use these tools:
+ - mcp__plugin_compound-engineering_context7__resolve-library-id
+ - mcp__plugin_compound-engineering_context7__query-docs
+ - WebSearch for current (2026) best practices
+ - Grep/Glob to find similar patterns in codebase
+ 4. Write findings to docs/research/ or add to the plan file
+ 5. Mark complete: TaskUpdate taskId: "2", status: "completed"
+
+ ## Communication
+ - You are part of team: {team_name}
+ - Your name is: researcher
+ - Send findings to planner if they should inform the plan
+ - Send messages to team-lead if blocked
+
+ Work autonomously and thoroughly.
+```
+
+**Launch both agents in parallel** (single message with multiple Task tool calls).
+
+## Step 4: Handle Plan Approval
+
+As team lead, you will receive a `plan_approval_request` message from the Planner agent.
+
+### When you receive the plan approval request:
+
+1. **Read the plan file** to review what's proposed
+2. **Evaluate the plan:**
+ - Is it complete and actionable?
+ - Does it follow project conventions?
+ - Are dependencies identified?
+ - Is the scope appropriate?
+
+3. **Approve or Reject:**
+
+ **To Approve:**
+ ```
+ TeammateTool:
+ operation: approvePlan
+ target_agent_id: "planner"
+ request_id: "{requestId from message}"
+ ```
+
+ **To Reject with Feedback:**
+ ```
+ TeammateTool:
+ operation: rejectPlan
+ target_agent_id: "planner"
+ request_id: "{requestId from message}"
+ feedback: "Please add more detail about error handling..."
+ ```
+
+4. **Wait for both Phase 1 tasks to complete** before proceeding.
+
+## Step 5: Spawn Worker Agent
+
+Once Tasks 1 and 2 are complete:
+
+```
+Task:
+ subagent_type: general-purpose
+ team_name: "{team_name}"
+ name: "worker"
+ prompt: |
+ # Worker Agent
+
+ You are the **Worker** for the slfg engineering swarm.
+
+ ## Your Task
+ TaskGet taskId: "3" to read your full assignment.
+
+ ## Instructions
+ 1. Claim your task: TaskUpdate taskId: "3", status: "in_progress", owner: "worker"
+ 2. Read the approved plan at docs/plans/{plan_file}
+ 3. Run /workflows:work following the plan exactly
+ 4. Create incremental commits with conventional messages
+ 5. Push to feature branch (never main)
+ 6. Mark complete: TaskUpdate taskId: "3", status: "completed"
+
+ ## Communication
+ - You are part of team: {team_name}
+ - Your name is: worker
+ - Send progress updates to team-lead for significant milestones
+ - Send messages to team-lead if blocked
+
+ Work autonomously. Focus on completing the implementation.
+```
+
+## Step 6: Spawn Reviewer and Tester (Parallel)
+
+Once Task 3 (implementation) is complete, spawn both:
+
+### Spawn Reviewer Agent
+```
+Task:
+ subagent_type: general-purpose
+ team_name: "{team_name}"
+ name: "reviewer"
+ prompt: |
+ # Reviewer Agent
+
+ You are the **Reviewer** for the slfg engineering swarm.
+
+ ## Your Task
+ TaskGet taskId: "4" to read your full assignment.
+
+ ## Instructions
+ 1. Claim your task: TaskUpdate taskId: "4", status: "in_progress", owner: "reviewer"
+ 2. Get the changed files: git diff main...HEAD --name-only
+ 3. Spawn parallel review agents:
+ - Task kieran-rails-reviewer("Review the changes")
+ - Task code-simplicity-reviewer("Review for simplicity")
+ - Task security-sentinel("Check for security issues")
+ - Task performance-oracle("Check for performance issues")
+ 4. Create todos for ALL findings in todos/ directory
+ 5. Mark complete: TaskUpdate taskId: "4", status: "completed"
+
+ ## Communication
+ - You are part of team: {team_name}
+ - Your name is: reviewer
+ - Send summary to team-lead when complete
+
+ Document findings but do NOT fix them. Resolvers handle fixes.
+```
+
+### Spawn Tester Agent
+```
+Task:
+ subagent_type: general-purpose
+ team_name: "{team_name}"
+ name: "tester"
+ prompt: |
+ # Tester Agent
+
+ You are the **Tester** for the slfg engineering swarm.
+
+ ## Your Task
+ TaskGet taskId: "5" to read your full assignment.
+
+ ## Instructions
+ 1. Claim your task: TaskUpdate taskId: "5", status: "in_progress", owner: "tester"
+ 2. Identify affected pages from git diff
+ 3. Run /test-browser on each affected page
+ 4. Create P1 todos for any test failures in todos/
+ 5. Mark complete: TaskUpdate taskId: "5", status: "completed"
+
+ ## Communication
+ - You are part of team: {team_name}
+ - Your name is: tester
+ - Send results summary to team-lead
+
+ Document failures as todos but do NOT fix them.
+```
+
+**Launch both in parallel.**
+
+## Step 7: Spawn Resolver Agents
+
+Once Tasks 4 and 5 are complete:
+
+```
+Task:
+ subagent_type: general-purpose
+ team_name: "{team_name}"
+ name: "resolver"
+ prompt: |
+ # Resolver Agent
+
+ You are the **Resolver** for the slfg engineering swarm.
+
+ ## Your Task
+ TaskGet taskId: "6" to read your full assignment.
+
+ ## Instructions
+ 1. Claim your task: TaskUpdate taskId: "6", status: "in_progress", owner: "resolver"
+ 2. List all pending todos: ls todos/*-pending-*.md
+ 3. For each todo, spawn a parallel resolver:
+ - Task pr-comment-resolver("Fix: {todo_description}")
+ 4. Re-run tests after fixes if needed
+ 5. Mark complete: TaskUpdate taskId: "6", status: "completed"
+
+ ## Communication
+ - You are part of team: {team_name}
+ - Your name is: resolver
+
+ Fix all findings. Commit after each fix.
+```
+
+## Step 8: Spawn Video Agent
+
+Once Task 6 is complete:
+
+```
+Task:
+ subagent_type: general-purpose
+ team_name: "{team_name}"
+ name: "video"
+ prompt: |
+ # Video Agent
+
+ You are the **Video** agent for the slfg engineering swarm.
+
+ ## Your Task
+ TaskGet taskId: "7" to read your full assignment.
+
+ ## Instructions
+ 1. Claim your task: TaskUpdate taskId: "7", status: "in_progress", owner: "video"
+ 2. Run /feature-video for the current PR
+ 3. Ensure video is uploaded and embedded in PR
+ 4. Mark complete: TaskUpdate taskId: "7", status: "completed"
+
+ ## Communication
+ - You are part of team: {team_name}
+ - Your name is: video
+```
+
+## Step 9: Create Pull Request
+
+Once Task 7 is complete, handle Task 8 yourself (Team Lead):
+
+1. Claim the task: `TaskUpdate taskId: "8", status: "in_progress", owner: "team-lead"`
+
+2. Push all changes:
+ ```bash
+ git push -u origin {branch_name}
+ ```
+
+3. Create PR:
+ ```bash
+ gh pr create --title "feat: {feature_description}" --body "$(cat <<'EOF'
+ ## Summary
+ - {what was built}
+ - {key decisions}
+
+ ## Demo
+ {video embed from /feature-video}
+
+ ## Testing
+ - Browser tests: {pass/fail}
+ - Review agents: {findings resolved}
+
+ ## Swarm Stats
+ - Agents spawned: {count}
+ - Tasks completed: 8/8
+ - Team: {team_name}
+
+ ---
+ [](https://github.com/EveryInc/compound-engineering-plugin)
+ Autonomous swarm with [Claude Code](https://claude.com/claude-code)
+ EOF
+ )"
+ ```
+
+4. Mark complete: `TaskUpdate taskId: "8", status: "completed"`
+
+## Step 10: Cleanup and Report
+
+### Shutdown Teammates
+
+Send shutdown requests to all remaining teammates:
+
+```
+For each active teammate:
+ TeammateTool:
+ operation: requestShutdown
+ target_agent_id: "{teammate_name}"
+ reason: "Swarm complete - PR created"
+```
+
+### Cleanup Team Resources
+
+```
+TeammateTool:
+ operation: cleanup
+```
+
+### Final Report
+
+Present the completion summary:
+
+```markdown
+## Swarm Complete!
+
+**Feature:** {feature_description}
+**PR:** {pr_url}
+**Branch:** {branch_name}
+**Team:** {team_name}
+
+### Task Summary
+| Task | Agent | Status |
+|------|-------|--------|
+| Create plan | planner | Complete |
+| Research | researcher | Complete |
+| Implement | worker | Complete |
+| Review | reviewer | Complete |
+| Test | tester | Complete |
+| Resolve | resolver | Complete |
+| Video | video | Complete |
+| Create PR | team-lead | Complete |
+
+### Artifacts
+- Plan: docs/plans/{plan_file}
+- PR: {pr_url}
+- Video: {video_url}
+
+### Swarm Stats
+- Total agents spawned: {count}
+- Messages exchanged: {count}
+- Time elapsed: {duration}
+```
+
+## Error Handling
+
+### If an agent fails:
+1. Check the error message
+2. Option to respawn the agent with the same task
+3. Or handle manually and mark task complete
+
+### If plan is rejected:
+1. Planner receives feedback and revises
+2. Planner resubmits with ExitPlanMode
+3. Repeat until approved
+
+### If tests fail:
+1. Tester creates P1 todos
+2. Resolver fixes issues
+3. Tester re-runs tests
+4. Continue when all pass
+
+### If user interrupts:
+1. Cleanup team resources
+2. Preserve work on branch
+3. Can resume later with new swarm
+
+## Key Principles
+
+1. **Parallelism** - Run independent phases simultaneously
+2. **Specialization** - Each agent focuses on one role
+3. **Autonomy** - Agents work independently, coordinate through tasks
+4. **Visibility** - Team lead maintains oversight of all progress
+5. **Resilience** - Failures are isolated, recoverable
+
+## When to Use /slfg vs /lfg
+
+| Use /slfg when... | Use /lfg when... |
+|-------------------|------------------|
+| Feature is complex (multiple phases) | Simple, linear workflow |
+| Want maximum parallelism | Prefer sequential execution |
+| Multiple independent workstreams | Single focused task |
+| Want to see swarm coordination | Want simpler mental model |
From 0b651c6bfeea1d7fb8a68a45f578fb2e1dfc1c87 Mon Sep 17 00:00:00 2001
From: Kieran Klaassen
Date: Sun, 25 Jan 2026 19:44:10 -0500
Subject: [PATCH 2/3] feat(commands): add /swarm-status command to show active
swarm teams
Add new /swarm-status command that displays:
- Active teams from ~/.claude/teams/
- Teammates with running/stopped status
- Task progress with completion percentage
Simplified after code review to focus on essential information.
Built using the /slfg swarm workflow with parallel agents.
Co-Authored-By: Claude Opus 4.5
---
.../.claude-plugin/plugin.json | 4 +-
plugins/compound-engineering/CHANGELOG.md | 12 ++++
plugins/compound-engineering/README.md | 3 +-
.../commands/swarm-status.md | 63 +++++++++++++++++++
4 files changed, 79 insertions(+), 3 deletions(-)
create mode 100644 plugins/compound-engineering/commands/swarm-status.md
diff --git a/plugins/compound-engineering/.claude-plugin/plugin.json b/plugins/compound-engineering/.claude-plugin/plugin.json
index a9f29f9..725fe0b 100644
--- a/plugins/compound-engineering/.claude-plugin/plugin.json
+++ b/plugins/compound-engineering/.claude-plugin/plugin.json
@@ -1,7 +1,7 @@
{
"name": "compound-engineering",
- "version": "2.29.0",
- "description": "AI-powered development tools. 28 agents, 25 commands, 15 skills, 1 MCP server for code review, research, design, and workflow automation.",
+ "version": "2.30.0",
+ "description": "AI-powered development tools. 28 agents, 26 commands, 15 skills, 1 MCP server for code review, research, design, and workflow automation.",
"author": {
"name": "Kieran Klaassen",
"email": "kieran@every.to",
diff --git a/plugins/compound-engineering/CHANGELOG.md b/plugins/compound-engineering/CHANGELOG.md
index 3f9eb59..ede43ba 100644
--- a/plugins/compound-engineering/CHANGELOG.md
+++ b/plugins/compound-engineering/CHANGELOG.md
@@ -5,6 +5,18 @@ All notable changes to the compound-engineering plugin will be documented in thi
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
+## [2.30.0] - 2026-01-25
+
+### Added
+
+- **`/swarm-status` command** - Display status of active swarm teams
+ - Shows all active teams from ~/.claude/teams/
+ - Lists teammates with their roles and status (Active/Idle/Offline)
+ - Displays task progress with completion percentage
+ - Supports viewing specific team or all teams
+
+---
+
## [2.29.0] - 2026-01-25
### Added
diff --git a/plugins/compound-engineering/README.md b/plugins/compound-engineering/README.md
index 78ef65e..726c388 100644
--- a/plugins/compound-engineering/README.md
+++ b/plugins/compound-engineering/README.md
@@ -7,7 +7,7 @@ AI-powered development tools that get smarter with every use. Make each unit of
| Component | Count |
|-----------|-------|
| Agents | 28 |
-| Commands | 25 |
+| Commands | 26 |
| Skills | 15 |
| MCP Servers | 1 |
@@ -95,6 +95,7 @@ Core workflow commands use `workflows:` prefix to avoid collisions with built-in
| `/heal-skill` | Fix skill documentation issues |
| `/lfg` | Sequential autonomous engineering workflow |
| `/slfg` | Swarm-based autonomous engineering with parallel agents |
+| `/swarm-status` | Show status of active swarm teams and tasks |
| `/plan_review` | Multi-agent plan review in parallel |
| `/release-docs` | Build and release plugin documentation |
| `/report-bug` | Report a bug in the plugin |
diff --git a/plugins/compound-engineering/commands/swarm-status.md b/plugins/compound-engineering/commands/swarm-status.md
new file mode 100644
index 0000000..9240cc8
--- /dev/null
+++ b/plugins/compound-engineering/commands/swarm-status.md
@@ -0,0 +1,63 @@
+---
+name: swarm-status
+description: Show status of active swarm teams, teammates, and tasks
+argument-hint: "[team-name or 'all']"
+---
+
+# Swarm Status
+
+Display the current status of active swarm teams.
+
+## Usage
+
+```bash
+/swarm-status # Show all active teams
+/swarm-status my-team # Show specific team
+```
+
+## Step 1: Find Active Teams
+
+```bash
+ls ~/.claude/teams/*/config.json 2>/dev/null
+```
+
+If no teams found:
+```
+No active swarm teams found.
+
+Start a new swarm with: /slfg "your feature description"
+```
+
+## Step 2: Display Team Status
+
+For each team, read config and display:
+
+```markdown
+## Swarm: {team_name}
+
+**Description:** {description}
+**Lead:** {lead_agent_id}
+
+### Teammates ({count})
+
+| Name | Status |
+|------|--------|
+| team-lead | Running |
+| planner | Running |
+| worker | Stopped |
+
+### Tasks
+
+| # | Status | Subject | Owner |
+|---|--------|---------|-------|
+| 1 | Complete | Create plan | planner |
+| 2 | In Progress | Implement | worker |
+| 3 | Pending | Review | - |
+
+**Progress:** 1/3 complete (33%)
+```
+
+## Status Detection
+
+- **Running** - Agent has `backendType: in-process` or active `tmuxPaneId`
+- **Stopped** - Otherwise
From be0fff61f63313f70cb6712555724b8b661f5519 Mon Sep 17 00:00:00 2001
From: Kieran Klaassen
Date: Sun, 25 Jan 2026 22:53:05 -0500
Subject: [PATCH 3/3] chore: update docs and marketplace for v2.30.0
- Update marketplace.json version and command count
- Update HTML docs with new commands (/slfg, /swarm-status)
- Add swarm-status plan document
Co-Authored-By: Claude Opus 4.5
---
.claude-plugin/marketplace.json | 4 +-
docs/index.html | 78 +++++++++++---
docs/pages/agents.html | 89 +++++++++++----
docs/pages/commands.html | 89 ++++++++++++---
docs/pages/skills.html | 75 +++++++++----
...26-01-25-feat-swarm-status-command-plan.md | 101 ++++++++++++++++++
6 files changed, 364 insertions(+), 72 deletions(-)
create mode 100644 docs/plans/2026-01-25-feat-swarm-status-command-plan.md
diff --git a/.claude-plugin/marketplace.json b/.claude-plugin/marketplace.json
index 4e22718..bf45358 100644
--- a/.claude-plugin/marketplace.json
+++ b/.claude-plugin/marketplace.json
@@ -11,8 +11,8 @@
"plugins": [
{
"name": "compound-engineering",
- "description": "AI-powered development tools that get smarter with every use. Make each unit of engineering work easier than the last. Includes 28 specialized agents, 24 commands, and 15 skills.",
- "version": "2.28.0",
+ "description": "AI-powered development tools that get smarter with every use. Make each unit of engineering work easier than the last. Includes 28 specialized agents, 26 commands, and 15 skills.",
+ "version": "2.30.0",
"author": {
"name": "Kieran Klaassen",
"url": "https://github.com/kieranklaassen",
diff --git a/docs/index.html b/docs/index.html
index ec26ee3..28f4484 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -244,7 +244,7 @@ Delegate
The security-sentinel has checked 10,000 PRs for SQL injection. The kieran-rails-reviewer never approves a controller with business logic. They don't get tired, don't skip Friday afternoon reviews, don't forget the conventions you agreed on in March. Run /work and watch your plan execute with quality gates that actually enforce your standards—every single time.