# Define Coverage Goals Prompt (v1)
## π― Goal
Establish realistic and meaningful test coverage targets based on project needs and constraints.
## π₯ Context (ask if missing)
1. **Coverage Analysis** β current coverage state, gap analysis results
2. **Code Structure** β module criticality, business logic distribution
3. **Team Standards** β existing testing guidelines, quality gates
4. **Project Requirements** β compliance needs, quality standards, timeline
## π¦ Skip if
- Coverage goals already defined and documented or project has strict predefined coverage requirements
## π Checklist
- **Target Definition**
- [ ] Set overall coverage percentage goal (realistic but meaningful)
- [ ] Define module-specific targets based on criticality
- [ ] Establish minimum thresholds for critical business logic
- [ ] Set timeline for achieving coverage goals
- **Quality Standards**
- [ ] Define test quality requirements (not just quantity)
- [ ] Establish standards for test categories (unit vs integration)
- [ ] Set expectations for edge case coverage
- [ ] Define mocking and isolation standards
- **Measurement Criteria**
- [ ] Choose coverage metrics (line, branch, function, statement)
- [ ] Define what counts toward coverage goals
- [ ] Establish reporting and monitoring frequency
- [ ] Set up automated coverage tracking
- **Resource Planning**
- [ ] Estimate effort required for target achievement
- [ ] Identify team members and skills needed
- [ ] Plan integration with development workflow
- [ ] Consider maintenance overhead
## π€ Output
**File:** `docs/planning/coverage-goals.md`
Sections:
1. **Coverage Targets** β overall %, by module, by priority
2. **Quality Standards** β test requirements, best practices
3. **Measurement Framework** β metrics, tools, reporting
4. **Implementation Plan** β phases, timeline, resources
5. **Success Criteria** β definition of done, validation methods
6. **Risk Assessment** β challenges, mitigation strategies
## π― Recommended Targets
- **Critical Business Logic**: 90-95% coverage
- **Core Application Logic**: 80-85% coverage
- **Utility Functions**: 70-80% coverage
- **Configuration/Setup**: 50-70% coverage
- **Overall Project Goal**: 75-85% (realistic for most projects)
## βοΈ Balancing Factors
- **Quality over Quantity**: Meaningful tests vs coverage percentage
- **ROI Consideration**: Focus on high-value, high-risk areas first
- **Maintenance Cost**: Balance coverage with test maintainability
- **Team Capacity**: Realistic goals based on available resources
## β‘οΈ Response Flow
Assess current state β Set targets β Define standards β Plan implementation β Document goals