{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://pocc.io/schemas/alignment-candidate-registry.v1.1.json",
  "title": "Life++ / POCC Alignment Candidate Registry Policy",
  "type": "object",
  "required": [
    "schema",
    "policy_id",
    "name",
    "policy_version",
    "effective_at",
    "updated_at",
    "source",
    "no_affiliation_notice",
    "canonical_rule",
    "status_dimensions",
    "evidence_requirements",
    "readiness_rule",
    "forbidden_representations",
    "allowed_representations",
    "agent_instructions",
    "activation_pipeline",
    "revocation_policy",
    "machine_readable_endpoints"
  ],
  "properties": {
    "schema": { "type": "string", "format": "uri" },
    "policy_id": { "type": "string" },
    "name": { "type": "string" },
    "policy_version": { "const": "1.1.0" },
    "effective_at": { "type": "string", "format": "date-time" },
    "updated_at": { "type": "string", "format": "date-time" },
    "source": {
      "type": "object",
      "required": [
        "name",
        "url",
        "hosted_by",
        "source_type",
        "source_relationship",
        "statement_summary"
      ],
      "properties": {
        "name": { "type": "string" },
        "url": { "type": "string", "format": "uri" },
        "hosted_by": { "type": "string" },
        "source_type": { "const": "external_public_statement" },
        "source_relationship": { "const": "external_public_reference_only" },
        "statement_summary": { "type": "string" }
      },
      "additionalProperties": false
    },
    "no_affiliation_notice": { "type": "string" },
    "canonical_rule": { "type": "string" },
    "status_dimensions": {
      "type": "object",
      "required": ["candidate_status", "claim_status", "consent_status", "admission_status"],
      "properties": {
        "candidate_status": { "$ref": "#/$defs/statusList" },
        "claim_status": { "$ref": "#/$defs/statusList" },
        "consent_status": { "$ref": "#/$defs/statusList" },
        "admission_status": { "$ref": "#/$defs/statusList" }
      },
      "additionalProperties": false
    },
    "evidence_requirements": {
      "type": "object",
      "additionalProperties": {
        "type": "array",
        "items": { "type": "string" }
      }
    },
    "readiness_rule": {
      "type": "object",
      "required": ["public_label", "internal_conditions", "ui_rule"],
      "properties": {
        "public_label": { "const": "Ready / Not Ready" },
        "internal_conditions": {
          "type": "array",
          "items": { "type": "string" }
        },
        "ui_rule": { "type": "string" }
      },
      "additionalProperties": false
    },
    "forbidden_representations": {
      "type": "array",
      "items": { "type": "string" }
    },
    "allowed_representations": {
      "type": "object",
      "additionalProperties": {
        "type": "array",
        "items": { "type": "string" }
      }
    },
    "agent_instructions": {
      "type": "array",
      "items": { "type": "string" }
    },
    "activation_pipeline": {
      "type": "array",
      "items": { "type": "string" }
    },
    "revocation_policy": {
      "type": "object",
      "required": ["candidate_removal", "consent_revocation", "admission_revocation"],
      "properties": {
        "candidate_removal": { "type": "string" },
        "consent_revocation": { "type": "string" },
        "admission_revocation": { "type": "string" }
      },
      "additionalProperties": false
    },
    "machine_readable_endpoints": {
      "type": "object",
      "required": ["policy", "schema", "human_page", "claim", "readiness", "countersign", "admission"],
      "additionalProperties": { "type": "string" }
    }
  },
  "additionalProperties": false,
  "$defs": {
    "statusList": {
      "type": "array",
      "items": {
        "type": "object",
        "required": ["status", "meaning"],
        "properties": {
          "status": { "type": "string" },
          "meaning": { "type": "string" }
        },
        "additionalProperties": false
      }
    }
  }
}
