gardes du contrat / conformite (pull_request) Successful in 18s
Un auditeur qui voit une confiance décrue ne peut pas la reproduire s'il ignore quelle fonction l'a produite, dans quelle version, à quelle date. Deux lectures divergentes du même verbatim se valent alors, sans qu'on puisse dire pourquoi : c'est l'opposabilité qui se fissure, non le fait. Champ 15 confidence_reading (§4.1), OPTIONNEL — présent seulement quand l'émetteur EXPOSE une valeur qu'il a dérivée ; ses quatre clés sont alors requises (policy, version, value, as_of). Le verbatim reste intact au champ 8. Règle de conformité au §9 : une valeur dérivée non déclarée n'est pas conforme. Additif et ignorable — un consommateur v1.0 le préserve et passe, comme §8 l'exige de tout champ inconnu. Relevé par une lecture extérieure du 2026-09-19 : « c'est une ligne du contrat, pas une ADR ». Elle avait raison sur les deux points. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
234 lines
5.9 KiB
JSON
234 lines
5.9 KiB
JSON
{
|
|
"$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.1",
|
|
"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"
|
|
],
|
|
"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). 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: <jurisdiction>/<local-id>. 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"
|
|
}
|
|
},
|
|
"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}$"
|
|
}
|
|
}
|
|
}
|
|
}
|