Test Coverage Gate
Test coverage quality gate that establishes a clean baseline, measures statement, branch, function, and line coverage, analyzes gaps, and blocks release below explicit thresholds.
Use the test-coverage-gate skill to [describe your task].Install: npx skills add Reactive-Skills/skills --skill test-coverage-gate
- States
- 9
- Hierarchical nodes
- Initial State
- INTAKE
- Bootstrap entrypoint
- Allowed Tools
- 4
- Whitelisted for safety
- Deliverables
- 2
- Automated projections
Statechart (optional)
Visual state machine topology parsed directly from the official STATECHART.md in Reactive-Skills/skills:
States & Deterministic Guards
Each state is an isolated operational slice. Transitions occur only when typed signals satisfy programmatic guard conditions.
- INTAKEINITIALview_filerun_command
Collect target, test command, coverage command, and quality thresholds
Outgoing Transitions
- INTAKE_READYCONFIGUREguard:
event.payload.target_dir != null && event.payload.test_command != null && event.payload.coverage_command != null && event.payload.thresholds != null - INTAKE_INVALIDERRORguard:
event.payload.target_dir == null || event.payload.test_command == null || event.payload.coverage_command == null || event.payload.thresholds == null
- INTAKE_READYCONFIGUREguard:
- CONFIGURErun_commandview_file
Validate commands, threshold schema, and coverage report format
Outgoing Transitions
- CONFIGURATION_READYBASELINEguard:
event.payload.exit_code === 0 && event.payload.thresholds != null - CONFIGURATION_FAILEDERRORguard:
event.payload.exit_code !== 0 || event.payload.thresholds == null
- CONFIGURATION_READYBASELINEguard:
- BASELINErun_command
Run the unmodified test suite and require a clean baseline
Outgoing Transitions
- BASELINE_PASSEDMEASUREguard:
event.payload.exit_code === 0 - BASELINE_FAILEDERRORguard:
event.payload.exit_code !== 0
- BASELINE_PASSEDMEASUREguard:
- MEASURErun_commandview_file
Run coverage collection and parse the machine-readable report
Outgoing Transitions
- COVERAGE_MEASUREDANALYZEguard:
event.payload.coverage_report != null && event.payload.coverage_metrics != null - MEASUREMENT_FAILEDERRORguard:
event.payload.coverage_report == null || event.payload.coverage_metrics == null
- COVERAGE_MEASUREDANALYZEguard:
- ANALYZEview_filewrite_to_filegrep_search
Compare coverage metrics with thresholds and identify actionable gaps
Outgoing Transitions
- GAPS_ANALYZEDGATEguard:
event.payload.coverage_metrics != null && Array.isArray(event.payload.coverage_gaps) - ANALYSIS_FAILEDERRORguard:
event.payload.coverage_metrics == null || !Array.isArray(event.payload.coverage_gaps)
- GAPS_ANALYZEDGATEguard:
- GATEview_file
Human quality gate for threshold exceptions and release blocking
Outgoing Transitions
- USER_APPROVEDSUCCESSguard:
event.payload.approved === true - USER_REQUEST_REMEDIATIONMEASUREguard:
event.payload.remediation_requested === true - USER_REJECTEDBLOCKEDguard:
event.payload.rejected === true
- USER_APPROVEDSUCCESSguard:
- SUCCESSTERMINAL
Terminal state: coverage gate passed
- BLOCKEDTERMINAL
Terminal state: coverage gate blocked release
- ERRORTERMINAL
Terminal state: coverage workflow failed