What problem does it solve?
spec-validate prevents invalid or incomplete component specs from triggering unreliable code generation, so teams avoid rework caused by malformed inputs.
Core Features & Use Cases
- Schema validation: Ensures the spec frontmatter matches
.specs/_schema.json via Ajv and fails fast on structural issues.
- Body completeness checks: Verifies mandatory tables (Props, Events, Slots, Sub-components, Tokens) are present and not placeholder-only.
- Design token integrity: Confirms every referenced "Token (DESIGN.md)" entry resolves to an allowed token definition in
.claude/docs/DESIGN.md.
- Constraints enforcement: Requires the "## Constraints — DO NOT" block and checks it contains the canonical template bullets verbatim.
- Deterministic approval workflow: Computes a checksum for draft specs and flips status from
draft to approved only when all checks pass.
Quick Start
Validate a component spec named button by having the orchestrator run /component-create button, which will execute spec-validate at Step 1.