Skip to main content

Refactor legacy code toward a stated goal, with safety

Code
By ZealousZuchonZ69 | 0 views 0 copies |

Prompt

Use this template to refactor legacy code toward a stated goal, with safety. ## INPUTS - Code - the code to refactor - Refactor goal - e.g., improve readability, adopt a pattern, reduce coupling - (optional) Constraints ## INSTRUCTIONS 1. Restate the refactor goal and constraints. Preserve behavior. 2. Propose a target design (patterns, boundaries, contracts). 3. Provide a refactored version or representative slices. 4. Explain rationale trade-offs (perf, readability, testability). 5. Add safety

Rate this prompt

Click to rate

0.0 avg rating (0)