Skip to content

Validation Matrix (v0.1)

The RIGOR Validation Matrix defines the normative rules that a specification must satisfy to be considered protocol-compliant. It transforms validation from an implementation detail into a core pillar of the standard.

1. Validation Levels

RIGOR defines two distinct operational modes for the validator:

1.1 Standard Mode (rigor validate)

Focuses on structural correctness and referential integrity. It ensures the specification is technically usable by an engine but does not guarantee all protocol invariants.

1.2 Strict Mode (rigor validate --strict)

Certifies formal protocol compliance. It enforces all semantic rules, protocol invariants, and evolution safety requirements.


2. Conformance Definition

  • Structurally Valid: A specification that returns exit code 0 in Standard Mode.
  • Protocol-Compliant: A specification that returns exit code 0 in Strict Mode.

Only Strict Mode provides the formal guarantee that a system adheres to the RIGOR standard.


3. The Matrix

Rules are categorized as:

  • S1: Structural
  • S2: Referential
  • S3: Semantic
  • S4: Protocol Invariants
  • S5: Evolution & Versioning
  • S6: Best Practices
IDCategoryRuleStandardStrict
V1S1Valid YAML syntaxERRORERROR
V2S1Required root fields presentERRORERROR
V3S1Field types match schemaERRORERROR
V4S1No unknown root-level fieldsERRORERROR
V5S2initial_state existsERRORERROR
V6S2Transition target existsERRORERROR
V7S2Referenced event declaredERRORERROR
V8S2event_id uniqueERRORERROR
V9S2state_id uniqueERRORERROR
V10S3Terminal state has no outgoing transitionsERRORERROR
V11S3No duplicate transitions (state, event)ERRORERROR
V12S3Guards syntactically validERRORERROR
V13S3Guards reference only allowed scope (context, payload)WARNINGERROR
V14S4No unreachable statesWARNINGERROR
V15S4At least one terminal state existsERRORERROR
V16S4At least one terminating path exists from initialWARNINGERROR
V17S4No infinite cycles without an exit pathWARNINGERROR
V18S5rigor_spec_version supportedERRORERROR
V19S5spec_version valid SemVerERRORERROR
V20S5No deprecated fields usedWARNINGERROR
V21S6Canonical section orderingWARNINGWARNING
V22S6Naming conventions respected (snake_case)WARNINGWARNING

4. Severity and Escalation

4.1 ERROR

  • The specification is invalid.
  • Exit code must be 1.
  • Artifact generation is prohibited.

4.2 WARNING

  • In Standard Mode: Information only; spec remains valid.
  • In Strict Mode: Rules in categories S3, S4, and S5 escalate to ERROR. S6 rules remain as warnings.

5. Algorithmic Expectations

Compliant validators MUST implement the following logic:

  • Reachability (V14): Graph traversal from initial_state to identify orphaned nodes.
  • Cycle Detection (V17): Identification of strongly connected components without an exit transition.
  • Determinism: The validation process must be pure, idempotent, and independent of external state.

6. Matrix Versioning

The Validation Matrix is versioned alongside the protocol core. This document describes Matrix v0.1, compatible with RIGOR Core v0.1.

AI Constraint Protocol