Part of #17. Design: [`docs/design.md`](https://github.com/DarkCollective/relix-cli/blob/develop/docs/design.md) §3, §4. ## Scope Each view of a script is a command that writes one thing to stdout. | Command | stdout | API it uses | |---|---|---| | `check` | nothing; diagnostics on stderr; `--json` for one document on stdout. Exit 0 or 3. | `validate` | | `explain` | the physical plan (`--json`) | `explain`, `explainJson` | | `optimize` | the rewritten Relix text, so it works as a filter (`relix optimize q.relix > fast.relix`); `--report` for the rules fired and the before/after trees | `optimized().render()`, `rewrites()`, `OptimizationReport` | | `trace` | the event feed (rows discarded) | `stream(listener)` | | `bundle` | the playground JSON bundle, still produced for a broken script | `QueryBundleJson` | | `ir` | the IR report | `model().ir()` | | `provenance` | annotated rows; `--semiring`, `--weight` | `provenance(semiring[, weight])` | `run --trace[=FILE]` writes the event feed to stderr, or to FILE, *while* the rows go to stdout. ## Dependencies - S1 (#4), S2 (#6). ## Acceptance - Every command end-to-end over the example scripts, including a script with several queries and one that does not analyse. - `find … | xargs relix check` exit behaviour. - `run --trace` produces rows on stdout and events on stderr in one run.
Activity
Add the report commands: check, explain, optimize, trace, bundle, ir,…
github-actions commentedon Oct 8, 2026
Done in #36, merged to develop (872e5dd).
Add the report commands: check, explain, optimize, trace, bundle, ir,…