A systematic approach to large-scale project refactoring
Suggestions for efficient use of Emigo in larger codebases:
- Sub-module processing: Add @module_a/ step-by-step by functional module to avoid loading too many files at once
- Architectural Aids: Get a general idea by "mapping module dependencies in @src/".
- change control: Require AI to generate specific diffs instead of writing them directly, use emigo-show-diff preview to modify the
- version anchoring: Mark refactoring nodes with git tags for easy rollbacks.
- collaborative verification: AI can be prompted for critical changes and generate test cases at the same time.
Scenario-specific tips: For cross-file changes, use a compound command such as "将@old.py的XX类迁移到@new.py and update all references in @test/". It is recommended to use Emacs' projectile plugin to navigate through multiple files to keep the refactoring process manageable.
This answer comes from the articleEmigo: an assistant for complex programming tasks using AI in EmacsThe































