Also called Repository intelligence, Code intelligence
In depth What is codebase intelligence?: the five layers, how it differs from code search, and a tool map.
How codebase intelligence is built
It is built from two raw inputs, the source files and the git history, into five layers:
| Layer | Holds | Answers |
|---|---|---|
| Code graph | Files, symbols, imports, calls | What calls this? |
| Git history | Churn, authors, bug fixes, co-change | Who knows this, what breaks? |
| Docs | A page per module and file | What does this do? |
| Decisions | Design choices tied to code | Why is it built this way? |
| Health | Scores, findings, change risk | What do we fix first? |
The model is stored, updated when commits land, and delivered to people in a browser or pull request and to agents over an MCP server.
Why codebase intelligence matters
Understanding a codebase otherwise means reading it, and every new engineer and every agent session repeats that work. A stored model turns recurring questions into lookups. It also holds facts that no file contains, such as co-change patterns and the reasoning behind a design.
How to build a version yourself
Combine a code search tool (GitHub code search, Sourcegraph), a git analysis tool (git-fame, CodeScene), a static analyser (SonarQube) and documentation by hand. Each is strong in its layer, and for a single concern a specialist is often the right choice. The cost is stitching the answers together yourself.
How repowise provides it
repowise indexes all five layers into one local store with repowise init (no API key needed for the structural layers) and keeps it current with repowise update. Graph, git signals, health and dead code are deterministic and make zero LLM calls. Agents query it through the 10 repowise MCP tools; people use repowise serve for the dashboard. See AI context, the architecture overview, and the full guide.