Currently all flags are negative (large commit, sprawling, no test co-occurrence). Refactoring commits are a positive drift-resistance signal and currently invisible. A commit where total_deletions > total_additions AND files_changed <= 3 is a likely refactor — the team is cleaning up rather than piling on.
Proposed addition:
refactoring_commit_pct = (commits where deletions > additions) / total × 100
This would also give the additions ratio metric more context: a high additions ratio is more concerning when refactoring_commit_pct is near zero (no cleanup happening) and less concerning when it's high.
Currently all flags are negative (large commit, sprawling, no test co-occurrence). Refactoring commits are a positive drift-resistance signal and currently invisible. A commit where total_deletions > total_additions AND files_changed <= 3 is a likely refactor — the team is cleaning up rather than piling on.
Proposed addition:
refactoring_commit_pct = (commits where deletions > additions) / total × 100
This would also give the additions ratio metric more context: a high additions ratio is more concerning when refactoring_commit_pct is near zero (no cleanup happening) and less concerning when it's high.