{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://securitycompliancehub.io/schemas/ai-governance-prefill.schema.json",
  "title": "SCH AI Governance Pre-fill Schema",
  "description": "Schema for importing MLOps, model registry, and data governance tool data into the SCH AI Governance assessment (EU AI Act, ISO/IEC 42001, NIST AI RMF). 6 domains, 42 questions (33 for deployer-only orgs). Useful data sources: AWS SageMaker, Azure ML, Hugging Face model cards, Collibra, Alation.",
  "version": "1.0.0",
  "type": "object",
  "required": ["assessmentType", "generated", "questions"],
  "additionalProperties": false,
  "properties": {
    "assessmentType": {
      "type": "string",
      "const": "ai-governance",
      "description": "Must be 'ai-governance'."
    },
    "source": {
      "type": "string",
      "description": "Tool or pipeline that generated this file.",
      "examples": ["aws-sagemaker", "azure-ml", "mlflow", "collibra", "custom-script"]
    },
    "generated": {
      "type": "string",
      "format": "date-time"
    },
    "questions": {
      "type": "object",
      "description": "Map of question radio names to pre-fill values. Key format: aig_{domain}_{question}. Domains: D1 (AI Strategy & Governance, 7 questions), D2 (Risk Management, 7 questions), D3 (Data Governance, 7 questions — 3 for deployer-only orgs), D4 (Transparency & Fairness, 7 questions), D5 (AI Security & Robustness, 7 questions — 5 for deployer-only), D6 (Lifecycle & Accountability, 7 questions — 4 for deployer-only). Example keys: aig_D1_1, aig_D3_2, aig_D5_4. Note: builder-specific questions (D3_4–D3_7, D5_3 and D5_6–D5_7, D6_5–D6_7) are auto-scored N/A for deployer-only organisations.",
      "propertyNames": {
        "pattern": "^aig_D[1-6]_[0-9]+$"
      },
      "additionalProperties": {
        "$ref": "#/$defs/questionEntry"
      },
      "examples": [
        {
          "aig_D1_1": {
            "suggested_value": "partial",
            "evidence_summary": "AI strategy documented at department level; board-level AI governance policy not yet formalised"
          },
          "aig_D3_1": {
            "suggested_value": "achieved",
            "evidence_summary": "Data catalogue maintained in Collibra; 94% of AI training datasets catalogued with lineage and quality scores",
            "evidence_detail": "6 datasets pending cataloguing (legacy NLP corpus, 2 third-party datasets under DPA review). Collibra data steward: data-governance@org.example.",
            "raw_stats": {
              "total_datasets": 104,
              "catalogued": 98,
              "with_lineage": 91,
              "with_quality_score": 88
            }
          },
          "aig_D5_1": {
            "suggested_value": "partial",
            "evidence_summary": "Adversarial robustness testing conducted for 6 of 9 production models; 3 models pending testing scheduled Q3 2026"
          }
        }
      ]
    }
  },
  "$defs": {
    "questionEntry": {
      "type": "object",
      "required": ["suggested_value"],
      "additionalProperties": false,
      "properties": {
        "suggested_value": {
          "type": "string",
          "enum": ["achieved", "partial", "not-achieved", "na"],
          "description": "'achieved' = ready, 'partial' = partially ready, 'not-achieved' = not ready, 'na' = not applicable. The user reviews and confirms before submission."
        },
        "evidence_summary": {
          "type": "string",
          "maxLength": 500,
          "description": "CLAUDE-SAFE. Aggregated, identifier-free summary. May be included in Phronesis analysis. No model names, dataset paths, or personal data."
        },
        "evidence_detail": {
          "type": "string",
          "description": "EVIDENCE VAULT ONLY. Detailed MLOps data or model specifics. Never sent to Phronesis AI."
        },
        "raw_stats": {
          "type": "object",
          "description": "EVIDENCE VAULT ONLY. Machine-readable statistics. Never sent to Phronesis AI.",
          "additionalProperties": true
        }
      }
    }
  }
}
