ontoref/ontology/constraints/invariant_requires_axiom.ncl
Jesús Pérez 0396e4037b
Some checks failed
Nickel Type Check / Nickel Type Checking (push) Has been cancelled
Rust CI / Security Audit (push) Has been cancelled
Rust CI / Check + Test + Lint (nightly) (push) Has been cancelled
Rust CI / Check + Test + Lint (stable) (push) Has been cancelled
chore: add ontology and reflection
2026-03-13 00:21:04 +00:00

13 lines
424 B
XML

# InvariantRequiresAxiom: nodes with invariant=true must have level='Axiom.
# Apply as a post-schema constraint on individual Node records.
std.contract.custom (
fun label =>
fun value =>
if value.invariant && value.level != 'Axiom then
'Error {
message = "Node '%{value.id}': invariant=true requires level='Axiom (got '%{std.string.from value.level})"
}
else
'Ok value
)