AIToday
Large Language ModelsAI Coding AssistantsZenn AI/MLPublished: Oct 21, 2026, 13:00 JST

16 Claude Code sub-agents run a legacy PHP migration

Send on LINE
16 Claude Code sub-agents run a legacy PHP migration

3 Key Points

  1. What happened

    A Zenn author migrating a ten-year-old PHP/Laravel monolith — hundreds of endpoints and more than 600 shared models — to Laravel 12 microservices plus a Vue 3 frontend split the work across 16 Claude Code sub-agents.

  2. Why it matters

    Each role can only read its own slice (the frontend analyst never sees legacy code, the contract designer never reads code at all), so biased interpretations are structurally harder and handoffs move through files under docs/.

Not sure about something? Ask the AI

Questions and answers are published on this page.

Summaries like this, in your inbox every morning.

Context & Analysis

The author's starting point is scale: a decade-old monolith with hundreds of endpoints and more than 600 shared models is too large for one person to track which API has moved and whether the old logic was copied correctly. Handing the whole job to an AI produced four recurring failures — invented response structures, contaminated context, code written before the spec was fixed, and dependency order broken.

The diagnosis is that the root cause is cramming too many responsibilities and too much information into one context, not a weak model. Extraction agents shown new code drift toward "the old one must work like this"; contract designers allowed to touch code start making well-meaning spec changes. The fix mirrors ordinary team management: separate roles, handoff documents, and review gates, with file handoffs letting each sub-agent start from a clean context and a PreToolUse hook mechanically blocking writes outside defined directories.

Operationally the author caps each pass at 5–10 endpoints and isolates one domain per context, because sub-agents cannot launch other sub-agents nested and delegation must route through the dispatcher. The legacy monolith stays read-only, and a conclusion of "not in the original" requires a fresh fetch since it is still actively updated.

FAQ
How do the agents pass information to each other?
Not through conversation but through files under docs/ — for example, the two analysis outputs feed docs/triage-inputs/{domain}/contract.md. The next stage reads only that file, so its context can be reset each time.
What stops an agent from writing code before the spec is settled?
A read-only planner writes 20-plan.md as a draft, a human approves it, and the executor will not start unless the plan is marked approved. Executors are told to stop and report if no approved plan exists.
How are unverified claims handled?
Outputs must mark unconfirmed information with a ⚠️UNVERIFIED: tag, so facts and guesses are mechanically separated.
Send on LINE

AI news that matters for your work, delivered every morning.

Pick your industry and the AI tools you use, and get news related to your work every day.

Free · 30 seconds with Google · unsubscribe anytimeWhat is AIToday? →

Ask AI

Ask AI anything about this article. The AI reads this article, earlier AIToday articles, and Wikipedia, and cites its sources. Q&As are published on this page for other readers too.

Questions and answers are published on this page.

Related Articles

Next articleOpenAI's GPT-6 Astra hits 87.39% on MultiLangBench, toping GPT-5.6 Sol