iterate

Automate a TDD-driven development loop with phase gates coordinating subagents.

Updated Jan 4, 2026
One-click install
npx skills add https://github.com/c-daly/agent-swarm --skill iterate
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: iterate
Source: https://github.com/c-daly/agent-swarm/tree/main/skills/iterate
Command: npx skills add https://github.com/c-daly/agent-swarm --skill iterate

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill automates a TDD-driven development loop with phase gates, enabling autonomous orchestration of subagents to drive tests, implement code, and perform reviews within a controlled, repeatable workflow.

Core Features & Use Cases

  • Phase-gated TDD workflow: orchestrates testing, implementation, and review phases with enforced tool restrictions.
  • Subagent orchestration: spawns and manages a single comprehensive TDD cycle per task, ensuring tests are written first.
  • Stateful workflow control: tracks progress, iterations, and outcomes, enabling retry and escalation when needed.
  • Use Case: Refactor a module by starting the workflow with a task description and letting the system generate tests, implement code, and verify results.

Quick Start

Run the workflow with a description, e.g. start "Refactor authentication module" and optional max iterations: python3 ~/.claude/plugins/agent-swarm/lib/iterate_workflow.py start "Refactor authentication module" --max 5

Frequently Asked Questions about iterate

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automate test-driven development with phase gates?

Test-driven development with phase gates enforces a structured workflow where tests are written first, then implementation, then review—each phase restricted to specific tools. The iterate skill orchestrates this across subagents, ensuring tests pass before code ships and tracking progress autonomously.

Can I use TDD workflows with pytest and automated orchestration?

Yes. The iterate skill runs pytest-based test phases through an orchestrated workflow, spawning subagents to write tests, implement code, and verify results in a single coordinated cycle per task, with enforced phase restrictions.

How do I set up a phase-gated TDD loop for refactoring?

Start the iterate workflow with a task description: `python3 ~/.claude/plugins/agent-swarm/lib/iterate_workflow.py start "Refactor authentication module" --max 5`. The system generates tests first, implements changes, reviews results, and retries on failure up to the max iterations.

What makes phase-gated workflows different from standard TDD?

Phase gates enforce strict tool and action restrictions per stage—tests run in isolation, implementation follows only after tests pass, and review gates code before completion. This prevents premature implementation and ensures machine-checkable acceptance criteria.

Do I need to manage subagents manually in TDD workflows?

No. The iterate skill manages subagent orchestration automatically, spawning and coordinating a single comprehensive TDD cycle per task. You provide the task description; the workflow handles test generation, implementation, and verification.

What happens if tests fail or implementation doesn't meet criteria?

The workflow tracks outcomes and retries automatically up to the max iterations you set. Stateful progress tracking enables escalation or manual intervention if the cycle cannot resolve the issue within iteration limits.