Code health

Know which code will break next, and the fix for it.

A technical debt score for every file: 1 to 10 for defect risk, with weights learned from real bug fixes. Then a ranked worklist: named refactoring plans with the tests to run.

No LLM in the analysis · the same code always scores the same

Measured, not claimed

0.74
AUC predicting which files get a bug fix next
n = 2,826 · 21 repositories, 9 languages, 2,826 files · 2026-08
2.3x
more defects found under the same review budget
n = 2,770 · p = 0.003 · 2,770 files scored by both tools at the same leakage-free commit · 2026-08
3.3x
lift on a repo's own lowest-scoring files
16 of the 20 lowest-health files had a bug fix in the prior six months
7
named refactoring plan types
Beside 23 defect markers and 22 performance markers

Sound familiar?

Every tool says everything is wrong.

  • 01

    The linter flags five thousand things.

  • 02

    Big files always look worst, whether or not they break.

  • 03

    We know the file is bad. Nobody knows what to do first.

What makes it different

From a score to the next edit.

  1. Defect risk

    A 1 to 10 score checked against real bug fixes.

    Size is controlled for, so a big file is not marked down for being big.

  2. Fix first

    One ranked list of what to do this week.

    Each item is a first edit, its expected gain, its effort and the command that checks it.

  3. Refactoring plans

    Seven named plans, not a vague smell.

    Extract Method, Extract Class, Extract Helper, Move Method, Split File, Break Cycle and Performance Fix.

  4. Performance and dead code

    Slow paths and unused code, in the same worklist.

    N+1 queries traced across files, and dead code sorted by how sure the finding is.

How it works

Measure, calibrate, act.

A low score means look here first, and the page keeps hotspot health and the worst file beside the average.
  1. 01 / Measure

    Extract deterministic markers

    Complexity, nesting, cohesion, clones, churn, ownership, prior defects and coverage.
  2. 02 / Calibrate

    Weigh them against real defects

    Offline learning against bug-fix history. Only the constants ship.
  3. 03 / Act

    Go from score to worklist

    Fix first, refactoring plans, performance causes and dead code, each with the tests to run.

On a real repository

Every file scored, on one page.

Code Health puts the repository score beside the bug-fix ranking check, maintainability, performance risk and hotspot health, above a health map of every file, so the files to fix first are the ones you see first.

Repowise Code Health for repowise-dev/repowise: a 7.6 out of 10 repository score, the bug-fix ranking check, maintainability, performance risk and hotspot health, above the health map of every file.
repowise-dev/repowise · Code Health, 4,535 files

Questions

What people ask before they try it.

What does the code-health score actually measure?

Every file gets a single 1 to 10 score computed from 23 deterministic markers: McCabe complexity, deep nesting, long methods, class cohesion (LCOM4), god classes, Rabin-Karp clone detection, change entropy, co-change scatter, ownership dispersion, prior-defect history, test-quality smells, and more. Lower scores mean the file is more likely to harbor defects.

How do you know the score actually predicts bugs?

It is defect-validated. On the same 2,770 files across 9 languages with real defect labels, ranking by repowise health surfaces 2.3x the defects of a leading commercial tool under the same review budget (recall 0.173 vs 0.074, effort-aware Popt 0.607 vs 0.462). Across 21 open-source repos the mean cross-project ROC AUC is 0.74 (95% CI 0.68 to 0.79).

Does it use an LLM?

No. Scoring is fully deterministic: 23 markers with weights calibrated offline against a defect corpus. Only the learned constants ship, so the same code always produces the same score, in under 30 seconds on a 3,000-file repo. No cloud, no API calls, no drift.

Can it use my test coverage?

Yes. repowise ingests LCOV and Cobertura coverage to compute untested-hotspot risk (the intersection of low coverage and high hotspot score), alerts when a file's health starts declining, and ranks refactoring targets by impact for effort.

Can I prove these numbers on my own codebase?

Yes, that is the point. Every heuristic is open source under AGPL-3.0, and the validation runs on your own repo. On a typical project, 16 of the 20 lowest-health files had a bug fix in the last 6 months, 3.3x the 24% baseline.

Last reviewed: October 2026

Get started

See what your codebase should fix first.

Start free on a repository you know and check the lowest-scoring files against the ones that broke last quarter.