Learn

What is blast radius in code?

Blast radius is the set of files and components that break — or need updating — when a given file changes. It's the answer to the most important question in any codebase: “If I change this, what else breaks?”

The concept, explained.

The term “blast radius” comes from explosive ordnance — the area of damage around a detonation point. In software engineering, it means the same thing: the zone of impact when something changes or fails.

Every file in a codebase exists in a web of dependencies. File A imports File B. File B imports File C. If File C changes its exported interface, File B breaks. And because File A depends on File B, File A may break too. The blast radius of File C includes both File B (a direct dependent) and File A (a transitive dependent).

This is different from simply counting imports. A file might only be imported by two other files directly, but if those two files are themselves imported by twenty others, the true blast radius is much larger than it appears.

Forward dependents vs. dependencies.

Blast radius analysis has two directions, and they answer different questions.

Forward Dependents

“What breaks if this changes?”

Forward dependents are the files that import or rely on the file in question. These are the files at risk when you modify something. A file with many forward dependents is a high-impact change target — modifications ripple outward through the dependency graph.

Dependencies

“What does this rely on?”

Dependencies are the files that the file in question imports. These are its inputs — the modules it needs to function. A file with many dependencies is fragile: any change upstream can break it. It's exposed to a large surface area of potential instability.

How blast radius is computed.

Blast radius computation starts with a dependency graph — a directed graph where each node is a file and each edge represents an import or reference. Building this graph requires parsing every file in the codebase to extract imports, function calls, and cross-file references.

Once the graph exists, computing blast radius is a graph traversal problem. Starting from a target file, you perform a breadth-first search (BFS) outward along reverse edges (edges pointing from dependents to the target). Each file reached during traversal is part of the blast radius.

The traversal depth matters. A depth of 1 gives you only direct dependents. A depth of 3 captures files that are three hops away — transitive dependents that may not obviously relate to the changed file but will still be affected. Most useful analysis uses a depth of 3 to 5.

The result is a concrete list: every file in the forward blast radius, every file in the backward dependency chain, and the total count at each depth level.

Why blast radius matters.

Without blast radius data, every change is a guess about what else might break.

Refactoring

Before renaming a function or changing a module's API, you need to know every file that depends on it. Blast radius gives you the complete list — not just direct importers, but transitive dependents two or three layers deep.

Pull Request Reviews

A PR that touches a file with a blast radius of 3 is a different conversation than a PR that touches a file with a blast radius of 47. Knowing the number changes how carefully you review.

Incident Response

When a file introduces a bug, the blast radius tells you exactly which parts of the system are potentially affected. Instead of searching the entire codebase, you triage the known dependents.

Architecture Decisions

Files with large blast radii are structural chokepoints. They indicate tight coupling. Tracking blast radius over time tells you whether your architecture is getting more modular or more entangled.

Automated blast radius with Axiom Refract.

Axiom Refract builds a full dependency graph from your codebase using Tree-sitter AST parsing across 145+ languages. Every import, every function call, every cross-file reference is captured and mapped.

From that graph, blast radius is computed automatically for every file. You can query any file and get its complete forward dependents and backward dependencies — with configurable traversal depth up to 5 levels.

The result is integrated into the architectural record: files with the largest blast radii are flagged as structural risks, and changes to high-blast-radius files are surfaced during analysis so your team knows where the real risk lives.

See the blast radius of every file in your codebase.

Upload your repository. Get a complete dependency graph with blast radius computed for every file — forward dependents, backward dependencies, and structural risk flags.