name: fallow description: Analyzes TypeScript and JavaScript codebases for dead code, duplication, complexity, and architectural hotspots. Use when the user asks to run a codebase audit, find unused code or dependencies, detect duplicate code, check health scores, or when reviewing pull request risk.
Fallow
Fallow is a deterministic codebase intelligence engine for TypeScript and JavaScript. It provides structured evidence for codebase quality, dead code, duplication, and architecture.
Quick start
Run a changed-code audit (useful for PRs):
npx fallow audit --format json
Check project health and complexity:
npx fallow health --score --hotspots --targets
Workflows
1. Cleanup Opportunities (Dead Code)
Find unused files, exports, dependencies, types, and stale suppressions.
npx fallow dead-code
# Options:
# --unused-exports Only unused exports
# --circular-deps Only circular dependencies
# --boundary-violations Only boundary violations
2. Duplication Detection
Find copy-pasted or structurally identical code blocks.
npx fallow dupes
# Options:
# --mode semantic Catch clones with renamed variables
# --trace <file:line> Show all clones of code at this location
3. Complexity & Refactoring Targets
Surface the most complex functions and refactoring targets.
npx fallow health
# Options:
# --top 20 20 most complex functions
# --hotspots Riskiest files (git churn x complexity)
# --targets Ranked refactoring recommendations
4. Agent Workflows
Always use --format json when parsing output programmatically or reading it as an agent. The JSON output includes per-issue actions with an auto_fixable flag.
npx fallow audit --format json
To preview automatic cleanup:
npx fallow fix --dry-run --format json