The ladder I use every time I have to make a targeted change in a codebase I don’t know well:
cos_graph_communities— one call, the subsystem map: which clusters exist and how they connect. Replaces an afternoon of directory spelunking.cos_graph_contexton the file I plan to touch — its neighbors, callers, and contracts at depth 1.cos_graph_impacton the function I want to change — the honest blast radius, several levels deep. This is the step that surfaces callers grep can’t connect: dynamic dispatch and indirection mean there’s no literal symbol match to find, but the graph resolved the reference at index time.- Make the change, run the targeted tests, done.
A typical session: three structural queries, a handful of files actually opened. The step-3 callers are the ones that would otherwise become production incidents.
The habit shift that matters: ask “who depends on this?” before “where is this?” — the second question is grep-shaped, the first one is graph-shaped, and the first one is what safe changes actually need.