A standing methodology for any non-trivial task: instead of executing ad-hoc and handing back the first draft, structure the work as a self-extending nine-step loop that keeps going until the result is actually good.
The loop, one iteration:
- Research — internal (read the code, run
--help, fetch docs) + external (state of the art) - Plan — write it down as an artifact, don't interleave with execution
- Execute — implement the plan
- Operational audit — are we building what was asked? Is it state-of-the-art yet?
- Technical audit — correctness, edge cases, security, performance, tests
- Integrate findings — append a discrete fix task for every issue surfaced
- Test / secondary audit — verify against real-shaped input
- Analyze results — be honest; "tests passed" ≠ "perfect"
- Decide — loop again (hard cap 3×), advance to the next section, or zoom out
Cross-loop state lives in a per-scope implementation plan (plan-{scope}-{date}.md),
never in a shared roadmap.md/status.md — those mix scopes and cause collisions.
| Variant | For | Tracks the loop with |
|---|---|---|
task-loop/ |
Claude / Claude Code | TodoWrite |
task-loop-codex/ |
OpenAI Codex | update_plan |
The two are identical in logic and content. The only difference is the
plan-tracking tool each agent uses (and the name/title).
Drop the relevant folder into your agent's skills directory:
- Claude Code: copy
task-loop/to~/.claude/skills/task-loop/ - Codex: copy
task-loop-codex/into your Codex skills/agents directory