siluzan-tso-cli 1.1.52 → 1.1.53-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/README.md +2 -1
  2. package/dist/index.js +2378 -1046
  3. package/dist/skill/SKILL.md +6 -5
  4. package/dist/skill/_meta.json +2 -2
  5. package/dist/skill/assets/google-quarterly-report.schema.json +46 -0
  6. package/dist/skill/references/README.md +2 -0
  7. package/dist/skill/references/accounts/accounts-balance-stats.md +9 -5
  8. package/dist/skill/references/accounts/accounts-list.md +1 -1
  9. package/dist/skill/references/accounts/accounts-permissions.md +2 -2
  10. package/dist/skill/references/accounts/finance.md +1 -1
  11. package/dist/skill/references/accounts/open-account-by-media.md +1 -1
  12. package/dist/skill/references/accounts/open-account-google-ui.md +1 -1
  13. package/dist/skill/references/analytics/account-analytics.md +1 -0
  14. package/dist/skill/references/analytics/rag.md +1 -1
  15. package/dist/skill/references/analytics/reporting.md +5 -5
  16. package/dist/skill/references/core/agent-conventions.md +1 -1
  17. package/dist/skill/references/core/cli-enums.md +9 -0
  18. package/dist/skill/references/core/intent-routing.md +14 -7
  19. package/dist/skill/references/core/playbooks.md +28 -6
  20. package/dist/skill/references/core/setup.md +5 -5
  21. package/dist/skill/references/core/tips.md +9 -5
  22. package/dist/skill/references/misc/tso-home.md +2 -2
  23. package/dist/skill/references/report-templates/README.md +1 -0
  24. package/dist/skill/references/report-templates/google-quarterly-report.md +100 -0
  25. package/dist/skill/report-templates/README.md +1 -0
  26. package/dist/skill/report-templates/google-quarterly-report.html +585 -0
  27. package/dist/skill/report-templates/google-quarterly-report.md +100 -0
  28. package/dist/skill/scripts/install.ps1 +3 -3
  29. package/dist/skill/scripts/install.sh +3 -3
  30. package/eval/cases/ir-p10-dazu-client-not-p4.scenario.json +27 -0
  31. package/eval/cases/ir-p10-monthly-plan-not-p4.scenario.json +27 -0
  32. package/eval/cases/ir-p10-quarterly-client-report.scenario.json +27 -0
  33. package/eval/cases/ir-p10-quarterly-not-p4.scenario.json +27 -0
  34. package/eval/cases/ir-p4-period-not-diagnosis.scenario.json +4 -1
  35. package/eval/cases/p10-quarterly-report.scenario.json +28 -0
  36. package/eval/cases/p3-cpa-scan-max-cpa.scenario.json +1 -1
  37. package/package.json +1 -1
@@ -0,0 +1,100 @@
1
+ # Google 季度经营报告
2
+
3
+ > collect 只出事实;Agent 只写 `narrative`;`render` 注入 `google-quarterly-report.html`(大族版式 + ECharts)。
4
+ > **禁止** Read HTML 模板。行业数据不做。专项广告无量则整章隐藏。
5
+ >
6
+ > **触发(命中即 P10,勿改 P4/P9)**:月度报告、月总结与规划、季度报告、Q3 汇总、Q4 规划、季度汇报、投放季报、客户版、大族模板、下月规划;或「效率 + 区域询盘 + 国家明细 + 规划」。用户说月度则 `--start/--end` 用该月(默认上一完整自然月)。
7
+
8
+ ## 询盘入场(硬规则)
9
+
10
+ CLI **不读** xlsx / csv / 截图。流程固定三步:
11
+
12
+ 1. 用户给询盘载体(xlsx / csv / 截图 / 粘贴表,格式不限)。
13
+ 2. **Agent** 抽行、归一后落盘 `./snap-p10/inquiries.json`,再 `--inquiries` 传给 collect。
14
+ 3. collect → 只写 `narrative` → `render` 出 HTML。
15
+
16
+ **禁止**把原始 `.xlsx` / `.csv` 传给 `--inquiries`(会 `JSON.parse` 失败)。没有载体:可 `--inquiry-conversion <转化动作名>`;再没有则询盘位留空并脚注。**禁止编造询盘行。**
17
+
18
+ 落盘 JSON:根为数组或 `{ "items": [...] }`。每行至少有国家 +(月份或日期):
19
+
20
+ | 用途 | 接受的键 | 归一 |
21
+ | ---- | -------- | ---- |
22
+ | 国家 | `国家` / `国家(中文)` / `country` / `countryZh` | 英文/缩写先译中文,与 geographic `countryNameZh` 对齐 |
23
+ | 月份 | `月份` / `month` / `ym` | `2026-04` 或 `4月份`(有日期则用日期年) |
24
+ | 日期 | `时间` / `date` / `time` | `YYYY-MM-DD`;Excel 序列号由 Agent 转好 |
25
+ | 产品 | `产品` / `product` | 可选 |
26
+ | 来源 | `客户来源` / `来源` / `source` | 可选 |
27
+
28
+ 样例(字段名任选上表别名):
29
+
30
+ ```json
31
+ [
32
+ { "月份": "4月份", "国家(中文)": "印度", "时间": "2026-04-12", "产品": "协作机器人", "客户来源": "WhatsApp" }
33
+ ]
34
+ ```
35
+
36
+ e2e 对照:`src/commands/google-quarterly/test-fixtures/inquiries-q2-2026.xlsx`(给人看的样表)+ 同目录 `.json`(collect 真入口)。
37
+
38
+ ## CLI
39
+
40
+ ```bash
41
+ siluzan-tso google-quarterly collect \
42
+ -a <mediaCustomerId> --start 2023-07-01 --end 2023-09-30 \
43
+ --json-out ./snap-p10 \
44
+ --account-name "客户名" \
45
+ --inquiries ./inquiries.json # 可选;必须是上节 JSON,禁止传 xlsx
46
+ # --inquiry-conversion "表单提交" # 无询盘载体时用转化动作名称兜底
47
+
48
+ # Agent 撰写 ./snap-p10/google-quarterly.json(只含 narrative,勿改 kpis)
49
+
50
+ siluzan-tso google-quarterly render \
51
+ --data ./snap-p10/google-quarterly.json \
52
+ --collect ./snap-p10/google-quarterly-collect.json \
53
+ --out ./snap-p10/google-quarterly-report.html
54
+ ```
55
+
56
+ 省略 `--start/--end` 时 collect 用上一完整自然季(上海日历)。
57
+
58
+ 可选:`--keyword-seeds "a,b"` 走 Keyword Planner(标注数据源,禁止写成行业指数)。**不做**频道订阅总数、订阅来源饼、视频类型(要 YouTube Analytics / 人工分类)。YouTube 广告能拿到的曝光 / TrueView / 完播 / CPV / 频道 ID /(若已关联)广告带来订阅,collect 会写入 `specialAds` + `videosSummary`,render 直接展示。
59
+
60
+ Agent JSON Schema:`assets/google-quarterly-report.schema.json`。
61
+
62
+ ## Spike(网关)
63
+
64
+ | 能力 | 官方 | Sammamish | CLI |
65
+ | ---- | ---- | --------- | --- |
66
+ | 消耗最高国一级行政区 | `geographic_view` + `geo_target_state` / `province` / `region` | `GET …/reports/geo/subdivisions`(可带 `countryCriterionId`) | collect 自动选本期花费最高国家;未发布或该国无分段则国家级回退 |
67
+ | YouTube 广告层 | `video` 资源:title / channel_id / TrueView / 四分位完播 / CPV | 已有 `GetVideoReport` | 专项章 KPI + 视频表;无量则隐藏整章 |
68
+ | 广告带来订阅 | Ads 转化动作名含 subscribe/订阅 | 已有 `conversion-actions` | 有则展示;**不是**频道粉数 |
69
+
70
+ ## 事实字段(collect,禁止改)
71
+
72
+ | 字段 | 来源 |
73
+ | ---- | ---- |
74
+ | `kpis` / `monthly` | 系列加总;月度来自各月 `campaigns`,不是 daily-metrics |
75
+ | `inquiries` | Agent 转好的 JSON(`--inquiries`)优先;否则 `--inquiry-conversion`;再否则空,页脚注明口径 |
76
+ | `regions` / `countries` | 询盘按国家归并(印度/印尼单独成桶)+ 花费来自 geographic |
77
+ | `usStates` / `meta.drillCountry` | 下钻对象=本期花费最高国家;Sammamish `GET …/reports/geo/subdivisions`(`geo_target_state` / `province` / `region`);无分段则回退该国国家行,**不写死美国** |
78
+ | `specialAds` / `videosSummary` | YouTube 视频名 + Ads 视频指标 → PMax 系列名 → 其他非搜索 → `none`(HTML 隐藏整章)。不做订阅总数 / 来源饼 / 视频类型 |
79
+ | `planDefaults` | 花费 ×1.3~×1.5;**不**自动给 CPA/询盘目标 |
80
+
81
+ 频道订阅总数、订阅来源、视频类型本报告不拉。
82
+
83
+ ## Agent 只写 `narrative`
84
+
85
+ ```json
86
+ {
87
+ "narrative": {
88
+ "executiveSummary": ["本期花费…", "询盘…"],
89
+ "sections": {
90
+ "efficiency": { "analysis": ["…"] },
91
+ "adType": { "analysis": ["…"] },
92
+ "region": { "analysis": ["…"] },
93
+ "summary": { "analysis": ["…"] }
94
+ },
95
+ "plan": { "analysis": ["下期花费目标取 collect.planDefaults.spendLow~spendHigh", "动作…"] }
96
+ }
97
+ }
98
+ ```
99
+
100
+ 缺 `executiveSummary` / `sections.*.analysis` / `plan` 时 render 失败。
@@ -22,6 +22,7 @@
22
22
  | 文件 | 适用场景 |
23
23
  | -------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- |
24
24
  | `google-period-report.md` | **Google 周期分析报告(默认)**:终稿=HTML,四步流程 → `google-analysis render` 出 HTML |
25
+ | `google-quarterly-report.md` / `.html` | **Google 季度经营报告(P10)**:`google-quarterly collect`+`render`;花费默认 +30%~+50%;无行业章 |
25
26
  | `google-period-report-excel.md` | **仅用户要 Excel 时**(P4 定制 Sheet):先 `*.outline.txt` 后脚本写 xlsx;账户须 `-k` 核验,无 CLI excel 子命令 |
26
27
  | `stats-daily-excel.md` | **P4-DAILY**:账户级按日 Excel(`stats --by-day`) |
27
28
  | `google-account-diagnosis-report.md` | Google 账户深度诊断(健康度/转化/结构等) |