{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://h33.ai/submission/v0.1.0/scope-manifest-v1.schema.json",
  "title": "scope_manifest_v1",
  "description": "Regulatory Submission v0.1 scope manifest — signed document by which a firm binds itself to a specific (bundle, attestation, verifier) triple at a specific moment in time, naming a regulator and an inquiry reference. The scope manifest IS the firm's binding act; the surrounding regulatory_submission event is the firm's Twin record of that act. Eric LOCKED June 4 2026. Inherits Q0 (Never H33 bears risk) and Q0.5 (Always the regulator owns judgment) constitutional layer. Money quote: 'Submission ≠ Adjudication.'",
  "type": "object",
  "required": [
    "attestation",
    "bundle",
    "in_scope_ids",
    "non_claims",
    "recipient",
    "scope_manifest_format_version",
    "scope_manifest_id",
    "scope_window",
    "submitter",
    "transmittal_timestamp_ns",
    "verifier"
  ],
  "additionalProperties": false,
  "properties": {
    "attestation": {
      "type": "object",
      "required": ["attestation_hash", "attestation_id", "attestation_uri"],
      "additionalProperties": false,
      "properties": {
        "attestation_hash": { "type": "string", "pattern": "^[0-9a-f]{64}$", "description": "SHA3-256 of the TDA v1 attestation document, hex-encoded." },
        "attestation_id": { "type": "string", "description": "The TDA v1 attestation_id pinned in this submission." },
        "attestation_uri": { "type": "string", "description": "Canonical retrieval URI for the attestation. Firm-supplied. May be empty if the firm delivers the attestation alongside the submission." }
      }
    },
    "bundle": {
      "type": "object",
      "required": ["bundle_hash", "bundle_size_bytes", "bundle_uri"],
      "additionalProperties": false,
      "properties": {
        "bundle_hash": { "type": "string", "pattern": "^[0-9a-f]{64}$", "description": "SHA3-256 of the portability bundle tarball, hex-encoded." },
        "bundle_size_bytes": { "type": "integer", "minimum": 0, "description": "Bundle file size in bytes." },
        "bundle_uri": { "type": "string", "description": "Canonical retrieval URI for the bundle. Firm-supplied." }
      }
    },
    "in_scope_ids": {
      "type": "object",
      "required": ["authority_ids", "consequence_ids", "decision_ids", "finding_ids", "model_ids", "policy_ids"],
      "additionalProperties": false,
      "description": "IDs that the submission claims to cover. Every ID listed here MUST be structurally present in the named bundle (regulator-side check 5).",
      "properties": {
        "authority_ids": { "type": "array", "items": { "type": "string" }, "uniqueItems": true },
        "consequence_ids": { "type": "array", "items": { "type": "string" }, "uniqueItems": true },
        "decision_ids": { "type": "array", "items": { "type": "string" }, "uniqueItems": true },
        "finding_ids": { "type": "array", "items": { "type": "string" }, "uniqueItems": true },
        "model_ids": { "type": "array", "items": { "type": "string" }, "uniqueItems": true },
        "policy_ids": { "type": "array", "items": { "type": "string" }, "uniqueItems": true }
      }
    },
    "non_claims": {
      "type": "array",
      "items": { "type": "string" },
      "minItems": 1,
      "description": "Explicit list of things this scope manifest does NOT assert. Q0.5 enforcement at the document surface."
    },
    "recipient": {
      "type": "object",
      "required": ["inquiry_reference", "recipient_address_hint", "regulator_identifier"],
      "additionalProperties": false,
      "properties": {
        "inquiry_reference": { "type": "string", "description": "Docket number · citation · letter ID · audit cycle reference. Firm-supplied free-form string." },
        "recipient_address_hint": { "type": "string", "description": "Optional informational address (portal URL, email). Not used for verification." },
        "regulator_identifier": { "type": "string", "description": "Free-form regulator name. H33 maintains no canonical list." }
      }
    },
    "scope_manifest_format_version": {
      "type": "string",
      "const": "v1",
      "description": "Schema version. v0.1 ships v1 only."
    },
    "scope_manifest_id": {
      "type": "string",
      "pattern": "^sm-[0-9a-f]{32}$",
      "description": "Deterministically derived from SHA3-256(tenant_id | bundle_hash | attestation_hash | verifier_binary_hash | transmittal_timestamp_ns)[..16]. Identical inputs yield identical scope_manifest_id."
    },
    "scope_window": {
      "type": "object",
      "required": ["end_ns", "start_ns"],
      "additionalProperties": false,
      "properties": {
        "end_ns": { "type": "integer", "minimum": 0, "description": "Inclusive end of scope, ns since epoch." },
        "start_ns": { "type": "integer", "minimum": 0, "description": "Inclusive start of scope, ns since epoch. 0 = no lower bound." }
      }
    },
    "submitter": {
      "type": "object",
      "required": ["responsible_officer", "tenant_id"],
      "additionalProperties": false,
      "properties": {
        "responsible_officer": {
          "type": "object",
          "required": ["officer_name", "officer_office", "officer_pq_key_fingerprint", "officer_pq_public_keys"],
          "additionalProperties": false,
          "properties": {
            "officer_name": { "type": "string" },
            "officer_office": { "type": "string", "description": "e.g. 'Chief Risk Officer'" },
            "officer_pq_key_fingerprint": { "type": "string", "pattern": "^[0-9a-f]{64}$", "description": "SHA3-256(officer_pq_public_keys), hex-encoded. Regulator-side check 1 confirms internal consistency." },
            "officer_pq_public_keys": {
              "type": "object",
              "required": ["falcon_512_pk", "ml_dsa_65_pk", "slh_dsa_128f_pk"],
              "additionalProperties": false,
              "properties": {
                "falcon_512_pk": { "type": "string", "pattern": "^[0-9a-f]+$" },
                "ml_dsa_65_pk": { "type": "string", "pattern": "^[0-9a-f]+$" },
                "slh_dsa_128f_pk": { "type": "string", "pattern": "^[0-9a-f]+$" }
              }
            }
          }
        },
        "tenant_id": { "type": "string", "description": "The firm's H33 tenant identifier. Must match the attestation subject.tenant_id." }
      }
    },
    "transmittal_timestamp_ns": {
      "type": "integer",
      "minimum": 0,
      "description": "Wall-clock at which the firm transmits. ns since epoch."
    },
    "verifier": {
      "type": "object",
      "required": ["verifier_binary_hash", "verifier_release_uri", "verifier_version"],
      "additionalProperties": false,
      "properties": {
        "verifier_binary_hash": { "type": "string", "pattern": "^[0-9a-f]{64}$", "description": "SHA3-256 of the canonical-replay verifier binary, hex-encoded." },
        "verifier_release_uri": { "type": "string", "description": "Public release URI (defaults to https://h33.ai/verifier/v0.1.0/)." },
        "verifier_version": { "type": "string", "description": "e.g. 'v0.1.0'." }
      }
    }
  }
}
