siluzan-tso-cli 1.1.29-beta.2 → 1.1.29-beta.21

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 (169) hide show
  1. package/README.md +1 -1
  2. package/dist/index.js +3174 -867
  3. package/dist/skill/AGENTS.md +30 -31
  4. package/dist/skill/SKILL.md +16 -33
  5. package/dist/skill/_meta.json +2 -2
  6. package/dist/skill/assets/campaign-create-keyword-test.fixed.json +10 -33
  7. package/dist/skill/assets/campaign-create-template.json +2 -0
  8. package/dist/skill/assets/campaign-create-template.md +114 -99
  9. package/dist/skill/assets/market-analysis-rules.md +55 -55
  10. package/dist/skill/assets/meta-period-report-rules.md +61 -60
  11. package/dist/skill/assets/pmax-asset-group-template.json +12 -4
  12. package/dist/skill/assets/pmax-asset-group-template.md +25 -0
  13. package/dist/skill/assets/pmax-brand-assets-template.json +25 -0
  14. package/dist/skill/assets/pmax-brand-assets-template.md +22 -0
  15. package/dist/skill/assets/pmax-brand-guidelines-enable-template.json +24 -0
  16. package/dist/skill/assets/pmax-brand-guidelines-enable-template.md +22 -0
  17. package/dist/skill/assets/pmax-create-template.json +41 -2
  18. package/dist/skill/assets/pmax-create-template.md +84 -51
  19. package/dist/skill/assets/pmax-lead-form-template.json +36 -0
  20. package/dist/skill/assets/pmax-lead-form-template.md +70 -0
  21. package/dist/skill/assets/pmax-signals-template.json +2 -6
  22. package/dist/skill/assets/pmax-whatsapp-template.json +26 -0
  23. package/dist/skill/assets/pmax-whatsapp-template.md +45 -0
  24. package/dist/skill/assets/website-diagnosis-rules.md +67 -67
  25. package/dist/skill/references/README.md +78 -65
  26. package/dist/skill/references/accounts/accounts.md +99 -105
  27. package/dist/skill/references/accounts/finance.md +23 -79
  28. package/dist/skill/references/accounts/open-account-by-media.md +84 -81
  29. package/dist/skill/references/accounts/open-account-google-ui.md +24 -24
  30. package/dist/skill/references/analytics/account-analytics.md +94 -103
  31. package/dist/skill/references/analytics/facebook-analysis-guide.md +61 -61
  32. package/dist/skill/references/analytics/google-analysis-batch.md +2 -2
  33. package/dist/skill/references/analytics/keyword-planner-workflows.md +22 -23
  34. package/dist/skill/references/analytics/market-analysis-guide.md +31 -25
  35. package/dist/skill/references/analytics/rag.md +20 -20
  36. package/dist/skill/references/analytics/reporting.md +4 -4
  37. package/dist/skill/references/analytics/website-diagnosis-guide.md +24 -24
  38. package/dist/skill/references/core/agent-conventions.md +136 -106
  39. package/dist/skill/references/core/cli-enums.md +47 -53
  40. package/dist/skill/references/core/playbooks.md +42 -41
  41. package/dist/skill/references/core/subagent-orchestration.md +40 -40
  42. package/dist/skill/references/core/tips.md +18 -61
  43. package/dist/skill/references/core/workflows.md +36 -29
  44. package/dist/skill/references/google-ads/google-ads-campaign-plan.md +25 -24
  45. package/dist/skill/references/google-ads/google-ads.md +81 -57
  46. package/dist/skill/references/google-ads/pmax-api.md +138 -34
  47. package/dist/skill/references/google-ads/rules/README.md +15 -15
  48. package/dist/skill/references/google-ads/rules/google-ads-account-audit.md +22 -22
  49. package/dist/skill/references/google-ads/rules/google-ads-compliance.md +27 -27
  50. package/dist/skill/references/google-ads/rules/google-ads-keyword-strategy.md +15 -15
  51. package/dist/skill/references/google-ads/rules/google-ads-keyword-taxonomy.md +32 -22
  52. package/dist/skill/references/google-ads/rules/google-ads-launch-plan-template.md +32 -30
  53. package/dist/skill/references/google-ads/rules/google-ads-pmax-guide.md +3 -1
  54. package/dist/skill/references/misc/tso-home.md +8 -8
  55. package/dist/skill/references/operations/clue.md +1 -1
  56. package/dist/skill/references/operations/forewarning.md +1 -1
  57. package/dist/skill/references/operations/hosted-automation-optimize-index.md +2 -2
  58. package/dist/skill/references/operations/hosted-automation-scenarios.md +5 -5
  59. package/dist/skill/references/operations/hosted-automation-self-control.md +15 -15
  60. package/dist/skill/references/operations/hosted-automation-user-catalog.md +13 -13
  61. package/dist/skill/references/operations/optimize.md +8 -8
  62. package/dist/skill/references/report-templates/README.md +45 -0
  63. package/dist/skill/references/report-templates/REPORT-WORKFLOW.md +114 -0
  64. package/dist/skill/references/report-templates/bing-period-report.md +65 -0
  65. package/dist/skill/references/report-templates/google-account-diagnosis-report.md +83 -0
  66. package/dist/skill/references/report-templates/google-ads-diagnosis.md +378 -0
  67. package/dist/skill/references/report-templates/google-inquiry-analysis.md +543 -0
  68. package/dist/skill/references/report-templates/google-period-report-excel.md +126 -0
  69. package/dist/skill/references/report-templates/google-period-report.md +60 -0
  70. package/dist/skill/references/report-templates/market-analysis-report.md +40 -0
  71. package/dist/skill/references/report-templates/meta-account-diagnosis-report.md +74 -0
  72. package/dist/skill/references/report-templates/meta-period-report-excel.md +230 -0
  73. package/dist/skill/references/report-templates/meta-period-report.md +219 -0
  74. package/dist/skill/references/report-templates/okki-weekly-google-client.md +217 -0
  75. package/dist/skill/references/report-templates/tiktok-period-report.md +56 -0
  76. package/dist/skill/references/report-templates/website-diagnosis-report.md +79 -0
  77. package/dist/skill/report-templates/README.md +16 -14
  78. package/dist/skill/report-templates/REPORT-WORKFLOW.md +13 -13
  79. package/dist/skill/report-templates/google-account-diagnosis-report.md +1 -1
  80. package/dist/skill/report-templates/google-ads-diagnosis.md +21 -21
  81. package/dist/skill/report-templates/google-inquiry-analysis.md +44 -44
  82. package/dist/skill/report-templates/google-period-report-excel.md +24 -24
  83. package/dist/skill/report-templates/google-period-report.md +23 -23
  84. package/dist/skill/report-templates/market-analysis-report.md +1 -1
  85. package/dist/skill/report-templates/meta-period-report-excel.md +72 -64
  86. package/dist/skill/report-templates/meta-period-report.html +706 -428
  87. package/dist/skill/report-templates/meta-period-report.md +61 -60
  88. package/dist/skill/report-templates/okki-weekly-google-client.md +26 -26
  89. package/dist/skill/report-templates/report-template-academic.html +1 -1
  90. package/dist/skill/report-templates/report-template-dark.html +1 -1
  91. package/dist/skill/report-templates/report-template-formal.html +1 -1
  92. package/dist/skill/report-templates/report-template-mobile.html +1 -1
  93. package/dist/skill/report-templates/report-template-onepager.html +1 -1
  94. package/dist/skill/report-templates/report-template-print.html +1 -1
  95. package/dist/skill/report-templates/report-template.html +1 -1
  96. package/dist/skill/report-templates/website-diagnosis-report.html +1731 -1653
  97. package/dist/skill/report-templates/website-diagnosis-report.md +21 -23
  98. package/dist/skill/scripts/install.ps1 +1 -1
  99. package/dist/skill/scripts/install.sh +1 -1
  100. package/dist/skill/snippets/handoff-p7-inquiry.md +5 -5
  101. package/eval/cases/accounts-entityid-vs-mediaccustomerid.scenario.json +2 -14
  102. package/eval/cases/accounts-mcc-bind-inquiry.scenario.json +1 -3
  103. package/eval/cases/accounts-single-balance-not-bulk.scenario.json +3 -14
  104. package/eval/cases/budget-display-not-raw-micros.scenario.json +1 -8
  105. package/eval/cases/clue-meta-leads-json.scenario.json +2 -14
  106. package/eval/cases/clue-tiktok-leads-json.scenario.json +2 -11
  107. package/eval/cases/destructive-account-delink-needs-confirm.scenario.json +3 -9
  108. package/eval/cases/destructive-forewarning-delete-needs-confirm.scenario.json +3 -9
  109. package/eval/cases/destructive-invoice-apply-needs-confirm.scenario.json +3 -9
  110. package/eval/cases/facebook-analysis-google-section-aliases.scenario.json +2 -11
  111. package/eval/cases/facebook-analysis-not-google-keywords.scenario.json +3 -10
  112. package/eval/cases/facebook-analysis-period-default.scenario.json +2 -14
  113. package/eval/cases/finance-invoice-info-list.scenario.json +3 -11
  114. package/eval/cases/forewarning-list-google.scenario.json +3 -14
  115. package/eval/cases/google-ads-no-structural-without-confirm.scenario.json +2 -6
  116. package/eval/cases/google-analysis-keywords-route.scenario.json +2 -14
  117. package/eval/cases/human-p1-multiturn.scenario.json +1 -5
  118. package/eval/cases/meta-single-balance-not-bulk.scenario.json +3 -17
  119. package/eval/cases/no-legacy-json-flag.scenario.json +2 -6
  120. package/eval/cases/open-account-google-noninteractive.scenario.json +1 -3
  121. package/eval/cases/open-account-tiktok-license-file.scenario.json +1 -3
  122. package/eval/cases/optimize-list-by-account.scenario.json +3 -11
  123. package/eval/cases/p1-single-account-profile.scenario.json +1 -11
  124. package/eval/cases/p2-balance-scan-bulk.scenario.json +2 -9
  125. package/eval/cases/p3-accounts-digest.scenario.json +1 -5
  126. package/eval/cases/p4-fb-meta-period-report.scenario.json +2 -12
  127. package/eval/cases/p4-period-report-window.scenario.json +1 -8
  128. package/eval/cases/pmax-asset-group-create-with-bg.scenario.json +15 -0
  129. package/eval/cases/pmax-brand-edit-routing.scenario.json +12 -0
  130. package/eval/cases/pmax-edit-not-campaign-edit.scenario.json +15 -0
  131. package/eval/cases/pmax-enable-brand-guidelines.scenario.json +15 -0
  132. package/eval/cases/pmax-no-assets-update-brand-fields.scenario.json +12 -0
  133. package/eval/cases/rag-before-keyword-expand.scenario.json +1 -11
  134. package/eval/cases/rag-list-then-query.scenario.json +2 -14
  135. package/eval/cases/report-list-google.scenario.json +2 -11
  136. package/eval/cases/report-push-list-google.scenario.json +2 -11
  137. package/eval/cases/setup-login-or-env.scenario.json +1 -3
  138. package/eval/cases/setup-siluzan-data-permission-env.scenario.json +1 -3
  139. package/eval/cases/tiktok-bc-bind-inquiry.scenario.json +2 -6
  140. package/eval/cases/time-range-user-delegates-default.scenario.json +1 -8
  141. package/eval/cases/tips-json-out-filtering.scenario.json +1 -3
  142. package/eval/cases/tips-large-json-pagination.scenario.json +1 -3
  143. package/eval/cases/uj-ad-campaign-validate-before-create-stub.scenario.json +2 -11
  144. package/eval/cases/uj-ad-outdoor-campgear-search-plan.scenario.json +1 -3
  145. package/eval/cases/uj-analytics-30d-pdf-campaign-device-geo.scenario.json +6 -18
  146. package/eval/cases/uj-analytics-compare-google-tiktok-last-month-roi.scenario.json +1 -8
  147. package/eval/cases/uj-analytics-google-weekly-trends-campaigns-keywords.scenario.json +2 -11
  148. package/eval/cases/uj-analytics-report-push-weekly-email.scenario.json +1 -3
  149. package/eval/cases/uj-finance-invoice-records-this-month.scenario.json +2 -11
  150. package/eval/cases/uj-life-newbie-siluzan-google-end-to-end.scenario.json +1 -4
  151. package/eval/cases/uj-ops-google-accounts-list-normal.scenario.json +2 -17
  152. package/eval/cases/uj-ops-google-yesterday-spend-conversions.scenario.json +2 -14
  153. package/eval/cases/uj-ops-pause-worst-adgroup-confirm.scenario.json +2 -6
  154. package/eval/cases/uj-ops-tiktok-leads-last-week.scenario.json +3 -17
  155. package/eval/cases/uj-patrol-cpc-spike-adgroups-over-15.scenario.json +1 -5
  156. package/eval/cases/uj-patrol-forewarning-create-daily-cap-3000.scenario.json +1 -3
  157. package/eval/cases/uj-patrol-forewarning-trigger-records.scenario.json +3 -17
  158. package/eval/cases/uj-patrol-google-balances-low.scenario.json +2 -11
  159. package/eval/cases/uj-roi-optimize-records-then-execute-cautiously.scenario.json +3 -14
  160. package/eval/cases/uj-roi-search-terms-add-negative-keywords.scenario.json +2 -14
  161. package/eval/stub-fixtures/facebook-analysis.json +24 -4
  162. package/eval/stub-fixtures/meta-overview.json +4 -1
  163. package/eval/stub-fixtures/pmax-asset-group-create-ok.json +12 -0
  164. package/eval/stub-fixtures/pmax-brand-assets-edit-ok.json +11 -0
  165. package/eval/stub-fixtures/pmax-brand-guidelines-enable-ok.json +11 -0
  166. package/eval/stub-fixtures/pmax-edit-ok.json +11 -0
  167. package/eval/stub-fixtures/pmax-get-bg-on.json +20 -0
  168. package/package.json +1 -1
  169. package/dist/skill/references/core/deliverable-preflight.md +0 -109
@@ -3,7 +3,7 @@
3
3
  > 统计区间:`{startDate}` ~ `{endDate}`
4
4
  > 账户:`{mediaCustomerId}`(`{mediaCustomerName}`)
5
5
 
6
- > **默认交付物**:一份可打开的、带 Chart.js 图表的 **HTML 文件**(如 `meta-period-report.html`)。
6
+ > **默认交付物**:一份可打开的、带 ECharts 图表的 **HTML 文件**(如 `meta-period-report.html`)。
7
7
  > 用户**未指定格式**时一律走下方 **标准四步流程**;**禁止**仅 Markdown 摘要或纯 JSON 充当终稿。
8
8
  > 用户**明确要求 Excel / xlsx** 时,改走 `report-templates/meta-period-report-excel.md` 分支(见文末「Excel 分支」)。
9
9
 
@@ -15,12 +15,12 @@ Agent JSON Schema:`assets/meta-period-report.schema.json`。
15
15
 
16
16
  ## 标准四步流程(默认 · 交付 HTML)
17
17
 
18
- | 步骤 | 执行者 | 动作 |
19
- | ---- | ------ | ---- |
20
- | **1. 拉数** | Agent 调 CLI | `facebook-analysis -a <id> --start <s> --end <e> --json-out ./snap-fb` |
21
- | **2. 分析** | Agent | 用 **node/python 脚本**读落盘 JSON(勿用 Read 打开业务 `*.json`),完成筛选、聚合、排序与洞察 |
22
- | **3. 写 JSON** | Agent | 按本纲要撰写 `meta-period-report.json`(`meta` / `narrative` / 可选 HTML 扩展字段) |
23
- | **4. 渲染 HTML** | CLI | `facebook-analysis render` — **校验 JSON 必含字段**,缺项报错不生成 HTML;**禁止** Agent 手写/拼接 HTML |
18
+ | 步骤 | 执行者 | 动作 |
19
+ | ---------------- | ------------ | ------------------------------------------------------------------------------------------------------- |
20
+ | **1. 拉数** | Agent 调 CLI | `facebook-analysis -a <id> --start <s> --end <e> --json-out ./snap-fb` |
21
+ | **2. 分析** | Agent | 用 **node/python 脚本**读落盘 JSON(勿用 Read 打开业务 `*.json`),完成筛选、聚合、排序与洞察 |
22
+ | **3. 写 JSON** | Agent | 按本纲要撰写 `meta-period-report.json`(`meta` / `narrative` / 可选 HTML 扩展字段) |
23
+ | **4. 渲染 HTML** | CLI | `facebook-analysis render` — **校验 JSON 必含字段**,缺项报错不生成 HTML;**禁止** Agent 手写/拼接 HTML |
24
24
 
25
25
  ```bash
26
26
  # 步骤 1
@@ -53,16 +53,17 @@ siluzan-tso facebook-analysis render \
53
53
 
54
54
  ## 与原业务(TSO / Skill)对齐
55
55
 
56
- | 环节 | 实现 |
57
- | ---- | ---- |
58
- | CLI 拉数 | 步骤 1 |
56
+ | 环节 | 实现 |
57
+ | ----------------- | ------------------------------------- |
58
+ | CLI 拉数 | 步骤 1 |
59
59
  | Agent 分析 + 撰写 | 步骤 2~3 → `meta-period-report.json` |
60
- | **HTML 终稿** | 步骤 4 → `facebook-analysis render` |
61
- | **Excel 终稿** | 仅用户指定时 → Agent 脚本写 xlsx |
60
+ | **HTML 终稿** | 步骤 4 → `facebook-analysis render` |
61
+ | **Excel 终稿** | 仅用户指定时 → Agent 脚本写 xlsx |
62
62
 
63
63
  模板源码:
64
+
64
65
  - `report-templates/meta-period-report.html` — 结构与样式(对齐深度分析月报)
65
- - `report-templates/meta-period-report.runtime.js` — Chart.js 渲染 + 章节 DOM 拼装
66
+ - `report-templates/meta-period-report.runtime.js` — 可选外链运行时(逻辑已内联于 HTML;ECharts 渲染 + 章节 DOM 拼装)
66
67
 
67
68
  `render` 会向输出目录写入 HTML + `meta-period-report.runtime.js`,并注入 `window.__META_PERIOD_REPORT__`。
68
69
  传 `--snapshot-dir` 时 CLI 自动从快照合并 KPI、平台/国家/受众图表数据、广告组与受众表格(Agent JSON 中已有字段不覆盖)。
@@ -71,29 +72,29 @@ siluzan-tso facebook-analysis render \
71
72
 
72
73
  ## Excel 五 Sheet 与 CLI 维度(默认周期报告)
73
74
 
74
- | # | Excel Sheet | 报告章节 | CLI `--sections` | 后端 Section |
75
- | --- | --- | --- | --- | --- |
76
- | 1 | **总数据** | 账户 KPI + 叙事(整体/区域/国家/优化建议) | `overview` | OverviewSectionData |
77
- | 2 | **广告组数据** | 区域组对比表(leads-欧洲/拉美/亚洲) | `ad-sets`(别名 `campaigns`) | AdSetSectionData |
78
- | 3 | **平台数据** | Facebook vs Instagram | `platform`(别名 `devices`) | PlatformSectionData |
79
- | 4 | **国家数据** | 国家/地区排行 | `country`(别名 `geographic`) | CountrySectionData |
80
- | 5 | **受众数据** | 年龄 × 性别矩阵 | `audience` | AudienceSectionData |
75
+ | # | Excel Sheet | 报告章节 | CLI `--sections` | 后端 Section |
76
+ | --- | -------------- | ------------------------------------------ | ------------------------------ | ------------------- |
77
+ | 1 | **总数据** | 账户 KPI + 叙事(整体/区域/国家/优化建议) | `overview` | OverviewSectionData |
78
+ | 2 | **广告组数据** | 区域组对比表(leads-欧洲/拉美/亚洲) | `ad-sets`(别名 `campaigns`) | AdSetSectionData |
79
+ | 3 | **平台数据** | Facebook vs Instagram | `platform`(别名 `devices`) | PlatformSectionData |
80
+ | 4 | **国家数据** | 国家/地区排行 | `country`(别名 `geographic`) | CountrySectionData |
81
+ | 5 | **受众数据** | 年龄 × 性别矩阵 | `audience` | AudienceSectionData |
81
82
 
82
83
  **Excel 默认不含、按需追加:**
83
84
 
84
- | 章节 | CLI | 何时追加 |
85
- | --- | --- | --- |
86
- | 广告创意 | `creative`(别名 `ads`) | 用户要创意表或 DC 素材 |
87
- | 原生素材 | `material`(别名 `materials`) | Dynamic Creative 账户 |
88
- | *按日趋势* | — | 接口无 |
89
- | *关键词* | — | 不适用 |
85
+ | 章节 | CLI | 何时追加 |
86
+ | ---------- | ------------------------------ | ---------------------- |
87
+ | 广告创意 | `creative`(别名 `ads`) | 用户要创意表或 DC 素材 |
88
+ | 原生素材 | `material`(别名 `materials`) | Dynamic Creative 账户 |
89
+ | _按日趋势_ | — | 接口无 |
90
+ | _关键词_ | — | 不适用 |
90
91
 
91
92
  与 Google 8 章对照见 `facebook-analysis-guide.md`。
92
93
 
93
94
  **可选追加(执行拉数前可询问用户):**
94
95
 
95
- | 维度 | CLI | 何时追加 |
96
- | --- | --- | --- |
96
+ | 维度 | CLI | 何时追加 |
97
+ | ----------- | ------------------------------ | ---------------------------------------- |
97
98
  | DC 原生素材 | `material`(别名 `materials`) | 用户要素材 Tab 或账户为 Dynamic Creative |
98
99
 
99
100
  ---
@@ -137,12 +138,12 @@ siluzan-tso facebook-analysis -a <mediaCustomerId> --start <s> --end <e> --json-
137
138
 
138
139
  **固定 4 条标题**(`narrative.recommendations[]`,每条 content **≥150 字**,须引用当次 CPL/国家/组名):
139
140
 
140
- | 标题 | 内容要点 |
141
- | ---- | -------- |
141
+ | 标题 | 内容要点 |
142
+ | ------------ | -------------------------------------------------- |
142
143
  | 简化表单问题 | 结合高频次高 CPL 市场;字段缩减至 3 项;写预期影响 |
143
- | 区域调整 | 各广告组语言/市场策略(土/葡/德等);加减仓名单 |
144
- | 预算重构 | 具体比例(如 4:3:3)、测试周期、CPL 阈值优胜劣汰 |
145
- | 素材建议 | 分平台/分市场;素材套数、IG 短视频、FB 形态 |
144
+ | 区域调整 | 各广告组语言/市场策略(土/葡/德等);加减仓名单 |
145
+ | 预算重构 | 具体比例(如 4:3:3)、测试周期、CPL 阈值优胜劣汰 |
146
+ | 素材建议 | 分平台/分市场;素材套数、IG 短视频、FB 形态 |
146
147
 
147
148
  **另须** `supplementaryRecommendations` **7 维**(预算、平台、地域、受众、创意、频次、接口限制)与 `priorityPlan`(高/中/低各 ≥2 条)。细则见 **`assets/meta-period-report-rules.md`**。
148
149
 
@@ -166,7 +167,7 @@ siluzan-tso facebook-analysis -a <mediaCustomerId> --start <s> --end <e> --json-
166
167
  用户未指定 Excel 时,除 `narrative` 外 **必须** 填写(字数见 `meta-period-report-rules.md` §四):
167
168
 
168
169
  - `executiveSummary[]`:**3~5 段**「为什么」解读(每段 ≥80 字)
169
- - `healthDiagnosis`:三阶段 + **4 张四问卡片** + **≥6 行**红绿灯表
170
+ - `healthDiagnosis`:三阶段 + **4 张四问卡片** + **≥6 行**红绿灯表(③ 该加还是该减;可省略 `scorecard`,render 时由 `--snapshot-dir` 自动补全)
170
171
  - `sections.platform/country/adSets.insight`:各 **≥200 字**
171
172
  - `sections.audience`:`goldenProfile` ≥3 条 + `antiProfile` ≥2 条
172
173
  - `sections.landingPage.rows`:≥3 行
@@ -176,12 +177,12 @@ siluzan-tso facebook-analysis -a <mediaCustomerId> --start <s> --end <e> --json-
176
177
 
177
178
  ## 口径速记
178
179
 
179
- | 展示 | 字段 |
180
- | ---- | ---- |
181
- | Meta「结果」 | `results` |
182
- | 单次成效费用 | `costPerResult` |
180
+ | 展示 | 字段 |
181
+ | -------------- | ----------------------------------- |
182
+ | Meta「结果」 | `results` |
183
+ | 单次成效费用 | `costPerResult` |
183
184
  | 业务转化 / CPA | `conversions` / `costPerConversion` |
184
- | CTR | `ctr` × 100 → % |
185
+ | CTR | `ctr` × 100 → % |
185
186
 
186
187
  ---
187
188
 
@@ -189,30 +190,30 @@ siluzan-tso facebook-analysis -a <mediaCustomerId> --start <s> --end <e> --json-
189
190
 
190
191
  完整 Schema:`assets/meta-period-report.schema.json`。Excel 必含字段:
191
192
 
192
- | 字段 | 必填 | 说明 |
193
- | ---- | ---- | ---- |
194
- | `meta` | 推荐 | 账户名、周期、`resultType`、`attributionSetting`、`generatedAt` |
195
- | `kpis` | 可省略 | 账户 KPI 行;由 `--snapshot-dir` 从 `overview` 合并 |
196
- | **`narrative.overall`** | **Excel 必含** | 整体表现 1 段 |
197
- | **`narrative.regional[]`** | **Excel 必含** | `{ adGroupName, text }` 区域报告 |
198
- | **`narrative.country`** | **Excel 必含** | 国家对比 1 段 |
199
- | **`narrative.recommendations[]`** | **必含** | 固定 4 条,每条 ≥150 字 |
200
- | **`supplementaryRecommendations`** | **必含** | 7 维数据驱动建议 |
201
- | **`priorityPlan`** | **推荐** | 高/中/低各 ≥2 条;HTML 强烈建议填写 |
202
- | `tables` / `charts` | 可省略 | Sheet2~5;由快照自动汇总 |
203
- | `executiveSummary` | **HTML 必填** | 3~5 段深度摘要 |
204
- | `healthDiagnosis` | **HTML 必填** | 四问 + 红绿灯表 |
205
- | `sections.*.insight` | **HTML 必填** | 各维度 ≥200 字 |
206
- | `abTests` / `actionChecklist` | **HTML 必填** | ≥3 实验 + 三列行动清单 |
193
+ | 字段 | 必填 | 说明 |
194
+ | ---------------------------------- | -------------- | --------------------------------------------------------------- |
195
+ | `meta` | 推荐 | 账户名、周期、`resultType`、`attributionSetting`、`generatedAt` |
196
+ | `kpis` | 可省略 | 账户 KPI 行;由 `--snapshot-dir` 从 `overview` 合并 |
197
+ | **`narrative.overall`** | **Excel 必含** | 整体表现 1 段 |
198
+ | **`narrative.regional[]`** | **Excel 必含** | `{ adGroupName, text }` 区域报告 |
199
+ | **`narrative.country`** | **Excel 必含** | 国家对比 1 段 |
200
+ | **`narrative.recommendations[]`** | **必含** | 固定 4 条,每条 ≥150 字 |
201
+ | **`supplementaryRecommendations`** | **必含** | 7 维数据驱动建议 |
202
+ | **`priorityPlan`** | **推荐** | 高/中/低各 ≥2 条;HTML 强烈建议填写 |
203
+ | `tables` / `charts` | 可省略 | Sheet2~5;由快照自动汇总 |
204
+ | `executiveSummary` | **HTML 必填** | 3~5 段深度摘要 |
205
+ | `healthDiagnosis` | **HTML 必填** | 四问 + 红绿灯表(`scorecard` 可由 CLI 从快照自动补全) |
206
+ | `sections.*.insight` | **HTML 必填** | 各维度 ≥200 字 |
207
+ | `abTests` / `actionChecklist` | **HTML 必填** | ≥3 实验 + 三列行动清单 |
207
208
 
208
209
  ---
209
210
 
210
211
  ## 相关文档
211
212
 
212
- | 文档 | 用途 |
213
- | ---- | ---- |
214
- | **`report-templates/meta-period-report-excel.md`** | **Excel 五 Sheet 规格(业务模板基准)** |
215
- | `assets/meta-period-report.schema.json` | Agent JSON Schema |
216
- | `references/analytics/facebook-analysis-guide.md` | 字段、Google 对照、建议清单 |
213
+ | 文档 | 用途 |
214
+ | --------------------------------------------------- | --------------------------------------------------- |
215
+ | **`report-templates/meta-period-report-excel.md`** | **Excel 五 Sheet 规格(业务模板基准)** |
216
+ | `assets/meta-period-report.schema.json` | Agent JSON Schema |
217
+ | `references/analytics/facebook-analysis-guide.md` | 字段、Google 对照、建议清单 |
217
218
  | `report-templates/meta-account-diagnosis-report.md` | 深度诊断(在可用 Section 内尽量对齐 Google 诊断章) |
218
- | `report-templates/REPORT-WORKFLOW.md` | 通用六步流程 |
219
+ | `report-templates/REPORT-WORKFLOW.md` | 通用六步流程 |
@@ -77,12 +77,12 @@ siluzan-tso google-analysis -a <mediaCustomerId> --start <S> --end <E> --json-ou
77
77
 
78
78
  ### 工作簿级
79
79
 
80
- | 顺序 | Sheet 名 | 数据来源 |
81
- | ---: | ---------- | ---------------------------------------------------------- |
82
- | 1 | `账户报告` | `campaigns` + 复盘文案(stats/overview 汇总后 Agent 撰写) |
83
- | 2 | `关键词` | `keywords` |
84
- | 3 | `搜索词` | `search-terms` |
85
- | 4 | `设备` | **`campaign-device-*.json`**(按系列/组拆行) |
80
+ | 顺序 | Sheet 名 | 数据来源 |
81
+ | ---: | ---------- | ------------------------------------------------------------------------------------ |
82
+ | 1 | `账户报告` | `campaigns` + 复盘文案(stats/overview 汇总后 Agent 撰写) |
83
+ | 2 | `关键词` | `keywords` |
84
+ | 3 | `搜索词` | `search-terms` |
85
+ | 4 | `设备` | **`campaign-device-*.json`**(按系列/组拆行) |
86
86
  | 5 | `国家` | **`campaign-geo-matched-*.json`**(相符地理位置 Matched locations,按系列/地域拆行) |
87
87
 
88
88
  ### 各 Sheet 共同版式
@@ -98,13 +98,13 @@ siluzan-tso google-analysis -a <mediaCustomerId> --start <S> --end <E> --json-ou
98
98
 
99
99
  ### Sheet `账户报告`
100
100
 
101
- | 行 | 内容 |
102
- | ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
103
- | R1 | `广告系列报告`(如运营改名,可改文案但 Sheet 名仍为 `账户报告`) |
104
- | R2 | 统计区间 |
105
- | R3(A→K,11 列) | `广告系列` \| `预算` \| `费用` \| `展示次数` \| `点击次数` \| `点击率` \| `平均每次点击费用` \| `所有转化次数` \| `转化次数` \| `每次转化费用` \| `转化率` |
101
+ | 行 | 内容 |
102
+ | ---------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
103
+ | R1 | `广告系列报告`(如运营改名,可改文案但 Sheet 名仍为 `账户报告`) |
104
+ | R2 | 统计区间 |
105
+ | R3(A→K,11 列) | `广告系列` \| `预算` \| `费用` \| `展示次数` \| `点击次数` \| `点击率` \| `平均每次点击费用` \| `所有转化次数` \| `转化次数` \| `每次转化费用` \| `转化率` |
106
106
  | R4… | 来自 `campaigns-*.json` 的 `items[]`(`schemaVersion 3` 行统一在 `items`):`campaignName`、`budgetAmountYuan`(元)、`spend`、`impressions`、`clicks`、`ctr`(已归一直接写入「点击率」)、`averageCpc`、`allConversions`→「所有转化次数」、`conversions`→「转化次数」、`costPerConversion`、`conversionRate`(已归一直接写入「转化率」);缺 `allConversions` 时与「转化次数」同值或填 `0` / `—`,并在脚注说明 |
107
- | 末行「合计」 | **广告系列**列填 `总计`;**预算**列填 `--`;**展示 / 点击 / 所有转化次数 / 转化次数 / 费用** 做列求和;**点击率** = 合计点击 ÷ 合计展示;**转化率** = 合计转化 ÷ 合计点击(**禁止**用合计转化 ÷ 合计展示);**每次转化费用** = 合计费用 ÷ 合计转化(转化为 0 时填 `—`);禁止对各行比率取算术平均 |
107
+ | 末行「合计」 | **广告系列**列填 `总计`;**预算**列填 `--`;**展示 / 点击 / 所有转化次数 / 转化次数 / 费用** 做列求和;**点击率** = 合计点击 ÷ 合计展示;**转化率** = 合计转化 ÷ 合计点击(**禁止**用合计转化 ÷ 合计展示);**每次转化费用** = 合计费用 ÷ 合计转化(转化为 0 时填 `—`);禁止对各行比率取算术平均 |
108
108
 
109
109
  表下**留白若干行**后写 **「数据复盘」**:
110
110
 
@@ -143,11 +143,11 @@ siluzan-tso google-analysis -a <mediaCustomerId> --start <S> --end <E> --json-ou
143
143
 
144
144
  ### Sheet `搜索词`
145
145
 
146
- | 行 | 内容 |
147
- | ---------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
148
- | R1 | `搜索字词报告` |
149
- | R2 | 统计区间 |
150
- | R3(A→N,14 列) | `搜索字词` \| `匹配类型` \| `已添加/已排除` \| `广告系列` \| `广告组` \| `关键字` \| `展示次数` \| `点击次数` \| `点击率` \| `平均每次点击费用` \| `费用` \| `转化次数` \| `每次转化费用` \| `转化率` |
146
+ | 行 | 内容 |
147
+ | ---------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
148
+ | R1 | `搜索字词报告` |
149
+ | R2 | 统计区间 |
150
+ | R3(A→N,14 列) | `搜索字词` \| `匹配类型` \| `已添加/已排除` \| `广告系列` \| `广告组` \| `关键字` \| `展示次数` \| `点击次数` \| `点击率` \| `平均每次点击费用` \| `费用` \| `转化次数` \| `每次转化费用` \| `转化率` |
151
151
  | R4… | `search-terms-*.json`:`queryTargetingStatusZh`(`Added`→已添加、`Excluded`→已排除、`None`→都没有);无该字段时读 `queryTargetingStatus` 按上表映射,仍无则「—」;`ctr` / `conversionRate` 已归一,直接写入 |
152
152
 
153
153
  ---
@@ -165,11 +165,11 @@ siluzan-tso google-analysis -a <mediaCustomerId> --start <S> --end <E> --json-ou
165
165
 
166
166
  ### Sheet `国家`
167
167
 
168
- | 行 | 内容 |
169
- | ---------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
170
- | R1 | `地理位置报告` |
171
- | R2 | 统计区间 |
172
- | R3(A→M,13 列) | `地理位置` \| `广告系列` \| `展示次数` \| `互动次数` \| `互动率` \| `费用` \| `平均费用` \| `点击次数` \| `点击率` \| `所有转化次数` \| `转化次数` \| `每次转化费用` \| `转化率` |
168
+ | 行 | 内容 |
169
+ | ---------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
170
+ | R1 | `地理位置报告` |
171
+ | R2 | 统计区间 |
172
+ | R3(A→M,13 列) | `地理位置` \| `广告系列` \| `展示次数` \| `互动次数` \| `互动率` \| `费用` \| `平均费用` \| `点击次数` \| `点击率` \| `所有转化次数` \| `转化次数` \| `每次转化费用` \| `转化率` |
173
173
  | R4… | `campaign-geo-matched-*.json` 的 `items[]`(`schemaVersion 3` 行统一在 `items`):`countryOrRegion`→地理位置;`campaignName`→「广告系列」;`allConversions`→「所有转化次数」;`conversions`→「转化次数」;**互动次数**→`interactions`;**互动率**→`interactionRate`(字符串须解析)或 `interactions/impressions`,`interactions` 为 0 时填 `—`;**平均费用 必须** = `spend / interactions`,`interactions` 为 0 / null / undefined 时填 `—`;`ctr` / `conversionRate` 直接写入;其余列按 outline 映射 |
174
174
 
175
175
  ---
@@ -210,8 +210,8 @@ siluzan-tso google-analysis -a <mediaCustomerId> --start <S> --end <E> --json-ou
210
210
 
211
211
  ## 与 `google-period-report.md` 的差异
212
212
 
213
- | 项 | `google-period-report.md` | 本文 OKKI 周报 |
214
- | -------- | ------------------------- | ------------------------------------------------------------------------------------------------------ |
213
+ | 项 | `google-period-report.md` | 本文 OKKI 周报 |
214
+ | -------- | ------------------------- | -------------------------------------------------------------------------------------------------------------- |
215
215
  | 默认维度 | 8 维 + 主动追问追加 | **固定** `overview,campaigns,keywords,search-terms,campaign-device,campaign-geo-matched` + `stats` + `balance` |
216
- | 输出形态 | 长文分析报告 | **固定话术** + 短复盘 + **多 Sheet Excel(Agent 脚本写)** |
217
- | 典型用户 | 内部分析 | **发客户**的同步简报 |
216
+ | 输出形态 | 长文分析报告 | **固定话术** + 短复盘 + **多 Sheet Excel(Agent 脚本写)** |
217
+ | 典型用户 | 内部分析 | **发客户**的同步简报 |
@@ -46,7 +46,7 @@
46
46
  crossorigin="anonymous"
47
47
  referrerpolicy="no-referrer"
48
48
  />
49
- <script src="https://staticpn.siluzan.com/assets/slz/homeCDN/chart.umd.min.js"></script>
49
+ <script src="https://staticpn.siluzan.com/assets/slz/homeCDN/echarts.js"></script>
50
50
  <style>
51
51
  @media print {
52
52
  body {
@@ -30,7 +30,7 @@
30
30
  crossorigin="anonymous"
31
31
  referrerpolicy="no-referrer"
32
32
  />
33
- <script src="https://staticpn.siluzan.com/assets/slz/homeCDN/chart.umd.min.js"></script>
33
+ <script src="https://staticpn.siluzan.com/assets/slz/homeCDN/echarts.js"></script>
34
34
  <style>
35
35
  @media print {
36
36
  body {
@@ -39,7 +39,7 @@
39
39
  crossorigin="anonymous"
40
40
  referrerpolicy="no-referrer"
41
41
  />
42
- <script src="https://staticpn.siluzan.com/assets/slz/homeCDN/chart.umd.min.js"></script>
42
+ <script src="https://staticpn.siluzan.com/assets/slz/homeCDN/echarts.js"></script>
43
43
  <style>
44
44
  @media print {
45
45
  body {
@@ -30,7 +30,7 @@
30
30
  crossorigin="anonymous"
31
31
  referrerpolicy="no-referrer"
32
32
  />
33
- <script src="https://staticpn.siluzan.com/assets/slz/homeCDN/chart.umd.min.js"></script>
33
+ <script src="https://staticpn.siluzan.com/assets/slz/homeCDN/echarts.js"></script>
34
34
  <style>
35
35
  @media print {
36
36
  body {
@@ -29,7 +29,7 @@
29
29
  crossorigin="anonymous"
30
30
  referrerpolicy="no-referrer"
31
31
  />
32
- <script src="https://staticpn.siluzan.com/assets/slz/homeCDN/chart.umd.min.js"></script>
32
+ <script src="https://staticpn.siluzan.com/assets/slz/homeCDN/echarts.js"></script>
33
33
  <style>
34
34
  details > summary {
35
35
  list-style: none;
@@ -18,7 +18,7 @@
18
18
  crossorigin="anonymous"
19
19
  referrerpolicy="no-referrer"
20
20
  />
21
- <script src="https://staticpn.siluzan.com/assets/slz/homeCDN/chart.umd.min.js"></script>
21
+ <script src="https://staticpn.siluzan.com/assets/slz/homeCDN/echarts.js"></script>
22
22
  <style>
23
23
  /* 屏幕上也保持「纸面」灰阶;打印增强对比 */
24
24
  body {
@@ -76,7 +76,7 @@
76
76
  referrerpolicy="no-referrer"
77
77
  />
78
78
  <!-- ECharts 5:图表 -->
79
- <script src="https://staticpn.siluzan.com/assets/slz/homeCDN/chart.umd.min.js"></script>
79
+ <script src="https://staticpn.siluzan.com/assets/slz/homeCDN/echarts.js"></script>
80
80
  <style>
81
81
  /* 打印时尽量白底;与 Tailwind Play CDN 并存 */
82
82
  @media print {