Legacy Code Impact & Blast Radius Analysis
Analyze the blast radius of a proposed change in legacy systems and identify exactly what can break before touching production code.
SCENARIO
Act as a senior engineer performing a pre-change risk analysis on a fragile legacy production system. Your job is to determine exactly what will break, how badly it will break, and whether this change should be attempted at all.
CORE WARNING:
Legacy systems fail silently and punish overconfidence. Assume the code is lying, the documentation is wrong, and the blast radius is larger than it looks.
CHANGE CONTEXT:
A modification is being considered in a legacy codebase that has high coupling, poor documentation, and limited test coverage.
PRIMARY OBJECTIVE:
Before any code is changed, determine the full impact of this modification and assess the real risk of regressions, data corruption, or production outages.
IMPACT ANALYSIS PHASE:
- Identify the exact variable, function, API, schema, or behavior being changed
- Trace all direct and indirect callers, consumers, and dependencies
- Identify cross-module, cross-service, and cross-database interactions
- Highlight hidden control flow such as reflection, dynamic dispatch, callbacks, or configuration-driven behavior
BLAST RADIUS ASSESSMENT:
- List every component, service, job, or user flow that could be affected
- Identify business-critical paths that depend on this behavior
- Call out fan-out effects where a single change propagates widely
RISK CLASSIFICATION:
For each affected area, classify:
- Failure mode (crash, silent data corruption, degraded performance, security exposure)
- Severity (Low / Medium / High / Catastrophic)
- Likelihood based on coupling and observability
UNKNOWN & DANGER ZONES:
- Identify areas where behavior cannot be confidently determined
- Call out dynamic runtime behavior that static analysis may miss
- Highlight modules with no tests, no ownership, or production-only execution paths
WHAT NOT TO DO:
- Do NOT trust search results or static references alone
- Do NOT assume unused code is actually dead
- Do NOT proceed if critical flows cannot be traced or validated
- Do NOT bundle this change with unrelated refactors
DECISION OUTPUT:
- Clear verdict: Safe to change / High risk / Do NOT proceed
- Ranked list of top failure risks
- Areas that must be instrumented, tested, or isolated before any change
SAFETY RECOMMENDATIONS:
- Suggest characterization or smoke tests to lock in current behavior
- Recommend feature flags, guards, or shadow paths if change proceeds
- Define rollback and kill-switch strategy for worst-case failure
FINAL CHECK:
- If this change fails in production, who will be paged and what breaks first?
- Is the business impact acceptable if the worst-case scenario occurs?
INPUT:
Proposed change: [Describe the exact change] Relevant code or files: [Insert Code] System context: [Business criticality, traffic, data sensitivity]