The change-impact gate

AI slop is complexity you cannot see.

ImpactGate scores the structural decay every change adds, and flags the big ones before they cost you a rewrite.

On PyPI & GHCR Warn or block on merge Studied across 20 OSS repos
impact-gate score Warn
feat: add tiered tax rules  ·  3 files changed
184,320
change impact  ·  before-context WMC
files
3
WMC
47
CC
12
Δlines
260
grade96th pct · blend w=0.7
0warn 90block 98
Refactor first  billing/invoice.py    god-class growth, WMC 41 → 47
Why now

The decay is silent. Then it is a rewrite.

AI is very good at complexity. That is the problem.

It keeps piling logic into existing code, because complexity does not slow it down. A god method grows another branch. A god class gains another method. The code still works, so nobody notices.

Slowly the system decays to where no human can maintain it. Given enough of this, even the AI loses the thread. Every change starts breaking something else.

By the time anyone feels the pain, the cheap fix is gone. What is left is an expensive, error-prone refactor, or a full rewrite. ImpactGate scores the decay each change adds, one commit at a time, while it is still small and safe to fix.

Impact per change · one project over time
decay zone block warn early later
The measure

It weights the complexity already there.

Adding a brand-new file is cheap. Nothing was there before. Piling onto an already-heavy class is expensive. That difference is the decay signal, and it is what the formula measures.

impact = files_changed × Σ max(WMC_other, 1) × CC × Δlines
files_changed
How wide the change reaches across the codebase.
WMC_other
Complexity already in the container you are editing, measured before the change.
CC
Cyclomatic complexity of the functions you touched.
Δlines
How much the change adds to those functions.

Summed over the changed functions. Because WMC is measured on the pre-change state, importing a fresh file scores near nothing, and growing a god class scores a lot.

What it does

A gate built for engineers, not for the marketing deck.

01

Catches silent decay

Working code and green tests hide the rot. ImpactGate makes it visible at the moment it is added, while the fix is still one small refactor.

02

Measures the right thing

Complexity accreting into existing structures. Not lines, not churn. The signal that a container is growing into something no one can hold.

03

Honest and tested

Backed by a corpus study across 20 open-source repos, and clear about its limits. It gates structural decay. It does not claim to predict bugs.

04

Grades on a curve

Impact varies by orders of magnitude across languages and projects. So it grades a change by percentile against a real distribution, not a guessed number.

05

Fits your workflow

One pip install. A Docker image. A pre-commit hook. Checks in GitHub, GitLab, and Jenkins. It meets your team where the work already happens.

06

Points at the fix

Every report ranks the files where decay is concentrating. It does not just say no. It tells you exactly where to look first.

Where it runs

One measure, everywhere you already gate.

Command line

Score staged, working-tree, or branch-vs-main. Text, JSON, or markdown.

Pre-commit hook

Gate every commit locally, before CI ever runs. Warn or block.

CI checks

A sticky PR comment on GitHub and GitLab. A pipeline stage on Jenkins. Make it required to gate merges.

impact-gate · CI
$ impact-gate score --mode range --base origin/main

change impact   184,320    grade 96th pct  (warn 90 / block 98)
enforcement    warn   →   ALLOWED

Files to consider for refactoring
  1  billing/invoice.py   52%   god-class growth (WMC 41 → 47)
  2  billing/tax.py       28%
  3  api/handlers.py      14%

skipped (diff > max_diff_lines)
  -  data/fixtures.json

exit 0
Start in a minute

Install it, point it at a branch, read the number.

Python

pip

Installs the impact-gate command.

$ pip install impact-gate
Any CI

Docker

Git bundled. Mount the repo at /repo.

$ docker run --rm -v "$PWD:/repo" \ ghcr.io/officefloor/impact-gate score
GitHub Actions

Action

Pinned to the floating @v0 tag.

- uses: officefloor/ImpactGate@v0 with: enforcement: warn
On the record

ImpactGate gates change effort and structural decay. It does not predict defects. We ran the study. The measure does not beat file size as a bug predictor, so we do not sell it as one.

Corpus study · 20 repos The limits are in the docs, on purpose.

Score your next change.

One install. Point it at a branch. See what the change really costs before it lands.

$ docker run --rm -v "$PWD:/repo" \ ghcr.io/officefloor/impact-gate score