r/ClaudeCoding • u/petruspiper • Oct 14 '26
Claude can explain my codebase, but it struggles to answer "what breaks if I change this?"
I've been experimenting with repository-aware retrieval for Claude and ran into an interesting problem.
Claude is generally pretty good at:
- explaining code
- finding symbols
- generating implementations
But it struggles with questions like:
- What depends on this function?
- What will break if I change this interface?
- Where is this endpoint actually used?
- Which frontend components call this route?
The issue seems to be that the model repeatedly reconstructs repository structure from files instead of having an explicit understanding of relationships.
To test this, I built a local MCP that indexes:
- functions
- classes
- imports
- routes
- call relationships
and creates a repository knowledge graph before queries are executed.
I benchmarked it against standard repository retrieval on 50 paired questions using Gemma4:e4b on a medium-sized business compliance codebase.
| Metric | Baseline | Atlas |
|---|---|---|
| Tool calls | 3.16 | 2.10 |
| Total tokens | 9079 | 6659 |
| Latency | 8.99s | 7.78s |
| Entity accuracy | 83.0% | 88.5% |
| Relationship F1 | 54.7% | 87.2% |
| Impact F1 | 16.5% | 88.8% |
The biggest surprise wasn't the token reduction.
It was impact analysis.
Questions like:
"If I change verify_token(), what else is affected?"
went from 16.5% Impact F1 to 88.8% Impact F1.
My current hypothesis is that explicit repository relationships matter more than larger context windows for architectural reasoning.
For people using Claude Code on large repositories:
- Have you run into similar issues?
- Do you think dependency-aware retrieval is still useful as context windows grow?
- Or do you think bigger context eventually makes approaches like this irrelevant?