{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://www.brennanmccloud.com/research/where-the-checking-stops/action-assurance-record.schema.json",
  "title": "AI Action Assurance Record",
  "description": "A portable record of the intent, authority, evidence, execution, observed outcome, validation environment, and human control attached to a consequential AI action.",
  "type": "object",
  "required": [
    "record_version",
    "record_id",
    "created_at",
    "system",
    "action",
    "evidence",
    "execution",
    "outcome",
    "validation",
    "human_control"
  ],
  "properties": {
    "record_version": {
      "type": "string"
    },
    "record_id": {
      "type": "string"
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    },
    "system": {
      "type": "object",
      "required": [
        "name",
        "version",
        "owner",
        "environment"
      ],
      "properties": {
        "name": {
          "type": "string"
        },
        "version": {
          "type": "string"
        },
        "owner": {
          "type": "string"
        },
        "environment": {
          "type": "string"
        }
      }
    },
    "action": {
      "type": "object",
      "required": [
        "requested_intent",
        "authority_source",
        "authority_scope",
        "policy_or_specification",
        "policy_version",
        "consequentiality"
      ],
      "properties": {
        "requested_intent": {
          "type": "string"
        },
        "authority_source": {
          "type": "string"
        },
        "authority_scope": {
          "type": "string"
        },
        "policy_or_specification": {
          "type": "string"
        },
        "policy_version": {
          "type": "string"
        },
        "consequentiality": {
          "enum": [
            "low",
            "medium",
            "high",
            "critical"
          ]
        }
      }
    },
    "evidence": {
      "type": "object",
      "required": [
        "inputs",
        "freshness_checked_at",
        "unresolved_assumptions"
      ],
      "properties": {
        "inputs": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "freshness_checked_at": {
          "type": "string"
        },
        "unresolved_assumptions": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "execution": {
      "type": "object",
      "required": [
        "planned_steps",
        "completed_steps",
        "external_systems_touched",
        "irreversible_changes"
      ],
      "properties": {
        "planned_steps": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "completed_steps": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "external_systems_touched": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "irreversible_changes": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "outcome": {
      "type": "object",
      "required": [
        "claimed_state",
        "externally_observed_state",
        "verification_method",
        "verified_at"
      ],
      "properties": {
        "claimed_state": {
          "type": "string"
        },
        "externally_observed_state": {
          "type": "string"
        },
        "verification_method": {
          "type": "string"
        },
        "verified_at": {
          "type": "string"
        }
      }
    },
    "validation": {
      "type": "object",
      "required": [
        "validator",
        "validator_version",
        "checks",
        "exceptions"
      ],
      "properties": {
        "validator": {
          "type": "string"
        },
        "validator_version": {
          "type": "string"
        },
        "checks": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "exceptions": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "human_control": {
      "type": "object",
      "required": [
        "approval_required",
        "approver",
        "decision",
        "decision_at",
        "rationale"
      ],
      "properties": {
        "approval_required": {
          "type": "boolean"
        },
        "approver": {
          "type": "string"
        },
        "decision": {
          "enum": [
            "pending",
            "approved",
            "rejected",
            "escalated",
            "not_required"
          ]
        },
        "decision_at": {
          "type": "string"
        },
        "rationale": {
          "type": "string"
        }
      }
    }
  }
}