MergeJudge documentation
Guides for the AI pull request reviewer with an open-source engine that learns your repo's rules.
MergeJudge (mergejudge.si) is an AI pull request reviewer with an open-source engine for GitHub. It sorts every pull request into an auto, review or block lane: deterministic rules decide first, and the AI step can only make a lane stricter. Auto means low risk, not a guarantee. New here? Read What is MergeJudge?
Start
- What is MergeJudge?: the one-page overview.
- Getting started: install the GitHub App and get a first review.
- How it works: rules pick a lane, the AI reads the diff, the verdict lands on the PR.
- Review modes: diff, context and deep.
- Sort pull requests by risk: auto, review or block. Auto is low risk, not a guarantee.
- Risk-based code review for AI-written pull requests: match review to risk, with lanes, base-branch policy files, special passes and GitHub auto-merge for low-risk changes.
- Stop AI agents merging their own pull requests: GitHub rulesets, a required check, and rules an agent cannot loosen.
- Review pull requests from AI coding agents: a checklist for what to read, where agents slip, and when to merge, request changes, or close.
- How to evaluate an AI code review tool: ten small test PRs to run before you trust a reviewer.
- How to reduce noise and false positives in AI code review: measure the acted-on rate, keep linter findings out, and route risk before the model comments.
- AI code review prompt for pull requests: a copyable template, what to skip, and how to keep the prompt on the base branch.
- Open source code review tools: best open-source AI code review tools for GitHub on a 7-dimension matrix (MergeJudge Runner, PR-Agent, reviewdog, Danger), self-hosted forges, and how to read Martian Code-Review-Bench.
Run MergeJudge
- Open-source AI pull request reviewer: the MIT Action and runner, one workflow file, your own key or rules-only.
- Hosted service: the GitHub App. Free AI reviews on public repos to start, or your own model key.
- GitHub App for AI PR review: install the App, the permissions it asks for, and what it posts on a pull request.
- GitHub Action: run the review inside your own GitHub Actions runner.
- Run reviews on your own machine: the open-source runner.
- Self-hosted GitHub Action: your own OpenAI key or a local OpenAI-compatible endpoint, in your own runner.
- Local AI review on your machine: the AI step on your own computer, and early feedback from draft PRs.
Reference
.mergejudge.yml: every option and its default.- LLM providers: bring your own key. Anthropic, OpenAI, z.ai GLM and OpenAI-compatible endpoints, including a local one.
- Rubric packs: security, correctness and tests.
- Policy files:
REVIEW.md,REVIEW_POLICY.md,AGENTS.mdand friends. - AGENTS.md and policy files for AI review: how policy files,
.mergejudge.ymland learning fit together. - Approvals: when MergeJudge approves, and how it works with branch protection.
- Methodology: our small offline test of the review modes.
Operate
- Learning loop: how the reviewer learns from your feedback.
- Security model: permissions, key handling and base-branch-only config.