Goal
Detect files that always change together in the same commit — hidden dependencies invisible in code.
Parameters
threshold (number, optional, default: 0.8) — minimum co-commit rate
since (string, optional) — time window filter
Implementation
- Parse all commits, extract file lists per commit
- Build co-occurrence matrix for file pairs
- Compute coupling strength = co-commits / max(individual commits)
- Return pairs above threshold, ranked by strength
- Cap at reasonable limit (e.g., top 50 pairs)
Tests
- Test with known coupled file pairs
- Verify threshold filtering
- Test empty repo edge case
Goal
Detect files that always change together in the same commit — hidden dependencies invisible in code.
Parameters
threshold(number, optional, default: 0.8) — minimum co-commit ratesince(string, optional) — time window filterImplementation
Tests