spec-test

Audits test coverage, generates missing tests from Gherkin scenarios, and executes test suites with visual gates.

Updated Mar 11, 2026
One-click install
npx skills add https://github.com/julien-m/livespec --skill spec-test-julien-m
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: spec-test
Source: https://github.com/julien-m/livespec/tree/main/.agent-sync/skills/spec-test
Command: npx skills add https://github.com/julien-m/livespec --skill spec-test-julien-m

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? After implementation, teams often lack visibility into which acceptance criteria actually have tests, which Gherkin scenarios were never automated, and whether visual baselines exist for UI screens. This Skill closes that gap by auditing AC coverage, generating missing tests, executing the full suite, and producing a traceable test report. ## Core Features & Use Cases - Coverage Audit: Builds a matrix mapping every acceptance criterion in spec.md to existing tests, classifying each as covered, partial, missing, or lacking Gherkin, including behavioral trait and visual baseline audits. - Test Generation: Translates Gherkin scenarios into framework-matching test code (Vitest, Jest, Playwright, pytest, Go, Rust) with syntax-only validation, overwrite protection, and deduplication against TDD-created tests. - Suite Execution & Visual Gates: Runs resolved lint, type, unit, integration, and E2E commands, captures Playwright visual baselines, enforces design alignment and Penflow contract verdicts, and writes a dated report to the feature's checks directory. - Use Case: After implementing a notifications feature, run the command to discover that 2 of 5 ACs have no tests, auto-generate them from the spec's Gherkin blocks, execute the suite, and receive a coverage report with pass/fail per AC. ## Quick Start Ask the AI to run /spec-test for your feature name to audit coverage, generate missing tests, and execute the full suite.

Frequently Asked Questions about spec-test

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I audit test coverage against acceptance criteria?

Run /spec-test with a feature name to build a coverage matrix comparing every AC in spec.md against existing tests. Each AC is classified as covered, partial, missing, or lacking Gherkin, and results are saved to a dated report in the feature's checks directory.

How to generate tests automatically from Gherkin scenarios?

The Skill parses Gherkin blocks from spec.md and maps Given steps to setup, When steps to actions, and Then steps to assertions. It detects your framework (Vitest, Jest, Playwright, pytest, Go, Rust), matches existing test patterns, and appends new tests without overwriting existing files.

Does spec-test work with Playwright visual regression testing?

Yes, for UI features with a Screens section it audits Playwright baselines, generates toHaveScreenshot assertions, and captures missing baselines. Visual gate verdicts of PASS, FAIL, or BLOCKED are enforced before the run completes.

What is the difference between spec-test and spec-check?

spec-test audits AC coverage, generates missing tests, and executes the full suite, while spec-check performs static alignment verification of @spec anchors and FR-to-code mapping. spec-test catches ACs with no tests at all and skipped visual baselines.

Why does spec-test report blocked instead of running tests?

Execution is blocked when preflight checks fail, such as a missing .specs directory, no spec.md with acceptance criteria, or no resolved test commands in plan.md or testing strategy. Run /spec-plan first to resolve test commands, then retry.

Can I run a coverage audit without generating or executing tests?

Yes, use the --audit-only flag to run only the coverage matrix phases without generation or execution. The --no-generate flag executes existing tests while skipping generation of missing ones.