test-coverage
Original:🇺🇸 English
Translated
Drive comprehensive test creation for a feature, spec, module, or PR. Decide what must be tested, pick the testing strategy at the lowest sufficient cost, drive the test producers to author the tests, run them, and record the session — what was tested, by what test type, and what passed — in specs/<feature>/test-spec.md and test-report.md. Drives the producers create-yaml-tests and create-agent-tests.
3installs
Sourceshiplightai/agent-skills
Added on
NPX Install
npx skill4agent add shiplightai/agent-skills test-coverageTags
Translated version includes tags in frontmatterSKILL.md Content
View Translation Comparison →Test Coverage
Test-creation workflow for one feature, spec, module, PR, or ticket at a time.
Use after a feature is implemented (or alongside it, or after a PR) to decide
what needs testing, choose the right testing strategy, drive the producers to
write comprehensive tests, run them, and record the result.
It produces human-readable Markdown (, ) and test
code via the producers. The report records facts — what was tested, by what test
type, and what passed — not a graded confidence verdict.
test-spec.mdtest-report.mdWhat This Skill Owns
- — the durable "testing what" contract: the behaviors, invariants, risks, and the declared priority of each.
specs/<feature>/test-spec.md - — the session record: what was tested, by what test type, what ran, and what passed, failed, or was blocked.
specs/<feature>/test-report.md - Repo-root (optional) — project testing-strategy notes (preferred modalities, gate/posture by priority, context labels). Standalone-safe: a baked-in default applies when absent.
TESTING.md
Two Layers
- Testing what — the behaviors, properties, requirements, and invariants that must be verified to trust the feature, each carrying a declared priority (P0–P3).
- Testing how — the evidence used to verify them: unit, contract, integration, e2e, agent, manual, telemetry, static, smoke, script.
Comprehensive testing is not test count. Optimize for justified confidence per
unit of cost (author + run + maintain), stability, latency, and diagnostic
value. Buy sufficient confidence at the lowest cost, spending the scarce
expensive-test budget (e2e, agent) where priority is highest.
Priority Is A Declared Fact
Each testing-what item carries a (P0–P3) read from an upstream dev
artifact — the PRD, the feature breakdown, or the spec — never invented here.
Priority is the effort lever: P0 gets the strongest posture, P3 the lightest.
Per-behavior priority defaults to the feature's declared P-level; record a finer
level in only when the spec or owner declares one. If nothing
upstream declares a priority, mark it and surface it for the owner
rather than guessing — a guessed priority is not a fact.
prioritytest-spec.mdUNKNOWNThere is no separate 1–5 risk weight. Priority is the single governed importance
signal.
Test Type Is A Fact, Recorded Here
When you create or identify a test, its type (, ,
, , , , , , ,
) is a fact about the artifact — the producer that makes it fixes the
type. Record the type per behavior in . Do not author a
strength label (, ) or a verdict — the
report records facts (priority, test type, run result), not a graded confidence
verdict.
unitcontractintegratione2eagentmanualtelemetrystaticsmokescripttest-report.mddepthreliabilityHIGH/MEDIUM/LOWTesting Strategy And Budget Policy
Resolve the strategy posture for each behavior, first match wins:
- A per-behavior note in (one-off tuning).
test-spec.md - Repo-root , if present (project-wide posture notes).
TESTING.md - The baked-in default in .
assets/default-testing-strategy.md
The default holds the modality economics, the decision principle, the three
guardrails (capability-before-cost; priority-floor / budget-ceiling;
defense-in-depth), and the non-negotiable floors (unit coverage on core/changed
logic; at least one gate on every P0 check). Standalone-safe: never require
; fall back to the baked-in default when absent.
TESTING.mdTESTING.mdTESTING.mdCapability Map — Which Modality Proves Which Check
Capability before cost: "cheapest" means cheapest among modalities that can
actually prove the check. A unit test cannot prove a real-browser flow.
- Deterministic pure logic → unit tests.
- Public boundaries, server actions, route handlers, authz, schema validation → contract tests.
- DB state, transactions, audit rows, migrations, jobs, cross-module invariants → integration tests.
- Browser-rendered behavior, routing, session/role-gated UI, rendered regressions → project-standard e2e, agent, or manual browser checks.
- Third-party callbacks, staging-only auth, production SLOs, live signals → agent tests, manual checks, or telemetry.
Specialized Test Authoring
This skill decides strategy and drives creation; it delegates the actual
authoring to the producer skills and project workflows, then records what was
made.
- : deterministic Shiplight YAML E2E tests (Playwright + agentic SDK).
create-yaml-tests - : coding-agent-driven Markdown cases for live-environment verification (browser, API, DB, logs, cloud, telemetry).
create-agent-tests - The project's own unit, contract, integration, browser, mobile, load, migration, or telemetry workflow for other kinds.
For code-tied tests (unit, contract, integration, api), author them inline or
drive the base coding agent toward deep, high-coverage tests on the
highest-priority gaps. Keep edits scoped to tests, fixtures, test scripts, and
the minimal support code needed for testability.
When an agent test produces a report, record its ///
status and auditable artifacts (HTML reports, screenshots, videos,
traces, logs) in . Text-only browser claims are not sufficient;
require an auditable artifact for browser-driven cases. Treat as an
orchestration interruption to rerun, not as product evidence.
PASSFAILBLOCKEDABORTEDtest-report.mdABORTEDWorkflow
1. Resolve Target And Inputs
- Identify the feature target (a slug; reuse an existing
NNN-kebab-caseslug when one exists).specs/NNN-* - Read the PRD / feature breakdown / spec for declared priorities.
- Read changed implementation and existing tests (use the branch merge base when available).
- Locate prior and
specs/<feature>/test-spec.mdif present.test-report.md
2. Define Or Refresh Testing What
Write from .
Capture product behaviors, system/API/schema/data invariants, risk-based
behaviors, operational/release behaviors, and stakeholder confidence goals.
Carry each behavior's declared as a fact. List out-of-scope behaviors
explicitly.
specs/<feature>/test-spec.mdassets/test-spec-template.mdpriority3. Resolve Strategy And Inventory Existing Evidence
Resolve each behavior's posture via the policy chain. Inventory what already
exists (unit, contract, integration, e2e, agent, manual, telemetry, static, CI)
and which behaviors it covers.
4. Analyze Gaps And Select Proofs
Size each gap as required posture minus existing evidence. Choose the cheapest
modality capable of closing it. Spend the expensive-test budget on the
highest-priority gaps; consider confidence gained, flake risk, runtime, fixture
complexity, cleanup, diagnostic value, and maintenance. For P0 behaviors,
consider defense-in-depth (stacked layers) over a single cheapest proof.
5. Drive Creation
Drive the producers (or author code-tied tests inline) to close worthwhile gaps,
honoring the non-negotiable floors regardless of budget. Add tests only when
they materially raise confidence; do not add brittle tests to inflate count.
When budget forces a behavior to stop short of its ideal proof, record the
chosen allocation and the knowingly accepted gap — never under-test silently.
6. Run Verification
Run targeted checks first, then broader suites when justified: new/changed
tests, relevant existing tests, typecheck/lint/build, migration checks, and
agent checks required by the spec. Record exact commands and outcomes. If a
capability is missing, mark it or ; never claim it
passed.
BLOCKEDNOT MEASURED7. Write Or Update Test Report
Write from .
Record commands run, tests added/updated, and the coverage matrix — one row per
behavior with its priority, the test type written for it, and the
session result. Put blocking findings first. Do not author a confidence verdict
or any strength label.
specs/<feature>/test-report.mdassets/test-report-template.mdArtifact Skeletons
| Artifact | Template |
|---|---|
| |
| |
repo-root | |
Status vocabularies (test type, result status, coverage status) live in
.
references/vocabularies.mdOperating Rules
- May edit tests, test fixtures, test scripts, ,
specs/<feature>/test-spec.md, and repo-rootspecs/<feature>/test-report.md(only with user confirmation, since posture changes affect every feature).TESTING.md - Never author ,
depth, a 1–5 risk weight, or areliabilityconfidence verdict. Record facts (priority, test type, run result) only.HIGH/MEDIUM/LOW - Avoid unrelated refactors and unrelated production-code changes.
- Never include secrets, cookies, tokens, database URLs, or private customer data in specs, reports, logs, or artifacts.
- Never report pass/fail without command output or an auditable artifact.
- Stay standalone-safe: never require ; fall back to the baked-in default when absent.
TESTING.md
When Not To Use
- When the user wants project orchestration, a PRD, or a feature breakdown: that is project-level work outside this skill's scope.
- When the user only wants a code review with no test creation: use .
review - When implementation does not exist and the user only wants planning.