{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://law.arxo.io/schema/change-dossier.schema.json",
  "title": "Arxo normative change dossier 0.1",
  "description": "Verifiable dossier of a normative change for the Arxo Change Protocol. Assembled from producer artifacts named by a change set; nothing is executed by the builder. dossierCore is deterministic and dossierCoreHash is the sha256 of its canonical bytes; receipt sits outside the hash. Sections in order: composition (1), differences (3), goals (4), population (6), transition (7), dependents (8), states (9), open (10), guarantees (11). Intent classification (2) is carried inside differences. A dossier proves only what is formalized: the formalization measure and the world boundary are printed in every dossier, and a draft is never presented as law.",
  "$comment": "DECISION-0364; NORMATIVE-CHANGE-PLAN §6; SPEC §208; SPEC §33.1",
  "type": "object",
  "additionalProperties": false,
  "required": ["schemaVersion", "changeSetId", "changeSetHash", "dossierCore", "dossierCoreHash", "receipt"],
  "properties": {
    "schemaVersion": {
      "const": "law.change-dossier/0.1"
    },
    "changeSetId": {
      "type": "string",
      "minLength": 1
    },
    "changeSetHash": {
      "description": "sha256 of the canonical bytes of the change-set document.",
      "$comment": "SPEC §208",
      "$ref": "#/$defs/Digest"
    },
    "dossierCore": {
      "$ref": "#/$defs/DossierCore"
    },
    "dossierCoreHash": {
      "$ref": "#/$defs/Digest"
    },
    "receipt": {
      "$ref": "#/$defs/Receipt"
    }
  },
  "$defs": {
    "Digest": {
      "type": "string",
      "pattern": "^sha256:[0-9a-f]{64}$"
    },
    "Date": {
      "type": "string",
      "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$"
    },
    "Count": {
      "type": "integer",
      "minimum": 0
    },
    "LegalStatus": {
      "enum": ["draft", "adopted", "in-force", "superseded"]
    },
    "Measure": {
      "description": "Formalization measure of an act: articles by level.",
      "$comment": "SPEC §33.1",
      "type": "object",
      "additionalProperties": false,
      "required": ["articles", "executable", "interpreted", "anchored", "sourceOnly", "excluded"],
      "properties": {
        "articles": {
          "$ref": "#/$defs/Count"
        },
        "executable": {
          "$ref": "#/$defs/Count"
        },
        "interpreted": {
          "$ref": "#/$defs/Count"
        },
        "anchored": {
          "$ref": "#/$defs/Count"
        },
        "sourceOnly": {
          "$ref": "#/$defs/Count"
        },
        "excluded": {
          "$ref": "#/$defs/Count"
        },
        "note": {
          "type": "string"
        }
      }
    },
    "MeasureSide": {
      "description": "Measure of one side, or an explicit statement why it was not taken.",
      "type": "object",
      "additionalProperties": false,
      "required": ["status"],
      "properties": {
        "status": {
          "enum": ["taken", "not-taken"]
        },
        "measure": {
          "$ref": "#/$defs/Measure"
        },
        "note": {
          "type": "string"
        }
      }
    },
    "PackageRef": {
      "type": "object",
      "additionalProperties": false,
      "required": ["name", "version"],
      "properties": {
        "name": {
          "type": "string",
          "minLength": 1
        },
        "version": {
          "type": "string",
          "minLength": 1
        },
        "contentHash": {
          "$ref": "#/$defs/Digest"
        }
      }
    },
    "SideSummary": {
      "type": "object",
      "additionalProperties": false,
      "required": ["kind", "label"],
      "properties": {
        "kind": {
          "enum": ["edition", "draft", "case-release"]
        },
        "label": {
          "type": "string",
          "minLength": 1
        },
        "edition": {
          "type": "string"
        },
        "programHash": {
          "$ref": "#/$defs/Digest"
        },
        "artifactHash": {
          "$ref": "#/$defs/Digest"
        },
        "draftUnits": {
          "$ref": "#/$defs/Count"
        },
        "sources": {
          "$ref": "#/$defs/Count"
        }
      }
    },
    "Composition": {
      "description": "Section 1: what is compared, how deep it is formalized, and where the world ends.",
      "type": "object",
      "additionalProperties": false,
      "required": ["kind", "legalStatus", "units", "measure", "world"],
      "properties": {
        "kind": {
          "enum": ["draft-amendment", "edition-change", "case-release"]
        },
        "legalStatus": {
          "$ref": "#/$defs/LegalStatus"
        },
        "jurisdiction": {
          "type": "string"
        },
        "units": {
          "type": "array",
          "minItems": 1,
          "items": {
            "type": "object",
            "additionalProperties": false,
            "required": ["subject", "before", "after"],
            "properties": {
              "subject": {
                "enum": ["package", "case"]
              },
              "package": {
                "type": "string"
              },
              "before": {
                "$ref": "#/$defs/SideSummary"
              },
              "after": {
                "$ref": "#/$defs/SideSummary"
              }
            }
          }
        },
        "measure": {
          "type": "object",
          "additionalProperties": false,
          "required": ["before", "after"],
          "properties": {
            "before": {
              "$ref": "#/$defs/MeasureSide"
            },
            "after": {
              "$ref": "#/$defs/MeasureSide"
            }
          }
        },
        "editions": {
          "description": "Edition axis of an edition-change: the projection date of each side and the lifecycle state of every edition of the root on that date.",
          "$comment": "impact-editions; DECISION-0193",
          "type": "object",
          "additionalProperties": false,
          "required": ["before", "after"],
          "properties": {
            "before": {
              "$ref": "#/$defs/EditionSide"
            },
            "after": {
              "$ref": "#/$defs/EditionSide"
            },
            "parameterCutovers": {
              "type": "array",
              "items": {
                "$ref": "#/$defs/Date"
              }
            }
          }
        },
        "world": {
          "type": "object",
          "additionalProperties": false,
          "required": ["closureSize", "closure", "boundary"],
          "properties": {
            "root": {
              "type": "string"
            },
            "closureSize": {
              "$ref": "#/$defs/Count"
            },
            "closure": {
              "type": "array",
              "items": {
                "$ref": "#/$defs/PackageRef"
              }
            },
            "resolutionHash": {
              "$ref": "#/$defs/Digest"
            },
            "boundary": {
              "type": "string",
              "minLength": 1
            }
          }
        }
      }
    },
    "EditionSide": {
      "type": "object",
      "additionalProperties": false,
      "required": ["legalTime", "states"],
      "properties": {
        "legalTime": {
          "$ref": "#/$defs/Date"
        },
        "states": {
          "type": "array",
          "items": {
            "type": "object",
            "additionalProperties": false,
            "required": ["edition", "state"],
            "properties": {
              "edition": {
                "type": "string",
                "minLength": 1
              },
              "state": {
                "type": "string",
                "minLength": 1
              },
              "since": {
                "$ref": "#/$defs/Date"
              }
            }
          }
        },
        "undatedNodes": {
          "$ref": "#/$defs/Count"
        }
      }
    },
    "SemdiffEntry": {
      "type": "object",
      "additionalProperties": false,
      "required": ["id", "kind", "classification"],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "kind": {
          "enum": ["added", "changed", "removed"]
        },
        "hashBefore": {
          "$ref": "#/$defs/Digest"
        },
        "hashAfter": {
          "$ref": "#/$defs/Digest"
        },
        "classification": {
          "$ref": "#/$defs/Classification"
        }
      }
    },
    "Classification": {
      "description": "expected: declared in intent and observed; outside-boundary: observed but not declared while an intent exists, or touching the protected scope; observed: observed by at least one scenario, no intent declared; unverified: touched by the diff and executed by no scenario on either side.",
      "enum": ["expected", "outside-boundary", "observed", "unverified"]
    },
    "ScenarioRow": {
      "type": "object",
      "additionalProperties": false,
      "required": ["name", "before", "after", "outcomeHashBefore", "outcomeHashAfter", "classification"],
      "properties": {
        "name": {
          "type": "string",
          "minLength": 1
        },
        "legalTime": {
          "type": "string"
        },
        "before": {
          "type": "string",
          "minLength": 1
        },
        "after": {
          "type": "string",
          "minLength": 1
        },
        "outcomeHashBefore": {
          "$ref": "#/$defs/Digest"
        },
        "outcomeHashAfter": {
          "$ref": "#/$defs/Digest"
        },
        "resultHashBefore": {
          "$ref": "#/$defs/Digest"
        },
        "resultHashAfter": {
          "$ref": "#/$defs/Digest"
        },
        "resultDeltas": {
          "type": "array",
          "items": {"$ref": "#/$defs/ResultDelta"}
        },
        "classification": {
          "$ref": "#/$defs/Classification"
        }
      }
    },
    "ResultDelta": {
      "type": "object",
      "additionalProperties": false,
      "required": ["id", "before", "after"],
      "properties": {
        "id": {"type": "string", "minLength": 1},
        "before": {"anyOf": [{"$ref": "#/$defs/ResultView"}, {"type": "null"}]},
        "after": {"anyOf": [{"$ref": "#/$defs/ResultView"}, {"type": "null"}]}
      }
    },
    "ResultView": {
      "type": "object",
      "additionalProperties": false,
      "required": ["kind", "value"],
      "properties": {
        "kind": {"enum": ["proposition", "position-count", "money", "number", "date", "boolean", "text", "value", "structured", "collection", "status"]},
        "value": {"type": "string"},
        "unit": {"type": "string", "minLength": 1},
        "sourceType": {"type": "string", "minLength": 1},
        "resultKind": {"type": "string", "minLength": 1},
        "statusFields": {"type": "object", "additionalProperties": {"type": "string"}}
      }
    },
    "Differences": {
      "description": "Section 3 with the intent classification of section 2.",
      "type": "object",
      "additionalProperties": false,
      "required": ["verdict", "semanticChange", "semdiff", "scenarios", "classification", "unobservedTouched", "uncovered"],
      "properties": {
        "verdict": {
          "type": "string",
          "minLength": 1
        },
        "semanticChange": {
          "type": "boolean"
        },
        "semdiff": {
          "type": "object",
          "additionalProperties": false,
          "required": ["added", "changed", "removed", "entries"],
          "properties": {
            "added": {
              "$ref": "#/$defs/Count"
            },
            "changed": {
              "$ref": "#/$defs/Count"
            },
            "removed": {
              "$ref": "#/$defs/Count"
            },
            "entries": {
              "type": "array",
              "items": {
                "$ref": "#/$defs/SemdiffEntry"
              }
            }
          }
        },
        "scenarios": {
          "type": "object",
          "additionalProperties": false,
          "required": ["total", "changed", "rejectedInput", "changedRows"],
          "properties": {
            "total": {
              "$ref": "#/$defs/Count"
            },
            "changed": {
              "$ref": "#/$defs/Count"
            },
            "rejectedInput": {
              "$ref": "#/$defs/Count"
            },
            "changedRows": {
              "type": "array",
              "items": {
                "$ref": "#/$defs/ScenarioRow"
              }
            }
          }
        },
        "classification": {
          "type": "object",
          "additionalProperties": false,
          "required": ["intentDeclared", "expected", "expectedMissing", "outsideBoundary", "observed", "unverified", "note"],
          "properties": {
            "intentDeclared": {
              "type": "boolean"
            },
            "expected": {
              "$ref": "#/$defs/Count"
            },
            "expectedMissing": {
              "description": "Declared expected changes that no scenario observed: the reform promised a change the model does not show.",
              "$ref": "#/$defs/Count"
            },
            "expectedMissingRows": {
              "type": "array",
              "items": {
                "type": "object",
                "additionalProperties": false,
                "required": ["scenario", "before", "after"],
                "properties": {
                  "scenario": {
                    "type": "string",
                    "minLength": 1
                  },
                  "before": {
                    "type": "string"
                  },
                  "after": {
                    "type": "string"
                  },
                  "observed": {
                    "description": "What was actually observed for that scenario (before -> after), when it ran.",
                    "type": "string"
                  }
                }
              }
            },
            "outsideBoundary": {
              "$ref": "#/$defs/Count"
            },
            "observed": {
              "$ref": "#/$defs/Count"
            },
            "unverified": {
              "$ref": "#/$defs/Count"
            },
            "note": {
              "type": "string",
              "minLength": 1
            }
          }
        },
        "unobservedTouched": {
          "description": "Norms touched by the diff that no scenario executed on either side: for them 'outcome unchanged' is absence of observation, not a finding.",
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 1
          }
        },
        "uncovered": {
          "type": "object",
          "additionalProperties": false,
          "required": ["rules", "normTemplates"],
          "properties": {
            "rules": {
              "$ref": "#/$defs/Count"
            },
            "normTemplates": {
              "$ref": "#/$defs/Count"
            }
          }
        }
      }
    },
    "GoalRow": {
      "type": "object",
      "additionalProperties": false,
      "required": ["goal", "before", "after", "basisAfter", "newlyFailingWorlds", "repairedWorlds", "counterexamplesAfter"],
      "properties": {
        "goal": {
          "type": "string",
          "minLength": 1
        },
        "before": {
          "type": "string",
          "minLength": 1
        },
        "after": {
          "type": "string",
          "minLength": 1
        },
        "basisAfter": {
          "type": "boolean"
        },
        "newlyFailingWorlds": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "repairedWorlds": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "counterexamplesAfter": {
          "$ref": "#/$defs/Count"
        }
      }
    },
    "Goals": {
      "description": "Section 4. Goals are formal properties over outcomes with a recorded basis; policy criteria and empirical hypotheses are not goals and never appear here.",
      "$comment": "SPEC §194; DECISION-0089",
      "type": "object",
      "additionalProperties": false,
      "required": ["status", "rows", "broken", "alreadyFailed"],
      "properties": {
        "status": {
          "enum": ["evaluated", "absent"]
        },
        "verdict": {
          "type": "string"
        },
        "worlds": {
          "$ref": "#/$defs/Count"
        },
        "rows": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/GoalRow"
          }
        },
        "broken": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "alreadyFailed": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "note": {
          "type": "string"
        }
      }
    },
    "Population": {
      "description": "Section 6. Statistics over a weighted bank is not a legal answer in any case.",
      "$comment": "DECISION-0255; invariant 5",
      "type": "object",
      "additionalProperties": false,
      "required": ["status", "note"],
      "properties": {
        "status": {
          "enum": ["present", "absent"]
        },
        "reportCoreHash": {
          "$ref": "#/$defs/Digest"
        },
        "verdict": {
          "type": "string"
        },
        "note": {
          "type": "string",
          "minLength": 1
        }
      }
    },
    "Transition": {
      "description": "Section 7: the commencement regime as read, with its reading decision and status.",
      "type": "object",
      "additionalProperties": false,
      "required": ["status"],
      "properties": {
        "status": {
          "enum": ["declared", "absent"]
        },
        "general": {
          "$ref": "#/$defs/Date"
        },
        "exceptions": {
          "type": "array",
          "items": {
            "type": "object",
            "additionalProperties": false,
            "required": ["address", "effectiveFrom"],
            "properties": {
              "address": {
                "type": "string"
              },
              "effectiveFrom": {
                "$ref": "#/$defs/Date"
              }
            }
          }
        },
        "readingDecision": {
          "type": "string"
        },
        "boundaryScenarios": {
          "description": "Scenarios whose legal time lies on either side of a commencement date, by name.",
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "ConsumerRerun": {
      "type": "object",
      "additionalProperties": false,
      "required": ["package", "from", "to", "verdict", "scenarios", "changed", "changedRows"],
      "properties": {
        "package": {
          "type": "string",
          "minLength": 1
        },
        "label": {
          "type": "string"
        },
        "from": {
          "$ref": "#/$defs/Date"
        },
        "to": {
          "$ref": "#/$defs/Date"
        },
        "verdict": {
          "type": "string"
        },
        "scenarios": {
          "$ref": "#/$defs/Count"
        },
        "changed": {
          "$ref": "#/$defs/Count"
        },
        "rootEditions": {
          "type": "object",
          "additionalProperties": false,
          "required": ["before", "after"],
          "properties": {
            "before": {
              "$ref": "#/$defs/EditionSide"
            },
            "after": {
              "$ref": "#/$defs/EditionSide"
            }
          }
        },
        "changedRows": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ScenarioRow"
          }
        },
        "calendarSnapshotInjected": {
          "type": "string"
        },
        "concat": {
          "description": "Packages added beyond the import closure for this rerun (replay as the family runs).",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "health": {
          "$ref": "#/$defs/BankHealth"
        },
        "note": {
          "type": "string"
        }
      }
    },
    "BankHealth": {
      "description": "Health of the scenario bank on both sides: healthy — results present and no blocking issue; vacuous — no result; blocked — a blocking issue (AMBIGUOUS_CALENDAR, EDITION_NOT_APPLICABLE, rejected input); error — the run failed. 'No change' is evidence only where both sides are healthy.",
      "$comment": "criterion E6 (source label: Э6)",
      "type": "object",
      "additionalProperties": false,
      "required": ["scenarios", "healthyBothSides", "vacuousBothSides", "before", "after", "issues"],
      "properties": {
        "scenarios": {
          "$ref": "#/$defs/Count"
        },
        "healthyBothSides": {
          "$ref": "#/$defs/Count"
        },
        "vacuousBothSides": {
          "$ref": "#/$defs/Count"
        },
        "before": {
          "$ref": "#/$defs/HealthTally"
        },
        "after": {
          "$ref": "#/$defs/HealthTally"
        },
        "issues": {
          "type": "object",
          "additionalProperties": {
            "$ref": "#/$defs/Count"
          }
        }
      }
    },
    "HealthTally": {
      "type": "object",
      "additionalProperties": false,
      "required": ["healthy", "vacuous", "blocked", "error"],
      "properties": {
        "healthy": {
          "$ref": "#/$defs/Count"
        },
        "vacuous": {
          "$ref": "#/$defs/Count"
        },
        "blocked": {
          "$ref": "#/$defs/Count"
        },
        "error": {
          "$ref": "#/$defs/Count"
        }
      }
    },
    "InstitutionalDependency": {
      "type": "object",
      "additionalProperties": false,
      "required": ["id", "kind", "name", "provenance", "inWorld"],
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "kind": {
          "enum": ["act", "parameter", "database", "registry", "authority", "form", "methodology", "other"]
        },
        "name": {
          "type": "string",
          "minLength": 1
        },
        "provenance": {
          "description": "formal: an import or bridge in the lock; reviewed: named by the text and confirmed by a reviewer; inferred: found by search, not confirmed. Only formal dependencies enter any verdict.",
          "enum": ["formal", "reviewed", "inferred"]
        },
        "basis": {
          "type": "string"
        },
        "inWorld": {
          "type": "boolean"
        }
      }
    },
    "Dependents": {
      "description": "Section 8: packages of the corpus that import the changed package, whether they were re-run against the AFTER state, and the institutional dependencies wider than import with their provenance class.",
      "type": "object",
      "additionalProperties": false,
      "required": ["consumers", "rerun"],
      "properties": {
        "consumers": {
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 1
          }
        },
        "rerun": {
          "enum": ["performed", "not-performed", "not-applicable"]
        },
        "reruns": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ConsumerRerun"
          }
        },
        "institutional": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/InstitutionalDependency"
          }
        },
        "institutionalByProvenance": {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "formal": {
              "$ref": "#/$defs/Count"
            },
            "reviewed": {
              "$ref": "#/$defs/Count"
            },
            "inferred": {
              "$ref": "#/$defs/Count"
            }
          }
        },
        "note": {
          "type": "string"
        }
      }
    },
    "CompositionLegResult": {
      "type": "object",
      "additionalProperties": false,
      "required": ["label", "from", "to", "scenarios", "changed", "verdict"],
      "properties": {
        "label": {
          "type": "string"
        },
        "from": {
          "$ref": "#/$defs/Date"
        },
        "to": {
          "$ref": "#/$defs/Date"
        },
        "scenarios": {
          "$ref": "#/$defs/Count"
        },
        "changed": {
          "$ref": "#/$defs/Count"
        },
        "verdict": {
          "type": "string"
        },
        "changedScenarios": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "CompositionResult": {
      "description": "Composition of successive changes: transient — changed in some step but not end-to-end (a change that appears and is reverted, visible only stepwise); onlyEndToEnd — changed end-to-end but in no single step (an interaction of steps); inEveryStep — changed in every step.",
      "$comment": "NORMATIVE-CHANGE-PLAN N3",
      "type": "object",
      "additionalProperties": false,
      "required": ["steps", "endToEnd", "transient", "onlyEndToEnd", "inEveryStep", "note"],
      "properties": {
        "steps": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/CompositionLegResult"
          }
        },
        "endToEnd": {
          "$ref": "#/$defs/CompositionLegResult"
        },
        "transient": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "onlyEndToEnd": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "inEveryStep": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "note": {
          "type": "string",
          "minLength": 1
        }
      }
    },
    "CoverageResult": {
      "description": "Coverage of the finite product of declared axes by the scenario bank (profile read from the bank). A statement about the bank, not a legal answer.",
      "$comment": "DECISION-0179",
      "type": "object",
      "additionalProperties": false,
      "required": ["axes", "cells", "covered", "coveredCells", "note"],
      "properties": {
        "axes": {
          "type": "array",
          "items": {
            "type": "object",
            "additionalProperties": false,
            "required": ["name", "values"],
            "properties": {
              "name": {
                "type": "string"
              },
              "values": {
                "$ref": "#/$defs/Count"
              }
            }
          }
        },
        "cells": {
          "$ref": "#/$defs/Count"
        },
        "covered": {
          "$ref": "#/$defs/Count"
        },
        "coveredCells": {
          "type": "array",
          "items": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "scenariosWithoutAxis": {
          "$ref": "#/$defs/Count"
        },
        "note": {
          "type": "string",
          "minLength": 1
        }
      }
    },
    "States": {
      "description": "Section 9: three independent states and the gap between them. 'The act is in force, the model is incomplete' is a regular row, not an error.",
      "type": "object",
      "additionalProperties": false,
      "required": ["legal", "formalization", "operational", "gap"],
      "properties": {
        "legal": {
          "type": "object",
          "additionalProperties": false,
          "required": ["status"],
          "properties": {
            "status": {
              "$ref": "#/$defs/LegalStatus"
            },
            "sourceCard": {
              "type": "object",
              "additionalProperties": false,
              "properties": {
                "url": {
                  "type": "string"
                },
                "cardId": {
                  "type": "integer"
                },
                "version": {
                  "type": "integer"
                },
                "publicStatus": {
                  "type": "string"
                },
                "publicDiscussionUntil": {
                  "$ref": "#/$defs/Date"
                }
              }
            },
            "note": {
              "type": "string"
            }
          }
        },
        "formalization": {
          "type": "object",
          "additionalProperties": false,
          "required": ["differential"],
          "properties": {
            "differential": {
              "type": "object",
              "additionalProperties": false,
              "required": ["status", "compared", "identical", "mismatches"],
              "properties": {
                "status": {
                  "enum": ["byte-identical", "diverged", "absent"]
                },
                "compared": {
                  "$ref": "#/$defs/Count"
                },
                "identical": {
                  "$ref": "#/$defs/Count"
                },
                "mismatches": {
                  "$ref": "#/$defs/Count"
                },
                "logSha256": {
                  "$ref": "#/$defs/Digest"
                }
              }
            },
            "scenarios": {
              "type": "object",
              "additionalProperties": false,
              "required": ["passed", "total"],
              "properties": {
                "passed": {
                  "$ref": "#/$defs/Count"
                },
                "total": {
                  "$ref": "#/$defs/Count"
                }
              }
            },
            "baseRegression": {
              "type": "object",
              "additionalProperties": false,
              "required": ["before", "after"],
              "properties": {
                "before": {
                  "type": "string"
                },
                "after": {
                  "type": "string"
                }
              }
            },
            "progress": {
              "type": "object",
              "additionalProperties": false,
              "properties": {
                "totalUnits": {
                  "$ref": "#/$defs/Count"
                },
                "modeled": {
                  "$ref": "#/$defs/Count"
                },
                "closedByVerdict": {
                  "$ref": "#/$defs/Count"
                },
                "notModeled": {
                  "$ref": "#/$defs/Count"
                }
              }
            },
            "note": {
              "type": "string"
            }
          }
        },
        "operational": {
          "type": "object",
          "additionalProperties": false,
          "required": ["status", "note"],
          "properties": {
            "status": {
              "enum": ["not-tracked", "tracked"]
            },
            "channels": {
              "description": "Delivery channels of the changed package and what each one computes with: shipped hashes against the current CLIR.",
              "$comment": "NORMATIVE-CHANGE-PLAN N6",
              "type": "array",
              "items": {
                "$ref": "#/$defs/ChannelState"
              }
            },
            "stale": {
              "$ref": "#/$defs/Count"
            },
            "note": {
              "type": "string",
              "minLength": 1
            }
          }
        },
        "gap": {
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 1
          }
        }
      }
    },
    "ChannelState": {
      "type": "object",
      "additionalProperties": false,
      "required": ["channel", "status"],
      "properties": {
        "channel": {
          "type": "string",
          "minLength": 1
        },
        "artifact": {
          "type": "string"
        },
        "shippedArtifactHash": {
          "$ref": "#/$defs/Digest"
        },
        "shippedSemanticHash": {
          "$ref": "#/$defs/Digest"
        },
        "shippedSchemaVersion": {
          "type": "string"
        },
        "status": {
          "enum": ["current", "stale", "unknown"]
        },
        "formDrift": {
          "description": "The shipped document has another IR form (schemaVersion) than the current one: hashes differ even when norms do not.",
          "type": "boolean"
        },
        "observedOn": {
          "$ref": "#/$defs/Date"
        },
        "note": {
          "type": "string"
        }
      }
    },
    "ComputationEntry": {
      "type": "object",
      "additionalProperties": false,
      "required": ["path", "kind", "status"],
      "properties": {
        "path": {
          "type": "string",
          "minLength": 1
        },
        "kind": {
          "enum": ["evaluation", "clir"]
        },
        "at": {
          "type": "string"
        },
        "programHash": {
          "$ref": "#/$defs/Digest"
        },
        "artifactHash": {
          "$ref": "#/$defs/Digest"
        },
        "status": {
          "enum": ["current", "stale"]
        }
      }
    },
    "Computations": {
      "description": "Index of stored computations that name the changed package: a list to review when the model changes, never a rewrite of their legal fate.",
      "$comment": "NORMATIVE-CHANGE-PLAN N7",
      "type": "object",
      "additionalProperties": false,
      "required": ["scanned", "entries", "stale", "current", "note"],
      "properties": {
        "roots": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "scanned": {
          "$ref": "#/$defs/Count"
        },
        "entries": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ComputationEntry"
          }
        },
        "stale": {
          "$ref": "#/$defs/Count"
        },
        "current": {
          "$ref": "#/$defs/Count"
        },
        "note": {
          "type": "string",
          "minLength": 1
        }
      }
    },
    "ImplementationTask": {
      "type": "object",
      "additionalProperties": false,
      "required": ["addressee", "kind", "what", "basis", "evidence"],
      "properties": {
        "addressee": {
          "type": "string",
          "minLength": 1
        },
        "kind": {
          "enum": ["republish", "repin", "recompute", "supply-fact", "review", "other"]
        },
        "what": {
          "type": "string",
          "minLength": 1
        },
        "basis": {
          "type": "string",
          "minLength": 1
        },
        "evidence": {
          "description": "Readiness evidence: none until the addressee attests; the dossier never assumes readiness.",
          "enum": ["none", "attested", "verified"]
        }
      }
    },
    "Implementation": {
      "description": "Section 12: tasks derived from the dossier for those who must implement the change, with readiness evidence.",
      "$comment": "NORMATIVE-CHANGE-PLAN N6",
      "type": "object",
      "additionalProperties": false,
      "required": ["tasks", "note"],
      "properties": {
        "tasks": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ImplementationTask"
          }
        },
        "note": {
          "type": "string",
          "minLength": 1
        }
      }
    },
    "ReadingDivergence": {
      "type": "object",
      "additionalProperties": false,
      "required": ["scenario", "adopted", "alternative"],
      "properties": {
        "scenario": {
          "type": "string",
          "minLength": 1
        },
        "legalTime": {
          "type": "string"
        },
        "adopted": {
          "type": "string"
        },
        "alternative": {
          "type": "string"
        }
      }
    },
    "ObjectionResult": {
      "type": "object",
      "additionalProperties": false,
      "required": ["id", "scenario", "class", "claim", "status", "history"],
      "properties": {
        "id": {
          "type": "string"
        },
        "scenario": {
          "type": "string"
        },
        "class": {
          "enum": ["expert", "approved-criterion", "binding-decision"]
        },
        "claim": {
          "type": "string"
        },
        "source": {
          "type": "string"
        },
        "filedOn": {
          "$ref": "#/$defs/Date"
        },
        "underAdopted": {
          "description": "Outcome of the objection scenario under the adopted reading.",
          "type": "string"
        },
        "underAlternative": {
          "type": "string"
        },
        "status": {
          "enum": ["open", "accepted", "rejected", "superseded"]
        },
        "history": {
          "type": "array",
          "items": {
            "type": "object",
            "additionalProperties": false,
            "required": ["on", "event", "note"],
            "properties": {
              "on": {
                "$ref": "#/$defs/Date"
              },
              "event": {
                "type": "string"
              },
              "note": {
                "type": "string"
              }
            }
          }
        }
      }
    },
    "Adversarial": {
      "description": "Section 5: competing readings compared by scenario classes and objections with a class and a recorded history. Entering the bank gives a scenario no legal force.",
      "$comment": "NORMATIVE-CHANGE-PLAN N9, N8",
      "type": "object",
      "additionalProperties": false,
      "required": ["note"],
      "properties": {
        "readings": {
          "type": "object",
          "additionalProperties": false,
          "required": ["adopted", "alternative", "scenarios", "divergent", "rows"],
          "properties": {
            "adopted": {
              "type": "string"
            },
            "alternative": {
              "type": "string"
            },
            "basis": {
              "type": "string"
            },
            "scenarios": {
              "$ref": "#/$defs/Count"
            },
            "divergent": {
              "$ref": "#/$defs/Count"
            },
            "rows": {
              "type": "array",
              "items": {
                "$ref": "#/$defs/ReadingDivergence"
              }
            },
            "byLegalTime": {
              "description": "Divergent scenarios grouped by the month of their legal time: the classes of cases on which the readings part.",
              "type": "object",
              "additionalProperties": {
                "$ref": "#/$defs/Count"
              }
            }
          }
        },
        "objections": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ObjectionResult"
          }
        },
        "note": {
          "type": "string",
          "minLength": 1
        }
      }
    },
    "Open": {
      "description": "Section 10: what the dossier leaves open.",
      "type": "object",
      "additionalProperties": false,
      "required": ["unresolvedFindings", "openQuestions", "limitations", "externalGaps"],
      "properties": {
        "unresolvedFindings": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "openQuestions": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "limitations": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "externalGaps": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "Guarantee": {
      "type": "object",
      "additionalProperties": false,
      "required": ["kind", "status", "evidence", "notCovered"],
      "properties": {
        "kind": {
          "enum": ["source-correspondence", "semantics-execution", "proofs", "trials"]
        },
        "status": {
          "enum": ["covered", "partial", "absent"]
        },
        "evidence": {
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 1
          }
        },
        "notCovered": {
          "type": "string",
          "minLength": 1
        }
      }
    },
    "DossierCore": {
      "type": "object",
      "additionalProperties": false,
      "required": ["title", "composition", "differences", "goals", "population", "transition", "dependents", "states", "open", "guarantees"],
      "properties": {
        "title": {
          "type": "object",
          "minProperties": 1,
          "propertyNames": {
            "pattern": "^[a-z]{2}(-[A-Z]{2})?$"
          },
          "additionalProperties": {
            "type": "string",
            "minLength": 1
          }
        },
        "composition": {
          "$ref": "#/$defs/Composition"
        },
        "differences": {
          "$ref": "#/$defs/Differences"
        },
        "goals": {
          "$ref": "#/$defs/Goals"
        },
        "population": {
          "$ref": "#/$defs/Population"
        },
        "transition": {
          "$ref": "#/$defs/Transition"
        },
        "dependents": {
          "$ref": "#/$defs/Dependents"
        },
        "chain": {
          "$ref": "#/$defs/CompositionResult"
        },
        "coverage": {
          "$ref": "#/$defs/CoverageResult"
        },
        "computations": {
          "$ref": "#/$defs/Computations"
        },
        "adversarial": {
          "$ref": "#/$defs/Adversarial"
        },
        "implementation": {
          "$ref": "#/$defs/Implementation"
        },
        "states": {
          "$ref": "#/$defs/States"
        },
        "open": {
          "$ref": "#/$defs/Open"
        },
        "guarantees": {
          "description": "Section 11: four guarantees printed separately, each with what it does not cover.",
          "type": "array",
          "minItems": 4,
          "maxItems": 4,
          "items": {
            "$ref": "#/$defs/Guarantee"
          }
        }
      }
    },
    "Receipt": {
      "description": "Outside the core hash: who assembled the dossier from which bytes, and whether the producers were re-executed.",
      "type": "object",
      "additionalProperties": false,
      "required": ["generator", "inputs", "reproduction"],
      "properties": {
        "generator": {
          "type": "string",
          "minLength": 1
        },
        "generatorVersion": {
          "type": "string"
        },
        "inputs": {
          "type": "array",
          "items": {
            "type": "object",
            "additionalProperties": false,
            "required": ["path", "sha256"],
            "properties": {
              "path": {
                "type": "string",
                "minLength": 1
              },
              "sha256": {
                "$ref": "#/$defs/Digest"
              }
            }
          }
        },
        "repository": {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "commit": {
              "type": "string"
            },
            "note": {
              "type": "string"
            }
          }
        },
        "reproduction": {
          "type": "object",
          "additionalProperties": false,
          "required": ["status", "note"],
          "properties": {
            "status": {
              "enum": ["reproduced", "not-attempted", "failed"]
            },
            "binary": {
              "type": "string"
            },
            "note": {
              "type": "string",
              "minLength": 1
            }
          }
        }
      }
    }
  }
}
