predict_bugs
Identifies files with high bug probability using combined signals from git history, code complexity, and dependencies. Get risk scores and confidence levels to prioritize code reviews.
Instructions
Predict which files are most likely to contain bugs. Multi-signal scoring: git churn, fix-commit ratio, complexity, coupling, PageRank importance, author count. Each prediction includes a numeric score, risk bucket (low/medium/high/critical) AND a confidence_level (low/medium/high/multi_signal) counting how many independent signals actually fired. Result envelope includes _methodology disclosure. Cached for 1 hour; use refresh=true to recompute. Requires git. Use for proactive bug hunting. For complexity+churn hotspots only use get_risk_hotspots instead. Read-only. Returns JSON: { predictions: [{ file, score, risk, confidence_level, signals }], total }.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Max results (default: 50) | |
| min_score | No | Min bug probability score to include (default: 0) | |
| file_pattern | No | Filter files containing this substring | |
| refresh | No | Force recomputation (default: false) |