AI Chaos Index
A quantified measure of structural risk in AI-generated codebases. One number that tells you if your app is safe to scale — or silently falling apart.
What it measures
The AI Chaos Index (ACI) is a composite score from 0 (stable) to 100 (critical) based on five root cause dimensions:
Architecture Drift
Layer boundaries broken. Business logic in route handlers. UI components containing data access.
Dependency Corruption
Circular dependencies between modules. Tangled import graphs. Changes propagate unpredictably.
Structural Entropy
Inconsistent naming. Duplicate logic. Files exceeding 500–1,000 lines. No standard patterns.
Test Infrastructure Failure
Missing tests. Stale tests. No coverage of critical paths. Regressions go undetected.
No Deployment Safety Net
No CI/CD pipeline. No automated checks. Direct push to production. No build verification.
Each dimension is scored independently (0–10) and weighted to produce the composite ACI score.
Risk bands
| Score | Zone | What it means | Recommended action |
|---|---|---|---|
| 0–25 | Stable | Minor improvements possible. Architecture is sound. | Deploy with confidence. Consider enforcement to maintain quality. |
| 26–50 | Risky | Structural weaknesses present. Degradation likely under continued development. | Plan remediation. Address before scaling. |
| 51–75 | High | Active degradation. Each new feature increases instability. | Stabilize before adding features. |
| 76–100 | Critical | Production instability imminent or already occurring. | Architecture intervention needed immediately. |
ACI does not measure bugs. It measures structural failure risk.
A codebase can have zero bugs and still score 80+ on ACI — because the architecture is one feature away from collapse.
Why not just use code quality tools?
Tools like ESLint, SonarQube, or CodeClimate measure code quality — style violations, complexity metrics, code smells.
ACI measures something different: structural integrity — whether the architecture can sustain continued development without degradation.
| Code Quality Tools | AI Chaos Index | |
|---|---|---|
| Measures | Style, complexity, duplication | Structural risk, architecture integrity |
| Scope | File-level | System-level (dependency graph, boundaries) |
| Predicts | Code maintainability | Regression cascades, production failure risk |
| AI-specific | No | Yes — designed for prompt-driven codebases |
Code quality and structural integrity are complementary — but only structural integrity predicts whether the next 10 features will succeed or fail.
Example ACI report
Repository: client-app (Next.js + Supabase)
Generated with: Lovable
Age: 4 months | 38k LOC
Root Cause Analysis
RC01 Architecture Drift 7.2 / 10 HIGH
RC02 Dependency Corruption 5.8 / 10 ELEVATED
RC03 Structural Entropy 4.1 / 10 MODERATE
RC04 Test Infrastructure 8.5 / 10 CRITICAL
RC05 Deployment Safety 6.3 / 10 HIGH
AI Chaos Index: 64.8 / 100 Risk Band: HIGH
Top Findings
[CRITICAL] 14 files exceed 500 LOC (max: 1,847)
[CRITICAL] Test coverage ratio: 3%
[HIGH] 6 circular dependency chains detected
[HIGH] No CI/CD pipeline
[ELEVATED] Business logic in 8 route handlers
This is an example output. Your report will reflect the actual structural state of your repository.
How to get your ACI score
Free — Run it yourself
The ASA Engine CLI runs locally on your machine. No data leaves your computer. Open source.
View ASA Engine CLI →Quick Scan — $297
Professional analysis by an architect. ACI score + root cause breakdown + prioritized findings + personal video walkthrough. Delivered in 24 hours.
Get your Quick Scan →Methodology
The AI Chaos Index is based on the ASA Standard — an open architecture standard for AI-generated codebases.
The scoring model analyzes:
- Dependency graph structure and circular dependency detection
- Layer boundary violations (business logic in wrong layers)
- File size distribution and structural entropy metrics
- Test coverage and test infrastructure completeness
- CI/CD pipeline presence and deployment safety checks
The methodology is deterministic — the same codebase always produces the same score. No AI interpretation, no subjective judgment.
What's your AI Chaos Index?
Find out in 24 hours. One score. Complete structural clarity.