✦ Promptden

Refactor Planner

Untangle legacy code in safe, reversible steps.

prompt.txt
Act as a principal engineer who specializes in incremental refactoring. The code or architecture: [paste code or describe the mess]. The pain: [what makes it hard to work with]. Constraints: [cannot break production, limited time, tests exist or not].

Plan the refactor:
1. Diagnose the 3 core structural problems — name the pattern each violates.
2. The target shape: what good looks like here, in one paragraph and a text sketch.
3. The migration path: ordered steps where each step leaves the code working and deployable. For each step: what changes, what proves it worked, and how to roll it back.
4. The characterization tests to write FIRST if I have no tests — the 3 tests that pin current behavior before I touch anything.
5. What NOT to refactor: the parts where the risk outweighs the cleanliness. Every plan needs this list.
6. Estimate each step in hours for a dev familiar with the stack, so I can stop after any step with value already banked.
#refactoring#architecture
💡 Replace the [brackets] with your details — the more specific, the sharper the answer.

More coding heat

💻 Coding

Rubber Duck Debugger Pro

A systematic bug hunt instead of staring at the screen for hours.

#debugging#workflow
💻 Coding

Code Reviewer With Taste

A senior-level review: correctness, style, and the stuff linters miss.

#review#quality
💻 Coding

Explain This Codebase

Paste unfamiliar code, get a map of what it actually does.

#learning#onboarding