{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://torneo.ai/schemas/usability_trial.v1",
  "title": "usability_trial.v1",
  "description": "P-10: usability trial of three frozen tasks (at least 10 participants, 80 % within 60 s, 0 critical accessibility defect). Shape of the fields check_finalite reads; extra evidence fields are allowed. Dated, not synthetic and bound by sha256 to files of the repository (receipts/gates/<schema>/*.json).",
  "type": "object",
  "required": [
    "schema",
    "synthetic",
    "observed_on",
    "participants",
    "tasks",
    "axe_critical_defects",
    "axe_report_ref"
  ],
  "properties": {
    "schema": {
      "const": "usability_trial.v1"
    },
    "synthetic": {
      "type": "boolean",
      "description": "Only false counts (gate_common.read_receipts)."
    },
    "observed_on": {
      "type": "string",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}"
    },
    "participants": {
      "type": "integer",
      "minimum": 1
    },
    "tasks": {
      "type": "array",
      "minItems": 3,
      "maxItems": 3,
      "items": {
        "type": "object",
        "required": [
          "successes",
          "max_seconds"
        ],
        "properties": {
          "successes": {
            "type": "integer",
            "minimum": 0
          },
          "max_seconds": {
            "type": "number",
            "minimum": 0
          }
        }
      }
    },
    "axe_critical_defects": {
      "type": "integer",
      "minimum": 0
    },
    "axe_report_ref": {
      "type": "object",
      "required": [
        "path",
        "sha256"
      ],
      "additionalProperties": false,
      "properties": {
        "path": {
          "type": "string",
          "minLength": 1
        },
        "sha256": {
          "type": "string",
          "pattern": "^[0-9a-f]{64}$"
        }
      }
    }
  }
}
