Legacy Codebase Refactoring and Migration Pricing Matrix
Construct a risk-adjusted rate card and scope matrix for legacy software architecture modernization and code refactoring services.
Use this template when scoping professional services or specialized consulting fees for refactoring legacy codebases into modern cloud architectures. It allows services sales leads to systematically price technical risk.
Role: Enterprise Architecture Sales Director specializing in large-scale system refactoring and modernization contracts.
Context
- Source monolithic architecture: {{monolith_tech_stack}}
- Codebase dependency and complexity metrics: {{codebase_complexity_rating}}
- Target modern architecture: {{target_cloud_architecture}}
- Blended engineering daily rate: {{team_blended_rate}}
- Critical technical delivery risks: {{delivery_risk_factors}}
- Contractual SLA and downtime penalty exposure: {{sla_penalty_exposure}}
Task
Formulate a risk-weighted architectural modernization pricing matrix that maps refactoring milestones, engineering effort multipliers, and risk-adjusted pricing tiers to ensure profitable scope delivery.
Method
- Evaluate {{monolith_tech_stack}} against {{target_cloud_architecture}} to determine technical architectural delta.
- Apply {{codebase_complexity_rating}} to establish baseline story points and engineering person-days.
- Break down the migration lifecycle into discovery, decoupling, test automation, data migration, and cutover phases.
- Apply {{team_blended_rate}} to baseline person-days across each lifecycle phase.
- Calculate risk contingency multipliers derived from {{delivery_risk_factors}} and {{sla_penalty_exposure}}.
- Generate three pricing structures: Fixed Scope Milestones, Time & Materials with Cap, and Shared-Risk Outcome-Based.
- Structure the final pricing matrix with clear phase breakdowns, billable rates, risk buffers, and margin targets.
Constraints
- MUST include explicit risk contingency percentages for high-complexity legacy modules.
- MUST NOT recommend uncapped liability terms given {{sla_penalty_exposure}}.
- MUST present effort estimates in standard engineering person-weeks or person-days.
- Keep risk narrative under 50 words per phase.
Output format
- Section 1: Architecture Complexity & Effort Overview
- Section 2: Refactoring Pricing Matrix (Markdown table with columns: Migration Phase, Baseline Days, Blended Rate, Risk Buffer %, Total Phase Price, Deliverable Metric)
- Section 3: Commercial Delivery Terms and Scope Boundaries
Self-review
- Validate that baseline rates reconcile mathematically with {{team_blended_rate}}.
- Check that risk factors in {{delivery_risk_factors}} are reflected in the buffer column.
- Ensure each phase has an objective, non-ambiguous exit deliverable.
Explicit role, a named task, and discrete steps the model can follow.
Background, inputs and variables the model needs before it starts.
Hard boundaries — what the model must and must not do.
A named, field-level shape for the response.
Ordered work items that force analysis before an answer.
Length and structure that travel across frontier models.
Signal density — instruction weight without padding.
Documented variables so the scaffold adapts to new inputs.
Quality bar, assumptions and behaviour when inputs are thin.
How much real usage the template has behind it.