mirror of
https://github.com/catlog22/Claude-Code-Workflow.git
synced 2026-02-09 02:24:11 +08:00
主要变更: - 模板重命名:采用优先级前缀(01-通用, 02-专用, 03-领域特定) - 目录调整:bug-diagnosis从development移至analysis - 引用更新:5个命令文件中21处模板引用更新为新路径 - 路径统一:所有引用统一使用完整路径格式 模板变更详情: - analysis/:8个模板(01-trace-code-execution, 01-diagnose-bug-root-cause等) - development/:5个模板(02-implement-feature, 02-refactor-codebase等) - planning/:5个模板(01-plan-architecture-design, 02-breakdown-task-steps等) - memory/:1个模板(02-document-module-structure) 命令文件更新: - cli/mode/bug-diagnosis.md(6处引用) - cli/mode/code-analysis.md(6处引用) - cli/mode/plan.md(6处引用) - task/execute.md(1处引用) - workflow/tools/test-task-generate.md(2处引用) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
56 lines
2.0 KiB
Plaintext
56 lines
2.0 KiB
Plaintext
Refactor existing code to improve quality, performance, or maintainability.
|
|
|
|
## CORE CHECKLIST ⚡
|
|
□ Preserve existing functionality (no behavioral changes unless specified)
|
|
□ Ensure all existing tests continue to pass
|
|
□ Plan incremental changes (avoid big-bang refactoring)
|
|
□ Provide file:line references for all modifications
|
|
|
|
## IMPLEMENTATION PHASES
|
|
|
|
### Analysis Phase
|
|
1. Identify code smells and technical debt
|
|
2. Analyze performance bottlenecks and inefficiencies
|
|
3. Review code complexity and maintainability metrics
|
|
4. Study existing test coverage and identify gaps
|
|
|
|
### Planning Phase
|
|
1. Create refactoring strategy preserving existing functionality
|
|
2. Identify breaking changes and migration paths
|
|
3. Plan incremental refactoring steps
|
|
4. Consider backward compatibility requirements
|
|
|
|
### Refactoring Phase
|
|
1. Apply SOLID principles and design patterns
|
|
2. Improve code readability and documentation
|
|
3. Optimize performance while maintaining functionality
|
|
4. Reduce code duplication and improve reusability
|
|
|
|
### Validation Phase
|
|
1. Ensure all existing tests continue to pass
|
|
2. Add new tests for improved code coverage
|
|
3. Verify performance improvements with benchmarks
|
|
4. Test edge cases and error scenarios
|
|
|
|
### Migration Phase
|
|
1. Update dependent code to use refactored interfaces
|
|
2. Update documentation and usage examples
|
|
3. Provide migration guides for breaking changes
|
|
4. Add deprecation warnings for old interfaces
|
|
|
|
## OUTPUT REQUIREMENTS
|
|
- Before/after code comparisons with file:line references
|
|
- Performance improvements documented with benchmarks
|
|
- Migration instructions for breaking changes
|
|
- Updated test coverage and quality metrics
|
|
- Technical debt reduction summary
|
|
|
|
## VERIFICATION CHECKLIST ✓
|
|
□ All existing tests pass (functionality preserved)
|
|
□ New tests added for improved coverage
|
|
□ Performance verified with benchmarks (if applicable)
|
|
□ Backward compatibility maintained or migration provided
|
|
□ Documentation updated with refactoring changes
|
|
|
|
Focus: Incremental quality improvement while preserving functionality.
|