spec-check

Verifies specification-to-code alignment and produces gap reports with visual drift detection.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Specs drift away from actual code after implementation, leaving teams without traceability between requirements and behavior. This Skill audits a LiveSpec feature by comparing spec.md requirements (FR/AC) against @spec anchors in code, validating tree structure, spec quality gates, visual baselines, and Penflow contracts, then produces a dated gap report. ## Core Features & Use Cases - Spec vs Code Verification: Maps every FR/AC to @spec anchors and test files, classifying each as Verified, Partial, Missing, or Drifted. - Tree & Quality Gates: Validates .specs/ system files, feature naming, completeness, Gherkin/Mermaid quality gates, and README sync. - Visual Governance: Detects pixel drift against Playwright baselines, classifies baseline staleness (mockup hash, browser version), checks design fidelity and theme token compliance, and enforces Penflow contract certification. - Use Case: After implementing a notifications feature, run the check to confirm all six FRs have code evidence, catch a diverged dashboard baseline, and write .specs/features/004-notifications/checks/<date>-check.md. ## Quick Start Ask the AI to run /spec-check on your feature, for example: verify the 004-notifications feature against its spec and show me the gap report.

Frequently Asked Questions about spec-check

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

FAQPage Schema
How do I verify that my code matches its specification?

Run /spec-check with a feature name to compare spec.md requirements against @spec anchors in code. Each FR and AC is classified as Verified, Partial, Missing, or Drifted, and results are saved to a dated gap report under the feature's checks directory.

How to detect visual regression with Playwright baselines?

The check compares current screenshots against stored baselines with a zero-pixel tolerance threshold. A staleness gate first validates the baseline manifest, browser version, and mockup SHA-256 hash, skipping comparisons for stale baselines instead of failing.

What does the --pre-impl flag do in spec-check?

The --pre-impl flag runs a read-only cross-artifact analysis of spec.md and plan.md before any implementation. It renders a Specification Analysis Report with findings and exits 1 if any CRITICAL or HIGH finding exists, without writing checks, changelogs, or source files.

Why does spec-check report BLOCKED instead of running?

BLOCKED occurs when preconditions are unmet, such as an active goal already existing, the /goal slash command being unavailable, or required UI evidence like actual-ui-tree.json being missing. Restore the prerequisite and retry rather than bypassing the gate.

Can spec-check run without an implementation.md file?

Yes, it enters mapping recovery mode by scanning source files for @spec FR and AC anchors to build a temporary mapping. Inferred links are marked as approximate rather than verified, and updating implementation.md is recommended afterward.