How I Added a Blast Radius Map to My AI Agent—It Caught a Bug Before CI Did A developer added a blast radius map to an AI coding agent's planning phase, computing a reverse dependency graph from the codebase's AST and import graph and enriching it with test coverage, runtime call frequency and known flaky areas so the agent can reason about downstream impact before editing. The developer reports the map caught a bug that CI would have missed, since a change to a utility function could break a service several layers up without any test covering that path. Originally published on tamiz.pro https://tamiz.pro/insights/blast-radius-map-ai-agent-caught-bug-before-ci . When an AI agent autonomously modifies code, the risk isn't the change itself—it's the ripple effects you didn't anticipate. I recently added a blast radius map to my AI agent's planning phase, and it caught a bug that CI would have missed until it was too late. Here's what I built, why it works, and how you can do the same. Most AI coding agents operate in a reactive loop: they read a prompt, edit files, run tests, and iterate. They're great at local correctness but terrible at global impact. A change to a utility function might break a service that imports it three layers up, and unless a test happens to cover that path, CI will pass with a green checkmark. Then production breaks. I've seen this happen enough times to realize that the missing piece is a blast radius map —a structured representation of how a change propagates through the codebase. By computing this before the agent edits anything, the agent can reason about what might break and even verify it proactively. A blast radius map is a graph where nodes are code entities functions, classes, modules, services and edges represent dependencies. For a given change set, the blast radius is the set of all nodes reachable from the modified nodes via these edges. It's essentially a dependency graph traversal. In my implementation, I built it on top of the existing AST and import graph that my agent already parses. The map isn't just a static graph—it's enriched with metadata: test coverage per node, runtime call frequency, and known flaky areas. This turns a raw graph into a risk surface. The first step is to build a dependency graph. For JavaScript/TypeScript, I use a custom AST walker that records imports and exports. For simplicity, here's a minimal version using the TypeScript compiler API: import as ts from 'typescript'; import as fs from 'fs'; import as path from 'path'; function buildDependencyGraph entryFile: string : Map