In this article
In the first post of this series we described how we moved a client's 700-page website onto a new design system with Claude Code. In the previous post we showed how the team requested migrations from a GitHub issue form and reviewed the pull requests that came back.
This post is about the other half of review: what happens when the AI gets a page wrong.
The quick fix is to open the pull request, edit the HTML and merge. It takes a minute, and it throws away the thing we most wanted to keep: a record of the mistake. If the same mistake turns up on the next 40 pages, nobody knows it was seen before. So we settled on one rule. A wrong migration is never fixed inside the pull request. It's reported as a new issue.
Report it, don't patch it
The issue form has a second issue type, migrated-wrong. The reviewer closes the bad pull request without merging, then files an issue with the same class, the page that looked wrong, and what broke: "list items collapsed onto one line", "the image lost its caption".
Of the 91 migration issues filed through the form, 15 were migrated-wrong reports. The useful ones were precise. One said the inner image should use exactly c-media__img--5-1, not c-media__img--2-1. Another said a box should have the soft green background, not the grey border, and was missing its h3.
At first our guide allowed one exception: for a quirk on a single file, edit the pull request directly. We removed that in early May. A hand edit leaves no record, and the preview link no longer matches the code.
Fix only what was reported
The first version of the re-run was too blunt. A migrated-wrong issue re-migrated the whole page from the original HTML.
In early June that bit us. A teammate reported one wrong _hdg_2-01 heading on one page. The new pull request fixed the heading, and also rewrote the page's image layouts, buttons and lists: three classes nobody had asked about. To check one heading, the reviewer now had to re-check the whole page.
Neither simple fix worked. Re-reading from the original HTML wipes out the other classes already migrated on that page. Re-reading from the migrated page leaves the AI without the original content, and the old class name is gone, so it can't even find the block.
The teammate who reported it also wrote the fix, which uses both. The AI takes the original block from the old HTML, so it has the real content and the old class to find it by. It rebuilds just that block and splices it back into the migrated page in place. Everything else in the page stays byte-for-byte the same. Matching the old block to its spot in the new page is still the AI's call, so when the match is unclear it flags the block for review instead of guessing.
The image report above shows the result. One issue rebuilt one class on 37 pages, and every changed line of HTML in the pull request was that image class.
Variance or a rule bug?
Before filing, the reviewer answers one question: did the AI have a bad run, or is something wrong with the rules it follows? The fixes are different.
- Different pages broken in different ways. That's variance. The same input can give different output on a second try. File
migrated-wrongand let it run again. - Every page with the class broken the same way. That's a rule bug. Don't retry; a retry will repeat it. Tell a maintainer, who fixes the rule once so every later run is right.
- The same page still wrong after three retries. Treat it as a rule bug too.
A rule bug can be quiet. In early May, a test run on the homepage came back with 32 blocks and no conversions. Three days earlier, the same class had converted cleanly on another page. In between, a new release of the design system's component library had removed or renamed some components, and 12 of our rules still pointed at the old names. Every block those rules matched fell back to manual, with no error. We fixed the 12 rules and added a check to the pull request tests that fails if any rule points at a component that doesn't exist. That bug can't come back unnoticed.
Corrections as data
Each migrated-wrong run writes to a corrections log, workspace/corrections/log.jsonl: the page, the class, what it became before, what it became after, and the issue number. When we first tested it, the retry produced better output but the log stayed empty. Nothing wrote to it, and nothing read it. We fixed both sides in one change.
The reading side was a skill called /extend-rule. It read the log for one class, grouped the corrections, and proposed new variants for that class's rule. A correction from a person counted for more than a pattern the AI had noticed on its own. A maintainer reviewed every proposal. Filing an issue never changed a rule by itself.
This part didn't go as planned. The log was cleared when we reset the workspace for a clean run in early June, so the entries we still have, 50 from six issues, all date from 9 to 11 June. They show the same few kinds of error: the wrong variant, the wrong colour, content missing or left unconverted. The rules picked components through an identifier that covered less than 30% of component roots and wasn't unique. Adding variants one correction at a time would only have patched around that.
So on 11 June we fixed it at the source. The design team's spreadsheet already gave the exact new markup for each old component. We made it the primary template, retired the hand-written rule files, and retired /extend-rule with them. The pull request that did it named wrong variants, wrong colours and dropped content as the reason. Looking back, the corrections and that pull request describe the same problem. The fix was just bigger than a new variant.
What we learned
- Never fix AI output where nobody can see it. A correction that isn't recorded gets made again.
- Scope the fix to the report. A fix that changes things nobody asked about costs a full review.
- Tell variance from bugs before you retry. Retrying a rule bug pays for the same wrong answer twice.
- Read the corrections together. One correction suggests a patch. Several of the same kind can show the rule itself is wrong.
Planning a migration of your own? Read the case study, or tell us about your site.
All articles

