Blast-radius and risk analysis for pull requests.
MergeRadar analyzes a local git diff or a saved unified diff file and produces a markdown or JSON report describing:
- what areas of the codebase were touched
- which risk signals were triggered
- what evidence is missing
- what should be checked before merge or deploy
Most pull request tools are built to help reviewers comment on code changes. MergeRadar is built to answer a different question:
What could this change affect, and what should we verify before it ships?
The first version is intentionally deterministic and rule-based. That keeps the output easier to inspect, easier to test, and easier to extend as the rules improve.
python -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
pip install -e .[dev]Analyze the current working tree against HEAD:
mergeradar analyzeAnalyze a branch or commit range:
mergeradar analyze --base main --head HEADAnalyze a saved diff file:
mergeradar analyze --diff-file samples/auth-change.diffWrite the report to disk:
mergeradar analyze --output report.mdGet JSON for automation:
mergeradar analyze --format json# MergeRadar Report
## Risk Level
**High** (score: 7)
## Summary
This change touches authentication-related code, deployment configuration, and a database migration.
## Triggered Risk Signals
- **[+3] Database migration changed**
- **[+3] Auth-sensitive code changed**
- **[+2] No tests changed for risky areas**- database migration changed
- auth-sensitive path changed
- infra/deploy config changed
- public API path changed
- environment/config changed
- risky areas changed without tests
- risky areas changed without docs
- large diff threshold exceeded
- multiple top-level components touched
- docs-only or tests-only stabilizers
- GitHub Action
- PR comment mode
- CODEOWNERS awareness
- custom config file
- optional LLM-generated narrative summary layered on deterministic signals
- richer ownership and runbook checks
- repository-specific rule tuning
- v0.1 is path-heuristic based, not AST-aware
- unified diff parsing is intentionally simple
- recommendations are deterministic and generic