# Welcome to repowise

repowise indexes your repository into five intelligence layers and serves them to your AI coding agent through MCP tools, so it reads answers, not code.

Every question your agent asks about your repo has an answer that could have
been computed ahead of time. *Who calls this function? What breaks if I change
it? Why is it written this way? Which of these files is actually dangerous?*
Instead, agents rediscover it from scratch on every task: grep, read, re-read,
forget.

Repowise computes those answers once and keeps them current on every commit.
Your agent reads the answer instead of the codebase, through
[task-shaped MCP tools](https://docs.repowise.dev/mcp/overview), and the same index gives your
team a defect-validated health score, change-risk scoring on every PR, and a
local dashboard for all of it. One `pip install`, no cloud, and the first index
needs no API key.

## Set up with your agent

Paste this into Claude Code, Codex, Cursor, or any coding agent. It installs
Repowise, indexes the repo, connects the MCP tools, and asks you one
question: whether an LLM should write the documentation.

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

## Start here

- [Quickstart](https://docs.repowise.dev/getting-started/quickstart): Install repowise, index your first repo, and connect Claude Code in about a minute.
- [How agent setup works](https://docs.repowise.dev/getting-started/for-agents): What the one-line setup prompt does, the question your agent asks, and per-host reference.
- [The MCP tools](https://docs.repowise.dev/mcp/overview): What each tool answers and when your agent should reach for it.
- [What is repowise](https://docs.repowise.dev/getting-started/what-is-repowise): The five layers, who it is for, and how it differs from plain LLM coding.

## What one index builds

Five layers, built in a single pass and kept in sync on every commit. Each is
queryable from the CLI, the MCP tools, and the local dashboard.

| Layer | What it gives you |
|---|---|
| [**Graph**](https://docs.repowise.dev/intelligence/dependency-graph) | Dependency graph across 27 parsed languages (41 on the support ladder), file and symbol nodes, call resolution stamped with one of 39 confidence-scored origins, Leiden communities, PageRank, and execution-flow tracing. |
| [**Git**](https://docs.repowise.dev/intelligence/git-history) | Hotspots from decayed churn, ownership percentages, co-change pairs that reveal coupling no import graph shows, bus factor, and which files actually get bug-fixed. |
| [**Docs**](https://docs.repowise.dev/intelligence/auto-wiki) | A wiki page per module and notable file, rebuilt incrementally on every commit, with freshness and confidence scoring. Rendered from your code's structure with no API key, or upgraded to model-written prose page by page. |
| [**Decisions**](https://docs.repowise.dev/intelligence/decisions) | Architectural decisions mined from git, captured by hand, or extracted from inline markers, each traced to a verbatim source span and linked to the files it governs. |
| [**Code health**](https://docs.repowise.dev/intelligence/code-health) | A 1 to 10 score per file from 53 deterministic detectors across defect risk, maintainability, and performance, with a concrete refactoring plan attached. Zero LLM calls, under 30 seconds. |

The whole wiki is generated with **no LLM**, then upgraded on demand.
`repowise init --no-prose` builds every layer above and renders each wiki page
from your code's structure, with no API key and no spend. Convert any part of
it to model-written prose whenever you want, one page or a ranked slice at a
time, with the cost shown before you confirm.

## Every change, with its evidence

Repowise reads each merged pull request, merge request or commit back
from git as a **Change Record**: the commits it brought in, the
components and owners it touched, the tests that reach it, the
contracts and decisions it crosses, its provenance, and what happened
after it landed. No forge API is called, and every item says whether it
is measured, inferred, declared or unknown.

```bash
repowise changes show pr-412                         # one change and its evidence checklist
repowise check main..HEAD --sarif-file policy.sarif  # run .repowise/policies.yaml in CI
repowise report changes --format html --out q3.html  # change evidence for a period
```

How it works: [Change Records](https://docs.repowise.dev/intelligence/change-records).

## For teams evaluating Repowise

- [Enterprise](https://docs.repowise.dev/enterprise): Deployment options, what leaves your network, review mappings, scale and the commercial licence.
- [Change evidence and reports](https://docs.repowise.dev/enterprise#evidence-for-every-change): Change Records, change policy with SARIF and JUnit, and evidence packs for auditors and acquirers.
- [Evaluate in an afternoon](https://docs.repowise.dev/enterprise#evaluate-it-in-an-afternoon): Six steps on one repository you know, offline, with no API key.
- [Security and data handling](https://docs.repowise.dev/security): What is processed, what is persisted, scoped tokens, and the questions a security review asks.
- [Foresight](https://docs.repowise.dev/hosted/foresight): Where a fix goes and what a change forgot, with no LLM. Waitlist open.

## What the measurements say

Three numbers worth knowing before you spend an afternoon on this, each with
its sample and its test. The one thing we will not do is quote a figure without
the caveat attached.

- **0.876 file coverage** at finding the code a question is about, against the
  next tool's 0.610. Measured on a 42-instance split sealed before any of the
  work started, graded deterministically with no LLM judge (*p = 0.00004*).
- **31.6% fewer output tokens** written by the agent itself, across 43
  questions on `django/django` under Codex, reached in 3.8 tool calls where a
  bare agent needed 7.2 (*p < 0.0001*). CodeGraph is a genuine second here at
  24.4%: we lead a field in which more than one tool works.
- **393 tokens to load a commit's context** through `get_context`, against
  13,984 for reading every changed file, counted with deterministic `tiktoken`
  over 30 commits. That is 35.6x pooled, and it is the easy number: it measures
  one payload, not a session.

Defect risk is validated separately at **ROC AUC 0.737** across 21 repositories
and 9 languages, scored at a historical commit with nothing after it feeding
the score.

We also publish the row we lose. Repowise is the **slowest indexer in the
field**, 22x CodeGraph on `django/django`, because the same pass that builds a
call graph also builds four more layers. It is a one-time cost, and updates
after the first index are incremental.

Method, raw cells, pre-registrations, and the runs we invalidated:
[repowise.dev/benchmarks](https://repowise.dev/benchmarks).

## Hosted or self-hosted

Same engine, same tools, same MCP protocol. The choice is who runs the
indexer.

```bash
# Self-hosted: runs entirely on your machine, your code never leaves it
pip install repowise
cd your-project
repowise init
```

Hosted adds managed indexing, push-sync for GitHub and GitLab.com, private repos,
AI docs and chat, and the team surfaces. Sign in at
[repowise.dev](https://repowise.dev) and index a repo; there is nothing to
install.

- [Hosted vs self-hosted](https://docs.repowise.dev/hosted/vs-self-hosted): What each one runs, what it costs, and which fits your team.
- [Security suite](https://docs.repowise.dev/hosted/security): CVE scanning with reachability triage, secrets across full git history, SBOM and VEX, nightly refresh, audit trail.
- [Agent plugins](https://docs.repowise.dev/getting-started/plugins): The Claude Code and Codex plugins: MCP server, hooks, six skills, and 18 slash commands in one install.
- [VS Code extension](https://docs.repowise.dev/getting-started/vscode): Health signals, refactoring CodeLens, and branch risk in the editor, plus one-install MCP for your agent.
- [CLI reference](https://docs.repowise.dev/cli/overview): Every repowise command grouped by purpose, verified against source.

## Where to find help

- **Discord**: [discord.gg/cQVpuDB6rh](https://discord.gg/cQVpuDB6rh)
- **GitHub**: [github.com/repowise-dev/repowise](https://github.com/repowise-dev/repowise)
- **Email**: [hello@repowise.dev](mailto:hello@repowise.dev)
- **Stuck on install?** Run `repowise doctor`, or read
  [Troubleshooting](https://docs.repowise.dev/installation/troubleshooting).
