Scoring.
Every scan returns one number from 0 to 100. Same code in, same score out.
How it works
Every diagnostic contributes a weighted penalty based on its severity. Penalties are multiplied by the engine weight in .aislop/config.yml and by the rule's impact tier. Run aislop rules to see the tier and rationale for each rule.
| Severity | Base penalty |
|---|---|
| Error | 3.0 |
| Warning | 1.0 |
| Info | 0.25 |
Default engine weights:
scoring:
weights:
format: 0.3
lint: 0.6
code-quality: 0.8
ai-slop: 1.0
architecture: 1.0
security: 1.5
smoothing: 20
maxPerRule: 40Rule impact tiers
Native rules carry an explicit impact tier so scoring is strict only where the signal justifies it. Style and cleanup still surface as findings, but they move the number less than swallowed errors or missing imports.
| Tier | Multiplier | Typical use |
|---|---|---|
| strict | 1.0 | High-confidence defects, security, missing imports, swallowed failures |
| standard | 1.0 | Real quality issues that may still need judgment |
| maintainability | 0.75 | Refactoring and design debt |
| mechanical | 0.5 | Cleanup that aislop fix can usually handle |
| style | 0.5 | Style, policy, and size pressure |
| advisory | 0.25 | Medium-confidence signals such as hardcoded config |
Density and saturation
Each rule contributes at most scoring.maxPerRule weighted penalty points by default, so one noisy family cannot dominate the score. The final number uses logarithmic scaling with issue-density normalization against production and test files, so a large tree is not punished for being large.
Score labels
| Score | Label |
|---|---|
| 75–100 | Healthy |
| 50–74 | Needs Work |
| 0–49 | Critical |
scoring:
thresholds:
good: 75
ok: 50CI quality gate
aislop ci exits 1 when the score drops below ci.failBelow, or when any error-severity diagnostic is present.
ci:
failBelow: 70