AI-Assisted Legacy Migration Pipeline In Progress

Six-phase AI-agent pipeline rebuilding a legacy PHP storefront on evidence: 108 features extracted, 105 migration reports, 39 design studies, and all 41 build-register features implemented and verified in 18 days.

Private employer Details are sanitized; architecture and outcomes are described without proprietary identifiers.

At a glance

legacy features extracted
108
rebuilt features verified in 18 days
41
build-ready design studies
39
Role
AI Workflow Architect / Migration Lead
Year
2026
Category
AI Software Dev

About This Project

Designed and operates a phased pipeline where AI agent sessions do the heavy reading of a legacy PHP storefront so its replacement can be built on evidence instead of folklore. Fleets of scoped agent sessions extract features into rule-level documentation, review each one against the new platform, and challenge earlier verdicts in an adversarial validation pass, coordinating through filesystem locks and an append-only knowledge base rather than a shared queue. Humans stay in the loop only where judgment is required: a structured developer Q&A gate, verdict challenges, and design studies held to an explicit buildable bar. The pipeline has extracted 108 legacy features, reviewed them in 105 migration reports (103 through adversarial validation), and turned the results into 39 design studies; execution began on September 22, and every one of the 41 features in the build register was implemented and verified by October 9. A register-driven design pass redesigned 43 storefront pages in parallel with the build, and a journey-based validation phase is planned next.

Engineering Deep Dive

How six phases of scoped AI agent sessions, coordinated through filesystem locks, an append-only knowledge base, adversarial validation, and human gates, turn a legacy storefront into validated evidence, buildable studies, and finally verified code.

Read the engineering deep dive

Technologies Used

Claude CodeCursorModel Context ProtocolPHPIBM DB2PostgreSQLBunShell ScriptingGit

Engineering Challenges

  1. 01

    Coordination Without a Coordinator

    Concurrent agent sessions cannot see each other, so work is claimed by atomic folder creation and recorded in per-feature owner files, never in a shared registry that could drift from the filesystem.

  2. 02

    Knowledge That Compounds

    Every session reads an append-only onboarding document before working and records corrections, lessons, and superseded claims for the next session, so later agents inherit method instead of rediscovering it.

  3. 03

    Trust but Verify

    A second adversarial pass assumes every report missed something, proves or disproves each claim against both codebases, corrects reports in place, and files verdict challenges for a human referee.

  4. 04

    Human Gates on Judgment

    Questions only a person can answer flow through a structured developer Q&A file with suggested answers, and each closed answer triggers a propagation pass so every affected report reflects the ruling.

Technical Highlights

Phase Contracts: Six phases, extraction, migration review, validation, developer questions, design study, and execution, each producing artifacts the next phase consumes without conversation.

Ground-Truth Verification: Agents measure instead of assume, querying the legacy database read-only through an MCP server and recovering deleted files from git history to settle claims that prose alone could not.

Generated Ledgers: Shell scripts regenerate readiness, challenge, and input ledgers from the artifacts themselves, so pipeline status is computed from the tree rather than maintained by hand.

Design-Study Gate: Studies are judged against a written design baseline with an explicit buildable bar: complete enough that the implementation phase writes code and asks nothing.

Task-Level Execution: Each study decomposes into ordered tasks that name the files they touch and an acceptance check; implementation lands one commit per task and records verification, deferrals, and findings instead of implying them.

Business Logic

Evidence-Based Rebuild: The new platform is scoped from validated verdicts instead of tribal memory, with a paper trail from every business rule back to the legacy code that defines it.

Parallel Throughput: Independent agent sessions extract and review features around the clock, turning a serial archaeology project into parallel work measured in features per day.

Risk Filtering: Dead routes, deprecated services, and one-off code are dropped with documented proof instead of being ported blind into the new stack.

Developer Time Where It Counts: Engineers answer curated questions and referee challenges rather than reading legacy code, concentrating scarce human attention on decisions machines cannot make.