{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://matrixnetwork.me/schemas/y-theory-mind-structure-executable-fidelity-audit-v2.json",
  "title": "Y-Theory Mind Structure Executable Fidelity Audit",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "schema",
    "audit_id",
    "reviewed_at",
    "review_state",
    "purpose",
    "authority_sources",
    "artifact_hash_binding",
    "retained_results",
    "verified_repairs",
    "structural_contract",
    "remaining_gaps",
    "diagnostic_distinction",
    "test_evidence",
    "proof_boundary",
    "decision"
  ],
  "properties": {
    "schema": {"const": "y-theory.mind-structure-executable-fidelity-audit.v2"},
    "audit_id": {"const": "MIND-STRUCTURE-EXECUTABLE-FIDELITY-AUDIT-2026-09-01"},
    "reviewed_at": {"const": "2026-09-01"},
    "review_state": {"const": "candidate_pending_current_human_review"},
    "purpose": {"type": "string", "minLength": 80},
    "authority_sources": {
      "type": "array",
      "minItems": 1,
      "maxItems": 1,
      "uniqueItems": true,
      "items": {"$ref": "#/$defs/authoritySource"}
    },
    "artifact_hash_binding": {"$ref": "#/$defs/artifactHashBinding"},
    "retained_results": {
      "type": "array",
      "minItems": 7,
      "maxItems": 7,
      "uniqueItems": true,
      "items": {"$ref": "#/$defs/retainedResult"}
    },
    "verified_repairs": {
      "type": "array",
      "minItems": 9,
      "maxItems": 9,
      "uniqueItems": true,
      "items": {"$ref": "#/$defs/repair"}
    },
    "structural_contract": {"$ref": "#/$defs/structuralContract"},
    "remaining_gaps": {
      "type": "array",
      "minItems": 7,
      "maxItems": 7,
      "uniqueItems": true,
      "items": {"$ref": "#/$defs/gap"}
    },
    "diagnostic_distinction": {"$ref": "#/$defs/diagnosticDistinction"},
    "test_evidence": {"$ref": "#/$defs/testEvidence"},
    "proof_boundary": {"$ref": "#/$defs/proofBoundary"},
    "decision": {"$ref": "#/$defs/decision"}
  },
  "$defs": {
    "sha256": {
      "type": "string",
      "pattern": "^[0-9a-f]{64}$"
    },
    "portablePath": {
      "type": "string",
      "minLength": 3,
      "pattern": "^(?![A-Za-z]:)(?!/)(?!\\\\)(?!.*\\\\).+$"
    },
    "authoritySource": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "source_id",
        "artifact_label",
        "relative_path",
        "sha256",
        "bytes_present_in_living_source",
        "authority_role"
      ],
      "properties": {
        "source_id": {"const": "direct_author_executable_fidelity_intake"},
        "artifact_label": {"type": "string", "minLength": 25},
        "relative_path": {"$ref": "#/$defs/portablePath"},
        "sha256": {"$ref": "#/$defs/sha256"},
        "bytes_present_in_living_source": {"const": true},
        "authority_role": {"type": "string", "minLength": 50}
      }
    },
    "artifact": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "artifact_id",
        "artifact_label",
        "portable_path",
        "sha256",
        "artifact_role",
        "working_tree_state"
      ],
      "properties": {
        "artifact_id": {
          "enum": [
            "gitignore",
            "app_runtime",
            "fidelity_audit",
            "engine_runtime",
            "primary_page",
            "mind_contract",
            "mind_dynamics",
            "nested_page",
            "nested_runtime",
            "readme",
            "renderer",
            "styles",
            "engine_tests",
            "contract_tests",
            "dynamics_tests"
          ]
        },
        "artifact_label": {"type": "string", "minLength": 10},
        "portable_path": {"$ref": "#/$defs/portablePath"},
        "sha256": {"$ref": "#/$defs/sha256"},
        "artifact_role": {
          "enum": [
            "repository_policy",
            "browser_runtime",
            "audit_narrative",
            "engine_runtime",
            "browser_entrypoint",
            "structural_contract",
            "candidate_dynamics_runtime",
            "demonstration_runtime",
            "project_documentation",
            "projection_runtime",
            "presentation",
            "test_evidence"
          ]
        },
        "working_tree_state": {"const": "committed_clean"}
      }
    },
    "gitSnapshot": {
      "type": "object",
      "additionalProperties": false,
      "required": ["branch", "commit", "working_tree_clean"],
      "properties": {
        "branch": {"const": "codex/mind-structure-ratio-recursion-20260901"},
        "commit": {"const": "2c4bbb4f1a289ec38773477c3a02234539c9e064"},
        "working_tree_clean": {"const": false}
      }
    },
    "artifactHashBinding": {
      "type": "object",
      "additionalProperties": false,
      "required": ["binding_mode", "artifact_root_label", "git_snapshot", "artifacts", "excluded_working_tree_artifacts"],
      "properties": {
        "binding_mode": {"const": "exact_bytes_at_audit_time"},
        "artifact_root_label": {"const": "Mind Structure executable candidate"},
        "git_snapshot": {"$ref": "#/$defs/gitSnapshot"},
        "artifacts": {
          "type": "array",
          "minItems": 15,
          "maxItems": 15,
          "uniqueItems": true,
          "items": {"$ref": "#/$defs/artifact"}
        },
        "excluded_working_tree_artifacts": {
          "type": "array",
          "minItems": 4,
          "maxItems": 4,
          "uniqueItems": true,
          "items": {"$ref": "#/$defs/excludedArtifact"}
        }
      }
    },
    "excludedArtifact": {
      "type": "object",
      "additionalProperties": false,
      "required": ["artifact_id", "portable_path", "sha256", "disposition", "reason"],
      "properties": {
        "artifact_id": {
          "enum": [
            "excluded_bit_universe_engine",
            "excluded_bit_universe_interface",
            "excluded_mind_node_engine",
            "excluded_mind_node_tests"
          ]
        },
        "portable_path": {"$ref": "#/$defs/portablePath"},
        "sha256": {"$ref": "#/$defs/sha256"},
        "disposition": {"const": "excluded_untracked_not_authoritative"},
        "reason": {"type": "string", "minLength": 60}
      }
    },
    "retainedResult": {
      "type": "object",
      "additionalProperties": false,
      "required": ["result_id", "proof_state", "statement", "evidence_artifact_ids", "boundary"],
      "properties": {
        "result_id": {
          "enum": [
            "R1_triad_parameterization",
            "R2_torus_round_trip",
            "R3_clifford_s3_norm",
            "R4_phasor_coherence_bound",
            "R5_scalar_delay_residue_loop",
            "R6_recursive_structural_factory",
            "R7_vertical_candidate_conformance"
          ]
        },
        "proof_state": {
          "enum": [
            "exact_coordinate_identity",
            "exact_coordinate_identity_under_declared_domain",
            "exact_under_normalized_nonnegative_weights",
            "implementation_fact",
            "structural_conformance_fact",
            "candidate_dynamic_conformance_fact"
          ]
        },
        "statement": {"type": "string", "minLength": 50},
        "evidence_artifact_ids": {
          "type": "array",
          "minItems": 2,
          "uniqueItems": true,
          "items": {"type": "string", "minLength": 3}
        },
        "boundary": {"type": "string", "minLength": 50}
      }
    },
    "repair": {
      "type": "object",
      "additionalProperties": false,
      "required": ["repair_id", "status", "statement", "evidence_artifact_ids"],
      "properties": {
        "repair_id": {
          "enum": [
            "P1_eta_ratio_scaling",
            "P2_dynamic_delay_capacity",
            "P3_invalid_collective_phase_guard",
            "P4_preset_reset_reproducibility",
            "P5_normalized_runtime_cadence",
            "P6_relation_probe_timestep_convergence",
            "P7_live_delay_warmup_readiness",
            "P8_external_relational_face_delay",
            "P9_periodic_theta_seam"
          ]
        },
        "status": {"enum": ["repaired_and_tested", "repaired_and_syntax_checked"]},
        "statement": {"type": "string", "minLength": 50},
        "evidence_artifact_ids": {
          "type": "array",
          "minItems": 2,
          "uniqueItems": true,
          "items": {"type": "string", "minLength": 3}
        }
      }
    },
    "structuralContract": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "dimension_mode",
        "depth_count",
        "primary_roles",
        "address_roles",
        "address_count_per_depth",
        "recursive_children_supported",
        "shape_conformance_tested",
        "complete_dynamics_implemented",
        "vertical_candidate_conformance_implemented",
        "source_authorized_canonical_operator",
        "poc_hierarchy_status",
        "candidate_dynamic_gate_ids",
        "missing_dynamic_gate_ids"
      ],
      "properties": {
        "dimension_mode": {"const": "declared_active_dimension_list"},
        "depth_count": {"const": 7},
        "primary_roles": {
          "type": "array",
          "minItems": 3,
          "maxItems": 3,
          "uniqueItems": true,
          "items": {"enum": ["I", "O", "R"]}
        },
        "address_roles": {
          "type": "array",
          "minItems": 12,
          "maxItems": 12,
          "uniqueItems": true,
          "items": {"enum": ["I", "O", "R", "II", "IO", "IR", "OI", "OO", "OR", "RI", "RO", "RR"]}
        },
        "address_count_per_depth": {"const": 12},
        "recursive_children_supported": {"const": true},
        "shape_conformance_tested": {"const": true},
        "complete_dynamics_implemented": {"const": false},
        "vertical_candidate_conformance_implemented": {"const": true},
        "source_authorized_canonical_operator": {"const": false},
        "poc_hierarchy_status": {"const": "recursive_traversal_over_fixed_6_to_2_to_1_example"},
        "candidate_dynamic_gate_ids": {
          "type": "array",
          "minItems": 1,
          "maxItems": 1,
          "uniqueItems": true,
          "items": {"const": "G3_vertical_delayed_consequence_and_residue"}
        },
        "missing_dynamic_gate_ids": {
          "type": "array",
          "minItems": 4,
          "maxItems": 4,
          "uniqueItems": true,
          "items": {
            "enum": [
              "G4_horizontal_same_depth_relation",
              "G5_distributed_whole_convergence",
              "G6_changed_return_into_depth_one",
              "G7_bidirectional_child_wider_consequence"
            ]
          }
        }
      }
    },
    "gap": {
      "type": "object",
      "additionalProperties": false,
      "required": ["gap_id", "severity", "status", "finding", "required_gate"],
      "properties": {
        "gap_id": {
          "enum": [
            "L1_legacy_fixed_6_to_2_to_1_hierarchy",
            "L2_legacy_relation_probe_noncausal",
            "G3_vertical_delayed_consequence_and_residue",
            "G4_horizontal_same_depth_relation",
            "G5_distributed_whole_convergence",
            "G6_changed_return_into_depth_one",
            "G7_bidirectional_child_wider_consequence"
          ]
        },
        "severity": {"const": "high"},
        "status": {
          "enum": [
            "open_source_fidelity_gate",
            "candidate_conformance_passed_canonical_operator_open"
          ]
        },
        "finding": {"type": "string", "minLength": 70},
        "required_gate": {"type": "string", "minLength": 70}
      }
    },
    "diagnostic": {
      "type": "object",
      "additionalProperties": false,
      "required": ["diagnostic_id", "question", "implemented_status", "required_measurement", "does_not_establish"],
      "properties": {
        "diagnostic_id": {
          "enum": ["D1_temporal_resolvability", "D2_projected_address_visitation", "D3_hidden_state_recoverability"]
        },
        "question": {"type": "string", "minLength": 45},
        "implemented_status": {"enum": ["implemented_diagnostic_only", "not_implemented"]},
        "required_measurement": {"type": "string", "minLength": 40},
        "does_not_establish": {"type": "string", "minLength": 40}
      }
    },
    "diagnosticDistinction": {
      "type": "object",
      "additionalProperties": false,
      "required": ["mutually_substitutable", "diagnostics"],
      "properties": {
        "mutually_substitutable": {"const": false},
        "diagnostics": {
          "type": "array",
          "minItems": 3,
          "maxItems": 3,
          "uniqueItems": true,
          "items": {"$ref": "#/$defs/diagnostic"}
        }
      }
    },
    "testEvidence": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "command",
        "runtime",
        "tests",
        "passed",
        "failed",
        "cancelled",
        "skipped",
        "status",
        "complete_mind_dynamics_implemented",
        "vertical_candidate_conformance_implemented",
        "test_names"
      ],
      "properties": {
        "command": {"const": "node --test test/engine-conformance.test.js test/mind-contract.test.js test/mind-dynamics.test.js"},
        "runtime": {"const": "Node.js built-in test runner"},
        "tests": {"const": 25},
        "passed": {"const": 25},
        "failed": {"const": 0},
        "cancelled": {"const": 0},
        "skipped": {"const": 0},
        "status": {"const": "passed"},
        "complete_mind_dynamics_implemented": {"const": false},
        "vertical_candidate_conformance_implemented": {"const": true},
        "test_names": {
          "type": "array",
          "minItems": 25,
          "maxItems": 25,
          "uniqueItems": true,
          "items": {"type": "string", "minLength": 25}
        }
      }
    },
    "proofBoundary": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "exact_coordinate_math_retained",
        "scalar_dynamics_canonical",
        "complete_mind_engine",
        "complete_mind_dynamics_implemented",
        "vertical_candidate_is_canonical",
        "working_tree_prototypes_authoritative",
        "projected_visitation_is_hidden_state_reconstruction",
        "delay_line_is_automatically_takens_embedding",
        "relation_probe_is_causal_relation",
        "source_architecture_redefined",
        "physical_torus_universality_claimed",
        "observerhood_or_consciousness_claimed"
      ],
      "properties": {
        "exact_coordinate_math_retained": {"const": true},
        "scalar_dynamics_canonical": {"const": false},
        "complete_mind_engine": {"const": false},
        "complete_mind_dynamics_implemented": {"const": false},
        "vertical_candidate_is_canonical": {"const": false},
        "working_tree_prototypes_authoritative": {"const": false},
        "projected_visitation_is_hidden_state_reconstruction": {"const": false},
        "delay_line_is_automatically_takens_embedding": {"const": false},
        "relation_probe_is_causal_relation": {"const": false},
        "source_architecture_redefined": {"const": false},
        "physical_torus_universality_claimed": {"const": false},
        "observerhood_or_consciousness_claimed": {"const": false}
      }
    },
    "decision": {
      "type": "object",
      "additionalProperties": false,
      "required": ["accepted_as", "not_accepted_as", "publication_label", "required_next_gate", "overall_conclusion"],
      "properties": {
        "accepted_as": {
          "type": "array",
          "minItems": 5,
          "maxItems": 5,
          "uniqueItems": true,
          "items": {"type": "string", "minLength": 20}
        },
        "not_accepted_as": {
          "type": "array",
          "minItems": 5,
          "maxItems": 5,
          "uniqueItems": true,
          "items": {"type": "string", "minLength": 20}
        },
        "publication_label": {"const": "governed executable-fidelity candidate audit"},
        "required_next_gate": {
          "type": "array",
          "minItems": 5,
          "maxItems": 5,
          "uniqueItems": true,
          "items": {"type": "string", "minLength": 25}
        },
        "overall_conclusion": {"type": "string", "minLength": 150}
      }
    }
  }
}
