Files
iAOP/templates/ti-cl4/dashboard/handover_brief.ti.yaml
T
bot_dev1 5bc7ff957e feat(#53): 移动端交接班摘要生成(NL,PRD 场景C ⑤ 移动端交接班摘要)
对应 PRD 场景C(辅助):交接班 → LLM 汇总本班关键事件/能耗/待办 → 生成交接班
报告 → 推送下一班(line 84/350-351)。把本班原始数据 → 移动端交接班摘要这条
链路模板化、可配置、可测试。

新增 core/shift-handover 内核模块:
- handover.py:班次数据归一化(ShiftRecord) + 摘要配置(HandoverBriefConfig) +
  validate/load 校验对 + build_llm_input(填 shift_handover v1.0.1 提示词占位符) +
  generate_handover_brief(LLM 注入生成, 离线/故障自动降级为确定性摘要) +
  render_handover_brief(编译移动端只读卡片 props)
- 零运行时依赖(仅标准库); LLM 以依赖注入传入, 内核不绑定云端 SDK
- 离线/LLM故障降级保证可用性≥99.8%(PRD 模型服务故障自动降级)
- 含 P0/安全事件时强制 requireConfirm=true(PRD 高利害人工确认)

新增资产/测试/验收:
- templates/ti-cl4/dashboard/handover_brief.ti.yaml(Ti 模板配置资产)
- tests/test_handover.py(32 用例全通过) + tests/_bootstrap.py(连字符目录挂载)
- scripts/verify_handover_brief.py(4 能力点全通过: 配置合法/LLM+降级/
  配置点驱动展示/≤2分钟验收线)
- README.md

验证: python -m unittest discover -s tests (32 OK) +
      python scripts/verify_handover_brief.py (全部通过)
2026-08-05 03:38:07 +08:00

31 lines
1.9 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# -*- coding: utf-8 -*-
# 氯化车间/海绵钛驾驶舱 · 移动端交接班摘要配置资产(iAOP-Template-Ti 一期)。
#
# 对齐 PRD 场景C(辅助):交接班 → LLM 汇总本班关键事件/能耗/待办 → 生成交接班
# 报告 → 推送下一班(PRD line 84/350-351:交接班报告生成 ≤ 2 分钟、移动端交接班
# 摘要可用)。
#
# 把"移动端交接班摘要"的展示语义(章节/折叠/字号/确认策略/绑定的 LLM 提示词)
# 外置为模板配置(issue #53)。切换到其他行业模板(如树脂)= 换一份本文件,
# 移动端卡片代码零改动(与 #52 同一验收口径「切换模板零改码」)。
#
# $schema 对应 core/shift-handover/handover.py 的 HANDOVER_CONFIG_SCHEMA_ID。
$schema: iAOP-cockpit-handover-brief-v1
# 绑定的提示词模板(core/llm-gateway/config/prompts.template.yaml):
# shift_handover v1.0.1(current)正文含「生产概况/异常事项/安全注意事项」三章节。
promptTemplate: shift_handover
promptVersion: 1.0.1
# 摘要包含的章节(移动端卡片渲染哪些区块):
# overview 生产概况 / abnormal 异常事项 / safety 安全注意事项 /
# energy 能耗 / todos 待办(交下一班)。
sections: [overview, abnormal, safety, energy, todos]
# 移动端展示策略(外置,配置台可调):
maxEvents: 8 # 事件列表最多展示条数(超过折叠 + 溢出计数角标)
maxTodos: 5 # 待办列表最多展示条数
collapseThreshold: 4 # 超过该条数则折叠为「展开更多」
fontSize: md # 移动端字号档位(sm/md/lg)
# 高利害人工确认:交接班摘要通常非高利害(scenarios.template.yaml: high_stakes=false),
# 但若本班出现 P0 告警 / 安全事件,内核会自动强制 requireConfirm=true(见
# render_handover_brief),无需在此显式开启。
requireConfirm: false