/**
 * Dual-layer mechanism definitions — audit_tail section.
 * Auto-extracted from the monolithic dual_layer_mechanism_registry.
 */
export const MECHANISM_CONTRACTS_AUDIT_TAIL = [
    // ── 变更协调 ──
    {
        mechanism_id: "mc-change-coordination",
        mechanism_name: "变更协调",
        owner_issue_id: "审计补注册",
        priority: "P1",
        template_layer: {
            required: false,
            assets: [],
            injected_routes: ["code_change"],
            injected_workflows: ["code_change", "verification"],
            target_hosts: ["claude_code"],
            language_policy: "zh_first",
        },
        enforcement_layer: {
            required: true,
            enforcers: ["src/engine/change_coordinator.ts"],
            registries: ["mechanism_contract_registry"],
            entrypoints: ["checkConflicts"],
            state_effects: ["coordination_check → conflict_report"],
            hard_fail_conditions: [],
            degradation_behavior: "协调检查不可用时允许但标记 advisory",
        },
        evidence_layer: {
            outputs: ["CoordinationCheckResult"],
            reports: ["ChangeCoordinationReport"],
            diagnostic_codes: [],
            task_context_facts: [],
        },
        verification_layer: {
            tests: ["tests/engine/change_coordinator.test.ts"],
            runtime_checks: ["conflict_detection"],
            regression_cases: ["conflict_detected"],
            drift_checks: [],
        },
        status: "code_only_enforced",
    },
    // ── 测试质量保证 ──
    {
        mechanism_id: "mc-test-quality-assurance",
        mechanism_name: "测试质量保证",
        owner_issue_id: "审计补注册",
        priority: "P1",
        template_layer: {
            required: false,
            assets: [],
            injected_routes: ["code_change"],
            injected_workflows: ["verification"],
            target_hosts: ["claude_code"],
            language_policy: "zh_first",
        },
        enforcement_layer: {
            required: true,
            enforcers: ["src/engine/audit/test_quality.ts"],
            registries: ["mechanism_contract_registry"],
            entrypoints: ["analyzeTestQuality", "parseLcov"],
            state_effects: ["test_quality_report → coverage_check"],
            hard_fail_conditions: ["测试覆盖不足"],
            degradation_behavior: "质量数据不可用时降级为 advisory",
        },
        evidence_layer: {
            outputs: ["TestQualityReport", "CoverageMap"],
            reports: ["TestQualityReport"],
            diagnostic_codes: [],
            task_context_facts: [],
        },
        verification_layer: {
            tests: ["tests/engine/test_quality.test.ts"],
            runtime_checks: ["test_quality_checked"],
            regression_cases: ["low_coverage_detected"],
            drift_checks: [],
        },
        status: "code_only_enforced",
    },
    // ── 配置自动修复 ──
    {
        mechanism_id: "mc-config-auto-repair",
        mechanism_name: "配置自动修复",
        owner_issue_id: "审计补注册",
        priority: "P2",
        template_layer: {
            required: false,
            assets: [],
            injected_routes: ["operation"],
            injected_workflows: ["init"],
            target_hosts: ["claude_code"],
            language_policy: "zh_first",
        },
        enforcement_layer: {
            required: true,
            enforcers: ["src/engine/config/config_auto_repair.ts"],
            registries: ["mechanism_contract_registry"],
            entrypoints: ["analyzeConfigRepair", "repairProjectConfig"],
            state_effects: ["config_repair → fixed_config"],
            hard_fail_conditions: [],
            degradation_behavior: "自动修复失败时回退为手动配置",
        },
        evidence_layer: {
            outputs: ["ConfigRepairAnalysis", "ConfigRepairResult"],
            reports: ["ConfigRepairReport"],
            diagnostic_codes: [],
            task_context_facts: [],
        },
        verification_layer: {
            tests: ["tests/engine/config_auto_repair.test.ts"],
            runtime_checks: ["config_repair_valid"],
            regression_cases: ["repair_preserves_valid_config"],
            drift_checks: [],
        },
        status: "experimental_dual_layer",
    },
];
//# sourceMappingURL=mechanisms_audit_tail.js.map