Guided refactoring with safety checks
Performs safe code refactoring with comprehensive checks and verification.
/plugin marketplace add eyadsibai/ltk/plugin install ltk@ltk-marketplace<type> [target]Perform safe refactoring operations with comprehensive checks and verification.
rename: Rename function, class, or variableextract: Extract code into new function/classsimplify: Reduce complexityinline: Inline function or variablemove: Move code to different modulePre-refactoring checks:
Analyze target:
Plan refactoring:
Execute refactoring:
Post-refactoring verification:
Report results: Show what changed and verification status.
/mytoolkit:refactor rename old_name new_name
/mytoolkit:refactor extract function_name file:start-end
/mytoolkit:refactor simplify file_or_function
Refactoring: [type]
===================
Target: [what is being refactored]
Pre-Refactoring Analysis
------------------------
Tests exist: [Yes/No]
Test status: [PASS/FAIL]
References found: X
Files affected: X
Refactoring Plan
----------------
1. [Step 1]
2. [Step 2]
3. [Step 3]
Impact Assessment
-----------------
| File | Changes |
|-------------------|------------------|
| src/module.py | Rename function |
| tests/test_mod.py | Update tests |
Executing Refactoring
---------------------
[✓] Step 1 complete
[✓] Step 2 complete
[✓] Step 3 complete
Post-Refactoring Verification
-----------------------------
[✓] All tests pass
[✓] No lint errors
[✓] Type checking passes
[✓] Functionality verified
Summary
-------
Files changed: X
Lines modified: X
Tests updated: X
Commit with: /mytoolkit:smart-commit