{
  "$defs": {
    "CalibrationOutcome": {
      "description": "Calibration outcome.",
      "oneOf": [
        {
          "enum": [
            "no_calibration"
          ],
          "type": "string"
        },
        {
          "const": "confirmed",
          "description": "Original manager rating stood post-calibration.",
          "type": "string"
        },
        {
          "const": "raised_in_calibration",
          "description": "Rating was raised in calibration.",
          "type": "string"
        },
        {
          "const": "lowered_in_calibration",
          "description": "Rating was lowered in calibration.",
          "type": "string"
        }
      ]
    },
    "IsoDate": {
      "description": "ISO 8601 date (YYYY-MM-DD).",
      "format": "date",
      "type": "string"
    },
    "NineBoxPosition": {
      "description": "9-box position (performance × potential).",
      "oneOf": [
        {
          "const": "risk",
          "description": "Low perf / low potential.",
          "type": "string"
        },
        {
          "const": "inconsistent",
          "description": "Low perf / mid potential.",
          "type": "string"
        },
        {
          "const": "enigma",
          "description": "Low perf / high potential.",
          "type": "string"
        },
        {
          "const": "effective_contributor",
          "description": "Mid perf / low potential.",
          "type": "string"
        },
        {
          "const": "core_player",
          "description": "Mid perf / mid potential.",
          "type": "string"
        },
        {
          "const": "growth",
          "description": "Mid perf / high potential.",
          "type": "string"
        },
        {
          "const": "trusted_professional",
          "description": "High perf / low potential.",
          "type": "string"
        },
        {
          "const": "high_performer",
          "description": "High perf / mid potential.",
          "type": "string"
        },
        {
          "const": "star_talent",
          "description": "High perf / high potential.",
          "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"
    },
    "PeerInput": {
      "description": "360° input from a peer / report / cross-functional partner.",
      "properties": {
        "feedback_summary": {
          "type": "string"
        },
        "relationship": {
          "description": "Reviewer's relationship (peer/report/cross-func/external).",
          "type": "string"
        },
        "reviewer": {
          "$ref": "#/$defs/PathRef"
        }
      },
      "required": [
        "reviewer",
        "relationship",
        "feedback_summary"
      ],
      "type": "object"
    },
    "PerformanceRating": {
      "description": "Performance rating bands.",
      "enum": [
        "does_not_meet",
        "partially_meets",
        "meets",
        "exceeds",
        "greatly_exceeds"
      ],
      "type": "string"
    },
    "PiiClass": {
      "description": "Personal-data classification on every record carrying personal data, per\nBDR 0070 / BDR 0069 / BDR 0078. Used by `corpospec-report` to gate\nrendering and by the privacy pillar's RoPA records to determine\nsafeguards.",
      "oneOf": [
        {
          "const": "none",
          "description": "No personal data.",
          "type": "string"
        },
        {
          "const": "public_personal",
          "description": "Public personal data (already disclosed by the subject, e.g. CEO name).",
          "type": "string"
        },
        {
          "const": "internal",
          "description": "Internal-only personal data (employee directory).",
          "type": "string"
        },
        {
          "const": "personal",
          "description": "Personal data per GDPR Art. 4(1).",
          "type": "string"
        },
        {
          "const": "special_category",
          "description": "Special-category data per GDPR Art. 9 (health, biometric, genetic,\nreligion, ethnicity, sex life, political opinion, trade union).",
          "type": "string"
        },
        {
          "const": "criminal_data",
          "description": "Criminal data per GDPR Art. 10.",
          "type": "string"
        },
        {
          "const": "sensitive",
          "description": "CCPA / CPRA \"sensitive personal information\".",
          "type": "string"
        }
      ]
    }
  },
  "$id": "https://corpospec.com/schemas/v0.16.0/performance-review.schema.json",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "description": "Per-person review within a cycle.",
  "properties": {
    "calibration_outcome": {
      "$ref": "#/$defs/CalibrationOutcome"
    },
    "completed_at": {
      "$ref": "#/$defs/IsoDate"
    },
    "cycle": {
      "$ref": "#/$defs/PathRef"
    },
    "evidence_ref": {
      "anyOf": [
        {
          "$ref": "#/$defs/PathRef"
        },
        {
          "type": "null"
        }
      ],
      "description": "PathRef to the signed performance-review record."
    },
    "final_rating": {
      "$ref": "#/$defs/PerformanceRating",
      "description": "Post-calibration final rating."
    },
    "id": {
      "$ref": "#/$defs/PathRef"
    },
    "manager": {
      "$ref": "#/$defs/PathRef"
    },
    "manager_rating": {
      "$ref": "#/$defs/PerformanceRating",
      "description": "Manager initial rating (pre-calibration)."
    },
    "nine_box": {
      "anyOf": [
        {
          "$ref": "#/$defs/NineBoxPosition"
        },
        {
          "type": "null"
        }
      ]
    },
    "peer_inputs": {
      "description": "360° inputs (anonymised stub — actual evidence in evidence_ref).",
      "items": {
        "$ref": "#/$defs/PeerInput"
      },
      "type": "array"
    },
    "person": {
      "$ref": "#/$defs/PathRef"
    },
    "pii_class": {
      "$ref": "#/$defs/PiiClass"
    },
    "promotion_recommended": {
      "description": "Whether the person should be promoted next cycle.",
      "type": "boolean"
    },
    "retention_until": {
      "$ref": "#/$defs/IsoDate",
      "description": "Retention 10 years (HGB §257) + 3 years general civil claims\n(BGB §195)."
    },
    "self_rating": {
      "anyOf": [
        {
          "$ref": "#/$defs/PerformanceRating"
        },
        {
          "type": "null"
        }
      ],
      "description": "Self-rating (employee assessment)."
    },
    "suggested_comp_change_pct": {
      "description": "Suggested comp-band move (% increase) per calibration.",
      "format": "double",
      "type": [
        "number",
        "null"
      ]
    }
  },
  "required": [
    "id",
    "cycle",
    "person",
    "manager",
    "manager_rating",
    "final_rating",
    "calibration_outcome",
    "promotion_recommended",
    "completed_at",
    "retention_until",
    "pii_class"
  ],
  "title": "Review",
  "type": "object",
  "x-corpospec-pillar": "people"
}