What problem does it solve?
Provides a guarded, repeatable orchestration for performing structural code refactors without introducing regressions by enforcing analysis, test verification, and documentation as part of each session.
Core Features & Use Cases
- Scoped analysis by a senior reviewer: identify code smells, priorities, and dependencies before any edits.
- Symbol-aware refactors with Serena tools: prefer symbol-scoped renames, safe deletes, and referencing checks to avoid breakage.
- Verification and retry logic: run linters and tests after each change, call debugger to fix import/symbol issues, and allow up to three retries per stage.
- Documentation and reporting: generate a concise refactoring report summarizing changes, metrics, and remaining issues.
- Use Case: Trigger a focused refactor for a single file or small module discovered during code review, ensuring tests exist, applying small incremental edits, and verifying all tests pass.
Quick Start
Perform a safe refactor on src/services/auth.ts: analyze scope, apply prioritized symbol-scoped refactors, run linters and the related tests after each change, and produce a summary report when complete.