.aislop/config.yml.
The six engines
format
Formatting consistency checks. Delegates to Biome (JS/TS), ruff (Python), gofmt (Go), cargo fmt (Rust), rubocop (Ruby), and php-cs-fixer (PHP). Style findings contribute half their normal weight to avoid letting house style dominate the score.
lint
Language-specific lint rules. Uses oxlint (JS/TS), ruff (Python), golangci-lint (Go), clippy (Rust), and expo-doctor (React Native). Set
lint.typecheck: true to add type-aware rules in TypeScript projects.code-quality
Complexity and dead code. Tracks function length, file size, control-flow nesting depth, parameter counts, unused files, and unused dependencies (via knip).
ai-slop
Patterns AI coding agents leave behind: narrative comments above self-explanatory code, swallowed exceptions,
as any casts, hallucinated imports, TODO stubs, dead code, and generic names. Carries the highest default weight.architecture
Custom structural rules: import bans, layer enforcement, and required patterns. Opt-in — disabled by default and requires a
.aislop/rules.yml file. See Architecture Rules.security
Secrets and risky constructs (eval, innerHTML, SQL/shell injection) plus dependency vulnerability audits (npm audit, pip-audit, cargo audit, govulncheck).
Enabling and disabling engines
Each engine is a boolean flag underengines: in .aislop/config.yml. Disabling an engine removes it from the scan completely — its findings neither appear in the report nor affect the score.
Quality thresholds
Thequality: section controls the numeric limits that trigger code-quality warnings. All four settings accept any positive integer.
| Setting | Default | Description |
|---|---|---|
maxFunctionLoc | 80 | Maximum lines of code per function |
maxFileLoc | 400 | Maximum lines of code per file |
maxNesting | 5 | Maximum control-flow nesting depth |
maxParams | 6 | Maximum number of function parameters |
typescript-strict example config tightens all four; the monorepo-relaxed config loosens them for incremental adoption:
- Strict (TypeScript)
- Default
- Relaxed (monorepo)
Lint typecheck
Thelint.typecheck option is false by default to keep scans sub-second. Enable it in TypeScript projects when you want type-aware lint rules (for example, rules that require await on async calls or flag incorrect type narrowing):
Enabling
typecheck requires a valid tsconfig.json in your project. Scan time increases because the TypeScript compiler runs as part of the lint pass.Security audit options
The security engine runs dependency audits by default. You can disable auditing entirely or extend the timeout for slow networks:Run dependency vulnerability audits. Disable if your project has no package manager lockfile or if you manage auditing separately.
Milliseconds before the audit subprocess is killed. Increase this for large dependency trees or slow CI network access.
Scoring weights
Every diagnostic carries a base penalty that depends on its severity, then that penalty is multiplied by the engine weight:| Severity | Base penalty |
|---|---|
| Error | 3.0 |
| Warning | 1.0 |
| Info | 0.25 |
Tuning weights for your team
Adjust weights to reflect what your team cares about most. Higher values make that engine’s findings damage the score more.- Strict TypeScript
- Security-first (Python/Go)
- Incremental adoption
Raises all weights to keep score pressure high across every category:
Tuning guidance
- Increase
ai-slopif you want strict AI-output hygiene to drive the score. - Increase
securityif dependency or runtime risk should dominate. - Lower
lintandcode-qualityif you want scores to emphasise AI-specific findings over generic style. - Lower
formatif formatting issues should never block CI on their own.
smoothing and maxPerRule
Two additional scoring knobs prevent edge cases from distorting results:Reduces penalty spikes in large repos by dampening the logarithmic density curve. Increase this value for legacy codebases with many pre-existing findings so that incremental improvements register clearly in the score.
Caps the total weighted penalty a single rule family can contribute to the score. Repeated findings from the same rule still appear in the report, but one noisy rule cannot dominate the whole score. Different rule families continue to accumulate normally. Increase
maxPerRule if you want repeated findings from one rule to punish the score more heavily.Score labels and thresholds
The final score maps to a human-readable label. Both thresholds are configurable:| Score | Default label |
|---|---|
| 75 – 100 | Healthy |
| 50 – 74 | Needs Work |
| 0 – 49 | Critical |
CI quality gate
Setci.failBelow to fail aislop ci when the score drops below your threshold. aislop ci exits with code 1 when the condition is met, making it a reliable quality gate in any CI environment.
Minimum acceptable score.
aislop ci exits 1 when the score is below this value.aislop ci --changes --base origin/main to gate only the files a pull request changes rather than the full repo score. The same failBelow threshold and exit code apply.