Detailed Analysis
A developer has released Repowise, an open-source tool that builds a persistent, multi-layered index of a codebase for Claude Code to query via the Model Context Protocol (MCP), rather than forcing the AI agent to rediscover the same repository structure through repeated grepping and file-opening on every session. The core insight driving the project is that Claude Code, like most coding agents, wastes significant time and tokens re-exploring code it has effectively already "seen" in prior sessions—opening a dozen files to use only two, then repeating that process from scratch later. Repowise addresses this by maintaining five distinct but interconnected layers over a single index: a Tree-sitter-based symbol and dependency graph (for callers, callees, and blast-radius analysis before edits); a git-history layer capturing churn, ownership, hotspots, and bus factor across even multiple repos; an auto-generated, incrementally updated wiki documenting files and modules; a "decisions" layer that reconstructs the reasoning behind code changes by mining commits, PRs, ADRs, and even prior Claude Code transcripts; and a deterministic code-health scoring system using 25 markers (complexity, duplication, untested hotspots, co-change scatter) that explicitly avoids LLM involvement in scoring to keep results reproducible and auditable.
This layered approach matters because most existing code-intelligence tools for AI agents stop at a dependency graph, which the author argues is insufficient for capturing the full context an agent needs to make safe, informed changes. Knowing that a function is called by twelve other functions is useful, but knowing *why* the code was written that way, whether it's a maintenance hotspot, and what its historical defect risk looks like is a different and arguably more valuable kind of context—especially the "decisions" layer, which explicitly targets a gap that Claude Code's plan mode cannot fill on its own, since the reasoning behind past choices often lives in commit messages, PR discussions, and prior chat transcripts rather than in the code itself. The health-scoring system's claimed validation—a 0.74 ROC AUC against known defects across 21 repositories, and 2.3x more defects surfaced than CodeScene under equivalent review budgets—positions Repowise as making an evidence-based, not just heuristic, claim about its usefulness, though these figures come from the tool's own benchmarking rather than independent verification.
The efficiency claims are notable in the context of how expensive and slow agentic coding workflows can become when an LLM has to repeatedly re-explore a codebase from raw files. In benchmarking against SWE-QA-style questions on a Flask codebase, using the same model with and without the Repowise MCP server attached, the author reports 36% lower cost, 49% fewer tool calls, and 89% fewer file reads per query—substantial reductions that, if they generalize, could meaningfully improve both the latency and dollar cost of using Claude Code on large, unfamiliar, or frequently revisited repositories. This kind of retrieval-layer optimization reflects a broader trend in the AI coding-agent ecosystem: as base models like Claude become more capable at reasoning and code generation, the bottleneck increasingly shifts to how efficiently those models can be fed relevant context, rather than how well they can reason once given it.
More broadly, Repowise is emblematic of a growing category of third-party infrastructure being built specifically around Claude Code's MCP extensibility—tools that treat the coding agent as a client to be served by specialized, persistent knowledge stores rather than a monolithic system expected to rebuild context from scratch each time. The choice to keep code-health scoring deterministic and LLM-free, and to make the tool functional even without an LLM API key (with an optional upgrade path for the wiki generation), reflects an emerging design philosophy in the space: pairing generative AI capabilities with deterministic, auditable analysis pipelines to reduce hallucination risk in code-quality judgments while still letting the LLM handle the parts—writing, refactoring, explaining—where it adds the most value. Released under AGPL-3.0 and installable via pip, Repowise also fits the pattern of grassroots, open-source tooling rapidly filling gaps left by Anthropic's core product, suggesting that a meaningful portion of Claude Code's real-world effectiveness on large codebases will depend on this surrounding ecosystem of memory, indexing, and retrieval tools built by the developer community.
Read original article →