Tackling 16,000 component migrations without a code freeze
How do you swap out roughly 16,000 deprecated component instances in a codebase that merges around 150 merge requests a day? That was the challenge our team, Phoenix, Fullscript’s design systems group, faced after releasing v1.0.0 of DS5, the fifth iteration of our Aviary design system, as a standalone React package (aviary-web). Our initial CLI migrator used abstract syntax tree (AST) transforms to update import paths and prop names component by component, but we quickly realized we needed to scale the tool and tap into agentic development to speed things up.
The challenge
Work on DS5 kicked off in April 2024 by porting over existing components as-is. Over the next year, we redesigned and re-architected components to introduce visual and API updates before launching v1.0.0 in September 2025. While the original migrator worked well for straightforward replacements using strict rules, any missing component or prop equivalents were skipped, requiring manual fixes. When our small team was asked to own the full migration across our busiest codebase with 75 daily active contributors, a code freeze was completely off the table, and relying on the original migrator process was way too slow.

Making the migrator work for agents
To speed up our workflow, we updated the migrator to run headlessly without interactive prompts, outputting results into structured JSON for AI agents to digest. We also broadened its scope from checking single components to analyzing entire directories or pages. In page mode, the tool follows a page's imports, migrates only the files inside that page's own directory, and leaves shared files alone while marking them as read-only. Scoping each merge request to one page makes the changes easier to review. We added a few handy new flags to keep things running smoothly:
- --plan: Lists which files will be migrated, which component updates will run, and which shared files the page depends on
- Dry-run (the existing default): Runs every transform and reports changes without touching any files
- --apply: Applies the changes once the agent executes the plan
When tested on our clinic financial reports page, the revised migrator identified 10 target files for updates while leaving all other imported files untouched. A dry run flagged 82 component instances ready for automated conversion, alongside a single blocked instance that required manual intervention: a Skeleton instance with a margin prop. Because the updated Skeleton interface omits margin support, spacing needed to be handled another way. This generated log provides a structured roadmap for the agent, clearly surfacing remaining edge cases even when automated transforms fall short.
To ensure AI agents operate efficiently and follow consistent standards, we built a set of structured assets and automated workflows:
- Agent skill & core rules: Outlines fundamental guidelines, such as forbidding invented props and enforcing design token usage within a standardized migration workflow
- Structured JSON registry: Maps every component’s import path and description so agents can instantly verify component availability
- API reference guides: Includes code snippets to prevent agents from creating non-existent props
- Manual migration guides: Covers edge cases and complex compound components like Modal or DropdownMenu that fall outside automated AST transforms
- Automated CI & distribution: All documentation files generate automatically with every package build, enforced by CI checks that reject missing docs. Running a package install places these files directly into the consuming codebase's skills directory for easy access
Human intervention
Even with thorough documentation and increasingly capable agents, some decisions still require human judgment. Throughout the DS5 migration, missing props or component gaps often came up due to deliberate design decisions or lack of parity. When that happens, the agent leaves the old code as-is and logs a carve-out detailing what’s missing, why it was skipped, and which files are affected. Our team then looks at the use case and decides whether to support the old pattern or retire it in favour of the new one.

In certain cases, the old pattern is considered and added to the design system. Take the new Modal component: it always includes a close button while our previous component made this optional. This was a problem for confirmation dialogs, prompting us to introduce ModalDialog, allowing us to promote a widely used shared component into the design system and unblocking migrations. In other scenarios, the new pattern is preferred. For instance, the old Modal allowed the Escape key to be disabled, a feature we removed because the Escape key is required for accessibility. We also look at one-offs and customizations, and sometimes consolidate them so the platform feels consistent. We dropped four display-only props (isWide, isFullWidth, hideFileType, showFullLabel) from our old Attachment component so file attachments look the same everywhere.
Some of these decisions only show up once we see the updated UI. Since we’re migrating pages that other teams own, we can’t always tell at a glance whether a page looks right, which is why a visual review is key. To make it easier to review UI changes with minimal context, authors and reviewers can leverage a review skill that logs into the merge request’s review environment with Playwright, takes screenshots of the UI at desktop and mobile breakpoints, and tests states like open menus and errors. It then comments on the MR with the screenshots, a verdict (pass, pass with notes, needs fixes, or blocked), and flags any issues for human reviewers.

The skill evaluates visual changes against our design system standards and migration guidelines, giving reviewers extra context. Reviewers still compare against staging, and test the flows manually to confirm the features work and the UI stays close to the original design.
Where we are now
So how do you swap out 16,000 deprecated component instances across Fullscript’s most active codebase without a code freeze? Our migrator goes first to convert everything it can. AI agents then work through the instances the migrator skipped, using structured docs we've provided, and human reviewers make the ultimate decision on each change.
We kicked off the migration process in early 2026. Having successfully merged nearly 420 merge requests, we are currently roughly 81% complete. The main bottleneck continues to be reviewing changes as AI agents submit merge requests faster than our human reviewers can evaluate them. Nonetheless, we have migrated approximately 15.5K instances to date and are continuously refining the process as we go.