opendrs is an open-source PR blast radius analyzer that generates a calibrated 0-1 risk score for each Pull Request. Its goal is to let AI-reviewed PRs with a low blast radius be automatically approved into the merge queue, while high-risk PRs still wait for human review.
Purpose As AI agents write and review code faster than humans can read it, human review becomes the bottleneck. Most PRs are low-risk, while a few PRs cause most incidents. opendrs measures the blast radius and risk of each PR, helping the final human reviewer judge how much attention the PR needs, and lists up to five architectural and historical facts (for example, new imports between modules, breaking public contracts, or a file that usually changes together with another file that was not modified), information that typically does not appear in the editor or in AI review comments.
Key capabilities
- Signal extraction: each signal provider reads the diff, history, and import graph, and outputs features, including change size, change dispersion, past fix and rollback records of the changed files, the author's experience with these files, complexity, blast radius (transitive dependents), critical paths, and missing tests. Each signal records how it was obtained (observed, derived, inferred, or unknown) and its evidence.
- Model: logistic regression converts features into probabilities and reports each signal's contribution w·x, making it easy to explain why a score was given. Default weights are manually set priors; opendrs calibrate can fit weights based on repository history.
- Grading: scores are mapped to three tiers: green, yellow, and red, with thresholds that can be absolute scores or percentiles of the repository's own history.
- Policy: ordered rules turn scores into decisions. For example, a PR with a score below 0.3 that passes AI review (Claude, CodeRabbit, Copilot, or any check run) is approved and sent to the merge queue or auto-merged; higher-risk PRs still wait for a human.
- Configuration: all settings live in .opendrs.yml, read from the base branch, so a PR cannot loosen its own gate.
Usage
- Score the current branch against the default branch: no configuration or API key needed; outputs the score, tier, driving signals with their evidence, and the policy decision; --json prints the full result, and --fail-above 0.6 makes the command exit with code 1 when the threshold is exceeded.
- For each PR Scoring: Add .github/workflows/opendrs.yml, or run npx @error-path/opendrs init. By default, it only comments and labels; the approval feature must be enabled in .opendrs.yml on the default branch.
- Other integrations: CLI, MCP server, Claude Code plugin, and agent skill.
Use cases Suitable for software teams using git, especially scenarios where AI review is already in place upfront and you want low-risk PRs automatically sent to the merge queue while focusing human review on high-risk changes. The method references Meta's Diff Risk Score (DRS); opendrs is an independent open-source implementation and is not affiliated with Meta.
Limitations
- Default weights are not fitted to specific code; before trusting them, run a backtest, and once there is enough history, calibrate.
- Labels are a proxy metric for incidents, and numbers from small repositories are unstable.
- Scoring is not code review; it estimates the probability of an incident, rather than judging whether a change is correct.
- For the full list of limitations, see the official documentation.
Documentation and guides: error-path.github.io/opendrs