/**
 * 内置契约 — 扩展契约 (contracts 31–55)
 *
 * 保留策略、知识生命周期、知识演进、模板同步、适配器 Prompt、
 * 文档治理、用户承诺、发布兼容、语言策略覆盖、中文语义优先、
 * 扩展、平台兼容、治理动作、脑暴、细节纪律、第一性原理、
 * 架构设计、现有系统分析、编码准备、本地验收、工作流模板包、
 * 演进回归、Plan Proposal Gate、Core Experience Principle、
 * Knowledge Asset Governance
 */
export const BUILTIN_CONTRACTS_EXTENDED = [
    // ── 31. 保留策略契约 ──
    {
        contract_id: "retention_policy_contract",
        kind: "knowledge_evolution",
        name: "保留策略契约",
        state: "advisory",
        owner_component: "engine/retention_policy",
        owner_files: ["src/engine/retention_policy.ts"],
        test_files: ["tests/engine/verification_scenario_matrix.test.ts"],
        lifecycle_test_files: [],
        knowledge_refs: [],
        prompt_refs: [],
        depends_on: [],
        consumed_by: ["main_path_integration_contract"],
        hard_fail_allowed: false,
        promotion_conditions: ["所有记录类型有保留策略"],
        demotion_conditions: ["清理策略删除仍被引用的 evidence"],
        evidence_requirements: ["retention policy 测试通过"],
    },
    // ── 32. 知识生命周期契约（问题七） ──
    {
        contract_id: "knowledge_lifecycle_contract",
        kind: "knowledge_lifecycle",
        name: "知识生命周期契约",
        state: "enforced",
        owner_component: "engine/knowledge_lifecycle",
        owner_files: ["src/engine/knowledge/knowledge_lifecycle.ts"],
        test_files: ["tests/engine/knowledge_scenario_matrix.test.ts"],
        lifecycle_test_files: ["tests/engine/knowledge_scenario_matrix.test.ts"],
        knowledge_refs: [],
        prompt_refs: [],
        depends_on: ["knowledge_evolution_contract"],
        consumed_by: ["main_path_integration_contract"],
        hard_fail_allowed: true,
        promotion_conditions: ["知识生命周期状态机完整测试"],
        demotion_conditions: ["知识生命周期产生误判"],
        evidence_requirements: ["知识生命周期场景矩阵通过"],
    },
    // ── 33. 知识演进契约（问题十四） ──
    {
        contract_id: "knowledge_evolution_contract",
        kind: "knowledge_evolution",
        name: "知识演进契约",
        state: "enforced",
        owner_component: "engine/knowledge_evolution",
        owner_files: ["src/engine/knowledge/knowledge_evolution.ts"],
        test_files: ["tests/engine/knowledge_scenario_matrix.test.ts"],
        lifecycle_test_files: ["tests/engine/knowledge_scenario_matrix.test.ts"],
        knowledge_refs: [],
        prompt_refs: [],
        depends_on: ["knowledge_lifecycle_contract"],
        consumed_by: ["main_path_integration_contract"],
        hard_fail_allowed: true,
        promotion_conditions: ["Evidence-based promotion 有完整测试"],
        demotion_conditions: ["知识演进产生误判"],
        evidence_requirements: ["知识演进场景矩阵通过"],
    },
    // ── 34. 模板同步契约（问题二十五） ──
    {
        contract_id: "template_sync_contract",
        kind: "template_sync",
        name: "模板同步契约",
        state: "enforced",
        owner_component: "engine/template_sync",
        owner_files: ["src/engine/templates/template_sync.ts"],
        test_files: ["tests/engine/knowledge_scenario_matrix.test.ts"],
        lifecycle_test_files: ["tests/engine/knowledge_scenario_matrix.test.ts"],
        knowledge_refs: [],
        prompt_refs: [],
        depends_on: ["knowledge_lifecycle_contract"],
        consumed_by: ["main_path_integration_contract"],
        hard_fail_allowed: true,
        promotion_conditions: ["模板同步 dry-run/apply 有完整测试"],
        demotion_conditions: ["模板同步产生误判"],
        evidence_requirements: ["模板同步场景矩阵通过"],
    },
    // ── 35. 适配器 Prompt 契约（问题三十一） ──
    {
        contract_id: "adapter_prompt_contract_entry",
        kind: "adapter_prompt",
        name: "适配器 Prompt 契约",
        state: "enforced",
        owner_component: "engine/adapter_prompt_contract",
        owner_files: ["src/engine/adapter_prompt_contract.ts"],
        test_files: ["tests/engine/knowledge_scenario_matrix.test.ts"],
        lifecycle_test_files: ["tests/engine/knowledge_scenario_matrix.test.ts"],
        knowledge_refs: [],
        prompt_refs: [],
        depends_on: ["tool_invocation_contract"],
        consumed_by: ["main_path_integration_contract"],
        hard_fail_allowed: true,
        promotion_conditions: ["adapter prompt 验证有完整测试"],
        demotion_conditions: ["adapter prompt 验证产生误判"],
        evidence_requirements: ["adapter prompt 场景矩阵通过"],
    },
    // ── 36. 文档治理契约（问题二十一） ──
    {
        contract_id: "documentation_governance_contract",
        kind: "documentation_governance",
        name: "文档治理契约",
        state: "enforced",
        owner_component: "engine/documentation_governance",
        owner_files: ["src/engine/knowledge/documentation_governance.ts"],
        test_files: ["tests/engine/knowledge_scenario_matrix.test.ts"],
        lifecycle_test_files: ["tests/engine/knowledge_scenario_matrix.test.ts"],
        knowledge_refs: [],
        prompt_refs: [],
        depends_on: ["contract_governance"],
        consumed_by: ["main_path_integration_contract"],
        hard_fail_allowed: true,
        promotion_conditions: ["文档治理有完整测试"],
        demotion_conditions: ["文档治理产生误判"],
        evidence_requirements: ["文档治理场景矩阵通过"],
    },
    // ── 37. 用户承诺契约（问题三十） ──
    {
        contract_id: "user_promise_contract",
        kind: "user_promise",
        name: "用户承诺契约",
        state: "enforced",
        owner_component: "engine/user_promise",
        owner_files: ["src/engine/contracts/user_promise.ts"],
        test_files: ["tests/engine/knowledge_scenario_matrix.test.ts"],
        lifecycle_test_files: ["tests/engine/knowledge_scenario_matrix.test.ts"],
        knowledge_refs: [],
        prompt_refs: [],
        depends_on: ["documentation_governance_contract"],
        consumed_by: ["main_path_integration_contract"],
        hard_fail_allowed: true,
        promotion_conditions: ["README 命令漂移检测有完整测试"],
        demotion_conditions: ["用户承诺检测产生误判"],
        evidence_requirements: ["用户承诺场景矩阵通过"],
    },
    // ── 38. 发布兼容契约（问题三十五） ──
    {
        contract_id: "release_compatibility_contract",
        kind: "release_compatibility",
        name: "发布兼容契约",
        state: "enforced",
        owner_component: "engine/release_compatibility",
        owner_files: ["src/engine/knowledge/release_compatibility.ts"],
        test_files: ["tests/engine/knowledge_scenario_matrix.test.ts"],
        lifecycle_test_files: ["tests/engine/knowledge_scenario_matrix.test.ts"],
        knowledge_refs: [],
        prompt_refs: [],
        depends_on: ["template_sync_contract"],
        consumed_by: ["main_path_integration_contract"],
        hard_fail_allowed: true,
        promotion_conditions: ["发布兼容有完整测试"],
        demotion_conditions: ["发布兼容产生误判"],
        evidence_requirements: ["发布兼容场景矩阵通过"],
    },
    // ── 39. 语言策略覆盖契约（问题四十一） ──
    {
        contract_id: "language_policy_override_contract",
        kind: "language_policy",
        name: "语言策略覆盖契约",
        state: "enforced",
        owner_component: "engine/language_policy",
        owner_files: ["src/engine/knowledge/language_policy.ts"],
        test_files: ["tests/engine/knowledge_scenario_matrix.test.ts"],
        lifecycle_test_files: ["tests/engine/knowledge_scenario_matrix.test.ts"],
        knowledge_refs: [],
        prompt_refs: [],
        depends_on: ["language_policy_contract_entry"],
        consumed_by: ["main_path_integration_contract"],
        hard_fail_allowed: true,
        promotion_conditions: ["语言策略覆盖有完整测试"],
        demotion_conditions: ["语言策略覆盖产生误判"],
        evidence_requirements: ["语言策略覆盖场景矩阵通过"],
    },
    // ── 40. 中文语义优先契约（问题十） ──
    {
        contract_id: "chinese_semantic_priority_contract",
        kind: "chinese_semantic",
        name: "中文语义优先契约",
        state: "enforced",
        owner_component: "engine/chinese_semantic_priority",
        owner_files: ["src/engine/knowledge/chinese_semantic_priority.ts"],
        test_files: ["tests/engine/knowledge_scenario_matrix.test.ts"],
        lifecycle_test_files: ["tests/engine/knowledge_scenario_matrix.test.ts"],
        knowledge_refs: [],
        prompt_refs: [],
        depends_on: ["language_policy_override_contract"],
        consumed_by: ["main_path_integration_contract"],
        hard_fail_allowed: true,
        promotion_conditions: ["中文语义优先有完整测试"],
        demotion_conditions: ["中文语义优先产生误判"],
        evidence_requirements: ["中文语义优先场景矩阵通过"],
    },
    // ── 41. 扩展契约（问题三十九） ──
    {
        contract_id: "extension_contract",
        kind: "extension",
        name: "扩展契约",
        state: "enforced",
        owner_component: "engine/extension_contract",
        owner_files: ["src/engine/contracts/extension_contract.ts"],
        test_files: ["tests/engine/extension_scenario_matrix.test.ts"],
        lifecycle_test_files: ["tests/engine/extension_scenario_matrix.test.ts"],
        knowledge_refs: [],
        prompt_refs: [],
        depends_on: ["contract_governance"],
        consumed_by: ["main_path_integration_contract"],
        hard_fail_allowed: true,
        promotion_conditions: ["扩展生命周期、权限授权有完整测试"],
        demotion_conditions: ["扩展契约产生误判"],
        evidence_requirements: ["扩展契约场景矩阵通过"],
    },
    // ── 42. 平台兼容契约（问题四十） ──
    {
        contract_id: "platform_compatibility_contract",
        kind: "platform_compatibility",
        name: "平台兼容契约",
        state: "enforced",
        owner_component: "engine/platform_context",
        owner_files: ["src/engine/contracts/platform_context.ts"],
        test_files: ["tests/engine/extension_scenario_matrix.test.ts"],
        lifecycle_test_files: ["tests/engine/extension_scenario_matrix.test.ts"],
        knowledge_refs: [],
        prompt_refs: [],
        depends_on: ["contract_governance"],
        consumed_by: ["main_path_integration_contract"],
        hard_fail_allowed: true,
        promotion_conditions: ["跨平台路径安全有完整测试"],
        demotion_conditions: ["平台兼容产生误判"],
        evidence_requirements: ["平台兼容场景矩阵通过"],
    },
    // ── 43. 治理动作契约（问题十九） ──
    {
        contract_id: "governance_action_contract",
        kind: "governance_action",
        name: "治理动作契约",
        state: "enforced",
        owner_component: "engine/metric_governance",
        owner_files: ["src/engine/contracts/metric_governance.ts"],
        test_files: ["tests/engine/extension_scenario_matrix.test.ts"],
        lifecycle_test_files: ["tests/engine/extension_scenario_matrix.test.ts"],
        knowledge_refs: [],
        prompt_refs: [],
        depends_on: ["metric_contract"],
        consumed_by: ["main_path_integration_contract"],
        hard_fail_allowed: true,
        promotion_conditions: ["治理动作绑定有完整测试"],
        demotion_conditions: ["治理动作产生误判"],
        evidence_requirements: ["治理动作场景矩阵通过"],
    },
    // ── 44. 脑暴契约（问题四十二 Brainstorm） ──
    {
        contract_id: "brainstorm_contract",
        kind: "brainstorm",
        name: "脑暴/方案探索契约",
        state: "enforced",
        owner_component: "engine/brainstorm_contract",
        owner_files: ["src/engine/contracts/brainstorm_contract.ts"],
        test_files: ["tests/engine/extension_scenario_matrix.test.ts"],
        lifecycle_test_files: ["tests/engine/extension_scenario_matrix.test.ts"],
        knowledge_refs: [],
        prompt_refs: [],
        depends_on: ["technology_decision_contract"],
        consumed_by: ["main_path_integration_contract"],
        hard_fail_allowed: true,
        promotion_conditions: ["脑暴会话完整性有测试"],
        demotion_conditions: ["脑暴契约产生误判"],
        evidence_requirements: ["脑暴契约场景矩阵通过"],
    },
    // ── 45. 细节纪律契约（问题二十六） ──
    {
        contract_id: "detail_discipline_contract",
        kind: "detail_discipline",
        name: "细节纪律契约",
        state: "enforced",
        owner_component: "engine/detail_discipline",
        owner_files: ["src/engine/contracts/detail_discipline.ts"],
        test_files: ["tests/engine/extension_scenario_matrix.test.ts"],
        lifecycle_test_files: ["tests/engine/extension_scenario_matrix.test.ts"],
        knowledge_refs: [],
        prompt_refs: [],
        depends_on: ["contract_governance"],
        consumed_by: ["main_path_integration_contract"],
        hard_fail_allowed: true,
        promotion_conditions: ["细节纪律检查有完整测试"],
        demotion_conditions: ["细节纪律产生误判"],
        evidence_requirements: ["细节纪律场景矩阵通过"],
    },
    // ── 46. 第一性原理契约（问题二十七） ──
    {
        contract_id: "first_principles_contract",
        kind: "first_principles",
        name: "第一性原理契约",
        state: "enforced",
        owner_component: "engine/first_principles",
        owner_files: ["src/engine/contracts/first_principles.ts"],
        test_files: ["tests/engine/extension_scenario_matrix.test.ts"],
        lifecycle_test_files: ["tests/engine/extension_scenario_matrix.test.ts"],
        knowledge_refs: [],
        prompt_refs: [],
        depends_on: ["contract_governance"],
        consumed_by: ["main_path_integration_contract"],
        hard_fail_allowed: true,
        promotion_conditions: ["第一性原理检查有完整测试"],
        demotion_conditions: ["第一性原理产生误判"],
        evidence_requirements: ["第一性原理场景矩阵通过"],
    },
    // ── 47. 架构设计契约（问题四十九） ──
    {
        contract_id: "architecture_design_contract_entry",
        kind: "architecture_design",
        name: "架构设计契约",
        state: "enforced",
        owner_component: "engine/architecture_design_contract",
        owner_files: ["src/engine/contracts/architecture_design_contract.ts"],
        test_files: ["tests/engine/extension_scenario_matrix.test.ts"],
        lifecycle_test_files: ["tests/engine/extension_scenario_matrix.test.ts"],
        knowledge_refs: [],
        prompt_refs: [],
        depends_on: ["technology_decision_contract", "brainstorm_contract"],
        consumed_by: ["main_path_integration_contract"],
        hard_fail_allowed: true,
        promotion_conditions: ["架构设计审查有完整测试"],
        demotion_conditions: ["架构设计产生误判"],
        evidence_requirements: ["架构设计场景矩阵通过"],
    },
    // ── 48. 现有系统分析契约（问题五十） ──
    {
        contract_id: "existing_system_analysis_contract_entry",
        kind: "existing_system_analysis",
        name: "现有系统分析契约",
        state: "enforced",
        owner_component: "engine/existing_system_analysis",
        owner_files: ["src/engine/contracts/existing_system_analysis.ts"],
        test_files: ["tests/engine/extension_scenario_matrix.test.ts"],
        lifecycle_test_files: ["tests/engine/extension_scenario_matrix.test.ts"],
        knowledge_refs: [],
        prompt_refs: [],
        depends_on: ["contract_governance"],
        consumed_by: ["main_path_integration_contract"],
        hard_fail_allowed: true,
        promotion_conditions: ["现有系统分析有完整测试"],
        demotion_conditions: ["现有系统分析产生误判"],
        evidence_requirements: ["现有系统分析场景矩阵通过"],
    },
    // ── 49. 编码准备契约（问题五十一） ──
    {
        contract_id: "coding_readiness_contract_entry",
        kind: "coding_readiness",
        name: "编码准备契约",
        state: "enforced",
        owner_component: "engine/coding_readiness_gate",
        owner_files: ["src/engine/contracts/coding_readiness_gate.ts"],
        test_files: ["tests/engine/extension_scenario_matrix.test.ts"],
        lifecycle_test_files: ["tests/engine/extension_scenario_matrix.test.ts"],
        knowledge_refs: [],
        prompt_refs: [],
        depends_on: ["existing_system_analysis_contract_entry"],
        consumed_by: ["main_path_integration_contract"],
        hard_fail_allowed: true,
        promotion_conditions: ["编码准备门有完整测试"],
        demotion_conditions: ["编码准备产生误判"],
        evidence_requirements: ["编码准备场景矩阵通过"],
    },
    // ── 50. 本地验收契约（问题五十二） ──
    {
        contract_id: "local_acceptance_contract_entry",
        kind: "local_acceptance",
        name: "本地验收契约",
        state: "enforced",
        owner_component: "engine/local_docker_acceptance",
        owner_files: ["src/engine/contracts/local_docker_acceptance.ts"],
        test_files: ["tests/engine/extension_scenario_matrix.test.ts"],
        lifecycle_test_files: ["tests/engine/extension_scenario_matrix.test.ts"],
        knowledge_refs: [],
        prompt_refs: [],
        depends_on: ["coding_readiness_contract_entry"],
        consumed_by: ["main_path_integration_contract"],
        hard_fail_allowed: true,
        promotion_conditions: ["本地验收有完整测试"],
        demotion_conditions: ["本地验收产生误判"],
        evidence_requirements: ["本地验收场景矩阵通过"],
    },
    // ── 51. 工作流模板包契约（问题五十三） ──
    {
        contract_id: "workflow_template_pack_contract_entry",
        kind: "workflow_template_pack",
        name: "工作流模板包契约",
        state: "enforced",
        owner_component: "engine/workflow_template_pack",
        owner_files: ["src/engine/contracts/workflow_template_pack.ts"],
        test_files: ["tests/engine/extension_scenario_matrix.test.ts"],
        lifecycle_test_files: ["tests/engine/extension_scenario_matrix.test.ts"],
        knowledge_refs: [],
        prompt_refs: [],
        depends_on: ["architecture_design_contract_entry"],
        consumed_by: ["main_path_integration_contract"],
        hard_fail_allowed: true,
        promotion_conditions: ["模板包消费 pipeline 有完整测试"],
        demotion_conditions: ["模板包产生误判"],
        evidence_requirements: ["模板包场景矩阵通过"],
    },
    // ── 52. 演进回归契约（问题五十四） ──
    {
        contract_id: "evolution_regression_contract_entry",
        kind: "evolution_regression",
        name: "演进回归契约",
        state: "enforced",
        owner_component: "engine/evolution_regression_gate",
        owner_files: ["src/engine/contracts/evolution_regression_gate.ts"],
        test_files: ["tests/engine/extension_scenario_matrix.test.ts"],
        lifecycle_test_files: ["tests/engine/extension_scenario_matrix.test.ts"],
        knowledge_refs: [],
        prompt_refs: [],
        depends_on: ["contract_governance"],
        consumed_by: ["main_path_integration_contract"],
        hard_fail_allowed: true,
        promotion_conditions: ["演进回归有完整测试"],
        demotion_conditions: ["演进回归产生误判"],
        evidence_requirements: ["演进回归场景矩阵通过"],
    },
    // ── 53. Plan Proposal First Gate 契约（问题五十五） ──
    {
        contract_id: "plan_proposal_gate_contract",
        kind: "plan_proposal_gate",
        name: "计划前置门契约",
        state: "enforced",
        owner_component: "engine/plan_proposal_gate",
        owner_files: ["src/engine/pipeline/plan_proposal_gate.ts"],
        test_files: ["tests/engine/release_gate_scenario_matrix.test.ts"],
        lifecycle_test_files: ["tests/engine/release_gate_scenario_matrix.test.ts"],
        knowledge_refs: [],
        prompt_refs: [],
        depends_on: ["task_context_contract", "workflow_contract"],
        consumed_by: ["core_experience_principle_contract"],
        hard_fail_allowed: true,
        promotion_conditions: ["PlanProposalFirstGate 场景A 通过"],
        demotion_conditions: ["Plan Gate 产生大量误报"],
        evidence_requirements: ["evaluatePlanProposalGate 无 hard_fail", "场景 A must-fail 全部触发"],
    },
    // ── 54. Core Experience Principle 契约（问题五十六） ──
    {
        contract_id: "core_experience_principle_contract",
        kind: "core_experience_principle",
        name: "核心体验原则契约",
        state: "enforced",
        owner_component: "engine/core_experience_principle",
        owner_files: ["src/engine/audit/core_experience_principle.ts"],
        test_files: ["tests/engine/release_gate_scenario_matrix.test.ts"],
        lifecycle_test_files: ["tests/engine/release_gate_scenario_matrix.test.ts"],
        knowledge_refs: [],
        prompt_refs: [],
        depends_on: ["plan_proposal_gate_contract", "verification_contract", "failure_report_contract"],
        consumed_by: ["knowledge_asset_governance_contract"],
        hard_fail_allowed: true,
        promotion_conditions: ["CoreExperiencePrincipleEvaluation 场景B 通过"],
        demotion_conditions: ["体验原则检查产生大量误报"],
        evidence_requirements: ["evaluateCoreExperiencePrinciple 无 hard_fail", "场景 B must-fail 全部触发"],
    },
    // ── 55. Knowledge Asset Governance 契约（问题五十七） ──
    {
        contract_id: "knowledge_asset_governance_contract",
        kind: "knowledge_asset_governance",
        name: "知识资产治理契约",
        state: "enforced",
        owner_component: "engine/knowledge_asset_schema",
        owner_files: [
            "src/engine/knowledge/knowledge_asset_schema.ts",
            "src/engine/knowledge/knowledge_asset_audit.ts",
            "src/engine/knowledge/knowledge_consumption_snapshot.ts",
            "src/engine/knowledge/knowledge_asset_generation_gate.ts",
            "src/engine/knowledge/knowledge_asset_migration.ts",
        ],
        test_files: ["tests/engine/release_gate_scenario_matrix.test.ts"],
        lifecycle_test_files: ["tests/engine/release_gate_scenario_matrix.test.ts"],
        knowledge_refs: [],
        prompt_refs: [],
        depends_on: ["knowledge_lifecycle_contract", "template_sync_contract", "release_compatibility_contract"],
        consumed_by: ["core_experience_principle_contract"],
        hard_fail_allowed: true,
        promotion_conditions: ["KnowledgeAssetAudit 通过", "KnowledgeConsumptionSnapshot 完整"],
        demotion_conditions: ["知识资产审计产生大量误报"],
        evidence_requirements: ["validateKnowledgeAssets 无 hard_fail", "场景 C must-fail 全部触发", "消费快照包含 indexed/injected/filtered/degraded/conflict_resolutions"],
    },
];
//# sourceMappingURL=builtin_contracts_extended.js.map