{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://lumesage.com/assets/bio-project-spec.schema.json",
  "title": "LumeSage biological AI project specification",
  "description": "Planning template only. Validation checks structure, not permission, scientific validity or fulfillment.",
  "type": "object",
  "required": [
    "task",
    "provenance",
    "scientific_context",
    "annotation",
    "evaluation",
    "acceptance"
  ],
  "additionalProperties": false,
  "properties": {
    "task": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "research_question",
        "intended_use",
        "data_unit",
        "inclusion_exclusion"
      ],
      "properties": {
        "research_question": {
          "type": "string",
          "minLength": 1
        },
        "intended_use": {
          "type": "string",
          "minLength": 1
        },
        "data_unit": {
          "type": "string",
          "minLength": 1
        },
        "inclusion_exclusion": {
          "type": "string",
          "minLength": 1
        }
      }
    },
    "provenance": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "source_type",
        "permission_status",
        "permitted_use",
        "redistribution_limits"
      ],
      "properties": {
        "source_type": {
          "type": "string",
          "minLength": 1
        },
        "permission_status": {
          "type": "string",
          "minLength": 1
        },
        "permitted_use": {
          "type": "string",
          "minLength": 1
        },
        "redistribution_limits": {
          "type": "string",
          "minLength": 1
        }
      }
    },
    "scientific_context": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "sample_type",
        "experimental_conditions",
        "batch_and_controls",
        "not_applicable_reasons"
      ],
      "properties": {
        "sample_type": {
          "type": "string",
          "minLength": 1
        },
        "experimental_conditions": {
          "type": "string",
          "minLength": 1
        },
        "batch_and_controls": {
          "type": "string",
          "minLength": 1
        },
        "not_applicable_reasons": {
          "type": "string",
          "minLength": 1
        }
      }
    },
    "annotation": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "label_definitions",
        "evidence_type",
        "protocol_version",
        "expert_review_plan",
        "disagreement_and_uncertainty"
      ],
      "properties": {
        "label_definitions": {
          "type": "string",
          "minLength": 1
        },
        "evidence_type": {
          "type": "string",
          "minLength": 1
        },
        "protocol_version": {
          "type": "string",
          "minLength": 1
        },
        "expert_review_plan": {
          "type": "string",
          "minLength": 1
        },
        "disagreement_and_uncertainty": {
          "type": "string",
          "minLength": 1
        }
      }
    },
    "evaluation": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "grouping_unit",
        "split_plan",
        "deduplication_and_leakage_checks",
        "scoring_protocol",
        "limitations"
      ],
      "properties": {
        "grouping_unit": {
          "type": "string",
          "minLength": 1
        },
        "split_plan": {
          "type": "string",
          "minLength": 1
        },
        "deduplication_and_leakage_checks": {
          "type": "string",
          "minLength": 1
        },
        "scoring_protocol": {
          "type": "string",
          "minLength": 1
        },
        "limitations": {
          "type": "string",
          "minLength": 1
        }
      }
    },
    "acceptance": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "metrics_and_thresholds",
        "sampling_plan",
        "rework_rules",
        "delivery_manifest",
        "version_and_changes"
      ],
      "properties": {
        "metrics_and_thresholds": {
          "type": "string",
          "minLength": 1
        },
        "sampling_plan": {
          "type": "string",
          "minLength": 1
        },
        "rework_rules": {
          "type": "string",
          "minLength": 1
        },
        "delivery_manifest": {
          "type": "string",
          "minLength": 1
        },
        "version_and_changes": {
          "type": "string",
          "minLength": 1
        }
      }
    }
  }
}