// Quality Intelligence policy-profile constants (Epic #270, Issue #272).
//
// Pure data, deeply frozen. A policy profile carries the per-domain heuristic
// configuration that downstream callers (validators, test-design model,
// coverage relevance) blend with the source envelopes. v1 only encodes the
// fields the test-design model needs; richer governance policies land with
// #282.
//
// Inspired structurally by the per-domain heuristics under
// Test Intelligence reference (TI) packages/core-engine/src/intent-derivation.ts
// — porting the lexical hints, not any provider-specific tuning.
const freezeProfile = (profile) => {
    for (const keywords of profile.priorityKeywords) {
        Object.freeze(keywords);
    }
    Object.freeze(profile.priorityKeywords);
    for (const value of Object.values(profile.riskKeywords)) {
        Object.freeze(value);
    }
    Object.freeze(profile.riskKeywords);
    return Object.freeze(profile);
};
/**
 * Default profile for banking workflows. Heightens safety/compliance terms.
 */
export const bankingDefault = freezeProfile({
    id: "banking-default",
    displayLabel: "Banking — default",
    priorityKeywords: [
        ["fraud", "aml", "kyc", "sanction"],
        ["payment", "transfer", "settlement", "interest"],
        ["statement", "balance", "ledger"],
        ["preference", "theme", "marketing"],
    ],
    riskKeywords: {
        safety: ["unauthorised", "lockout", "credential", "session"],
        compliance: ["aml", "kyc", "gdpr", "regulator", "sanction", "audit"],
        regression: ["regression", "smoke", "release"],
        functional: ["enter", "submit", "confirm", "cancel"],
        visual: ["layout", "spacing", "colour", "color", "icon"],
    },
    defaultRiskClass: "compliance",
    defaultPriority: "P2",
});
/**
 * Default profile for insurance workflows. Tracks policy/claim language.
 */
export const insuranceDefault = freezeProfile({
    id: "insurance-default",
    displayLabel: "Insurance — default",
    priorityKeywords: [
        ["fraud", "denial", "fatality"],
        ["claim", "policy", "premium", "underwriting"],
        ["quote", "renewal"],
        ["preference", "marketing", "newsletter"],
    ],
    riskKeywords: {
        safety: ["fatal", "injury", "exposure"],
        compliance: ["regulator", "gdpr", "consent", "broker"],
        regression: ["regression", "smoke"],
        functional: ["submit", "renew", "approve", "decline"],
        visual: ["layout", "spacing", "icon", "logo"],
    },
    defaultRiskClass: "functional",
    defaultPriority: "P2",
});
/**
 * Default profile for regression suites. Biases toward existing functional
 * paths over novel discovery.
 */
export const regressionDefault = freezeProfile({
    id: "regression-default",
    displayLabel: "Regression — default",
    priorityKeywords: [
        ["smoke", "critical-path", "release"],
        ["regression"],
        ["edge-case"],
        ["nice-to-have"],
    ],
    riskKeywords: {
        safety: ["crash", "data-loss"],
        compliance: ["audit", "log"],
        regression: ["regression", "smoke", "release", "stable"],
        functional: ["form", "click", "submit"],
        visual: ["layout", "colour", "color", "spacing"],
    },
    defaultRiskClass: "regression",
    defaultPriority: "P2",
});
export const ALL_POLICY_PROFILES = Object.freeze([
    bankingDefault,
    insuranceDefault,
    regressionDefault,
]);
