get_file_health_timeline
Analyze file health over time by aggregating complexity, coupling, and churn data into a single timeline, revealing whether a file is improving or deteriorating.
Instructions
Aggregates get_complexity_trend, get_coupling_trend, and get_git_churn into ONE time-series response per file: for each historical snapshot, reports complexity (max/avg cyclomatic), coupling (ca/ce/instability), and a lightweight per-point risk_score, plus a whole-window churn summary — so "is this file getting healthier or worse over time" is answerable in one call instead of three. For cross-file bug-risk ranking use predict_bugs instead (different, more thorough scoring model). Requires git. Read-only. Returns JSON: { file, current, historical: [{ date, commit, max_cyclomatic, avg_cyclomatic, ca, ce, instability, risk_score }], churn, trend }.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file_path | Yes | File path to analyze | |
| snapshots | No | Number of historical snapshots to sample (default: 6) | |
| since_days | No | Git history window in days (default: 90) |