I have an idea, agent turns it into a draft, depending on idea vagueness/complexity combination of: Looking for alternative, plan the change, look for alternative, split up into smaller drafts to drive separately, execute change (spec, code, tests), review change.
Usually its just: Draft, plan, exec, commit. The steps are flexible enough. Usually each step is a different agent, sometimes not. On complex builds or big changes, a planning agent itself might spawn subagents to avoid bloating its own context.
The progress is stored in: ./dev/{draft/<n>.md , wip/<n>/, fin/<n>/ }.
My `lead` pi has a separate AGENTS.md with how to organize the above sequence, and some notes on how to prompt, keep things small, etc. Note that its skill `tmux-coding-agrents` calls other pi instances (optionally set to codex). I've moved off the claude cli entirely.
I used to spend time telling claude not to forget updating the specs or building its tests because context bloat made them forget AGENTS.md, or to read certain files before it should execute a plan. The lead agent does this just fine now, and every time i see it make a mistake i say: "Next time do X" and it automatically updates its own or the worker agents AGENTS.md.
Because my lead agent context is all about managing this process it doesn't forget steps while its off chasing some bug.
Also, I build (but did not publish) a pi plugin that attempts to use other accounts on usage limits.
Most surprising moment I had, was my lead spawning a subagent, spawning a subagent, which spawned a tmux-bash build with very little prompting, and it was the right thing to do to prevent each agent from context bloat.