{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://nmd-vcell.sema3c.chatgpt.site/resource/api/v1.3/research-objects/schemas.json",
  "title": "NMD-VCell research object contracts",
  "$defs": {
    "Lifecycle": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "state",
        "revision",
        "immutable",
        "registered_at",
        "supersedes"
      ],
      "properties": {
        "state": {
          "enum": [
            "DRAFT",
            "REGISTERED",
            "MEASURED",
            "SUPERSEDED",
            "RELEASED"
          ]
        },
        "revision": {
          "type": "integer",
          "minimum": 1
        },
        "immutable": {
          "type": "boolean"
        },
        "registered_at": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "supersedes": {
          "type": [
            "string",
            "null"
          ]
        }
      }
    },
    "Gene": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "object_id",
        "object_type",
        "resource_release",
        "gene",
        "stable_url"
      ],
      "properties": {
        "object_id": {
          "type": "string",
          "pattern": "^GENE:"
        },
        "object_type": {
          "const": "Gene"
        },
        "resource_release": {
          "const": "v1.0.0-database-resource"
        },
        "gene": {
          "type": "string",
          "pattern": "^[A-Z0-9-]+$"
        },
        "stable_url": {
          "type": "string",
          "pattern": "^gene/"
        }
      }
    },
    "Comparison": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "comparison_schema",
        "comparison_id",
        "key",
        "title",
        "payload_sha256",
        "resource_release",
        "schema_version",
        "research_object_schema",
        "evidence_freeze",
        "interface_build",
        "generated_at",
        "original_input_identifiers",
        "identifier_mapping",
        "ranking_generated",
        "lifecycle",
        "rows",
        "claim_boundary",
        "stable_url"
      ],
      "properties": {
        "comparison_schema": {
          "const": "nmd-vcell-comparison-object/1.1"
        },
        "comparison_id": {
          "type": "string",
          "pattern": "^CMP-20260726-[A-F0-9]{12}$"
        },
        "key": {
          "type": "string"
        },
        "title": {
          "type": "string"
        },
        "payload_sha256": {
          "type": "string",
          "pattern": "^[a-f0-9]{64}$"
        },
        "resource_release": {
          "const": "v1.0.0-database-resource"
        },
        "schema_version": {
          "const": "1.1"
        },
        "research_object_schema": {
          "const": "1.3"
        },
        "evidence_freeze": {
          "const": "2026-07-25"
        },
        "interface_build": {
          "const": "EA-20260729-15"
        },
        "generated_at": {
          "type": "string",
          "format": "date-time"
        },
        "original_input_identifiers": {
          "type": "array",
          "minItems": 2,
          "items": {
            "type": "string"
          }
        },
        "identifier_mapping": {
          "type": "object"
        },
        "ranking_generated": {
          "const": false
        },
        "lifecycle": {
          "$ref": "#/$defs/Lifecycle"
        },
        "rows": {
          "type": "array",
          "minItems": 2,
          "items": {
            "type": "object"
          }
        },
        "claim_boundary": {
          "type": "string",
          "minLength": 20
        },
        "stable_url": {
          "type": "string",
          "pattern": "^comparison/"
        }
      }
    },
    "StudyCard": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "object_id",
        "card_schema",
        "resource_release",
        "gene",
        "lifecycle",
        "boundary"
      ],
      "properties": {
        "object_id": {
          "type": "string",
          "pattern": "^SC:"
        },
        "card_schema": {
          "const": "nmd-vcell-study-card/1.5"
        },
        "card_version": {},
        "resource_release": {
          "const": "v1.0.0-database-resource"
        },
        "evidence_freeze": {},
        "interface_build": {},
        "gene": {
          "type": "string",
          "pattern": "^[A-Z0-9-]+$"
        },
        "card_type": {},
        "current_action_code": {},
        "current_action": {},
        "lifecycle": {
          "$ref": "#/$defs/Lifecycle"
        },
        "decision_blocking_gap": {},
        "highest_missing_evidence_layer": {},
        "secondary_gaps": {},
        "frozen_evidence_snapshot": {},
        "unresolved_question": {},
        "biological_context": {},
        "perturbation_modality": {},
        "comparator_and_controls": {},
        "primary_endpoint": {},
        "secondary_endpoints": {},
        "primary_estimand": {},
        "state_transition_design": {},
        "perturbation_direction_rationale": {},
        "minimally_important_effect": {},
        "negligible_effect_margin": {},
        "suggested_sample_size_range": {},
        "randomisation_unit": {},
        "blocking_factors": {},
        "statistical_model": {},
        "multiple_testing_family": {},
        "missing_data_rule": {},
        "assay_qc_thresholds": {},
        "guide_concordance_rule": {},
        "donor_replication_rule": {},
        "estimated_time_band": {},
        "estimated_cost_band": {},
        "preregistration_status": {},
        "inferential_unit": {},
        "evidence_import_requirements": {},
        "planning_fields_not_applicable": {},
        "stop_rules": {},
        "escalation_rule": {},
        "evidence_transition": {},
        "data_release_plan": {},
        "boundary": {
          "type": "string",
          "minLength": 20
        },
        "stable_url": {},
        "exports": {}
      }
    },
    "Release": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "object_id",
        "object_type",
        "resource_release",
        "interface_build",
        "lifecycle",
        "stable_url"
      ],
      "properties": {
        "object_id": {
          "type": "string",
          "pattern": "^REL:"
        },
        "object_type": {
          "const": "Release"
        },
        "resource_release": {
          "const": "v1.0.0-database-resource"
        },
        "interface_build": {
          "const": "EA-20260729-15"
        },
        "lifecycle": {
          "$ref": "#/$defs/Lifecycle"
        },
        "stable_url": {
          "const": "release"
        }
      }
    },
    "PredictionReadiness": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "readiness_schema",
        "resource_release",
        "model_release",
        "benchmark_protocol",
        "current_level",
        "recommended_next_level",
        "clinical_level_status",
        "platform_claim_state",
        "allowed_current_claims",
        "locked_claims",
        "levels",
        "gate_summary",
        "p1_required_before_unlock",
        "p2_required_before_unlock",
        "minimum_validation_boundary",
        "reporting_alignment",
        "empty_registry_semantics"
      ],
      "properties": {
        "readiness_schema": {
          "const": "nmd-vcell-disease-prediction-readiness/1.0"
        },
        "resource_release": {
          "const": "v1.0.0-database-resource"
        },
        "model_release": {
          "const": "ridge-safe-v2.3"
        },
        "benchmark_protocol": {
          "const": "repeated-fold-v2.2"
        },
        "current_level": {
          "type": "string"
        },
        "recommended_next_level": {
          "type": "string"
        },
        "clinical_level_status": {
          "type": "string"
        },
        "platform_claim_state": {
          "type": "string"
        },
        "allowed_current_claims": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "locked_claims": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "levels": {
          "type": "array",
          "items": {
            "type": "object"
          }
        },
        "gate_summary": {
          "type": "object"
        },
        "p1_required_before_unlock": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "p2_required_before_unlock": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "minimum_validation_boundary": {
          "type": "string"
        },
        "reporting_alignment": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "empty_registry_semantics": {
          "type": "string"
        }
      }
    },
    "V1ReleaseGate": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "gate_schema",
        "resource_release",
        "interface_build",
        "formal_v1_release",
        "freeze_status",
        "database_release_claim_boundary",
        "candidate_status",
        "internal_gate_summary",
        "external_gate_summary",
        "internal_gates",
        "external_gates",
        "publication_package",
        "claim_boundary_enforced_on_pages",
        "prediction_claim_state",
        "unlock_rule"
      ],
      "properties": {
        "gate_schema": {
          "const": "nmd-vcell-v1-release-gate/1.0"
        },
        "resource_release": {
          "const": "v1.0.0-database-resource"
        },
        "interface_build": {
          "const": "EA-20260729-15"
        },
        "formal_v1_release": {
          "const": false
        },
        "freeze_status": {
          "type": "string"
        },
        "database_release_claim_boundary": {
          "const": "v1.0 is a database and evidence-governance release; it is not a validated disease-prediction or clinical decision-support release."
        },
        "candidate_status": {
          "type": "string"
        },
        "internal_gate_summary": {
          "type": "object"
        },
        "external_gate_summary": {
          "type": "object"
        },
        "internal_gates": {
          "type": "array",
          "items": {
            "type": "object"
          }
        },
        "external_gates": {
          "type": "array",
          "items": {
            "type": "object"
          }
        },
        "publication_package": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "claim_boundary_enforced_on_pages": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "prediction_claim_state": {
          "type": "string"
        },
        "unlock_rule": {
          "type": "string"
        }
      }
    },
    "ExternalAuthorizationDossier": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "dossier_schema",
        "resource_release",
        "interface_build",
        "formal_v1_release",
        "dossier_status",
        "database_release_claim_boundary",
        "external_gate_summary",
        "required_external_inputs",
        "deposit_manifest",
        "deposit_file_list",
        "authorization_checklist",
        "input_template",
        "metadata_template",
        "validator",
        "handoff",
        "page",
        "privacy_boundary",
        "non_automated_actions",
        "automatic_unlock"
      ],
      "properties": {
        "dossier_schema": {
          "const": "nmd-vcell-v1-external-authorization-dossier/1.0"
        },
        "resource_release": {
          "const": "v1.0.0-database-resource"
        },
        "interface_build": {
          "const": "EA-20260729-15"
        },
        "formal_v1_release": {
          "const": false
        },
        "dossier_status": {
          "const": "ready_for_author_institution_input_formal_v1_locked"
        },
        "database_release_claim_boundary": {
          "const": "v1.0 is a database and evidence-governance release; it is not a validated disease-prediction or clinical decision-support release."
        },
        "external_gate_summary": {
          "type": "object"
        },
        "required_external_inputs": {
          "type": "array",
          "items": {
            "type": "object"
          }
        },
        "deposit_manifest": {
          "type": "string"
        },
        "deposit_file_list": {
          "type": "string"
        },
        "authorization_checklist": {
          "type": "string"
        },
        "input_template": {
          "type": "string"
        },
        "metadata_template": {
          "type": "string"
        },
        "validator": {
          "type": "string"
        },
        "handoff": {
          "type": "string"
        },
        "page": {
          "type": "string"
        },
        "privacy_boundary": {
          "type": "string"
        },
        "non_automated_actions": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "automatic_unlock": {
          "const": false
        },
        "release_layers": {
          "type": "array",
          "items": {
            "type": "object"
          }
        }
      }
    },
    "PredictionRegistry": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "registry_schema",
        "resource_release",
        "interface_build",
        "registry_status",
        "claim_state",
        "counts",
        "schemas",
        "records",
        "outcomes",
        "empty_registry_semantics",
        "p1_unlock_requires",
        "p2_unlock_requires",
        "not_authorized_claims"
      ],
      "properties": {
        "registry_schema": {
          "const": "nmd-vcell-prediction-registry/1.0"
        },
        "resource_release": {
          "const": "v1.0.0-database-resource"
        },
        "interface_build": {
          "const": "EA-20260729-15"
        },
        "registry_status": {
          "const": "empty_scaffold_no_predictions_registered"
        },
        "claim_state": {
          "type": "string"
        },
        "counts": {
          "type": "object"
        },
        "schemas": {
          "type": "object"
        },
        "records": {
          "type": "array",
          "maxItems": 0
        },
        "outcomes": {
          "type": "array",
          "maxItems": 0
        },
        "empty_registry_semantics": {
          "type": "string"
        },
        "p1_unlock_requires": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "p2_unlock_requires": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "not_authorized_claims": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "ValidationReport": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "report_schema",
        "resource_release",
        "interface_build",
        "generated_at",
        "checks",
        "status"
      ],
      "properties": {
        "report_schema": {
          "type": "string"
        },
        "resource_release": {
          "const": "v1.0.0-database-resource"
        },
        "interface_build": {
          "const": "EA-20260729-15"
        },
        "generated_at": {
          "type": "string",
          "format": "date-time"
        },
        "checks": {
          "type": "array",
          "items": {
            "type": "object"
          }
        },
        "status": {
          "enum": [
            "PASS",
            "PARTIAL",
            "BLOCKED",
            "FAIL"
          ]
        }
      }
    },
    "Prediction": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "object_id",
        "model_release",
        "registered_at",
        "context",
        "endpoint",
        "estimate",
        "interval",
        "probability",
        "calibration",
        "ood_status",
        "abstention_status",
        "checksum"
      ],
      "properties": {
        "object_id": {
          "type": "string",
          "pattern": "^PRED:"
        },
        "model_release": {
          "type": "string"
        },
        "registered_at": {
          "type": "string",
          "format": "date-time"
        },
        "context": {
          "type": "string"
        },
        "endpoint": {
          "type": "object"
        },
        "estimate": {
          "type": [
            "number",
            "null"
          ]
        },
        "interval": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "type": "number"
          },
          "minItems": 2,
          "maxItems": 2
        },
        "probability": {
          "type": [
            "number",
            "null"
          ],
          "minimum": 0,
          "maximum": 1
        },
        "calibration": {
          "type": "object"
        },
        "ood_status": {
          "enum": [
            "in_distribution",
            "out_of_distribution",
            "not_assessed"
          ]
        },
        "abstention_status": {
          "type": "boolean"
        },
        "checksum": {
          "type": "string",
          "pattern": "^[a-f0-9]{64}$"
        }
      }
    },
    "Outcome": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "object_id",
        "study_card_id",
        "prediction_id",
        "measured_at",
        "endpoint",
        "estimate",
        "interval",
        "denominators",
        "reagent_replication",
        "donor_replication",
        "qc_status",
        "code_url",
        "data_url",
        "result_status"
      ],
      "properties": {
        "object_id": {
          "type": "string",
          "pattern": "^OUT:"
        },
        "study_card_id": {
          "type": "string",
          "pattern": "^SC:"
        },
        "prediction_id": {
          "type": [
            "string",
            "null"
          ],
          "pattern": "^PRED:"
        },
        "measured_at": {
          "type": "string",
          "format": "date-time"
        },
        "endpoint": {
          "type": "object"
        },
        "estimate": {
          "type": [
            "number",
            "null"
          ]
        },
        "interval": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "type": "number"
          },
          "minItems": 2,
          "maxItems": 2
        },
        "denominators": {
          "type": "object"
        },
        "reagent_replication": {
          "type": "object"
        },
        "donor_replication": {
          "type": "object"
        },
        "qc_status": {
          "enum": [
            "pass",
            "fail",
            "not_assessed"
          ]
        },
        "code_url": {
          "type": [
            "string",
            "null"
          ],
          "format": "uri-reference"
        },
        "data_url": {
          "type": [
            "string",
            "null"
          ],
          "format": "uri-reference"
        },
        "result_status": {
          "enum": [
            "measured",
            "inconclusive",
            "not_interpretable"
          ]
        }
      }
    }
  }
}
