repowise-dev/repowise

Codebase intelligence for AI and humans: code health scores, auto-generated docs, git analytics, dead code detection, and architectural decisions via MCP.

ai
code-complexity
code-health
code-intelligence
code-quality
dead-code
developer-tools
documentation
git-analytics
mcp
open-source
python
refactoring
static-analysis
technical-debt

English | 简体中文

repowise: codebase intelligence for you and your coding agent

Stop paying your agent to re-read your codebase.

Repowise indexes your code, git history, tests and decisions once, on your machine.
Your coding agent asks the index instead of grepping and opening files, so it does about half the work.
You get the same answers in a dashboard: what calls this, what breaks, what to fix first, and why.

Set up in one line Open the live Repowise demo

Up to 99% fewer files opened
fewer on every model tested · up to 47% faster
Up to 51% less output
Sonnet 4.6 · 31.6% less, best of five context tools
88% of the right files
found in one call · next best tool: 61%
Know the code, know what breaks, fix what matters. The local dashboard maps a repository's architecture, shows every file that imports the one you are about to change, ranks what to fix first on a code health map, connects services across repositories, and answers questions with charts.

Graph, risk, health, tests and dead code make zero LLM calls · no API key to index · 29 languages · Claude Code, Codex, Cursor and any MCP host · free and open source

Explore Repowise's own code Repowise code health PyPI version License: AGPL 3.0

Quickstart · For your agent · What it does · Hosted · Benchmarks · Teams · Docs


Set it up in one line

Open Claude Code, Codex, Cursor or any MCP-capable agent in your repository and paste:

Read https://docs.repowise.dev/setup.md and set up Repowise in this repository.

The agent installs Repowise, indexes the repo with no API key, connects itself to the index, and asks you before anything costs money. To do it by hand:

uv tool install repowise          # needs Python 3.11+ and Git. Or: pipx install repowise
cd /path/to/your/repo
repowise init --yes --no-prose    # graph, git, health, dead code, docs. No key, no spend.
                                  # answers and docs: run repowise generate (one command, no re-index)
                                  # local semantic search: ollama pull embeddinggemma && repowise reindex --embedder ollama
repowise serve                    # local dashboard (needs Node 20+; first run downloads the UI)

serve opens the dashboard in your browser. After a first index it starts with a short guided tour, and Setup is where you connect agents, turn on sync and add coverage or a model.

Restart Claude Code or run /mcp, then ask "What breaks if I change src/auth.py?" or "Use Repowise get_overview to summarize this repository." init wires Claude Code for this repo and adds the global repowise MCP entry when there is none; it never moves one that serves another repo. Full setup for every agent →


Your agent stops guessing

Without an index, an agent rediscovers your codebase on every task: grep, open a file, open three more, grep again. Repowise answers those questions ahead of time, so the agent asks once and gets on with the work.

Across five models, an agent with Repowise opened up to 99% fewer files, wrote up to 51% less and answered up to 47% faster (Sonnet 4.6), with 71 of 72 answers right. Every model opened fewer files. Per model →

Side by side with four other context tools on django/django, Repowise saved the most: 3.8 tool calls instead of 7.2 and 31.6% less output, with answers just as good. How it was measured →

  • Your agent gets ten task-shaped MCP tools. Ask about several files at once and get callers, risk, tests, owners and the reasons behind the code in one answer. The tool list ↓
  • Up to 99% less command noise. repowise distill trims test, install and git output before the agent reads it and keeps every error line. Distill →
  • Context before the agent asks. Optional hooks warn it off fragile files and stale paths, and Repowise keeps your CLAUDE.md and AGENTS.md current from the index.
  • See your own savings. repowise saved and the dashboard's Usage and savings page count the tokens your agent no longer has to read.

What it does

One index of your code, its history and its decisions, used three ways: to understand the code, to change it safely, and to keep improving it.

Architecture map: every file grouped into communities, with a band for each strong link between them

See how it fits together

A call graph across 29 languages, an architecture map you can explore, C4 views, and a generated wiki for every module and file.
The graph · Docs
A file selected on the architecture map with every file that imports it highlighted, and an inspector with its rank and neighbours

Know what breaks

Every caller of what you changed, the files that usually change with it but are missing from your diff, and the tests that reach it.
Change risk · Tests
Code health map: every folder as a disc coloured by health, with the lowest-scoring files and what needs attention in a side rail

Fix what matters

A 1 to 10 health score for every file, validated against real bug history, a ranked fix-first queue, refactoring plans and dead code.
Code health · Refactoring
Workspace system map: services across three repositories with their health and the HTTP and data contracts between them

Follow it across repos

Services and the HTTP, gRPC and event contracts between them, with a guard for breaking changes and the consumer files they affect.
Workspaces
Chat answer listing the riskiest files in the repository and why each is risky

Ask it anything

Cited answers and charts from the dashboard, or the same answers through MCP for your agent.
Dashboard · MCP tools
Generated wiki page for the repository with a summary, system map and page outline

Remember why

Decisions mined from ADRs, comments, commits, PRs and agent sessions, each tied to the code it governs, plus docs checked against the code.
Decisions · Doc drift
Every question it answers ### Understand the code | You ask | Repowise gives you | |---|---| | *How does checkout work in this repo?* | A cited answer built from the call graph and the generated docs, in one call. [Search and answers](docs/layers/WIKI.md) | | *What calls this function, and what does it call?* | A call graph across 29 parsed languages, every edge stamped with how it was resolved and how far to trust it, plus traced execution flows from each entry point. [The graph](docs/layers/GRAPH.md) | | *Can I get docs for this codebase?* | A wiki for every module and file, rendered from the code's structure with no key, or written by a model when you choose. It updates incrementally after each commit. [Docs](docs/layers/WIKI.md) | | *Which of our docs are wrong?* | Markdown checked against the tree: every reference to a file or symbol the code no longer has, with the line to edit. [Doc drift](docs/layers/DOC_DRIFT.md) | | *Why is it built this way?* | Decisions mined from ADRs, `# WHY:` comments, commit and PR history and your agent sessions, each tied to the code it governs and flagged when it goes stale. [Decisions](docs/layers/DECISIONS.md) | | *Who knows this code?* | Owners, bus factor, fading ownership when the main author goes quiet, and suggested reviewers. [Ownership](docs/layers/OWNERSHIP.md) | | *Can I see the architecture?* | An explorable dependency map, C4 views, and a Structurizr export, no model involved. [Dashboard](docs/start/DASHBOARD.md) | ### Change it safely | You ask | Repowise gives you | |---|---| | *What breaks if I change this?* | Symbol-level blast radius: the callers of what you changed, the files that historically change with it but are missing from your diff, and the tests that reach it. [Change risk](docs/layers/CHANGE_RISK.md) | | *How risky is this PR?* | Where the change ranks against your repository's own recent commits, with the reasons, as a directive your agent can act on. [Change risk](docs/layers/CHANGE_RISK.md) | | *Which tests should run?* | The tests a diff actually exercises, from a coverage report if you have one and from the call graph if you do not. [Test intelligence](docs/layers/TEST_INTELLIGENCE.md) | | *Did this PR add untested lines?* | Patch coverage, branch coverage on changed lines and path-scoped gates in CI, on GitHub, GitLab or any runner. [CI gates](docs/start/CI.md) | | *Will this API change break another repo?* | HTTP, gRPC, topic and OpenAPI contracts matched across repositories, with a breaking-change guard and the consumer files it affects. [Workspaces](docs/scale/WORKSPACES.md) | | *Is anyone else editing these files?* | Other open branches touching the same files or their co-change partners, each with the reason it is listed. [Branch overlap](docs/layers/CHANGE_RISK.md#branch-overlap) | | *Did we just commit a secret?* | Keys, tokens and risky calls found in the working tree and in full git history, with a pre-commit check and a CI gate. [Security signals](docs/layers/SECURITY.md) | ### Improve it continuously | You ask | Repowise gives you | |---|---| | *What should we fix first?* | A ranked queue weighing impact against effort, using churn, fan-in, coverage and bug history. [Fix first](docs/layers/CODE_HEALTH.md#fix-first) | | *Where is the debt?* | A 1 to 10 score for every file from 59 deterministic detectors, split into defect risk, maintainability and performance, validated against real bug history. [Code health](docs/layers/CODE_HEALTH.md) | | *Why is this slow?* | N+1 queries, I/O in loops, blocking calls inside async code and quadratic loops, traced across function and file boundaries. [Performance](docs/layers/PERFORMANCE.md) | | *How do I break this up safely?* | Concrete refactoring plans of seven types: Extract Method, Extract Class, Extract Helper, Move Method, Split File, Break Cycle and Performance Fix, with the exact symbols that move and what moves with them. Ready to hand to an agent. [Refactoring](docs/layers/REFACTORING.md) | | *What can we delete?* | Unreachable files, unused exports and unused packages, each with a confidence tier and the evidence behind it. [Dead code](docs/layers/DEAD_CODE.md) | | *Where do bugs keep landing?* | Bug-fix commits traced to files and symbols, and a warning when your agent edits a bug magnet. [Bug history](docs/layers/BUG_HISTORY.md) | | *Are our tests testing anything?* | Tests with no assertions, tests that only check their own mocks, and untested hotspots. [Test-quality smells](docs/layers/CODE_HEALTH.md#findings) |
Things people do not expect it to do - **Test coverage without running coverage.** Most repositories never produce a coverage report. Repowise answers "is this tested, and by what" from the import and call graph, and labels every answer measured or inferred. - **It checks its own health score on your repository.** After each index it reports how many of the lowest-scoring files actually had bug fixes in your recent history, so a bad score on your codebase is visible to you. - **It learns from your agent sessions.** With transcript capture on, the corrections you keep repeating ("use the shared HTTP client") become tracked decisions it feeds back to the agent later. Transcripts never leave your machine. - **It writes your `CLAUDE.md` and `AGENTS.md`** from the real index and keeps them current, so even an agent with no MCP support starts informed. - **It shrinks command output before your agent reads it.** `repowise distill pytest` keeps every failure and drops the noise, and nothing is lost: an `expand` command restores any cut. - **New git worktrees start indexed.** A linked worktree seeds its index from the base checkout instead of starting cold. - **It knows which external systems you depend on.** Package manifests across PyPI, npm, Cargo, Go, NuGet, Maven and CMake feed a map of the services and libraries the code reaches.

Hosted

Everything above runs free on your own machine. repowise.dev runs it for you: indexed in the cloud and current on every push, private repos included, one MCP endpoint for Claude, ChatGPT and Cursor, Jira and Confluence, team workspaces, and the PR bot on every repository.

Hosted at repowise.dev: everything in this README with nothing to run, private repos included, one MCP endpoint for Claude, ChatGPT and Cursor, a shared dashboard, Jira and Confluence, and team workspaces. The PR bot at repowise.dev/bot: AI code review that knows your whole repo, with breaking callers, AI bug review and about 15 cents a reviewed PR, free checks on public repos.

Start free on hosted repowise.dev See the Repowise PR bot

Already indexed locally? repowise publish puts the repo on repowise.dev in one command. It indexes your GitHub remote, so nothing is uploaded from your machine. Public repos are free.


Know what breaks before you merge

All of this comes from the graph and git history, with no LLM, so the same diff always gets the same answer.

  • Change risk. Score any commit or branch 0 to 10 against your repository's own recent commits, with what it may break, the companion files it forgot, the tests it is missing and the tests to run. repowise risk main..HEAD (reference)
  • Tests without a coverage run. Which tests reach a file and which ones a diff exercises, from a coverage report when you have one and from the call graph when you do not: 97.5% correct on which tests to run. repowise impacted-tests main..HEAD (reference)
  • Bug magnets. Which files keep getting bug fixes, with a warning when your agent edits one. (reference)
  • Branch overlap. Other open branches editing the same files. repowise overlap (reference)
  • In CI. Patch coverage, doc drift, security and change risk as gates through the GitHub Action, a GitLab template or plain CLI, with SARIF output. No API key. Repowise in CI →

On every pull request. The Repowise PR bot is AI code review that knows your whole repo. It checks each PR against the index:

  • Breaking callers: every caller outside the PR that a changed function reaches.
  • Coverage on changed lines: the added lines no test runs, from your CI's report.
  • Security on added lines: secrets and risky calls, flagged on the line.
  • Health before and after: the touched files scored on both sides, and the dead code a change leaves.
  • Change risk and reviewers: risk against your repo's history, and who owns the code.
  • AI bug review: bugs found on the diff line, each with a prompt for your agent.

One comment, kept current. A clean PR gets a short "safe to merge", and the Repowise review check can gate the merge. Checks are free on public repos. AI review runs on Pro or Teams at about 15 cents a reviewed PR, with no seat fee.

The dark Repowise per-PR analysis page showing change risk, repository health, changed contracts, outside callers, newly added findings, and a blast-radius treemap of the repository

A real review on a real PR: repowise-dev/repowise#5127 · its analysis page → · see the PR bot → · install on GitHub →

Every change, with its evidence

Each merged PR or commit becomes a Change Record: what it touched, who owns it, the tests that reach it, the contracts and decisions it crosses, and what happened after it landed. No forge API is called.

You ask Repowise gives you
What landed in this PR, and what backs it up? The change's evidence checklist, each item ok, attention or unknown, with an in-toto export. Change Records
Can CI hold changes to our payment code to a higher bar? Rules in .repowise/policies.yaml, matched to components by name, tag or criticality and evaluated by repowise check, with SARIF or JUnit output. Change policy
Something broke. Which change do we read first? Recent changes ranked against an error, a stack trace or an issue. On 43 real regressions, the change a later revert or fix named was in the top 5 for 67% of them, against 28% for ranking by shared files. Suspects
Who owns this, and are they still working on it? Backstage-shaped components with owners from your catalog and CODEOWNERS, compared with the last 90 days of commits. Components
Can we show an auditor or an acquirer where we stand? Evidence packs: a repository assessment, a change report for a period and a component inventory, as JSON, Markdown, HTML or CSV. Reports

Know exactly what to fix

Every file gets a 1 to 10 score from 59 deterministic detectors, read three ways: defect risk, maintainability and performance. Performance findings such as N+1 queries and I/O in loops are traced across functions and files.

The score is checked against real bugs. On 21 open-source projects, ranking by Repowise found 2.3x as many later-buggy files as CodeScene in the same review budget. It also checks itself on your repository after every index: "16 of the 20 lowest-health files had a bug fix in the last 6 months, 3.3x the 24% baseline."

Then it names the fix, one of seven plan types: Extract Method, Extract Class, Extract Helper, Move Method, Split File, Break Cycle or Performance Fix, with the exact symbols that move, ranked so a fix on a central file comes before the same fix on a leaf. Each plan has a copy-to-agent button.

repowise next                          # what to fix first, ranked by impact and effort
repowise health --refactoring-targets  # concrete plans
repowise dead-code                     # what can go, by confidence tier

Code health · Refactoring · Dead code · How it was validated →


Across your repositories

Real systems are more than one repository, and the expensive failures live between them. Change a backend contract and Repowise names the frontend calls that consume it, the services downstream, and the architecture rule the new dependency breaks, before it ships.

Workspace intelligence What it answers
Contract map Which services provide and consume each HTTP, gRPC, event, socket and data contract? Links keep their exact or candidate confidence and the source evidence.
Cross-repo blast radius If this provider changes, which downstream services are in structural reach, and which may drift through historical co-change?
Breaking-change guard Was an endpoint removed or an OpenAPI, proto or signature shape changed incompatibly, and which consumer files are linked to that contract?
Test impact Which tests in the consumer repos should run for this provider change, measured from coverage or inferred from the call graph?
Architecture as code Does the live system graph violate declared dependency rules or contain cycles? repowise workspace check gates CI.
Architecture health How coupled is the estate? Propagation cost, the cyclic core, service roles and a deterministic 1-10 architecture score.
Federated context One dashboard and one MCP server answer across every repository while keeping repo-level evidence.

Workspace guide and support matrix → · Keeping the index fresh →


Measured against the field

The same repositories, commits and questions for every tool, each given its full advertised surface, against answer keys we did not write.

Output tokens an agent writes to reach an answer across 43 django questions on Codex: repowise 1,250, CodeGraph 1,383, Serena 1,550, Graphify 1,658, code-review-graph 1,710, bare agent 1,828 File coverage on 42 sealed ContextBench instances: repowise get_answer 0.876, repowise search_codebase 0.742, CodeGraph 0.610, Graphify 0.546, code-review-graph 0.445, cocoindex 0.361
Result
Fewer files on every model Up to 99% fewer files opened, up to 51% less output, up to 47% faster, 71 of 72 answers right (Sonnet 4.6); 48 of 48 right on Opus 5.5. Five models, 24 questions on code newer than the models
Less work than other context tools 31.6% less output, 3.8 tool calls instead of 7.2, 3.0 files opened instead of 7.2. The best of five context tools. n=43, p<0.0001
Finding the right files 88% of the files a fix needed, against 61% for the next tool, on a sealed set. n=42, p=0.00004
Health that predicts bugs 2.3x CodeScene's recall of later-buggy files at the same review budget. 2,770 files, p=0.003
Command output Up to 99.5% smaller (npm ci), 89% for git log, 86% for git diff, no error line lost
Call graph the compiler agrees with 93.8% to 99.8% precision on Go, TypeScript, Dart, C and Python, graded by each language's own toolchain. Against four other tools, none that finds as much of the graph gets more of it right, in 7 of 7 cells
Scale 15 million lines (dotnet/runtime) on one laptop. Building the call graph takes 75 MB, 10x less than the next tool

Every result, in plain English, with the method → · The research it is built on →

How it compares on capability No single product competes with all of this, so there is no single table. Rows marked *measured* are head-to-head numbers that link to **[docs/BENCHMARKS.md](docs/BENCHMARKS.md)**, with the sample sizes, the tests and every row. Unmarked rows are capability presence, not measurements. ### As an agent context layer | | repowise | CodeGraph | Serena | DeepWiki | |---|---|---|---|---| | Self-hostable, open source | ✅ AGPL-3.0 | ✅ | ✅ | ❌ cloud only | | Private repo, no cloud | ✅ | ✅ | ✅ | ❌ OSS forks only | | MCP tools served | 10 default + 7 opt-in | 1 | 29 | 3 | | **Finds the gold files** *([measured](docs/BENCHMARKS.md#1-finding-the-right-files), n=42 sealed)* | ✅ **0.876** | 0.610 | not in this run | not measured | | **Output tokens vs a bare agent** *([measured](docs/BENCHMARKS.md#2-what-changes-in-a-real-agent-loop), n=43)* | ✅ **-31.6%** | -24.4% | -14.8% | not measured | | **Memory to build the graph** *([measured](docs/BENCHMARKS.md#what-it-costs-to-run), 5 tools, 35 repos)* | ✅ **75 MB**, lowest on 35 of 35 | 757 MB | not measured | n/a, cloud | | **Time to build the graph** *([measured](docs/BENCHMARKS.md#what-it-costs-to-run), same run)* | **2.77s**, fastest on 14 of 35 | **3.65s**, fastest on 16 | not measured | n/a, cloud | | **Time to build the full index, django** *([measured](docs/BENCHMARKS.md#what-it-costs-to-run))* | ⚠️ **366.8s**, slowest here | ✅ **16.4s** | not measured | n/a, cloud | | **Call-edge precision, judged by a compiler** *([measured](docs/BENCHMARKS.md#8-the-same-question-against-an-answer-key-we-do-not-control), 5 tools, 7 cells)* | ✅ **nothing that finds as much gets more of it right**, 7 of 7 | lower precision in 7 | not measured | not measured | | Generated documentation | ✅ | ❌ | ❌ | ✅ | | Proactive agent hooks | ✅ Claude + Codex | ❌ | ❌ | ❌ | | Generated `CLAUDE.md` / `AGENTS.md` | ✅ | ❌ | ❌ | ❌ | | Command-output distillation | ✅ reversible | ❌ | ❌ | ❌ | | Architectural decision records | ✅ | ❌ | ❌ | ❌ | | Multi-repo workspace intelligence | ✅ contracts, co-change, federated MCP | ❌ | ❌ | ❌ | **The two cost rows answer different questions.** Building the call graph, we are the lightest tool measured, about ten times lighter than the next, and roughly as fast as the fastest. Building the *whole* index, CodeGraph is **22x faster than we are**, because by then we have also built the git-history layer, the wiki, the decisions and the health pass. With model-written prose on, it is **135x**. Competitors measured at CodeGraph 1.5.0, Graphify 0.9.31, Serena 1.6.2.dev0 and code-review-graph 2.3.7 in August 2026. Repowise compiler-graded figures are from main on 2026-10-03; the other Repowise rows are from `081a59fa`, August 2026. ### As a code health tool | | repowise | CodeScene | |---|---|---| | Self-hostable, open source | ✅ AGPL-3.0 | ⚠️ on-prem Docker, proprietary | | Code health score (1-10) | ✅ 59 detectors, 22 move the health score ([how they count](docs/layers/CODE_HEALTH.md)) | ✅ 25-30 | | Brain Method / LCOM4 / god class | ✅ | ✅ | | **Defects found at a 20% review budget** *([measured](docs/BENCHMARKS.md#5-code-health-predicts-defects), 2,770 files)* | ✅ **0.173** | 0.074 | | **Effort-aware ranking, Popt** *(measured, p=0.003)* | ✅ **0.607** | 0.462 | | **Precision at that budget** *(measured)* | 0.580 | ✅ **0.636**, a shorter list | | **Discrimination, ROC AUC** *(measured, paired)* | 0.731 | 0.705, *p=0.054, not significant* | | Git intelligence (hotspots, ownership, co-change) | ✅ | ✅ | | Pre-merge change-risk scoring | ✅ 0-10 + directives | ✅ | | Concrete cross-file refactoring plans | ✅ graph-aware + blast radius | ⚠️ within-function only | | Test-coverage intelligence | ✅ LCOV/Cobertura/Clover/JaCoCo/Go | ❌ | | Dead code detection | ✅ | ❌ | | Serves it to an AI agent over MCP | ✅ | ✅ | CodeScene is the only other vendor in this category with a published empirical defect study, which is why it is the one we ran head to head. It flags about 27 files where we flag 132. ### The PR bot, against LLM review bots | | Repowise PR bot | CodeRabbit | Greptile | |---|---|---|---| | Price | ✅ **about 15 cents a reviewed PR**, no seat fee | per developer seat | per developer seat, plus credits | | Symbol-level blast radius | ✅ call graph | ❌ | ⚠️ prose, from context | | Co-change partners missing from the PR | ✅ git history | ❌ | ❌ | | Change risk vs the repo's own history | ✅ 0-10 + percentile | ❌ | ❌ | | Quiet on a clean PR | ✅ one short "safe to merge" | ⚠️ configurable | ⚠️ configurable | Repowise reads a pull request the way the repo's longest-serving engineer would, with every caller, the history of the touched files and the decisions that govern them in hand. The checks behind that need no model and are free on public repos. Full side-by-side comparisons: **[repowise.dev/compare →](https://www.repowise.dev/compare)**

Supported languages

29 languages parsed to an AST, 43 on a five-rung ladder, framework-aware where an ecosystem handler exists. Every language ships in the open-source distribution.

Full   Python TypeScript JavaScript Svelte Vue Astro Java Kotlin Go Rust C++ C# Scala Ruby Apex (Salesforce)

Good   C Swift PHP Dart Object Pascal / Delphi COBOL GDScript / Godot VB.NET Elixir F# Objective-C Perl  · Partial   Luau Razor / Blazor

The full ladder, and what each rung gives you | Rung | Languages | What you get | |---|---|---| | **Full** (15) | Python · TypeScript · JavaScript · Svelte · Vue · Astro · Java · Kotlin · Go · Rust · C++ · C# · Scala · Ruby · Apex (Salesforce) | The whole pipeline: AST symbols, import resolution, a resolved call graph, heritage, docstrings, framework edges and code-health markers | | **Good** (12) | C · Swift · PHP · Dart · Object Pascal · COBOL · GDScript · VB.NET · Elixir · F# · Objective-C · Perl | All of the above except the full health suite, within the language-specific ceilings in the full matrix | | **Partial** (2) | Luau / Roblox · Razor / Blazor | Luau: AST symbols and `require()` resolution, Rojo and `.luaurc` aware. Razor: component symbols, `@code` and component-tag call edges, C# health markers; no import resolution yet | | **Lightweight** (6) | Clojure · Haskell · Lean 4 · Erlang · HTML · QML | A real file-to-file import graph, and no symbol-level claims | | **Structural** (8) | R · Zig · Julia · Elm · OCaml · Crystal · Nim · D | Git history: blame, hotspots, co-change, ownership, bug history | SQL and dbt projects get `ref()` / `source()` lineage, shell scripts get function-level symbols, HTML pages contribute their `