Treatment Matrix — Legacy Application Disposition¶
Use this matrix after running the App Inventory Agent. Match an application's complexity score and strategic value to the recommended treatment path. Each path maps to a set of Base Coat agents and skills.
Decision Framework¶
Strategic Value
Low Medium High
┌────────────┬────────────┬────────────┐
Low │ Retire │ Rehost │ Replatform│
Complexity ├────────────┼────────────┼────────────┤
Score Mid │ Retire │ Replatform│ Refactor │
├────────────┼────────────┼────────────┤
High │ Replace │ Refactor │ Rebuild │
└────────────┴────────────┴────────────┘
Strategic value is rated Low / Medium / High based on business criticality, active user base, revenue contribution, and regulatory obligation.
Treatment Paths¶
Retire¶
Stop investing in the application and plan decommission.
Criteria
- Complexity score < 40 AND strategic value: Low
- No active users in the past 90 days
- Functionality already covered by another system
Actions
- Communicate sunset timeline to stakeholders
- Archive source code and database snapshots
- Redirect dependent systems to replacement
- Remove from load balancer and DNS
- Decommission infrastructure
Base Coat agents: product-manager, devops-engineer
Rehost (Lift and Shift)¶
Move the application to a new infrastructure platform with no code changes.
Criteria
- Complexity score 1–40 AND strategic value: Medium
- Application is stable with low change frequency
- Primary driver is infrastructure cost or EOL OS/hardware
Actions
- Containerize the application binary (no source change)
- Deploy to Azure Container Apps or AKS
- Migrate database to PaaS (Azure SQL, Cosmos DB)
- Update DNS and connection strings
- Validate with smoke tests
Base Coat agents: containerization-planner, devops-engineer
Base Coat skills: azure-container-apps, devops
Replatform (Lift, Tinker, and Shift)¶
Make targeted platform changes while preserving application architecture.
Criteria
- Complexity score 1–40 AND strategic value: High
- Complexity score 21–60 AND strategic value: Medium
- Main goal is taking advantage of managed services (PaaS database, managed identity)
Actions
- Replace self-managed dependencies with managed equivalents
- Adopt managed identity — remove hardcoded credentials
- Externalise config via Azure App Configuration / Key Vault
- Update framework to a supported LTS version
- Run existing test suite to validate parity
Base Coat agents: legacy-modernization, config-auditor, devops-engineer
Base Coat skills: identity-migration, environment-bootstrap
Refactor (Re-architect)¶
Redesign the internal structure without changing external behavior.
Criteria
- Complexity score 41–80 AND strategic value: Medium or High
- Application has high business value but significant technical debt
- Target state is microservices or modular monolith
Actions
- Run App Inventory to produce full dependency and complexity report
- Apply strangler fig pattern to extract high-value modules
- Introduce API gateway in front of legacy core
- Extract services incrementally per sprint wave
- Replace legacy service bus / messaging with Azure Service Bus
- Migrate authentication to ASP.NET Core Identity + Entra ID
Base Coat agents: legacy-modernization, solution-architect, backend-dev
Base Coat skills: service-bus-migration, identity-migration, architecture
Rebuild¶
Rewrite the application from scratch using modern patterns, retaining business logic.
Criteria
- Complexity score 61–100 AND strategic value: High
- Codebase is unmaintainable or framework is no longer supportable
- Business logic is well-understood and can be respecified
Actions
- Extract business rules via the App Inventory Agent
- Author PRD and technical spec (
docs/prd-and-spec-guidance.md) - Design new architecture (C4 model, ADRs)
- Build greenfield service with parity acceptance tests
- Run old and new systems in parallel with traffic mirroring
- Perform cutover and retire legacy system
Base Coat agents: solution-architect, backend-dev, frontend-dev, product-manager
Base Coat skills: architecture, backend-dev, frontend-dev
Replace¶
Adopt a commercial or open-source product instead of maintaining custom code.
Criteria
- Complexity score > 60 AND strategic value: Low or Medium
- COTS solution covers ≥ 80 % of required functionality
- Total cost of ownership favors commercial product
Actions
- Document current feature set and integration points (App Inventory output)
- Evaluate vendor options against requirement matrix
- Plan data migration and integration adapters
- Run parallel operation period
- Decommission custom application
Base Coat agents: product-manager, solution-architect
Scoring Sheet¶
Use this worksheet alongside skills/app-inventory/complexity-scoring-template.md.
| Application | Complexity Score | Strategic Value | Treatment |
|---|---|---|---|
| (name) | (1–100) | Low / Medium / High | Retire / Rehost / Replatform / Refactor / Rebuild / Replace |
Governance¶
- Complexity score and treatment path must be recorded in the ADR log for each application.
- Scores above 60 require solution-architect sign-off before treatment selection is finalised.
- Treatment paths that result in Retire or Replace require product-manager approval.
- Review the treatment matrix annually or after major portfolio changes.