{
  "$defs": {
    "StageFlag": {
      "additionalProperties": false,
      "properties": {
        "at": {
          "anyOf": [
            {
              "format": "date",
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "At"
        },
        "reached": {
          "default": false,
          "title": "Reached",
          "type": "boolean"
        }
      },
      "title": "StageFlag",
      "type": "object"
    }
  },
  "$id": "https://schemas.ump.dev/v1/client-maturity.json",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "properties": {
    "calibrated": {
      "$ref": "#/$defs/StageFlag"
    },
    "client_ref": {
      "title": "Client Ref",
      "type": "string"
    },
    "experimenting": {
      "$ref": "#/$defs/StageFlag"
    },
    "foundations": {
      "$ref": "#/$defs/StageFlag"
    },
    "model_live": {
      "$ref": "#/$defs/StageFlag"
    },
    "pipeline_stage": {
      "additionalProperties": {
        "enum": [
          "T0_fit",
          "T1_prioritise",
          "T2_design",
          "T3_running",
          "T4_calibrate",
          "T5_reallocate"
        ],
        "type": "string"
      },
      "title": "Pipeline Stage",
      "type": "object"
    },
    "reallocating": {
      "$ref": "#/$defs/StageFlag"
    },
    "score": {
      "maximum": 100,
      "minimum": 0,
      "title": "Score",
      "type": "number"
    },
    "stage": {
      "title": "Stage",
      "type": "string"
    }
  },
  "required": [
    "client_ref",
    "score",
    "stage"
  ],
  "title": "ClientMaturity",
  "type": "object"
}
