/**
 * AU Mandatory Guardrails for AI in High-Risk Settings (proposed)
 *
 * Status as at April 2026: Legislation IN DEVELOPMENT. "Proposals Paper:
 * Mandatory Guardrails for AI in High-Risk Settings" published by DISR September
 * 2024; consultation closed October 2024. No final legislation enacted as at
 * April 2026. Government indicated framework will progress 2025-2026; specific
 * form (standalone AI legislation, sector amendments, or co-regulatory code)
 * not finalised.
 *
 * [CITATION TO VERIFY]: All specific legislative references in this pack are
 * based on the September 2024 Proposals Paper. Verify parliamentary passage
 * and final form before relying on them as enacted obligations. The pack
 * represents forward-looking compliance readiness only until legislation is
 * enacted.
 *
 * Proposed scope: Organisations deploying AI in "high-risk settings":
 *   - Healthcare diagnosis/treatment
 *   - Credit/insurance
 *   - Employment screening
 *   - Law enforcement/justice
 *   - Education assessment
 *   - Government benefits
 *
 * 10 proposed mandatory guardrails (mirror Voluntary AI Safety Standard G1-G10
 * but legally enforceable for high-risk settings [CITATION TO VERIFY]):
 *   G1 Accountability, G2 Risk Assessment + Governance, G3 Stakeholder Consultation,
 *   G4 Human Oversight, G5 Testing/Validation, G6 Documentation/Provenance,
 *   G7 Transparency, G8 Redress/Appeal, G9 Privacy Protection, G10 Security.
 *
 * Proposed enforcement [CITATION TO VERIFY]: Civil penalty regime similar to
 * Privacy Act/Corporations Act structure; DISR or designated regulator with
 * investigation/enforcement powers; sector regulators (APRA, ASIC, TGA, OAIC)
 * likely to enforce within sectors.
 *
 * Cross-pack interactions:
 *   - au-mandatory-ai-guardrails + au-aiethics-framework: Voluntary is precursor.
 *     Run both; voluntary covers current operative standard; mandatory covers
 *     anticipated requirements. Mandatory becomes primary post-enactment.
 *   - au-mandatory-ai-guardrails + euaiact: EU AI Act most mature high-risk AI
 *     framework globally; AU proposals substantially inspired by EU. EU certified
 *     systems should achieve AU mandatory compliance [CITATION TO VERIFY CE-marking
 *     sufficiency for AU proposed requirements].
 *   - au-mandatory-ai-guardrails + au-tga-saimd: Healthcare TGA SaMD requirements
 *     substantially overlap with proposed mandatory guardrails for healthcare
 *     high-risk settings. TGA-approved SaMD with GMLP, PCCP, clinical evidence,
 *     post-market monitoring satisfies most proposed guardrails.
 *
 * Authority: Department of Industry, Science and Resources (DISR) + AU Parliament
 * Sovereignty: Australian Federal (proposed)
 *
 * @connexum/ai-governance
 */
export const AU_MANDATORY_AI_GUARDRAILS_CATEGORY_CLASSIFIERS = {
    AU_HIGH_RISK_AI_SETTING: {
        references: ['Proposals Paper Sept 2024 — high-risk settings: healthcare, credit, employment, law enforcement, education, government benefits [CITATION TO VERIFY enacted scope]'],
        classifier: (input) => {
            if (/\b(?:high[_\-\s]?risk\s+ai\s+(?:setting|context|deployment)|ai\s+(?:in\s+)?(?:healthcare\s+diagnosis|credit\s+(?:decision|assessment)|employment\s+screening|law\s+enforcement|government\s+benefits|education\s+assessment))/i.test(input))
                return true;
            return false;
        },
    },
    AU_MANDATORY_AI_ACCOUNTABILITY_GAP: {
        references: ['Proposed G1 [CITATION TO VERIFY] — designated accountable person for high-risk AI'],
        classifier: (input) => {
            if (/\b(?:no\s+(?:designated|identified)\s+(?:accountable|responsible)\s+person.*high[_\-\s]?risk\s+ai|accountability\s+gap.*(?:high[_\-\s]?risk|mandatory\s+guardrail))/i.test(input))
                return true;
            return false;
        },
    },
    AU_MANDATORY_AI_NO_TRANSPARENCY: {
        references: ['Proposed G7 [CITATION TO VERIFY] — mandatory disclosure when AI used in high-risk decision'],
        classifier: (input) => {
            if (/\b(?:ai\s+decision\s+without\s+(?:disclosure|transparency).*high[_\-\s]?risk|undisclosed\s+high[_\-\s]?risk\s+ai|mandatory\s+(?:ai\s+)?disclosure.*high[_\-\s]?risk)/i.test(input))
                return true;
            return false;
        },
    },
    AU_MANDATORY_AI_NO_REDRESS: {
        references: ['Proposed G8 [CITATION TO VERIFY] — mandatory human review mechanism for high-risk AI decisions'],
        classifier: (input) => {
            if (/\b(?:no\s+human\s+review.*high[_\-\s]?risk\s+ai|redress\s+(?:mechanism\s+)?(?:absent|missing).*(?:high[_\-\s]?risk|mandatory\s+guardrail)|proposed\s+g8.*missing)/i.test(input))
                return true;
            return false;
        },
    },
    AU_MANDATORY_AI_TESTING_GAP: {
        references: ['Proposed G5 [CITATION TO VERIFY] — mandatory pre-deployment testing for high-risk AI'],
        classifier: (input) => {
            if (/\b(?:(?:not\s+tested|untested)\s+(?:high[_\-\s]?risk|mandatory\s+guardrail)\s+ai|testing\s+gap.*high[_\-\s]?risk\s+ai\s+deployment)/i.test(input))
                return true;
            return false;
        },
    },
};
export const AU_MANDATORY_AI_GUARDRAILS_PACK = {
    categoryClassifiers: AU_MANDATORY_AI_GUARDRAILS_CATEGORY_CLASSIFIERS,
    /**
     * P3.5: AU_MANDATORY_AI_NO_TRANSPARENCY is subject-keyed — individuals
     * affected by undisclosed high-risk AI decisions carry subject IDs for G7
     * transparency tracking once mandatory. All other categories are system/
     * governance-level (non-subject-keyed).
     *
     * Note: All specific obligations carry [CITATION TO VERIFY] — these reflect
     * the September 2024 Proposals Paper, not enacted law. Update when legislation
     * is confirmed.
     */
    subjectKeyedCategories: [
        'AU_MANDATORY_AI_NO_TRANSPARENCY',
    ],
    id: 'au-mandatory-ai-guardrails',
    name: 'AU Mandatory Guardrails for AI in High-Risk Settings (proposed)',
    version: '1.0.0',
    description: 'Forward-looking compliance pack for Australia\'s proposed mandatory guardrails for AI in high-risk settings (DISR Proposals Paper September 2024). No final legislation enacted as at April 2026. [CITATION TO VERIFY — all obligations]. Covers proposed G1-G10 guardrails for healthcare, credit/insurance, employment screening, law enforcement, education assessment, and government benefits AI. Run alongside au-aiethics-framework for current voluntary standard.',
    authority: 'Department of Industry, Science and Resources (DISR) + AU Parliament [proposed]',
    industries: [
        'all-au-high-risk', 'healthcare', 'financial-services',
        'government', 'critical-infrastructure', 'legal', 'employment', 'education',
    ],
    requiredModules: [
        {
            name: 'governance-runtime',
            required: true,
            reason: 'Proposed G1 accountable person [CTV]; G2 mandatory risk assessment gate [CTV]; G4 human oversight enforcement [CTV]; G8 redress mechanism [CTV]',
            reference: 'DISR Proposals Paper Sept 2024 G1, G2, G4, G8 [CITATION TO VERIFY]',
        },
        {
            name: 'audit-integrity',
            required: true,
            reason: 'Proposed G6 mandatory model documentation [CTV]; G5 testing records; accountability designation records',
            reference: 'DISR Proposals Paper Sept 2024 G5, G6 [CITATION TO VERIFY]',
        },
        {
            name: 'transparency-injector',
            required: true,
            reason: 'Proposed G7 mandatory AI disclosure in high-risk decisions [CTV]; G8 explanation on request [CTV]',
            reference: 'DISR Proposals Paper Sept 2024 G7, G8 [CITATION TO VERIFY]',
        },
        {
            name: 'approval-queue',
            required: true,
            reason: 'Proposed G2 pre-deployment risk assessment approval for high-risk AI [CTV]; G4 human review mandatory [CTV]',
            reference: 'DISR Proposals Paper Sept 2024 G2, G4 [CITATION TO VERIFY]',
        },
        {
            name: 'data-classifier',
            required: true,
            reason: 'Classify AU_HIGH_RISK_AI_SETTING, AU_MANDATORY_AI_ACCOUNTABILITY_GAP, AU_MANDATORY_AI_NO_TRANSPARENCY, AU_MANDATORY_AI_NO_REDRESS, AU_MANDATORY_AI_TESTING_GAP; detect proposed-guardrail violations in AI system outputs [CITATION TO VERIFY enacted scope]',
            reference: 'DISR Proposals Paper Sept 2024 G2, G5, G7, G8 [CITATION TO VERIFY]',
        },
    ],
    moduleConfig: {
        'data-classifier': {
            enabledCategories: [
                'AU_HIGH_RISK_AI_SETTING',
                'AU_MANDATORY_AI_ACCOUNTABILITY_GAP',
                'AU_MANDATORY_AI_NO_TRANSPARENCY',
                'AU_MANDATORY_AI_NO_REDRESS',
                'AU_MANDATORY_AI_TESTING_GAP',
            ],
            highRiskAiApprovalRequired: true,
            accountablePersonDefined: true,
            aiDisclosureActive: true,
            humanReviewMechanismActive: true,
            testingRecordsOnFile: true,
            provenanceDocumentationOnFile: true,
        },
        'governance-runtime': {
            highRiskAiApprovalRequired: true,
            accountablePersonDefined: true,
            aiDisclosureActive: true,
            humanReviewMechanismActive: true,
            testingRecordsOnFile: true,
            provenanceDocumentationOnFile: true,
        },
        'transparency-injector': {
            highRiskAiDisclosureRequired: true,
            explanationOnRequestRequired: true,
        },
        'approval-queue': {
            highRiskAiPreDeploymentApprovalRequired: true,
            humanReviewForHighRiskRequired: true,
        },
    },
    providerPolicy: {
        blockedProviders: [],
        requiredCapabilities: [
            'PROVENANCE-DOCUMENTATION',
            'HUMAN-REVIEW-CAPABILITY',
            'HIGH-RISK-AI-GOVERNANCE',
        ],
        blockReasons: {},
    },
    dataPolicy: {
        scanCategories: [
            'AU_HIGH_RISK_AI_SETTING',
            'AU_MANDATORY_AI_ACCOUNTABILITY_GAP',
            'AU_MANDATORY_AI_NO_TRANSPARENCY',
            'AU_MANDATORY_AI_NO_REDRESS',
            'AU_MANDATORY_AI_TESTING_GAP',
        ],
        categoryActions: {
            AU_HIGH_RISK_AI_SETTING: 'REQUIRE_APPROVAL',
            AU_MANDATORY_AI_ACCOUNTABILITY_GAP: 'WARN',
            AU_MANDATORY_AI_NO_TRANSPARENCY: 'WARN',
            AU_MANDATORY_AI_NO_REDRESS: 'WARN',
            AU_MANDATORY_AI_TESTING_GAP: 'WARN',
        },
        encryptionRequired: false,
        encryptionStandard: 'AES-256',
        minimumClassification: 'INTERNAL',
    },
    retentionPolicy: {
        sovereignty: ['AU'],
        auditLogRetentionDays: 1825, // Apply au-aiethics-framework standards pending legislation
        sessionRetentionDays: 1825,
        incidentRetentionDays: 1825,
        reference: 'Pending legislation: apply au-aiethics-framework 5y standards. Update to statutory periods when enacted [CITATION TO VERIFY].',
    },
    incidentPolicy: {
        notificationDeadlineHours: 0, // No enacted obligations; apply sector-specific packs (au-privacy-act, au-cps234, au-soci-act)
        reference: 'No enacted mandatory AI notification regime as at April 2026 [CITATION TO VERIFY proposed mandatory reporting]. Apply au-privacy-act NDB + sector packs.',
        requiredRecipients: [],
        formalNotificationRequired: false,
    },
    validators: [
        {
            id: 'au-mandatory-ai-high-risk-gate',
            description: 'High-risk AI deployment requires pre-activation approval verifying all 10 proposed guardrails [CITATION TO VERIFY enacted scope]',
            reference: 'DISR Proposals Paper Sept 2024 G2 [CITATION TO VERIFY]',
            check: 'au_mandatory_ai_high_risk_gate_active',
            failSeverity: 'HIGH',
        },
        {
            id: 'au-mandatory-ai-accountability',
            description: 'Accountable person designated for high-risk AI system [CITATION TO VERIFY enacted requirement]',
            reference: 'DISR Proposals Paper Sept 2024 G1 [CITATION TO VERIFY]',
            check: 'au_mandatory_ai_accountability_active',
            failSeverity: 'HIGH',
        },
        {
            id: 'au-mandatory-ai-transparency',
            description: 'AI disclosure operational for high-risk decisions [CITATION TO VERIFY enacted requirement]',
            reference: 'DISR Proposals Paper Sept 2024 G7 [CITATION TO VERIFY]',
            check: 'au_mandatory_ai_transparency_active',
            failSeverity: 'HIGH',
        },
        {
            id: 'au-mandatory-ai-redress',
            description: 'Human review mechanism active for high-risk AI decisions [CITATION TO VERIFY enacted requirement]',
            reference: 'DISR Proposals Paper Sept 2024 G8 [CITATION TO VERIFY]',
            check: 'au_mandatory_ai_redress_active',
            failSeverity: 'HIGH',
        },
        {
            id: 'au-mandatory-ai-testing',
            description: 'AI tested before high-risk deployment with testing records on file [CITATION TO VERIFY enacted requirement]',
            reference: 'DISR Proposals Paper Sept 2024 G5 [CITATION TO VERIFY]',
            check: 'au_mandatory_ai_testing_active',
            failSeverity: 'MEDIUM',
        },
        {
            id: 'au-mandatory-ai-provenance',
            description: 'Model provenance documentation on file for high-risk AI [CITATION TO VERIFY enacted requirement]',
            reference: 'DISR Proposals Paper Sept 2024 G6 [CITATION TO VERIFY]',
            check: 'au_mandatory_ai_provenance_active',
            failSeverity: 'MEDIUM',
        },
    ],
};
//# sourceMappingURL=au-mandatory-ai-guardrails.js.map