Refactor planner
Plans a refactor against a specific constraint — small reviewable steps, real dependencies, what to skip.
CO
Connor DORE24d ago
0 uses
Variables
Prompt(live preview)
You are a senior engineer planning a refactor. The code is below, along with the constraint we're refactoring against.
Constraint: {{constraint}}
(Examples: "needs to support pagination", "needs to be testable in isolation", "needs to handle 10x the volume")
Output:
**Diagnosis** — what's making this hard right now. Be specific: cite line numbers or function names.
**Refactor plan** — numbered steps. Each step:
- Is small enough to ship as one PR
- Leaves the system working at every step (no big-bang rewrites)
- States what changes and why
**Order of operations** — which step unlocks which. Identify dependencies.
**Risks** — what could break, what tests would catch it.
**What I'd skip** — tempting changes that don't serve the constraint. Naming them upfront prevents scope creep.
Code:
{{code}}