repodecay
v0.1.0
Published
Repo Decay Detector — CLI that measures technical debt caused by AI coding tools (Cursor, Copilot, Claude Code)
Maintainers
Readme
RepoDecay
Detect technical debt caused by AI coding tools before your codebase becomes unmaintainable.
A CLI tool that measures how AI assistants are silently degrading your repository quality — one scan at a time.
npx repodecay scanCursor, Copilot, Claude Code — great at writing code. Terrible at not creating technical debt. RepoDecay is the first tool built specifically to detect and quantify the damage AI-generated code leaves behind.
Repository Decay Score
One percentage. Zero to 100. How much has your AI assistant degraded your codebase?
| Score | Label | Meaning | |-------|-------|---------| | 0–20% | Pristine | No detectable AI damage | | 21–40% | Light Sprinkle | Minor issues, watch trends | | 41–60% | Drizzle | AI creating visible debt | | 61–80% | Pouring | Significant AI-caused damage | | 81–100% | Monsoon | Codebase degrading faster than it improves |
Quick Start
# Run a scan
npx repodecay scan
# Scan a specific directory
npx repodecay scan --path ./src
# JSON output (pipe to jq, CI scripts)
npx repodecay scan --output json
# Track trends over time
npx repodecay scan --baseline
npx repodecay compareInstall
npm install -g repodecayHow It Works
RepoDecay runs 5 static analysis passes designed to catch patterns common in AI-generated code:
- Duplication — Hashes function bodies to find identical blocks (AI loves copy-paste)
- Dead Code — Resolves export/import references to find unused code (AI generates bloat)
- Complexity — Cyclomatic complexity per function (AI writes convoluted code)
- File Size — Flags oversized files >300 lines (AI generates mega-files)
- Architecture — Detects
anytypes, mutablelet, nested callbacks — hallmarks of AI slop
Results stored in .repodecay/history.json. Trend tracking built in.
Why RepoDecay Exists
Existing tools treat all code the same. SonarQube, CodeRabbit, Semgrep — they scan code without asking where it came from.
RepoDecay is different: it measures damage specifically from AI coding tools. Not a generic linter. A damage report for what your AI assistant did when you weren't looking.
Backed by data:
- CMU study: Cursor repos show +41% complexity, +30% more static warnings
- GitClear: 211M LOC analyzed — copy-paste up 12.3%, refactoring collapsed
- CodeRabbit: AI PRs contain 1.7× more issues, 3× more readability problems
Configuration
Create .repodecayrc in your repo root:
{
"extensions": [".ts", ".tsx", ".js", ".jsx"],
"maxFileLines": 300,
"maxComplexity": 10,
"cloneRateThreshold": 5,
"excludeDirs": ["node_modules", "dist", ".git", "build", ".next"]
}License
MIT
