SPAR ships with an AI-friendly CLI contract. The goal is not shell convenience first. The goal is predictable, machine-readable review behavior with safe defaults.
spar review
spar explain
spar discover
spar schema
spar exampleLegacy compatibility is still available through:
spar-context-reviewThat entry point maps to the older flat argument surface and remains for compatibility with existing automation.
- Default output is JSON
- Review execution and review explanation are separate commands
- Context is optional, but missing context becomes
CANNOT_CHECK, not silent inference publicLEDA payloads are not ingestible by SPAR- Review results persist only safe
context_summary, never raw MICA or LEDA payloads
Run a review and emit machine-readable JSON.
spar review \
--subject-json subject.json \
--source "flat minkowski" \
--gate PASS \
--project-root /path/to/project \
--leda-injection reports/leda_injection.yaml \
--output-json review.jsonImportant flags:
--subject-json: required subject payload--source: declared source or background--gate: declared gate status--report-text: inline report text--report-file: report text file--project-root: MICA auto-discovery root--mica-context: explicit MICA context path--leda-injection: optional LEDA injection YAML--leda-profile:internal,restricted,public(default:restricted)--adapter: current valuephysics--output-json: optional file sink
Summarize an existing review JSON.
spar explain --review-json review.json --format textFormats:
jsontext
Discover contextual runtime state for a project root.
spar discover --project-root /path/to/project --adapter physicsThis reports:
- adapter
- MICA runtime state
- supported LEDA profiles
- recommended LEDA profile
Emit schema guidance for subjects, results, or contextual inputs.
spar schema subject
spar schema result
spar schema context
spar schema subject --output-json subject-schema.jsonThese payloads come from packaged JSON schema artifacts under src/spar_framework/schemas/, not from ad hoc in-code dicts.
Emit example subject payloads.
spar example --source flat
spar example --source ads --output-json ads.json| Code | Meaning |
|---|---|
0 |
Review succeeded and verdict is acceptable for CLI success (ACCEPT, MINOR_REVISION) |
1 |
Review completed, but verdict is non-passing (MAJOR_REVISION, REJECT) |
2 |
Input or schema error |
3 |
System/runtime error |
- Default LEDA profile is
restricted publicLEDA payloads are not ingested into review logic- Raw evidence, file paths, DB paths, and detailed weakness surfaces are not persisted into result payloads
See SECURITY_MODEL.md for the full model.