- Rename reviews/ to lenses/ (clearer terminology) - Add workflows/ for beads proto templates - Extract code-review proto to workflows/molecules.jsonl - Update ai-skills.nix module: - Add enableLenses option (deploys to ~/.config/lenses/) - Add enableWorkflows option (deploys to ~/.beads/molecules.jsonl) - Derive repoRoot from skillsPath for sibling directories - Update lens paths in proto to use deployed location 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
50 lines
1.5 KiB
Markdown
50 lines
1.5 KiB
Markdown
# Dead Code Review Lens
|
|
|
|
Review the provided code for **unused, unreachable, or obsolete code**.
|
|
|
|
## What to Look For
|
|
|
|
### Zombie Code
|
|
- Commented-out code blocks (should be deleted, git has history)
|
|
- Functions/methods that are defined but never called
|
|
- Exported symbols that are never imported elsewhere
|
|
- Variables assigned but never read
|
|
- Parameters passed but never used
|
|
|
|
### Unreachable Code
|
|
- Code after unconditional return/throw/break
|
|
- Branches that can never execute (dead conditions)
|
|
- Error handlers for errors that can't occur
|
|
- Feature flags that are always on/off
|
|
|
|
### Obsolete Code
|
|
- Compatibility shims for deprecated dependencies
|
|
- Polyfills for features now universally supported
|
|
- Migration code that has already run
|
|
- TODO comments older than 6 months with no activity
|
|
- Version checks for versions no longer supported
|
|
|
|
### Import/Dependency Cruft
|
|
- Imported modules that are never used
|
|
- Dependencies in package manifest but unused in code
|
|
- Conditional imports that never trigger
|
|
|
|
## Output Format
|
|
|
|
For each finding:
|
|
```
|
|
[DEAD] <severity:HIGH|MED|LOW> <file:line>
|
|
Type: <zombie|unreachable|obsolete|cruft>
|
|
Issue: <what's dead>
|
|
Evidence: <how you know it's unused>
|
|
Suggest: <delete|archive|verify-then-delete>
|
|
```
|
|
|
|
## Guidelines
|
|
|
|
- HIGH = definitely dead, safe to delete
|
|
- MED = likely dead, needs verification (grep for dynamic usage)
|
|
- LOW = possibly dead, context-dependent
|
|
- Be careful with: reflection, dynamic imports, CLI entrypoints, test fixtures
|
|
- When uncertain, suggest verification steps rather than immediate deletion
|