Reviewing before you push

redline review checks your change against only the rules that apply to the files you touched, before anyone else sees it. It never blocks, and its findings are never counted.

Why bound the review

Anyone can ask an assistant to review a diff. Hand it the whole standard, though, and it spends most of its attention on rules for files you never touched: Terraform rules on a React change, React rules on a service. The findings get worse, not better.

review works out which stacks your changed files belong to and sends only those rules. It reads the profile from .redline.json; in a repository that is not onboarded, pass --profile <name>.

What gets reviewed

terminal
# the working tree against its merge base with the default branch
$ pnpm redline review
# only what is staged, before you commit
$ pnpm redline review --staged
# against a branch other than the default
$ pnpm redline review --base release/2.4

Who does the reviewing: engines

The CLI checks deterministic rules itself. For the judgement rules it needs a model, and the engine decides which one. It never picks a model for you: nothing leaves your machine unless you choose an engine that sends it.

Where you run itWhat happens
At a terminal, no --enginePrints the deterministic findings straight away, and says how to get the rest. Calls no model.
Inside an assistant or a pipe (--engine embedded, the default there)Prints the bounded prompt for the assistant that ran the command, which replies with the findings. /redline-review in your assistant does this for you.
--engine apiThe CLI calls a model endpoint itself, hosted or local, and prints the findings.
--print-promptWrites only the prompt to stdout, for any assistant you have, including a browser tab. Pipe it to pbcopy to copy it.

At a terminal, the default looks like this:

terminal
$ pnpm redline review --staged

profile javascript-typescript — rules in scope: core, typescript
warn  no stack covers 1 changed file(s), so only the core rules applied to them: run.sh
a.ts:2
  Redline/HIGH [core/untracked-todo]: this TODO carries no ticket reference, so nothing will bring anyone back to it. Add the ticket id on the same line, or do the work now.
…
4 finding(s)
that is every rule a checker can decide; the rest of the standard needs a model — run /redline-review in your assistant, or `redline review --engine api`
local review — not recorded, and not counted in rule-tuning telemetry

The embedded engine is the design, not a stub. The CLI is usually run by an assistant that already has a model and the context of your work. Calling a second model from inside that session pays twice for a worse answer.

The api engine, hosted or local

--engine api speaks either the OpenAI-compatible or the Anthropic API. It infers the provider from OPENAI_API_KEY or ANTHROPIC_API_KEY, and the model from REDLINE_REVIEW_MODEL, so you set them once.

The OpenAI-compatible API is also what Ollama, LM Studio and vLLM expose, so a fully local review costs nothing and needs no key. That matters where a diff may not be sent to a third party at all. For a local server, pass both --provider openai and --base-url:

terminal
$ pnpm redline review --engine api --provider openai --base-url http://localhost:11434/v1 --model qwen2.5-coder:14b
!

Without --base-url, an exported OPENAI_API_KEY sends the diff to OpenAI's hosted API. Without a key and without --provider, there is nothing to infer the provider from.

The model returns data, not comments

With --engine api the model returns JSON in a published schema: rule, severity, file, line, problem, fix. The CLI validates it and writes the Redline/<SEVERITY> [rule-id]: line itself.

A model that writes that line freely will sooner or later invent a severity or a rule id, and every count keyed on that line becomes wrong. So a finding that cites a rule the prompt did not include is rejected, and the rejection is printed with its reason rather than hidden.

What a local review does not do

  • It never blocks. review exits 0 whatever it finds. A non-zero exit would invite someone to wire it into CI as a second gate that looks like enforcement and is not. The merge gate and the pull request review remain the system of record.
  • It is never counted. Local findings are left out of rule-tuning telemetry, and every run says so. A local run has no review thread to resolve, so nobody can tell a finding that was fixed from one that was never read. Counting them would skew the acted-on rate with runs nobody can verify.

Files the standard does not cover

A changed file that matches no stack is named in a warning, as in the output above, and gets the core rules only. That is a gap in the standard, and saying nothing would hide it.

Learn step 02 runs a review on your machine and in your assistant.