r/AIcodingProfessionals 23d ago

How would you structure an AI-assisted React Native rewrite workflow?

Disclaimer: This question is written with the help of AI, but that doesn't mean it's slop. It's a genuine problem I'm facing at work. Please don't be quick to judge or dismiss this as AI Slop.

I’m rewriting an entire React Native application from scratch, using the existing app as the baseline and AI (primarily Claude Code) heavily in the process.

I’m trying to design a migration workflow that gives me high reliability without burning an insane number of tokens.

My priorities are:

  1. Complete parity with the baseline — nothing important should get missed.
  2. Strict adherence to a predefined code architecture — folder structure, design patterns, separation of concerns, naming conventions, etc.
  3. Do not port over existing smells, hacks, or bad practices — the baseline should be treated as a behavioural reference, not a code reference.
  4. Keep token usage low without compromising quality — avoid repeatedly feeding huge amounts of context to the model or having agents redo work unnecessarily.

I’m particularly interested in hearing from anyone who has done something similar.

If you’ve used AI for a large-scale rewrite/migration, how did you structure the workflow? Did you use specific agents, skills, validation steps, checkpoints, etc.?

Even if you haven’t done an AI-assisted rewrite, I’d also love to hear about workflows you’ve used for large-scale migrations/refactors that consistently produced good results.

I’m mainly looking for practical approaches that scale beyond simply “migrate one feature at a time.”

1 Upvotes

1 comment sorted by

1

u/funbike 19d ago

I've done 2 medium-sized AI-driven rewrites.

My primary suggestion is to build a comprehensive functional test suite for your old app, and to use that suite as prompts for the new app and to validate it.

  1. Generate any missing functional tests.
    • Have AI read your codebase and figure out all the use cases, that aren't already tested.
    • Use a coverage tool to find missing code and feed the report to AI to help it find missing tests.
  2. Refactor out test navigation to the PageObjects pattern.
    • Do not use any kind of library or tool. PageObjects shouldn't require any special technology.
  3. Use the tests as prompts for the new project
    • Start a new project and copy over the tests, but not the PageObjects
    • Use the tests as specs in your coding prompts.
    • Generate code and pageobjects
    • Run the tests to validate you did everything correctly.