More on the topic…
Open Code Review is an AI-powered code review tool that Alibaba built internally, validated across millions of defects over two years, then open-sourced. It works by reading Git diffs, sending changed files to an LLM with tool-use capabilities, and generating line-level review comments. Unlike surface-level diff feedback, it can read full file contents, search the codebase, and inspect other changed files for context. It also has a full-file scan mode for auditing unfamiliar codebases when there's no meaningful diff to work with.
The tool trades recall for precision — it catches fewer total issues than general-purpose agents like Claude Code, but the issues it does catch are real defects, not false alarms. On their benchmark (built from 50 open-source repos, 200 pull requests, 10 languages, validated by 80+ senior engineers), Open Code Review achieves significantly higher precision and F1 scores while using only about 1/9 of the tokens and running faster. This matters because general-purpose agents tend to cut corners on large changesets, report issues at wrong line numbers, and produce unstable results depending on prompt wording.
The architecture splits responsibilities: deterministic engineering handles what must not fail — precise file selection, smart bundling of related files into isolated review units, rule matching based on file type, and independent positioning modules that fix location accuracy. The agent handles dynamic decisions where it excels — scenario-tuned prompts optimized for code review, a distilled toolset built from production data rather than generic tools, and context retrieval. You install via npm, configure an LLM endpoint (or skip that with delegation mode), then run commands like `ocr review` for staged changes or `ocr review --from main --to feature-branch` for a commit range. It integrates with Claude Code, Cursor, and other coding agents, and supports CI/CD platforms including GitHub Actions and GitLab CI.
Questions about this article
No questions yet.