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
@@ -6,11 +6,11 @@
6
6
 
7
7
  三条均为 **Google 宿主编排 + siluzan-tso** 路径;IF/定时/通知在宿主,命令与 JSON 以详规为准。
8
8
 
9
- | 提醒名称 | 系统在后台默默帮你做什么?(自动动作) | 文档(references) |
10
- | ------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
11
- | 1. 单日预算熔断 | 当日系列 **花费**相对**日预算**达到设定比例(如 ≥110%,可配 110%–120% 抗延迟)时,**暂停 Campaign**;恢复需人工加预算后再启用。 | [场景 1 · 单日预算熔断](operations/hosted-automation-self-control.md) · [`google-ads/google-ads.md`](google-ads/google-ads.md)(`ad campaigns`、`ad campaign-status`、预算口径) · [`core/tips.md`](core/tips.md)(`--json-out`) |
9
+ | 提醒名称 | 系统在后台默默帮你做什么?(自动动作) | 文档(references) |
10
+ | ------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
11
+ | 1. 单日预算熔断 | 当日系列 **花费**相对**日预算**达到设定比例(如 ≥110%,可配 110%–120% 抗延迟)时,**暂停 Campaign**;恢复需人工加预算后再启用。 | [场景 1 · 单日预算熔断](operations/hosted-automation-self-control.md) · [`google-ads/google-ads.md`](google-ads/google-ads.md)(`ad campaigns`、`ad campaign-status`、预算口径) · [`core/tips.md`](core/tips.md)(`--json-out`) |
12
12
  | 2. CPA 飙升自动降价 | 滑动时间窗内 **转化数**达置信阈值且 **实际 CPA** 高于 **目标 CPA×飙升比例** 时,在 **Campaign / Ad Group** 上**下调** tCPA 或 eCPC 等**出价上限**(具体策略依账户)。 | [场景 2 · CPA 飙升自动降价](operations/hosted-automation-self-control.md) · [`operations/hosted-automation-optimize-weak-downbid.md`](operations/hosted-automation-optimize-weak-downbid.md)(组/创意侧降价关停,可与宿主组合) · [`google-ads/google-ads.md`](google-ads/google-ads.md)(`campaign-edit`、`adgroup-edit`) · [`analytics/account-analytics.md`](analytics/account-analytics.md)(窗口粒度不足时的报表拉数) |
13
- | 3. 连续空耗自动暂停 | **当日**累计 **花费 ≥ 目标 CPA×N** 且 **转化为 0** 时,**暂停**广告组或创意;宿主发 **P1** 且文案含 **「空耗熔断」**。 | [场景 3 · 连续空耗自动暂停](operations/hosted-automation-self-control.md) · [`google-ads/google-ads.md`](google-ads/google-ads.md)(`ad groups`、`ad list`、`adgroup-status`、`ad-status`) · [`operations/hosted-automation-monitoring-json.md`](operations/hosted-automation-monitoring-json.md)(JSON 键名勿套用 Google Ads API 官方名) |
13
+ | 3. 连续空耗自动暂停 | **当日**累计 **花费 ≥ 目标 CPA×N** 且 **转化为 0** 时,**暂停**广告组或创意;宿主发 **P1** 且文案含 **「空耗熔断」**。 | [场景 3 · 连续空耗自动暂停](operations/hosted-automation-self-control.md) · [`google-ads/google-ads.md`](google-ads/google-ads.md)(`ad groups`、`ad list`、`adgroup-status`、`ad-status`) · [`operations/hosted-automation-monitoring-json.md`](operations/hosted-automation-monitoring-json.md)(JSON 键名勿套用 Google Ads API 官方名) |
14
14
 
15
15
  **总索引**:[`operations/hosted-automation-scenarios.md`](operations/hosted-automation-scenarios.md) · **自控全文**:[`operations/hosted-automation-self-control.md`](operations/hosted-automation-self-control.md) · **金额硬规范**(展示用 `*Display` 等):[`SKILL.md`](../SKILL.md)「金额与货币单位硬约束」。
16
16
 
@@ -18,11 +18,11 @@
18
18
 
19
19
  编排(定时、HTTP 探活、通知)在宿主;**读哪些 JSON 字段、用什么命令** 以 **[`operations/hosted-automation-monitoring-json.md`](operations/hosted-automation-monitoring-json.md)** 为准(键名以当次 `--json-out` 落盘 JSON 为准,勿套用 Google Ads API 官方字段名解析本 CLI 输出)。
20
20
 
21
- | 功能名称 | 监控层级 / 说明 | CLI 检查入口(`--json-out`) |
21
+ | 功能名称 | 监控层级 / 说明 | CLI 检查入口(`--json-out`) |
22
22
  | ----------------- | -------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
23
- | 1. 账户被封禁 | 账户级;与 Google `CustomerStatus` 及 `list-accounts` 的字段映射**暂不写进本 skill**,由宿主约定。 | `list-accounts`、`balance` 等见 [`accounts/accounts.md`](accounts/accounts.md) |
23
+ | 1. 账户被封禁 | 账户级;与 Google `CustomerStatus` 及 `list-accounts` 的字段映射**暂不写进本 skill**,由宿主约定。 | `list-accounts`、`balance` 等见 [`accounts/accounts.md`](accounts/accounts.md) |
24
24
  | 2. 落地页死链强停 | URL 不可用或跳错页时暂停关联创意,避免无效消耗。 | **`google-analysis --sections final-urls`**;或 **`ad list`** / **`google-analysis --sections ads`** 取落地页字段后由宿主 HTTP 校验 |
25
- | 3. 广告素材拒审 | 创意政策状态异常时告警或配合工单。 | **`ad list`** / **`google-analysis --sections ads`**:`policyApprovalStatusV2`、`approvalStatusDetails` 等(见 **[`google-ads/google-ads.md`](google-ads/google-ads.md)**) |
25
+ | 3. 广告素材拒审 | 创意政策状态异常时告警或配合工单。 | **`ad list`** / **`google-analysis --sections ads`**:`policyApprovalStatusV2`、`approvalStatusDetails` 等(见 **[`google-ads/google-ads.md`](google-ads/google-ads.md)**) |
26
26
  | 4. 花费异动监控 | 系列或账户维度花费相对历史异常波动。 | **`google-analysis --sections campaign-hour`**:按 `campaignId` + `date` + `hour` 看 **`spend`** |
27
27
  | 5. 余额枯竭预警 | 余额过低或按日均推算续航不足。 | **`balance-scan`**(`balance`、`remainingDays`、`hitReason`、`meta`)或 **`balance`** / **`google-analysis --sections overview`**(`remainingAccountBudget`、`averageDailyCost` 等) |
28
28
 
@@ -30,9 +30,9 @@
30
30
 
31
31
  编排与阈值在宿主;**命令、JSON 键名、聚合与写后复核** 见 **[`operations/hosted-automation-optimize-index.md`](operations/hosted-automation-optimize-index.md)**(及链出的三份 SOP)。
32
32
 
33
- | 功能名称 | 说明 | SOP |
34
- | ----------------------- | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ |
35
- | 1. 表现差广告降价/关停 | 组/创意:CTR、CPA、转化等触达后 **下调 `targetCpa` 或 `Paused`**。 | [`operations/hosted-automation-optimize-weak-downbid.md`](operations/hosted-automation-optimize-weak-downbid.md) |
36
- | 2. 高转化广告提价扩量 | 系列/组:ROAS 代理、预算丢失份额等触达后 **提预算 / 上调目标 CPA**。 | [`operations/hosted-automation-optimize-scale.md`](operations/hosted-automation-optimize-scale.md) |
37
- | 3. A/B 测试自动决出胜者 | 同组多创意:聚合后比 **CVPI / all conv** 等,**停输家**。 | [`operations/hosted-automation-optimize-ab-winner.md`](operations/hosted-automation-optimize-ab-winner.md) |
38
- | 4. 异动根因自动排查建议 | 诊断报告与归因:用 `account-analytics`、报告模板等,见 [`analytics/account-analytics.md`](analytics/account-analytics.md) 与 `report-templates/`。 | (未单独拆 SOP,沿用分析文档) |
33
+ | 功能名称 | 说明 | SOP |
34
+ | ----------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- |
35
+ | 1. 表现差广告降价/关停 | 组/创意:CTR、CPA、转化等触达后 **下调 `targetCpa` 或 `Paused`**。 | [`operations/hosted-automation-optimize-weak-downbid.md`](operations/hosted-automation-optimize-weak-downbid.md) |
36
+ | 2. 高转化广告提价扩量 | 系列/组:ROAS 代理、预算丢失份额等触达后 **提预算 / 上调目标 CPA**。 | [`operations/hosted-automation-optimize-scale.md`](operations/hosted-automation-optimize-scale.md) |
37
+ | 3. A/B 测试自动决出胜者 | 同组多创意:聚合后比 **CVPI / all conv** 等,**停输家**。 | [`operations/hosted-automation-optimize-ab-winner.md`](operations/hosted-automation-optimize-ab-winner.md) |
38
+ | 4. 异动根因自动排查建议 | 诊断报告与归因:用 `account-analytics`、报告模板等,见 [`analytics/account-analytics.md`](analytics/account-analytics.md) 与 `report-templates/`。 | (未单独拆 SOP,沿用分析文档) |
@@ -1,7 +1,7 @@
1
1
  # AI 广告优化记录(optimize)
2
2
 
3
3
  > 所属 skill:`siluzan-tso`。
4
- >
4
+
5
5
  ```bash
6
6
  siluzan-tso optimize list [选项] # 账户级优化主列表
7
7
  siluzan-tso optimize records [选项] # 优化操作记录列表(系列粒度,见下)
@@ -9,14 +9,14 @@ siluzan-tso optimize get --id <id> # 单条详情
9
9
  siluzan-tso optimize children --parent-id <id> # 广告系列级明细
10
10
  ```
11
11
 
12
- | 选项 | 说明 |
13
- | -------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- |
14
- | `-a, --account <id>` | 账户 `mediaCustomerId`(走接口筛选;**已脱管账户可能为空**) |
15
- | `--match-media-customer-id <id>` | **仅 `list`**:不按接口筛账户,拉全量后自动翻页、客户端匹配 `mediaCustomerId`(适合已不在 Siluzan 托管、但历史上仍有优化批次的 Google 客户号) |
16
- | `--start / --end <date>` | 日期范围(YYYY-MM-DD,所有日期按北京时间(UTC+8)解释,调用时自动附加 `+08:00` 时区偏移) |
12
+ | 选项 | 说明 |
13
+ | -------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
14
+ | `-a, --account <id>` | 账户 `mediaCustomerId`(走接口筛选;**已脱管账户可能为空**) |
15
+ | `--match-media-customer-id <id>` | **仅 `list`**:不按接口筛账户,拉全量后自动翻页、客户端匹配 `mediaCustomerId`(适合已不在 Siluzan 托管、但历史上仍有优化批次的 Google 客户号) |
16
+ | `--start / --end <date>` | 日期范围(YYYY-MM-DD,所有日期按北京时间(UTC+8)解释,调用时自动附加 `+08:00` 时区偏移) |
17
17
  | `--id <id>` | `optimize get` 专用:UUID。常见来源——**账户批次**:`optimize list --json-out ./snap` 的 `items[].id` / `entityId`;**系列级记录**:`optimize records --json-out ./snap` 的 `items[].id` |
18
- | `--parent-id <id>` | 父级 ID(`children` 专用;与账户批次 `list` 里 `items[].id` 一致) |
19
- | `--json-out` | 输出原始 JSON(`list` / `records` / `children`) |
18
+ | `--parent-id <id>` | 父级 ID(`children` 专用;与账户批次 `list` 里 `items[].id` 一致) |
19
+ | `--json-out` | 输出原始 JSON(`list` / `records` / `children`) |
20
20
 
21
21
  ## 已脱管 / 非当前托管账户:怎么查历史优化?
22
22
 
@@ -0,0 +1,45 @@
1
+ # 报告模板纲要(report-templates)
2
+
3
+ > **Agent Read 路径(推荐)**:`references/report-templates/<文件名>.md`
4
+ > **同源副本**:`report-templates/<文件名>.md`(Skill 根目录,与 HTML 样式模板同目录)
5
+ > **HTML 样式参考**(仅排版,不定义章节):`report-templates/report-template*.html`、`report-templates/*-report.html`
6
+
7
+ 安装包构建时会将根目录 `report-templates/*.md` **同步到本目录**,避免 Agent 按 `references/` 前缀查找时 404。
8
+
9
+ ---
10
+
11
+ ## 周期 / 账户报告
12
+
13
+ | 文件 | 工作流 | 说明 |
14
+ | ---------------------------------- | --------- | ------------------------------------- |
15
+ | `google-period-report.md` | **P4** | Google 账户周期报告(默认 HTML 纲要) |
16
+ | `google-period-report-excel.md` | **P4** | 用户要 Excel 时全文必读 |
17
+ | `meta-period-report.md` | **P4-FB** | Meta/Facebook 周期报告(默认 HTML) |
18
+ | `meta-period-report-excel.md` | **P4-FB** | Meta Excel 五 Sheet |
19
+ | `meta-account-diagnosis-report.md` | **P4-FB** | Meta 深度诊断 |
20
+ | `tiktok-period-report.md` | **P4** | TikTok 周期报告 |
21
+ | `bing-period-report.md` | **P4** | Bing 周期报告 |
22
+
23
+ ## 诊断 / 专项
24
+
25
+ | 文件 | 工作流 | 说明 |
26
+ | ------------------------------------ | ------ | ------------------------------------------- |
27
+ | `google-ads-diagnosis.md` | **P1** | Google 广告诊断完整纲要 |
28
+ | `google-account-diagnosis-report.md` | **P1** | Google 账户深度诊断 |
29
+ | `website-diagnosis-report.md` | **P8** | 网站诊断(配合 `website-diagnosis render`) |
30
+ | `market-analysis-report.md` | **P9** | 战略市场分析交付检查清单 |
31
+
32
+ ## 客户交付 / Excel
33
+
34
+ | 文件 | 工作流 | 说明 |
35
+ | ------------------------------ | ------ | --------------------------- |
36
+ | `okki-weekly-google-client.md` | **P6** | OKKI 周报(全文必读) |
37
+ | `google-inquiry-analysis.md` | **P7** | Google 询盘分析(全文必读) |
38
+
39
+ ## 通用
40
+
41
+ | 文件 | 说明 |
42
+ | -------------------- | ---------------- |
43
+ | `REPORT-WORKFLOW.md` | 六步报告流程总览 |
44
+
45
+ 章节细则另见 `references/core/playbooks.md`(P1–P9)与 `references/analytics/account-analytics.md`。
@@ -0,0 +1,114 @@
1
+ # 报告生成流程
2
+
3
+ ---
4
+
5
+ ## 分析报告生成步骤
6
+
7
+ 适用于:`google-analysis *`、`facebook-analysis *`、`report tiktok-*`、`report bing-*`、`report meta-overview` 等 CLI 拉数后由 Agent 撰写的报告。
8
+
9
+ **不适用**于 TSO 优化报告(`report create` / `report push` 等),那类报告由平台生成,不走此流程。
10
+
11
+ ---
12
+
13
+ ### 步骤 1:确认账户与区间
14
+
15
+ - 账户 ID 须来自 `siluzan-tso list-accounts -m <媒体>` 的实际输出,不能凭印象猜测。
16
+ - 明确起止日期(`--start` / `--end`)。
17
+
18
+ ---
19
+
20
+ ### 步骤 2:选定内容模板
21
+
22
+ 根据媒体与用户意图,选择 `report-templates/` 下对应的 `*.md`:
23
+
24
+ | 意图 | Google | Meta | TikTok | Bing |
25
+ | ------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | ---------------------------------- | ------------------------- | ----------------------- |
26
+ | 周期分析 / 月报 / 周报 | `google-period-report.md` | `meta-period-report.md` | `tiktok-period-report.md` | `bing-period-report.md` |
27
+ | OKKI 周报 / 固定话术发客户(Google) | `okki-weekly-google-client.md` | — | — | — |
28
+ | **询盘分析** / 固定运营触发(Goog账户询盘分析 / 我给你询盘信息分析Google账号XXX效果) | `google-inquiry-analysis.md`(**严格 3 个月** + 用户上传询盘资料 + 8 Sheet xlsx;见 SKILL **P7**) | — | — | — |
29
+ | 深度诊断 / 健康检查 | `google-account-diagnosis-report.md` | `meta-account-diagnosis-report.md` | 同周期,注明能力受限 | 同周期 |
30
+
31
+ 无精确匹配时,用最接近媒体的同类 `*.md`,并在报告开头注明。
32
+
33
+ ---
34
+
35
+ ### 步骤 3:展示默认维度 + 询问追加
36
+
37
+ **例外**:模板为 `okki-weekly-google-client.md` 或 `google-inquiry-analysis.md` 时**跳过**本节「追问可选追加」,按该文件固定维度拉数即可。`google-inquiry-analysis.md` 还要求**严格 3 个月**时间窗(分析月份 + 向前 2 个完整自然月),不可扩展。
38
+
39
+ 1. 按选定 `*.md` 的**默认维度**开始拉数(**不必等用户回复后再拉**,可并行)。
40
+ 2. 同时向用户发一条消息,说明本次默认包含哪些维度,并列出当前平台支持的**可选追加维度**,询问是否需要添加。
41
+ 3. 报告正文按默认维度写;若用户追加了维度,数据回来后在末尾补充对应章节。
42
+
43
+ ---
44
+
45
+ ### 步骤 3b:Google Excel 门禁(用户要 xlsx 时必做)
46
+
47
+ 在步骤 4 拉数完成、步骤 5 写脚本**之前**:
48
+
49
+ 1. `list-accounts -m Google -k <用户 ID> --json-out` 核验账户(**禁止**全表 grep 换 ID)。
50
+ 2. Read 本次每个 section 的 **`*.outline.txt`**(见 `google-period-report-excel.md` §执行门禁)。
51
+ 3. **禁止** `cat|json.tool|head` 或 Read 业务 `*.json` 探字段;**禁止**加载宿主第三方 xlsx Skill。
52
+
53
+ ### 步骤 4:拉取数据
54
+
55
+ - **`google-analysis` / `report …` 账户分析子命令**:统一 **`--json-out <目录>`** 落盘,再由脚本读 **`manifest-<accountId>.json` / `report-manifest-<accountId>.json`**(清单文件名见 stdout 摘要的 `manifestFile`)与各 **`<section>-<accountId>.json`**(见 `references/analytics/account-analytics.md`)。
56
+ - **`stats`、`ad campaigns` 等辅助命令**:按 `references/core/tips.md` 与各命令文档做结构化拉数。
57
+ - 仅执行与**本次报告维度**对应的命令(默认 + 用户追加)。
58
+ - 数据失败/缺失:在对应章节写 `[ 数据不可用:{原因} ]`,不写推测。
59
+
60
+ ---
61
+
62
+ ### 步骤 4b:交付前审阅最终产物(**必做**)
63
+
64
+ - 按 `references/core/agent-conventions.md` §七 自检表 A/B/C 审阅。
65
+ - **Read 刚生成的报告文件**(HTML/Markdown 等),对照当次 `report-templates/*.md` 逐项确认章节与币种。
66
+ - 未通过:**修改产物或补拉数据后重新生成**,再次 Read 审阅;不得在未审阅时交付。
67
+
68
+ ---
69
+
70
+ ### 步骤 5:分析并撰写中间产物
71
+
72
+ - 用 **node/python 脚本**读落盘 JSON,完成聚合与洞察(禁止 Read 业务 JSON、禁止对话手填数)。
73
+ - 按 `*.md` 章节结构组织叙事与建议;所有数字可追溯到 JSON 字段。
74
+ - **Meta/Facebook**:产出 `meta-period-report.json`(见 `meta-period-report.md`)。
75
+ - **Google 等**:可直接组织 Markdown/HTML 正文。
76
+
77
+ ### 步骤 5b:生成终稿(按媒体与格式)
78
+
79
+ | 媒体 | 用户未指定格式 | 用户指定 Excel |
80
+ | ----------------- | ----------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- |
81
+ | **Meta/Facebook** | `facebook-analysis render` → **HTML**(必做) | Agent 脚本按 `meta-period-report-excel.md` 写 xlsx;**不**默认 `render` |
82
+ | **Google** | 按 `report-template*.html` 写 HTML(默认 `report-template.html`) | **周期/定制 Sheet**:`google-period-report-excel.md`(P4,先 outline 后脚本);**OKKI**:P6;**询盘**:P7 |
83
+ | **网站诊断** | `website-diagnosis render` → HTML | — |
84
+
85
+ **禁止**:Meta 周期报告默认只交 Markdown/JSON;禁止 Agent 手写 Meta HTML。
86
+
87
+ **Google 广告诊断报告**(`google-ads-diagnosis.md` / `google-account-diagnosis-report.md`)额外必遵:
88
+
89
+ 1. **每日趋势**(`daily-metrics` / `conversionCost`):金额、CPA **2 位小数**;转化/点击/展示为整数;图表轴与 tooltip 同规则。
90
+ 2. **每个模块**在表/图后写 **分析**(≥2 条,有数据依据)+ **建议**(≥1 条);禁止只贴表不写分析。详见 `google-ads-diagnosis.md` § 撰写硬约束。
91
+
92
+ ---
93
+
94
+ ### 步骤 6:末尾附数据来源(可选)
95
+
96
+ ```
97
+ 📌 数据来源:
98
+ - siluzan-tso google-analysis -a <id> --sections overview --start <s> --end <e>
99
+ - ...
100
+ ```
101
+
102
+ ---
103
+
104
+ ## 未知报告名处理
105
+
106
+ | 用户措辞 | 映射 |
107
+ | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
108
+ | 月报、周报、投放总结、效果回顾 | 周期分析 → 对应媒体 `*-period-report.md` |
109
+ | **使用 okki 周报模板 / OKKI 周报 / okki 周报**(Google + 区间) | **固定话术 + 精简表 +(按需)Excel** → `okki-weekly-google-client.md`(见 SKILL **P6**);Excel **仅**由 Agent 脚本生成,**无** CLI 内置写表子命令 |
110
+ | **Goog账户询盘分析 / Google 账户询盘分析 / 分析XXX Google账号的询盘效果 / 我给你询盘信息分析Google账号XXX效果**(或含「询盘 + 账户 + Google」三要素) | **询盘 + 账户合并分析 + 严格 3 个月 + 8 Sheet xlsx** → `google-inquiry-analysis.md`(见 SKILL **P7**);询盘资料用户上传任意载体,宿主 Agent 解析落盘 `inquiries.json`,xlsx **仅**由 Agent 脚本生成 |
111
+ | 健康检查、诊断、账户分析 | 诊断 → `google-account-diagnosis-report.md`(Google)或周期型降级 |
112
+ | 对比、汇报、给客户看 | 以周期型为骨架,简化版本 |
113
+
114
+ 无法识别时,默认按**周期分析**处理,并在报告开头注明推断。
@@ -0,0 +1,65 @@
1
+ # Bing(Microsoft Advertising / BingV2)— 账户分析报告(模板纲要)
2
+
3
+ > 统计区间:`{startDate}` ~ `{endDate}`(**不可包含今天或昨天**,见下文)
4
+ > 账户:`{mediaCustomerId}`(`{mediaCustomerName}`)
5
+
6
+ 数据块:总览、设备、地域、受众(年龄/性别)、系列、广告组、广告、关键词、搜索字词。
7
+
8
+ ---
9
+
10
+ ## 日期规则(必读)
11
+
12
+ - Bing 接口**无法**拉取过新的数据;时间范围内**任意一天**若为**今天**或**昨天**,请求会失败。
13
+ - **CLI**:`--start` / `--end` 须**同传或同省略**;省略时默认**截至前天**的近 7 天(与 `report bing-*` 实现一致)。
14
+ - 自选区间时请确保结束日 ≤ **前天**。
15
+
16
+ ---
17
+
18
+ ## 1. 执行摘要(总览)
19
+
20
+ - **CLI**:`siluzan-tso report bing-overview -a <mediaCustomerId> [--start … --end …] --json-out <dir>`
21
+
22
+ ## 2. 设备与地域
23
+
24
+ - 设备:`report bing-device` → `DeviceSectionData`
25
+ - 地域:`report bing-geographic` → `GeographicSectionData`(响应中常见 `countries` 等字段,**以实际 JSON 为准**)
26
+
27
+ ## 3. 受众
28
+
29
+ - 年龄:`report bing-age-audience` → `AgeAudienceData`
30
+ - 性别:`report bing-gender-audience` → `GenderAudienceData`
31
+ - 合并输出:`report bing-audience-merged`(**固定输出合并 JSON**,含年龄+性别)
32
+
33
+ ## 4. 广告结构
34
+
35
+ - 系列:`report bing-campaigns` → `CampaignReport`
36
+ - 广告组:`report bing-ad-groups` → `AdGroupReport`
37
+ - 广告:`report bing-ads` → `AdReport`
38
+
39
+ ## 5. 关键词与搜索字词
40
+
41
+ - 关键词:`report bing-keywords` → `KeywordReport`,Query 含 `limit`(默认 **100**)、`orderByCost=true`
42
+ - 搜索字词:`report bing-search-terms` → `SearchQueryReport`,参数同上
43
+
44
+ ## 6. 附录
45
+
46
+ - 鉴权:与 TSO 其他接口相同(`config show` 中 `tsoApiBaseUrl` / Token)。
47
+ - 与 steward「优化报告」区别:见 `meta-period-report.md` 末节;此处为**实时分析 JSON**。
48
+
49
+ ---
50
+
51
+ ### CLI 速查表
52
+
53
+ | 数据块 | 子命令 |
54
+ | -------- | ----------------------------- |
55
+ | 总览 | `report bing-overview` |
56
+ | 设备 | `report bing-device` |
57
+ | 地域 | `report bing-geographic` |
58
+ | 年龄受众 | `report bing-age-audience` |
59
+ | 性别受众 | `report bing-gender-audience` |
60
+ | 受众合并 | `report bing-audience-merged` |
61
+ | 系列 | `report bing-campaigns` |
62
+ | 广告组 | `report bing-ad-groups` |
63
+ | 广告 | `report bing-ads` |
64
+ | 关键词 | `report bing-keywords` |
65
+ | 搜索字词 | `report bing-search-terms` |
@@ -0,0 +1,83 @@
1
+ # Google 账户 — 诊断类报告
2
+
3
+ > 统计区间:`{startDate}` ~ `{endDate}`
4
+ > 账户:`{mediaCustomerId}`(`{mediaCustomerName}`)
5
+
6
+ 按章节组织结论与建议;各节所需数据与建议 CLI 如下(**`google-analysis` 子命令请使用 `--json-out <目录>`** 落盘,脚本读磁盘 JSON 再写入报告)。
7
+
8
+ **完整章节结构、HTML 区块 ID、分析/建议必填规则、每日趋势小数格式** → 必读同目录 **`google-ads-diagnosis.md` § 撰写硬约束**(产品验收)。
9
+
10
+ ### 撰写要点(摘要)
11
+
12
+ 1. **每日趋势**(§7 / `daily-metrics`):金额、CPA **保留 2 位小数**;展示/点击/转化用整数;图表 tooltip 同规则。
13
+ 2. **每一章**除表格外须有 **分析**(≥2 条)+ **建议**(≥1 条);禁止只罗列数据。
14
+
15
+ ---
16
+
17
+ ## 1. 账户画像与落地页
18
+
19
+ - 主投放域名 / 落地页线索(若有)
20
+ - **CLI**:`google-analysis --sections final-urls`(无日期参数)
21
+
22
+ ## 2. 核心指标快照
23
+
24
+ - 本期消耗、展示、点击、转化、CTR、CVR、CPA 等
25
+ - **CLI**:`google-analysis --sections overview`、`google-analysis --sections dimension-summary`
26
+
27
+ ## 3. 账户结构与转化目标
28
+
29
+ - 系列/组/广告等数量级(以接口返回为准)
30
+ - 已配置的转化动作列表摘要
31
+ - **CLI**:`google-analysis --sections resource-counts`、`google-analysis --sections conversion-actions`
32
+
33
+ ## 4. 黄金账户与健康度
34
+
35
+ - 得分与各项是否达标(转化跟踪、GA、RSA、附加信息、否定词、受众、出价策略等)
36
+ - **CLI**:`google-analysis --sections gold-account`
37
+
38
+ ## 5. 广告系列类型与分布
39
+
40
+ - 各类型系列占比或列表摘要
41
+ - **CLI**:`google-analysis --sections campaign-types`(无日期参数)
42
+
43
+ ## 6. 重点维度对比(本期 vs 上期)
44
+
45
+ - 系列、地域、关键词:建议各拉两段时间分别对比(脚本层控制 `--start` / `--end`)
46
+ - **CLI**:`google-analysis --sections campaigns`、`google-analysis --sections geographic`、`google-analysis --sections keywords`
47
+
48
+ ## 7. 转化成本曲线
49
+
50
+ - 按日 CPA / 转化数趋势
51
+ - **CLI**:`google-analysis --sections daily-metrics`
52
+
53
+ ## 8. 设备、地域、受众(全量表)
54
+
55
+ - 设备、国家/地区、系统定义受众、自定义受众
56
+ - **CLI**:`google-analysis --sections devices`、`google-analysis --sections geographic`、`google-analysis --sections audience`(`SystemDefined` / `UserDefined`)
57
+
58
+ ## 9. 搜索词与广告创意
59
+
60
+ - 高消耗搜索词、与关键词匹配关系
61
+ - 高消耗搜索广告标题、类型、到达网址
62
+ - **CLI**:`google-analysis --sections search-terms`、`google-analysis --sections ads`
63
+
64
+ ## 10. 附加信息与素材
65
+
66
+ - 附加链接/电话/宣传信息等状态与层级
67
+ - 图片 / 视频素材消耗(若需合并视图)
68
+ - **CLI**:`google-analysis --sections extensions`(可选 `--level`)、`google-analysis --sections materials` 或分别 `asset-images`、`videos`
69
+
70
+ ## 11. 质量得分(汇总)
71
+
72
+ - **CLI**:`google-analysis --sections ads-index`
73
+
74
+ ## 12. 总结与行动项
75
+
76
+ - 优先修复项(健康度未达标项)
77
+ - 预算/出价/关键词/搜索词否词等可执行清单
78
+
79
+ ---
80
+
81
+ ### 并行拉取提示
82
+
83
+ 诊断场景可在同一统计区间内并行执行多条 `google-analysis`(注意接口限流);合并后再套入本模板各章节。