mirror of
https://github.com/catlog22/Claude-Code-Workflow.git
synced 2026-02-05 01:50:27 +08:00
重构 ccw cli 模板系统: - 新增 template-discovery.ts 模块,支持扁平化模板自动发现 - 添加 --rule <template> 选项,自动加载 protocol 和 template - 模板目录从嵌套结构 (prompts/category/file.txt) 迁移到扁平结构 (prompts/category-function.txt) - 更新所有 agent/command 文件,使用 $PROTO $TMPL 环境变量替代 $(cat ...) 模式 - 支持模糊匹配:--rule 02-review-architecture 可匹配 analysis-review-architecture.txt 其他更新: - Dashboard: 添加 Claude Manager 和 Issue Manager 页面 - Codex-lens: 增强 chain_search 和 clustering 模块 Co-Authored-By: Claude Opus 4.5 <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.
|