Run the delivery cycle unattended until the board has no machine-only row that can start — board, a wave of isolated sub-agent batches on one branch and one PR, watch, auto-merge, watch, board, again. A Plan–Do–Check–Act cycle in the orchestrator–workers shape. Invoke when the operator says "iterate", "run the cycle", or "keep going until the board is clear".
Install
npx skillscat add polycode-public/concordance/iterate Install via the SkillsCat registry.
iterate
The cycle, run under /loop in dynamic mode:
/board → /do-next (one wave) → /watch → /auto-merge → /watch → /board → …until /board shows no machine-only row in state ready. The parts are the existing skills; this
one fixes their order and carries the rules that keep the cycle cheap.
It is a Plan–Do–Check–Act cycle in the orchestrator–workers shape: the coordinator plans (the
board), workers do (the wave), CI checks (the watch), the merge acts, and the next board is the
next plan. Trunk-based, short-lived branches, one batch branch per wave, main's deploy as the
integration proof, and a work-in-progress limit set by file ownership.
Before the first cycle
- Remote control. If nothing says the session is connected, print
/rconce for the
operator; it is their command. On a connected session never print it: it would disconnect. - SSO. Only when the cycle needs an AWS fact:
aws --profile polycode-sandbox sts get-caller-identity. If it fails, printaws sso login --profile polycode-sandboxonce and
carry on with the rows that need no AWS. Read every AWS fact a cycle needs while the token is
fresh. - GitHub.
gh auth status; if it fails, printgh auth loginfor the operator. - Inbox.
~/.claude/inboxes/concordance.md; act on every[unread]block, then mark it[read]. - Cool-down. If
NEXT.md's## In flightcarries the cool-down marker, run/wakefirst:
invoking/iterateis the operator's word to lift it. A wake step that cannot complete keeps
the session cool, and the loop does not start; say which step and why. - Start the loop.
/loopwith this skill's cycle as the prompt and no interval. Agent
completions, Monitor events and background exits are the wake signals;ScheduleWakeupis the
fallback heartbeat.
One cycle
- Board.
/refinefirst when the session's first wave is about to go out or the board has
gained rows since the last pass. Then/boardwith its write-back (a docs commit straight tomain). The wave's input is theready,machine-onlyrows, in board order. - Wave.
/do-next's shape: one batch branch, every agent worktree from it viascripts/worktree-add.sh,NEXT.mdnever on it; one agent per row, rows sharing a file in one
brief; fill until file contention stops you; lowest tier that fits, and a hard row never shares
a batch with mechanical ones. Every brief carries the constants/do-nextlists. Land each
report as it arrives (status check, squash merge, one commit per row, content proof). Before
the first push, runnpm run check:allas one background command underbash -cthat appendscheck:all exit $?to its log file (notePIPESTATUSis empty under the background shell's
zsh); the push is written only after the coordinator readsexit 0, and a log without the line
is a failed check. Then one PR and/watch. - Watch. The monitor runs until the PR's workflow runs are terminal. A red is diagnosed from
the run's own jobs and logs; the fix rides the same batch branch as another commit. - Merge. On
MERGEABLE,/auto-merge: gates re-read, the merge, its verification, localmainupdated, then/watchovermain's runs and itsdeploy.ymlrun. If the merge call is
refused by the permission classifier,/auto-mergeprints the command in a!block, marks
the PR handed over in its result table, retries once on the next cycle, and carries on. - Close the cycle. When
mainis green,/boardagain with its write-back, and the removal
block for the wave's worktrees and branches in full with the!prefix.
Pacing
- Check for a queued operator message before every dispatch, merge, push and poll. Mid-turn
messages arrive alongside tool results; after each tool call, read the inbox. Any message saying
stop, exit, cool down or asking a direct question ends the current step at once: sendScheduleWakeupstop: truefor stop or exit, invoke/cool-downfor cool down, or reply with
the answer as the whole message for a question. Nothing in flight is interrupted mid-edit; tell
any running agent to commit and stop (the/cool-downrule 3 shape). - With nothing running and the next unblock at a known time, hold with hourly ticks.
- With nothing startable, stop the loop: one notification with the outcome, naming every operator
decision that would restart it (amachine-askrow's approval, ahuman-drivendecision), and
stop any Monitor. The operator restarts with/iterate.
Blocked commands
git worktree remove, git branch -D, deleting a remote branch, AWS writes outside the
workflow, and GitHub settings, secrets and variables are the operator's. Print each as one fenced
block with the ! prefix when it arises, collect them in the next board, and carry on; nothing
waits on them.
Report
Each cycle ends with one line per PR merged (number, rows, merge commit), the deployed stacks, and
what the next cycle starts with or why the loop stopped.