{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "AGLA_W_AT_PROFILE_DATASET.schema.json",
  "title": "AGLA Stack W A/T profile dataset",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "$schema",
    "schema",
    "version",
    "status",
    "runtime_posture",
    "authority_effect",
    "regime",
    "official_title",
    "profile_kind",
    "execution_claim",
    "execution_base",
    "decision_record",
    "term_matrix",
    "readiness",
    "source_registry",
    "provider_bindings",
    "projection_contracts",
    "carrier_axes",
    "profile_policy",
    "records"
  ],
  "properties": {
    "$schema": {
      "const": "./schemas/W_AT_PROFILE_DATASET.schema.json"
    },
    "schema": {
      "const": "AGLA_W_AT_PROFILE_DATASET_v0.1.0"
    },
    "version": {
      "const": "0.1.0"
    },
    "status": {
      "const": "READY_CANDIDATE_ONLY_NON_RUNTIME_UNREGISTERED"
    },
    "runtime_posture": {
      "const": "CANDIDATE_NON_RUNTIME"
    },
    "authority_effect": {
      "const": "NONE"
    },
    "regime": {
      "const": "W"
    },
    "official_title": {
      "const": "REGIMEN W — HABITUS MORALES / MORAL HABITS"
    },
    "profile_kind": {
      "const": "SYNTHETIC_INTERFACE_REFERENCE"
    },
    "execution_claim": {
      "const": "NO_UPSTREAM_OPERA_EXECUTED"
    },
    "execution_base": {
      "const": "9c6caff4255637f949c2bf11242be00205f49f04"
    },
    "decision_record": {
      "const": "W_HUMAN_BINDING_RECORD.json"
    },
    "term_matrix": {
      "const": "SUCCESSORS/LIBER_X_W_TERM_MATRIX_v0.2.0.json"
    },
    "readiness": {
      "$ref": "#/$defs/readiness"
    },
    "source_registry": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "AB_LAT",
        "AB_PT",
        "AGU_EN",
        "W_RECEIVED_SUBSTRATE",
        "W_HUMAN_BINDINGS"
      ],
      "properties": {
        "AB_LAT": {
          "$ref": "#/$defs/sourceRegistryEntry"
        },
        "AB_PT": {
          "$ref": "#/$defs/sourceRegistryEntry"
        },
        "AGU_EN": {
          "$ref": "#/$defs/sourceRegistryEntry"
        },
        "W_RECEIVED_SUBSTRATE": {
          "$ref": "#/$defs/sourceRegistryEntry"
        },
        "W_HUMAN_BINDINGS": {
          "$ref": "#/$defs/sourceRegistryEntry"
        }
      }
    },
    "provider_bindings": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "A",
        "T"
      ],
      "properties": {
        "A": {
          "$ref": "#/$defs/providerBinding"
        },
        "T": {
          "$ref": "#/$defs/providerBinding"
        }
      }
    },
    "projection_contracts": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "a",
        "t"
      ],
      "properties": {
        "a": {
          "$ref": "#/$defs/projectionContract"
        },
        "t": {
          "$ref": "#/$defs/projectionContract"
        }
      }
    },
    "carrier_axes": {
      "type": "array",
      "minItems": 9,
      "maxItems": 9,
      "items": {
        "$ref": "#/$defs/carrierAxis"
      }
    },
    "profile_policy": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "lexical_evidence_separate_from_provider_evidence",
        "source_chapter_reference_is_not_a_term_specific_claim",
        "carrier_alignment_is_not_semantic_evidence",
        "missing_claim_or_trace_behavior",
        "plural_results_required",
        "scalar_scoring_forbidden",
        "upstream_execution_claim_forbidden"
      ],
      "properties": {
        "lexical_evidence_separate_from_provider_evidence": {
          "const": true
        },
        "source_chapter_reference_is_not_a_term_specific_claim": {
          "const": true
        },
        "carrier_alignment_is_not_semantic_evidence": {
          "const": true
        },
        "missing_claim_or_trace_behavior": {
          "const": "UNRESOLVED_NOT_CONTRADICTION"
        },
        "plural_results_required": {
          "const": true
        },
        "scalar_scoring_forbidden": {
          "const": true
        },
        "upstream_execution_claim_forbidden": {
          "const": true
        }
      }
    },
    "records": {
      "type": "array",
      "minItems": 36,
      "maxItems": 36,
      "items": {
        "$ref": "#/$defs/profileRecord"
      }
    }
  },
  "$defs": {
    "sourceRegistryEntry": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "path",
        "context_class",
        "locators",
        "evidence_class",
        "authority_boundary"
      ],
      "properties": {
        "path": {
          "type": "string",
          "minLength": 1
        },
        "context_class": {
          "type": "string",
          "minLength": 1
        },
        "sha256": {
          "type": "string",
          "pattern": "^[0-9a-f]{64}$"
        },
        "locators": {
          "type": "array",
          "minItems": 1,
          "items": {
            "type": "string",
            "minLength": 1
          }
        },
        "evidence_class": {
          "type": "string",
          "enum": [
            "DIRECT_TEXTUAL_SOURCE",
            "TRANSLATION_WITNESS",
            "DEVELOPMENT_TRANSLATION_WITNESS",
            "RECEIVED_CANDIDATE",
            "HUMAN_BINDING"
          ]
        },
        "authority_boundary": {
          "type": "string",
          "minLength": 1
        }
      }
    },
    "providerBinding": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "provider_id",
        "path",
        "version",
        "git_blob_oid",
        "sha256",
        "permitted_role",
        "prohibited_role"
      ],
      "properties": {
        "provider_id": {
          "type": "string",
          "enum": [
            "IDX-A-OPERA",
            "IDX-T-OPERA"
          ]
        },
        "path": {
          "type": "string",
          "minLength": 1
        },
        "version": {
          "type": "string",
          "minLength": 1
        },
        "git_blob_oid": {
          "type": "string",
          "pattern": "^[0-9a-f]{40}$"
        },
        "sha256": {
          "type": "string",
          "pattern": "^[0-9a-f]{64}$"
        },
        "permitted_role": {
          "type": "string",
          "minLength": 1
        },
        "prohibited_role": {
          "const": "W_ADDRESS_SELECTION"
        }
      }
    },
    "projectionContract": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "contract_id",
        "provider_id",
        "consumes",
        "required_fields",
        "trace_selector",
        "fixture_mode",
        "execution_boundary"
      ],
      "properties": {
        "contract_id": {
          "type": "string",
          "minLength": 1
        },
        "provider_id": {
          "type": "string",
          "enum": [
            "IDX-A-OPERA",
            "IDX-T-OPERA"
          ]
        },
        "consumes": {
          "type": "string",
          "enum": [
            "A_DUPLEX_RESULT",
            "T_RELATIONAL_TRACE"
          ]
        },
        "required_level": {
          "const": "L2"
        },
        "required_fields": {
          "type": "array",
          "minItems": 3,
          "uniqueItems": true,
          "items": {
            "type": "string",
            "minLength": 1
          }
        },
        "trace_selector": {
          "type": "string",
          "minLength": 1
        },
        "fixture_mode": {
          "const": "SYNTHETIC_INTERFACE_REFERENCE"
        },
        "execution_boundary": {
          "type": "string",
          "pattern": "DOES_NOT_CLAIM_OPERA_[AT]_EXECUTION$"
        }
      }
    },
    "carrierAxis": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "carrier",
        "a_locus",
        "a_term",
        "t_locus",
        "t_term",
        "interpretation",
        "semantic_effect"
      ],
      "properties": {
        "carrier": {
          "type": "string",
          "enum": [
            "B",
            "C",
            "D",
            "E",
            "F",
            "G",
            "H",
            "I",
            "K"
          ]
        },
        "a_locus": {
          "type": "string",
          "pattern": "^A_[BCDEFGHIK]$"
        },
        "a_term": {
          "type": "string",
          "minLength": 1
        },
        "t_locus": {
          "type": "string",
          "pattern": "^T_[BCDEFGHIK]$"
        },
        "t_term": {
          "type": "string",
          "minLength": 1
        },
        "interpretation": {
          "const": "INDEX_ONLY"
        },
        "semantic_effect": {
          "const": "NONE"
        }
      }
    },
    "lexicalEvidence": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "evidence_class",
        "source_ref",
        "supports",
        "directness"
      ],
      "properties": {
        "evidence_class": {
          "type": "string",
          "enum": [
            "DIRECT_TEXTUAL_SOURCE",
            "TRANSLATION_WITNESS",
            "DEVELOPMENT_TRANSLATION_WITNESS",
            "HUMAN_BINDING",
            "RECEIVED_CANDIDATE",
            "SOURCE_AUTHORIZED_DERIVATION",
            "RECONSTRUCTION",
            "LOCAL_PROFILE_NORMALIZATION",
            "CURRENT_PROVIDER_CONTRACT"
          ]
        },
        "source_ref": {
          "type": "string",
          "enum": [
            "AB_LAT",
            "AB_PT",
            "AGU_EN",
            "W_RECEIVED_SUBSTRATE",
            "W_HUMAN_BINDINGS"
          ]
        },
        "supports": {
          "type": "string",
          "minLength": 1
        },
        "directness": {
          "type": "string",
          "enum": [
            "DIRECT",
            "WITNESS",
            "DEVELOPMENT_ONLY",
            "DERIVED",
            "CANDIDATE",
            "RECONSTRUCTED",
            "HUMAN_BOUND"
          ]
        }
      }
    },
    "typedRelation": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "surface",
        "relation_type",
        "identity_equivalent",
        "evidence_refs"
      ],
      "properties": {
        "surface": {
          "type": "string",
          "minLength": 1
        },
        "relation_type": {
          "type": "string",
          "minLength": 1
        },
        "identity_equivalent": {
          "type": "boolean"
        },
        "evidence_refs": {
          "type": "array",
          "minItems": 1,
          "uniqueItems": true,
          "items": {
            "type": "string",
            "minLength": 1
          }
        }
      }
    },
    "deeperRelation": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "term",
        "relation_type",
        "identity_equivalent",
        "evidence_refs"
      ],
      "properties": {
        "term": {
          "type": "string",
          "minLength": 1
        },
        "relation_type": {
          "type": "string",
          "minLength": 1
        },
        "identity_equivalent": {
          "const": false
        },
        "external_provider_ref": {
          "type": "string",
          "minLength": 1
        },
        "evidence_refs": {
          "type": "array",
          "minItems": 1,
          "uniqueItems": true,
          "items": {
            "type": "string",
            "minLength": 1
          }
        }
      }
    },
    "carrierAlignment": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "a_home_locus",
        "a_home_term",
        "t_home_locus",
        "t_home_term",
        "interpretation",
        "semantic_effect"
      ],
      "properties": {
        "a_home_locus": {
          "type": "string",
          "pattern": "^A_[BCDEFGHIK]$"
        },
        "a_home_term": {
          "type": "string",
          "minLength": 1
        },
        "t_home_locus": {
          "type": "string",
          "pattern": "^T_[BCDEFGHIK]$"
        },
        "t_home_term": {
          "type": "string",
          "minLength": 1
        },
        "interpretation": {
          "const": "INDEX_ONLY"
        },
        "semantic_effect": {
          "const": "NONE"
        }
      }
    },
    "definitionClaim": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "claim_id",
        "proposition",
        "relation_kind",
        "obligation",
        "evidence_refs",
        "authority_scope"
      ],
      "properties": {
        "claim_id": {
          "type": "string",
          "minLength": 1
        },
        "proposition": {
          "type": "string",
          "minLength": 1
        },
        "relation_kind": {
          "type": "string",
          "enum": [
            "AFFIRMATIVE",
            "QUALIFIED",
            "PRIVATIVE",
            "CONTRARY",
            "RELATED"
          ]
        },
        "obligation": {
          "type": "string",
          "enum": [
            "REQUIRED_SUPPORT",
            "ADMISSIBLE_SUPPORT",
            "PROHIBITED_COLLAPSE"
          ]
        },
        "evidence_refs": {
          "type": "array",
          "minItems": 1,
          "uniqueItems": true,
          "items": {
            "type": "string",
            "minLength": 1
          }
        },
        "authority_scope": {
          "const": "LEXICAL_PLACEMENT_ONLY"
        }
      }
    },
    "sourceChapter": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "source_ref",
        "locator"
      ],
      "properties": {
        "source_ref": {
          "type": "string",
          "enum": [
            "AB_LAT",
            "AB_PT",
            "AGU_EN",
            "W_RECEIVED_SUBSTRATE",
            "W_HUMAN_BINDINGS"
          ]
        },
        "locator": {
          "type": "string",
          "minLength": 1
        }
      }
    },
    "profileBasis": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "mode",
        "source_chapters",
        "derivation_ref",
        "coverage"
      ],
      "properties": {
        "mode": {
          "type": "string",
          "enum": [
            "DIRECT_LEXICAL_PLUS_DEVELOPMENT_SOURCE_CHAPTER_REFERENCE",
            "SOURCE_AUTHORIZED_CONVERSE_DERIVATION_REFERENCE",
            "SEMANTIC_IDENTITY_PROFILE_REFERENCE_WITH_DISTINCT_ADDRESS",
            "PAIRED_CONTRAST_PARTIAL_REFERENCE"
          ]
        },
        "source_chapters": {
          "type": "array",
          "minItems": 1,
          "items": {
            "$ref": "#/$defs/sourceChapter"
          }
        },
        "derivation_ref": {
          "type": [
            "string",
            "null"
          ]
        },
        "coverage": {
          "type": "string",
          "minLength": 1
        }
      }
    },
    "projectionProfile": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "projection_contract_id",
        "claims",
        "coverage",
        "missing_behavior"
      ],
      "properties": {
        "projection_contract_id": {
          "type": "string",
          "enum": [
            "W_A_PROJECTION_CONTRACT_v0.1.0",
            "W_T_PROJECTION_CONTRACT_v0.1.0"
          ]
        },
        "claims": {
          "type": "array",
          "minItems": 1,
          "maxItems": 1,
          "items": {
            "$ref": "#/$defs/projectionClaim"
          }
        },
        "coverage": {
          "type": "string",
          "enum": [
            "CONSERVATIVE_ALL_NINE_A_REFERENCE_CLAIM",
            "CONSERVATIVE_ALL_NINE_T_REFERENCE_CLAIM"
          ]
        },
        "missing_behavior": {
          "const": "UNRESOLVED_NOT_CONTRADICTION"
        }
      }
    },
    "projectionClaim": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "claim_id",
        "slot_or_provider_locus",
        "source_proposition_or_paraphrase",
        "relation_kind",
        "obligation",
        "source_ref",
        "locator",
        "evidence_class",
        "derivation_ref",
        "trace_selector",
        "missing_behavior",
        "semantic_assertion"
      ],
      "properties": {
        "claim_id": {
          "type": "string",
          "pattern": "^WAT-[PM][VU][BCDEFGHIK]-[AT]-CONSERVATIVE-ALL-NINE$"
        },
        "slot_or_provider_locus": {
          "type": "string",
          "enum": [
            "A_ALL_BCDEFGHIK",
            "T_ALL_BCDEFGHIK"
          ]
        },
        "source_proposition_or_paraphrase": {
          "type": "string",
          "minLength": 1
        },
        "relation_kind": {
          "const": "QUALIFIED"
        },
        "obligation": {
          "const": "ADMISSIBLE_SUPPORT"
        },
        "source_ref": {
          "const": "RECORD_PROFILE_BASIS"
        },
        "locator": {
          "const": "$.profile_basis.source_chapters[*]"
        },
        "evidence_class": {
          "const": "LOCAL_PROFILE_NORMALIZATION"
        },
        "derivation_ref": {
          "const": "$.profile_basis.derivation_ref"
        },
        "trace_selector": {
          "type": "string",
          "enum": [
            "A_DUPLEX_RESULT.L2.CARRIER_RESULTS[*]",
            "T_RELATIONAL_TRACE.relation_results[*]"
          ]
        },
        "missing_behavior": {
          "const": "UNRESOLVED_NOT_CONTRADICTION"
        },
        "semantic_assertion": {
          "const": "NONE"
        }
      }
    },
    "providerRequirement": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "provider_id",
        "exact_version",
        "trace_requirement"
      ],
      "properties": {
        "provider_id": {
          "type": "string",
          "enum": [
            "IDX-A-OPERA",
            "IDX-T-OPERA"
          ]
        },
        "exact_version": {
          "type": "string",
          "minLength": 1
        },
        "trace_requirement": {
          "type": "string",
          "minLength": 1
        }
      }
    },
    "matchingPolicy": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "trace_mode",
        "term_specific_support",
        "missing_trace",
        "plurality",
        "scoring",
        "address_selection_authority"
      ],
      "properties": {
        "trace_mode": {
          "const": "SEPARATELY_ADMITTED_TRACES_ONLY"
        },
        "term_specific_support": {
          "const": "CONSERVATIVE_ADMISSIBLE_SUPPORT_ONLY"
        },
        "missing_trace": {
          "const": "UNRESOLVED_NOT_CONTRADICTION"
        },
        "plurality": {
          "const": "PRESERVE_ALL_COMPATIBLE_ADDRESSES"
        },
        "scoring": {
          "const": "FORBIDDEN"
        },
        "address_selection_authority": {
          "const": "W_ONLY"
        }
      }
    },
    "recordReadiness": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "dataset_record",
        "term_specific_at_claims",
        "runtime",
        "no_execution_claim"
      ],
      "properties": {
        "dataset_record": {
          "const": "READY_CANDIDATE_ONLY"
        },
        "term_specific_at_claims": {
          "const": "CONSERVATIVE_REFERENCE_CLAIMS_EMBEDDED"
        },
        "runtime": {
          "const": "BLOCKED_UNTIL_SEPARATELY_ADMITTED_A_AND_T_TRACES"
        },
        "no_execution_claim": {
          "const": true
        }
      }
    },
    "profileRecord": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "profile_id",
        "w_address",
        "carrier",
        "pair",
        "sign",
        "co_carrier",
        "counterpart_address",
        "term_identity_id",
        "primary_lemma",
        "source_forms",
        "typed_surfaces",
        "semantic_identity_addresses",
        "deeper_relations",
        "human_binding_refs",
        "lexical_evidence",
        "carrier_alignment",
        "definition_claims",
        "profile_basis",
        "a_profile",
        "t_profile",
        "provider_requirements",
        "matching_policy",
        "prohibited_inferences",
        "readiness"
      ],
      "properties": {
        "profile_id": {
          "type": "string",
          "pattern": "^WAT-[PM][VU][BCDEFGHIK]$"
        },
        "w_address": {
          "type": "string",
          "pattern": "^[+-][VU][BCDEFGHIK]$"
        },
        "carrier": {
          "type": "string",
          "enum": [
            "B",
            "C",
            "D",
            "E",
            "F",
            "G",
            "H",
            "I",
            "K"
          ]
        },
        "pair": {
          "type": "string",
          "enum": [
            "V",
            "U"
          ]
        },
        "sign": {
          "type": "string",
          "enum": [
            "+",
            "-"
          ]
        },
        "co_carrier": {
          "type": "string",
          "enum": [
            "B",
            "C",
            "D",
            "E",
            "F",
            "G",
            "H",
            "I",
            "K"
          ]
        },
        "counterpart_address": {
          "type": "string",
          "pattern": "^[+-][VU][BCDEFGHIK]$"
        },
        "term_identity_id": {
          "type": "string",
          "pattern": "^TERM_[A-Z_]+$"
        },
        "primary_lemma": {
          "type": "string",
          "minLength": 1
        },
        "source_forms": {
          "type": "array",
          "minItems": 1,
          "uniqueItems": true,
          "items": {
            "type": "string",
            "minLength": 1
          }
        },
        "typed_surfaces": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/typedRelation"
          }
        },
        "semantic_identity_addresses": {
          "type": "array",
          "uniqueItems": true,
          "items": {
            "type": "string",
            "pattern": "^[+-][VU][BCDEFGHIK]$"
          }
        },
        "deeper_relations": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/deeperRelation"
          }
        },
        "human_binding_refs": {
          "type": "array",
          "uniqueItems": true,
          "items": {
            "type": "string",
            "pattern": "^HP-0(19|20|21|22|23|26|27|28|29)$"
          }
        },
        "lexical_evidence": {
          "type": "array",
          "minItems": 1,
          "items": {
            "$ref": "#/$defs/lexicalEvidence"
          }
        },
        "carrier_alignment": {
          "$ref": "#/$defs/carrierAlignment"
        },
        "definition_claims": {
          "type": "array",
          "minItems": 1,
          "items": {
            "$ref": "#/$defs/definitionClaim"
          }
        },
        "profile_basis": {
          "$ref": "#/$defs/profileBasis"
        },
        "a_profile": {
          "$ref": "#/$defs/projectionProfile"
        },
        "t_profile": {
          "$ref": "#/$defs/projectionProfile"
        },
        "provider_requirements": {
          "type": "array",
          "minItems": 2,
          "maxItems": 2,
          "items": {
            "$ref": "#/$defs/providerRequirement"
          }
        },
        "matching_policy": {
          "$ref": "#/$defs/matchingPolicy"
        },
        "prohibited_inferences": {
          "type": "array",
          "minItems": 8,
          "uniqueItems": true,
          "items": {
            "type": "string",
            "minLength": 1
          }
        },
        "readiness": {
          "$ref": "#/$defs/recordReadiness"
        }
      }
    },
    "readiness": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "dataset_structure",
        "lexical_bindings",
        "carrier_alignment",
        "term_specific_at_claims",
        "actual_execution",
        "validator_interpretation"
      ],
      "properties": {
        "dataset_structure": {
          "const": "READY_CANDIDATE_ONLY"
        },
        "lexical_bindings": {
          "const": "APPLIED"
        },
        "carrier_alignment": {
          "const": "INDEX_ONLY_COMPLETE"
        },
        "term_specific_at_claims": {
          "const": "READY_CANDIDATE_ONLY_CONSERVATIVE"
        },
        "actual_execution": {
          "const": "BLOCKED_REQUIRES_SEPARATELY_ADMITTED_TRACES"
        },
        "validator_interpretation": {
          "const": "CANDIDATE_PROFILE_READY__ACTUAL_RUNTIME_REMAINS_BLOCKED"
        }
      }
    }
  }
}
