Introduction

ocra is open-source AI code review built for pull requests you do not trust, and it stays quiet unless a finding holds up.

ocra reviews local changes, GitHub pull requests and GitLab merge requests in your CI with your own model key. It assumes the change it reads may be written by an attacker, and it stays quiet unless a finding quotes the code it means and holds up on a second read.

Why ocra

  • Hostile pull requests are the design case. Agents get read-only tools and no shell, untrusted text stays data, and on pull requests nothing from the reviewed tree runs. See Security.
  • A second read before any comment. A verifier drops what the code disproves and a judge merges duplicates; the verdict is computed in code. Every reviewer also states what it must not flag.
  • Reviewers by domain and by file group. Correctness, security, performance, docs and AGENTS.md reviewers each run as an isolated task on a group of related files, and a tested planner decides which reviewer reads which group.
  • Findings follow the code. Models quote the code; ocra resolves the quote to lines, so no line number is made up. On the next push a finding is fixed only when that code is gone, and only a maintainer can dismiss it.
  • Any model, with failback, and a bounded bill. Each tier is a chain of models; overloads move to the next one. A spend limit stops starting tasks, and every run reports tokens and the cost of each attempt.
  • Measured, not guessed. ocra is evaluated on its own golden cases and on the AACR-Bench benchmark, and the results are published with their limits.

Status

ocra is an early 0.x release. CLI flags, configuration keys, exit codes and the report format are contracts and change only with notice; prompts and review quality still move.

Where to next

Edit on GitHub

On this page