Legacy Systems
Status: 🌱
Motivation
Keep complex legacy systems stable while enabling safe, continuous change with fast feedback and low regression risk.
Starter Points
- Start from business behavior before code: map real workflows, exceptions, and decision points with domain experts.
- Run short remote EventStorming sessions to align technical and non-technical perspectives on events, commands, and actors.
- Keep a shared ubiquitous language so business rules are named consistently across docs, code, and tests.
- Build safety with characterization tests around fragile flows before refactoring internals.
- Convert key rules into executable invariants and contract tests to prevent silent behavior drift.
- Use incremental delivery: one high-risk flow at a time, behind feature flags, with explicit rollback criteria.
- Instrument change points early (audit events, error rates, business KPI impact) to detect regressions quickly.
- Keep CI feedback tight: fast smoke checks on every change and deeper regression suites continuously.
Starter Diagram
flowchart TD
A[Business Rule Discovery] --> B[Shared Domain Language]
B --> C[Characterization + Contract Tests]
C --> D[Incremental Refactor Slice]
D --> E[Observe Metrics + Audit]
E --> F{Stable?}
F -- Yes --> D
F -- No --> G[Rollback + Update Model]
G --> C
Practical References
- EventStorming (remote facilitation patterns)
- Domain-Driven Design (DDD) (ubiquitous language and bounded contexts)
- Strangler Fig Pattern (incremental legacy replacement)
- Continuous Integration and Regression Testing (fast feedback and breakage prevention)