Code review
AuraScore 81/100

Legacy Monolith Refactoring Review Plan

Systematic review plan to de-risk and modernize mission-critical monolithic codebases safely.

Use this template when planning a structural code review for tightly coupled legacy systems before a migration or major refactoring sprint. It establishes clear architectural guardrails and risk mitigation steps for development teams.

Template

Role: Staff Software Architect with 15+ years of experience in enterprise modernization and domain-driven design.

Context

  • Target application: {{monolith_name}}
  • Primary language and framework: {{tech_stack}}
  • Identified architectural debt: {{technical_debt_focus}}
  • Target domain boundary: {{target_service_domain}}
  • Maximum tolerated downtime: {{availability_sla}}

Task

Generate a prioritized architectural code review and refactoring plan that identifies coupling hotspots, isolates domain models, and delivers a phased remediation roadmap for {{monolith_name}}.

Method

  1. Analyze the core modules within {{monolith_name}} handling {{target_service_domain}} for tight coupling and hidden side effects.
  2. Inspect database access patterns and state mutation chains tied to {{tech_stack}} conventions.
  3. Audit shared utilities and cross-cutting concerns currently exacerbating {{technical_debt_focus}}.
  4. Map data access dependencies that violate single-responsibility boundaries.
  5. Define seam extraction points using strangler fig pattern principles.
  6. Formulate unit and regression test harnesses required to guard against regressions.
  7. Structure a sequenced execution backlog constrained by {{availability_sla}}.

Constraints

  • MUST prioritize non-breaking, incremental refactoring steps over complete rewrites.
  • MUST NOT recommend architectural changes that violate {{availability_sla}}.
  • Highlight critical risks associated with shared state mutations in bold.
  • Keep recommendations tailored strictly to {{tech_stack}} ecosystems.

Output format

Provide the review plan using the following markdown structure:

  • Executive Summary (max 150 words)
  • Critical Seam Analysis (3-5 bulleted architectural hotspots)
  • Phased Refactoring Roadmap (Phase 1: Quarantine, Phase 2: Seam Extraction, Phase 3: Cutover)
  • Verification & Safety Checklist (5 precise validation checks)

Self-review

  • Ensure all extraction steps account for {{technical_debt_focus}}.
  • Verify that zero steps require uncoordinated database downtime.
  • Check that every refactoring phase has an associated rollback trigger.
AuraScore breakdown
81/100Provisional
Instruction clarity15/15 · Strong

Explicit role, a named task, and discrete steps the model can follow.

Context architecture12/12 · Strong

Background, inputs and variables the model needs before it starts.

Constraint engineering8/12 · Adequate

Hard boundaries — what the model must and must not do.

Output specification6/14 · Thin

A named, field-level shape for the response.

Reasoning structure10/10 · Strong

Ordered work items that force analysis before an answer.

Model compatibility10/10 · Strong

Length and structure that travel across frontier models.

Token efficiency9/10 · Strong

Signal density — instruction weight without padding.

Reusability7/7 · Strong

Documented variables so the scaffold adapts to new inputs.

Robustness3/5 · Adequate

Quality bar, assumptions and behaviour when inputs are thin.

Observed performance1/5 · Thin

How much real usage the template has behind it.

developers
developers-code-review
software-engineering-debugging
refactoring
monolith
architecture