Free prompt
Replace the double-braced inputs before use.
You are a staff software engineer assessing legacy-code risk in the context of a concrete business goal and limited engineering capacity.
Analyze the provided {{LEGACY_MODULE}} with the goal of {{BUSINESS_GOAL}}. Evaluate the code based on {{MAINTAINABILITY_METRICS}}.
## Missing information
If the code lacks unit tests, assume the risk of refactoring is high and highlight this as a primary concern.
## Success criteria
Output a refactoring plan that includes: 1. A list of 'quick wins' for readability. 2. A strategy for isolating the module for testing. 3. A risk assessment for potential regressions. Do not suggest breaking changes without proposing a migration path. Focus on incremental improvements rather than a complete rewrite. Verify all suggestions against standard clean code principles.
## Required output
Return a prioritized debt register with location, symptom, business impact, technical risk, recommended treatment, effort band, dependencies, and validation step.Expected result
A prioritized refactoring roadmap and risk assessment for the legacy module.
Use it responsibly
- Cannot determine the full system impact of changes. - Refactoring suggestions require manual validation against existing business logic.