mirror of
https://github.com/catlog22/Claude-Code-Workflow.git
synced 2026-02-11 02:33:51 +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>
71 lines
2.2 KiB
Plaintext
71 lines
2.2 KiB
Plaintext
Create comprehensive tests for the codebase.
|
|
|
|
## Planning Required
|
|
Before creating tests, you MUST:
|
|
1. Analyze existing test coverage and identify gaps
|
|
2. Study testing frameworks and conventions used
|
|
3. Plan test strategy covering unit, integration, and e2e
|
|
4. Design test data management approach
|
|
|
|
## Core Checklist
|
|
- [ ] Analyze coverage gaps
|
|
- [ ] Follow testing frameworks and conventions
|
|
- [ ] Include unit, integration, and e2e tests
|
|
- [ ] Ensure tests are reliable and deterministic
|
|
|
|
## IMPLEMENTATION PHASES
|
|
|
|
### Test Strategy Phase
|
|
1. Analyze existing test coverage and identify gaps
|
|
2. Study codebase architecture and critical paths
|
|
3. Identify edge cases and error scenarios
|
|
4. Review testing frameworks and conventions used
|
|
|
|
### Unit Testing Phase
|
|
1. Write tests for individual functions and methods
|
|
2. Test all branches and conditional logic
|
|
3. Cover edge cases and boundary conditions
|
|
4. Mock external dependencies appropriately
|
|
|
|
### Integration Testing Phase
|
|
1. Test interactions between components and modules
|
|
2. Verify API endpoints and data flow
|
|
3. Test database operations and transactions
|
|
4. Validate external service integrations
|
|
|
|
### End-to-End Testing Phase
|
|
1. Test complete user workflows and scenarios
|
|
2. Verify critical business logic and processes
|
|
3. Test error handling and recovery mechanisms
|
|
4. Validate performance under load
|
|
|
|
### Quality Assurance
|
|
1. Ensure tests are reliable and deterministic
|
|
2. Make tests readable and maintainable
|
|
3. Add proper test documentation and comments
|
|
4. Follow testing best practices and conventions
|
|
|
|
### Test Data Management
|
|
1. Create realistic test data and fixtures
|
|
2. Ensure test isolation and cleanup
|
|
3. Use factories or builders for complex objects
|
|
4. Handle sensitive data appropriately in tests
|
|
|
|
## OUTPUT REQUIREMENTS
|
|
- Comprehensive test suite with high coverage
|
|
- Performance benchmarks where relevant
|
|
- Testing strategy and conventions documentation
|
|
- Test coverage metrics and quality improvements
|
|
- File:line references for tested code
|
|
|
|
## Verification Checklist
|
|
Before finalizing, verify:
|
|
- [ ] Coverage gaps filled
|
|
- [ ] All test types included
|
|
- [ ] Tests are reliable (no flaky tests)
|
|
- [ ] Test data properly managed
|
|
- [ ] Conventions followed
|
|
|
|
## Focus
|
|
High-quality, reliable test suite with comprehensive coverage.
|