Developers can run precise AI code reviews using an open-source tool validated by Alibaba
A tool used by tens of thousands of developers to find millions of code defects is now available to everyone. It reads Git diffs, analyzes changed files through a configured LLM, and generates line-level comments that point to exact code locations. Unlike general-purpose agents, it uses engineering logic to control key steps of the review process, improving result consistency.
Combining Engineering Logic and Agents
General-purpose AI agents often review only some files in large changes or report issues at locations that do not match the actual code. They also suffer from significant fluctuations in review quality due to minor prompt changes. This tool is designed so that engineering logic, not the language model, handles file selection and rule matching, which must never be wrong during the review process. Meanwhile, the agent handles dynamic judgments and context retrieval. By grouping related files into a single review unit and executing them via sub-agents, it maintains stable reviews even for large changes.
Precision-Focused Performance Metrics
The tool is designed to maximize Precision and F1 scores. Compared to general-purpose agents using the same base model, it significantly reduces false positives, resulting in higher Precision and F1 scores. In exchange, Recall is set lower than that of general-purpose agents. This is an intentional trade-off to reduce noise and prioritize accuracy. Review time is also shorter, and token consumption is approximately 1/9, significantly reducing API costs. More than 80 senior engineers cross-validated 1,505 real issues to build the dataset.
Installation and Execution
Using the tool requires Git version 2.41 or higher. Installing it globally via npm makes the ocr command available. After installation, run ocr config provider and ocr config model to set the LLM provider and model. Use the --from, --to, and --commit options to review specific branch ranges or a single commit.
Suitable Targets and Verification Points
This tool is suitable for development teams or CI/CD pipelines that require precise code reviews. It is particularly useful when consistency in review quality is important for large-scale changes or when API costs need to be reduced. Review results can be saved in JSON format for integration with other AI agents or tools. It can also be integrated as a plugin with various coding agents such as Claude Code, Codex, and Cursor. Before use, ensure that the LLM provider and model are configured for your project and that the Git version meets the requirements. Since the tool prioritizes precision, it is better suited for teams that prefer reporting only certain issues rather than capturing all potential problems.