Quality Gate
A quality gate is a checkpoint in the SpecWeave workflow that validates work meets specific criteria before proceeding to the next phase.
SpecWeave Quality Gates
1. Pre-Implementation Gate (/specweave:qa --pre)
Validates specifications before starting implementation:
/specweave:qa 0001 --pre
Checks:
- ✅ Clarity - Requirements are clear and unambiguous
- ✅ Testability - Acceptance criteria are testable
- ✅ Completeness - All necessary sections present
- ✅ Feasibility - Technical approach is sound
2. Completion Gate (/specweave:done)
Validates work before closing an increment:
/specweave:done 0001
Three validation gates:
- Tasks Complete - All tasks in tasks.md marked done
- Tests Pass - 60%+ test coverage
- Docs Updated - Living docs synchronized
3. Quality Assessment Gate (/specweave:qa --gate)
Comprehensive quality check before release:
/specweave:qa 0001 --gate
7 Quality Dimensions (weighted scoring):
- Clarity (18%)
- Testability (22%)
- Completeness (18%)
- Feasibility (13%)
- Maintainability (9%)
- Edge Cases (9%)
- Risk Assessment (11%)
Gate Decisions:
- 🟢 PASS - Ready to proceed
- 🟡 CONCERNS - Should fix before release
- 🔴 FAIL - Must fix before proceeding
Risk Scoring
Quality gates include risk assessment using Probability × Impact method:
| Risk Level | Score | Action |
|---|---|---|
| CRITICAL | ≥9.0 | Immediate action required |
| HIGH | 6.0-8.9 | Address before release |
| MEDIUM | 3.0-5.9 | Monitor |
| LOW | <3.0 | Acceptable |
Example Output
$ /specweave:qa 0001 --gate
📊 Quality Assessment: 0001-user-authentication
📈 Overall Score: 85/100 (PASS)
Dimension Scores:
✅ Clarity: 90/100
✅ Testability: 88/100
✅ Completeness: 85/100
✅ Feasibility: 82/100
⚠️ Maintainability: 75/100
✅ Edge Cases: 80/100
✅ Risk Assessment: 78/100
🎯 Gate Decision: 🟢 PASS
📝 Recommendations:
- Consider extracting AuthService into smaller modules
- Add rate limiting tests for login endpoint
✅ Ready for release
Configuration
Quality gate thresholds in .specweave/config.json:
{
"validation": {
"quality_judge": {
"enabled": true,
"pass_threshold": 70,
"concerns_threshold": 50
}
}
}
Related
- Increments - What gates validate
- Acceptance Criteria - What gates check
- Test Coverage - Coverage requirements
- TDD - Test-first approach