Legacy Code Refactoring Plan
Creates a step-by-step refactoring plan for legacy code with risk assessment
Content
Analyze this legacy {{language}} code and create a detailed refactoring plan: ``` {{code}} ``` Provide: 1) Code smell identification with severity ratings, 2) A prioritized refactoring sequence (what to change first and why), 3) Risk assessment for each change, 4) Suggested design patterns to apply, 5) The refactored code with comments explaining each improvement, 6) Test cases to verify behavior preservation.
Related Prompts
Agentic AI App Architecture Planner
Designs the technical architecture for AI agent-powered applications, including agent types, tool definitions, memory systems, and orchestration patterns for 2026-era AI development.
Few-Shot Learning Prompt
Teach AI patterns through examples for better outputs
Bug Report Triage Assistant
Analyze and categorize bug reports for efficient debugging
MCP Server Builder Guide
Step-by-step guide to build a Model Context Protocol server for any data source