{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://prismagram.com/published-language/envelope/1.0/assertion.schema.json", "title": "Assertion Envelope v1.2", "description": "Producer contract for envelope v1.1 messages (SPEC.md §4). One cross-field rule cannot be expressed here and is enforced by the conformance runner: `jurisdiction` MUST equal the prefix of `id`.", "type": "object", "required": [ "envelope", "id", "class", "subject", "statement", "evidence", "provenance", "confidence", "endorsement", "jurisdiction", "at", "lifecycle", "relations", "deadline", "falsification" ], "properties": { "envelope": { "enum": [ "0.1", "1.0", "1.1", "1.2" ], "description": "Version of the contract. v1.0 is substantively identical to v0.1 (SPEC §8): both values validate. v1.1 adds the optional declared reading (§4.1); v1.2 adds the relation kind `confirms` (§4.2). A message that does not declare its version is not versioned (A1 §3)." }, "id": { "type": "string", "pattern": "^[a-z][a-z0-9]{2,31}/[A-Za-z0-9][A-Za-z0-9._-]{0,127}$", "description": "Prefixed identity: /. Never rewritten in transit." }, "class": { "enum": [ "invariant", "step_realized", "transition", "traversal", "stressor", "decision", "constraint", "measure", "conflict", "hypothesis" ] }, "subject": { "type": "string", "minLength": 1 }, "statement": { "type": "string" }, "evidence": { "type": "array", "items": { "type": "object", "required": [ "kind", "ref" ], "properties": { "kind": { "type": "string", "minLength": 1 }, "ref": { "type": "string", "minLength": 1 } }, "additionalProperties": false } }, "provenance": { "type": "string", "pattern": "^(human|inferred|measured|imported|agent:[A-Za-z0-9][A-Za-z0-9._-]*)$", "description": "Axes never mix: inferred is a provenance, never a class." }, "confidence": { "type": "number", "minimum": 0, "maximum": 1, "description": "Transported verbatim. Decay and thresholds are consumer-local readings." }, "endorsement": { "oneOf": [ { "type": "null" }, { "type": "object", "required": [ "by", "at", "rite" ], "properties": { "by": { "type": "string", "minLength": 1 }, "at": { "type": "string", "format": "date-time" }, "rite": { "enum": [ "pr_approval", "ui", "batch" ] } }, "additionalProperties": false } ], "description": "null means no human endorsed this — a fact, not a defect." }, "jurisdiction": { "type": "string", "pattern": "^[a-z][a-z0-9]{2,31}$" }, "at": { "type": "string", "format": "date-time" }, "lifecycle": { "enum": [ "proposed", "endorsed", "superseded", "rejected", "under_revision" ], "description": "What the origin declares about its own assertion. Not an approval: the proven event lives in `endorsement` (ADR-070 §3.2)." }, "relations": { "type": "object", "properties": { "amends": { "$ref": "#/$defs/idList" }, "supersedes": { "$ref": "#/$defs/idList" }, "depends_on": { "$ref": "#/$defs/idList" }, "satellite_of": { "$ref": "#/$defs/idList" }, "confirms": { "$ref": "#/$defs/idList", "description": "v1.2, §4.2. Carried by a `measure` of provenance `measured` only: the ids it examined. The measure points at what it confirms; the confirmed assertion is never edited to point back." } }, "additionalProperties": false }, "deadline": { "oneOf": [ { "type": "null" }, { "type": "string", "format": "date-time" } ] }, "falsification": { "oneOf": [ { "type": "null" }, { "type": "string", "minLength": 1 } ] }, "confidence_reading": { "type": "object", "description": "OPTIONAL (SPEC §4.1, v1.1). Present only when the sender exposes a value it derived from `confidence`. A derived value shown without this object is not conformant: nobody could reproduce it.", "required": [ "policy", "version", "value", "as_of" ], "additionalProperties": false, "properties": { "policy": { "type": "string", "minLength": 1, "description": "Name of the reading applied — not the value it produced." }, "version": { "type": "string", "minLength": 1, "description": "Version of that reading. Two auditors on two dates must be able to tell whether they read alike." }, "value": { "type": "number", "minimum": 0, "maximum": 1, "description": "The derived value. The verbatim one stays in `confidence`, untouched." }, "as_of": { "type": "string", "format": "date-time", "description": "When the reading was taken. A decay without a date is not reproducible." } } } }, "patternProperties": { "^x_[a-z][a-z0-9]{2,31}_[a-z0-9_]+$": { "description": "Jurisdiction extension (SPEC.md §7). Preserved on relay, may be ignored." } }, "additionalProperties": false, "$defs": { "idList": { "type": "array", "items": { "type": "string", "pattern": "^[a-z][a-z0-9]{2,31}/[A-Za-z0-9][A-Za-z0-9._-]{0,127}$" } } } }