> 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).

# 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.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.visdom.virtuslab.com/visdom-code-review/the-review-model.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
