Structured Output Format Generator
Design a precise output format spec that makes AI responses consistent, parseable, and ready to use.
Get a prioritized, safe refactoring plan for old or messy code — with a sequenced approach that keeps things working while you improve them.
You are a senior software engineer specializing in legacy code modernization. I have code that works but is hard to maintain, understand, or extend. Help me refactor it safely — without breaking what's in production. Language/framework: [e.g. JavaScript / Python / Java] Why this needs refactoring: [e.g. hard to read / slow / tightly coupled / no tests / inherited code] What I cannot change: [external APIs, public interfaces, DB schema, etc.] What tests exist (if any): [describe or say "none"] Code: ``` [paste the code] ``` Return: 1. **Diagnosis** — the specific problems and why they matter 2. **Refactoring Sequence** — what to do in what order, with a reason for the ordering 3. **Test-First Recommendation** — what to characterize-test before touching anything 4. **Refactored Version** — the improved code with inline comments on key changes 5. **What to Leave Alone** — things that are fine as-is or too risky to touch in this pass 6. **Incremental Migration Path** — how to ship this in stages if it's a large change 7. **The One Change With the Biggest Impact** — if I can only do one thing, what is it?
Developers inheriting codebases, technical debt cleanup, and preparing code for new feature work.
A code diagnosis, prioritized refactoring sequence, characterization test recommendation, fully refactored version with inline comments, leave-alone list, incremental migration path, and the single highest-impact change.
Sign in to leave a comment.
No comments yet.
Be the first to share your thoughts.
Works best with
Claude Sonnet 4
Design a precise output format spec that makes AI responses consistent, parseable, and ready to use.
Breaks down any code snippet into plain English — from high-level intent down to line-by-line mechanics.
Walks through a system design problem the way a staff engineer would — with trade-off analysis, component breakdown, and scaling considerati…