
CODEBASE INTELLIGENCE FOR THE AI ERA · OPEN SOURCE · SELF-HOSTABLE
AI velocity that compounds
instead of collapsing.
AI gains collapse for three reasons: agents guess at context, humans re-review everything, and teams forget why the code is the way it is. Repowise fixes all three — a verified index of your codebase’s structure, history, and risk, served to agents over MCP and to your team as a living wiki.
2,391 vs 64,039 on the same task. ~27x fewer. Answer quality at parity.
vs a leading commercial tool under the same review budget, same 2,770 files.
The only code-health score validated against real defects. Up to 0.90 per repo.
Measured on real repositories. Every number is reproducible on your own codebase. Read the case study
The gains don’t leak in one place.
They leak in three.
Roughly ~42% of new code is AI-written in 2026, and the first quarter with agents feels fast. Then the same three knowledge gaps quietly claw the speed back.
Agents guess.
Your agent greps, reads three files, and confidently changes a function 47 callers depend on. It didn't know — nothing told it. Every wrong guess is a review cycle, a revert, a redo.
Humans re-verify.
The AI writes the diff in seconds; your senior engineers spend the afternoon rebuilding enough context to judge it. Generation got fast. Confidence didn't. Review became the bottleneck.
Teams forget.
The retry logic is shaped that way because of an outage two years ago. The engineer who knew that left. Last week an agent “simplified” it. Nobody caught it until it mattered.
None of these are model problems. They’re knowledge problems. A bigger model won’t fix them — a better-known codebase will.
Context agents can act on
The first leak was agents guessing. Give them the indexed graph, decisions, and health up front and they stop reading three files and hoping.
9 tools your AI agent already knows how to call
9 MCP tools — context for any agent, 96% fewer tokens (2,391 vs 64,039).
get_overview()— Architecture summary, module map, entry points, tech stack.get_answer()— One-call RAG Q&A. Retrieves over the wiki, gates on confidence, returns a cited 2–5 sentence answer.get_context()— Docs, ownership, history, decisions, freshness for files, modules, or symbols. Pass multiple targets in one call.get_symbol()— Raw source bytes for one indexed symbol with exact line bounds — cheaper and safer than Read + offset math.search_codebase()— Semantic search over the full wiki using LanceDB or pgvector. Natural language queries.get_risk()— Hotspot score, dependents, co-change partners, risk summary. Also returns top 5 global hotspots.get_why()— Three modes: natural language search over decisions, path-based lookup, or health dashboard.get_dead_code()— Unreachable files, unused exports, zombie packages — sorted by confidence and cleanup impact.get_health()— Per-file health scores from 25 deterministic markers, the worst files, and ranked refactoring targets.
CLAUDE.md that writes itself
- Architecture overview from the real dependency graph
- Hotspot warnings with churn metrics and owners
- Key design decisions and architectural constraints
- Dead code summary with confidence scores
- Entry points, build commands, and tech stack
- Also generates cursor.md — same data, different format
Docs your team can trust
The second leak was humans re-verifying every AI diff. A verified wiki and a defect-validated health score let reviewers judge a change without rebuilding the context by hand.
Code health intelligence on every PR
The Repowise PR Bot is a GitHub App that posts one deterministic comment per pull request — hotspots, hidden coupling, declining health, dead code. Zero LLM calls. Green PRs stay silent. Free for public/OSS repos; private repos require the Pro plan.
- One comment per PR. Edited in place on re-pushes.
- Silence rule. Stays quiet unless health degrades, a hotspot is touched, a co-change partner is missing, or dead code shifts.
- Zero LLM cost. Pure tree-sitter, NetworkX, the 12-marker scorer.
- Free forever for OSS. Private repos unlock with the Pro plan.
⚠️ Health: 7.0 → 6.8 (-0.2)
graph.py3.3 → 2.2▼ -1.1
untested hotspot, brain method, nested complexity
untested hotspot = low test coverage on a file that also churns and is complex — the test gaps that actually matter.
🔥 Hotspot touched
graph.py — 21 commits/90d, 13 dependents
primary owner: Raghav (62%)
🔗 Hidden coupling
graph.py co-changes with orchestrator.py (8×)
— not in this PR.
AI writes half your code.
Can you trust it?
repowise attributes commits to the agents that wrote them, then shows which of that code is a low-health hotspot owned by a single person. From your git history alone. No IDE plugins, no developer surveillance. It is the one view no other tool puts on one screen.
Decisions nobody re-breaks
The third leak was teams forgetting why the code is shaped the way it is. Captured decisions stay attached to the files they govern, so an agent or a new hire can see the reason before changing it.
Most tools answer one question.
repowise answers five.
Graph structure, code health, git history, generated documentation, and architectural decisions — five layers that compound into genuine understanding.
Every dependency, ranked and traced
- Tree-sitter ASTs across 10+ languages → directed dependency graph
- PageRank and betweenness centrality surface critical symbols
- Edge types: imports, calls, inherits, implements, co-changes
- Scales to 30K+ nodes with automatic SQLite-backed graph
It knows which file breaks next — before it does
- State-of-the-art accuracy: ~73% accurate at calling which files are headed for a bug — and on the same code, the same real defects, it matches or beats the best commercial tools and published academic models.
- One 1–10 score from 25 deterministic signals: tangled complexity, hidden coupling, missing tests, runaway churn, fragile ownership. No LLM, no cloud — under 30 seconds on a 3,000-file repo.
- The weights are learned from a real defect corpus, not hand-tuned — so it out-predicts “what changed recently” and “what broke before” by 10+ points, and matches published academic defect models on benchmarks it never saw.
- Three co-equal views per file — defect risk, maintainability, and static performance risk (N+1 and IO-in-loop shapes) — never blended into one number.
- Ranks what to fix first by impact-for-effort and alerts the moment a file's health slips. A worklist, not an auto-refactor — repowise ranks and explains, it never rewrites your code.
proven on 21 real projects across 9 languages
History that writes the documentation
- Hotspot detection — top 25% churn + complexity files flagged
- Co-change partners: files that change together without imports
- Ownership from git blame — primary owner + top 3 contributors
- Significant commits filtered into generation prompts
Wiki pages that stay fresh
- 9-level hierarchical generation: symbols → files → modules → repo
- Confidence scoring with git-informed decay — stale pages auto-regenerate
- RAG context via LanceDB or pgvector — each page knows its imports
- Resumable, crash-safe, idempotent — checkpoint after every page
The why behind your architecture
- 4 capture sources: inline markers, git archaeology, README mining, CLI
- Staleness tracking — decisions age when governed files get commits
- get_why() searches decisions before you change anything
- Health dashboard: stale decisions, ungoverned hotspots, proposed reviews
Every claim here is something you can check.
Docs that prove they’re current
Each page is checked against the live tree and re-generated when the file changes, so a doc either matches the code or says it doesn’t.
The why, still attached
Unbounded retries amplified a downstream outage, so the cap keeps load bounded when a dependency is failing.
The reason a file is shaped the way it is stays next to the file, so an agent or a new hire sees it before changing it.
Same task, fewer wrong turns
Raw file exploration versus loading the same context through repowise, at answer quality on par with reading the files by hand.
Measured on real repositories and reproducible on your own.
One index, two ways in.
The full picture, side by side
- Auto-generated docs, git intelligence, decision records, and MCP tools — one package
- Open-source (AGPL-3.0) and fully self-hostable
- 17/17 features vs 4-6/17 for any single competitor
| Feature | repowise | Google Code Wiki | DeepWiki | CodeScene | Sourcegraph |
|---|---|---|---|---|---|
| Self-hostable OSS | ✓ | — | — | — | — |
| Architectural decision records | ✓ | — | — | — | — |
| MCP server for AI agents | ✓ | — | — | — | — |
| Doc freshness / confidence scoring | ✓ | — | — | — | — |
| AI code provenance (agent attribution) | ✓ | — | — | — | — |
Self-assessed against publicly documented features as of May 2026. Vendor capabilities change — please verify before committing to any tool.
One engine, three interfaces
Install once. Choose the interface that fits your workflow — or use all three. They share the same data, the same intelligence, the same stores.

CLI
For the solo developer

MCP Server
For AI-native workflows

Web UI
For the whole team
Questions, answered
What is repowise?
repowise is a codebase intelligence layer for the AI era. It indexes your repo once and serves both your AI coding agents (an architecture-aware wiki, dependency graph, decisions, and nine MCP tools) and the humans accountable for the code (a defect-validated code-health score, change risk, git intelligence, and agent provenance). It is open source and self-hostable.
What does "AI velocity that compounds instead of collapsing" mean?
Coding agents make teams fast at first, but those gains erode when agents guess at context, humans re-review every change, and the team forgets why the code is shaped the way it is. repowise indexes your repo once and serves that knowledge — architecture, decisions, health, and risk — to agents over MCP and to people as a verified wiki, so speed keeps building instead of decaying. Every answer is checked against the live tree or flagged as stale.
Is repowise free and open source?
Yes. The core engine is open source under AGPL-3.0 and runs 100% locally: pip install repowise, bring your own API key, or run fully offline with a local model. There are paid hosted tiers for teams that want zero-ops hosting, private-repo PR comments, and managed re-indexing.
Which AI agents and editors does it work with?
repowise exposes your codebase over the Model Context Protocol, so it works with Claude Code, Cursor, Cline, and Codex, plus any other MCP-compatible client. One index serves every agent.
How much does repowise reduce my agent's token usage?
On paired benchmarks on real repositories, loading context through repowise used 96% fewer tokens (2,391 vs 64,039, about 27 times fewer), with 89% fewer file reads and 70% fewer tool calls, at answer quality on par with raw file exploration.
Does my source code leave my machine?
No. repowise is self-hosted with zero telemetry. Source is processed transiently and never persisted, and you can bring your own LLM key or run fully offline via a local model. What is stored is the graph, non-reversible embeddings, generated wiki pages, and git metadata.
Does the code-health score actually predict bugs?
Yes, and it is validated. Across 21 repos and 9 languages the cross-project ROC AUC is 0.74 (up to 0.90 per repo), and ranking by repowise health surfaces 2.3x the defects of a leading commercial tool under the same review budget. Every heuristic is open source so you can reproduce it on your own repo.
Which languages are supported?
Fifteen languages across the headline tiers, with full pipeline depth for Python, TypeScript, JavaScript, Java, Kotlin, Go, Rust, C++, and C#, including framework-aware route-to-handler edges for the major web frameworks.
How does repowise stay up to date as I keep committing?
It updates incrementally. A post-commit hook, file watcher, or webhook re-indexes only what changed, typically a handful of wiki pages in seconds, and every MCP response carries a staleness envelope that warns when the index has diverged from HEAD.
What is the difference between repowise and CodeScene?
repowise is an open-source (AGPL-3.0) alternative to CodeScene. Both analyze git history for hotspots and code health, but repowise adds a defect-validated health score (ROC AUC 0.74 across 21 repos), an LLM-generated architecture wiki, nine MCP tools for AI agents, and dead code detection. repowise is self-hostable at no cost; CodeScene is closed-source and enterprise-priced.
How do I generate a CLAUDE.md file for my repository?
Run 'repowise init' in your project root. repowise indexes the repo's AST, dependency graph, git history, and architecture, then generates a CLAUDE.md file that gives Claude Code, Cursor, and other AI coding agents immediate orientation: tech stack, entry points, hotspot files, ownership, and key design decisions. The file updates incrementally on every commit.
What is git hotspot analysis?
Git hotspot analysis identifies files that are both frequently changed (high churn) and structurally complex. The intersection of churn and complexity marks the files most likely to contain defects and be expensive to modify. repowise computes hotspots from commit history and displays them with health scores, owner attribution, and blast-radius estimates.
Guides, comparisons, and deep dives
Case Study: We Build repowise With repowise
repowise runs on its own codebase every day. Measured on paired benchmarks: 96% fewer context tokens (2,391 vs 64,039), 89% fewer file reads, quality at parity.

CLAUDE.md & AGENTS.md: The Complete Guide
What CLAUDE.md and AGENTS.md are, what to put in them, best practices, and how to keep them fresh automatically. Learn to give coding agents real repo context.

Code Health: The Complete Guide (2026)
Code health is a defect-validated measure of how risky code is to change, scored from 25 deterministic markers across three pillars. Reproduce it on your repo.
The agents will keep getting faster.
Make it compound.
Three paths to codebase intelligence
- Self-host — free, forever
pip install repowise— your machine, your server, your CI- AGPL-3.0 · full feature set · code never leaves your infra
- Hosted SaaS — live now
- Managed indexing · team workspaces · semantic chat
- Pro at $15/mo with LLM credits included · Sign up free →
- Working as a team? One shared brain for the whole team, $20/seat/mo
- Enterprise
- On-prem · SSO · role-based access · dedicated support · SLAs