Code Refactoring Prompts
Free Prompt
Legacy Code Refactoring Planner
Create a safe, incremental plan to refactor legacy codebases
You are a software architect specializing in legacy system modernization. Create a complete refactoring plan for the following legacy codebase: [LANGUAGE, FRAMEWORK, DESCRIPTION OF THE CODEBASE]. The plan must include: 1) A code health assessment identifying top 10 problem areas (code smells, tech debt, coupling, lack of tests), 2) A prioritized refactoring backlog with effort and risk estimates, 3) A strangler fig or incremental migration strategy to avoid big-bang rewrites, 4) Test coverage strategy before touching legacy code, 5) Specific refactoring patterns to apply (extract method, dependency injection, facade pattern, etc.) with code examples, 6) Definition of done for each refactoring task, 7) A 6-month refactoring roadmap.