The workspec command validates documents and runs WorkSpec projects from a terminal or automation system.
Command workflow
| Goal | Command | Result |
|---|---|---|
| Check a document or project | workspec validate |
Problems and optional run metadata |
| Inspect resolved state | workspec snapshot |
One snapshot from an authoritative run |
| Check domain rules | workspec constraints |
Constraint violations and Problems |
| Create an SVG | workspec render |
Standalone SVG or a JSON envelope |
| Reformat JSON | workspec format |
Two-space JSON with a final newline |
| Migrate historical input | workspec migrate |
A WorkSpec 2.1 document |
The CLI uses the package validator and runtime. It does not define a separate language or execution model.
Common workflow
- Run
workspec validate start.workspec.json --yesto check the project. - Use a source option only to override or exclude a discovered project source.
- Run
workspec snapshotto inspect state at a specified time. - Run
workspec constraintsto evaluate domain rules against the same run. - Run
workspec renderto present the resolved state as SVG.
Use --json output in scripts. See the command and option index for exact command syntax.