CLI and developer-facing interface for trood-ontop.
This repository defines the stable command-line surface for trood-ontop v0.1 and delegates all structural validation and rule evaluation to the canonical validator runtime.
This repository SHALL NOT implement rule logic.
Version: v0.1 (Phase 1 Surface Freeze)
The scope of v0.1 SHALL be limited to:
- Providing a stable CLI entrypoint
- Parsing command-line arguments
- Loading input JSON files
- Delegating execution to the validator runtime
- Formatting output deterministically
- Returning stable exit codes
The interface SHALL NOT implement:
- Business logic
- Rule evaluation
- Schema validation logic
- Structural interpretation
The following repositories are authoritative:
- trood-ontop-spec → Structural schema authority
- trood-ontop-validator → Deterministic rule execution engine
- trood-ontop → Golden conformance corpus
This repository acts strictly as a surface adapter.
The key words MUST, MUST NOT, SHALL, SHALL NOT, REQUIRED, SHOULD, and MAY are to be interpreted as described in RFC 2119.
A conforming implementation MUST:
- Load
graph.json. - Load
rules.json. - Invoke the validator runtime without altering inputs.
- Format output deterministically.
- Return stable exit codes as defined in this document.
The interface SHALL NOT reinterpret, filter, or transform rule semantics.
If validator behavior changes, the interface MUST reflect validator output faithfully and SHALL NOT introduce additional logic.
The CLI SHALL expose the following command:
ontop validate \
--graph graph.json \
--rules rules.json
Run locally:
node bin/ontop.js validate --graph graph.json --rules rules.json
No additional commands are defined in v0.1.
Exit codes SHALL be:
- 0 → No violations
- 1 → Violations detected
- 2 → Invalid input (malformed JSON or missing files)
- 3 → Internal runtime failure
Exit code semantics MUST remain stable within a MAJOR version.
Default output SHALL be JSON with the following structure:
{
"violations": [...]
}Constraints:
- Output ordering MUST be stable.
- Output structure MUST remain stable within a MAJOR version.
- The interface SHALL NOT alter violation structure returned by the validator.
Future flags MAY include:
--format table--format json--quiet
These flags are explicitly NOT implemented in v0.1 and SHALL NOT be partially implemented.
For identical inputs and identical validator behavior, the interface MUST produce:
- Identical output structure
- Identical ordering
- Identical exit codes
The interface SHALL NOT introduce nondeterminism via:
- Time-dependent formatting
- Random ordering
- Environment-dependent behavior
The following are explicitly out of scope:
- Rule evaluation
- Schema validation ownership
- Extensibility systems
- Plugin support
- Web server functionality
- Graphical user interfaces
This repository defines surface only.
Spec defines structure.
Validator defines rule execution.
Interface exposes surface.
The interface SHALL adapt.
It SHALL NOT reinterpret.