Back to Skills

iterate

verified

Autonomous TDD implementation workflow with phase gates

View on GitHub

Marketplace

fearsidhe-plugins

c-daly/agent-swarm

Plugin

agent-swarm

productivity

Repository

c-daly/agent-swarm

skills/iterate/SKILL.md

Last Verified

January 20, 2026

Install Skill

Select agents to install to:

Scope:
npx add-skill https://github.com/c-daly/agent-swarm/blob/main/skills/iterate/SKILL.md -a claude-code --skill iterate

Installation paths:

Claude
.claude/skills/iterate/
Powered by add-skill CLI

Instructions

# 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

Validation Details

Front Matter
Required Fields
Valid Name Format
Valid Description
Has Sections
Allowed Tools
Instruction Length:
12916 chars