提交一次代码
This commit is contained in:
@@ -0,0 +1,343 @@
|
||||
# 输出契约
|
||||
|
||||
## 用途
|
||||
|
||||
定义 `booking-desk-event` 的统一 JSON 输出,以及 Main Agent 的 `S10/S99` 源邮件查看通知结果。所有业务事件都先是候选 `MessageEvent`,不是系统事实,不是真实 TaskCard。
|
||||
|
||||
## 输出交付形式
|
||||
|
||||
- 最终输出必须是当前调用直接返回的结构化 JSON 参数对象,不是 JSON 字符串或结果文件。
|
||||
- JSON 根对象必须直接使用本契约定义的顶层结构,不得增加 `booking_data`、`file`、`filename`、`artifact`、`download_url` 或其他文件包装层。
|
||||
- 不得创建、写入、上传、附加或返回 `booking_data.json` 或任何其他结果 JSON 文件。
|
||||
- 不得用结果文件名、文件路径、下载链接、artifact 或文件引用代替最终 JSON 参数对象。
|
||||
- 最终返回值不得使用 Markdown 代码块,也不得在 JSON 前后附加解释性文字。
|
||||
- 不得为交付形式增加 `output_mode`、`filename` 等非业务字段。
|
||||
- 输入附件引用仍可保留在事件的 `attachments` 或 `file_references` 中,但只能作为输入证据,不能替代最终 JSON 参数对象。
|
||||
|
||||
## Source Message Identity
|
||||
|
||||
- 所有合规的业务输出、`S10` 和 `S99` 都必须包含 `source_message`。
|
||||
- `source_message.source_message_id` 必须是上游提供的非空值,用于通知系统关联和展示原邮件;不得猜测、生成或从其他编号替代。
|
||||
- subject、from、cc、received_at 等其他元数据不可得时使用 `null` 或空数组。
|
||||
- 上游没有提供 `source_message_id` 时属于本业务契约之外的输入或基础设施错误,不能产生一个声称合规的 `S10` 或 `S99`。
|
||||
|
||||
## Main Agent Notification Outcome
|
||||
|
||||
`S10` 和 `S99` 共用以下源邮件查看通知结构:
|
||||
|
||||
```json
|
||||
{
|
||||
"source_message": {
|
||||
"source_message_id": "<required>",
|
||||
"subject": null,
|
||||
"from": null,
|
||||
"cc": [],
|
||||
"received_at": null,
|
||||
"source_channel": "Email"
|
||||
},
|
||||
"route_code": "S10 | S99",
|
||||
"handler_type": "main_agent_outcome",
|
||||
"result_type": "source_message_review_notification",
|
||||
"current_or_history": "current",
|
||||
"agent_assessment": {
|
||||
"status": "no_booking_action_detected | material_package_unavailable",
|
||||
"reason_code": "",
|
||||
"automation_action": "none"
|
||||
},
|
||||
"notification": {
|
||||
"required": true,
|
||||
"notification_type": "source_message_review",
|
||||
"show_source_message": true,
|
||||
"requires_user_decision": true,
|
||||
"visible_message": ""
|
||||
},
|
||||
"manual_review": null
|
||||
}
|
||||
```
|
||||
|
||||
- `S10` 固定使用 `status=no_booking_action_detected`、`reason_code=no_booking_action_detected`、`manual_review=null`。为保持信息系统兼容,字段和值不变;其业务含义是输入可理解但未匹配当前 Agent 支持的业务事件,不表示用户无需查看、回复或处理源邮件。
|
||||
- `S99` 固定使用 `status=material_package_unavailable`;为保持信息系统兼容,字段和值不变。它表示当前输入不足、无法判断是否匹配支持业务事件;`agent_assessment.reason_code` 必须与 `manual_review.reason_code` 一致,`manual_review.review_record_type=main_agent_entry_review`。
|
||||
- 两者均使用 `requires_user_decision=true`,不得增加 `action_required` 替用户判断是否介入。
|
||||
- `S99` 只用于输入不足、无法完成支持范围分类。已经匹配支持业务事件但参数或目标不安全时,使用业务事件 `Need Manual Review`。
|
||||
|
||||
`S99.manual_review` 必须使用:
|
||||
|
||||
```json
|
||||
{
|
||||
"reason_code": "material_package_unavailable",
|
||||
"visible_reason": "当前输入不足,无法完成支持业务事件范围分类。",
|
||||
"review_record_type": "main_agent_entry_review",
|
||||
"missing_fields": [],
|
||||
"blocking_points": [],
|
||||
"conflicting_points": [],
|
||||
"suggested_human_actions": ["review_source_message"],
|
||||
"evidence_to_check": ["source_message"],
|
||||
"known_fields": {}
|
||||
}
|
||||
```
|
||||
|
||||
## 业务事件顶层结构
|
||||
|
||||
```json
|
||||
{
|
||||
"source_message": {
|
||||
"source_message_id": "<required>",
|
||||
"subject": null,
|
||||
"from": null,
|
||||
"cc": [],
|
||||
"received_at": null,
|
||||
"source_channel": "Email"
|
||||
},
|
||||
"message_events": [],
|
||||
"case_candidates": [],
|
||||
"extraction_warnings": [],
|
||||
"unhandled_current_intents": []
|
||||
}
|
||||
```
|
||||
|
||||
所有业务输出都必须固定包含以上五个顶层字段。没有未覆盖当前意图时,`unhandled_current_intents` 使用空数组。该字段只属于业务输出;`S10` 和 `S99` 保持既有入口通知结构,不增加该字段。
|
||||
|
||||
## Unhandled Current Intents
|
||||
|
||||
`unhandled_current_intents` 用于展示同一邮件中意图清楚、具有当前业务意义,但现有事件目录或任务卡无法承接的内容。它不是 `MessageEvent`,信息系统不得据此自动创建 TaskCard。
|
||||
|
||||
每项固定使用:
|
||||
|
||||
```json
|
||||
{
|
||||
"category": "unhandled_current_business_content",
|
||||
"current_or_history": "current",
|
||||
"reason_code": "requires_business_approval_or_unsupported_task_card",
|
||||
"text_raw": "<当前证据原文>",
|
||||
"visible_message": "当前邮件包含未被现有任务类型覆盖的业务意图:<忠实中文概述>。请查看原邮件并决定后续处理。",
|
||||
"requires_user_decision": true,
|
||||
"case_keys": {
|
||||
"group_code": null,
|
||||
"confirmation_number": null,
|
||||
"reservation_number": null,
|
||||
"block_code": null
|
||||
},
|
||||
"attachments": [],
|
||||
"file_references": []
|
||||
}
|
||||
```
|
||||
|
||||
固定规则:
|
||||
|
||||
- 仅由当前正文、当前附件、当前 OCR、当前表格或当前继续处理指令产生;history-only 内容不得进入。
|
||||
- `text_raw` 原样保留;`visible_message` 提供忠实中文说明,不得增加批准、拒绝、执行或业务结论。无法安全翻译时使用“当前邮件包含未被现有任务类型覆盖的业务意图,请查看原文并决定后续处理。”
|
||||
- `requires_user_decision` 固定为 `true`。
|
||||
- `case_keys` 始终包含四个键。仅在当前证据或允许的历史证据唯一支持时填写;否则使用 `null`,不得猜测。
|
||||
- `attachments` 和 `file_references` 只保留当前证据引用;历史附件不得带入。
|
||||
- 一个独立意图一个 item,按当前证据顺序输出;连续多句组成同一请求时保持一个 item。
|
||||
- HTML/plain MIME alternatives、重复 OCR、quoted thread 和已被事件完整承接的内容不得重复输出。
|
||||
- 清楚但不支持的业务意图使用本字段;已匹配支持事件但参数或目标不安全时使用 `Need Manual Review`;内容不可读或抽取失败时使用 `extraction_warnings` 或相应人工复核。
|
||||
- `extraction_warnings` 只承载解析、OCR、抽取和证据质量问题,不得用来承载未覆盖业务意图。
|
||||
- `source_message_id` 只保留在根 `source_message`,不得在 item 内重复。
|
||||
|
||||
详细覆盖顺序遵循 `03-current-content-completeness.md`。
|
||||
|
||||
## 支持业务事件类型
|
||||
|
||||
- `New Booking`
|
||||
- `Update Booking / Amendment`
|
||||
- `Cancel Booking`
|
||||
- `Cancel Allotment`
|
||||
- `Voucher Received`
|
||||
- `Payment Evidence`
|
||||
- `Rooming List`
|
||||
- `Allotment Maintenance`
|
||||
- `AMEND GROUP CODE`
|
||||
- `Invoice Generation`
|
||||
- `Invoice Received`
|
||||
- `Payment Notice`
|
||||
- `Trace`
|
||||
- `Manual RateCode`
|
||||
- `TA RECORDER`
|
||||
- `Note`
|
||||
|
||||
普通预订补充信息统一输出 `Trace`。`Note` 暂时仅为旧契约兼容保留,不作为当前普通补充信息的路由结果,除非后续任务卡映射另有明确规则。
|
||||
|
||||
## 业务人工复核结果
|
||||
|
||||
- `Need Manual Review`
|
||||
|
||||
## 单个事件
|
||||
|
||||
```json
|
||||
{
|
||||
"event_type": "",
|
||||
"event_role": "travel_agent_request",
|
||||
"current_or_history": "current",
|
||||
"source_event_index": "E1",
|
||||
"case_keys": {
|
||||
"group_code": null,
|
||||
"confirmation_number": null,
|
||||
"reservation_number": null,
|
||||
"block_code": null
|
||||
},
|
||||
"relevant_message_excerpt": "",
|
||||
"attachments": [],
|
||||
"file_references": [],
|
||||
"context_used": {},
|
||||
"extracted_fields": {},
|
||||
"manual_review": null
|
||||
}
|
||||
```
|
||||
|
||||
## Case Key
|
||||
|
||||
- `case_keys.group_code` 必须是单值或 `null`。
|
||||
- 多个 group code 必须拆成多个事件。
|
||||
- `U-<number>` 是价格或 Rate Code marker,绝不能写入 confirmation、reservation、booking reference 或 target key。
|
||||
- Parent allocation group code 是证据,不是 child event 的 `case_keys.group_code`。
|
||||
|
||||
## Date Evidence
|
||||
|
||||
涉及入住、离店或晚数时,`extracted_fields` 应保留:
|
||||
|
||||
```json
|
||||
{
|
||||
"arrival_date": "2026-05-14",
|
||||
"departure_date": "2026-05-15",
|
||||
"nights": 1,
|
||||
"date_evidence": {
|
||||
"hotel_date_raw": "14-15",
|
||||
"tour_date_raw": "2026/05/11\n2026/05/16",
|
||||
"action_date_raw": "11/05 AMD",
|
||||
"sheet_month_year": "BOOKING 05-2026",
|
||||
"date_inference_basis": "hotel_date_range_with_tour_date_context"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
日期识别必须遵循 `54-stay-date-parsing.md`。`action_date_raw` 是动作日期证据,不是入住日期。
|
||||
|
||||
## Trace Contract
|
||||
|
||||
Trace 用于当前邮件中能绑定具体预订对象、但不属于主任务核心参数的补充业务信息。要求、安排、备注和包含具体预订事实的单纯告知都可以触发 Trace;不要判断发件人是否明确要求酒店记录、执行或转交。
|
||||
|
||||
同一封邮件、同一目标对象只输出一个 Trace。多条补充信息按当前证据顺序合并:
|
||||
|
||||
```json
|
||||
{
|
||||
"event_type": "Trace",
|
||||
"extracted_fields": {
|
||||
"trace_subtype": "extra_bed | general_request",
|
||||
"trace_text": "<按当前证据顺序合并的完整补充信息原文>",
|
||||
"trace_items": [
|
||||
{
|
||||
"category": "extra_bed | room_preference | room_setup | meeting | function | meal | transport | payment_information | general_information",
|
||||
"text_raw": "<单条原文>",
|
||||
"service_date": "YYYY-MM-DD | null",
|
||||
"service_period_raw": "<原始时段或 null>",
|
||||
"pax": null,
|
||||
"notify_departments": []
|
||||
}
|
||||
],
|
||||
"notify_departments": []
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
- `trace_text` 必须保留完整原文,结构化字段不能替代原文。
|
||||
- `trace_items` 的顺序必须与 `trace_text` 一致。
|
||||
- `category` 必须使用固定枚举;banquet 归入 `function`,无法归入更具体类别时使用 `general_information`。
|
||||
- `service_date`、`service_period_raw`、`pax` 只有在证据明确时填写,否则为 `null`。
|
||||
- item 的 `notify_departments` 只保留明确或规则唯一支持的部门;事件级 `notify_departments` 是 item 已知部门的去重合集。
|
||||
- 部门不清时使用空数组,不得仅因此输出人工复核。
|
||||
- 全部 item 都是 extra bed 时使用 `trace_subtype=extra_bed`;其他情况使用 `general_request`。
|
||||
- Trace 包含 extra bed item 时,继续在事件级 `extracted_fields` 保留原有 `occupancy_update`、`requires_rate_update` 和 `rate_adjustment_formula`,不得移动到 item 或删除。
|
||||
- 主事件已完整承接的核心参数不得重复生成 Trace。
|
||||
- 不同目标对象必须拆成不同 Trace;`case_keys.group_code` 仍为单值。
|
||||
- `payment_information` 只表示已经确定、需要随预订保留的补充付款安排;付款凭证、到账结果、Payment Notice、Invoice、催款或付款条件审批询问不得改名为 Trace。
|
||||
|
||||
`FYI guide will arrive at 20:00` 等具体预订告知可以触发 Trace;只有 `Thanks`、`Noted`、`Received`、裸 `FYI` 等没有具体业务信息的文字不能触发 Trace。需要酒店进行价格、退款、账期、付款政策、合同条件或其他业务审批的询问也不能伪装成 Trace。
|
||||
|
||||
不属于 Trace 但具有当前业务意义的内容必须原样保留在 Main Agent 素材包的 `unknowns` 中。只要同邮件存在至少一个支持事件,业务 skill 就按 `03-current-content-completeness.md` 将其一对一输出到顶层 `unhandled_current_intents`;不得静默忽略或改成 Trace。
|
||||
|
||||
## 人工复核
|
||||
|
||||
```json
|
||||
{
|
||||
"manual_review": {
|
||||
"reason_code": "",
|
||||
"visible_reason": "",
|
||||
"review_record_type": "business_event_review",
|
||||
"missing_fields": [],
|
||||
"blocking_points": [],
|
||||
"conflicting_points": [],
|
||||
"suggested_human_actions": [],
|
||||
"evidence_to_check": [],
|
||||
"known_fields": {}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## 派生事件
|
||||
|
||||
派生或关联事件使用:
|
||||
|
||||
```json
|
||||
{
|
||||
"related_source_event_index": "",
|
||||
"related_source_event_indices": [],
|
||||
"related_event_type": "",
|
||||
"relationship_type": "",
|
||||
"requires_downstream_hard_validation": true
|
||||
}
|
||||
```
|
||||
|
||||
`related_source_event_index` 用于单一关联事件;一个派生事件关联多个来源事件时使用 `related_source_event_indices`。
|
||||
|
||||
典型场景:
|
||||
|
||||
- New/Update/Amend Group Code 同事件出现 extra bed、Meeting、meal、arrival notice 或其他预订补充信息,按目标派生一个 linked `Trace`。
|
||||
- Rooming List 按每个目标 group 派生 `TA RECORDER`。
|
||||
- Parent-to-child allocation creation 必须派生独立的 parent release/cancel 候选 `message_event`,不得只放进 child `New Booking.extracted_fields`。
|
||||
|
||||
## Parent-To-Child Parent Candidate
|
||||
|
||||
当 current evidence 确认 parent group 拆成 child group codes,且 parent group code 清楚时,必须额外输出一个 parent release/cancel candidate:
|
||||
|
||||
```json
|
||||
{
|
||||
"event_type": "Cancel Booking",
|
||||
"event_role": "travel_agent_request",
|
||||
"current_or_history": "current",
|
||||
"source_event_index": "E_PARENT_RELEASE",
|
||||
"case_keys": {
|
||||
"group_code": "<parent_group_code>",
|
||||
"confirmation_number": null,
|
||||
"reservation_number": null,
|
||||
"block_code": null
|
||||
},
|
||||
"relevant_message_excerpt": "<parent line + split evidence>",
|
||||
"attachments": [],
|
||||
"file_references": [],
|
||||
"context_used": {
|
||||
"source": "current parent-to-child allocation evidence"
|
||||
},
|
||||
"extracted_fields": {
|
||||
"parent_release_or_cancel_candidate": true,
|
||||
"release_reason": "parent_to_child_allocation_split",
|
||||
"parent_group_code": "<parent_group_code>",
|
||||
"child_group_codes": ["<child_group_code>"],
|
||||
"allocation_split_from_parent": true,
|
||||
"parent_original_room_summary": null
|
||||
},
|
||||
"related_source_event_indices": ["E1"],
|
||||
"related_event_type": "New Booking",
|
||||
"relationship_type": "linked_parent_release_after_child_split",
|
||||
"requires_downstream_hard_validation": true,
|
||||
"manual_review": null
|
||||
}
|
||||
```
|
||||
|
||||
该事件是候选事件,不代表 PMS 已取消成功,不创建真实 TaskCard,不写外部系统。
|
||||
|
||||
## 禁止输出
|
||||
|
||||
不得输出真实 TaskCard ID、最终 Case 状态、Payment 确认、Block Status 自动转换、Receipt、Invoice 文件、Opera/PMS 写入结果。
|
||||
|
||||
不得生成或返回结果 JSON 文件、结果文件引用、结果下载链接或 artifact。该限制只针对最终处理结果,不禁止下载、读取和解析输入附件,也不禁止在事件中保留输入附件证据。
|
||||
@@ -0,0 +1,58 @@
|
||||
# 当前邮件与历史边界
|
||||
|
||||
## 用途
|
||||
|
||||
区分当前邮件动作和历史证据。这个边界优先于所有业务类型判断。
|
||||
|
||||
本 reference 适用于 Main Agent 已经匹配至少一个支持业务事件并形成素材包的场景。输入可理解但没有匹配支持事件时由 Main Agent 输出 `S10`;输入不足、无法判断是否匹配支持事件时输出 `S99`,均不调用业务 skill。
|
||||
|
||||
## 当前邮件可以触发业务
|
||||
|
||||
当前素材包括:
|
||||
|
||||
- `body_current` 中的新请求,以及与具体预订对象相关的补充事实、安排、要求或备注。
|
||||
- 当前附件、inline image、PDF、Excel、OCR、表格、文件链接。
|
||||
- 当前邮件明确继续上文并要求处理,例如 `please proceed`、`see attached`、`please update as attached`。
|
||||
|
||||
只有这些素材可以触发新的业务事件。
|
||||
|
||||
## 历史只做证据
|
||||
|
||||
历史素材包括 quoted thread、forwarded old mail、`body_thread` 和历史查询结果。历史可以提供:
|
||||
|
||||
- 目标 key:`group_code`、confirmation number、reservation number、客人姓名 + 日期。
|
||||
- amendment 的旧值。
|
||||
- parent group / allocation 上下文。
|
||||
- 当前 Trace / Guest Request 的最近目标。
|
||||
- 解释当前证据所需的供应商或酒店上下文。
|
||||
|
||||
使用历史时,在 `context_used` 写明用途。
|
||||
|
||||
## 禁止事项
|
||||
|
||||
- 不得从 history-only 动作创建普通业务事件或 `unhandled_current_intents`。
|
||||
- 不得为只有确认收到、感谢、裸 FYI 或其他没有具体预订业务信息的消息查询历史来制造业务事件。
|
||||
- 不得用旧历史值覆盖当前值。
|
||||
- 除非文件是当前邮件真实发送的附件或链接,不得把历史 voucher、名单或表格当作当前证据。
|
||||
|
||||
## 人工复核
|
||||
|
||||
以下情况输出 `Need Manual Review`:
|
||||
|
||||
- current/history 边界不清。
|
||||
- 历史查询返回多个互不相关目标。
|
||||
- 当前动作清楚但无法唯一绑定目标。
|
||||
- 历史证据与当前目标冲突。
|
||||
- 当前请求只针对部分 child group,但具体目标不清。
|
||||
|
||||
## Trace 例外
|
||||
|
||||
当前邮件包含可触发 Trace 的具体预订补充信息,但目标只在最近历史中清楚出现时,可以使用历史绑定目标。当前信息可以是要求,也可以是单纯告知。必须记录:
|
||||
|
||||
- `target_key_source`
|
||||
- `body_thread_used_only_as_evidence=true`
|
||||
- `requires_downstream_hard_validation=true`
|
||||
|
||||
历史本身仍不能触发 Trace。
|
||||
|
||||
同样地,历史只能帮助当前未覆盖意图绑定 `case_keys`,不能把历史中的审批询问、投诉、付款政策或其他内容变成当前展示 item。当前没有对应原文或附件证据时,`unhandled_current_intents` 必须为空。
|
||||
@@ -0,0 +1,58 @@
|
||||
# 事件路由地图
|
||||
|
||||
## 用途
|
||||
|
||||
从当前邮件动作选择业务事件类型,并决定需要读取哪些业务 reference。
|
||||
|
||||
## 路由顺序
|
||||
|
||||
1. Main Agent 先判断当前输入是否足以识别邮件意图;不足时输出 `S99`,不调用本 skill。
|
||||
2. Main Agent 按 `03-current-content-completeness.md` 盘点全部当前业务内容,不得识别一个事件后停止。
|
||||
3. Main Agent 将每项当前内容与本文件的支持业务事件目录匹配;整封邮件没有匹配时输出 `S10`,不调用本 skill。
|
||||
4. `candidate_events` 至少包含一个支持业务事件时,才调用本 skill;同时存在的清楚但不受支持内容保留在 `unknowns`。
|
||||
5. 已匹配支持事件但事件类型候选冲突、目标不清或参数不安全时,输出业务级 `Need Manual Review`。
|
||||
6. 能安全拆分时,每个目标对象独立路由,并把未覆盖意图一对一输出到顶层 `unhandled_current_intents`。
|
||||
|
||||
只有 Thank you、裸 FYI、acknowledgement、Noted、Received 等没有具体预订业务信息的文字不匹配 Trace。FYI 或单纯告知只要包含与明确预订对象相关的具体补充信息,就路由为 `Trace`。一般咨询和当前不支持的业务请求仍不应伪装成 Trace;`please confirm booking details` 或请酒店核对并回复既有预订当前没有对应支持事件。
|
||||
|
||||
当一封邮件同时包含支持事件和当前不支持的业务请求时,不得因为支持事件已命中而忽略剩余请求,也不得把整封邮件降级为 S10。支持部分正常路由,未覆盖部分进入 `unhandled_current_intents`。
|
||||
|
||||
## 路由表
|
||||
|
||||
| 当前信号 | 事件类型 | 读取 |
|
||||
| --- | --- | --- |
|
||||
| 新建 FIT、Group Block、Allotment、Control Block | `New Booking` | `10-new-booking.md` |
|
||||
| Parent-to-child allocation creation | child `New Booking` + 必须 linked parent `Cancel Booking` release/cancel candidate | `31-allotment-control-block.md` |
|
||||
| 修改日期、晚数、房型、房量、人数、价格或其他主订单字段 | `Update Booking / Amendment` | `11-update-booking.md` |
|
||||
| 整单取消、CXL、release/cancel block | `Cancel Booking` / `Cancel Allotment` | `12-cancel-booking.md` |
|
||||
| 当前 voucher、payment slip、bank transfer image/PDF/file | `Voucher Received` / `Payment Evidence` | `13-voucher-payment.md` |
|
||||
| 当前名单、分房表、guest list | `Rooming List` | `14-rooming-list.md` |
|
||||
| 旧 Group Code 改新 Group Code | `AMEND GROUP CODE` | `15-amend-group-code.md` |
|
||||
| 与具体预订对象相关、但不属于主任务核心参数的当前补充信息:Trace、Reservation Note、Guest Request、extra bed、Meeting、function/banquet、meal、transport、room preference/setup、arrival notice、payment information 或其他具体业务告知 | `Trace` | `16-trace-notes.md` |
|
||||
| Rooming List 目标需要 TA Recorder | `TA RECORDER` | `17-ta-recorder-note.md` |
|
||||
| Invoice 请求、收到 invoice、payment notice | invoice/payment 相关事件 | `18-invoice.md` |
|
||||
| 单独手工价格或 Rate Code 维护 | `Manual RateCode` | `53-manual-rate-code.md` |
|
||||
|
||||
## 冲突优先级
|
||||
|
||||
- 当前只有 voucher/payment proof,即使标题像 NEW,也优先 voucher/payment。
|
||||
- Rooming List 文件不得当成 booking update 表。
|
||||
- `AMEND GROUP CODE TO` 且 old/new 清楚时,优先 `AMEND GROUP CODE`。
|
||||
- Parent-to-child allocation creation 不因出现 `AMEND` 字样就当普通改单。
|
||||
- Extra bed alone 是 Trace,不是房量修改。
|
||||
- 先识别主任务完整承接的核心参数,再把剩余的具体预订补充信息按目标生成 Trace;不得为同一核心参数重复生成 Trace。
|
||||
- 已确定、需要随预订保留的补充付款安排可以是 Trace;付款凭证、到账结果、Payment Notice、Invoice、催款或需要酒店批准的价格、退款、减免、账期、付款政策、合同条件询问不是 Trace。
|
||||
- Cancel 行不会因为历史上有 guest request 就自动生成 Trace。
|
||||
|
||||
## 拆分
|
||||
|
||||
- 按目标对象拆。
|
||||
- QBD/LianTai 按当前有效行拆。
|
||||
- Parent-to-child allocation 按 child group code 拆,并额外输出一个 parent linked release/cancel candidate。
|
||||
- Extra bed、Meeting、meal、arrival notice、guest request 或其他预订补充信息与主业务同现时,按目标拆 linked Trace。
|
||||
- 同一封邮件、同一目标对象的多条补充信息合并成一个 Trace;多个目标对象分别生成 Trace。
|
||||
- Rooming List 按目标 group 拆,并可派生 TA Recorder。
|
||||
|
||||
无法安全拆分时,输出 `Need Manual Review`,写明冲突和需要查看的证据。
|
||||
|
||||
不符合 Trace 但具有当前业务意义的内容必须以 `unknowns[].category=unhandled_current_business_content` 保留原文。同邮件存在至少一个支持事件时输出到顶层 `unhandled_current_intents`;整封邮件没有支持事件时由 Main Agent 输出 S10。不得静默忽略。
|
||||
@@ -0,0 +1,111 @@
|
||||
# 当前邮件内容完整覆盖
|
||||
|
||||
## 用途
|
||||
|
||||
确保当前邮件中每一项有业务意义的内容都有明确去向。不得因为已经匹配一个支持业务事件,就停止读取或静默丢弃同一邮件中的其他当前意图。
|
||||
|
||||
本规则是邮件级共享规则,优先于具体事件 reference。它不扩大任务卡能力,也不把当前不支持的内容伪装成 `Trace` 或 `Need Manual Review`。
|
||||
|
||||
## 当前内容盘点
|
||||
|
||||
盘点范围包括:
|
||||
|
||||
- `body_current` 中的请求、询问、安排、事实和告知。
|
||||
- 当前附件、inline image、PDF、spreadsheet、OCR、表格和文件链接中的业务内容。
|
||||
- 当前邮件明确继续处理的上文对象。
|
||||
|
||||
不作为独立业务内容:
|
||||
|
||||
- greeting、signature、disclaimer 和纯礼貌文字。
|
||||
- HTML 与 plain-text MIME alternatives 中语义相同的重复内容。
|
||||
- quoted thread、forwarded old mail 和其他 history-only 内容。
|
||||
|
||||
一个连续请求即使跨多句话,仍作为一个意图;互相独立的请求必须拆开,并按当前证据顺序保留。
|
||||
|
||||
## 完整覆盖不变量
|
||||
|
||||
每项有业务意义的当前内容必须且只能进入以下一个结果路径:
|
||||
|
||||
1. 匹配支持事件并安全处理:普通 `message_event`,包括 linked `Trace`。
|
||||
2. 已匹配支持事件但参数、目标或证据不安全:业务级 `Need Manual Review`。
|
||||
3. 意图清楚但现有事件或任务卡不支持,且同邮件还有至少一个支持事件:最终 `unhandled_current_intents`。
|
||||
4. 意图清楚但整封邮件没有任何支持事件:Main Agent 输出 `S10`。
|
||||
5. 输入不足,无法判断是否匹配支持事件:Main Agent 输出 `S99`。
|
||||
|
||||
不得用 `relevant_message_excerpt`、源邮件仍可查看或 `extraction_warnings` 代替上述覆盖结果。
|
||||
|
||||
## Main Agent 内部 unknowns
|
||||
|
||||
当同邮件已经匹配至少一个支持事件,以下当前内容进入素材包 `unknowns`:
|
||||
|
||||
- 需要酒店批准的价格、退款、减免、豁免、账期、付款政策或合同条件询问。
|
||||
- 意图清楚、具有业务意义,但当前支持事件目录或任务卡无法承接的其他内容。
|
||||
|
||||
内部结构使用:
|
||||
|
||||
```json
|
||||
{
|
||||
"category": "unhandled_current_business_content",
|
||||
"current_or_history": "current",
|
||||
"reason_code": "requires_business_approval_or_unsupported_task_card",
|
||||
"text_raw": "<当前证据原文>",
|
||||
"case_keys": {
|
||||
"group_code": null,
|
||||
"confirmation_number": null,
|
||||
"reservation_number": null,
|
||||
"block_code": null
|
||||
},
|
||||
"attachments": [],
|
||||
"file_references": []
|
||||
}
|
||||
```
|
||||
|
||||
`case_keys` 只能使用当前证据或允许的历史证据唯一支持的值;不能唯一绑定时保持全 `null`。目标不清本身不阻止邮件级展示,也不得为了填写 key 而猜测。
|
||||
|
||||
## 业务输出映射
|
||||
|
||||
`booking-desk-event` 必须把上述 `unknowns` 按原顺序一对一规范化到业务输出顶层 `unhandled_current_intents`:
|
||||
|
||||
```json
|
||||
{
|
||||
"category": "unhandled_current_business_content",
|
||||
"current_or_history": "current",
|
||||
"reason_code": "requires_business_approval_or_unsupported_task_card",
|
||||
"text_raw": "<当前证据原文>",
|
||||
"visible_message": "当前邮件包含未被现有任务类型覆盖的业务意图:<忠实中文概述>。请查看原邮件并决定后续处理。",
|
||||
"requires_user_decision": true,
|
||||
"case_keys": {
|
||||
"group_code": null,
|
||||
"confirmation_number": null,
|
||||
"reservation_number": null,
|
||||
"block_code": null
|
||||
},
|
||||
"attachments": [],
|
||||
"file_references": []
|
||||
}
|
||||
```
|
||||
|
||||
规则:
|
||||
|
||||
- `text_raw` 必须原样保留,不得只留翻译或摘要。
|
||||
- `visible_message` 必须忠实说明原意,不得增加批准、拒绝、执行或业务结论。无法安全翻译时使用“当前邮件包含未被现有任务类型覆盖的业务意图,请查看原文并决定后续处理。”
|
||||
- `requires_user_decision` 固定为 `true`。
|
||||
- 只保留当前附件和当前 file reference;历史附件不得带入。
|
||||
- `source_message_id` 只使用业务输出根对象中的值,不在 item 内重复。
|
||||
- 该 item 不是 `MessageEvent`,没有 `event_type`,不得创建 TaskCard 或触发外部写入。
|
||||
|
||||
## 去重与边界
|
||||
|
||||
- HTML/plain MIME 重复、相同 OCR 重复和签名引用不得生成重复 item。
|
||||
- 每个独立未覆盖意图一个 item;不得把不同问题压成模糊摘要。
|
||||
- 已由主事件或 Trace 完整承接的内容不得再次进入该数组。
|
||||
- 已确定的补充付款安排可以是 `Trace.payment_information`;询问酒店是否批准付款安排进入未覆盖意图。
|
||||
- 内容不可读或语义不足时,不得伪装成清楚的未覆盖意图;按事件上下文使用 `extraction_warnings`、`Need Manual Review` 或 `S99`。
|
||||
- `extraction_warnings` 只承载解析、OCR、抽取和证据质量问题,不承载清楚但不受支持的业务意图。
|
||||
|
||||
## 示例
|
||||
|
||||
- 当前付款凭证 + “余款能否入住时支付”:输出 `Payment Evidence`,并输出一个未覆盖意图。
|
||||
- “余款将在入住时支付”且目标唯一:输出 `Trace.payment_information`,不输出未覆盖意图。
|
||||
- 当前只有清楚的付款政策询问,没有任何支持事件:Main Agent 输出 `S10`,不调用业务 skill。
|
||||
- 历史中有审批询问、当前只有 `Thanks`:不得从历史生成未覆盖意图。
|
||||
@@ -0,0 +1,73 @@
|
||||
# 新订
|
||||
|
||||
## 适用业务
|
||||
|
||||
用于当前邮件要求创建新的:
|
||||
|
||||
- FIT Reservation
|
||||
- Group Block
|
||||
- Allotment / Control Block
|
||||
- QBD/LianTai 当前新订行
|
||||
- Parent-to-child allocation 的 child group
|
||||
|
||||
## 判断
|
||||
|
||||
- 小于 5 间通常按 FIT。
|
||||
- 5 间及以上通常按 Group Block。
|
||||
- 明确 allotment、allocation、control block、控房、配额、取配、配合房时,按控房/配额对象优先。
|
||||
|
||||
## 不适用
|
||||
|
||||
- 修改既有订单。
|
||||
- 取消。
|
||||
- 只有 voucher 或 payment evidence。
|
||||
- 只有 Rooming List。
|
||||
- 旧 Group Code 改新 Group Code。
|
||||
- 只有 Trace 或 extra bed。
|
||||
- 动作只在历史邮件中。
|
||||
|
||||
## 必要证据
|
||||
|
||||
普通候选事件需要:
|
||||
|
||||
- 当前创建动作。
|
||||
- 目标 key 或足够清楚的新对象身份。
|
||||
- 按 `54-stay-date-parsing.md` 可安全识别的入住/离店、房型房量、客人或团队信息等最小新订字段。
|
||||
- 系统上下文没有 existing valid record、pending/open task、lock 或 active workflow 阻塞。
|
||||
- 涉及房型、Rate Code 或 Fix Charge 时,有对应 reference 支持,或明确要求下游硬校验。
|
||||
|
||||
## 抽取字段
|
||||
|
||||
保留:
|
||||
|
||||
- group code / confirmation number,如有
|
||||
- arrival / departure / nights
|
||||
- date evidence:`hotel_date_raw`、`tour_date_raw`、`action_date_raw`、`sheet_month_year`、`date_inference_basis`
|
||||
- guest or group name
|
||||
- room items,保留 raw room type 和 mapped room code
|
||||
- supplier / channel
|
||||
- booking object type
|
||||
- QBD/LianTai row evidence
|
||||
- parent allocation context
|
||||
- Rate Code / settlement price evidence
|
||||
- Fix Charge evidence
|
||||
|
||||
## Linked Trace
|
||||
|
||||
New Booking 同事件出现 extra bed、Meeting、meal、arrival notice、room preference/setup、已确定的 payment information 或其他具体预订补充信息时,按目标额外生成一个 linked `Trace`。补充信息即使只是告知,也生成 Trace;主任务已经完整承接的入住日期、房型、房量等核心参数不得重复生成 Trace。
|
||||
|
||||
同一目标的多条补充信息合并到一个 Trace;多个目标分别生成 Trace。Extra bed 不计入房量,不影响 FIT/Group,不作为 PMS 房型,不决定 Rate Code。
|
||||
|
||||
## 人工复核
|
||||
|
||||
以下情况输出 `Need Manual Review`:
|
||||
|
||||
- key identity 不清。
|
||||
- 已有订单、pending task、open task 或 active workflow。
|
||||
- 当前动作可能其实是 update、cancel 或 group-code change。
|
||||
- current/history boundary 不清。
|
||||
- 多对象无法拆分。
|
||||
- QBD/LianTai 当前行证据不可读。
|
||||
- room mapping、Rate Code 或 settlement price 不唯一。
|
||||
- Fix Charge 无法安全解析。
|
||||
- Parent-to-child allocation child line 不完整。
|
||||
@@ -0,0 +1,88 @@
|
||||
# 修改预订
|
||||
|
||||
## 适用业务
|
||||
|
||||
用于当前邮件要求修改既有:
|
||||
|
||||
- FIT Reservation
|
||||
- Group Block
|
||||
- Allotment / Control Block
|
||||
- 日期、晚数、房型、房量、人数、价格、Rate Code、备注或其他订单细节
|
||||
|
||||
## 支持的修改
|
||||
|
||||
- `update_stay_dates`
|
||||
- `update_nights`
|
||||
- `update_room_type_or_quantity`
|
||||
- `update_guest_count`
|
||||
- `update_allotment_control_block`
|
||||
- `manual_rate_code_or_settlement_price`
|
||||
- `update_fix_charge`
|
||||
- 与主修改同现的 guest request 线索
|
||||
|
||||
## 不适用
|
||||
|
||||
- Parent-to-child allocation creation,child creation 走 `New Booking`。
|
||||
- 旧 Group Code 改新 Group Code,走 `AMEND GROUP CODE`。
|
||||
- 只有 extra bed,走 `Trace`。
|
||||
- 只有 voucher/payment evidence。
|
||||
- 只有 Rooming List。
|
||||
- 动作只在历史邮件中。
|
||||
- 纯确认或信息消息不属于 Update;其中包含具体预订补充信息时按 `Trace` 处理。
|
||||
|
||||
## 必要证据
|
||||
|
||||
普通候选事件需要:
|
||||
|
||||
- 当前 amendment action。
|
||||
- existing target key 或唯一目标绑定。
|
||||
- reliable before/after 或明确 change detail。
|
||||
- 涉及入住、离店或晚数时,按 `54-stay-date-parsing.md` 解析并保留日期证据。
|
||||
- 系统上下文支持继续处理。
|
||||
- 涉及房型、Rate Code、Fix Charge 时,reference 支持或下游硬校验明确。
|
||||
|
||||
## Before / After
|
||||
|
||||
可得时保留:
|
||||
|
||||
```json
|
||||
{
|
||||
"before_after": [
|
||||
{
|
||||
"field": "arrival_date",
|
||||
"before": "",
|
||||
"after": "",
|
||||
"evidence": ""
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
真正 amendment 无法建立 before/after 时,输出人工复核。
|
||||
|
||||
日期相关 before/after 必须保留 `hotel_date_raw`、`tour_date_raw`、`action_date_raw`、`sheet_month_year` 和 `date_inference_basis`,如适用。
|
||||
|
||||
## Linked Trace
|
||||
|
||||
Extra bed、Meeting、meal、arrival notice、room preference/setup、已确定的 payment information 或其他具体预订补充信息与有效 update 同现时:
|
||||
|
||||
- 输出主 `Update Booking / Amendment`。
|
||||
- 按目标输出一个 linked `Trace`;同一目标的多条补充信息合并。
|
||||
- 补充信息即使只是告知,也生成 Trace。
|
||||
- Update 已完整承接的 before/after 核心字段不得重复写成 Trace。
|
||||
|
||||
如果当前只有 Trace 补充信息,或只要求 add/update/cancel extra bed,不创建 Update 事件。
|
||||
|
||||
## Fix Charge
|
||||
|
||||
Fix Charge 可通过 Update 维护,但必须确认目标和动作类型:add、update 或 cancel。不清楚时人工复核。
|
||||
|
||||
## 人工复核
|
||||
|
||||
- 原订单找不到或目标不清。
|
||||
- 前置任务未完成或系统上下文阻塞。
|
||||
- before/after 不可靠。
|
||||
- 当前动作可能是 New Booking、Cancel 或 Amend Group Code。
|
||||
- room mapping、Rate Code 或 price 不唯一。
|
||||
- Fix Charge 动作或金额不清。
|
||||
- QBD/LianTai row、highlight、strikethrough evidence 不可读。
|
||||
@@ -0,0 +1,58 @@
|
||||
# 取消预订
|
||||
|
||||
## 适用业务
|
||||
|
||||
用于当前邮件要求取消或释放:
|
||||
|
||||
- FIT Reservation
|
||||
- Group Block
|
||||
- Allotment / Control Block
|
||||
- 控房或配额
|
||||
|
||||
可接受信号:
|
||||
|
||||
- cancel booking / reservation / group
|
||||
- release or cancel block
|
||||
- cancel allotment / allocation / control block
|
||||
- `CXL`
|
||||
- 明确整单取消
|
||||
|
||||
## 事件类型
|
||||
|
||||
- 普通订单取消:`Cancel Booking`
|
||||
- 控房/配额取消:`Cancel Allotment`
|
||||
|
||||
## 部分修改边界
|
||||
|
||||
减少房量、改日期、释放部分 allocation 可能是 Update,不是整单 Cancel。不清楚时输出人工复核。
|
||||
|
||||
## Parent Allocation Linked Event
|
||||
|
||||
当当前证据已经确认 parent-to-child allocation creation,且 parent group code 清楚时,必须为 parent group 生成 linked cancel/release 候选。
|
||||
|
||||
这个事件:
|
||||
|
||||
- 不替代 child New Booking。
|
||||
- 不要求字面 cancel / CXL。
|
||||
- 必须来自当前 parent-child split 证据。
|
||||
- 不得由历史证据单独触发。
|
||||
- 只是候选事件,不代表 PMS 已取消成功,不创建真实 TaskCard,不写外部系统。
|
||||
|
||||
## 不适用
|
||||
|
||||
- 新建,除 parent release linked event 外。
|
||||
- 普通 date/room/guest/price amendment。
|
||||
- Voucher/payment evidence。
|
||||
- Rooming List。
|
||||
- 只有 Trace。
|
||||
- cancel action 只在历史邮件中。
|
||||
|
||||
## 人工复核
|
||||
|
||||
- cancel target 不清。
|
||||
- 出现 `CXL` 但不确定是否当前动作。
|
||||
- 不清楚是整单取消还是部分 update。
|
||||
- parent release evidence 缺 parent/child 关系。
|
||||
- parent group code、child list 或 parent-child split evidence 不清。
|
||||
- 多目标无法拆分。
|
||||
- 系统上下文显示 conflict、lock 或 already completed state。
|
||||
@@ -0,0 +1,104 @@
|
||||
# Voucher 与付款凭证
|
||||
|
||||
## 适用业务
|
||||
|
||||
仅当当前邮件包含真实当前 voucher 或 payment evidence 时使用:
|
||||
|
||||
- 当前附件图片
|
||||
- 当前 inline image
|
||||
- 当前 PDF
|
||||
- 当前 downloaded file reference
|
||||
|
||||
事件类型:
|
||||
|
||||
- `Voucher Received`
|
||||
- `Payment Evidence`
|
||||
|
||||
两者共享当前附件、目标绑定和安全规则,但不是同一个事件:实际 `CREDIT VOUCHER` 文档输出 `Voucher Received`;银行转账、现金存款或交易回执输出 `Payment Evidence`。Voucher 不证明资金到账,Payment Evidence 也不表示酒店已经确认付款。
|
||||
|
||||
## Credit Voucher
|
||||
|
||||
典型信号:
|
||||
|
||||
- LT / LianTai logo。
|
||||
- 泰國聯泰旅運集團有限公司 / `LIAN TAI TRAVEL GROUP (THAILAND) CO., LTD.`
|
||||
- `CREDIT VOUCHER`
|
||||
- `DATE`、`CODE / 團號`、`IN`、`OUT`
|
||||
- `SGL`、`TWN`、`TRP`
|
||||
- `B`、`L`、`D`
|
||||
- 手写、盖章或签名
|
||||
|
||||
`CODE / 團號` 是优先目标来源。模糊、空白或冲突时人工复核。
|
||||
|
||||
## Bank Transfer Slip
|
||||
|
||||
付款证据可包括:
|
||||
|
||||
- 银行转账成功截图
|
||||
- 现金存款收据
|
||||
- 交易收据
|
||||
- payment slip
|
||||
- payment confirmation 图片/PDF
|
||||
|
||||
## 不得仅凭文本触发
|
||||
|
||||
以下信号不能单独触发:
|
||||
|
||||
- 关键词 `voucher` / `payment slip`
|
||||
- subject `FULL PAYMENT`
|
||||
- 文字说 voucher 已发送
|
||||
- 只有附件文件名
|
||||
- 酒店回复 thanking voucher
|
||||
- 只有历史中的 voucher
|
||||
- 没有当前 image/PDF/file evidence 的表格状态
|
||||
|
||||
文本提到 voucher 但缺当前证据时:如果没有匹配任何支持业务事件,由 Main Agent 输出 `S10`;如果已明确匹配 Voucher/Payment 事件但当前证据不可读或目标不安全,输出业务级 `Need Manual Review`。
|
||||
|
||||
## 同邮件其他付款内容
|
||||
|
||||
- 当前付款凭证与需要酒店决定的付款安排询问同现时,付款文件输出 `Payment Evidence`,询问原文按 `03-current-content-completeness.md` 输出到 `unhandled_current_intents`。
|
||||
- 例如“余款能否入住时支付”是付款政策审批询问,不是 `Payment Notice`,也不得改名为 Trace。
|
||||
- “余款将在入住时支付”是已经确定、需要随预订保留的补充付款安排,可以按 `16-trace-notes.md` 输出 `Trace.payment_information`。
|
||||
- 当前凭证与未覆盖意图必须分别保留;不得因为付款图片已成功路由就丢弃正文中的审批询问。
|
||||
|
||||
## 目标绑定
|
||||
|
||||
一个 voucher/payment event 绑定一个目标 group code 或 reservation key。多个 group code 必须拆分。
|
||||
|
||||
一张 bank slip 覆盖多个 group code 时,每个 group code 输出一个事件,并在 `extracted_fields.related_group_codes` 保留完整集合。多个事件可以共享同一个 `voucher_attachment.file_reference`。
|
||||
|
||||
不要把 amount、date、bank account、payer、payee、reference number、QR 或 memo 抽成业务字段。用户应查看原始图片或 PDF。
|
||||
|
||||
## 下游意图
|
||||
|
||||
事件可以保留下游意图:付款确认后将 Reservation Type 更新为 `PD`。本 skill 不确认 payment,也不执行更新。
|
||||
|
||||
```json
|
||||
{
|
||||
"voucher_attachment": {
|
||||
"display_original": true,
|
||||
"file_reference": ""
|
||||
},
|
||||
"requires_department_routing": true,
|
||||
"department_routing": [
|
||||
{
|
||||
"department": "Finance",
|
||||
"purpose": "confirm_payment_received",
|
||||
"required": true,
|
||||
"status": "pending"
|
||||
}
|
||||
],
|
||||
"post_confirmation_intent": {
|
||||
"reservation_type": "PD",
|
||||
"status": "pending_payment_confirmation"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## 人工复核
|
||||
|
||||
- 当前 image/PDF/file 不可读。
|
||||
- 多个 group code 无法拆分。
|
||||
- voucher subtype 不清。
|
||||
- target key 缺失且无法唯一绑定。
|
||||
- 证据只有历史或文件名。
|
||||
@@ -0,0 +1,58 @@
|
||||
# Rooming List 与 Name List
|
||||
|
||||
## 适用业务
|
||||
|
||||
用于当前邮件提供:
|
||||
|
||||
- Rooming List
|
||||
- Name List / NAMELIST / NAME LIST
|
||||
- guest list
|
||||
- 分房名单
|
||||
- guest-level list material 的文件、链接或内容
|
||||
|
||||
载体可以是附件、inline file、Google Drive / 网盘链接、downloaded file reference、PDF、图片、Excel、OCR 或 table。载体本身不够,必须证明内容或上下文确实是名单。
|
||||
|
||||
## 正向证据
|
||||
|
||||
- 当前文本明确说 Rooming List / Name List / 分房名单 / 客人名单。
|
||||
- 当前文件内容有 guest-level rows、names 或 room assignment。
|
||||
- LianTai/QBD 名单附件的 file name 匹配完整 group code 格式,且与表内字段、正文或历史上下文至少一项互相印证。
|
||||
- 当前文件是在直接回复酒店最近索要 rooming list。
|
||||
- QBD/LianTai 当前事件明确是 NAME LIST / Rooming List,且名单证据可读。
|
||||
|
||||
## 负向证据
|
||||
|
||||
不要把以下内容当作 Rooming List:
|
||||
|
||||
- QBD/LianTai booking update table。
|
||||
- `BOOKING 01-2026` 之类月度 booking sheet。
|
||||
- 包含 group code、pax、itinerary、hotel、status、UPDATE、NEW BOOKING、AMEND、CXL、CFM、room quantity、price、hotel response 的表。
|
||||
- invoice、payment、voucher、allotment、control block sheet。
|
||||
- 只有文件名,缺名单证据。
|
||||
- history-only rooming list mention。
|
||||
|
||||
## 目标拆分
|
||||
|
||||
- 按 target group/object 拆分。
|
||||
- workbook 可包含多个 group 或 sheet。
|
||||
- sheet name 是 evidence,不是最终证明。
|
||||
- file name 可以作为 target group binding evidence;不得仅凭 file name 单独决定 group code。
|
||||
- 一个目标对象一个 Rooming List event。
|
||||
|
||||
## 下游意图
|
||||
|
||||
Rooming List 可能派生:
|
||||
|
||||
- `TA RECORDER`
|
||||
- `Note`
|
||||
- Routing / PM room / Block Status update intent
|
||||
|
||||
本 skill 只输出候选事件和意图。真实导入和更新由信息系统执行。
|
||||
|
||||
## 人工复核
|
||||
|
||||
- file/link 无法下载或读取。
|
||||
- 不清楚文件是名单还是 booking update table。
|
||||
- target group binding 不清。
|
||||
- 多个 group 无法安全拆分。
|
||||
- sheet/file name 与表内字段、当前文本、历史上下文或系统上下文冲突。
|
||||
@@ -0,0 +1,58 @@
|
||||
# 修改 Group Code
|
||||
|
||||
## 适用业务
|
||||
|
||||
用于当前事件明确要求把既有 booking、group 或 reservation 的 Group Code 从旧值改为新值。
|
||||
|
||||
事件类型:`AMEND GROUP CODE`
|
||||
|
||||
## 强信号
|
||||
|
||||
- `AMEND GROUP CODE TO : <new_group_code>`
|
||||
- `AMEND GROUP CODE`
|
||||
- `A to B`
|
||||
- `A change to B`
|
||||
- `A 改为 B`
|
||||
- `A เปลี่ยนเป็น B`
|
||||
|
||||
必须能表达 old group code -> new group code 的方向关系。
|
||||
|
||||
## 来源
|
||||
|
||||
可以来自当前 body、table、PDF、image OCR 或附件内容。
|
||||
|
||||
## 输出字段
|
||||
|
||||
前端展示字段保持窄口径:
|
||||
|
||||
- `old_group_code`
|
||||
- `new_group_code`
|
||||
|
||||
其他证据放在 `context_used` 或 `extracted_fields`。
|
||||
|
||||
## 不适用
|
||||
|
||||
- 只有一个 group code,old/new 关系不清。
|
||||
- 普通 date/room/price/guest amendment。
|
||||
- New Booking creation。
|
||||
- Cancel / release / allotment。
|
||||
- Voucher/payment evidence。
|
||||
- Rooming List。
|
||||
- 纯确认或 history-only group code change。
|
||||
- 主语义是 cancel/release,只是顺带出现 moved/join group。
|
||||
|
||||
## 表格规则
|
||||
|
||||
不得依赖固定列、行、单元格或 sheet name 作为业务规则。必须依赖文本语义和 old/new 关系。单元格位置只能作为 evidence。
|
||||
|
||||
## Linked Trace
|
||||
|
||||
AMEND GROUP CODE 同邮件出现 extra bed、Meeting、meal、arrival notice、room preference/setup、已确定的 payment information 或其他具体预订补充信息时,按目标额外生成一个 linked `Trace`。同一目标的多条补充信息合并;补充信息即使只是告知,也不得忽略。old/new group code 核心字段不得重复生成 Trace。
|
||||
|
||||
## 人工复核
|
||||
|
||||
- old code 缺失。
|
||||
- new code 缺失或不可读。
|
||||
- 方向不清。
|
||||
- 多个 possible old/new pair 冲突。
|
||||
- current/history boundary 不清。
|
||||
@@ -0,0 +1,211 @@
|
||||
# Trace 与预订补充信息
|
||||
|
||||
## 定义
|
||||
|
||||
`Trace` 用于保存当前邮件中与具体预订对象相关、但不属于主任务核心参数的补充业务信息。
|
||||
|
||||
补充信息可以是要求、安排、备注或单纯告知。只要当前内容包含具体预订业务信息并能绑定目标,就生成 `Trace`;不要判断发件人是否明确要求酒店记录、执行或转交。
|
||||
|
||||
主任务已经完整表达的核心参数不得重复生成 `Trace`。例如 New Booking 的入住日期、房型和房量仍属于 New Booking;同邮件中的 meeting、meal、arrival notice 或 room preference 才作为补充信息生成 `Trace`。
|
||||
|
||||
## 触发条件
|
||||
|
||||
普通 `Trace` 必须同时满足:
|
||||
|
||||
- 信息来自当前邮件正文、当前附件、当前图片/OCR、当前表格或当前明确继续处理指令。
|
||||
- 信息包含具体预订业务内容,不是只有礼貌或收件确认文字。
|
||||
- 信息能唯一绑定 `group_code`、confirmation number、reservation number,或能关联同邮件中目标明确的主事件。
|
||||
- 信息不属于主任务已经完整承接的核心参数。
|
||||
|
||||
历史内容只能补充目标 key 或解释当前信息,不能单独触发 `Trace`。
|
||||
|
||||
事件类型固定为:
|
||||
|
||||
- `Trace`
|
||||
|
||||
普通预订补充信息不再输出 `Note`。`Note` 仅为旧契约兼容保留,除非后续任务卡映射另有明确规则。
|
||||
|
||||
## 子类型
|
||||
|
||||
- `extra_bed`:同一 Trace 的全部条目都是 extra bed。
|
||||
- `general_request`:包含任意非 extra-bed 条目,包括 mixed Trace。
|
||||
|
||||
## Trace 输出
|
||||
|
||||
`extracted_fields` 固定使用:
|
||||
|
||||
```json
|
||||
{
|
||||
"trace_subtype": "extra_bed | general_request",
|
||||
"trace_text": "<按当前证据顺序合并的完整补充信息原文>",
|
||||
"trace_items": [
|
||||
{
|
||||
"category": "extra_bed | room_preference | room_setup | meeting | function | meal | transport | payment_information | general_information",
|
||||
"text_raw": "<单条原文>",
|
||||
"service_date": "YYYY-MM-DD | null",
|
||||
"service_period_raw": "FULL DAY | null",
|
||||
"pax": 110,
|
||||
"notify_departments": []
|
||||
}
|
||||
],
|
||||
"notify_departments": []
|
||||
}
|
||||
```
|
||||
|
||||
规则:
|
||||
|
||||
- `trace_text` 必须完整保留所有补充信息原文,按当前证据中的出现顺序使用换行连接;结构化字段不能替代原文。
|
||||
- `trace_items` 每条补充信息一个 item,顺序与 `trace_text` 一致。
|
||||
- `category` 只能使用上述枚举;没有更具体类别时使用 `general_information`。
|
||||
- `service_date`、`service_period_raw` 和 `pax` 只在当前证据或合法日期上下文可以唯一支持时填写,否则为 `null`。
|
||||
- item 的 `notify_departments` 只保留当前证据明确指定或本规则可以唯一确定的部门;无法确定时使用空数组。
|
||||
- 事件级 `notify_departments` 是所有 item 已知部门的去重合集;全部未知时使用空数组。
|
||||
- `notify_departments` 为空不阻塞 Trace,不得仅因此输出人工复核。
|
||||
|
||||
## General Request
|
||||
|
||||
`general_request` 包括但不限于:
|
||||
|
||||
- Meeting、conference、function、banquet。
|
||||
- Meal arrangement。
|
||||
- Airport transfer 或其他 transport arrangement。
|
||||
- Non-smoking、high floor、away from elevator、same floor 等 room preference。
|
||||
- Honeymoon、房间布置、amenity placement 等 room setup。
|
||||
- Guide arrival、到店安排、接待信息或其他具体预订补充事实。
|
||||
- 已确定的补充付款安排,例如“剩余款项将在入住时支付”。
|
||||
- 其他能绑定具体预订对象、且不属于主任务核心参数的补充业务信息。
|
||||
|
||||
以上是开放示例,不是封闭白名单。即使当前内容只是告知,没有出现 `please note`、`please arrange`、`please inform` 等动作词,也按本规则生成 Trace。
|
||||
|
||||
`payment_information` 只表示已经确定、需要随预订保留的补充付款安排。它不包括付款凭证、到账结果、Payment Notice、Invoice、催款、价格或付款条件审批询问;这些内容继续按各自业务规则路由,不得为了生成 Trace 任务卡而改名。
|
||||
|
||||
例如 New Booking `HD260510A` 同邮件出现 `12/5 FULL DAY Meeting 110 PAX` 时,额外生成 linked `Trace.general_request`,并保留:
|
||||
|
||||
```json
|
||||
{
|
||||
"trace_subtype": "general_request",
|
||||
"trace_text": "12/5 FULL DAY Meeting 110 PAX",
|
||||
"trace_items": [
|
||||
{
|
||||
"category": "meeting",
|
||||
"text_raw": "12/5 FULL DAY Meeting 110 PAX",
|
||||
"service_date": "2026-05-12",
|
||||
"service_period_raw": "FULL DAY",
|
||||
"pax": 110,
|
||||
"notify_departments": []
|
||||
}
|
||||
],
|
||||
"notify_departments": []
|
||||
}
|
||||
```
|
||||
|
||||
## Extra Bed
|
||||
|
||||
Extra bed item 使用通用 item 结构:
|
||||
|
||||
```json
|
||||
{
|
||||
"category": "extra_bed",
|
||||
"text_raw": "<extra bed 原文>",
|
||||
"service_date": null,
|
||||
"service_period_raw": null,
|
||||
"pax": null,
|
||||
"notify_departments": ["FO", "HSK"]
|
||||
}
|
||||
```
|
||||
|
||||
同时继续在事件级 `extracted_fields` 保留原有业务意图字段,不得移动或删除:
|
||||
|
||||
```json
|
||||
{
|
||||
"occupancy_update": "3adult",
|
||||
"requires_rate_update": true,
|
||||
"rate_adjustment_formula": "rate_code_price / 2 * 3"
|
||||
}
|
||||
```
|
||||
|
||||
只要合并后的 Trace 包含 extra bed item,就保留上述事件级字段;全部 item 都是 extra bed 时使用 `trace_subtype=extra_bed`,否则使用 `general_request`。
|
||||
|
||||
硬边界:
|
||||
|
||||
- 不计算最终价格。
|
||||
- 不决定 Rate Code。
|
||||
- 不把 extra bed 当 room quantity。
|
||||
- 不把 `U-เตียงเสริม` 当 PMS room type。
|
||||
- 原始 extra bed price text 只能作为 evidence。
|
||||
|
||||
## 部门规则
|
||||
|
||||
现有明确映射继续使用:
|
||||
|
||||
- Non-smoking、high floor、away from elevator、same floor:`FO`。
|
||||
- Set Honeymoon、房间布置、amenity placement、需要 housekeeping 准备的要求:`FO` + `HSK`。
|
||||
- Extra bed:`FO` + `HSK`。
|
||||
|
||||
Meeting、function、meal、transport、payment information 或其他类别没有明确部门映射时使用空数组,交由任务卡用户确认,不输出人工复核。
|
||||
|
||||
## 告知、礼貌文字与审批询问边界
|
||||
|
||||
以下当前内容生成 Trace:
|
||||
|
||||
- `FYI guide will arrive at 20:00` 等带有具体预订事实的告知。
|
||||
- 已确定的安排或事实,即使没有要求酒店采取动作。
|
||||
|
||||
以下内容不生成 Trace:
|
||||
|
||||
- 只有 `Thanks`、`Noted`、`Received`、`FYI`、`confirmed receipt` 或同类礼貌/收件确认,没有任何具体预订业务信息。
|
||||
- Booking Confirmation Request、`please confirm booking details` 或要求酒店核对并回复既有预订。
|
||||
- 需要酒店批准或决定的价格谈判、退款、减免、豁免、账期、付款政策或合同条件询问。
|
||||
- 例如“剩余款项可以入住时支付吗”属于付款政策审批询问,不是 Trace;“剩余款项将在入住时支付”属于已确定的 payment information,可以是 Trace。
|
||||
|
||||
不符合 Trace 但具有当前业务意义的内容不得静默忽略。必须在 Main Agent 素材包的 `unknowns` 中保留原文,并使用:
|
||||
|
||||
```json
|
||||
{
|
||||
"category": "unhandled_current_business_content",
|
||||
"current_or_history": "current",
|
||||
"reason_code": "requires_business_approval_or_unsupported_task_card",
|
||||
"text_raw": "<当前原文>",
|
||||
"case_keys": {
|
||||
"group_code": null,
|
||||
"confirmation_number": null,
|
||||
"reservation_number": null,
|
||||
"block_code": null
|
||||
},
|
||||
"attachments": [],
|
||||
"file_references": []
|
||||
}
|
||||
```
|
||||
|
||||
同邮件存在至少一个支持事件时,按 `03-current-content-completeness.md` 输出到业务根对象的 `unhandled_current_intents`;整封邮件没有支持事件时由 Main Agent 输出 S10。未覆盖意图不是 Trace,也不创建任务。
|
||||
|
||||
## 独立、关联与合并
|
||||
|
||||
- 同一封邮件、同一目标对象只生成一个 `Trace`。
|
||||
- 同一目标的多条补充信息合并进一个 `trace_text` 和多个 `trace_items`。
|
||||
- 多个 `group_code` 必须分别生成 Trace,不得合并到数组型 `case_keys.group_code`。
|
||||
- 独立 Trace 必须由当前证据或允许的历史证据唯一绑定目标。
|
||||
- Trace 与 New Booking、Update Booking / Amendment 或 AMEND GROUP CODE 同现时,输出主事件和单独 linked Trace。
|
||||
- linked Trace 保留 `related_source_event_index`、`related_event_type`、`relationship_type=linked_trace` 和 `requires_downstream_hard_validation=true`。
|
||||
- 不得把 Trace 吞进主事件的普通备注字段。
|
||||
|
||||
## Cancel 边界
|
||||
|
||||
Cancel 行不会因为被取消对象历史上有补充信息就自动生成 Trace。只有当前邮件同时提供新的、需要保留的具体预订补充信息时才生成 Trace。
|
||||
|
||||
## 人工复核
|
||||
|
||||
只有以下情况输出 `Need Manual Review`:
|
||||
|
||||
- 当前 Trace 内容不可读,无法保留可靠原文。
|
||||
- 当前信息无法唯一绑定目标对象。
|
||||
- 历史目标候选冲突。
|
||||
- 同邮件存在多个主事件,补充信息无法判断属于哪个目标。
|
||||
- current/history 边界不清。
|
||||
- extra bed rate update 无法安全附着到目标。
|
||||
|
||||
以下情况本身不构成人工复核:
|
||||
|
||||
- `notify_departments` 不清。
|
||||
- `service_date`、`service_period_raw` 或 `pax` 缺失。
|
||||
- 当前信息是要求还是单纯告知不清。
|
||||
@@ -0,0 +1,66 @@
|
||||
# TA Recorder 与 Note
|
||||
|
||||
## 适用业务
|
||||
|
||||
TA Recorder 通常由已确认的 Rooming List / Name List 事件派生。
|
||||
|
||||
事件类型:
|
||||
|
||||
- `TA RECORDER`
|
||||
- `Note`
|
||||
|
||||
## Direct Request
|
||||
|
||||
只有同时满足以下条件时,才允许直接从当前邮件识别 TA Recorder:
|
||||
|
||||
- 当前文本明确要求 maintain/update TA Recorder。
|
||||
- 目标 `group_code` 唯一。
|
||||
- 存在名单或分房附件、链接或 file reference。
|
||||
- 文件与目标绑定清楚。
|
||||
|
||||
## 派生规则
|
||||
|
||||
Rooming List 已确认 target group codes 时:
|
||||
|
||||
- 每个目标 `group_code` 派生一个 TA Recorder event。
|
||||
- 多个目标可以共享同一个 workbook/file reference。
|
||||
- 保留与 Rooming List event 的关系。
|
||||
|
||||
TA Recorder 不是一封邮件一张卡、一个 workbook 一张卡或一个 sheet 一张卡。它是一个目标 `group_code` 一个事件。
|
||||
|
||||
## Sheet 规则
|
||||
|
||||
- Sheet name 可以作为 binding evidence。
|
||||
- Sheet name 不得单独决定 group code。
|
||||
- File name 可以作为 binding evidence;当 file name 匹配完整 group code 格式时,仍需 Rooming List 目标绑定已确认后才可派生 TA Recorder。
|
||||
- Sheet name 或 file name 与表内字段、正文、历史上下文冲突时,输出人工复核。
|
||||
- `IN9-17` 不是 group code。
|
||||
- `总名单` 是 shared evidence,不是单独目标。
|
||||
- `WpsReserved_CellImgList` 等系统 sheet 忽略。
|
||||
|
||||
## Note
|
||||
|
||||
Rooming List 也可能派生 Note。Note 字段可包含:
|
||||
|
||||
- payer code
|
||||
- charge code
|
||||
- breakfast
|
||||
- note text
|
||||
|
||||
具体可写字段由信息系统模板和人工确认决定。
|
||||
|
||||
## 不适用
|
||||
|
||||
- `TA` 只是 travel agent、source 或 reservation type。
|
||||
- parent Rooming List 是人工复核。
|
||||
- 文件不可读或无权限。
|
||||
- 没有名单/分房文件。
|
||||
- current/history boundary 不清。
|
||||
|
||||
## 人工复核
|
||||
|
||||
- target group code 不清。
|
||||
- attachment/file binding 不清。
|
||||
- workbook 包含多个 group,但 target split 未确认。
|
||||
- sheet/file name 与正文、表内字段或 Rooming List binding 冲突。
|
||||
- parent Rooming List 未确认。
|
||||
@@ -0,0 +1,32 @@
|
||||
# Invoice 与 Payment Notice
|
||||
|
||||
## 适用业务
|
||||
|
||||
用于当前证据明确要求:
|
||||
|
||||
- 生成 Proforma Invoice。
|
||||
- 提供 invoice 所需材料。
|
||||
- 收到已有 invoice 或 revised invoice。
|
||||
- 发送不属于 voucher/payment image evidence 的 payment notice。
|
||||
|
||||
事件类型:
|
||||
|
||||
- `Invoice Generation`
|
||||
- `Invoice Received`
|
||||
- `Payment Notice`
|
||||
|
||||
`Payment Notice` 是清楚的付款通知,不是付款条件审批。需要酒店决定是否接受分期、延期、账期、余款到店支付或其他付款政策的询问,不输出 `Payment Notice`:同邮件存在其他支持事件时进入 `unhandled_current_intents`,整封邮件没有支持事件时由 Main Agent 输出 S10。
|
||||
|
||||
当前邮件同时包含 bank slip/payment receipt 与付款安排询问时,文件按 `13-voucher-payment.md` 输出 `Payment Evidence`,询问按 `03-current-content-completeness.md` 单独保留;不得合并后遗漏询问。
|
||||
|
||||
## 安全边界
|
||||
|
||||
- 不生成 Invoice Excel/PDF。
|
||||
- 不确认 payment。
|
||||
- 不创建 receipt。
|
||||
- 不执行 storage 或 accounting 动作。
|
||||
- 只输出候选事件、证据、目标 key 和人工复核点。
|
||||
|
||||
## 人工复核
|
||||
|
||||
在详细 invoice 规则未完善前,除非 event type 和目标都非常明确,否则优先 `Need Manual Review`。
|
||||
@@ -0,0 +1,94 @@
|
||||
# QBD / LianTai 表格工作流
|
||||
|
||||
## 适用场景
|
||||
|
||||
当当前邮件、附件、发件人、主题、表格、OCR 或抽取证据显示 QBD/LianTai 工作流时读取。
|
||||
|
||||
常见信号:
|
||||
|
||||
- QBD / LianTai 发件人或渠道。
|
||||
- Excel/table 附件。
|
||||
- `BOOKING UPDATE`、`NEW BOOKING`、`AMEND`、`AMD`、`AMD ALLOTMENT`、`CXL`、`CFM`。
|
||||
- 黄色/高亮行、红字、删除线、hotel status column、泰文 `โรงแรม` 或酒店回应/状态单元格。
|
||||
|
||||
## 当前行规则
|
||||
|
||||
- 只有当前有效行可以触发事件。
|
||||
- 当前邮件附件中业务列被 yellow/highlight 的行全部视为当前有效行,不要求 `action_date_raw` 匹配邮件标题日期。
|
||||
- 业务列包括 group code、人数、行程、酒店、备注、酒店状态等列;只有序号列、标题、说明区或装饰单元格上色,不单独触发事件。
|
||||
- 多个当前有效行必须一行一个事件。
|
||||
- 不得用汇总字段或数组型 `case_keys.group_code` 合并多行。
|
||||
- 行证据、highlight、sheet、status 或 current-row selection 不可读时,输出人工复核。
|
||||
- 某一行不安全,不得阻塞其他安全行。
|
||||
|
||||
## 行证据
|
||||
|
||||
保留:
|
||||
|
||||
- attachment/file name
|
||||
- workbook/sheet
|
||||
- row index / row label
|
||||
- highlight / yellow / red text / strikethrough
|
||||
- action/status cell raw text,包括 `action_date_raw`
|
||||
- hotel date raw text、tour date raw text、sheet month/year、raw nights
|
||||
- raw room type / room quantity
|
||||
- raw price / rate marker
|
||||
- hotel status text
|
||||
- before/after evidence
|
||||
- OCR/table confidence,如有
|
||||
|
||||
## 日期识别
|
||||
|
||||
酒店入住、离店和晚数必须按 `54-stay-date-parsing.md` 解析。
|
||||
|
||||
- 酒店列开头住期范围优先,例如 `14-15`、`15-17`、`31-02`。
|
||||
- 行程日期列用于补全年/月和校验,不得直接覆盖酒店住期。
|
||||
- `action_date_raw` 只作为动作证据,不是入住日期,也不是标黄行过滤条件。
|
||||
|
||||
## 新订行
|
||||
|
||||
当前行明确 `NEW BOOKING`、`NEW`、新增、จองใหม่,且目标和最小字段清楚时,可路由 `New Booking`。新订创建前通常没有 confirmation number;缺 confirmation number 不是复核原因。
|
||||
|
||||
## 修改行
|
||||
|
||||
Amendment 行需要可靠 current amendment 和 before/after evidence,除非实质是 parent-to-child allocation creation。
|
||||
|
||||
标准 OP 联系兜底文字不应当作业务 amendment,除非包含具体可执行请求。
|
||||
|
||||
## 取消行
|
||||
|
||||
`CXL`、cancel、release、cancel block 可路由 `Cancel Booking` / `Cancel Allotment`,前提是动作来自当前有效行且目标清楚。
|
||||
|
||||
## Parent-To-Child Allocation
|
||||
|
||||
当当前证据显示 parent group code 后接 `AMEND TO`、`AMED TO`、allocation、allotment、control block、配额、取配、配合房等语义,并列出多个 child group code 及日期、晚数、房型、房量:
|
||||
|
||||
- child line 路由为 `New Booking` / Allotment-Control Block creation。
|
||||
- 一个 child group code 一个事件。
|
||||
- parent 放入 `parent_group_code` 或 `parent_allocation_context`。
|
||||
- 不得把 parent group 写成 child event 的 `case_keys.group_code`。
|
||||
- 不要求普通 amendment 的 before/after。
|
||||
- parent group code 清楚时,必须额外生成独立的 linked parent release/cancel candidate,事件类型为 `Cancel Booking`。
|
||||
- parent release/cancel candidate 是候选事件,不代表 PMS 已取消成功。
|
||||
|
||||
如果某 child line 只有 generic `SUITE` 且无明确床型,保留 raw room type 并标记 downstream hard validation;不要让单个 child 阻塞整封邮件。
|
||||
|
||||
## 行内 Trace 补充信息
|
||||
|
||||
extra bed / 加床 / `เตียงเสริม` / `U-เตียงเสริม`:
|
||||
|
||||
- 不计入 room quantity。
|
||||
- 不决定 FIT/Group。
|
||||
- 不映射 PMS room type。
|
||||
- 不决定 Rate Code。
|
||||
- 与主事件同现时,生成 linked `Trace`。
|
||||
|
||||
当前有效行或同邮件中与该行目标明确关联的 Meeting、meal、arrival notice、room preference/setup、已确定的 payment information 或其他具体预订补充信息,也生成 linked `Trace`。信息即使只是告知也保留;同一目标的多条补充信息合并为一个 Trace,多个 group code 分别生成 Trace。主事件已完整承接的核心字段不得重复写入 Trace。
|
||||
|
||||
## 价格 Marker
|
||||
|
||||
`U-<number>` 是 price/rate marker,不是 confirmation、reservation 或 booking reference。可用于 Rate Code / settlement price 判断。
|
||||
|
||||
## 名单边界
|
||||
|
||||
Rooming List / Name List 文件不得与 QBD/LianTai booking update 表混淆。看文件内容,而不是只看 Excel 载体。
|
||||
@@ -0,0 +1,56 @@
|
||||
# Allotment / Control Block
|
||||
|
||||
## 适用业务
|
||||
|
||||
覆盖 allocation / allotment / control block 对象的新建、维护、释放、取消,以及 parent-to-child allocation creation。
|
||||
|
||||
## 新建控房/配额
|
||||
|
||||
当当前证据要求以下对象时,路由到 `New Booking`:
|
||||
|
||||
- allotment
|
||||
- allocation
|
||||
- control block
|
||||
- 控房
|
||||
- 配额
|
||||
- 取配
|
||||
- 配合房
|
||||
- parent group 拆分成 child group codes 并给出房量分配
|
||||
|
||||
对象类型记录:
|
||||
|
||||
```json
|
||||
{
|
||||
"booking_object_type": "Allotment / Control Block"
|
||||
}
|
||||
```
|
||||
|
||||
## Parent-To-Child Split
|
||||
|
||||
当当前证据显示 parent group -> child group codes:
|
||||
|
||||
- 每个 child group 一个 `New Booking`。
|
||||
- parent group 只是 child creation context。
|
||||
- 保留 `allocation_split_from_parent=true`。
|
||||
- 保留 parent original room summary,如有。
|
||||
- 不得因为文本写 `AMEND` 就归为普通改单。
|
||||
- parent group code 清楚时,必须额外输出独立 linked parent release/cancel candidate。
|
||||
|
||||
## Parent Release / Cancel
|
||||
|
||||
当 current evidence 确认 child allocation creation,且 parent group code 清楚时,必须生成 linked parent release/cancel candidate,事件类型归 `Cancel Booking`。
|
||||
|
||||
该事件:
|
||||
|
||||
- 不替代 child creation。
|
||||
- 不强制要求字面 `cancel` / `CXL`。
|
||||
- 不得从 history-only parent-child evidence 触发。
|
||||
- 只是候选事件,不代表 PMS 已取消成功,不创建真实 TaskCard,不写外部系统。
|
||||
|
||||
如果 parent group code、child group list 或 parent-child split evidence 不清,输出 `Need Manual Review`,reason code 使用 `parent_child_split_evidence_unclear`。
|
||||
|
||||
## 默认 Rate / Room
|
||||
|
||||
Allotment / Control Block 缺 explicit Rate Code 时,只能在 room mapping 唯一且上下文明显符合 control-block default rules 时使用 `51-rate-code.md` 默认。
|
||||
|
||||
不唯一时保留 raw values,并输出人工复核或 downstream hard validation。
|
||||
@@ -0,0 +1,38 @@
|
||||
# 房型映射
|
||||
|
||||
## 安全立场
|
||||
|
||||
房型映射必须由本 reference 支持且唯一。未覆盖或存在歧义时,保留 raw text,输出人工复核或 downstream validation。不要凭常识猜 PMS room type。
|
||||
|
||||
## 已知规则
|
||||
|
||||
| Raw / normalized signal | PMS room type code | 说明 |
|
||||
| --- | --- | --- |
|
||||
| 普通 `DBL`, `Double`, `1 DBL` | `RM2` | 普通 DBL。 |
|
||||
| 普通 `TWN`, `Twin`, `1 TWN` | `RM3` | 普通 TWN。 |
|
||||
| `U-DBL`, `Upgrade DBL` | `RM2` | Rate Code 走 upgrade 口径。 |
|
||||
| `U-TWN`, `Upgrade TWN` | `RM3` | Rate Code 走 upgrade 口径。 |
|
||||
| `U-TRP`, `TRP`, `Triple` | `RM4` | 需结合人数/家庭房语境确认。 |
|
||||
| `DBL SUITE`, `Double Suite`, `SUITE DBL` | `SU1` | 必须有明确 DBL suite 线索。 |
|
||||
| `TWN SUITE`, `Twin Suite`, `SUITE TWN` | `SU6` | 必须有明确 TWN suite 线索。 |
|
||||
| `FAMILY 3PAX`, `FAMILY 4PAX` | `SU3` | 家庭房规则。 |
|
||||
| `ST+K`, `2卧1厅`, `FAMILY 1` 且组合证据匹配 | `SU3` | Rate Code 继续按渠道/价格判断。 |
|
||||
| `HNM`, Honeymoon | 默认 DBL 路径 | 仅在没有更明确房型时使用。 |
|
||||
|
||||
## 保留规则
|
||||
|
||||
- 始终保留 `room_type_raw`。
|
||||
- normalized room text 与 PMS code 分开保存。
|
||||
- 不得让 PMS code 抹掉 `U-`、`Sup`、高级房、suite/family、price 等原始线索。
|
||||
- 不得仅凭 room code 反推 Rate Code。
|
||||
- Extra bed / 加床 / `เตียงเสริม` 不是房型。
|
||||
- `Q10` 类 suite 文本必须结合 twin/double/layout evidence;不得只凭 `Q10` 单独映射。
|
||||
|
||||
## 人工复核
|
||||
|
||||
- generic `SUITE` 没有精确床型,且下游系统要求最终 PMS code。
|
||||
- `FAMILY 1` 缺 ST+K / 2卧1厅 / 1200 组合证据。
|
||||
- `HNM` 与更明确房型冲突。
|
||||
- 存在多个映射候选。
|
||||
- raw room text 混合不兼容类别。
|
||||
|
||||
@@ -0,0 +1,77 @@
|
||||
# Rate Code 与结算价格
|
||||
|
||||
## 安全立场
|
||||
|
||||
Rate Code 必须由当前证据和本 reference 唯一支持。不要只凭 room code 猜。若 channel、market、room text、UP marker、price、breakfast、restaurant 或 supplier 上下文不足,输出人工复核。
|
||||
|
||||
## 已知规则
|
||||
|
||||
| 场景 | Typical Rate Code |
|
||||
| --- | --- |
|
||||
| QBD 普通 DBL/TWN 且无 `U` 或 Upgrade marker | `GRPA1-900` |
|
||||
| QBD `U-DBL` / `U-TWN` / `U-TRP` 或 Upgrade marker | `GRPA2-850UP` 或对应 UP rate code |
|
||||
| LianTai 普通 DBL/TWN 或 Sup DBL/Sup TWN | `GRP1-900` |
|
||||
| LianTai `U-DBL` / `U-TWN` | `WHO1-850UP` |
|
||||
| LianTai `ST+K` / `2卧1厅` / `FAMILY 1` 且价格 1200 | `WHO3-1200` |
|
||||
|
||||
价格示例:
|
||||
|
||||
- 850 -> `WHO1-850UP`
|
||||
- 900 -> `GRP1-900`
|
||||
- 1000 -> `WHO2-1000`
|
||||
- 1200 -> `WHO3-1200`
|
||||
|
||||
渠道和上下文优先于单纯价格。
|
||||
|
||||
## `U-<number>`
|
||||
|
||||
例如 `U-1200`:
|
||||
|
||||
- 数字部分视为 settlement price / price marker。
|
||||
- 保留 `rate_code_raw = "U-1200"`。
|
||||
- 数字命中已知规则时输出命中。
|
||||
- 数字不可读或未覆盖时人工复核。
|
||||
- 绝不写入 confirmation/reservation/booking reference 字段。
|
||||
|
||||
## 控房/配额默认
|
||||
|
||||
示例:
|
||||
|
||||
- `U-DBL` -> room `RM2`,settlement price 850。
|
||||
- `U-TWN` -> room `RM3`,settlement price 850。
|
||||
- `U-TRP` / `FAM` -> room `RM4`,settlement price 1275。
|
||||
|
||||
仅当事件明确是 new Allotment / Control Block、房型唯一映射,且当前没有不同明确规则时使用。
|
||||
|
||||
## 手工价格
|
||||
|
||||
当需要人工维护 settlement price:
|
||||
|
||||
```json
|
||||
{
|
||||
"rate_code": null,
|
||||
"settlement_price": null,
|
||||
"manual_settlement_price_required": true,
|
||||
"manual_price_reason_code": "",
|
||||
"price_evidence": []
|
||||
}
|
||||
```
|
||||
|
||||
手工价格仍要求目标、日期/room items、price text 和系统上下文安全。
|
||||
|
||||
## 复合价格
|
||||
|
||||
对于 `2000THB+500`、`1800+500`、`2000THB*2 +500*2`:
|
||||
|
||||
- 只用可分离的 base room price 判断 Rate Code / settlement price。
|
||||
- additional component 交给 `52-fix-charge.md`。
|
||||
- 不得把组件相加后当单一房价。
|
||||
|
||||
## 人工复核
|
||||
|
||||
- channel/market 未知或冲突。
|
||||
- raw room type 无法唯一映射。
|
||||
- UP marker 与普通 rate path 冲突。
|
||||
- price marker 不可读。
|
||||
- price 未命中任何规则。
|
||||
|
||||
@@ -0,0 +1,68 @@
|
||||
# Fix Charge
|
||||
|
||||
## 适用业务
|
||||
|
||||
Fix Charge 是 New Booking 或 Update Booking 的附加收费维护事项。它不是独立业务事件。
|
||||
|
||||
## 触发
|
||||
|
||||
只有当前证据包含可分离的复合单价或附加费组件时才识别,例如:
|
||||
|
||||
- `2000THB+500`
|
||||
- `1800THB+500`
|
||||
- `2000THB*2` 后接 `+附加500*2`
|
||||
|
||||
不得仅因普通房型或普通价格存在就触发。
|
||||
|
||||
## 解析
|
||||
|
||||
- `+` 前组件用于 Rate Code / settlement price。
|
||||
- `+` 后组件是 additional fee candidate。
|
||||
- 不得把 `2000+500` 合成 `2500` 判断 Rate Code。
|
||||
- 不得自行计算 quantity 或 total amount。
|
||||
|
||||
## 输出字段
|
||||
|
||||
```json
|
||||
{
|
||||
"fix_charge_required": true,
|
||||
"fix_charge_items": [
|
||||
{
|
||||
"charge_type": "fixed_charge",
|
||||
"amount": null,
|
||||
"currency": null,
|
||||
"pricing_mode": "unit",
|
||||
"unit_basis": null,
|
||||
"quantity": null,
|
||||
"total_amount": null,
|
||||
"raw_text": "",
|
||||
"evidence_source": "",
|
||||
"requires_followup_tool": true,
|
||||
"followup_tool_name": "create_or_update_fix_charge / TBD"
|
||||
}
|
||||
],
|
||||
"additional_operations": [
|
||||
{
|
||||
"operation_type": "create_or_update_fix_charge",
|
||||
"status": "pending_target_id"
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
## New Booking
|
||||
|
||||
New Booking 的 Fix Charge 操作必须等 reservation/group/block 目标存在后再执行。
|
||||
|
||||
## Update Booking
|
||||
|
||||
Update Booking 场景必须确认 current action 是 add、update 还是 cancel Fix Charge。目标或动作不清时人工复核。
|
||||
|
||||
## 人工复核
|
||||
|
||||
- 无法分离 base room price 与 additional fee。
|
||||
- additional fee amount 不可读。
|
||||
- 多个价格组件无法归属。
|
||||
- Update action 未说明 add/update/cancel。
|
||||
- 目标订单不清或系统上下文阻塞。
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
# Manual RateCode
|
||||
|
||||
## 适用业务
|
||||
|
||||
只有当前证据明确请求或暗示 manual Rate Code / settlement price maintenance,且不应作为 New Booking 或 Update Booking 内嵌字段表达时,才使用 `Manual RateCode`。
|
||||
|
||||
## 安全规则
|
||||
|
||||
- 不得猜 Rate Code。
|
||||
- 不得仅凭 PMS room code 反推 Rate Code。
|
||||
- 保留 raw price、channel、market、room text、breakfast/meal/restaurant、supplier 和当前证据。
|
||||
- 目标对象不清时输出人工复核。
|
||||
|
||||
## 与 New/Update 的关系
|
||||
|
||||
如果 manual price 是 New Booking 或 Update 的一部分,应保留在该事件的 `extracted_fields.rate_code_result`,除非当前请求只有 manual rate maintenance。
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
# Stay Date Parsing
|
||||
|
||||
## 用途
|
||||
|
||||
统一解析 QBD/LianTai 表格里的酒店入住、离店和晚数。适用于当前邮件附件、表格、OCR 或抽取证据中出现的酒店日期、行程日期和动作日期。
|
||||
|
||||
## 字段
|
||||
|
||||
保留以下日期证据:
|
||||
|
||||
- `hotel_date_raw`:酒店列开头的住期范围,例如 `14-15`、`15-17`、`31-02`。
|
||||
- `tour_date_raw`:行程日期列原文,例如 `2026/05/11\n2026/05/16`。
|
||||
- `action_date_raw`:备注或状态中的动作日期,例如 `11/05 AMD`、`12/05 NEW BOOKING`。
|
||||
- `sheet_month_year`:workbook sheet 名中的月份年份,例如 `BOOKING 05-2026`。
|
||||
- `arrival_date`
|
||||
- `departure_date`
|
||||
- `nights`
|
||||
- `date_inference_basis`
|
||||
|
||||
## 识别优先级
|
||||
|
||||
1. 优先使用酒店列开头的酒店住期范围作为 `arrival_date` / `departure_date`。
|
||||
2. 酒店列内有完整日期时,使用该完整日期范围。
|
||||
3. 行程日期列用于补全年/月和校验,不得直接覆盖酒店住期。
|
||||
4. sheet 名用于补全年/月;当行程日期可读时,优先用行程日期选择能落在行程范围内的酒店住期。
|
||||
5. 备注中的动作日期只作为 `action_date_raw`,不是入住日期,也不是标黄行过滤条件。
|
||||
|
||||
## 年月补全
|
||||
|
||||
- `15-17` 在 `BOOKING 05-2026` 且行程日期落在 2026 年 5 月时,解析为 `2026-05-15` 到 `2026-05-17`。
|
||||
- `31-02` 这类跨月范围必须按跨月处理;如果行程日期或 sheet 名无法唯一确定跨到哪个月,输出人工复核。
|
||||
- 当酒店日期范围缺年/月时,用行程日期补全;行程日期缺失时,用 sheet 名补全。
|
||||
- 如果补全后酒店住期不在行程日期范围内,保留 raw evidence 并输出人工复核。
|
||||
|
||||
## 晚数
|
||||
|
||||
- `15-17` 表示入住 15 日、离店 17 日,`nights=2`。
|
||||
- `14-15` 表示入住 14 日、离店 15 日,`nights=1`。
|
||||
- `nights = departure_date - arrival_date`。
|
||||
- 表格里的 `5N6D`、`5N7D` 是行程晚数线索,不得覆盖酒店住期晚数。
|
||||
|
||||
## 人工复核
|
||||
|
||||
以下情况输出 `Need Manual Review`,reason code 使用 `stay_date_inference_unclear`:
|
||||
|
||||
- 酒店日期范围不可读。
|
||||
- 酒店日期、行程日期和 sheet 名无法唯一补全年/月。
|
||||
- 酒店住期与行程日期明显冲突且无法解释。
|
||||
- 跨月、跨年或格式异常导致 arrival / departure 无法安全确定。
|
||||
@@ -0,0 +1,67 @@
|
||||
# 人工复核
|
||||
|
||||
## 入口结果边界
|
||||
|
||||
Main Agent 在调用业务 skill 前先完成支持范围分类:
|
||||
|
||||
- 当前输入可理解,但没有匹配 `00-output-contract.md` 列出的支持业务事件时,输出 `S10`。
|
||||
- 当前输入不足,无法判断是否匹配支持业务事件时,输出 `S99`。
|
||||
- `S10` 和 `S99` 都展示源邮件并由用户自行决定是否回复或进行其他处理。
|
||||
- `S10` 和 `S99` 不由 `booking-desk-event` skill 输出。
|
||||
|
||||
Thank you、裸 FYI、acknowledgement、Noted、Received 等没有具体预订业务信息的文字,以及一般咨询和当前不支持的 Booking Confirmation Request,都不匹配 Trace。FYI 或单纯告知中包含与明确预订对象相关的具体补充信息时,匹配 `Trace`。正文只有 `see attached` 且附件无法取得、无法识别业务方向时走 `S99`。
|
||||
|
||||
需要酒店批准的价格、退款、减免、账期、付款政策或合同条件询问不是 Trace。此类具有当前业务意义但没有任务卡承接的内容必须保留在 `unknowns`:同邮件存在支持事件时输出到 `unhandled_current_intents`,整封邮件没有支持事件时走 S10。意图清楚但不受支持不等于业务判断不安全,不得仅因此输出 `Need Manual Review`。
|
||||
|
||||
## Need Manual Review
|
||||
|
||||
Main Agent 已经匹配至少一个支持业务事件,但普通事件处理不安全时,使用 `Need Manual Review`:
|
||||
|
||||
- current action 在多个支持事件类型之间冲突且无法安全裁决
|
||||
- target object unclear 或不唯一
|
||||
- current/history boundary unclear
|
||||
- 已匹配支持事件,但 attachment/file/OCR/table 不可读
|
||||
- required room type / Rate Code / settlement price mapping 无法唯一支持
|
||||
- QBD/LianTai row/highlight/current-row evidence 缺失或歧义
|
||||
- system context 显示 duplicate、pending/open task、active workflow、lock 或 conflict
|
||||
|
||||
例如正文明确 `please update as attached`,但附件不可读时,已经匹配 Update 事件,应输出业务级 `Need Manual Review`,不得降级为 `S99`。
|
||||
|
||||
`Need Manual Review` 使用 `manual_review.review_record_type=business_event_review`。入口 `S99` 继续使用 `manual_review.review_record_type=main_agent_entry_review`,两者不得混用。
|
||||
|
||||
## 必要结构
|
||||
|
||||
业务级 Manual Review 必须包含:
|
||||
|
||||
- `reason_code`
|
||||
- `visible_reason`
|
||||
- `review_record_type`
|
||||
- `missing_fields`
|
||||
- `blocking_points`
|
||||
- `conflicting_points`
|
||||
- `suggested_human_actions`
|
||||
- `evidence_to_check`
|
||||
- `known_fields`
|
||||
|
||||
未知字段用 `null`、空字符串或空数组。不要猜。
|
||||
|
||||
## 常见 Reason Code
|
||||
|
||||
- `current_history_boundary_unclear`
|
||||
- `target_object_unclear`
|
||||
- `multiple_target_candidates`
|
||||
- `attachment_or_ocr_unreadable`
|
||||
- `event_type_conflict_unclear`
|
||||
- `room_type_mapping_unconfirmed`
|
||||
- `room_type_mapping_multiple_candidates`
|
||||
- `rate_code_unconfirmed`
|
||||
- `rate_code_rule_not_covered`
|
||||
- `settlement_price_required`
|
||||
- `manual_price_unconfirmed`
|
||||
- `composite_unit_price_unconfirmed`
|
||||
- `fix_charge_unconfirmed`
|
||||
- `qbd_liantai_row_evidence_unreadable`
|
||||
- `parent_child_split_evidence_unclear`
|
||||
- `stay_date_inference_unclear`
|
||||
- `existing_order_record_found`
|
||||
- `pending_or_active_workflow_found`
|
||||
Reference in New Issue
Block a user