# 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 )