Skip to main content

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:

  1. Tasks Complete - All tasks in tasks.md marked done
  2. Tests Pass - 60%+ test coverage
  3. 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):

  1. Clarity (18%)
  2. Testability (22%)
  3. Completeness (18%)
  4. Feasibility (13%)
  5. Maintainability (9%)
  6. Edge Cases (9%)
  7. 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 LevelScoreAction
CRITICAL≥9.0Immediate action required
HIGH6.0-8.9Address before release
MEDIUM3.0-5.9Monitor
LOW<3.0Acceptable

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
}
}
}