Run a comprehensive code health scan on the codebase.
Follow these steps:
- •Read your MEMORY.md for previously known issues
- •Scan for dead code:
- •Unused imports:
ruff check --select F401 src/orbiome lint src/ - •Unused variables/functions: grep for definitions not referenced elsewhere
- •Commented-out code blocks: search for patterns like
//,#,/* */spanning 3+ lines - •Unreachable code after return/throw/break/continue
- •Files not imported by any other file
- •Unused imports:
- •Check for outdated dependencies:
- •
pip list --outdatedornpm outdated - •Known vulnerabilities:
pip auditornpm audit
- •
- •Scan for code smells:
- •Functions longer than 50 lines
- •Files longer than 500 lines
- •Deeply nested code (>4 levels)
- •Duplicated logic blocks
- •Check TODO/FIXME comments — do they have issue references?
- •Write findings to
docs/reviews/code-health-{date}.md - •Update
TECH_DEBT.mdwith new findings - •Update your MEMORY.md with patterns discovered