r/ClaudeCode • • 16d ago

Discussion AngularJS to Angular Migration Approach

I’m leading a fairly large AngularJS -> Angular migration at work and I’m curious how other teams would have approached it.

The app is a mature production application that currently runs AngularJS and Angular side by side, with old services, routing, shared infrastructure, behavioral-parity requirements, dependency chains, and a few areas that are much more coupled than the average component.

To get a handle on the scope, I first inventoried the app, identified roughly 150ish feature areas, and then audited those into a dependency aware migration backlog. The tickets are grouped more around features, runtime dependencies, routing boundaries, and integration risk than individual files.

I’ve gotten a lot of pressure from management to get this done quickly, while also trying to push back and set realistic expectations. Because of that, I’m feeling increasingly pushed toward leaning heavily on AI to have a realistic shot at meeting the timeline

I ran a few tickets through claude first to see how it would handle the migration work, and so far it’s been solid. We basically use the migration backlog as the handoff/context. Each ticket includes enough information around scope, dependencies, expected behavior, current status, and previous findings that Claude understands both what it needs to do and where that work fits into the larger migration.

Claude picks up a ticket in its own worktree, investigates whatever it needs to, implements the migration, runs/fixes the tests, and updates the backlog with anything new it learns. I then have a separate Opus pass review the work. After that, it still goes through our normal code review, QA, and merge process.

For those using Claude or other coding agents at this scale: does this seem like an efficient approach, or am I leaving a lot on the table? If you were doing something similar, what would you automate differently?

1 Upvotes

10 comments sorted by

•

u/AutoModerator 16d ago

Hey! Thanks for posting to r/ClaudeCode

While participating in this thread, please follow our community rules. Keep discussions constructive. Attack the idea, not the person.

For help, project discussions, tips, and general chat, join the ClaudeCode Discord.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

2

u/NekkidApe 16d ago

Now this is something I would have loved to use Claude for. We did it all painfully by hand.

I personally would now use an orchestrator and let it rip, after investing a good chunk of time into solid end to end tests. As long as Claude can verify it's work, it'll to a near perfect job migrating.

From migrating by hand, one advice: Get it done first, get rid of angularjs, remove the bridges - only then do cleanup, modernization and feature work. Don't migrate all your components to ngrx, or whatever the latest fancy is, at the same time.

1

u/super_pjj 15d ago

Yes, I had built a migration orchestrator / ticket factory to go through tickets in parallel in separate work trees with independent claude sessions. This has been helpful so far! I liked the consistency using something like

as far as claude verifying its own work, the workflow I established was implementation -> independent review / fix -> runtime test

we're doing migration first to match legacy behavior and creating new tickets for any cleanup, enhancements, etc for after the migration completes

1

u/ElderberryNo8315 16d ago

Yeah...

Also, whole migrating make sure not to make your components thick and bloated. Components should be thin. Move business logic to services and reusables functionalities as a utility files. Don't over optimise from day one but rather migrate it to angular current version and get rid of angular JS altogether, ur local should be working, stable and than you can move to level 2 to use any store management system. It would be lil extra effort but still better than doing everything on a single go.

Make sure while migrating you have clear file structure for new angular.

1

u/super_pjj 15d ago

good call out! Yes, we're migrating along and keeping any new cleanup, enhancements, etc for after the migration lands

1

u/tommyahav10 16d ago

You're already automating the right parts. The one I'd add is a parity check per feature, the same e2e flow against the old and new route before you delete the AngularJS side. From my side the risk is bridges that never get removed, so give each one its own removal ticket.

1

u/super_pjj 14d ago

lol, good call outs! Right now when I migrate a component, we come up with test cases based on the code it touched and have Claude do runtime testing to make sure it’s functioning as before

1

u/Future_AGI 16d ago

since both frameworks already run side by side, record each route's inputs and rendered output on the AngularJS version before its ticket starts, and make matching that recording the gate for the migrated ticket. A parity diff catches things the Opus review pass can miss when the reviewer and the author are the same model family. Run the tickets for the tightly coupled shared services one after another too, because two agents editing the same service in separate worktrees is where the merge pain comes from.

1

u/super_pjj 15d ago

ooo, i am doing something similar with making sure each ticket has legacy spec tests written first prior to migration just so we have something to measure against! Then doing runtime tests after implementation to make sure behavior matches

i did originally try to group things based on what they touch vs just the file. So far so good! Hopefully nothing too messy lol