@thinkingai/ae-cli 6.1.4 → 6.1.6

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 (237) hide show
  1. package/README.md +3 -2
  2. package/README.zh.md +3 -2
  3. package/dist/{auth-MEJ642P4.js → auth-ENM3FE6L.js} +3 -2
  4. package/dist/{auth-7H3HAAJ3.js → auth-UPGUOKTW.js} +13 -6
  5. package/dist/{capability-QW4AVJHI.js → capability-AJC5CBRT.js} +49 -17
  6. package/dist/{capability-SCRFGODD.js → capability-TQ5KU5Q6.js} +49 -17
  7. package/dist/chunk-24BAVOX3.js +51 -0
  8. package/dist/{chunk-MDJGDI6K.js → chunk-3KI3RRXX.js} +5 -5
  9. package/dist/{chunk-PKRD2IEM.js → chunk-3P3562ZX.js} +9 -7
  10. package/dist/{chunk-R77JT7XD.js → chunk-4Q5TNP4Q.js} +4 -4
  11. package/dist/{chunk-7OLGDQQ2.js → chunk-6CHYBI64.js} +2 -2
  12. package/dist/{chunk-6LEYLOV3.js → chunk-CPVTECJ3.js} +9 -7
  13. package/dist/{chunk-KCA6BA5D.js → chunk-DB4Q3ANU.js} +5 -3
  14. package/dist/{chunk-2NDGFQHW.js → chunk-E7UXXHO3.js} +11 -3
  15. package/dist/{chunk-I4A62X3N.js → chunk-HQ2A7ITL.js} +23 -14
  16. package/dist/chunk-IMMGMU54.js +674 -0
  17. package/dist/{chunk-AJTH7LT3.js → chunk-IR4ZLVPW.js} +4 -2
  18. package/dist/{chunk-TBHBYKXZ.js → chunk-ISY6HMHM.js} +2 -2
  19. package/dist/{chunk-KGJQCYVC.js → chunk-LCXU3AAT.js} +4 -2
  20. package/dist/chunk-LYVNONC4.js +86 -0
  21. package/dist/{chunk-DYOS6YY7.js → chunk-RGXCNC4N.js} +23 -14
  22. package/dist/{chunk-YCLVYFK7.js → chunk-V6FR6WTW.js} +45 -87
  23. package/dist/chunk-VTWMIC5L.js +27 -0
  24. package/dist/{cli-token-TVQRSE46.js → cli-token-4SBMXAUK.js} +6 -3
  25. package/dist/{client-2643Z5AG.js → client-PP5FETMW.js} +4 -3
  26. package/dist/community-report-client-KK2QBANO.js +145 -0
  27. package/dist/{config-7UZWDE74.js → config-RCCGHHYA.js} +6 -3
  28. package/dist/index.js +506 -221
  29. package/dist/{metadata-BFDL6RUK.js → metadata-3M5F2AED.js} +14 -13
  30. package/dist/{metadata-FCLDBXX2.js → metadata-W2MEOI4Z.js} +14 -13
  31. package/dist/{model-T3KZJWLW.js → model-OYQLXCQY.js} +3 -2
  32. package/dist/{raw-CN542NGT.js → raw-TPB7KSZO.js} +6 -4
  33. package/dist/{sync-ERNHDPB5.js → sync-EFJKFZK2.js} +6 -3
  34. package/dist/{te-agent-FCCWUDTJ.js → te-agent-K2OWMZXT.js} +3 -2
  35. package/dist/{te-analysis-PUVF5IF4.js → te-analysis-I73ZS4NK.js} +903 -33
  36. package/dist/{te-analysis-UJDOKPAN.js → te-analysis-Q7AZCDU4.js} +903 -33
  37. package/dist/{te-common-XLAGWNIV.js → te-common-ST3QPSXJ.js} +7 -6
  38. package/dist/{te-common-VUX3VOXZ.js → te-common-WSLIKKPC.js} +7 -6
  39. package/dist/te-community-WXGB6IOX.js +1659 -0
  40. package/dist/te-community-X2AHXGCA.js +1659 -0
  41. package/dist/{te-dataops-ZNJBQ6VT.js → te-dataops-MJV54MNY.js} +10 -8
  42. package/dist/{te-dataops-F36T656A.js → te-dataops-OA7I6HBG.js} +10 -8
  43. package/dist/{te-engage-QBCCME22.js → te-engage-2FSDUOIZ.js} +973 -1585
  44. package/dist/{te-engage-K4AEUPK5.js → te-engage-BMJ6UOUU.js} +973 -1585
  45. package/dist/te-experiment-4JC7WUKW.js +590 -0
  46. package/dist/te-experiment-KYRWAUZY.js +590 -0
  47. package/dist/{te-kb-AYCODNU6.js → te-kb-E7NSCBRB.js} +74 -12
  48. package/dist/{te-meta-ARDIW3YI.js → te-meta-Q4L6EE3Q.js} +7 -6
  49. package/dist/{te-meta-UUROEODR.js → te-meta-VHCN4Q62.js} +7 -6
  50. package/dist/{te-team-OKCOX7OE.js → te-team-PDKKW7Q5.js} +7 -6
  51. package/dist/tracking/i18n/resources/cli/en.json +4 -3
  52. package/dist/tracking/i18n/resources/cli/ja.json +4 -3
  53. package/dist/tracking/i18n/resources/cli/ko.json +4 -3
  54. package/dist/tracking/i18n/resources/cli/zh.json +4 -3
  55. package/package.json +7 -3
  56. package/skills/ae-agent/SKILL.md +2 -1
  57. package/skills/ae-analysis/SKILL.md +12 -1
  58. package/skills/ae-analysis/references/adhoc_export.md +2 -0
  59. package/skills/ae-analysis/references/adhoc_run.md +2 -0
  60. package/skills/ae-analysis/references/alert_create.md +25 -0
  61. package/skills/ae-analysis/references/alert_definition_schema_get.md +24 -0
  62. package/skills/ae-analysis/references/alert_delete.md +26 -0
  63. package/skills/ae-analysis/references/alert_detail_list.md +27 -0
  64. package/skills/ae-analysis/references/alert_get.md +25 -0
  65. package/skills/ae-analysis/references/alert_job_list.md +24 -0
  66. package/skills/ae-analysis/references/alert_list.md +27 -0
  67. package/skills/ae-analysis/references/alert_notice_config_list.md +24 -0
  68. package/skills/ae-analysis/references/alert_start.md +25 -0
  69. package/skills/ae-analysis/references/alert_stop.md +25 -0
  70. package/skills/ae-analysis/references/alert_update.md +26 -0
  71. package/skills/ae-analysis/references/bi_panel_create.md +3 -3
  72. package/skills/ae-analysis/references/check_delete.md +27 -0
  73. package/skills/ae-analysis/references/check_export.md +27 -0
  74. package/skills/ae-analysis/references/check_get.md +27 -0
  75. package/skills/ae-analysis/references/check_list.md +24 -0
  76. package/skills/ae-analysis/references/check_retry.md +27 -0
  77. package/skills/ae-analysis/references/check_run.md +25 -0
  78. package/skills/ae-analysis/references/command_index.md +61 -27
  79. package/skills/ae-analysis/references/dashboard_create.md +3 -3
  80. package/skills/ae-analysis/references/dashboard_daily_report_send.md +1 -0
  81. package/skills/ae-analysis/references/dashboard_daily_report_update.md +2 -0
  82. package/skills/ae-analysis/references/dashboard_report_data_export.md +3 -3
  83. package/skills/ae-analysis/references/dashboard_report_data_run.md +3 -3
  84. package/skills/ae-analysis/references/event_blacklist_add.md +25 -0
  85. package/skills/ae-analysis/references/event_blacklist_list.md +24 -0
  86. package/skills/ae-analysis/references/event_blacklist_update.md +26 -0
  87. package/skills/ae-analysis/references/ingest_error_list.md +27 -0
  88. package/skills/ae-analysis/references/ingest_summary.md +26 -0
  89. package/skills/ae-analysis/references/live_data_export.md +27 -0
  90. package/skills/ae-analysis/references/live_data_list.md +27 -0
  91. package/skills/ae-analysis/references/plan_change_log_export.md +27 -0
  92. package/skills/ae-analysis/references/plan_change_log_list.md +24 -0
  93. package/skills/ae-analysis/references/plan_delete_items.md +30 -0
  94. package/skills/ae-analysis/references/plan_export.md +26 -0
  95. package/skills/ae-analysis/references/plan_generate.md +27 -0
  96. package/skills/ae-analysis/references/plan_get.md +24 -0
  97. package/skills/ae-analysis/references/plan_import_excel.md +26 -0
  98. package/skills/ae-analysis/references/plan_save_items.md +27 -0
  99. package/skills/ae-analysis/references/plan_sync_from_meta.md +24 -0
  100. package/skills/ae-analysis/references/project_role_delete.md +4 -3
  101. package/skills/ae-analysis/references/project_role_get.md +4 -3
  102. package/skills/ae-analysis/references/project_role_user_list.md +4 -3
  103. package/skills/ae-analysis/references/query_create_result_cluster.md +2 -1
  104. package/skills/ae-analysis/references/report_data_export.md +3 -1
  105. package/skills/ae-analysis/references/report_data_run.md +12 -2
  106. package/skills/ae-analysis/references/sdk_sample_generate.md +24 -0
  107. package/skills/ae-analysis/references/user_cluster_create.md +2 -0
  108. package/skills/ae-analysis/references/user_cluster_create_id.md +2 -0
  109. package/skills/ae-analysis/references/user_cluster_update.md +2 -0
  110. package/skills/ae-analysis/references/user_cluster_update_id.md +2 -0
  111. package/skills/ae-analysis/references/user_tag_create.md +2 -0
  112. package/skills/ae-analysis/references/user_tag_create_id.md +2 -0
  113. package/skills/ae-analysis/references/user_tag_update.md +2 -0
  114. package/skills/ae-analysis/references/user_tag_update_id.md +2 -0
  115. package/skills/ae-analysis-global/SKILL.md +2 -0
  116. package/skills/ae-capability/SKILL.md +7 -5
  117. package/skills/ae-community/SKILL.md +72 -8
  118. package/skills/ae-community/references/community-chat-analysis.md +341 -0
  119. package/skills/ae-community/references/community-data-report.md +301 -0
  120. package/skills/ae-dataops/SKILL.md +2 -1
  121. package/skills/ae-engage/SKILL.md +129 -105
  122. package/skills/ae-engage/references/activity-activity-type.md +1 -1
  123. package/skills/ae-engage/references/activity-activity.md +1 -1
  124. package/skills/ae-engage/references/activity-approval.md +5 -7
  125. package/skills/ae-engage/references/activity-task.md +12 -18
  126. package/skills/ae-engage/references/activity-topic.md +39 -22
  127. package/skills/ae-engage/references/add-approver.md +4 -4
  128. package/skills/ae-engage/references/add-channel.md +10 -5
  129. package/skills/ae-engage/references/approval-approver-delete.md +1 -1
  130. package/skills/ae-engage/references/approver-list.md +4 -4
  131. package/skills/ae-engage/references/build-task-save-guide.md +13 -13
  132. package/skills/ae-engage/references/cancel-query-by-request-id.md +7 -6
  133. package/skills/ae-engage/references/channel-detail.md +14 -9
  134. package/skills/ae-engage/references/channel-list.md +15 -10
  135. package/skills/ae-engage/references/channel-mgmt.md +109 -0
  136. package/skills/ae-engage/references/channel-test-send.md +1 -1
  137. package/skills/ae-engage/references/channel-update-config.md +1 -1
  138. package/skills/ae-engage/references/channel_touch_limits_list.md +1 -1
  139. package/skills/ae-engage/references/client-param.md +34 -16
  140. package/skills/ae-engage/references/common-metric.md +85 -18
  141. package/skills/ae-engage/references/config-item-analysis-report.md +8 -27
  142. package/skills/ae-engage/references/config-item-strategy-comparison.md +7 -18
  143. package/skills/ae-engage/references/config-item-trigger-report.md +8 -35
  144. package/skills/ae-engage/references/delete-channel.md +5 -5
  145. package/skills/ae-engage/references/delete-flow.md +5 -5
  146. package/skills/ae-engage/references/flow-ab-split-node-report.md +11 -45
  147. package/skills/ae-engage/references/flow-detail.md +15 -10
  148. package/skills/ae-engage/references/flow-list.md +9 -4
  149. package/skills/ae-engage/references/flow-node-config-schema.md +9 -8
  150. package/skills/ae-engage/references/flow-node-detail-report.md +11 -46
  151. package/skills/ae-engage/references/flow-node-overview-report.md +11 -43
  152. package/skills/ae-engage/references/flow-process-report.md +12 -50
  153. package/skills/ae-engage/references/flow-update-remark.md +19 -0
  154. package/skills/ae-engage/references/manage-flow.md +19 -19
  155. package/skills/ae-engage/references/manage-task.md +5 -5
  156. package/skills/ae-engage/references/modify-flow-base-info.md +8 -8
  157. package/skills/ae-engage/references/preset-event.md +1 -1
  158. package/skills/ae-engage/references/push-language.md +1 -1
  159. package/skills/ae-engage/references/save-flow.md +54 -52
  160. package/skills/ae-engage/references/save-task.md +23 -17
  161. package/skills/ae-engage/references/scene-config-channel.md +90 -10
  162. package/skills/ae-engage/references/scene-config-group.md +1 -1
  163. package/skills/ae-engage/references/scene-config-item.md +27 -4
  164. package/skills/ae-engage/references/scene-config-metric.md +1 -1
  165. package/skills/ae-engage/references/scene-config-param.md +2 -2
  166. package/skills/ae-engage/references/scene-preset-metric.md +1 -1
  167. package/skills/ae-engage/references/scene-strategy.md +19 -3
  168. package/skills/ae-engage/references/scene-template.md +10 -4
  169. package/skills/ae-engage/references/task-data-detail.md +5 -67
  170. package/skills/ae-engage/references/task-data-overview.md +5 -35
  171. package/skills/ae-engage/references/task-detail.md +5 -5
  172. package/skills/ae-engage/references/task-experiment-report.md +5 -38
  173. package/skills/ae-engage/references/task-list.md +4 -4
  174. package/skills/ae-engage/references/task-metric-detail.md +5 -43
  175. package/skills/ae-engage/references/task-stats.md +5 -5
  176. package/skills/ae-engage/references/update-channel-status.md +6 -6
  177. package/skills/ae-engage/references/validate-flow-node-config.md +12 -11
  178. package/skills/ae-engage/references/whitelist-list.md +4 -4
  179. package/skills/ae-engage/references/whitelist.md +1 -1
  180. package/skills/ae-engage/references/workbench-workbench.md +1 -1
  181. package/skills/ae-experiment/SKILL.md +30 -20
  182. package/skills/ae-experiment/references/batch_delete_experiment.md +4 -4
  183. package/skills/ae-experiment/references/batch_delete_feature.md +3 -3
  184. package/skills/ae-experiment/references/batch_delete_traffic_layer.md +4 -4
  185. package/skills/ae-experiment/references/cancel_experiment_query_by_request_id.md +5 -4
  186. package/skills/ae-experiment/references/check_experiment_ready.md +7 -5
  187. package/skills/ae-experiment/references/check_experiment_traffic_layer_conflict.md +37 -0
  188. package/skills/ae-experiment/references/delete_metric.md +4 -4
  189. package/skills/ae-experiment/references/manage_experiment.md +8 -6
  190. package/skills/ae-experiment/references/manage_feature_status.md +3 -3
  191. package/skills/ae-experiment/references/query_bucket_list.md +5 -3
  192. package/skills/ae-experiment/references/query_experiment_detail.md +6 -4
  193. package/skills/ae-experiment/references/query_experiment_list.md +12 -4
  194. package/skills/ae-experiment/references/query_experiment_list_archived.md +15 -0
  195. package/skills/ae-experiment/references/query_experiment_metric_trend.md +6 -10
  196. package/skills/ae-experiment/references/query_experiment_operation_log.md +17 -0
  197. package/skills/ae-experiment/references/query_experiment_report_summary.md +5 -6
  198. package/skills/ae-experiment/references/query_experiment_sample_size_report.md +6 -10
  199. package/skills/ae-experiment/references/query_feature_detail.md +6 -4
  200. package/skills/ae-experiment/references/query_feature_list.md +5 -3
  201. package/skills/ae-experiment/references/query_feature_operation_log.md +19 -0
  202. package/skills/ae-experiment/references/query_feature_version_list.md +20 -0
  203. package/skills/ae-experiment/references/query_metric_detail.md +6 -4
  204. package/skills/ae-experiment/references/query_metric_list.md +5 -3
  205. package/skills/ae-experiment/references/query_traffic_layer_detail.md +6 -4
  206. package/skills/ae-experiment/references/query_traffic_layer_list.md +5 -3
  207. package/skills/ae-experiment/references/save_experiment.md +148 -9
  208. package/skills/ae-experiment/references/save_feature.md +3 -3
  209. package/skills/ae-experiment/references/save_metric.md +3 -3
  210. package/skills/ae-experiment/references/save_submit_experiment.md +6 -6
  211. package/skills/ae-experiment/references/save_traffic_layer.md +3 -3
  212. package/skills/ae-experiment/references/update_experiment_group.md +20 -0
  213. package/skills/ae-generate-tracking-code/SKILL.md +4 -4
  214. package/skills/ae-generate-tracking-plan/SKILL.md +132 -11
  215. package/skills/ae-generate-tracking-plan/references/business-dimension-mapping.md +98 -33
  216. package/skills/ae-generate-tracking-plan/references/xlsx-schema.md +16 -14
  217. package/skills/ae-kb/SKILL.md +11 -6
  218. package/skills/ae-metadata/SKILL.md +2 -1
  219. package/skills/ae-team/SKILL.md +2 -1
  220. package/dist/chunk-NOO24N7W.js +0 -11
  221. package/dist/chunk-TNW2CI4W.js +0 -129
  222. package/dist/te-community-PEZ2VEF7.js +0 -687
  223. package/dist/te-community-TSKJ652U.js +0 -687
  224. package/dist/te-experiment-JINSMHMW.js +0 -606
  225. package/dist/te-experiment-NWNQHJS5.js +0 -606
  226. package/skills/ae-engage/references/config-channel-detail.md +0 -31
  227. package/skills/ae-engage/references/config-channel-list.md +0 -26
  228. package/skills/ae-engage/references/config-item-detail.md +0 -29
  229. package/skills/ae-engage/references/config-item-list.md +0 -18
  230. package/skills/ae-engage/references/copy-config-template.md +0 -28
  231. package/skills/ae-engage/references/delete-config-channel.md +0 -23
  232. package/skills/ae-engage/references/delete-config-item.md +0 -24
  233. package/skills/ae-engage/references/engage-scene-config-item.md +0 -69
  234. package/skills/ae-engage/references/manage-strategy.md +0 -73
  235. package/skills/ae-engage/references/strategy-detail.md +0 -72
  236. package/skills/ae-engage/references/strategy-list.md +0 -20
  237. package/skills/ae-engage/references/update-config-channel-status.md +0 -31
@@ -33,8 +33,9 @@ description: "Interactive generation of an AE tracking plan and upload. Trigger
33
33
  | 用户属性 | User Property | Property on the user profile (persistent state) |
34
34
  | 预置属性 | Preset Property | System property prefixed with `#` (`#device_id`, `#time`, etc.) |
35
35
  | 自动采集事件 | Auto-track Event | SDK auto-collected events (`ta_app_start`, `ta_page_show`, etc.) |
36
- | 系统事件 | System Event | Auto-track event tag category |
37
- | 业务事件 | Business Event | Custom business event tag category |
36
+ | 系统事件 | System Event | event_tag value reserved for SDK auto-track events (`ta_*`). One of two non-module tags (together with 基础事件). |
37
+ | 基础事件 | Basic | event_tag value for account-level lifecycle/progression events (register, login, level_up, create_role, etc.). Not tied to any functional module. |
38
+ | 功能模块 | Functional Module | event_tag value for feature-specific business events; identifies which module the event belongs to (e.g. Battle, Shop, Ads, Payment, Basic) |
38
39
  | SDK 集成模式 | SDK Integration Mode | `client_only` / `server_only` / `both` / `none` |
39
40
  | 客户端平台 | Client Platform | Android, iOS, Web, Unity, Mini-program, etc. |
40
41
  | 服务端语言 | Server Language | Java, Python, Go, Node.js, PHP, etc. |
@@ -54,7 +55,7 @@ description: "Interactive generation of an AE tracking plan and upload. Trigger
54
55
  | xlsx 格式契约 | xlsx Format Contract | Column rules for AE-compatible Excel generation |
55
56
  | draft.json | draft.json | Internal intermediate representation (JSON) of the tracking plan |
56
57
  | display_name | Display Name | Human-readable name in the user's language |
57
- | event_tag | Event Tag | Category label for grouping events |
58
+ | event_tag | Event Tag | Functional module the event belongs to (e.g. Battle, Shop, Ads, Payment). Auto-track events use "System Event". |
58
59
  | snake_case | snake_case | Canonical naming format: `lowercase_with_underscores` |
59
60
 
60
61
  ## When to Trigger
@@ -88,7 +89,7 @@ Phase 0 → 1 → 2 → 3 → 4, do not skip steps.
88
89
  > All subsequent CLI commands must be prefixed with `AE_LANG=<user_lang>` to ensure CLI output and generated xlsx headers match the user's language.
89
90
  > When uploading the xlsx, pass `--lang <user_lang>` as well; it must match `draft.meta.lang` / the generated xlsx language.
90
91
 
91
- Collect the following **4 items** sequentially, **do NOT ask all at once**:
92
+ Collect the following **5 items** sequentially, **do NOT ask all at once**:
92
93
 
93
94
  ### Item 1 — Application Scenario
94
95
 
@@ -111,8 +112,9 @@ Choose your source material (up to 2):
111
112
  2 - Detailed description (conversational) — Describe app business flow, core features, user behaviors, monetization model, etc.
112
113
  3 - Codebase (local project path; hidden in sandbox) — Analyze source code to extract events and properties
113
114
  4 - Pre-built template (built-in industry and game genre templates) — Select a built-in template
115
+ 5 - Modify existing tracking plan (local AE format xlsx file) — Import an existing tracking plan xlsx as baseline for modification; can be combined with Product doc / Description / Codebase, but NOT with Pre-built template
114
116
 
115
- Reply with number(s), e.g. 1 or 1,4. Select up to 2.
117
+ Reply with number(s), e.g. 1,5 or 4. Select up to 2.
116
118
  ```
117
119
 
118
120
  If in a sandbox environment, ask exactly:
@@ -123,8 +125,9 @@ Choose your source material (up to 2):
123
125
  1 - Product document (sandbox workspace path, uploaded attachment, URL, image file, or folder) — Extract events and properties from product docs; supports md/pdf/docx/URL/images (png/jpg/jpeg/webp). You can attach/upload relevant files here.
124
126
  2 - Detailed description (conversational) — Describe app business flow, core features, user behaviors, monetization model, etc.
125
127
  3 - Pre-built template (built-in industry and game genre templates) — Select a built-in template
128
+ 4 - Modify existing tracking plan (sandbox workspace path) — Import an existing tracking plan xlsx as baseline for modification; can be combined with Product doc / Description, but NOT with Pre-built template
126
129
 
127
- Reply with number(s), e.g. 1 or 1,3. Select up to 2.
130
+ Reply with number(s), e.g. 1,4 or 3. Select up to 2.
128
131
  ```
129
132
 
130
133
  Do not rewrite this source material list as unnumbered bullets, cards, or prose. The user must be able to reply with the visible numbers.
@@ -147,9 +150,11 @@ Based on user selection, determine source material type and record to `meta.sour
147
150
  | Description only | `chat` | Construct events in Draft phase based on description |
148
151
  | Codebase only | `codebase` | Scan source code, extract events/properties from business logic |
149
152
  | Template only | `template` | Provide built-in template selection |
150
- | Any two-item combo | Join two types with `_` | First as baseline, second as supplement (priority: template codebase prd → chat) |
153
+ | Existing plan only | `existing_plan` | Import xlsx as baseline (see "Modify Existing Tracking Plan Flow" below) |
154
+ | Any two-item combo | Join two types with `_` | First as baseline, second as supplement (priority: existing_plan → template → codebase → prd → chat) |
155
+ | Existing plan + Pre-built template | **NOT allowed** | Both provide event baselines; semantic conflict |
151
156
 
152
- **Follow-up questions** (ask in selection order):
157
+ **Follow-up questions** (ask in follow-up order defined in Multi-Source Combination Rules below):
153
158
  - Product doc → if not in a sandbox environment, ask exactly:
154
159
  ```text
155
160
  What is the product document path?
@@ -176,6 +181,49 @@ Based on user selection, determine source material type and record to `meta.sour
176
181
  - Detailed description → If too vague, follow up on core features, user behaviors, business flows, monetization
177
182
  - Codebase → ask **"What is the project directory path?"**, then scan source to extract business logic
178
183
  - Pre-built template → display matching templates for user confirmation
184
+ - Modify existing tracking plan → ask **"Please provide the xlsx file path of your existing tracking plan"**, then follow the flow below
185
+
186
+ **Modify Existing Tracking Plan Flow** (when user selects this option):
187
+
188
+ 1. **Import**: Ask user for the file path, then immediately import:
189
+ ```bash
190
+ AE_LANG=<user_lang> ae-cli tracking code import-template --template <path> --out .ae-cli/draft.json
191
+ ```
192
+ 2. **Check result**:
193
+ - If CLI errors (file not found / parse failure) → report error, ask user to fix the file and retry
194
+ - If `draft.json` has `events` array empty → 🛑 **Severe: No AE-format sheets found** (missing `#` prefix sheets like `#事件数据`). Tell user the file does not appear to be an AE tracking plan xlsx. User must fix the original file and re-import.
195
+ 3. **Content validation** (when events are non-empty):
196
+ ```bash
197
+ AE_LANG=<user_lang> ae-cli tracking plan validate --in .ae-cli/draft.json --fix
198
+ ```
199
+ 4. **Handle validation results by severity**:
200
+ - If validate passes with **no issues at all** → skip to Step 5.
201
+
202
+ | Severity | Examples | Handling | User Action |
203
+ |---|---|---|---|
204
+ | 🔧 **Minor** (auto-fixable) | `display_name` duplicate, `array_row` sub-property inconsistency, event name duplicate | `--fix` auto-fixes, writes to `draft.json`. Inform user of what was fixed. | None (informed) |
205
+ | ⚠️ **Medium** (needs confirmation) | snake_case violation, property name duplicate, invalid property type, nested property parent is not a composite type | List each issue with current value → suggested fix. User confirms item by item before writing to `draft.json`. | Confirm each fix |
206
+ | 🛑 **Severe** | File cannot be parsed, or events array is empty after import | Reject. Tell user the specific issue. User fixes **original file** and re-imports. | Fix original file |
207
+
208
+ **Medium issue confirmation format**:
209
+ ```
210
+ ⚠️ The following content needs to be fixed:
211
+
212
+ | # | Issue | Location | Current | Suggested |
213
+ |---|-------|----------|---------|------------|
214
+ | 1 | snake_case | event_name | UserLogin | user_login |
215
+ | 2 | snake_case | prop_name | vipLevel | vip_level |
216
+ | 3 | invalid type | property "level" | integer | number |
217
+
218
+ Apply all suggested fixes? ok / specify per item / skip
219
+ ```
220
+ - `ok` → apply all suggested fixes to `draft.json`
221
+ - `specify per item` → confirm each item one by one
222
+ - `skip` → keep current values, handle in Refine phase later
223
+
224
+ ⚠️ **Never modify the user's original xlsx file.** All changes go into `draft.json`.
225
+
226
+ 5. **Re-validate** after fixes → loop until clean, then continue to the next follow-up question (if combined with another source material), or Item 3 (if existing_plan is the only source).
179
227
 
180
228
  **Codebase analysis flow** (when source_type includes `codebase`):
181
229
 
@@ -196,9 +244,11 @@ After source material is confirmed, **must** process business dimension info bas
196
244
  | source_type | Handling |
197
245
  |---|---|
198
246
  | `template` | Directly display template's inherited business dimensions; skip detailed inference |
247
+ | `existing_plan` | Infer business dimensions from existing plan content (analyze event modules, payment events, currency properties); follow up on missing items; event injection preview |
199
248
  | `prd` / `codebase` / `chat` | Infer business dimensions → follow up on missing items → event injection preview |
249
+ | Combo (e.g. `template_prd`) | See detailed rules below — baseline source's method is primary, supplementary source contributes additional context |
200
250
 
201
- **If source_type = template**:
251
+ **If source_type is template or starts with template_** (covers `template`, `template_prd`, `template_codebase`, `template_chat`):
202
252
 
203
253
  Display template's preset business dimensions:
204
254
 
@@ -215,6 +265,27 @@ Confirm using these business dimensions? ok / modify
215
265
 
216
266
  - User `ok` → proceed to next step
217
267
  - User says "modify" → switch to prd/chat flow for user to supplement
268
+ - For combos (e.g. `template_prd`): after confirming template dimensions, also note any supplementary insights from `prd`/`chat` as context for Phase 1.2.
269
+
270
+ **If source_type includes existing_plan**:
271
+
272
+ Infer business dimensions from the imported plan content:
273
+
274
+ 1. **Analyze existing events**: Examine `event_tag` values to identify functional modules (e.g. events tagged "Battle" → 战斗 module). Examine event names for payment/ad-related patterns to infer revenue model.
275
+ 2. **Inference display**: Format inference results as a summary:
276
+ ```
277
+ Business Dimension (inferred from existing plan: <filename>)
278
+
279
+ Revenue Model: <inferred from payment/ad events>
280
+ Core Loop: <inferred from event flow>
281
+ Functional Entries: <inferred from event_tag values>
282
+ Currency System: <inferred from currency-related properties>
283
+
284
+ Confirm these business dimensions? ok / modify
285
+ ```
286
+ 3. **Follow up missing**: Only ask about items that could not be inferred
287
+ 4. **Event injection preview**: Show suggested injected event modules (only add events not already in the plan); user `ok` to proceed
288
+ - For combos (e.g. `existing_plan_prd`): after confirming dimensions from the plan, also note any supplementary insights from `prd`/`chat` as context for Phase 1.2.
218
289
 
219
290
  **If source_type is prd / codebase / chat**:
220
291
 
@@ -224,7 +295,7 @@ Confirm using these business dimensions? ok / modify
224
295
 
225
296
  Platform validation: Use `business-dimension-mapping.md` Chapter 5 decision rules to check if injected events' platform assignments are reasonable.
226
297
 
227
- **Template matching** (prd / codebase / chat scenarios, optional):
298
+ **Template matching** (prd / codebase / chat scenarios, optional; **NOT applicable to existing_plan or template scenarios**):
228
299
 
229
300
  After business dimension confirmation, auto-detect matching templates based on app type:
230
301
  ```bash
@@ -233,6 +304,51 @@ AE_LANG=<user_lang> ae-cli tracking plan list-templates --json
233
304
 
234
305
  Show matching templates to user for confirmation. Confirmed templates serve as baseline and participate in Phase 1 event merging.
235
306
 
307
+ ### Multi-Source Combination Rules (when user selects 2 source materials)
308
+
309
+ **Follow-up Order** (Phase 0 questioning sequence):
310
+
311
+ Do **not** follow user's selection order. Instead, use this order:
312
+
313
+ ```
314
+ existing_plan(blocking validation, always first)→ codebase/prd(user's selection order)→ chat → template
315
+ ```
316
+
317
+ Rationale:
318
+ - `existing_plan` must go first — import + validate may require the user to fix their file; processing it early avoids wasted context
319
+ - `codebase` / `prd` — directly reflect actual business requirements, prioritized over generic descriptions and templates
320
+ - `chat` — conversational description, supplements business context
321
+ - `template` — generic industry template, least specific to the user's business
322
+
323
+ Source material processing happens primarily in Phase 1.2 (Merge Source Materials). The one exception is `existing_plan`: it is imported and validated in Phase 0 because user-provided files may need fixing before proceeding. All other sources are processed in Phase 1.2 per their standard flow.
324
+
325
+ Merge priority (Phase 1.2): `existing_plan → template → codebase → prd → chat → autotrack`
326
+ Earlier sources take precedence — same-name events keep the earlier version, later sources only add new events or merge `prop_names` without overwriting.
327
+
328
+ **Business Dimension Inference (combined scenarios)**:
329
+
330
+ Use the baseline source's inference method as primary. Supplementary sources (especially prd/chat) may contribute additional information — present a merged view for user confirmation.
331
+
332
+ **Valid Combinations**:
333
+
334
+ > The "Baseline" column identifies which source has higher merge priority (see Phase 1.2 merge order), which may differ from the user's selection order. Follow-up questioning uses the fixed order in "Multi-Source Combination Rules" above, not the user's selection order.
335
+
336
+ | Baseline | Supplementary | Phase 0 for supplementary |
337
+ |---|---|---|
338
+ | existing_plan | codebase | Collect path + quick tech stack detection |
339
+ | existing_plan | prd | Collect path |
340
+ | existing_plan | chat | Collect description; participates in dimension inference |
341
+ | template | codebase | Collect path + quick tech stack detection; template matching/import deferred to Phase 1.2 |
342
+ | template | prd | Collect path; template matching/import deferred to Phase 1.2 |
343
+ | template | chat | Collect description |
344
+ | codebase | prd | Collect path |
345
+ | codebase | chat | Collect description |
346
+ | prd | chat | Collect description |
347
+ | codebase | template | Same as template+codebase row above (template is baseline per merge priority) |
348
+ | prd | template | Same as template+prd row above (template is baseline per merge priority) |
349
+
350
+ **Forbidden**: `existing_plan + template` (both provide event baselines; semantic conflict).
351
+
236
352
  **Record business dimension info to `meta.business_dimension`**:
237
353
  ```json
238
354
  "business_dimension": {
@@ -493,8 +609,11 @@ Draft
493
609
 
494
610
  ### 1.2 Merge Source Materials
495
611
 
496
- Priority from low to high: **template → codebase → prd → chat → autotrack**
612
+ Merge order: **existing_plan template → codebase → prd → chat → autotrack**
497
613
 
614
+ Earlier sources take precedence — same-name events keep the earlier version, later sources only add new events or merge `prop_names` without overwriting.
615
+
616
+ - **existing_plan**: Already imported and validated in Phase 0 (see "Modify Existing Tracking Plan Flow"). Events are in draft.json as the baseline; each item marked `source: "existing_plan"`. Higher-priority sources supplement with new events only; same-name events keep the existing_plan version.
498
617
  - **template**: User-selected industry template (see "Template Lookup Convention" below) as baseline; each item marked `source: "template"`
499
618
  - Templates are resolved by ae-cli from the ae-cli package root and user template directory
500
619
  - Import command: `AE_LANG=<user_lang> ae-cli tracking code import-template --template-name "<template name>" --out .ae-cli/draft.json`
@@ -657,6 +776,8 @@ AE_LANG=<user_lang> ae-cli tracking plan draft --in .ae-cli/draft.json --out .ae
657
776
 
658
777
  **Note**: Display names can be the same across different property pools (e.g. `vip_level` can be both an event property and a user property).
659
778
 
779
+ > **Relationship to Phase 0 existing_plan validation**: The underlying rule engine is the same, but Phase 0 uses **interactive 3-tier** (Minor/Medium/Severe) because the user is present to confirm each fix. Phase 1.6 uses **batch 2-tier** (auto-fixable / manual-fix-needed) because it runs as part of the automated draft generation. Rules that are "Medium (needs confirmation)" in Phase 0 appear as "❌ Manual fix needed" here — the same rule, just without the interactive prompt.
780
+
660
781
  ### 1.7 Show Summary
661
782
 
662
783
  Display to user via markdown table: event count / event property pool size / super property count / user property count; show deliverable paths.
@@ -10,20 +10,20 @@
10
10
 
11
11
  ## 一、Revenue Model → Required Events
12
12
 
13
- | 收入模型 | 注入事件 | 事件显示名 | platform | 必带属性 |
14
- |---|---|---|---|---|
15
- | `IAA` | `ad_show` | 广告展示 | client | `ad_type`、`ad_placement`、`is_filled` |
16
- | `IAA` | `ad_click` | 广告点击 | client | `ad_type`、`ad_placement`、`ad_network` |
17
- | `IAA` | `ad_reward_get` | 激励广告奖励领取 | client | `ad_type`、`ad_placement`、`reward_type`、`reward_amount` |
18
- | `IAP` | `payment` | 支付成功 | server | `order_id`、`pay_amount`、`currency_type`、`payment_name`、`payment_type` |
19
- | `IAP` | `payment_fail` | 支付失败 | server | `order_id`、`fail_reason`、`payment_name` |
20
- | `mixed` | 同 IAA + IAP 所有事件 | | | |
21
- | `subscription` | `subscription_start` | 订阅开始 | server | `subscription_id`、`plan_name`、`start_time` |
22
- | `subscription` | `subscription_renew` | 订阅续费 | server | `subscription_id`、`renew_amount`、`currency_type` |
23
- | `subscription` | `subscription_cancel` | 订阅取消 | server | `subscription_id`、`cancel_time`、`cancel_reason` |
24
- | `commission` | `order_create` | 订单创建 | server | `order_id`、`order_amount`、`commission_rate` |
25
- | `commission` | `order_paid` | 订单支付 | server | `order_id`、`pay_amount`、`commission_amount` |
26
- | `commission` | `commission_settled` | 佣金结算 | server | `settlement_id`、`commission_amount`、`settle_time` |
13
+ | 收入模型 | 注入事件 | 事件显示名 | event_tag | platform | 必带属性 |
14
+ |---|---|---|---|---|---|
15
+ | `IAA` | `ad_show` | 广告展示 | 广告 | client | `ad_type`、`ad_placement`、`is_filled` |
16
+ | `IAA` | `ad_click` | 广告点击 | 广告 | client | `ad_type`、`ad_placement`、`ad_network` |
17
+ | `IAA` | `ad_reward_get` | 激励广告奖励领取 | 广告 | client | `ad_type`、`ad_placement`、`reward_type`、`reward_amount` |
18
+ | `IAP` | `payment` | 支付成功 | 支付 | server | `order_id`、`pay_amount`、`currency_type`、`payment_name`、`payment_type` |
19
+ | `IAP` | `payment_fail` | 支付失败 | 支付 | server | `order_id`、`fail_reason`、`payment_name` |
20
+ | `mixed` | 同 IAA + IAP 所有事件 | | | | |
21
+ | `subscription` | `subscription_start` | 订阅开始 | 订阅 | server | `subscription_id`、`plan_name`、`start_time` |
22
+ | `subscription` | `subscription_renew` | 订阅续费 | 订阅 | server | `subscription_id`、`renew_amount`、`currency_type` |
23
+ | `subscription` | `subscription_cancel` | 订阅取消 | 订阅 | server | `subscription_id`、`cancel_time`、`cancel_reason` |
24
+ | `commission` | `order_create` | 订单创建 | 交易 | server | `order_id`、`order_amount`、`commission_rate` |
25
+ | `commission` | `order_paid` | 订单支付 | 交易 | server | `order_id`、`pay_amount`、`commission_amount` |
26
+ | `commission` | `commission_settled` | 佣金结算 | 交易 | server | `settlement_id`、`commission_amount`、`settle_time` |
27
27
 
28
28
  ---
29
29
 
@@ -52,17 +52,19 @@
52
52
  **解析结果**:
53
53
 
54
54
  ```
55
- 节点1: 刷关卡 → stage_start / stage_complete / stage_fail
56
- 节点2: 获得金币 → token_get (token_type=gold, source=关卡)
57
- 节点3: 抽卡 → gacha_draw (pool_type, draw_count)
58
- 节点4: 获取角色 → hero_get (hero_id, hero_star)
55
+ 节点1: 刷关卡 → stage_start / stage_complete / stage_fail [event_tag: 关卡/Stage]
56
+ 节点2: 获得金币 → token_get (token_type=gold, source=关卡) [event_tag: 资源/Resource]
57
+ 节点3: 抽卡 → gacha_draw (pool_type, draw_count) [event_tag: 抽卡/Gacha]
58
+ 节点4: 获取角色 → hero_get (hero_id, hero_star) [event_tag: 养成/Growth]
59
59
  ```
60
60
 
61
61
  ---
62
62
 
63
63
  ## 三、功能入口 → 模块事件组
64
64
 
65
- | 功能入口 | 事件名 | 显示名 | platform | 典型属性 |
65
+ > 第一列"模块"即该事件的 `event_tag` 值。注入时翻译为用户语言。
66
+
67
+ | 模块 (event_tag) | 事件名 | 显示名 | platform | 典型属性 |
66
68
  |---|---|---|---|---|
67
69
  | 关卡 | `stage_start` | 关卡开始 | client | `stage_id`、`stage_type`、`difficulty` |
68
70
  | 关卡 | `stage_complete` | 关卡完成 | server | `stage_id`、`star_rating`、`score` |
@@ -200,26 +202,36 @@
200
202
 
201
203
  > 根据应用类型/游戏品类,自动注入对应模块的事件组。
202
204
  > 品类由 Phase 0 的 `meta.scenario` 或用户描述推断。
205
+ >
206
+ > **event_tag 规则**:本表中每行的"模块"列即该事件的 `event_tag` 值。注入时需翻译为用户语言。
207
+ > 例如 战斗→`Battle`, 养成→`Growth`, 抽卡→`Gacha`, 资源→`Resource`, 广告→`Ads`, 支付→`Payment`。
203
208
 
204
- ### 8.1 游戏类 — 通用基础模块(所有游戏必选)
209
+ ### 8.0 通用基础模块(所有品类适用)
210
+
211
+ > 以下事件不属于任何具体功能模块(关卡/商城/抽卡等),统一使用 `基础事件`(Basic)标签。
212
+ > 区别于 `系统事件`(System Event,SDK 自动采集的 `ta_*` 事件)。
205
213
 
206
214
  **用户生命周期**:
207
215
 
208
- | 事件名 | 显示名 | platform | 必带属性 |
209
- |---|---|---|---|
210
- | `new_device` | 设备激活 | client | `channel` |
211
- | `register` | 用户注册 | server | `register_type` |
212
- | `login` | 用户登录 | both | `account_id` |
213
- | `logout` | 用户登出 | both | `session_duration` |
216
+ | 模块 | 事件名 | 显示名 | platform | 必带属性 |
217
+ |---|---|---|---|---|
218
+ | 基础事件 | `new_device` | 设备激活 | client | `channel` |
219
+ | 基础事件 | `register` | 用户注册 | server | `register_type` |
220
+ | 基础事件 | `login` | 用户登录 | both | `account_id` |
221
+ | 基础事件 | `logout` | 用户登出 | both | `session_duration` |
214
222
 
215
223
  **成长模块**:
216
224
 
217
- | 事件名 | 显示名 | platform | 必带属性 |
218
- |---|---|---|---|
219
- | `create_role` | 创建角色 | server | `role_id`、`role_name`、`server_id` |
220
- | `guide_complete` | 完成新手引导 | client | `guide_id`、`guide_step` |
221
- | `level_up` | 升级 | server | `level`、`level_before` |
222
- | `vip_levelup` | VIP升级 | server | `vip_level` |
225
+ | 模块 | 事件名 | 显示名 | platform | 必带属性 |
226
+ |---|---|---|---|---|
227
+ | 基础事件 | `create_role` | 创建角色 | server | `role_id`、`role_name`、`server_id` |
228
+ | 基础事件 | `guide_complete` | 完成新手引导 | client | `guide_id`、`guide_step` |
229
+ | 基础事件 | `level_up` | 升级 | server | `level`、`level_before` |
230
+ | 基础事件 | `vip_levelup` | VIP升级 | server | `vip_level` |
231
+
232
+ ### 8.1 游戏类 — 通用基础模块(所有游戏必选)
233
+
234
+ > 以下为游戏品类通用的基础事件,所有游戏品类均应包含。详见 8.0 通用基础模块。
223
235
 
224
236
  ### 8.2 游戏类 — 按品类
225
237
 
@@ -422,4 +434,57 @@
422
434
 
423
435
  - 必须有 ≥2 个自定义属性
424
436
  - 必须标注事件标签(模块归属)和采集端
425
- - 命名符合 snake_case
437
+ - 命名符合 snake_case
438
+
439
+ ---
440
+
441
+ ## 附录:event_tag 多语言对照表
442
+
443
+ > 生成 event_tag 时,根据用户语言从本表选取对应翻译。
444
+ > 代码层(`src/xlsx/write.ts` 的 `CANONICAL_TAG`)也同步维护此表,用于 xlsx 输出时按业务重要性排序。
445
+
446
+ | 中文 | English | 日本語 | 한국어 |
447
+ |---|---|---|---|
448
+ | 基础事件 | Basic | 基本イベント | 기본 이벤트 |
449
+ | 系统事件 | System Event | システムイベント | 시스템 이벤트 |
450
+ | 战斗 | Battle | 戦闘 | 전투 |
451
+ | 关卡 | Stage | ステージ | 스테이지 |
452
+ | 副本 | Dungeon | ダンジョン | 던전 |
453
+ | 抽卡 | Gacha | ガチャ | 가챠 |
454
+ | 养成 | Growth | 育成 | 육성 |
455
+ | 资源 | Resource | リソース | 리소스 |
456
+ | 广告 | Ads | 広告 | 광고 |
457
+ | 支付 | Payment | 支払い | 결제 |
458
+ | 订阅 | Subscription | サブスクリプション | 구독 |
459
+ | 商城 | Shop | ショップ | 상점 |
460
+ | 任务 | Quest | クエスト | 퀘스트 |
461
+ | 成就 | Achievement | 実績 | 업적 |
462
+ | 签到 | Check-in | チェックイン | 출석체크 |
463
+ | 排行榜 | Leaderboard | ランキング | 리더보드 |
464
+ | 公会 | Guild | ギルド | 길드 |
465
+ | 社交 | Social | ソーシャル | 소셜 |
466
+ | 建筑 | Building | 建築 | 건설 |
467
+ | 联盟 | Alliance | 同盟 | 연맹 |
468
+ | 装备 | Equipment | 装備 | 장비 |
469
+ | 交易 | Trade | トレード | 거래 |
470
+ | 复活 | Revive | 復活 | 부활 |
471
+ | Slots | Slots | スロット | 슬롯 |
472
+ | 抽奖 | Lottery | 抽選 | 추첨 |
473
+ | 奖励 | Reward | 報酬 | 보상 |
474
+ | 提现 | Withdraw | 引き出し | 출금 |
475
+ | 发现 | Discovery | 発見 | 발견 |
476
+ | 商品 | Product | 商品 | 상품 |
477
+ | 订单 | Order | 注文 | 주문 |
478
+ | 售后 | After-sales | アフターサービス | A/S |
479
+ | 内容 | Content | コンテンツ | 콘텐츠 |
480
+ | 互动 | Interaction | インタラクション | 인터랙션 |
481
+ | 关系 | Relationship | 関係 | 관계 |
482
+ | 直播 | Live | ライブ | 라이브 |
483
+ | 引导 | Onboarding | オンボーディング | 온보딩 |
484
+ | 课程 | Course | コース | 코스 |
485
+ | 报名 | Enrollment | 申し込み | 신청 |
486
+ | 测验 | Quiz | クイズ | 퀴즈 |
487
+ | 创作 | Creation | 創作 | 창작 |
488
+ | 素材 | Material | 素材 | 소재 |
489
+ | 导出 | Export | エクスポート | 내보내기 |
490
+ | 内容播放 | Playback | 再生 | 재생 |
@@ -95,20 +95,22 @@ A-E 在 writer 里用 `mergeCells` 合并。
95
95
 
96
96
  ## 类型枚举
97
97
 
98
- ### PropType(xlsx 中文值 canonical)
99
-
100
- | canonical(draft.json) | xlsx 写入值 | xlsx 读取可接受值(含行业 alias) |
101
- |---|---|---|
102
- | `string` | `文本` | `文本` / `字符串` |
103
- | `number` | `数值` | `数值` |
104
- | `bool` | `布尔` | `布尔` |
105
- | `datetime` | `时间` | `时间` |
106
- | `object` | `对象` | `对象` |
107
- | `array_row` | `对象组` | `对象组` |
108
- | `array_string` | `列表` | `列表` |
109
-
110
- Writer 方向统一用第二列(官方中文正式名),不输出 alias。
111
- Reader 方向对 alias / 未知值做 fallback 并打 stderr warning。
98
+ ### PropType(canonical各语言显示值)
99
+
100
+ > Writer 按 `draft.meta.lang` 输出对应语言列的值。
101
+
102
+ | canonical(draft.json) | zh | en | ja | ko | 读取额外兼容(alias) |
103
+ |---|---|---|---|---|---|
104
+ | `string` | `文本` | `String` | `ストリング` | `String` | `字符串` / `string` / `文字列` / `テキスト` / `텍스트` / `문자열` |
105
+ | `number` | `数值` | `Number` | `数値` | `Number` | `number` / `숫자` |
106
+ | `bool` | `布尔` | `Boolean` | `ブール値` | `Boolean` | `boolean` / `Bool` / `ブール` / `부울` |
107
+ | `datetime` | `时间` | `Date` | `時間` | `Date` | `datetime` / `DateTime` / `Time` / `日時` / `날짜시간` / `time` |
108
+ | `object` | `对象` | `Row` | `オブジェクト` | `Row` | `object` / `Object` |
109
+ | `array_row` | `对象组` | `Array Row` | `オブジェクトグループ` | `Array Row` | `object[]` / `Object Array` / `オブジェクト配列` / `object_array` / `객체 배열` |
110
+ | `array_string` | `列表` | `List` | `リスト` | `List` | `string[]` / `String Array` / `配列` / `string_array` / `리스트` |
111
+
112
+ > 旧值兼容(2026-07-15 前生成的 xlsx):`en` 旧值 `string`/`number`/`boolean`/`datetime`/`object`/`object[]`/`string[]`,
113
+ > `ja` 旧值 `オブジェクト配列`/`配列`,`ko` 旧值 `time`/`object_array`/`string_array` 在 reader 中仍可识别。
112
114
 
113
115
  ### UpdateType(用户属性 `更新方式`)
114
116
 
@@ -19,8 +19,9 @@ ae-cli kb +<command> [options]
19
19
  - Prefer `--dry-run` before destructive or broad writes when the user has not already validated the target.
20
20
  - Do not invent knowledge base names, scopes, source display names, or JSON payloads. Ask the user or query known context when values are missing.
21
21
  - JSON flags must be valid JSON strings, usually wrapped in single quotes in shell commands.
22
- - Successful commands return JSON by default. Use `--format table` only when a table is easier for a human to scan.
22
+ - Successful commands return JSON by default. Use `--format table` only when a table is easier for a human to scan. Envelope may include optional `_notice.host_compat`.
23
23
  - `--host <url>` overrides the active AE host. It is available on every command and may be placed after the subcommand, e.g. `ae-cli kb +<command> --host <url>`.
24
+ - **CRITICAL — Host compat (do this first):** After each `ae-cli` run, check stderr and `_notice.host_compat`. If either is present, open the user reply with a short ⚠️ version warning and **quote the `npm i -g` / `npx skills add` (or update-cluster) lines verbatim**, then present the business result. Soft tip; `ok: true` can still carry the notice.
24
25
  - For external-agent retrieval, prefer the deterministic flow `+index` -> `+grep` -> `+read`: inspect navigation, locate candidate pages, then open the exact page or line window. Use `+ask` only when the user wants an LLM-synthesized answer and accepts token consumption.
25
26
 
26
27
  ## Commands
@@ -124,15 +125,17 @@ ae-cli kb +status --name engineering-handbook
124
125
 
125
126
  ### Query Knowledge
126
127
 
127
- Use `+query` with a natural-language question and a JSON array of source refs.
128
+ Use `+query` with a natural-language question. Optionally scope to specific knowledge bases or tune result count and locale.
128
129
 
129
130
  ```bash
130
131
  ae-cli kb +query \
131
132
  --query "How do we release a dashboard?" \
132
- --sources '[{"scope":"company","name":"engineering-handbook"}]'
133
+ --sources '[{"scope":"company","name":"engineering-handbook"}]' \
134
+ --top-k 10 \
135
+ --locale zh
133
136
  ```
134
137
 
135
- `--sources` entries require:
138
+ When `--sources` is provided, each entry requires:
136
139
 
137
140
  - `scope`: knowledge base scope such as `personal` or `company`.
138
141
  - `name`: knowledge base name.
@@ -233,11 +236,13 @@ ae-cli kb +remove --name engineering-handbook
233
236
  ### `+query`
234
237
 
235
238
  ```bash
236
- ae-cli kb +query --query "<question>" --sources '[{"scope":"company","name":"kb-name"}]'
239
+ ae-cli kb +query --query "<question>" [--sources '[{"scope":"company","name":"kb-name"}]'] [--top-k 10] [--locale zh|en|ja|ko]
237
240
  ```
238
241
 
239
242
  - `--query`, alias `-q`: required natural-language question.
240
- - `--sources`: required JSON array of knowledge base refs.
243
+ - `--sources`: optional JSON array of knowledge base refs. Omit to search all accessible knowledge bases.
244
+ - `--top-k`: optional max number of hits, 1-50, default 10.
245
+ - `--locale`: optional locale: `zh`, `en`, `ja`, or `ko`.
241
246
 
242
247
  ### `+ask`
243
248
 
@@ -21,8 +21,9 @@ Parallel to **`ae-analysis`** (MCP `analysis_meta` for metadata lists/governance
21
21
  | `--dry-run` | Optional: confirm ready to run (`/dry-run`). Alone for risk/output preview. Do not stack with `--validate`. |
22
22
 
23
23
  Output and errors:
24
- - Success: JSON envelope (default).
24
+ - Success: JSON envelope (default). May include optional `_notice.host_compat`.
25
25
  - Failure: `{ "ok": false, "error": { "type", "message", "hint" } }`, non-zero exit.
26
+ - **CRITICAL — Host compat (do this first):** After each `ae-cli` run, check stderr and `_notice.host_compat`. If either is present, open the user reply with a short ⚠️ version warning and **quote the `npm i -g` / `npx skills add` (or update-cluster) lines verbatim**, then present the business result. Soft tip; `ok: true` can still carry the notice.
26
27
 
27
28
  Safety:
28
29
  - Read-only commands can run directly after IDs/names are verified.
@@ -25,8 +25,9 @@ Global parameters:
25
25
  | `--dry-run` | Show request details without executing. |
26
26
 
27
27
  Output and errors:
28
- - Successful commands return machine-readable JSON by default.
28
+ - Successful commands return machine-readable JSON by default. Envelope may include optional `_notice.host_compat`.
29
29
  - Failed commands return `{ "ok": false, "error": { "type": "...", "message": "...", "hint": "..." } }` and exit non-zero.
30
+ - **CRITICAL — Host compat (do this first):** If stderr or `_notice.host_compat` has a version warning, open the user reply with ⚠️ and **quote `npm i -g` / `npx skills add` (or update-cluster) lines verbatim**, then list projects/results. Never omit when summarizing. Soft tip; `ok: true` may still include the notice.
30
31
 
31
32
  Safety constraints:
32
33
  - Read commands (`+list`, `+list-templates`, `+list-projects`, `+run-result`, `+run-artifacts`, `+ai-generate`) can execute directly once required IDs are known.
@@ -1,11 +0,0 @@
1
- // src/core/errors.ts
2
- var PermissionError = class extends Error {
3
- constructor(message) {
4
- super(message);
5
- this.name = "PermissionError";
6
- }
7
- };
8
-
9
- export {
10
- PermissionError
11
- };