npx claudepluginhub elmmly/genie-team --plugin genie/cleanupCleans up code and project structure by removing dead code, optimizing imports/files, with analysis, safe execution, validation, and summary report. Supports target path and --type, --safe, --interactive flags.
/cleanupAnalyzes codebase for dead/unreachable code, unused imports/exports/dependencies using language tools. Reports findings by category with confidence and removes high-confidence items after tests.
/cleanupCleans .a5c/runs and .a5c/processes: aggregates insights from old completed/failed runs into docs/run-history-insights.md and removes them plus orphans. Supports --dry-run and --keep-days N flags.
/cleanupRemoves temporary design lab files from .claude-design/ directory and Next.js/Vite preview routes after user confirmation. Reports deletions.
/cleanupDeletes all Lisa interview state files (.claude/lisa-*.md and lisa-draft.md) to reset plugin state. Lists files first, confirms deletion, skips completed specs.
/cleanupSurveys and safely cleans up abandoned CAT worktrees, task locks, orphaned branches, and stale remotes after user confirmation and uncommitted change checks.
Debt reduction workflow: diagnose → tidy (batched).
scope - Area to clean: module, directory, or "full" (optional, defaults to full)--continue - Continue from previous cleanup session--priority [high/medium/low] - Focus on specific priority items/cleanup src/services
│
├─→ /diagnose src/services
│ └─→ Architect scans for issues
│ └─→ Produces prioritized cleanup list
│
└─→ /tidy [diagnose-report]
└─→ Tidier executes batches
└─→ Tests after each batch
└─→ Progress tracked
Cleanup maintains state in docs/cleanup/defrag-progress.md:
# Defrag Progress
## Current Cleanup: services
- **Started:** 2024-12-03
- **Status:** In Progress
- **Batches:** 3/7 complete
## Completed
- [x] Dead code removal - 2024-12-03
- [x] Import cleanup - 2024-12-03
- [x] Naming consistency - 2024-12-03
## Remaining
- [ ] Dependency updates
- [ ] Test coverage gaps
- [ ] Documentation
## Blocked
- [ ] Config refactor - needs Architect input
/cleanup
> Starting cleanup workflow (full codebase)
>
> [Architect diagnosing...]
> Health score: 72/100
> Issues found: 15
> Priority breakdown:
> - High: 2 items
> - Medium: 8 items
> - Low: 5 items
>
> Proceeding to tidy...
>
> [Tidier executing...]
> Batch 1: Complete (tests pass)
> Batch 2: Complete (tests pass)
> Progress: 2/6 batches
>
> Session saved. Continue with /cleanup --continue
/cleanup --continue
> Resuming cleanup workflow
> Progress: 2/6 batches complete
> Continuing with Batch 3...
Cleanup can span multiple sessions:
--continue to resume--continue