It is also the largest worked example behind Shipping a SaaS product with a fleet of AI coding agents. It shows what briefs, file ownership and waves look like across 15 sites on one monorepo instead of one product.
Why does a multi-site migration need coordination rather than more agents?
More agents do not fix a shared-codebase migration; they amplify whatever ownership model is already there. Fifteen sites share a core package, 11 theme packages, the import tooling, the build config and the lockfile. A change to any shared path touches every site.
Per-site work, such as content, redirects, images and page templates, can run in parallel because the file sets barely overlap. Shared work, such as the content schema, SEO component, sitemap generation and build scripts, cannot be parallelised without a contract, because each agent would otherwise invent its own version.
The problem is not keeping 20 agents busy; it is stopping them from editing the same contract and knowing which site is finished.
How was the work split between two machines?
One machine did the browser and network work, the other did code and content, and the two exchanged numbered files instead of chat.
The Mac held the browser sessions: keyword data in a web UI, Cloudflare dashboard checks, DNS review, and the visual review of design directions. The Linux build box held the repository, the worktrees, the agents, the local database copy and the build/deploy tooling. It had 24 threads and 92 GB of RAM, which is why the fleet lived there.
| Work | Where it ran | Why |
|---|---|---|
| Keyword and search-demand research | Mac, through a browser session | The data source had a web UI and a fixed API allowance |
| DNS, zone audit, cutover | Mac session, with a scoped token | Changes needed a logged-in session and a human check |
| Import, content, themes, redirects | Build box, in worktrees | Thousands of files and dozens of parallel agents |
| Build, verify, deploy | Build box | Local builds were already the deploy path |
The split also kept credentials apart: the cutover token lived with the Mac session, not with the agents writing content.
What does a request file contain?
A request file is a numbered work order: the receiving side acts on it, then closes it with a result line. The run used coord/requests/ that way: one side posted a work order, the receiving side acted on it and moved it into done/ with a RESULT line.
A workable request carries six things, whether or not it uses this exact layout:
- ID and side.
ubu-078, for example, identifies one build-box request. - Scope. One workstream: a site’s content plan, a theme round, a deploy gate, a fix wave.
- Inputs. The files, data exports or decisions the work depends on, with paths.
- Definition of done. The gate that must pass, not a description of effort.
- Report location. Where the receiving side writes its result, and which fields it must contain.
- Open questions. Anything the request could not decide, escalated before work starts rather than after.
The point is not the template; it is that scope, gate and report path live in the file, so the receiving side never reconstructs intent from chat. A closing report should list what changed, the commit range, verification output and any “needs from others” items.
How did agents hand work to each other?
Agents handed work over through files and git, never through conversation. The request directory was the queue, the report was the receipt, and the git log was the source of truth about what landed.
| Artefact | Purpose | Who writes it |
|---|---|---|
coord/requests/ |
Numbered work orders and their reports | Either side |
coord/DECISIONS.md |
Append-only record of binding decisions | The orchestrator |
coord/log.jsonl |
Event log: deploy hooks, job status, timestamps | Scripts |
| Design registry | Fonts, palettes and signature elements per site | Design agents, reviewed |
| Git history | What actually changed, with commit hashes | Every agent |
The decision log is the part that scales: when two agents disagree about a default, the answer is a line in DECISIONS.md, not a re-litigation in the next brief. Append-only keeps the reasoning that later work depends on.
The run also showed where this breaks: the status file stopped being updated early, so the requests, the event log and git became the only trustworthy record. A status document that nobody maintains is worse than no status document, because it looks authoritative while being stale.
How did file ownership work across 15 sites?
Ownership followed the repository layout: one agent per site directory, one foundation owner for shared packages, and a strict rule that nobody edits another agent’s paths.
Per-site work was safe because each site had its own directory under sites/. Content, redirects, images, page templates and site config could change in parallel. Shared packages were different: packages/core, the theme packages, the import tool, the build scripts and the lockfile needed a single owner per change.
The rules that made it hold:
- One worktree and branch per agent, so a commit never lands in another agent’s checkout.
- A named file list in every brief, including “these files you may call but not edit”.
- A “needs from others” section in the report for any change outside the owned set, which the lead applies at merge time.
- Foundation first: schema, shared components and build plumbing merge before the per-site work that depends on them.
Design ran in rounds: two directions per site, then a themed round of 17 branches, with the orchestrator picking one and keeping both. Parallel work with one serial decision point kept 15 visual identities from converging.
What did 861 commits on main look like?
It looked like a steady sequence of small, scoped commits per site, with shared changes isolated and tagged before each deploy.
The commit count is a volume measure, not a quality one. What matters is the shape:
- Per-site commits stay inside one site directory: import, content rewrite, redirects, theme fixes, image pass.
- Shared commits touch the core package or a theme, and are the ones that trigger a rebuild across many sites.
- Rollback tags before deploy, named per site and timestamp, so a bad release has an obvious revert point.
- Merge commits from worktree branches, so a single site’s work can be reverted without unpicking someone else’s.
A monorepo makes one log answer both “what changed for this site” and “what changed for everyone”; a repo per site would have made the number smaller and the coordination problem larger.
How do you gate a cutover across 15 domains?
The gate is URL parity: every old URL must return 200 on the new site or exactly one 301 to a page that returns 200, checked before any DNS record moves.
The order was:
- Crawl the old site and record every URL, title and canonical.
- Import into the static site and generate the redirect map from the old URL table, keeping hand-written rules in a separate file that the importer merges.
- Check parity against a preview build, not the live domain.
- Deploy the Worker and verify a sample of pages, redirects and 404s.
- Move DNS last: remove the apex record, attach the apex as a Workers custom domain, add the
wwwrecord and a redirect rule, leave MX alone.
Cloudflare’s _redirects file allows 2,000 static and 100 dynamic rules, 2,100 total, and the largest site was already at about 1,220 before content work added more. The rules also apply in file order, with static rules before dynamic ones, so a careless splat can shadow a real page.
The two pilot sites went first, checked live, then the other 13.
Chat, one orchestrator, or a request log?
The coordination model is a design choice with measurable consequences.
| Model | Strength | Failure mode |
|---|---|---|
| Chat with agents | Fast for one workstream | Intent decays; no record of what was asked or delivered |
| One orchestrator, no written requests | Consistent decisions | The orchestrator becomes the bottleneck and the context limit |
| Shared request and report log | Durable, searchable, parallel-safe | Requires discipline and a numbering scheme |
| One giant brief for all sites | Fewer documents | No ownership boundary, and one failure blocks everything |
Which should you choose?
Use a shared request log for any migration with more than about three sites or more than one machine. Use chat only for the earliest scoping, and never as the system of record. One orchestrator still makes the decisions; the log is how those decisions reach 20 agents without being retyped.
What broke and what we changed
A status document went stale. The coordination status file stopped being updated early in the run, while work continued. The fix was to stop treating it as a source of truth: requests, the event log and git became the record. A status page needs an owner and an update trigger, or it should not exist.
The generated redirects overwrote hand-written ones. The importer rebuilt _redirects on every import, which would have discarded manual rules. The fix was a separate redirects.manual file that the importer merges in first, so a re-import cannot silently drop a mapping.
A re-import overwrote edited content. The importer rebuilds content from the local database copy, so hand-edited Markdown would be replaced on the next import. The rule became: never re-import a site after editing its Markdown by hand unless a fresh dump has been loaded first.
A token was printed into the session output. A script mistake echoed a cutover token during a save. It was rolled immediately with the same permissions and expiry, and only the new value was stored. The related cleanup was to delete a backup env file that still held older credentials.
Preview URLs disappeared after cutover. Setting workers_dev: false removed the *.workers.dev addresses used for previews. That was right for duplicate-content reasons, but it removed a convenient check; previews moved to version uploads or a local server.
Plain curl got a 403 on the live domains. A zone bot rule challenged the default user agent, so scripts needed a browser-like header while browsers and search crawlers were fine. It looked like downtime and was not; the check scripts were updated.
Related
- Shipping a SaaS product with a fleet of AI coding agents — the pillar post for this cluster.
- Moving 15 WordPress sites to Cloudflare Workers — the conversion architecture this run coordinated.
- Waves, not one big run — how the build, QA and fix waves were sequenced.
- Writing briefs that AI coding agents can’t misread — the ownership and escalation sections that made parallel site work safe.
- WordPress migration case study — the system behind these commits.
Frequently asked questions
How many agents can run a 15-site migration?
The plan allowed 15–20 agents at once on the build box, with 24 threads and 92 GB of RAM, but the useful limit was file ownership, not CPU. Sites could run in parallel; shared packages had to be serialised through one owner. A laptop carries far fewer.
What is a request and report file in an agent workflow?
A request file is a numbered work order with scope, inputs, definition of done, report location and open questions. The report is the receipt: what changed, the commit range, verification output and needs from others. The pair gives each workstream one owner and one auditable result.
How do you keep old WordPress URLs working after migration?
Record every old URL before touching anything, generate a redirect map from that table, and check that each URL returns 200 or one 301 to a 200 before DNS moves. Keep hand-written redirects in a separate file so a re-import cannot overwrite them.
Why move 15 WordPress sites to static pages?
The sites needed PHP updates, plugin audits, backups and theme maintenance whether or not traffic justified it. Static Astro on Workers removed the origin, admin surface and plugin stack. The full story is in Moving 15 WordPress sites to Cloudflare Workers.
How long did the 15-site migration take?
The cutover of all 15 sites happened on 2026-11-13; content and SEO work continued through 2026-11-17, and the three new domains went live in that window. The conversion was a multi-day push, not one overnight run, with review gates between phases.
Did the agents deploy to production themselves?
No. Agents built and verified in worktrees, and deploys were gated on parity checks and a rollback tag. The cutover steps that touched DNS used a scoped token, with a human deciding when each zone moved. Two pilot sites went first and were checked live before the other 13.
