Skip to content

Detector: Git Hotspots

Jacob Centner edited this page Apr 10, 2026 · 2 revisions

Detector: Git Hotspots

Flags files with unusually high commit frequency (churn hotspots) and analyzes commit patterns.

Property Value
Name git-hotspots
Tier HEURISTIC
Languages All
External tool git log
LLM required No
Confidence 0.30–0.90

What it detects

Files that are statistical outliers in commit frequency, indicating potential fragility, poor design, or bus-factor risk.

How it works

  1. Runs git log --since=N days ago to collect per-file commit counts, authors, and messages
  2. Computes mean and standard deviation of commit counts across all files
  3. Flags files with commits ≥ max(min_commits, mean + threshold × stdev)
  4. Classifies commit messages: fix, refactor, feature, other
  5. Analyzes author concentration for bus-factor risk

Configuration

Parameter Default Description
hotspot_days 90 Look-back window in days
hotspot_min_commits 10 Minimum commits to be flagged
hotspot_stdev_threshold 2.0 Standard deviations above mean

Severity

Condition Severity
≥30 commits or (≥15 commits and >50% bug-fixes) MEDIUM
Documentation files Always LOW (capped at 0.30 confidence)
Otherwise LOW

Example finding

[GIT-HOTSPOT] src/sentinel/core/runner.py
  This file has been modified 25 times in the last 90 days by 3 author(s).
  64% of commits are bug-fixes — this file may be fragile or poorly tested.
  Only one author has touched this file — potential bus-factor risk.
  
  Evidence:
    Commits: 25 in 90 days
    Authors: alice, bob, charlie
    Commit types: feature: 3, fix: 16, other: 2, refactor: 4

Best use

Git hotspots is most valuable as a signal for where to focus deeper analysis. High-churn, fix-heavy files are prime candidates for:

  • Targeted test-coherence checks
  • Semantic drift analysis
  • Architectural review

Known limitations

  • Requires full git history (fails on shallow --depth=1 clones)
  • Churn alone doesn't distinguish healthy iteration from problematic fragility — commit type classification partially addresses this
  • 60-second timeout on git log

Clone this wiki locally