Skip to main content
Shakti
· 9 min read

Blast Radius: the Metric Your PR Review Is Missing

A tree-sitter-backed code graph answers 'what else does this touch?' in under 200ms for a million-line repo. Here's why that changes the review loop.

Every senior engineer learns the same lesson: the bug you didn’t cause costs more than the bug you did. A perfectly-sensible refactor lands on main, a third team’s deploy breaks the next morning, and you spend a week reconstructing the causal chain from logs.

Blast radius is the metric that prevents that week. It’s the count and nature of everything downstream that would be affected by a proposed change. Pre-Shakti, blast radius lives in senior engineers’ heads; it’s the reason a staff SWE is paid more than a junior one. Axon — Shakti’s code graph — makes it a query.

Why tree-sitter

Axon is built on tree-sitter parsers. Not regex. Not a language-server sidecar. Not a proprietary AST format. Tree-sitter gives us two properties that matter for governance:

  1. Incremental re-parse on edit. A two-line diff reindexes two nodes, not ten thousand. That means the planner is never asking a stale graph.
  2. Predictable typed edges. CallSite, TypeReference, FieldAccess, TypeParameter — the edges are typed, so “blast radius” isn’t a text-grep; it’s a transitive closure over a typed graph.

A million-line workspace indexes in under three seconds on commodity hardware. A blast-radius query against a 10K-node graph returns in under 200 milliseconds.

The PR-review loop

Most PR review tools show you a diff. Axon shows you the diff plus every file that transitively imports a symbol in the diff, ranked by how many paths lead to each. The governance layer annotates the ranking with “this file touches regulated data” or “this file is inside the payment boundary” so a reviewer can triage before reading.

A Shakti-governed PR opens with an auto-generated impact comment: “This change touches 47 symbols across 12 files. Three of them are in the payments module and the pci.encrypted taint tag propagates through two of them. Suggested reviewers: payments-core, compliance.” The reviewer spends their attention on the parts of the diff the graph says are load-bearing.

What the graph enables

Blast radius is the foundation. With a typed code graph in hand, Shakti can answer:

  • Which call sites would break if I renamed this function?
  • Which production-facing endpoints depend on this schema migration?
  • Which tests cover the specific flow this change modifies?
  • Which taint tag would propagate through this new data flow?

Each of those questions used to need a senior engineer. With Axon, it’s a query. The senior engineer is freed up to decide whether the change is right, not to reconstruct what it touches.

Keep Shakti current.

Monthly release digest + early access to Axon + integration betas.

---