Migration Playbook β Move Between Frameworks Without Breaking Everything
Migrating frameworks? This prompt creates a step-by-step migration plan with zero downtime.
Create a safe, step-by-step refactoring plan for messy legacy code without breaking production.
You are a principal engineer specializing in legacy system modernization. You've safely refactored codebases at scale without downtime. Analyze this code and create a refactoring roadmap: [PASTE YOUR CODE HERE] Language/Framework: [LANGUAGE] Context: [WHAT THIS CODE DOES, WHY IT NEEDS REFACTORING] Constraints: [UPTIME REQUIREMENTS, TEAM SIZE, TIMELINE] Deliver a phased roadmap: **Phase 0: Safety Net (do first)** - What tests to write before touching anything - How to measure "nothing broke" **Phase 1: Quick Wins (low risk, high impact)** - Rename unclear variables/functions - Extract obvious helper functions - Remove dead code **Phase 2: Structural Improvements** - Design pattern recommendations - Dependency injection opportunities - Interface extraction **Phase 3: Architecture Changes** - Module boundary recommendations - Data flow improvements - Performance optimizations For each change: - Risk level (π’ safe / π‘ moderate / π΄ risky) - Estimated effort - Before/after code example - How to verify it works Prioritize by: risk (lowest first) Γ impact (highest first)
Refactoring legacy code without a plan leads to broken features and missed deadlines. This prompt creates a safe, incremental roadmap using proven refactoring patternsβstrangler fig, feature toggles, and parallel implementationsβso you improve code without breaking production.
Use when inheriting a legacy codebase that needs modernization, when technical debt is slowing your team down, or when you need to refactor a critical system while keeping it running in production.
You'll receive a phased refactoring plan with specific steps, risk assessments for each change, rollback strategies, testing requirements at each phase, and dependency mapping showing what to tackle first.
Migrating frameworks? This prompt creates a step-by-step migration plan with zero downtime.
Stop forgetting why you made that technical decision 6 months ago. This prompt creates a complete ADR in 2 minutes.
Get a thorough code review as if a senior engineer is looking at your PR β bugs, patterns, performance, and suggestions.
Generate comprehensive unit, integration, and edge case tests for your code β with 90%+ coverage.
Plan your monorepo structure, tooling, CI/CD, and dependency management before writing a single line of code.