> For the complete documentation index, see [llms.txt](https://docs.visdom.virtuslab.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.visdom.virtuslab.com/visdom-code-review/the-review-model.md). Agents can also search and read this documentation through its [MCP server](https://docs.visdom.virtuslab.com/~gitbook/mcp).

# The review model

Every change passes through layers of increasing depth. The point is economic: a dependency bump and a change to a payment path should not cost the same to review, and a reviewer's attention is the scarce resource being spent.

## Layers

**Triage.** Risk scoring and routing, from signals that need no model at all: which paths the change touches, how large the diff is, what happened to coverage, how stable the module has been, and whether the change is marked as AI-generated.

**Static.** Deterministic checks: linters, static analysis, pattern rules. Zero model cost, immune to prompt injection, and the hard minimum a change has to clear regardless of what any model thinks.

**Semantic.** A model reviews the change with the repository's context loaded: ownership, dependencies, history, conventions.

**Deep.** Multi-pass analysis reserved for changes that earned it, looking at whole files and at the files related to them through the dependency graph, with the organisation's own standards injected.

## Risk decides the depth

Each change gets a risk level, and the thresholds live in a versioned configuration file in the repository, reviewed and changed like any other code.

| Risk     | Typical content                                | What happens                            |
| -------- | ---------------------------------------------- | --------------------------------------- |
| Low      | Configuration, documentation, dependency bumps | Light scan, or straight through         |
| Medium   | Business logic                                 | Standard review with repository context |
| High     | Security-sensitive or cross-service changes    | Multi-pass analysis                     |
| Critical | Authentication, payments, data migrations      | Full depth, and a human gate            |

Only medium and above pays for deep analysis. That single rule is what keeps the process affordable at the volume agents produce.

## Context is supplied, not rediscovered

A review is only as good as what the reviewer knows. Each review is fed pre-indexed knowledge about the codebase rather than left to infer it: module ownership, the dependency graph, commit history and change heatmaps, test reliability data, and the organisation's own standards documents. That is the Context Fabric's job, and it is the difference between "this looks unconventional" and "this contradicts the convention your team wrote down in 2023".

## Policy as code

Deterministic rules and model-driven checklists share one schema, in one versioned file. A rule can be disabled by identifier, settings merge from organisation-wide defaults into per-repository overrides, and every change to the policy goes through the same review as the code it governs. There is no console where a rule can be switched off without leaving a trace.
