{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/axonflow/json-schema/axonflow-conformity-assessment-schema.json",
  "title": "ConformityAssessment",
  "description": "EU AI Act conformity assessment record (Article 43). Mirrors the\nwire shape of `platform/orchestrator/euaiact/types.go::ConformityAssessment`.\n",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/axonflow-eu-ai-act-api-openapi.yml#/components/schemas/ConformityAssessment",
  "type": "object",
  "required": [
    "id",
    "org_id",
    "system_id",
    "system_name",
    "risk_category",
    "status",
    "assessment_date",
    "assessors",
    "created_by",
    "created_at",
    "updated_at"
  ],
  "properties": {
    "id": {
      "type": "string",
      "description": "Unique assessment identifier (UUID)."
    },
    "org_id": {
      "type": "string",
      "description": "Owning organization."
    },
    "system_id": {
      "type": "string",
      "description": "AI system this assessment covers."
    },
    "system_name": {
      "type": "string",
      "description": "Human-readable name of the AI system."
    },
    "risk_category": {
      "type": "string",
      "enum": [
        "minimal",
        "limited",
        "high-risk",
        "unacceptable"
      ],
      "description": "EU AI Act risk classification."
    },
    "status": {
      "type": "string",
      "enum": [
        "draft",
        "in_progress",
        "submitted",
        "approved",
        "rejected"
      ]
    },
    "version": {
      "type": "integer",
      "description": "Monotonic version (bumps on every update)."
    },
    "assessment_date": {
      "type": "string",
      "format": "date-time"
    },
    "valid_until": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "assessors": {
      "type": "array",
      "description": "Email addresses of the team members carrying out the assessment.",
      "items": {
        "type": "string"
      }
    },
    "requirements": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/RequirementStatus"
      }
    },
    "evidence": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/EvidenceItem"
      }
    },
    "findings": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Finding"
      }
    },
    "risk_mitigation": {
      "type": [
        "object",
        "null"
      ],
      "additionalProperties": true,
      "description": "Free-form risk-mitigation notes structured as a JSON object."
    },
    "recommendations": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "created_by": {
      "type": "string",
      "description": "User email that opened the assessment."
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    },
    "updated_at": {
      "type": "string",
      "format": "date-time"
    },
    "submitted_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "submitted_by": {
      "type": "string"
    },
    "approved_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "approved_by": {
      "type": "string"
    },
    "rejected_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "rejected_by": {
      "type": "string"
    },
    "rejection_reason": {
      "type": "string",
      "description": "Free-form reason a reviewer used when transitioning to `rejected`."
    }
  },
  "$defs": {
    "EvidenceItem": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "type": {
          "type": "string",
          "enum": [
            "document",
            "test_result",
            "audit_log",
            "certification"
          ]
        },
        "title": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "file_path": {
          "type": "string"
        },
        "url": {
          "type": "string"
        },
        "uploaded_at": {
          "type": "string",
          "format": "date-time"
        },
        "uploaded_by": {
          "type": "string"
        }
      }
    },
    "Finding": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "severity": {
          "type": "string",
          "enum": [
            "critical",
            "major",
            "minor",
            "observation"
          ]
        },
        "category": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "article": {
          "type": "string",
          "description": "Related EU AI Act article"
        },
        "remediation": {
          "type": "string"
        },
        "status": {
          "type": "string",
          "enum": [
            "open",
            "resolved",
            "accepted"
          ]
        }
      }
    },
    "RequirementStatus": {
      "type": "object",
      "properties": {
        "requirement_id": {
          "type": "string"
        },
        "article": {
          "type": "string",
          "description": "EU AI Act article reference (e.g., \"Article 9\")"
        },
        "description": {
          "type": "string"
        },
        "status": {
          "type": "string",
          "enum": [
            "compliant",
            "non_compliant",
            "partial",
            "not_applicable"
          ]
        },
        "notes": {
          "type": "string"
        },
        "evidence_ids": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    }
  }
}