{
  "$defs": {
    "IsoDate": {
      "description": "ISO 8601 date (YYYY-MM-DD).",
      "format": "date",
      "type": "string"
    },
    "PathRef": {
      "description": "Path-based cross-reference relative to .corpospec/ root.\nPattern: `^[a-z0-9_-]+(/[a-z0-9_.-]+)+$`",
      "pattern": "^[a-z0-9_-]+(/[a-z0-9_.-]+)+$",
      "type": "string"
    },
    "ProficiencyLevel": {
      "description": "Five-level Dreyfus proficiency.",
      "enum": [
        "novice",
        "advanced_beginner",
        "competent",
        "proficient",
        "expert"
      ],
      "type": "string"
    },
    "SkillProficiency": {
      "description": "Per-person proficiency assertion (self-attested or manager-attested).",
      "properties": {
        "attested_by": {
          "$ref": "#/$defs/PathRef",
          "description": "Who attested (self / manager / both)."
        },
        "attested_on": {
          "$ref": "#/$defs/IsoDate"
        },
        "evidence_ref": {
          "anyOf": [
            {
              "$ref": "#/$defs/PathRef"
            },
            {
              "type": "null"
            }
          ],
          "description": "PathRef into evidence (certificate, project artefact)."
        },
        "level": {
          "$ref": "#/$defs/ProficiencyLevel"
        },
        "skill": {
          "$ref": "#/$defs/PathRef"
        }
      },
      "required": [
        "skill",
        "level",
        "attested_by",
        "attested_on"
      ],
      "type": "object"
    }
  },
  "$id": "https://corpospec.com/schemas/v0.16.0/skill-profile.schema.json",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "description": "Per-person skill profile.",
  "properties": {
    "id": {
      "$ref": "#/$defs/PathRef"
    },
    "last_reviewed": {
      "$ref": "#/$defs/IsoDate"
    },
    "person": {
      "$ref": "#/$defs/PathRef"
    },
    "proficiencies": {
      "items": {
        "$ref": "#/$defs/SkillProficiency"
      },
      "type": "array"
    }
  },
  "required": [
    "id",
    "person",
    "proficiencies",
    "last_reviewed"
  ],
  "title": "SkillProfile",
  "type": "object",
  "x-corpospec-pillar": "people"
}