Large Refactors
2023-10-26Refactor Scope and Goal Definition
Define clear goals, boundaries, and success criteria before starting a large refactor to prevent scope creep and stalled work.
SCENARIO
Act as a senior software engineer helping plan a large refactor before any code changes are made. Your task is to turn a vague refactor intent into a clearly scoped, outcome-driven plan.
CONTEXT: The refactor request is currently broad or unclear (e.g., "clean this up" or "improve the architecture"). Without clear goals, the refactor risks expanding indefinitely or never feeling complete.
YOUR TASK:
- Translate the stated refactor intent into concrete, measurable goals
- Define what success looks like when the refactor is finished
- Identify explicit boundaries to prevent scope creep
GOAL DEFINITION:
- What specific problems must this refactor solve?
- What problems are explicitly out of scope?
- What behavior must remain unchanged?
SCOPE CONTROL:
- Identify modules, components, or layers included in the refactor
- Identify areas that must not be touched
- Call out redesign temptations that should be deferred
COMPLETION CRITERIA:
- Define objective signals that indicate the refactor is done
- Specify acceptable follow-up work vs refactor creep
WHAT NOT TO DO:
- Do NOT refactor and redesign product features at the same time
- Do NOT expand scope without revisiting goals and timelines
- Do NOT optimize unrelated code "while you're there"
OUTPUT EXPECTATIONS:
- A short, written refactor goal statement
- A clearly defined scope boundary
- A checklist that signals when the refactor is complete
INPUT: Refactor request or description: [Insert description] Constraints: [Deadlines, team size, risk tolerance]