{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://runaihere.com/schema/community-catalog-3.1.0.json",
  "title": "Run AI Here curated source collection v3.1",
  "description": "Source-derived articles and attributed factual result selections. Unknown is null. Site measurements remain absent; each source figure has its own conditions and evidence URL.",
  "type": "object",
  "required": [
    "schema_version",
    "dataset_version",
    "record_type",
    "checked_on",
    "source_count",
    "site_reproduced_records",
    "records"
  ],
  "properties": {
    "schema_version": {
      "const": "3.1.0"
    },
    "dataset_version": {
      "type": "string"
    },
    "schema_url": {
      "const": "https://runaihere.com/schema/community-catalog-3.1.0.json"
    },
    "record_type": {
      "const": "curated_reference_collection"
    },
    "checked_on": {
      "type": "string",
      "format": "date"
    },
    "source_count": {
      "type": "integer",
      "minimum": 1
    },
    "site_reproduced_records": {
      "const": 0
    },
    "records": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/record"
      }
    }
  },
  "$defs": {
    "record": {
      "type": "object",
      "required": [
        "id",
        "title",
        "kind",
        "source_type",
        "summary",
        "model_family",
        "runtime_topics",
        "hardware_topics",
        "source",
        "license",
        "evidence_state",
        "site_reproduced",
        "metrics",
        "conditions",
        "test_profiles",
        "reported_setup",
        "limitations",
        "editorial"
      ],
      "properties": {
        "id": {
          "type": "string",
          "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
        },
        "title": {
          "type": "string",
          "minLength": 5
        },
        "kind": {
          "enum": [
            "model",
            "deployment",
            "benchmark"
          ]
        },
        "source_type": {
          "type": "string"
        },
        "summary": {
          "type": "string"
        },
        "model_family": {
          "type": "string"
        },
        "model_release_date": {
          "type": [
            "string",
            "null"
          ],
          "format": "date",
          "description": "Only an explicitly known model release date. Source commit time does not substitute for release date."
        },
        "runtime_topics": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "uniqueItems": true
        },
        "hardware_topics": {
          "type": "array",
          "items": {
            "enum": [
              "cpu",
              "apple",
              "nvidia",
              "spark",
              "amd",
              "intel",
              "ascend"
            ]
          },
          "uniqueItems": true
        },
        "source": {
          "type": "object",
          "required": [
            "publisher",
            "url",
            "platform",
            "repository",
            "revision",
            "pinned_url",
            "checked_on",
            "metadata_status"
          ],
          "properties": {
            "publisher": {
              "type": "string"
            },
            "platform": {
              "enum": [
                "github",
                "huggingface"
              ]
            },
            "revision": {
              "type": "string",
              "pattern": "^[a-f0-9]{40}$"
            },
            "url": {
              "type": "string",
              "pattern": "^https://"
            },
            "pinned_url": {
              "type": "string",
              "pattern": "^https://"
            },
            "document_sha256": {
              "type": [
                "string",
                "null"
              ],
              "pattern": "^[a-f0-9]{64}$"
            },
            "checked_on": {
              "type": "string",
              "format": "date"
            },
            "metadata_status": {
              "const": "checked"
            }
          }
        },
        "evidence_state": {
          "const": "source_reported"
        },
        "site_reproduced": {
          "const": false
        },
        "metrics": {
          "type": "null",
          "description": "Legacy site-measurement field; always null because Run AI Here ran no model tests. Attributed third-party results are in editorial.reported_results."
        },
        "performance_ranking_allowed": {
          "const": false
        },
        "public_benchmark_snapshot": {
          "const": false
        },
        "comparison_status": {
          "const": "not_comparable"
        },
        "conditions": {
          "type": "object",
          "required": [
            "model_revision",
            "weight_hash",
            "runtime_execution_revision",
            "input_tokens",
            "output_tokens",
            "concurrency",
            "cache_state"
          ]
        },
        "test_profiles": {
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "label",
              "evidence_url",
              "conditions"
            ],
            "properties": {
              "label": {
                "type": "string"
              },
              "evidence_url": {
                "type": "string",
                "pattern": "^https://"
              },
              "conditions": {
                "type": "object"
              }
            }
          }
        },
        "deployment_options": {
          "type": "array",
          "description": "Alternative artifacts from the recipe, not a combined benchmark configuration."
        },
        "recipe_parameters": {
          "type": [
            "object",
            "null"
          ],
          "description": "Maintainer engine, context and hardware declarations. Context limit is not measured input length; maintainer verification is not site reproduction."
        },
        "limitations": {
          "type": "array",
          "minItems": 1,
          "items": {
            "type": "string"
          }
        },
        "editorial": {
          "type": "object",
          "required": [
            "answer",
            "sections",
            "facts",
            "reported_results",
            "source_document_sha256",
            "byline",
            "creation_method",
            "published_on",
            "modified_on"
          ],
          "properties": {
            "answer": {
              "type": "string",
              "minLength": 80
            },
            "sections": {
              "type": "array",
              "minItems": 4,
              "items": {
                "type": "object",
                "required": [
                  "heading",
                  "paragraphs",
                  "citations"
                ],
                "properties": {
                  "heading": {
                    "type": "string"
                  },
                  "paragraphs": {
                    "type": "array",
                    "minItems": 1,
                    "items": {
                      "type": "string",
                      "minLength": 50
                    }
                  },
                  "citations": {
                    "type": "array",
                    "minItems": 1,
                    "items": {
                      "type": "string",
                      "pattern": "^https://"
                    }
                  }
                }
              }
            },
            "reported_results": {
              "type": "array",
              "items": {
                "type": "object",
                "required": [
                  "label",
                  "metric",
                  "value",
                  "unit",
                  "statistic",
                  "uncertainty",
                  "conditions",
                  "evidence_state",
                  "site_reproduced",
                  "evidence_url",
                  "source_document_sha256"
                ],
                "properties": {
                  "value": {
                    "type": "number"
                  },
                  "conditions": {
                    "type": "object",
                    "minProperties": 5
                  },
                  "evidence_state": {
                    "const": "source_reported"
                  },
                  "site_reproduced": {
                    "const": false
                  },
                  "evidence_url": {
                    "type": "string",
                    "pattern": "^https://"
                  },
                  "source_document_sha256": {
                    "type": "string",
                    "pattern": "^[a-f0-9]{64}$"
                  }
                }
              }
            },
            "source_document_sha256": {
              "type": "string",
              "pattern": "^[a-f0-9]{64}$"
            }
          }
        }
      }
    }
  }
}
