Glossary · Architecture and agents

What is codebase intelligence?

Codebase intelligence is a model of a software repository that is built once, kept current as the code changes, and queried by people and coding agents instead of re-reading the code. It combines a code graph, git history, documentation, design decisions and health scores to answer questions plain text search cannot, like what breaks if this changes.

Last reviewed: November 2026

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:

LayerHoldsAnswers
Code graphFiles, symbols, imports, callsWhat calls this?
Git historyChurn, authors, bug fixes, co-changeWho knows this, what breaks?
DocsA page per module and fileWhat does this do?
DecisionsDesign choices tied to codeWhy is it built this way?
HealthScores, findings, change riskWhat 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.

FREQUENTLY ASKED

Codebase intelligence: questions

How is codebase intelligence different from code search?

Search finds text and symbols written in the files. Codebase intelligence also answers questions whose answers are not in the files: who knows this module, what changes with it, and why it was built this way.

Does codebase intelligence need an LLM?

Mostly no. Parsing, the dependency graph, git signals, health scoring and dead code detection are deterministic. A model is only needed to write prose such as wiki pages.

Who uses codebase intelligence?

Engineers onboarding to or maintaining a large codebase, reviewers judging a change, and coding agents that need context before editing.

See it on your own repository.

Index a repository free and read the result for your own code and history. Rolling it out to a team? We will walk you through it.