{
  "tool_id": "art-236-build-ai-decision-log-record",
  "note": "EU AI Act Art 12(2) decision log record builder. Known constants: retention >= 6 months; subject_ref is STRUCTURAL (synthetic/opaque IDs only, never real personal data). Hash chain: sha256_prev_record is a 64-hex SHA-256 of the prior record or empty for first record.",
  "vectors": [
    {
      "name": "complete_credit_record_first_in_chain",
      "description": "Creditworthiness AI decision (CREDIT_APPROVED, confidence 0.92). All Art 12(2) required fields present. First record in chain (sha256_prev_record empty). Subject ref is synthetic opaque case ID.",
      "policy_parameters": {
        "model_id": "credit-ai-v2",
        "model_version": "2.1.0",
        "input_digest": "abc123def456abc123def456abc123def456abc123def456abc123def456abcd",
        "output_digest": "def456abc123def456abc123def456abc123def456abc123def456abc123def4",
        "decision_label": "CREDIT_APPROVED",
        "confidence": 0.92,
        "override_flag": false,
        "subject_ref": "CASE-0042",
        "retention_months": 12,
        "operator_id": "bank-xyz"
      },
      "output_payload": {
        "record_status": "COMPLETE",
        "model_id": "credit-ai-v2",
        "model_version": "2.1.0",
        "input_digest": "abc123def456abc123def456abc123def456abc123def456abc123def456abcd",
        "output_digest": "def456abc123def456abc123def456abc123def456abc123def456abc123def4",
        "decision_label": "CREDIT_APPROVED",
        "confidence": 0.92,
        "override_flag": false,
        "override_by": null,
        "subject_ref": "CASE-0042",
        "system_context": "",
        "sha256_prev_record": "",
        "chain_position": "first",
        "missing_art12_fields": [],
        "art12_fields_present": true,
        "art12_completeness_score": 100,
        "retention_months": 12,
        "operator_id": "bank-xyz",
        "ha_evidence_bundle": null,
        "anchor_surface": "anchor.ainumbers.co/mcp",
        "anchor_tools": {
          "single": "anchor_hash",
          "batch": "anchor_batch",
          "note": "Use anchor_hash for individual records; anchor_batch for high-volume agent log streams (Merkle tree over N leaf hashes)."
        },
        "pii_note": "subject_ref is a STRUCTURAL field for synthetic/opaque case IDs only. MUST NOT contain real personal identifiers (names, SSN, NPI, or similar). Zero PII by construction.",
        "regulatory_basis": "EU AI Act (Reg. 2024/1689) Art 12(2), Art 26(6), Annex III 5(b) creditworthiness / 5(c) life-health insurance pricing",
        "table_version": "EU-AIA-ART12-2024-1689-R1",
        "enforcement_dates": {
          "original": "2026-08-02",
          "digital_omnibus_proposed": "2027-12-02",
          "note": "Digital Omnibus amendments (European Parliament final approval, 16 June 2026) confirm Annex III high-risk obligations move to 2 December 2027."
        }
      },
      "golden_hash": "133da2bb161113b711680a8b507d48851b7ab1d496013e84a7336fa9f31e8ec8",
      "compliance_flags": []
    },
    {
      "name": "chained_insurance_record_with_override",
      "description": "Life/health insurance pricing AI decision (PREMIUM_TIER_2). Chained record (sha256_prev_record set). Human override flag active. Known constant: chain_position=chained when sha256_prev_record is non-empty.",
      "policy_parameters": {
        "model_id": "insurance-ai-v1",
        "model_version": "1.0.1",
        "input_digest": "1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcd",
        "output_digest": "fedcba0987654321fedcba0987654321fedcba0987654321fedcba09876543",
        "decision_label": "PREMIUM_TIER_2",
        "confidence": 0.75,
        "override_flag": true,
        "override_by": "human-reviewer",
        "subject_ref": "CASE-0100",
        "sha256_prev_record": "0000000000000000000000000000000000000000000000000000000000000001",
        "retention_months": 6,
        "operator_id": "insurer-abc"
      },
      "output_payload": {
        "record_status": "COMPLETE",
        "model_id": "insurance-ai-v1",
        "model_version": "1.0.1",
        "input_digest": "1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcd",
        "output_digest": "fedcba0987654321fedcba0987654321fedcba0987654321fedcba09876543",
        "decision_label": "PREMIUM_TIER_2",
        "confidence": 0.75,
        "override_flag": true,
        "override_by": "human-reviewer",
        "subject_ref": "CASE-0100",
        "system_context": "",
        "sha256_prev_record": "0000000000000000000000000000000000000000000000000000000000000001",
        "chain_position": "chained",
        "missing_art12_fields": [],
        "art12_fields_present": true,
        "art12_completeness_score": 100,
        "retention_months": 6,
        "operator_id": "insurer-abc",
        "ha_evidence_bundle": null,
        "anchor_surface": "anchor.ainumbers.co/mcp",
        "anchor_tools": {
          "single": "anchor_hash",
          "batch": "anchor_batch",
          "note": "Use anchor_hash for individual records; anchor_batch for high-volume agent log streams (Merkle tree over N leaf hashes)."
        },
        "pii_note": "subject_ref is a STRUCTURAL field for synthetic/opaque case IDs only. MUST NOT contain real personal identifiers (names, SSN, NPI, or similar). Zero PII by construction.",
        "regulatory_basis": "EU AI Act (Reg. 2024/1689) Art 12(2), Art 26(6), Annex III 5(b) creditworthiness / 5(c) life-health insurance pricing",
        "table_version": "EU-AIA-ART12-2024-1689-R1",
        "enforcement_dates": {
          "original": "2026-08-02",
          "digital_omnibus_proposed": "2027-12-02",
          "note": "Digital Omnibus amendments (European Parliament final approval, 16 June 2026) confirm Annex III high-risk obligations move to 2 December 2027."
        }
      },
      "golden_hash": "43341cade97a12d19f870860554b62e68007c08730a96466c93a7e8f12e98657",
      "compliance_flags": [
        "HUMAN_OVERRIDE_RECORDED"
      ]
    },
    {
      "name": "empty_input_finite",
      "description": "Empty inputs return EMPTY_INPUT sentinel with finite zero-state. Confirms empty-input-finite gate.",
      "policy_parameters": {},
      "output_payload": {
        "record_status": "EMPTY_INPUT",
        "ha_evidence_bundle": null,
        "model_id": "unknown-model",
        "model_version": "0.0.0",
        "input_digest": "",
        "output_digest": "",
        "decision_label": "",
        "confidence": 0,
        "override_flag": false,
        "override_by": null,
        "subject_ref": "",
        "system_context": "",
        "sha256_prev_record": "",
        "chain_position": "first",
        "retention_months": 6,
        "operator_id": "",
        "art12_fields_present": false,
        "art12_completeness_score": 0,
        "anchor_surface": "anchor.ainumbers.co/mcp",
        "anchor_tools": {
          "single": "anchor_hash",
          "batch": "anchor_batch"
        },
        "pii_note": "subject_ref is a STRUCTURAL field for synthetic/opaque case IDs only. No real personal identifiers.",
        "regulatory_basis": "EU AI Act (Reg. 2024/1689) Art 12(2), Annex III 5(b)/(5)(c)",
        "table_version": "EU-AIA-ART12-2024-1689-R1",
        "enforcement_dates": {
          "original": "2026-08-02",
          "digital_omnibus_proposed": "2027-12-02",
          "note": "Digital Omnibus amendments (European Parliament final approval, 16 June 2026) confirm Annex III high-risk obligations move to 2 December 2027."
        }
      },
      "golden_hash": "b4252518f039dc06eb82d4abab8ff729049421d79ee9e92b0deb29eeed07fb24",
      "compliance_flags": [
        "EMPTY_INPUT"
      ]
    },
    {
      "name": "ha_conv1_subject_hash_bundle",
      "description": "HA-CONV-1: same decision as complete_credit_record_first_in_chain, but the caller declares subject_hash (the sealed decision artifact this Art-12 entry evidences) plus one collected section-27.2 record -- consumed into a section-27.6 evidence bundle (HA_EVIDENCE_BUNDLE_ATTACHED). anchor_surface / anchor_tools stay untouched, proving additive convergence.",
      "policy_parameters": {
        "model_id": "credit-ai-v2",
        "model_version": "2.1.0",
        "input_digest": "abc123def456abc123def456abc123def456abc123def456abc123def456abcd",
        "output_digest": "def456abc123def456abc123def456abc123def456abc123def456abc123def4",
        "decision_label": "CREDIT_APPROVED",
        "confidence": 0.92,
        "override_flag": false,
        "subject_ref": "CASE-0042",
        "retention_months": 12,
        "operator_id": "bank-xyz",
        "subject_hash": "sha256:5555555555555555555555555555555555555555555555555555555555555555",
        "human_accountability_records": [
          {
            "record_type": "approval",
            "role": "reviewer",
            "subject_hash": "sha256:5555555555555555555555555555555555555555555555555555555555555555",
            "identity": {
              "id": "did:key:z6MkjExampleReviewerIdentity"
            },
            "decision": "approve"
          }
        ]
      },
      "output_payload": {
        "record_status": "COMPLETE",
        "model_id": "credit-ai-v2",
        "model_version": "2.1.0",
        "input_digest": "abc123def456abc123def456abc123def456abc123def456abc123def456abcd",
        "output_digest": "def456abc123def456abc123def456abc123def456abc123def456abc123def4",
        "decision_label": "CREDIT_APPROVED",
        "confidence": 0.92,
        "override_flag": false,
        "override_by": null,
        "subject_ref": "CASE-0042",
        "system_context": "",
        "sha256_prev_record": "",
        "chain_position": "first",
        "missing_art12_fields": [],
        "art12_fields_present": true,
        "art12_completeness_score": 100,
        "retention_months": 12,
        "operator_id": "bank-xyz",
        "ha_evidence_bundle": {
          "subject_hash": "sha256:5555555555555555555555555555555555555555555555555555555555555555",
          "verification_result": "CREDIT_APPROVED",
          "reviewers": [
            "did:key:z6MkjExampleReviewerIdentity"
          ]
        },
        "anchor_surface": "anchor.ainumbers.co/mcp",
        "anchor_tools": {
          "single": "anchor_hash",
          "batch": "anchor_batch",
          "note": "Use anchor_hash for individual records; anchor_batch for high-volume agent log streams (Merkle tree over N leaf hashes)."
        },
        "pii_note": "subject_ref is a STRUCTURAL field for synthetic/opaque case IDs only. MUST NOT contain real personal identifiers (names, SSN, NPI, or similar). Zero PII by construction.",
        "regulatory_basis": "EU AI Act (Reg. 2024/1689) Art 12(2), Art 26(6), Annex III 5(b) creditworthiness / 5(c) life-health insurance pricing",
        "table_version": "EU-AIA-ART12-2024-1689-R1",
        "enforcement_dates": {
          "original": "2026-08-02",
          "digital_omnibus_proposed": "2027-12-02",
          "note": "Digital Omnibus amendments (European Parliament final approval, 16 June 2026) confirm Annex III high-risk obligations move to 2 December 2027."
        }
      },
      "compliance_flags": [
        "HA_EVIDENCE_BUNDLE_ATTACHED"
      ],
      "golden_hash": "053610998410e790fabd8cc8917ea52291d3408c729a48583a650dd344126d10"
    }
  ]
}
