get_churn_metrics
Identify high-risk code hotspots by analyzing file change frequency and cyclomatic complexity from git history. Reports churn concentration to prioritize refactoring.
Instructions
Analyze file change frequency from git history. Shows which files change most often, optionally overlaid with cyclomatic complexity to find high-risk hotspots (frequently changed + complex). Also reports churn concentration (Gini coefficient).
No prior indexing required.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| repo_path | Yes | Path to the repository | |
| window_days | No | Days of git history to analyze (1-365, default: 90) | |
| top_n | No | Number of top results (1-100, default: 20) | |
| include_complexity | No | Include churn×complexity composite (default: true) |