Blast Radius for Agent-Assisted Development on Kubernetes A developer introduced rgctl, a reachability graph control tool that indexes entire codebases to provide compact, deterministic blast-radius queries for AI coding agents. The tool precomputes reverse reachability on a condensed call graph, enabling O(1) lookups that help agents assess the impact of changes without loading the whole repository into their context window. Tested on the Kubernetes codebase, rgctl addresses the problem of agents missing transitive dependencies or burning context on irrelevant files. Reachability Graph Control rgctl - AI coding agents default to reading files sequentially. That burns context, misses structure, and produces confident wrong answers about impact and dependencies. rgctl indexes the whole repository once into a rich graph with pre-computed reachability, then serves compact, deterministic query results — so agents and humans get the right slice of the codebase without loading it into the prompt. If you refactor RESTClientFor in Kubernetes by hand, you probably do not open a call-graph tool first. not that I am suggesting you should.. but lets take it as a good example when it comes to impact on the codebase, its dependencies etc. Usually you have an IDE find-references, a mental map of client-go , teammates who have been burned before, and CI that will catch what you missed. For most edits, that workflow is fine. The landscape changes when you decide to hand the same task to a coding agent. The agent has a context window, grep, and no tenure on the team and importantly the LLM has its own limits, depending on which one you use. On a tree with 181,000 functions , asking it to "refactor newPodWorkers safely" often produces one of three outcomes: it reads the wrong files, stops at direct callers and misses transitive impact, or burns most of the turn budget exploring pkg/kubelet/ without ever reaching cmd/kubelet/main . This post is for brave souls who work or plan to work with agents on large codebases. It explains why rgctl https://github.com/sshaaf/rgctl blast radius belongs in that workflow, what you should expect from the output, and where your existing tools are still the right choice. The examples use the upstream kubernetes/kubernetes https://github.com/kubernetes/kubernetes repository — cloned locally and indexed with rgctl, not a trimmed or synthetic corpus. Blast radius answers one question: if I change this function, what upstream code could be affected? It walks the call graph CALLS | Output | Meaning | |---|---| Direct callers | Functions that call the target directly | Impact zone | Full transitive closure of upstream callers | Score 0–100 | A capped impact rating derived from both counts | The score is not PageRank even though rgctl can also calculate it and its not guestaming it either. rgctl combines two components: | Component | Formula | Cap | |---|---|---| | Direct callers | direct count × 25 | 40 points | | Transitive impact | impact count × 0.05 | 60 points | score = min direct component + transitive component, 100 A symbol with no upstream callers in the static graph scores 0 . A shared helper with dozens of direct callers and a large impact zone lands in the 40–50 range; scores above 50 flag architectural hotspots where both fan-in dimensions are high. Lets take a look at how this is made possible, or as my agent friends always say "lets delve into it.." Agents work in multi-turn sessions. A live breadth-first search over 1.7M edges on every "who calls X?" would make that unusable. rgctl does the expensive work once, at discover time, and serves lookups from pre-built snapshots. Step 1 — Build the call graph: discover parses source, extracts function nodes and CALLS edges, and writes graph.snapshot.bin plus a dedicated blast engine.snapshot.bin . Step 2 — Collapse cycles: Mutual recursion is common in real codebases 7,097 circular call dependencies in Kubernetes . rgctl runs Kosaraju's algorithm on the CALLS subgraph and condenses each strongly connected component SCC into a single node, producing a directed acyclic graph DAG . Cycles no longer break reachability analysis. Step 3 — Precompute reverse reachability. On the condensed DAG, rgctl propagates reachability in reverse topological order, storing the result as dense bitsets — one per SCC. A query becomes a bitset read: O 1 lookup on the condensed graph, not a per-request graph walk. Step 4 — Serve through tiers: At query time, rgctl tries the fastest path first: macro call index.db --with-slices or --policy-file On Kubernetes that means a ~13 s one-time index, then ~1 s per symbol query — no daemon, no remote service. Re-run discover after large merges so the graph stays current. The full breakdown is in the design doc https://shaaf.dev/rgctl/docs/design/blast-radius-design . A typical agent turn looks like this: You: "Change how newPodWorkers handles static pods — keep behavior, improve readability." Agent: reads pod workers.go greps "newPodWorkers" edits file maybe runs tests Before any line changes, the agent has to answer a structural question: who depends on this symbol, transitively? The usual approaches all fall short at | What the agent tries | What it gets | What it misses | |---|---|---| | Read one file | Local implementation | Callers in other packages | grep newPodWorkers | Text matches | Upstream paths two or three hops away | | Rely on training data | Plausible Kubernetes architecture | This checkout's actual call graph | | Read 20 caller files | More context, fewer tokens left for the edit | No guaranteed closure; easy to stop early | How many times we have seen an agent confidently edit a helper and skip the integration test package that actually exercises it. Blast radius closes that gap with a single subprocess point rgctl -r at your local clone of kubernetes/kubernetes https://github.com/kubernetes/kubernetes : rgctl -r /path/to/kubernetes -f json blast-radius