validate
Validate the structure and syntax of changes and specifications.
openspec validate [item-name] [options]
Description
Checks files against the OpenSpec Zod schemas. It verifies:
- Presence of required sections (
Purpose,Requirements,Why,What Changes). - Correct formatting of Requirements (
### Requirement:) and Scenarios (#### Scenario:). - Validity of Delta blocks (
ADDED,MODIFIED, etc.).
Options
--all: Validate all changes and specs.--changes: Validate all active changes.--specs: Validate all specs.--strict: Fail on warnings (e.g., descriptions that are too short).--json: Output a detailed JSON validation report.--concurrency <n>: Set parallel validation limit (default: 6).
Output
If validation fails, the CLI provides actionable remediation steps, including specific file paths and examples of correct formatting.