| name | coverage-gate-author |
| description | Test coverage gate (testing → done) — run the project's test suite + measure coverage on the files touched by the current task (per the `git diff` since the task's `implementing` status was set). Emits a coverage-gate@1 artefact: raw terminal output of the coverage tool, per-file coverage %, list of files below 90 %, list of edge-case-matrix rows without a corresponding test. Used by `chief-technology-officer/ship-tasks` during the `testing` phase to gate the `testing → done` transition (per `modules/skill/contracts/task/STATUS-REFERENCE.md` §1.1). Use when user asks to "draft a coverage gate" or "create the coverage gate". Do NOT use for "audit existing coverage gate" (use coverage-gate-audit instead). Do NOT use for spec correctness — that is `task-audit`'s job, run during the `draft → ready_to_implement` transition; the two gates are deliberately separated so spec correctness can be verified before any implementation work begins. |
| license | Apache-2.0 |
| metadata | {"version":"1.0.0","module":"skill","stage":"e","cyberos-template":"coverage-gate@1","cyberos-rubric-target":"coverage_gate_rubric@1.0"} |
| allowed_memory_scopes | {"read":["project:*","module:*"],"write":["project:task/{task_id}/coverage-gate"]} |
| audit | {"row_kind":"coverage_gate_authored","required_fields":["task_id","files_touched","files_below_90pct","total_tests_run","tests_failed","ecm_rows_uncovered"]} |
| inputs | [{"name":"task","format":"task@1","required":true},{"name":"edge_case_matrix","format":"edge-case-matrix@1","required":true}] |
| outputs | [{"name":"report","format":"coverage-gate@1"}] |
| triggers | ["workflow `chief-technology-officer/ship-tasks` testing phase (step 23 — first author call; step 24 audit)"] |
| blockers | ["no coverage tool configured in repo — must be resolved first","test framework is broken — diagnose before running this skill"] |
| untrusted_inputs | {"wrap_in_marker":"untrusted_content","injection_scan":"required","on_marker_hit":"surface_to_human"} |
coverage-gate-author
1. What it does
- Reads the task's
building status timestamp from BACKLOG.md.
git diff --name-only <building_ts>..HEAD → the touched-files set.
- Picks the right coverage tool per language (rust:
cargo tarpaulin or cargo llvm-cov; python: pytest --cov; node: vitest --coverage).
- Runs the full test suite.
- Reports per-file coverage for every file in the touched set.
- Cross-references the edge-case matrix: every row's
planned_test must exist + must have passed.
type: bug only — runs the regression proof (§4). Reads type from the task's frontmatter; skips entirely for any other type.
2. Output schema
task_id: task-<MODULE>-<NNN>
generated_at: <ISO-8601>
language: rust | python | typescript | mixed
tool: tarpaulin | llvm-cov | pytest-cov | vitest | ...
total_tests_run: <int>
tests_failed: <int>
overall_coverage_pct: <float>
files_touched:
- { path: "...", coverage_pct: 92.3, lines_covered: , }
[]
[, , ]