{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://matrixnetwork.me/schemas/y-theory-candidate-identity-cell-review-evidence-v1.json",
  "title": "Y-Theory candidate identity-cell nonsemantic review evidence",
  "type": "object",
  "additionalProperties": false,
  "required": ["schema", "status", "release", "compiler_contract", "source_bindings", "proposition_scoped_correction_context", "coverage", "records", "input_hashes", "guardrails"],
  "properties": {
    "schema": {"const": "y-theory.candidate-identity-cell-review-evidence.v1"},
    "status": {"const": "exact_nonsemantic_review_evidence_no_role_bindings_or_edges"},
    "release": {"$ref": "#/$defs/release"},
    "compiler_contract": {"$ref": "#/$defs/compilerContract"},
    "source_bindings": {"$ref": "#/$defs/sourceBindings"},
    "proposition_scoped_correction_context": {"$ref": "#/$defs/correctionContext"},
    "coverage": {"$ref": "#/$defs/coverage"},
    "records": {
      "type": "array",
      "minItems": 761,
      "maxItems": 761,
      "items": {"$ref": "#/$defs/record"}
    },
    "input_hashes": {"$ref": "#/$defs/inputHashes"},
    "guardrails": {
      "type": "array",
      "minItems": 6,
      "uniqueItems": true,
      "items": {"type": "string", "minLength": 1}
    }
  },
  "$defs": {
    "sha256": {"type": "string", "pattern": "^[a-f0-9]{64}$"},
    "release": {
      "type": "object",
      "additionalProperties": false,
      "required": ["living_source_version", "identity_mind_version", "canonical_author", "state"],
      "properties": {
        "living_source_version": {"type": "string", "pattern": "^YLS-[0-9]{4}\\.[0-9]{2}\\.[0-9]{2}\\.[0-9]+$"},
        "identity_mind_version": {"type": "string", "pattern": "^IDM-[0-9]{4}\\.[0-9]{2}\\.[0-9]{2}\\.[0-9]+$"},
        "canonical_author": {"const": "Bubu Suhas Mullaveedu"},
        "state": {"const": "candidate_not_deployed"}
      }
    },
    "compilerContract": {
      "type": "object",
      "additionalProperties": false,
      "required": ["evidence_rule", "offset_rule", "routing_rule", "referent_rule", "promotion_rule"],
      "properties": {
        "evidence_rule": {"type": "string", "minLength": 1},
        "offset_rule": {"type": "string", "minLength": 1},
        "routing_rule": {"type": "string", "minLength": 1},
        "referent_rule": {"type": "string", "minLength": 1},
        "promotion_rule": {"type": "string", "minLength": 1}
      }
    },
    "sourceBindings": {
      "type": "object",
      "additionalProperties": false,
      "required": ["candidate_cell_registry_path", "candidate_cell_registry_sha256", "identity_mind_registry_path", "identity_mind_registry_sha256"],
      "properties": {
        "candidate_cell_registry_path": {"const": "atlas/model/CANDIDATE_IDENTITY_CELL_REGISTRY.json"},
        "candidate_cell_registry_sha256": {"$ref": "#/$defs/sha256"},
        "identity_mind_registry_path": {"const": "atlas/identity-mind/IDENTITY_MIND_REGISTRY.json"},
        "identity_mind_registry_sha256": {"$ref": "#/$defs/sha256"}
      }
    },
    "correctionContext": {
      "type": "object",
      "additionalProperties": false,
      "required": ["id", "captured_at_utc", "type", "status", "raw_path", "raw_sha256", "selection_rule", "application_state"],
      "properties": {
        "id": {"type": "string", "minLength": 1},
        "captured_at_utc": {"type": "string", "minLength": 1},
        "type": {"type": "string", "pattern": "^direct_author_correction"},
        "status": {"type": "string", "minLength": 1},
        "raw_path": {"type": "string", "pattern": "^intake/raw/"},
        "raw_sha256": {"$ref": "#/$defs/sha256"},
        "selection_rule": {"const": "configured_relational_coherence_correction_by_capture_id_not_recency"},
        "application_state": {"const": "bound_not_semantically_interpreted"}
      }
    },
    "coverage": {
      "type": "object",
      "additionalProperties": false,
      "required": ["candidate_cell_shells", "evidence_records", "literal_role_mentions", "records_with_literal_role_mentions", "records_without_literal_role_mentions", "inside_literal_mentions", "outside_literal_mentions", "relation_literal_mentions", "records_with_all_three_literal_role_words", "inherited_position_routing_signals", "records_with_inherited_position_routing_signals", "boundary_inside_outside_routing_records", "relation_contact_routing_records", "records_with_any_role_routing_signal", "records_with_both_role_routing_signals", "manuscript_section_envelopes", "zero_candidate_statement_section_envelopes", "formal_triad_declarations", "semantic_role_proposals", "role_bindings", "referent_identities_established", "semantic_relations_created"],
      "properties": {
        "candidate_cell_shells": {"const": 761},
        "evidence_records": {"const": 761},
        "literal_role_mentions": {"const": 136},
        "records_with_literal_role_mentions": {"const": 103},
        "records_without_literal_role_mentions": {"const": 658},
        "inside_literal_mentions": {"const": 35},
        "outside_literal_mentions": {"const": 14},
        "relation_literal_mentions": {"const": 87},
        "records_with_all_three_literal_role_words": {"const": 3},
        "inherited_position_routing_signals": {"const": 4237},
        "records_with_inherited_position_routing_signals": {"const": 761},
        "boundary_inside_outside_routing_records": {"const": 257},
        "relation_contact_routing_records": {"const": 390},
        "records_with_any_role_routing_signal": {"const": 439},
        "records_with_both_role_routing_signals": {"const": 208},
        "manuscript_section_envelopes": {"const": 200},
        "zero_candidate_statement_section_envelopes": {"const": 32},
        "formal_triad_declarations": {"const": 0},
        "semantic_role_proposals": {"const": 0},
        "role_bindings": {"const": 0},
        "referent_identities_established": {"const": 0},
        "semantic_relations_created": {"const": 0}
      }
    },
    "sourceFieldHashes": {
      "type": "object",
      "additionalProperties": false,
      "required": ["title", "statement"],
      "properties": {
        "title": {"$ref": "#/$defs/sha256"},
        "statement": {"$ref": "#/$defs/sha256"}
      }
    },
    "sourceLineage": {
      "type": "object",
      "additionalProperties": false,
      "required": ["identity_mind_locator", "candidate_cell_locator", "original_source", "original_source_locator"],
      "properties": {
        "identity_mind_locator": {"type": "string", "pattern": "^atlas/identity-mind/IDENTITY_MIND_REGISTRY\\.json#id="},
        "candidate_cell_locator": {"type": "string", "pattern": "^atlas/model/CANDIDATE_IDENTITY_CELL_REGISTRY\\.json#id=CIC-"},
        "original_source": {"type": "string", "minLength": 1},
        "original_source_locator": {"type": "string", "minLength": 1}
      }
    },
    "recordDisposition": {
      "type": "object",
      "additionalProperties": false,
      "required": ["state", "is_manuscript_section_envelope", "is_zero_candidate_statement_section_envelope", "referent_identity_established", "semantic_extraction_state"],
      "properties": {
        "state": {"const": "source_record_review_unit_not_referent_identity"},
        "is_manuscript_section_envelope": {"type": "boolean"},
        "is_zero_candidate_statement_section_envelope": {"type": "boolean"},
        "referent_identity_established": {"const": false},
        "semantic_extraction_state": {"const": "not_performed_review_required"}
      }
    },
    "literalMention": {
      "type": "object",
      "additionalProperties": false,
      "required": ["id", "role_word", "source_field", "start_char", "end_char", "quote", "normalized_token", "source_field_sha256", "registry_locator", "evidence_class", "establishes_role_occupant", "establishes_relation"],
      "properties": {
        "id": {"type": "string", "pattern": "^RTE-[a-f0-9]{20}$"},
        "role_word": {"enum": ["inside", "outside", "relation"]},
        "source_field": {"enum": ["title", "statement"]},
        "start_char": {"type": "integer", "minimum": 0},
        "end_char": {"type": "integer", "minimum": 1},
        "quote": {"type": "string", "minLength": 1},
        "normalized_token": {"enum": ["inside", "outside", "relation"]},
        "source_field_sha256": {"$ref": "#/$defs/sha256"},
        "registry_locator": {"type": "string", "pattern": "^atlas/identity-mind/IDENTITY_MIND_REGISTRY\\.json#id="},
        "evidence_class": {"const": "literal_role_token_exact_span_not_semantic_role_evidence"},
        "establishes_role_occupant": {"const": false},
        "establishes_relation": {"const": false}
      }
    },
    "literalRoleEvidence": {
      "type": "object",
      "additionalProperties": false,
      "required": ["inside", "outside", "relation"],
      "properties": {
        "inside": {"type": "array", "items": {"$ref": "#/$defs/literalMention"}},
        "outside": {"type": "array", "items": {"$ref": "#/$defs/literalMention"}},
        "relation": {"type": "array", "items": {"$ref": "#/$defs/literalMention"}}
      }
    },
    "literalRoleMentionCounts": {
      "type": "object",
      "additionalProperties": false,
      "required": ["inside", "outside", "relation", "total"],
      "properties": {
        "inside": {"type": "integer", "minimum": 0},
        "outside": {"type": "integer", "minimum": 0},
        "relation": {"type": "integer", "minimum": 0},
        "total": {"type": "integer", "minimum": 0}
      }
    },
    "routingSignals": {
      "type": "object",
      "additionalProperties": false,
      "required": ["state", "position_ids", "establishes_role_occupant", "establishes_relation"],
      "properties": {
        "state": {"const": "inherited_structural_position_candidates_for_review_routing_only"},
        "position_ids": {
          "type": "array",
          "minItems": 1,
          "uniqueItems": true,
          "items": {
            "enum": ["possibility_source", "differentiation", "boundary_inside_outside", "relation_contact", "orientation_selection", "transformation_action", "delay_lag", "residue_trace", "memory_retention", "reinforcement", "leakage_loss", "oscillation_phase", "closure_return", "identity_persistence", "observation_model", "mind_nesting"]
          }
        },
        "establishes_role_occupant": {"const": false},
        "establishes_relation": {"const": false}
      }
    },
    "semanticOutputs": {
      "type": "object",
      "additionalProperties": false,
      "required": ["formal_triad_declarations", "semantic_role_proposals", "role_bindings", "referent_identity_ids", "semantic_relation_ids", "state"],
      "properties": {
        "formal_triad_declarations": {"const": []},
        "semantic_role_proposals": {"const": []},
        "role_bindings": {"const": []},
        "referent_identity_ids": {"const": []},
        "semantic_relation_ids": {"const": []},
        "state": {"const": "withheld_no_formal_declaration_or_governed_human_review"}
      }
    },
    "record": {
      "type": "object",
      "additionalProperties": false,
      "required": ["id", "ordinal", "candidate_cell_id", "source_record_id", "source_record_kind", "source_record_sha256", "source_field_sha256", "source_lineage", "record_disposition", "literal_role_evidence", "literal_role_mention_counts", "contains_all_three_literal_role_words", "routing_signals", "semantic_outputs", "review_state"],
      "properties": {
        "id": {"type": "string", "pattern": "^CICRE-"},
        "ordinal": {"type": "integer", "minimum": 1, "maximum": 761},
        "candidate_cell_id": {"type": "string", "pattern": "^CIC-"},
        "source_record_id": {"type": "string", "minLength": 1},
        "source_record_kind": {"enum": ["explicit_thesis", "manuscript_section", "research_question", "formation_stage", "author_intake", "structure_candidate_wisdom", "motion_distinction", "recovered_candidate_wisdom", "relation_hypothesis", "structure_guardrail_refinement", "recovered_source_note", "recovered_experiment_proposal", "recovered_open_question", "structure_open_research_criterion"]},
        "source_record_sha256": {"$ref": "#/$defs/sha256"},
        "source_field_sha256": {"$ref": "#/$defs/sourceFieldHashes"},
        "source_lineage": {"$ref": "#/$defs/sourceLineage"},
        "record_disposition": {"$ref": "#/$defs/recordDisposition"},
        "literal_role_evidence": {"$ref": "#/$defs/literalRoleEvidence"},
        "literal_role_mention_counts": {"$ref": "#/$defs/literalRoleMentionCounts"},
        "contains_all_three_literal_role_words": {"type": "boolean"},
        "routing_signals": {"$ref": "#/$defs/routingSignals"},
        "semantic_outputs": {"$ref": "#/$defs/semanticOutputs"},
        "review_state": {"const": "review_required"}
      }
    },
    "inputHashes": {
      "type": "object",
      "additionalProperties": false,
      "required": ["builder", "schema", "candidate_identity_cells", "identity_mind", "release_config", "correction_source"],
      "properties": {
        "builder": {"$ref": "#/$defs/sha256"},
        "schema": {"$ref": "#/$defs/sha256"},
        "candidate_identity_cells": {"$ref": "#/$defs/sha256"},
        "identity_mind": {"$ref": "#/$defs/sha256"},
        "release_config": {"$ref": "#/$defs/sha256"},
        "correction_source": {"$ref": "#/$defs/sha256"}
      }
    }
  }
}
