Multi-Factor Code Quality Index

A single quality score for Java and Kotlin

Gauge your codebase quality from a geometric mean of evidence-based metrics.

$ brew install integrallis/tap/mfcqi

Working in Python? Meet the Python sister project ↗

The Drake Equation for Code Quality

The score is a geometric mean — a normalized product of independent metrics.

// Drake equation
N = R · fp · ne · fl · fi · fc · L

Estimates a quantity as a product of independent factors. If any single factor is near zero, the whole product collapses toward zero.

// MFCQI
MFCQI = (M₁ × M₂ × … × Mₙ)^(1/n)

A geometric mean is a normalized product of the quality metrics. One weak metric pulls the whole score down — so it is non-compensatory.

Just as the Drake equation reaches its estimate by multiplying independent terms — where a single small factor dominates the outcome — MFCQI multiplies its quality metrics. A codebase can't trade a failing dimension for strong ones; every factor has to hold up.

What it does

Single score

One number in [0, 1] for overall quality — track it in CI, gate on it, badge it.

Non-compensatory

The geometric mean means a weak metric isn't offset by strong ones.

Java & Kotlin parity

The same 15 metrics across Java, Kotlin, and mixed repositories.

AI recommendations

Bring your own key (BYOK) for recommendations — Anthropic, OpenAI, or a local Ollama model. Scoring itself needs no key.

Native binaries

GraalVM CLI for Intel and Apple Silicon macOS, Linux, and Windows.

Quality gates

Configurable thresholds via YAML; a non-zero exit code on failure.

Machine-readable

JSON and SARIF output, plus shields.io badges for your README.

Security included

SAST, dependency CVEs, secret scanning, and code-smell density — in the score.

One contract, language-aware

Java and Kotlin share one 15-metric contract, with language-aware parsing and normalization behind each score.

Complexity & maintainability

Cyclomatic Cognitive Halstead Volume Maintainability Index

Coverage

Documentation Code Duplication

Security

SAST Dependency CVEs (SCA) Secrets Exposure Code-Smell Density

Object-oriented design

RFC DIT MHF CBO LCOM