浏览代码

docs: make current dashboard the official reusable template

梁朝伟 2 周之前
父节点
当前提交
0b957c1795
共有 3 个文件被更改,包括 5 次插入0 次删除
  1. 2 0
      SKILL.md
  2. 1 0
      assets/dashboard_template.html
  3. 2 0
      references/dashboard.md

+ 2 - 0
SKILL.md

@@ -226,6 +226,8 @@ python scripts/common/build_customer_summary.py --excel "<建联表路径>" --wr
 
 看板以 `客户信息汇总表` 为客户主数据,并在存在 `Facebook对话记录` 时读取它计算唯一客户回复率、五级意向分布、高意向客户和最近 30 天回复趋势。消息行不得计作客户行。看板不直接写入 Excel,不触发飞书同步,也不保存真实客户数据到 skill 包。
 
+正式视觉模板固定为 `assets/dashboard_template.html`。每次生成中台都必须通过 `build_dashboard.py` 将运行时 JSON 注入 `{{dashboard_json}}` 占位符;不得把已生成 HTML 中的真实客户 JSON 复制回模板或 Skill 包。
+
 如果本轮刚完成渠道采集、邮件状态写回、社交状态写回或其他 Excel 写入,必须先运行 `scripts/common/build_customer_summary.py --write-summary` 刷新 `客户信息汇总表`,再生成看板。预览、dry-run、搜索未写表时,不强制刷新看板。
 
 示例命令:

+ 1 - 0
assets/dashboard_template.html

@@ -1,4 +1,5 @@
 <!doctype html>
+<!-- Official reusable customer-dashboard template v4.27. Runtime customer data must only replace the dashboard_json placeholder in generated outputs. -->
 <html lang="zh-CN">
 <head>
   <meta charset="utf-8">

+ 2 - 0
references/dashboard.md

@@ -10,6 +10,8 @@ The dashboard belongs in the skill as a reusable generator, not as customer data
   - `scripts/dashboard/build_dashboard.py`
   - `assets/dashboard_template.html`
   - `assets/dashboard_config.example.json`
+
+`assets/dashboard_template.html` is the official reusable visual template. It must retain the `{{dashboard_json}}` placeholder and must never contain customer rows copied from a generated dashboard. When adopting the appearance of a generated dashboard, remove its embedded runtime JSON before updating this template.
 - Project/runtime outputs must be written outside the skill:
   - `runs/YYYYMMDD/<run_id>/customer_dashboard.html`
   - `runs/YYYYMMDD/<run_id>/dashboard_data.json`