Use when orchestrating a complete 9-phase development iteration. Activated by /superpowers-iterate:iterate command or when user asks to follow the iteration workflow.
Orchestrates a complete 9-phase development iteration with parallel agents, TDD, and automated reviews.
npx claudepluginhub kenkenmain/ken-cc-pluginsThis skill inherits all available tools. When active, it can use any tool Claude has access to.
This skill activates when:
/superpowers-iterate:iterate <task>Announce: "I'm using the iteration-workflow skill to orchestrate this task through all 9 mandatory phases."
Phases: Brainstorm -> Plan -> Plan Review -> Implement -> Review -> Test -> Simplify -> Final Review -> Codex Final
Iteration Loop: Phases 1-8 repeat until Phase 8 finds zero issues or max iterations reached. Phase 9 runs once at the end (full mode only).
Modes:
mcp__codex-high__codex for Phases 3, 8 and mcp__codex-xhigh__codex for Phase 9 (configurable via /configure)--lite): Uses Claude reviews, skips Phase 9See AGENTS.md for model configuration and state schema details.
State file: .agents/iteration-state.json
Initialize at start with version 3 schema. Update state after each phase transition. See AGENTS.md for full schema.
IMPORTANT: Configuration MUST be loaded fresh each time the workflow is invoked. Always read both global and project config files at the start.
Load configuration using the configuration skill. The skill handles:
~/.claude/iterate-config.json).claude/iterate-config.local.json)On each invocation:
Run /superpowers-iterate:configure --show to see current config.
Purpose: Explore problem space, generate ideas, clarify requirements
Required Skill: superpowers:brainstorming + superpowers:dispatching-parallel-agents
Actions:
in_progress in state filesuperpowers:dispatching-parallel-agents (if config allows):
superpowers:brainstorming process:
docs/plans/YYYY-MM-DD-<topic>-design.mdExit criteria:
Transition: Mark Phase 1 complete, advance to Phase 2
Purpose: Create detailed implementation plan with bite-sized tasks including tests
Required Skill: superpowers:writing-plans + superpowers:dispatching-parallel-agents
Actions:
in_progressphases.2.parallel is true) to create plan components:
superpowers:writing-plans format:
docs/plans/YYYY-MM-DD-<feature-name>.mdPlan header must include:
# [Feature Name] Implementation Plan
> **For Claude:** REQUIRED SUB-SKILL: Use superpowers:executing-plans to implement this plan task-by-task.
**Goal:** [One sentence describing what this builds]
**Architecture:** [2-3 sentences about approach]
**Tech Stack:** [Key technologies/libraries]
**Test Strategy:** [Testing approach and frameworks]
---
Exit criteria:
Transition: Mark Phase 2 complete, advance to Phase 3
Purpose: Validate plan quality before implementation begins
Required Tool (from config phases.3.tool):
mcp__codex-high__codex (default): Codex with medium reasoningmcp__codex-xhigh__codex: Codex with high reasoningclaude-review: Use superpowers:requesting-code-reviewsuperpowers:requesting-code-reviewActions:
in_progress in state fileInvoke mcp__codex-high__codex with plan review prompt:
Review the implementation plan at docs/plans/YYYY-MM-DD-<feature-name>.md
Validate:
- Task granularity (each task should be 2-5 minutes of work)
- TDD steps included for each task
- File paths are specific and accurate
- Plan follows DRY, YAGNI principles
- Test strategy is comprehensive
- Dependencies and task order are correct
- Edge cases are covered
Report findings with severity (HIGH/MEDIUM/LOW) and file:line references.
If you find NO issues, explicitly state: "Plan looks good to proceed."
Dispatch code-reviewer subagent via superpowers:requesting-code-review to review the plan document.
Evaluate review results:
If ZERO issues found:
If HIGH/MEDIUM issues found:
If only LOW issues found:
Exit criteria:
Transition: Mark Phase 3 complete, advance to Phase 4
Purpose: TDD-style implementation following the plan
Implementer (from config phases.4.implementer):
claude (default): Use Claude subagents via superpowers:subagent-driven-developmentcodex-high: Use mcp__codex-high__codex for implementationcodex-xhigh: Use mcp__codex-xhigh__codex for implementationRequired Skill (claude mode): superpowers:subagent-driven-development + superpowers:test-driven-development
Required Plugins: LSP plugins for code intelligence
Actions:
in_progressphases.4.implementer config to determine implementation mode:Follow superpowers:subagent-driven-development process (model from phases.4.model):
Read plan, extract all tasks, create TodoWrite
Launch as many subagents as needed for implementation:
For each task: a. Dispatch implementer subagent with full task text AND LSP context:
You have access to LSP (Language Server Protocol) tools:
- mcp__lsp__get_diagnostics: Get errors/warnings for a file
- mcp__lsp__get_hover: Get type info and documentation at position
- mcp__lsp__goto_definition: Jump to symbol definition
- mcp__lsp__find_references: Find all references to a symbol
- mcp__lsp__get_completions: Get code completions at position
Use LSP tools to:
- Check for errors before committing
- Understand existing code via hover/go-to-definition
- Find all usages before refactoring
b. Answer any questions from subagent
c. Subagent follows superpowers:test-driven-development:
mcp__lsp__get_diagnostics to check for errorsInvoke the configured Codex tool with implementation prompt:
Implement the following tasks from the plan at docs/plans/YYYY-MM-DD-<feature-name>.md
For each task:
1. Read the task requirements
2. Write the code following TDD:
- Write failing test first
- Implement minimal code to pass
- Verify tests pass
3. Follow existing code patterns and conventions
4. Add appropriate logging and error handling
Run these commands after implementation:
1. make lint
2. make test
If tests fail, fix issues and re-run until passing.
make lint && make test to verify all tests passNote (Claude mode): Implementation subagents run sequentially (to avoid file conflicts), but reviewer subagents can run in parallel.
Exit criteria:
make lint && make test passTransition: Mark Phase 4 complete, advance to Phase 5
Purpose: Quick code review sanity check before Phase 8's thorough review
Required Skill: superpowers:requesting-code-review
Bug Fixer (from config phases.5.bugFixer):
claude: Use Claude subagents to fix issuescodex-high (default): Use mcp__codex-high__codex to fix issuescodex-xhigh: Use mcp__codex-xhigh__codex to fix issuesActions:
in_progressBASE_SHA=$(git merge-base HEAD main)
HEAD_SHA=$(git rev-parse HEAD)
superpowers:requesting-code-reviewclaude: Dispatch Claude subagent to fixcodex-high/codex-xhigh: Invoke Codex with fix prompt including issue detailsExit criteria:
Transition: Mark Phase 5 complete, advance to Phase 6
Purpose: Run lint and test suites
Actions:
in_progressmake lint
make test
Exit criteria:
make lint passesmake test passesTransition: Mark Phase 6 complete, advance to Phase 7
Purpose: Reduce code bloat using code-simplifier plugin
Required Plugin: code-simplifier:code-simplifier (from claude-plugins-official)
Actions:
in_progressTask(
description: "Simplify modified code",
prompt: "Review and simplify code modified in this iteration. Focus on clarity and maintainability while preserving functionality.",
subagent_type: "code-simplifier:code-simplifier"
)
Exit criteria:
Transition: Mark Phase 7 complete, advance to Phase 8
Purpose: Thorough review that determines whether to loop back to Phase 1 or proceed to completion.
Required Tool (from config phases.8.tool):
mcp__codex-high__codex (default): Codex with high reasoningmcp__codex-xhigh__codex: Codex with extra-high reasoningclaude-review: Use superpowers:requesting-code-reviewsuperpowers:requesting-code-reviewBug Fixer (from config phases.8.bugFixer):
claude: Use Claude subagents to fix issuescodex-high (default): Use mcp__codex-high__codex to fix issuescodex-xhigh: Use mcp__codex-xhigh__codex to fix issuesActions:
in_progressmaxIterationsInvoke mcp__codex-high__codex with review prompt:
Iteration {N}/{max} final review for merge readiness. Run these commands first:
1. make lint
2. make test
Focus on:
- Documentation accuracy
- Edge cases and error handling
- Test coverage completeness
- Code quality and maintainability
- Merge readiness
Report findings with severity (HIGH/MEDIUM/LOW) and file:line references.
If you find NO issues, explicitly state: "No issues found."
Dispatch code-reviewer subagent via superpowers:requesting-code-review:
Evaluate review results:
If ZERO issues found:
phase8Issues: [] in stateIf ANY issues found (HIGH, MEDIUM, or LOW):
claude: Dispatch Claude subagent with issue detailscodex-high/codex-xhigh: Invoke Codex with fix promptmake lint && make testphase8Issues array in statecurrentIterationExit criteria:
Transition:
Purpose: Final validation with OpenAI Codex high reasoning
Required Tool: mcp__codex-xhigh__codex
Note: This phase is skipped in lite mode.
Actions:
Mark Phase 9 as in_progress
Invoke mcp__codex-xhigh__codex with final validation prompt:
Final validation review. Run these commands first:
1. make lint
2. make test
This is the FINAL check before merge. Be thorough.
Report findings with severity (HIGH/MEDIUM/LOW) and file:line references.
Focus on:
- Correctness and logic errors
- Idempotency of operations
- Documentation accuracy
- Test coverage gaps
- Security concerns
- Edge cases missed in earlier reviews
Address any HIGH severity issues
Re-run Codex-high if significant changes made
Exit criteria:
Transition: Mark Phase 9 complete, proceed to Completion
After Phase 8 (lite mode) or Phase 9 (full mode):
superpowers:finishing-a-development-branch for merge prepIf iteration was interrupted:
.agents/iteration-state.jsoncurrentIteration: Which iteration we're oncurrentPhase: Which phase within that iterationmode: Full or liteNever:
If blocked:
You MUST use this before any creative work - creating features, building components, adding functionality, or modifying behavior. Explores user intent, requirements and design before implementation.