{
  "$id": "https://hoba.work/schemas/actor.schema.json",
  "$ref": "#/definitions/Actor",
  "definitions": {
    "Actor": {
      "type": "object",
      "properties": {
        "title": {
          "type": "string",
          "minLength": 3
        },
        "status": {
          "default": "active",
          "type": "string",
          "enum": [
            "active",
            "deprecated"
          ]
        },
        "evidence_ids": {
          "default": [],
          "type": "array",
          "items": {
            "type": "string",
            "pattern": "^(EVD-\\d{3}|evidence\\.[a-z0-9_]+)$"
          }
        },
        "content": {
          "type": "string"
        },
        "aliases": {
          "default": {
            "facet": [],
            "intervention": []
          },
          "type": "object",
          "properties": {
            "facet": {
              "default": [],
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "system",
                  "recruiter",
                  "hiring-manager",
                  "policy",
                  "external",
                  "candidate"
                ]
              }
            },
            "intervention": {
              "default": [],
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "employer-policy",
                  "recruiter-process",
                  "ats-vendor",
                  "hiring-manager",
                  "candidate-action",
                  "industry-standard",
                  "policy"
                ]
              }
            }
          },
          "additionalProperties": false
        },
        "id": {
          "type": "string",
          "enum": [
            "actor.candidate",
            "actor.recruiter",
            "actor.hiring_manager",
            "actor.ats_vendor",
            "actor.employer_policy",
            "actor.public_policy_and_industry_standards",
            "actor.client"
          ]
        },
        "type": {
          "type": "string",
          "const": "actor"
        },
        "slug": {
          "type": "string",
          "pattern": "^[a-z0-9-]+$"
        },
        "summary": {
          "type": "string",
          "minLength": 10
        },
        "controls": {
          "minItems": 1,
          "type": "array",
          "items": {
            "$ref": "#/definitions/__schema0"
          }
        },
        "blind_to": {
          "minItems": 1,
          "type": "array",
          "items": {
            "$ref": "#/definitions/__schema1"
          }
        },
        "incentives": {
          "minItems": 1,
          "type": "array",
          "items": {
            "$ref": "#/definitions/__schema2"
          }
        },
        "specimens": {
          "default": [],
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "enum": [
                  "email",
                  "chat",
                  "ats",
                  "transcript",
                  "posting",
                  "note"
                ]
              },
              "label": {
                "type": "string",
                "minLength": 3
              },
              "subject": {
                "type": "string"
              },
              "context": {
                "type": "string"
              },
              "lines": {
                "minItems": 1,
                "type": "array",
                "items": {
                  "$ref": "#/definitions/__schema3"
                }
              },
              "reading": {
                "type": "string",
                "minLength": 10
              }
            },
            "required": [
              "kind",
              "label",
              "lines"
            ],
            "additionalProperties": false
          }
        },
        "recommendations": {
          "default": [],
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "pattern": "^[a-z0-9-]+$"
              },
              "title": {
                "type": "string",
                "minLength": 5
              },
              "rationale": {
                "type": "string",
                "minLength": 20
              },
              "cost": {
                "type": "string",
                "enum": [
                  "low",
                  "medium",
                  "high"
                ]
              },
              "costs": {
                "type": "string",
                "minLength": 10
              },
              "targets": {
                "default": [],
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "interventions": {
                "default": [],
                "type": "array",
                "items": {
                  "type": "string",
                  "pattern": "^(I-\\d{3}|int\\.[a-z0-9_]+)$"
                }
              }
            },
            "required": [
              "id",
              "title",
              "rationale",
              "cost",
              "costs"
            ],
            "additionalProperties": false
          }
        }
      },
      "required": [
        "title",
        "id",
        "type",
        "slug",
        "summary",
        "controls",
        "blind_to",
        "incentives"
      ],
      "additionalProperties": false
    },
    "__schema0": {
      "type": "string"
    },
    "__schema1": {
      "type": "string"
    },
    "__schema2": {
      "type": "string"
    },
    "__schema3": {
      "type": "object",
      "properties": {
        "speaker": {
          "type": "string"
        },
        "at": {
          "type": "string"
        },
        "text": {
          "type": "string",
          "minLength": 1
        },
        "tell": {
          "default": false,
          "type": "boolean"
        }
      },
      "required": [
        "text"
      ],
      "additionalProperties": false
    }
  },
  "$schema": "http://json-schema.org/draft-07/schema#"
}
