Skip to main content
validate is the primary command. Run it before every component edit and in CI. It checks a spec directory against all 14 rules and tells you, rule by rule, what passes and what does not.

Usage

Options

Output examples

Passing spec

A passing spec prints one line per directory. Counts show how many tokens, interaction states, and semantic parts were checked.

Spec with warnings

Warnings do not cause a non-zero exit code. They do block AI-Ready promotion — a component with active warnings cannot have all checks: set to true.

Failing spec

Each error includes the rule name, a plain-English description, and the specific value that triggered it. Look the rule name up in the contract rules reference for a fix.

JSON output (for CI)

Use --json whenever another tool needs to consume the results programmatically.

Exit codes

CI integration

Add validate as a step in your CI workflow. Use --json and parse the output if you want fine-grained reporting, or rely on the exit code for a simple pass/fail gate:
A non-zero exit code fails the step and blocks the merge. This keeps broken specs out of main.

The 14 rules

validate checks four categories of rules. See the contract rules reference for the full list and fix instructions.