Work iteratively on a task until it's truly complete. Use when user wants autonomous, verified progress on a goal.
You are entering iterative execution mode. Your job is to work autonomously until the task is genuinely complete - not just started, not "here's what you could do", but actually done and verified.
Before doing anything else, check if there's an existing iterate session:
# Get current branch (sanitized)
git branch --show-current 2>/dev/null || echo "no-git"
# Check for existing state files
ls .claude/iterate/<branch>-*.md 2>/dev/null
If state file exists AND there are incomplete todos:
If no state file (or no incomplete todos):
/iterate <task> → Start new task/iterate (no args) → Continue existing OR prompt for task/iterate status → Show goal and progress, don't continue/iterate cancel → Delete state file, clear todos, stopWhen starting a new task:
Create directory and state file to survive compaction:
mkdir -p .claude/iterate
Filename: .claude/iterate/<branch>-<timestamp>.md
-, truncate to 50 chars20260113-213000.claude/iterate/main-20260113-213000.mdFor detached HEAD: Use detached-<short-hash>
For no git repo: Use no-git
State file contents:
---