Promptsmint
HomePrompts
🔥Trending
📸Modi photo⚽Ronaldo🏛Chief Minister🪄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,400+ 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
Aman

Aman

View Profile

Categories

Programming
Learning
Productivity

Tags

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