What problem does it solve?
Intelligent Refactoring prevents unsafe, incomplete, or text-based refactors by using AST-aware tools (LSP rename, find-references, call-hierarchy, ast-grep) to find and update every reference, preserve semantics, and produce traceable change reports so refactors do not break callers, tests, or documentation.
Core Features & Use Cases
- AST-aware reference discovery: Use LSP find-references and call-hierarchy to enumerate all code locations, type annotations, and call sites.
- Safe transformations with dry-run: Preview AST-based changes and LSP rename previews before applying any destructive edits.
- Import chain repair & verification: Update imports, re-exports, and detect circular import risks after moves or extracts.
- Test-driven validation: Run full or targeted test suites to verify behavior preservation and ensure test counts do not regress.
- Documentation and consistency updates: Update docstrings, markdown docs, and grep for leftover references in strings and configs.
- Use cases: Renaming symbols across a repo, extracting shared validators, moving modules between packages, simplifying nested logic, and updating function signatures with all callers.
Quick Start
Run Intelligent Refactoring to rename a symbol across the repository, perform a dry run, repair imports, run tests, and produce a refactoring report.