Automation · 12 steps
Multi-agent build orchestration: one HANDOFF file and one board any session can resume from
A project board goes in. Any fresh session can pick the build up from one file and one board read.
Built by Matt Cruz, Modern Code Consulting
The problem
Long builds with AI agents lose the thread. A fresh session does not know what is done, which task is blocked or who owns the next step, so it rereads half the project to get back up to speed.
With more than one agent working, it gets worse: two workers pick up the same task, or a finished task never gets marked done and everything behind it stays blocked.
What I built
I built a rig I stand up for every long build. One Claude Code skill scaffolds a HANDOFF file, a resume skill and a project board where every task carries an owner, its dependencies, the acceptance test and a done signal.
A fresh session reads one file and one board, then reports next actions by owner. Workers close tasks through one script under a file lock, so the board and the HANDOFF file stay in step, and the next read shows what that close-out unblocked.
How it works, step by step
One skill stands the rig up. Three small scripts keep it honest: scaffold, read the board, close a task.
Stage 1 · Board and owners
Confirm the board spec exists
RanChecks that the project board spec is on disk and counts what is in it: 14 subtasks, 2 already complete, 1 with an owner.
Project board spec (YAML)
Decide owners and priority tier
SubstitutedThree owners in print order (a builder agent, a reviewer agent, the client) and a priority tier that says which sessions may run the build.
Agency owner
Stage 2 · Scaffold the rig
Scaffold the resume rig
RanA dry run that writes nothing, then the real run: a registry entry, a HANDOFF file and a resume skill, with 12 unknowns left as explicit TODO markers.
setup_build.py
Stage 3 · Make it routable
Write a contract on every task
RanWrites a seven-key header above 13 task briefs: owner, sandbox, what it depends on, inputs, outputs, the acceptance test and the done signal.
Claude Code skill (setup-build)
Push the spec to the board
Not runPushes the spec to the live project board, matching tasks by exact name.
ClickUp, clickup_sync.py
Read the board back, fix a name
SubstitutedThe first read flags a dependency that names a task that does not exist. One line is fixed in the spec and the second read is clean.
build_status.py
Stage 4 · Finish the rig
Fill in what the spec states
RanFills 4 of the 12 TODO markers from facts in the board spec and leaves 8 as TODO, because nothing in the input states them.
Claude Code skill (setup-build)
Mirror to the second runtime
RanCopies the new resume skill into the second agent runtime's skills folder, then checks the two are in step.
sync_agent_setup.py
Stage 5 · Resume and close
A fresh session reads two things
SubstitutedWith no earlier context, the session reads the top of the HANDOFF file and the board, then reports next actions by owner in three lines.
HANDOFF.md, build_status.py
A worker closes its task
RanOne command, under a file lock: the task flips to complete in the spec, a dated result line lands in its brief, a HANDOFF entry is prepended and the current-state block is rewritten.
build_finish.py
Push the close-out to the board
Not runThe two legs the offline close-out skips: syncing the changed spec to the live board and adding a line to the client's worklog.
ClickUp, client worklog
Re-read: what it unblocked
SubstitutedThe same board read, after the close-out: the reviewer's mapping review is now unblocked and the closed task is gone from the list.
build_status.py
The recorded run
This is a real run of the automation on an invented business: a mobile veterinary imaging provider. Use the tabs inside it to move between the overview, how it's built, the step-by-step run and the result.
What ran for real: The scaffolder, the board read, the close-out and the second-runtime mirror are the real scripts, run on an invented board spec with their file paths pointed at a scratch workspace; paths are shown in the pipeline's usual workspace-relative layout. The live project board was never read or written: board reads were answered from the spec file, the two pushes to the board were not run, and the task that gets closed was never actually worked. On this rig the builder agent's lane is named Codex and the reviewer agent's lane Claude subagent.
The run is laid out for a desktop screen.
More automations
- Verified lead list, catch-alls held backA saved people search goes in and a deduplicated, verified, import-ready lead file comes out, with every catch-all address held back.
- Personalising a cold email listA messy scraped lead list goes in and a send-ready list comes out, with a natural first name, a company name a person would say and a one-line opener on every row.
- Cold email reply reviewEvery campaign's numbers and every reply go in, and the positive reply rate, what changed since last time and the lines of copy behind the replies come out.
- Paid deposit to project kickoffA client pays the deposit, the deal closes, a dated project plan is built and a kickoff document is ready, with no hand on the CRM.
Want something like this running in your business?
Book a free 15-minute call. Tell me where the hours and the leads are leaking, and I'll tell you what I'd automate first and what it would cost.
Book a free automation audit