{
  "kind": "rule_tool_spec",
  "schema_version": "1.0",
  "title": "Entivela 交付方案配置器",
  "intro": "根据已批准的固定规则，判断哪些成果可以直接制作、哪些还需要补充资料或规则确认。运行时不调用 GPT。",
  "language": "zh-CN",
  "tool_id": "entivela_delivery_outcome_configurator",
  "result_policy": "all_matches",
  "inputs": [
    {
      "id": "source_count",
      "type": "number",
      "label": "资料来源数量",
      "label_en": "Source count",
      "help": "可引用并允许用于本次生产的来源数量。",
      "required": true,
      "unit": "",
      "options": [],
      "min": 0,
      "max": 1000,
      "default_value": 6
    },
    {
      "id": "product_count",
      "type": "number",
      "label": "比较对象数量",
      "label_en": "Products / options",
      "help": "需要参与比较或选型的产品/方案数量。",
      "required": true,
      "unit": "",
      "options": [],
      "min": 1,
      "max": 1000,
      "default_value": 2
    },
    {
      "id": "business_rules_approved",
      "type": "boolean",
      "label": "业务规则已审核批准",
      "label_en": "Business rules approved",
      "help": "选型、筛选或配置规则必须先冻结并批准。",
      "required": false,
      "unit": "",
      "options": [],
      "min": null,
      "max": null,
      "default_value": false
    },
    {
      "id": "pricing_rules_approved",
      "type": "boolean",
      "label": "计价规则已审核批准",
      "label_en": "Pricing rules approved",
      "help": "只有已批准计价规则才能进入确定性估算。",
      "required": false,
      "unit": "",
      "options": [],
      "min": null,
      "max": null,
      "default_value": false
    }
  ],
  "rules": [
    {
      "id": "sales_has_source",
      "when": [
        {
          "field": "source_count",
          "op": "gte",
          "value": 1
        }
      ],
      "outcome_id": "sales_ready",
      "reason": ""
    },
    {
      "id": "sales_no_source",
      "when": [
        {
          "field": "source_count",
          "op": "lte",
          "value": 0
        }
      ],
      "outcome_id": "sales_need_sources",
      "reason": ""
    },
    {
      "id": "comparison_two_plus",
      "when": [
        {
          "field": "product_count",
          "op": "gte",
          "value": 2
        }
      ],
      "outcome_id": "comparison_ready",
      "reason": ""
    },
    {
      "id": "comparison_lt_two",
      "when": [
        {
          "field": "product_count",
          "op": "lt",
          "value": 2
        }
      ],
      "outcome_id": "comparison_need_items",
      "reason": ""
    },
    {
      "id": "rule_approved",
      "when": [
        {
          "field": "business_rules_approved",
          "op": "truthy",
          "value": ""
        }
      ],
      "outcome_id": "rule_tool_ready",
      "reason": ""
    },
    {
      "id": "rule_not_approved",
      "when": [
        {
          "field": "business_rules_approved",
          "op": "falsy",
          "value": ""
        }
      ],
      "outcome_id": "rule_tool_need_approval",
      "reason": ""
    },
    {
      "id": "pricing_approved",
      "when": [
        {
          "field": "pricing_rules_approved",
          "op": "truthy",
          "value": ""
        }
      ],
      "outcome_id": "quote_ready",
      "reason": ""
    },
    {
      "id": "pricing_not_approved",
      "when": [
        {
          "field": "pricing_rules_approved",
          "op": "falsy",
          "value": ""
        }
      ],
      "outcome_id": "quote_nonbinding",
      "reason": ""
    }
  ],
  "outcomes": [
    {
      "id": "sales_ready",
      "group": "matched",
      "label": "销售资料包可进入生产",
      "label_en": "Sales materials can enter production",
      "description": "已有至少一个可引用来源；事实仍需保持来源和审核边界。",
      "next_action": "进入 sales_materials GPT 生产任务并由 server01 本机渲染。"
    },
    {
      "id": "sales_need_sources",
      "group": "needs_confirmation",
      "label": "销售资料包缺少来源",
      "label_en": "Sales materials need sources",
      "description": "没有可引用来源时不能直接生成对外事实。",
      "next_action": "补充授权资料并完成来源登记。"
    },
    {
      "id": "comparison_ready",
      "group": "matched",
      "label": "比较材料条件满足",
      "label_en": "Comparison material ready",
      "description": "至少有两个比较对象；缺失字段仍保持未知。",
      "next_action": "冻结比较字段和单位后生成比较表。"
    },
    {
      "id": "comparison_need_items",
      "group": "needs_confirmation",
      "label": "比较对象不足",
      "label_en": "More comparison items required",
      "description": "少于两个对象时不能形成有效比较。",
      "next_action": "补充至少一个比较对象。"
    },
    {
      "id": "rule_tool_ready",
      "group": "matched",
      "label": "规则型小工具可构建",
      "label_en": "Rule-based tool can be built",
      "description": "业务规则已批准，可由 server01 固定解释器执行。",
      "next_action": "生成 rule_tool_spec 并进入独立 QA。"
    },
    {
      "id": "rule_tool_need_approval",
      "group": "needs_confirmation",
      "label": "业务规则尚未批准",
      "label_en": "Business rules need approval",
      "description": "不能把 GPT 临时判断直接当成生产规则。",
      "next_action": "先冻结规则、阈值、单位和例外处理。"
    },
    {
      "id": "quote_ready",
      "group": "matched",
      "label": "可做受控报价估算",
      "label_en": "Governed quote estimate available",
      "description": "已批准计价规则可以用于非交互式 GPT 的确定性估算。",
      "next_action": "明确币种、税费、有效期和未包含项。"
    },
    {
      "id": "quote_nonbinding",
      "group": "not_applicable",
      "label": "暂不形成正式报价",
      "label_en": "Formal quote not enabled",
      "description": "计价规则未批准时只能输出需求摘要或非约束性估算。",
      "next_action": "由业务负责人确认正式计价规则。"
    }
  ],
  "default_outcome_id": null,
  "sources": [
    "SELF-SRC-WORKFLOW",
    "SELF-SRC-PUBLIC-DATA-POLICY",
    "SELF-SRC-SERVICE-BOUNDARIES"
  ],
  "disclaimer": "这是固定规则演示，不是正式报价、供应商排名或适用性保证。未知、冲突和未批准规则必须进入人工确认。",
  "source": {
    "order_id": null,
    "job_id": null,
    "product": "rule_based_business_tool",
    "trust_boundary": "UNTRUSTED_CUSTOMER_CONTENT_NORMALIZED_TO_FIXED_RULE_SCHEMA"
  },
  "runtime": {
    "interpreter": "SERVER01_RULE_TOOL_RENDERER_V1",
    "visitor_gpt": false,
    "arbitrary_code": false,
    "network_calls": false
  }
}