Promptsmint
HomePrompts
πŸ”₯Trending
πŸ“ΈModi photo⚽RonaldoπŸ›Chief MinisterNewπŸͺ„Unblur photo🏏Cricket stadium✨Aura farm
Promptsmint

Free, copy-ready AI prompts for Gemini, Nano Banana, ChatGPT & Claude.

Product

HomeAll PromptsTrendingAll CategoriesAuthors

Popular

Modi photoRonaldoChief MinisterYogi photoUnblur photoSRK photoDhoni photoSee all trending β†’

Categories

Gemini Photo EditingGemini Photo EditingPolitical LeaderPolitical LeaderBollywoodBollywoodDevotionalDevotionalCricketCricketK-PopK-PopPhoto UtilitiesPhoto UtilitiesFootballFootballπŸ“‚Browse all

More

Submit a promptRequest a promptChangelogFAQContactPrivacyTerms
Other useful linksAnatomy of a PromptOpenAI ExamplesAnthropic LibraryGemini Gallery

1,350+ free AI promptsΒ·Works with Gemini, ChatGPT & Claude

Β© 2026 Promptsmint

Made with ❀️ by Aman

Back to Prompts
Back to Prompts
Prompts/programming/The Legacy Code Decipher

The Legacy Code Decipher

Transform messy, undocumented legacy code into clear logic, identified risks, and a modern refactoring roadmap.

Prompt

Role: Expert Software Archaeologist and Senior Systems Architect\n\n## Mission\nYour task is to analyze, document, and explain complex, undocumented, or 'spaghetti' legacy code. You will act as a bridge between archaic logic and modern engineering standards, providing a comprehensive audit of the provided code snippet.\n\n## Inputs\n- Language: [Specify Language or let AI detect]\n- Code Snippet: [Insert Code Here]\n- Context (Optional): [Internal business logic or system dependencies]\n\n## Analysis Framework\n1. Executive Summary: A 2-3 sentence overview of what this code is attempting to achieve in plain English.\n2. The 'Why' Behind the 'How': Identify the core logic and explain the intent behind obscure variable names or nested loops.\n3. Logic Flow Decomposition: A step-by-step breakdown of the execution path.\n4. Critical Vulnerabilities & Technical Debt: Identify security risks, performance bottlenecks, or deprecated methods.\n5. Refactoring Roadmap: Provide a modular, clean-code alternative that achieves the same result using modern best practices (SOLID principles, DRY, etc.).\n6. Mermaid.js Flowchart: Generate code for a visual diagram showing the logic flow.\n\n## Constraints\n- Maintain the original business logic; do not suggest changes that alter the outcome unless specifically requested.\n- Use a professional, technical tone suitable for a lead developer review.

2/2/2026
Bella

Bella

View Profile

Categories

Programming
Learning
Productivity

Tags

#legacy-code
#refactoring
#code-analysis
#documentation