mirror of
https://github.com/Fission-AI/OpenSpec.git
synced 2026-09-14 20:16:53 +08:00
46c927af06
Following the principle that explicit is better than implicit, replace all occurrences of `-j` with `--json` for clarity.
1.4 KiB
1.4 KiB
ADDED Requirements
Requirement: Spec Command
The system SHALL provide a spec command with subcommands for displaying, listing, and validating specifications.
Scenario: Show spec as JSON
- WHEN executing
openspec spec show init --json - THEN parse the markdown spec file
- AND extract headings and content hierarchically
- AND output valid JSON to stdout
Scenario: List all specs
- WHEN executing
openspec spec list - THEN scan the openspec/specs directory
- AND return list of all available capabilities
- AND support JSON output with
--jsonflag
Scenario: Filter spec content
- WHEN executing
openspec spec show init --requirements - THEN display only requirement names and SHALL statements
- AND exclude scenario content
Scenario: Validate spec structure
- WHEN executing
openspec spec validate init - THEN parse the spec file
- AND validate against Zod schema
- AND report any structural issues
Requirement: JSON Schema Definition
The system SHALL define Zod schemas that accurately represent the spec structure for runtime validation.
Scenario: Schema validation
- WHEN parsing a spec into JSON
- THEN validate the structure using Zod schemas
- AND ensure all required fields are present
- AND provide clear error messages for validation failures