score_risk
Estimate the risk of changing a single symbol on a 0-to-100 scale so you can prioritize proposed fixes before patching.
Instructions
Estimate the risk of changing one symbol on a heuristic 0-to-100 scale. Use when: you need to prioritize a specific proposed change before patching. Don't use when: you need an overall repository health trend (use get_health_score instead).
Returns {score, breakdown, basis, referenced_by, recommendation}. Breakdown contains point contributions: inbound_refs (0-30), has_tests (0 or 20 for no referencing test), lines_changed (5/10/17/25 based on file length, not patch size), is_circular (0 or 25). basis is symbol, or file when reference sets are unavailable. referenced_by contains at most 10 sorted paths. Recommendation is safe to fix (<=30), fix with caution (<=60), or manual review recommended (>60); this is not a guarantee of correctness or coverage.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | Yes | Repository-relative file path exactly as reported by scan_repo, e.g. src/pricing.py. Use native separators or forward slashes; absolute paths do not match the scan's relative paths. Used for file size and cycles. | |
| symbol | Yes | Exact case-sensitive unqualified symbol name, e.g. calculate_discount. Matches AST reference names across files, not fully resolved symbols; the implementation does not validate that the symbol exists. | |
| repo_path | Yes | Repository directory to rescan with per-file symbol references enabled; prefer an absolute path. No source or state files are written. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| basis | Yes | ||
| score | Yes | ||
| breakdown | Yes | ||
| referenced_by | Yes | ||
| recommendation | Yes |