c-daly/agent-swarm
agent-swarm
skills/iterate/SKILL.md
January 20, 2026
Select agents to install to:
npx add-skill https://github.com/c-daly/agent-swarm/blob/main/skills/iterate/SKILL.md -a claude-code --skill iterateInstallation paths:
.claude/skills/iterate/# Iterate Workflow
TDD development loop with phase gates. Works autonomously until exit conditions met.
## Initialize (REQUIRED FIRST STEP)
**Run this command immediately to start the workflow:**
```bash
python3 ~/.claude/plugins/agent-swarm/lib/iterate_workflow.py $ARGUMENTS
```
The workflow auto-initializes when invoked. This creates the state file that subagents need for TDD context.
## Flow
**With ORCHESTRATE (main agent coordinates workers):**
```
ORCHESTRATE ──┬──→ [spawn subagents] ──→ queue empty? ──→ done
│ ↓
└──────────── no ←─────────────┘
```
**Subagents (TDD loop):**
```
test_writing → implement → test → review → done
↑ ↑ | |
| | v v
+-- coverage +-- fail -+ issues
```
## Phases
| Phase | Purpose | Allowed Tools |
|-------|---------|---------------|
| **orchestrate** | Main agent coordinates workers | Read, Task, TaskOutput, TodoWrite (NO Edit/Write/Bash!) |
| **test_writing** | Write tests first (spec) | Read, Glob, Grep, Edit, Write, Bash |
| **implement** | Make tests pass | Read, Glob, Grep, Edit, Write, Bash |
| **test** | Run pytest, lint, coverage | Read, Glob, Grep, Bash (no editing!) |
| **review** | Fix Greptile issues | Read, Glob, Grep, Edit, Write, Bash |
## Orchestrator Role
**When in ORCHESTRATE phase, you NEVER do implementation tasks. Edit/Write/Bash are BLOCKED.**
The ORCHESTRATE phase enforces the orchestrator role through tool restrictions:
- ✅ Read, Task, TaskOutput, TodoWrite - coordination tools
- ❌ Edit, Write, NotebookEdit, Bash - blocked, spawn agents instead
### Rules
- 1 task → spawn 1 agent
- 5 tasks → spawn 5 agents in parallel
- No exceptions - you cannot edit code yourself
### Orchestrator responsibilities (ORCHESTRATE phase)
- Read specs/queue files
- Spawn subagents via Task tool
- Monitor completions via TaskOutput
- Track progress via TodoWrite
- Check completion: `is_orchestrati