- Add 60 new agents across all 10 categories (75 -> 135) - Add 95 new plugins with command files (25 -> 120) - Update all agents to use model: opus - Update README with complete plugin/agent tables - Update marketplace.json with all 120 plugins
1.3 KiB
1.3 KiB
/remove-dead-code - Remove Dead Code
Safely remove identified dead code from the codebase.
Steps
- Load the dead code report from the most recent analysis
- Filter to high-confidence items only (unless user requests medium/low)
- Group removals by file to minimize file operations
- For each file, identify the dead code segments to remove
- Check for side effects: does the dead code initialize anything or register handlers
- Remove unused imports that result from removing dead code
- Remove empty files if all exports are unused
- Clean up empty directories if all files are removed
- Run the project's linter to verify no new errors are introduced
- Run the test suite to confirm nothing breaks
- Generate a summary: files modified, lines removed, items removed
- Create a git-friendly diff for review before committing
Rules
- Only remove items flagged as high-confidence unless explicitly told otherwise
- Verify each removal does not break the build before proceeding to the next
- Keep a backup list of all removed items for potential restoration
- Do not remove code that has TODO or FIXME comments attached
- Remove associated tests only if the user explicitly requests it
- Process removals incrementally: one file at a time with validation
- Stop immediately if any test fails and report the causing removal