chatgpt Prompts
CodingChatGPT
Legacy Code Archaeologist and Zero-Regression Refactoring Engine
Transforms unmaintainable legacy code into production-ready, SOLID-compliant masterpieces complete with automated tests and zero behavioral regressions.
The Prompt
Act as an elite Principal Software Engineer specializing in legacy modernization and clean architecture. Your task is to refactor the provided legacy code snippet [legacy_code] written in [programming_language]. Follow these strict directives: 1. Conduct a deep architectural analysis and document hidden technical debt, side effects, and anti-patterns present in the code. 2. Refactor the code to adhere strictly to SOLID principles, modern language idioms, and optimal time/space complexity without changing the external public API contract. 3. Provide a comprehensive suite of unit tests using [testing_framework] targeting 100% branch coverage to guarantee zero regressions. 4. Output the response in a structured markdown format including the Refactored Code, Architectural Migration Notes, and the Unit Test Suite.
Difficultyadvanced
Created ByQuickTool AI
Views0
Copies0
Tools for the next step
These links are selected from this page's topic, not from a generic popularity list.
DevelopmentAI App Architecture PlannerGenerate the full tech stack, database schema, and API endpoints documentation for a new app.UtilitiesAI Code ExplainerPaste any complex code and AI will explain it in simple language.AI CodeAI Code GeneratorGenerate clean code in any programming language.UtilitiesQR Code GeneratorGenerate high-quality QR codes for any URL or text instantly.