Skip to main content

Code Migration Assistant with Cursor

Plan a framework or version migration with Cursor: dependency-ordered priority matrix, before/after templates, adapter shims, and validation scripts.

Fill in the placeholders

Edit the values, then copy your finished prompt.

Your Prompt
prompt.txt
I need to migrate my project from Vue 2 with Options API and Vuex to Vue 3 with Composition API and Pinia. The codebase has 85 components and 150 files to migrate. 1) Create a migration priority matrix: which files to migrate first based on dependency order and risk level. 2) For each file type (.vue SFCs, .js store modules, .js mixins, .spec.js tests), provide a before/after template showing the exact transformation pattern. 3) Identify breaking changes between Vue 2 with Options API and Vuex and Vue 3 with Composition API and Pinia that require manual intervention vs automated find-and-replace. 4) Generate a compatibility shim or adapter layer so I can migrate incrementally without breaking the running application. 5) Create a migration checklist I can track in a markdown file, with each item linked to the specific file. 6) Write a validation script that compares old and new behavior for user auth flow, checkout process, admin dashboard data loading to ensure functional equivalence. 7) Estimate effort per file type and provide a realistic timeline for a 3-person team.

What this prompt does

This prompt plans a framework or version migration that you cannot afford to break. You set the [source_stack], [target_stack], [component_count], and [file_count], and the AI builds a priority matrix ordering files by dependency and risk, before-and-after templates for each of your [file_types], a list of breaking changes split into automated find-and-replace versus manual intervention, a compatibility shim for migrating incrementally, a tracked markdown checklist linked to specific files, a validation script for [critical_paths], and an effort estimate with a timeline for a [team_size]-person team.

The structure works because big-bang migrations are how live products go offline. The incremental, adapter-first approach lets the running application keep working while you migrate one piece at a time, in dependency order. The compatibility shim bridges [source_stack] and [target_stack] so both can coexist mid-migration rather than forcing a single cutover. Splitting breaking changes into mechanical versus judgment-required work prevents the subtle regressions that come from automating a change that actually needed a human decision. And the validation script comparing old and new behavior on [critical_paths] is the safeguard that confirms functional equivalence before you delete any old code — it is the part you never skip, because it catches behavior drift the diffs alone would hide.

When to use it

  • You are migrating between framework versions and the product must stay live throughout the change
  • The migration spans many files and components and needs deliberate dependency-ordered sequencing
  • You want an adapter layer so the old and new code can coexist during the migration
  • Some breaking changes are mechanical and some require judgment, and you need them clearly sorted
  • You must prove functional equivalence on [critical_paths] before deleting any old code
  • You need a realistic effort estimate and timeline for a [team_size]-person team to plan around

Example output

You get a migration plan: a priority matrix ranking files by dependency and risk, before-and-after transformation templates for each of your [file_types], a breaking-changes list separated into find-and-replace versus manual work, a compatibility shim design, a trackable markdown checklist linked to specific files, a validation script for [critical_paths], and a per-file-type effort estimate with an overall timeline.

Pro tips

  • Give honest [component_count] and [file_count] numbers; the timeline and batch sizing depend directly on them
  • Lean on the compatibility shim so you never have the app fully broken between batches
  • Treat the validation script for [critical_paths] as non-optional; it is what proves equivalence before any cleanup
  • Migrate strictly in the priority matrix's dependency order to avoid cascading breakage across components
  • Sort breaking changes carefully — automating a change that needed judgment is a common source of subtle regressions
  • Keep the checklist linked to specific files so progress is visible and nothing gets silently skipped

Frequently Asked Questions

Why migrate incrementally instead of all at once?
A big-bang migration risks taking the running product offline if anything breaks. The incremental, adapter-first approach migrates file by file in dependency order while a compatibility shim lets `[source_stack]` and `[target_stack]` coexist, so the application keeps working throughout.
What does the compatibility shim actually do?
It is an adapter layer that bridges the old and new stacks so both can run during the migration. That lets you move components over gradually without breaking the parts not yet migrated, which is essential when you cannot afford downtime.
How does the validation script prevent regressions?
It compares old and new behavior on `[critical_paths]` like auth and checkout to confirm functional equivalence. Running it before removing old code is the safeguard that catches behavior changes the migration introduced, rather than discovering them in production.
Are the effort estimates reliable?
They are a starting point based on your `[file_count]`, `[component_count]`, and `[team_size]`, not a guarantee. Manual breaking changes and unexpected edge cases shift real timelines, so treat the estimate as a planning baseline and re-check it after the first few files.
Engr Mejba Ahmed

Need this built for real?

Engr Mejba Ahmed

AI Developer · Software Engineer

I'm Mejba — I design and ship production AI systems, automations, and full-stack apps. If you want this turned into a working solution for your team, let's talk.

More in Cursor AI Prompts

Engr Mejba Ahmed

Engr Mejba Ahmed

AI assistant · trained on my work

👋

Hey there!

Quick Actions

WhatsApp Direct line to me

Chat on WhatsApp

+880 1723 741224 · Replies within the hour on working days

Popular Questions

Engr Mejba Ahmed is connected
Engr Mejba Ahmed is typing...
Engr Mejba Ahmed avatar

✉ Want me to follow up? Drop your email

Engr Mejba Ahmed avatar

📞 Connect Directly

Choose how you'd like to reach me

WhatsApp

+880 1723 741224

Email

mejba.13@gmail.com

✓ Details sent! I'll get back to you shortly.

Powered by OpenAI

335+

Blog Posts

25

AI Courses

63

Projects

Services & Expertise

Pricing & Process

Learning & Resources

Connect & Support