@thinkingai/ae-cli 6.0.18 → 6.0.22

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 (110) hide show
  1. package/README.md +8 -10
  2. package/README.zh.md +9 -11
  3. package/dist/{auth-DYC2BGLM.js → auth-I2G7OAU2.js} +2 -4
  4. package/dist/{auth-GHBMJ5ZR.js → auth-RDN6D5HU.js} +32 -104
  5. package/dist/{chunk-5OC7CYCG.js → chunk-2W7HULUD.js} +14 -14
  6. package/dist/chunk-4EUZRJPO.js +163 -0
  7. package/dist/{chunk-DMMEPCST.js → chunk-5FBLRSMU.js} +25 -115
  8. package/dist/{chunk-BJX3GXWC.js → chunk-E34XH4GW.js} +2 -2
  9. package/dist/chunk-FPE5LGVU.js +105 -0
  10. package/dist/{chunk-I5CRVM2S.js → chunk-H52CSLJW.js} +44 -17
  11. package/dist/{chunk-RSHMZ3LG.js → chunk-U6QPKCN3.js} +6 -20
  12. package/dist/{chunk-6W4QOZAL.js → chunk-WPXHCP4A.js} +23 -13
  13. package/dist/{chunk-PN3OS34E.js → chunk-XE2PI5DS.js} +1 -1
  14. package/dist/{chunk-2DUEAXV3.js → chunk-YACCPUNQ.js} +1 -1
  15. package/dist/cli-token-6AGEDJF4.js +14 -0
  16. package/dist/{client-2UJ63MVQ.js → client-VTJMUZ4O.js} +3 -3
  17. package/dist/{config-NCUGK6NS.js → config-2SDTLGOC.js} +3 -3
  18. package/dist/index.js +314 -197
  19. package/dist/metadata-JZ2OTWBK.js +420 -0
  20. package/dist/{model-SJSOZTRS.js → model-ZYMRN4VS.js} +2 -2
  21. package/dist/{raw-7NVWSVJP.js → raw-NGYHAL3F.js} +4 -4
  22. package/dist/{sync-GRVO4K3U.js → sync-JVLX6TGW.js} +3 -3
  23. package/dist/{te-agent-KZRIEN4N.js → te-agent-QPZTLHPH.js} +545 -21
  24. package/dist/{te-analysis-VAR4KUOK.js → te-analysis-WWX3Z6RP.js} +352 -52
  25. package/dist/te-audience-UXGHUVBB.js +599 -0
  26. package/dist/{te-common-WNCZB7R7.js → te-common-7XXH73MF.js} +5 -4
  27. package/dist/{te-community-JEEFXPB3.js → te-community-QKE67HR2.js} +5 -4
  28. package/dist/te-dataops-6W7NNYST.js +1841 -0
  29. package/dist/{te-engage-4XHCTS6I.js → te-engage-NCFAQFX3.js} +5 -4
  30. package/dist/{te-kb-B62KFP2A.js → te-kb-K5BQYUCM.js} +50 -26
  31. package/dist/{te-meta-EPZGQN56.js → te-meta-LJZBOSMO.js} +48 -24
  32. package/dist/{te-team-YY24VORI.js → te-team-DHK5R7MV.js} +5 -6
  33. package/package.json +3 -2
  34. package/skills/ae-agent/SKILL.md +103 -4
  35. package/skills/ae-analysis/SKILL.md +75 -21
  36. package/skills/ae-analysis/references/build_attribution_analysis_qp.md +62 -0
  37. package/skills/ae-analysis/references/build_cluster_definition.md +62 -0
  38. package/skills/ae-analysis/references/build_distribution_analysis_qp.md +67 -0
  39. package/skills/ae-analysis/references/build_event_analysis_qp.md +2 -0
  40. package/skills/ae-analysis/references/build_funnel_analysis_qp.md +2 -0
  41. package/skills/ae-analysis/references/build_heat_map_analysis_qp.md +54 -0
  42. package/skills/ae-analysis/references/build_interval_analysis_qp.md +60 -0
  43. package/skills/ae-analysis/references/build_path_analysis_qp.md +53 -0
  44. package/skills/ae-analysis/references/build_prop_analysis_qp.md +2 -0
  45. package/skills/ae-analysis/references/build_rank_list_analysis_qp.md +63 -0
  46. package/skills/ae-analysis/references/build_retention_analysis_qp.md +2 -0
  47. package/skills/ae-analysis/references/build_tag_definition.md +65 -0
  48. package/skills/ae-analysis/references/cancel_query.md +2 -3
  49. package/skills/ae-analysis/references/copy_dashboard.md +33 -0
  50. package/skills/ae-analysis/references/create_id_cluster.md +40 -0
  51. package/skills/ae-analysis/references/create_id_tag.md +39 -0
  52. package/skills/ae-analysis/references/delete_alert.md +27 -0
  53. package/skills/ae-analysis/references/delete_cluster.md +27 -0
  54. package/skills/ae-analysis/references/delete_dashboard.md +30 -0
  55. package/skills/ae-analysis/references/delete_metric.md +27 -0
  56. package/skills/ae-analysis/references/delete_report.md +27 -0
  57. package/skills/ae-analysis/references/delete_tag.md +27 -0
  58. package/skills/ae-analysis/references/drilldown_user_events.md +4 -4
  59. package/skills/ae-analysis/references/drilldown_users.md +3 -3
  60. package/skills/ae-analysis/references/freeze_dashboards.md +29 -0
  61. package/skills/ae-analysis/references/get_table_columns.md +11 -12
  62. package/skills/ae-analysis/references/list_cluster_members.md +4 -4
  63. package/skills/ae-analysis/references/list_clusters.md +5 -3
  64. package/skills/ae-analysis/references/list_dashboards.md +3 -3
  65. package/skills/ae-analysis/references/list_entities.md +1 -1
  66. package/skills/ae-analysis/references/list_events.md +7 -4
  67. package/skills/ae-analysis/references/list_metrics.md +5 -3
  68. package/skills/ae-analysis/references/list_properties.md +6 -4
  69. package/skills/ae-analysis/references/list_reports.md +3 -3
  70. package/skills/ae-analysis/references/list_spaces.md +27 -0
  71. package/skills/ae-analysis/references/list_tag_members.md +4 -4
  72. package/skills/ae-analysis/references/list_tags.md +4 -2
  73. package/skills/ae-analysis/references/move_dashboard.md +33 -0
  74. package/skills/ae-analysis/references/query_adhoc.md +2 -2
  75. package/skills/ae-analysis/references/query_bi_panel_data.md +2 -2
  76. package/skills/ae-analysis/references/query_dashboard_report_data.md +4 -4
  77. package/skills/ae-analysis/references/query_entity_details.md +4 -4
  78. package/skills/ae-analysis/references/query_event_details.md +3 -3
  79. package/skills/ae-analysis/references/query_report_data.md +37 -3
  80. package/skills/ae-analysis/references/update_id_cluster.md +36 -0
  81. package/skills/ae-analysis/references/update_id_tag.md +37 -0
  82. package/skills/ae-analysis/references/update_report.md +35 -0
  83. package/skills/ae-analysis-intent/SKILL.md +1 -1
  84. package/skills/ae-dataops/SKILL.md +54 -522
  85. package/skills/ae-dataops/references/dataops-flow-create.md +78 -75
  86. package/skills/ae-dataops/references/dataops-flow-monitor.md +58 -51
  87. package/skills/ae-dataops/references/dataops-integration.md +80 -41
  88. package/skills/ae-dataops/references/dataops-query.md +54 -53
  89. package/skills/ae-dataops/references/dataops-table.md +28 -59
  90. package/skills/ae-generate-tracking-code/SKILL.md +68 -31
  91. package/skills/ae-generate-tracking-code/references/snippet-delivery.md +26 -1
  92. package/skills/ae-generate-tracking-code/references/te-api.md +47 -164
  93. package/skills/ae-generate-tracking-plan/SKILL.md +109 -32
  94. package/skills/ae-generate-tracking-plan/references/te-api.md +57 -27
  95. package/skills/ae-metadata/SKILL.md +90 -0
  96. package/skills/ae-metadata/references/metadata_data_table_csv_delete.md +15 -0
  97. package/skills/ae-metadata/references/metadata_data_table_csv_write.md +29 -0
  98. package/skills/ae-metadata/references/metadata_data_table_download.md +17 -0
  99. package/skills/ae-metadata/references/metadata_data_table_get.md +24 -0
  100. package/skills/ae-metadata/references/metadata_data_table_list.md +27 -0
  101. package/skills/ae-metadata/references/metadata_data_table_property_bindings_update.md +17 -0
  102. package/skills/ae-metadata/references/metadata_data_table_sql_delete.md +15 -0
  103. package/skills/ae-metadata/references/metadata_data_table_sql_write.md +31 -0
  104. package/skills/ae-metadata/references/metadata_event_get.md +52 -0
  105. package/skills/ae-metadata/references/metadata_input_file_upload.md +29 -0
  106. package/skills/ae-metadata/references/metadata_property_dimension_table_bind_existing.md +27 -0
  107. package/skills/ae-metadata/references/metadata_property_dimension_table_create_and_bind_csv.md +30 -0
  108. package/skills/ae-metadata/references/metadata_property_get.md +54 -0
  109. package/dist/te-audience-KMKYI2YJ.js +0 -400
  110. package/dist/te-dataops-GD3XBYCS.js +0 -1830
@@ -17,17 +17,19 @@ AE CLI (`ae-cli`) is the command-line tool for the AE / TE / ThinkingEngine anal
17
17
 
18
18
  Global parameters:
19
19
 
20
- | Parameter | Description |
21
- |---|---|
22
- | `--format <json\|table>` | Output format. Default is JSON. |
23
- | `--jq <expr>` | jq filter expression for JSON output. |
24
- | `--host <url>` | Override the active AE host. Available on every command and may be placed after the subcommand, e.g. `ae-cli analysis +list_dashboards --host <url>`. |
20
+ | Parameter | Description |
21
+ | ------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
22
+ | `--format <json\|table>` | Output format. Default is JSON. |
23
+ | `--jq <expr>` | jq filter expression for JSON output. |
24
+ | `--host <url>` | Override the active AE host. Available on every command and may be placed after the subcommand, e.g. `ae-cli analysis +list_dashboards --host <url>`. |
25
25
 
26
26
  Output and errors:
27
+
27
28
  - Successful commands return machine-readable JSON by default.
28
29
  - Failed commands return `{ "ok": false, "error": { "type": "...", "message": "...", "hint": "..." } }` and exit non-zero.
29
30
 
30
31
  Safety constraints:
32
+
31
33
  - Read commands can execute directly after required IDs and references are verified.
32
34
  - Write commands require explicit user intent and normally keep the confirmation prompt.
33
35
  - Never invent command names, flags, JSON payloads, `project_id`, resource IDs, field names, event names, property names, metric definitions, or date formats. For builder-supported ad-hoc models (`event`, `retention`, `funnel`, `prop_analysis`), do not pre-discover metadata; pass the user's event/property/metric wording to the matching QP builder and let the builder resolve metadata or return clarification. For non-builder/manual workflows, read the matching command reference and discover real project metadata first.
@@ -39,10 +41,10 @@ Use `ae-analysis` for all AE analysis-side work below:
39
41
 
40
42
  - Domain `analysis`: alerts, reports/dashboards, ad-hoc model analysis, drilldown, entity/event details, schema helpers.
41
43
  - Domain `analysis_audience`: clusters/tags and definition schemas.
42
- - Domain `analysis_meta`: metadata governance, metrics, virtual metadata, project config, tracking plans, mark times, entity catalog.
44
+ - Domain `analysis_meta`: metadata governance, metrics, virtual metadata, project config, tracking plans, mark times, entity catalog (MCP). For **single** super-event / super-property **detail** on the capability gateway, switch to **`ae-metadata`** skill (`metadata event get`, `metadata property get`).
43
45
  - Domain `analysis_common`: project listing and post-write resource links.
44
46
 
45
- If user intent is Engage/DataOps/Community, switch to `ae-engage` / `ae-dataops` / `ae-community`.
47
+ If user intent is Engage/DataOps/Community/metadata gateway detail, switch to `ae-engage` / `ae-dataops` / `ae-community` / **`ae-metadata`**.
46
48
 
47
49
  ## Command Format
48
50
 
@@ -52,6 +54,7 @@ If user intent is Engage/DataOps/Community, switch to `ae-engage` / `ae-dataops`
52
54
  - `ae-cli analysis_common +<tool_name> [options]`
53
55
 
54
56
  Conventions:
57
+
55
58
  - CLI flags use underscores, e.g. `--project_id`.
56
59
  - MCP params map automatically to camelCase.
57
60
  - JSON args pass as JSON string literals.
@@ -62,6 +65,7 @@ Conventions:
62
65
  ### A. PROJECT_ID_GATE
63
66
 
64
67
  For any command requiring `project_id`:
68
+
65
69
  1. If the same continuous conversation already has a verified project context (`project_id`, project name when known, and host/environment), reuse it directly for follow-up commands.
66
70
  2. Call `analysis_common +list_projects` only when no verified project context exists, the user provides a new project ID/name, the user switches host/environment, the user asks to list projects, or the current project is ambiguous.
67
71
  3. Verify any new user-provided ID or name against returned projects before using it.
@@ -73,6 +77,7 @@ For any command requiring `project_id`:
73
77
  ### B. Write-operation Post-link Completion
74
78
 
75
79
  When these writes succeed and `resource_id` is extractable, call `analysis_common +get_resource_url` and append link output:
80
+
76
81
  - `dashboard`: `+create_dashboard`, `+update_dashboard`
77
82
  - `report`: `+create_report`
78
83
  - `metric`: `+create_metric`, `+update_metric`
@@ -84,6 +89,7 @@ When these writes succeed and `resource_id` is extractable, call `analysis_commo
84
89
  - `super_event` / `super_prop_event` / `super_prop_user`: `+batch_create_metadata`, `+batch_edit_metadata`
85
90
 
86
91
  Closed-loop check (must be explicit in result):
92
+
87
93
  - Write result
88
94
  - `resource_id` checked
89
95
  - `+get_resource_url` called or skipped (no ID)
@@ -102,6 +108,7 @@ For list commands with `--query` parameter (list_reports, list_dashboards, list_
102
108
  5. **Never proceed** with operations on non-existent resources
103
109
 
104
110
  **Example workflow:**
111
+
105
112
  - User asks: "Find active user report"
106
113
  - Attempt 1: `--query "active user"` → no results
107
114
  - Attempt 2: `--query "active"` → no results
@@ -121,18 +128,21 @@ Before executing ad-hoc queries (`query_adhoc`), MUST check for existing reports
121
128
  5. **If not found** - For QP builder-supported models (`event`, `retention`, `funnel`, `prop_analysis`), call the matching builder first and then call `query_adhoc` with builder `qp`; do not call schema or metadata tools between the report/dashboard miss and the builder. For all other `query_adhoc` models, use the legacy schema/metadata path.
122
129
 
123
130
  **Rationale:**
131
+
124
132
  - **Performance**: Existing reports are pre-computed and faster
125
133
  - **Consistency**: Reports have business-defined metrics and calibrated logic
126
134
  - **Resource efficiency**: Avoid redundant computation
127
135
  - **Permissions**: Users may have report access but not ad-hoc query permissions
128
136
 
129
137
  **Example:**
138
+
130
139
  - User: "Query active users in last 7 days"
131
140
  - Step 1: `list_reports --query "active user"` → found "DAU Active Users Report"
132
141
  - Step 2: `query_report_data --report_id <id>` → return data
133
142
  - ❌ WRONG: Directly use `query_adhoc` without checking existing reports
134
143
 
135
144
  **Exceptions (when ad-hoc is acceptable):**
145
+
136
146
  - User explicitly requests "ad-hoc query" or "ad-hoc analysis"
137
147
  - User wants custom filters/groupings not available in existing reports
138
148
  - User is exploring data for new insights (exploratory analysis)
@@ -150,6 +160,7 @@ For these four model types, QP builder is mandatory before `query_adhoc`. Do not
150
160
  4. `prop_analysis` -> `+build_prop_analysis_qp`
151
161
 
152
162
  Builder-supported model routing is:
163
+
153
164
  1. Search existing reports/dashboards if `QUERY_EXISTING_FIRST` applies.
154
165
  2. If no existing asset is used, read the matching builder reference.
155
166
  3. Call the matching builder with complete required parameters.
@@ -157,23 +168,34 @@ Builder-supported model routing is:
157
168
 
158
169
  Do not insert metadata/schema calls between steps 2 and 3 for builder-supported models. Specifically, do not call `get_analysis_query_schema`, `list_events`, `list_properties`, `list_metrics`, `get_metric`, or `get_report_definition` to prepare the builder payload. The builder resolves event/property/metric metadata internally and returns `need_clarification` when it cannot.
159
170
 
171
+ Authenticated asset scope:
172
+
173
+ - Use `--authenticated_only true` on metadata list commands (`+list_events`, `+list_properties`, `+list_metrics`, `+list_clusters`, `+list_tags`) when the user explicitly asks to see only authenticated assets.
174
+ - Use `--authenticated_only true` on QP builders and cluster/tag definition builders when the generated QP/definition should resolve only authenticated assets.
175
+ - Do not pass `authenticated_only` or `authenticatedOnly` to `+query_adhoc`; the filter takes effect during metadata resolution and QP/definition construction, not query execution.
176
+ - List responses include `authenticationStatus` by default (`1` authenticated, `0` unauthenticated).
177
+
160
178
  Event metric shortcut:
179
+
161
180
  - If the user asks to query a saved/business metric through event analysis, pass the metric name/display name/remark directly as an event metric target: `--metrics '[{"event":"<metric name>"}]'`.
162
181
  - Do not call `analysis_meta +list_metrics` or `analysis_meta +get_metric` first just to expand the metric definition.
163
182
  - If the user provides an explicit formula, pass the formula and dependencies to `+build_event_analysis_qp`; do not convert it by reading schema or metric metadata first.
164
183
 
165
184
  Metric result vs metric metadata:
185
+
166
186
  - "Query metric result/value/trend over a time range" is an ad-hoc analysis request. Use report/dashboard search first when applicable, then builder -> `query_adhoc`.
167
187
  - "Inspect/search/update/create metric definition" is metadata/governance. Only then use `analysis_meta +list_metrics`, `+get_metric`, `+create_metric`, or `+update_metric`.
168
188
 
169
189
  For all other `query_adhoc` model types (`distribution`, `attribution`, `heat_map`, `interval`, `path`, `rank_list`, `sql`), QP builder is not supported. Use the legacy path: read `query_adhoc.md`, fetch schema/metadata as required, then construct QP manually according to the relevant schema.
170
190
 
171
191
  Execution rule:
192
+
172
193
  - If builder result `status=generated`, call `+query_adhoc` with the same `model_type` and the returned `qp`.
173
194
  - If builder returns non-generated status (`need_clarification`, `invalid_argument`, `unsupported_feature`, `validation_error`), stop and ask the user for clarification instead of calling `query_adhoc`.
174
195
  - Never bypass a failed builder by manually assembling QP for `event`, `retention`, `funnel`, or `prop_analysis`.
175
196
 
176
197
  Builder payload rules:
198
+
177
199
  - Before composing any builder JSON, read the matching builder reference doc. The builder references contain the required JSON shape and model-specific field differences.
178
200
  - CLI flag names use snake_case, but nested JSON keys use the service DTO field names in camelCase. Correct: `startTime`, `endTime`, `relationEventPropertyName`, `eventPropertyName`. Wrong: `start_date`, `start_time`, `relation_property`, `fieldName`.
179
201
  - Builder dry-run still requires the normal required flags. Do not run builder dry-run by itself.
@@ -184,6 +206,7 @@ Builder payload rules:
184
206
  - If the user's request lacks a required business element such as time range, event, metric, funnel window, property, or relation field, stop and ask for clarification. If the request supplies a name but it may be a metadata ambiguity, call the builder and let it return candidates. Do not invent names or handcraft QP.
185
207
 
186
208
  Supported builder chain:
209
+
187
210
  1. Read the builder reference for the target model.
188
211
  2. Build structured JSON from the user's request. Use user-provided event/property/metric names as-is; do not pre-query metadata for these names.
189
212
  3. Run the matching `+build_*_analysis_qp` command.
@@ -191,6 +214,7 @@ Supported builder chain:
191
214
  5. If status is not `generated`, report the structured error or ask the user for the missing information; do not continue to `query_adhoc`.
192
215
 
193
216
  Legacy query_adhoc chain:
217
+
194
218
  1. Use only for `distribution`, `attribution`, `heat_map`, `interval`, `path`, `rank_list`, or `sql`.
195
219
  2. Read `references/query_adhoc.md` and required schema/metadata references.
196
220
  3. Build QP manually from the documented schema and verified project metadata.
@@ -205,10 +229,10 @@ Legacy query_adhoc chain:
205
229
  Base rate fallacy causes inaccurate attribution:
206
230
 
207
231
  | Dimension | Baseline | Comparison | Absolute Δ | Relative Δ | Contribution |
208
- |-----------|----------|------------|-----------|-----------|-------------|
209
- | A | 1 | 5 | +4 | +400% | **40%** |
210
- | B | 50 | 55 | +5 | +10% | **50%** |
211
- | C | 49 | 50 | +1 | +2% | **10%** |
232
+ | --------- | -------- | ---------- | ---------- | ---------- | ------------ |
233
+ | A | 1 | 5 | +4 | +400% | **40%** |
234
+ | B | 50 | 55 | +5 | +10% | **50%** |
235
+ | C | 49 | 50 | +1 | +2% | **10%** |
212
236
 
213
237
  Wrong: "Dimension A grew 400%, it is the main driver."
214
238
  Correct: "Dimension B contributed 50% of the absolute increase (+5), making it the primary driver."
@@ -231,6 +255,7 @@ contribution_pct_i = delta_dim_i / delta_total * 100%
231
255
  ##### Scenario 2: Ratio / Conversion Metrics
232
256
 
233
257
  Ratio changes come from two components:
258
+
234
259
  - **Composition effect**: changes in subgroup weight.
235
260
  - **Rate effect**: changes in each subgroup's own rate.
236
261
 
@@ -281,6 +306,7 @@ If any dimension shows a cross-effect, such as positive contribution but negativ
281
306
  #### Exceptions
282
307
 
283
308
  Skip absolute contribution decomposition when:
309
+
284
310
  - The user explicitly asks for growth-rate or percentage-change ranking only.
285
311
  - The user asks for a single dimension's trend without cross-dimension comparison.
286
312
  - A dimension baseline is zero; mark it as a new dimension separately.
@@ -289,28 +315,36 @@ Skip absolute contribution decomposition when:
289
315
 
290
316
  After outputting attribution results, verify that dimension contributions sum to approximately 100%. If the sum deviates from 100% by more than 5 percentage points, flag that some dimensions may be missing or data scoping may be inconsistent.
291
317
 
292
- ## Tool Groups (79)
318
+ ## Tool Groups (100)
293
319
 
294
- ### analysis (40)
320
+ ### analysis (61)
295
321
 
296
- Alerts (5):
322
+ Alerts (6):
297
323
  - `+get_alert_definition_schema` ([doc](references/get_alert_definition_schema.md))
298
324
  - `+list_alerts` ([doc](references/list_alerts.md))
299
325
  - `+get_alert` ([doc](references/get_alert.md))
300
326
  - `+create_alert` ([doc](references/create_alert.md))
301
327
  - `+update_alert` ([doc](references/update_alert.md))
328
+ - `+delete_alert` ([doc](references/delete_alert.md))
302
329
 
303
- Reports and Dashboards (17):
330
+ Reports and Dashboards (24):
304
331
  - `+create_report` ([doc](references/create_report.md))
305
332
  - `+get_report_definition` ([doc](references/get_report_definition.md))
306
333
  - `+list_reports` ([doc](references/list_reports.md))
307
334
  - `+query_report_data` ([doc](references/query_report_data.md))
335
+ - `+update_report` ([doc](references/update_report.md))
336
+ - `+delete_report` ([doc](references/delete_report.md))
308
337
  - `+create_space` ([doc](references/create_space.md))
338
+ - `+list_spaces` ([doc](references/list_spaces.md))
309
339
  - `+create_dashboard` ([doc](references/create_dashboard.md))
310
340
  - `+list_dashboards` ([doc](references/list_dashboards.md))
311
341
  - `+query_dashboard_detail` ([doc](references/query_dashboard_detail.md))
312
342
  - `+query_dashboard_report_data` ([doc](references/query_dashboard_report_data.md))
313
343
  - `+update_dashboard` ([doc](references/update_dashboard.md))
344
+ - `+delete_dashboard` ([doc](references/delete_dashboard.md))
345
+ - `+copy_dashboard` ([doc](references/copy_dashboard.md))
346
+ - `+freeze_dashboards` ([doc](references/freeze_dashboards.md))
347
+ - `+move_dashboard` ([doc](references/move_dashboard.md))
314
348
  - `+create_or_update_dashboard_note` ([doc](references/create_or_update_dashboard_note.md))
315
349
  - `+list_public_access_links` ([doc](references/list_public_access_links.md))
316
350
  - `+create_public_access_link` ([doc](references/create_public_access_link.md))
@@ -319,11 +353,17 @@ Reports and Dashboards (17):
319
353
  - `+get_bi_panel_detail` ([doc](references/get_bi_panel_detail.md))
320
354
  - `+query_bi_panel_data` ([doc](references/query_bi_panel_data.md))
321
355
 
322
- Model Analysis (11):
356
+ Model Analysis (17):
323
357
  - `+build_event_analysis_qp` ([doc](references/build_event_analysis_qp.md))
324
358
  - `+build_retention_analysis_qp` ([doc](references/build_retention_analysis_qp.md))
325
359
  - `+build_funnel_analysis_qp` ([doc](references/build_funnel_analysis_qp.md))
326
360
  - `+build_prop_analysis_qp` ([doc](references/build_prop_analysis_qp.md))
361
+ - `+build_attribution_analysis_qp` ([doc](references/build_attribution_analysis_qp.md))
362
+ - `+build_distribution_analysis_qp` ([doc](references/build_distribution_analysis_qp.md))
363
+ - `+build_heat_map_analysis_qp` ([doc](references/build_heat_map_analysis_qp.md))
364
+ - `+build_interval_analysis_qp` ([doc](references/build_interval_analysis_qp.md))
365
+ - `+build_path_analysis_qp` ([doc](references/build_path_analysis_qp.md))
366
+ - `+build_rank_list_analysis_qp` ([doc](references/build_rank_list_analysis_qp.md))
327
367
  - `+query_adhoc` ([doc](references/query_adhoc.md))
328
368
  - `+cancel_query` ([doc](references/cancel_query.md))
329
369
  - `+drilldown_users` ([doc](references/drilldown_users.md))
@@ -333,53 +373,66 @@ Model Analysis (11):
333
373
  - `+get_table_columns` ([doc](references/get_table_columns.md))
334
374
 
335
375
  Entity/Event Details (4):
376
+
336
377
  - `+query_entity_details` ([doc](references/query_entity_details.md))
337
378
  - `+query_event_details` ([doc](references/query_event_details.md))
338
379
  - `+build_entity_details_sql` ([doc](references/build_entity_details_sql.md))
339
380
  - `+build_event_details_sql` ([doc](references/build_event_details_sql.md))
340
381
 
341
382
  Schema (3):
383
+
342
384
  - `+get_analysis_query_schema` ([doc](references/get_analysis_query_schema.md))
343
385
  - `+get_filter_schema` ([doc](references/get_filter_schema.md))
344
386
  - `+get_groupby_schema` ([doc](references/get_groupby_schema.md))
345
387
 
346
- ### analysis_audience (14)
388
+ ### analysis_audience (22)
347
389
 
348
- Clusters (6):
390
+ Clusters (10):
349
391
  - `+create_cluster` ([doc](references/create_cluster.md))
350
392
  - `+get_clusters_by_name` ([doc](references/get_clusters_by_name.md))
351
393
  - `+list_cluster_members` ([doc](references/list_cluster_members.md))
352
394
  - `+list_clusters` ([doc](references/list_clusters.md))
353
395
  - `+update_cluster` ([doc](references/update_cluster.md))
354
396
  - `+refresh_cluster` ([doc](references/refresh_cluster.md))
397
+ - `+create_id_cluster` ([doc](references/create_id_cluster.md))
398
+ - `+update_id_cluster` ([doc](references/update_id_cluster.md))
399
+ - `+delete_cluster` ([doc](references/delete_cluster.md))
400
+ - `+build_cluster_definition` ([doc](references/build_cluster_definition.md))
355
401
 
356
- Tags (6):
402
+ Tags (10):
357
403
  - `+create_tag` ([doc](references/create_tag.md))
358
404
  - `+get_tags_by_name` ([doc](references/get_tags_by_name.md))
359
405
  - `+list_tag_members` ([doc](references/list_tag_members.md))
360
406
  - `+list_tags` ([doc](references/list_tags.md))
361
407
  - `+update_tag` ([doc](references/update_tag.md))
362
408
  - `+refresh_tag` ([doc](references/refresh_tag.md))
409
+ - `+create_id_tag` ([doc](references/create_id_tag.md))
410
+ - `+update_id_tag` ([doc](references/update_id_tag.md))
411
+ - `+delete_tag` ([doc](references/delete_tag.md))
412
+ - `+build_tag_definition` ([doc](references/build_tag_definition.md))
363
413
 
364
414
  Schema Definitions (2):
415
+
365
416
  - `+get_cluster_definition_schema` ([doc](references/get_cluster_definition_schema.md))
366
417
  - `+get_tag_definition_schema` ([doc](references/get_tag_definition_schema.md))
367
418
 
368
- ### analysis_meta (23)
419
+ ### analysis_meta (24)
369
420
 
370
- Metadata and Governance (10):
421
+ Metadata and Governance (11):
371
422
  - `+list_events` ([doc](references/list_events.md))
372
423
  - `+list_properties` ([doc](references/list_properties.md))
373
424
  - `+list_metrics` ([doc](references/list_metrics.md))
374
425
  - `+get_metric` ([doc](references/get_metric.md))
375
426
  - `+create_metric` ([doc](references/create_metric.md))
376
427
  - `+update_metric` ([doc](references/update_metric.md))
428
+ - `+delete_metric` ([doc](references/delete_metric.md))
377
429
  - `+batch_edit_metadata` ([doc](references/batch_edit_metadata.md))
378
430
  - `+batch_create_metadata` ([doc](references/batch_create_metadata.md))
379
431
  - `+create_virtual_event` ([doc](references/create_virtual_event.md))
380
432
  - `+create_virtual_property` ([doc](references/create_virtual_property.md))
381
433
 
382
434
  Project and Tracking (11):
435
+
383
436
  - `+get_project_config` ([doc](references/get_project_config.md))
384
437
  - `+list_project_users` ([doc](references/list_project_users.md))
385
438
  - `+get_track_program` ([doc](references/get_track_program.md))
@@ -393,6 +446,7 @@ Project and Tracking (11):
393
446
  - `+delete_project_mark_times` ([doc](references/delete_project_mark_times.md))
394
447
 
395
448
  Entity Catalog (2):
449
+
396
450
  - `+create_entity` ([doc](references/create_entity.md))
397
451
  - `+list_entities` ([doc](references/list_entities.md))
398
452
 
@@ -0,0 +1,62 @@
1
+ # analysis +build_attribution_analysis_qp (Build Attribution Analysis QP)
2
+
3
+ > **Prerequisite:** Follow the Global AE CLI Rules in [`../SKILL.md`](../SKILL.md).
4
+
5
+ Domain: **Model Analysis**
6
+
7
+ ## Use Cases
8
+ - Build a validated attribution-analysis QP from structured attribution intent.
9
+ - Attribution analysis assigns conversion credit to touchpoint events that preceded a target conversion event.
10
+ - Use in the mandatory builder flow before `+query_adhoc --model_type attribution`.
11
+ - This command builds QP only and does not execute the analysis query.
12
+
13
+ ## JSON Rules
14
+ - CLI flags use snake_case, but JSON object keys use camelCase.
15
+ - `--attribution` is a JSON object. Required fields: `targetEvent`, `targetAggregation`, `attributionEvents` (array), `attributionModel`, `window`.
16
+ - `attributionModel` values: `first`=First Touch, `last`=Last Touch, `linear`=Equal credit.
17
+ - `window.unit`: day / hour / minute. `window.value`: 0=same day.
18
+ - Wrap JSON in single quotes in shell commands.
19
+
20
+ ## Command Syntax
21
+ ```bash
22
+ ae-cli analysis +build_attribution_analysis_qp --project_id <project_id> --time_range '<time_range_json>' --attribution '<attribution_json>'
23
+ ```
24
+
25
+ ## Parameters
26
+ | Parameter | Required | Description |
27
+ |---|---|---|
28
+ | `--project_id` / `-p` | Yes | Project ID |
29
+ | `--authenticated_only` | No | Resolve only authenticated assets while building the QP. Do not pass this flag to `+query_adhoc`. |
30
+ | `--time_range` | Yes | Time range JSON |
31
+ | `--attribution` | Yes | Attribution intent JSON |
32
+
33
+ ## JSON Shape
34
+ `--attribution` object:
35
+ ```json
36
+ {
37
+ "targetEvent": "purchase",
38
+ "targetAggregation": "A101",
39
+ "attributionEvents": [{"event": "click_ad"}, {"event": "view_product"}],
40
+ "attributionModel": "last",
41
+ "window": {"value": 7, "unit": "day"}
42
+ }
43
+ ```
44
+
45
+ Optional fields in `--attribution`:
46
+ - `targetProperty`: required when targetAggregation is property-based (A103/A104/A106/A107/A108 etc.)
47
+ - `directConversion`: include direct conversions without touchpoints. Defaults to true.
48
+ - `filters`: global filters array
49
+ - `relation`: filter relation (and / or)
50
+
51
+ ## Examples
52
+ ```bash
53
+ ae-cli analysis +build_attribution_analysis_qp --project_id 3137 --time_range '{"mode":"previous","unit":"day","value":30}' --attribution '{"targetEvent":"purchase","targetAggregation":"A101","attributionEvents":[{"event":"click_ad"}],"attributionModel":"last","window":{"value":7,"unit":"day"}}'
54
+ ```
55
+
56
+ ## Decision Rules
57
+ - Use `--authenticated_only true` only when the user explicitly wants authenticated assets; do not add this flag to `+query_adhoc`.
58
+ - After successful build (`status=generated`), call `+query_adhoc --model_type attribution --qp '<response.qp>'`.
59
+ - If non-generated status, stop and ask user to clarify.
60
+
61
+ ## Recommended Chain
62
+ - `+build_attribution_analysis_qp` -> if `status=generated` -> `+query_adhoc --model_type attribution --qp '<response.qp>'`
@@ -0,0 +1,62 @@
1
+ # analysis_audience +build_cluster_definition (Build Cluster Definition)
2
+
3
+ > **Prerequisite:** Follow the Global AE CLI Rules in [`../SKILL.md`](../SKILL.md).
4
+
5
+ Domain: **Cluster Management**
6
+
7
+ ## Use Cases
8
+
9
+ - Build a cluster definition JSON from structured intent. Call this before `+create_cluster` or `+update_cluster` to generate the `definition` field.
10
+ - For type=condition, event and property names are resolved from project metadata — do not guess.
11
+ - For type=sql, pass the SQL string directly.
12
+ - On success, pass the returned definition to `+create_cluster` or `+update_cluster`.
13
+
14
+ ## Required Prerequisites (MUST)
15
+
16
+ - Before calling this command, you must first read and follow these reference docs:
17
+ - [`./get_cluster_definition_schema.md`](./get_cluster_definition_schema.md)
18
+ - [`./list_events.md`](./list_events.md)
19
+ - [`./list_properties.md`](./list_properties.md)
20
+ - Do not construct `--conditions` / `--include_filter` / `--exclude_filter` until the schema has been read and metadata has been verified for the same `project_id`.
21
+
22
+ ## Commands
23
+
24
+ ```bash
25
+ ae-cli analysis_audience +build_cluster_definition --project_id <project_id> --type condition --conditions '{}'
26
+ ae-cli analysis_audience +build_cluster_definition --project_id <project_id> --type condition --conditions '{}' --include_filter '{}' --exclude_filter '{}'
27
+ ae-cli analysis_audience +build_cluster_definition --project_id <project_id> --type sql --sql 'SELECT "#user_id" FROM ...'
28
+ ae-cli analysis_audience +build_cluster_definition --dry-run
29
+ ```
30
+
31
+ ## Parameters
32
+
33
+ | Parameter | Required | Description |
34
+ | --------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------- |
35
+ | `--project_id` / `-p` | Yes | Project ID |
36
+ | `--authenticated_only` | No | Resolve only authenticated assets while building the definition. |
37
+ | `--type` | Yes | Cluster type. Supported values: `condition`, `sql` |
38
+ | `--conditions` | No | For type=condition: main condition group JSON (required when type=condition). See `+get_cluster_definition_schema` for the structure. |
39
+ | `--include_filter` | No | For type=condition: global include condition group JSON. |
40
+ | `--exclude_filter` | No | For type=condition: global exclude condition group JSON. |
41
+ | `--sql` | No | For type=sql: SQL query returning a single column named `#user_id`. |
42
+
43
+ ## Decision Rules
44
+ - Use `--authenticated_only true` when the definition should only resolve authenticated events/properties/metrics/clusters/tags.
45
+
46
+ - Determine `--type` first, then pass the corresponding parameters.
47
+ - For type=condition, `--conditions` is effectively required; `--include_filter` and `--exclude_filter` are optional global filters.
48
+ - For type=sql, only `--sql` is needed; condition-related parameters are ignored.
49
+ - Event and property names in condition JSON must come from session-verified metadata (`analysis_meta +list_events` / `+list_properties` for the same `project_id`).
50
+ - Do not guess event or property names — always verify against real metadata first.
51
+ - Wrap JSON parameters in single quotes (e.g. `--conditions '{}'`) to avoid shell escaping issues.
52
+ - Run `--dry-run` first to inspect the request mapping before making the actual call.
53
+
54
+ ## Next Step on Failure
55
+
56
+ - If required parameters are missing, check that `--project_id` and `--type` are provided.
57
+ - If the returned definition is rejected by `+create_cluster` or `+update_cluster`, re-read `+get_cluster_definition_schema` with `--response_mode examples` and verify metadata names again.
58
+
59
+ ## Recommended Chain
60
+
61
+ - `+get_cluster_definition_schema` → (first build/update in session or refresh) `analysis_meta +list_events` → `analysis_meta +list_properties` → `+build_cluster_definition` → `+create_cluster`
62
+ - `+get_cluster_definition_schema` → (first build/update in session or refresh) `analysis_meta +list_events` → `analysis_meta +list_properties` → `+build_cluster_definition` → `+update_cluster`
@@ -0,0 +1,67 @@
1
+ # analysis +build_distribution_analysis_qp (Build Distribution Analysis QP)
2
+
3
+ > **Prerequisite:** Follow the Global AE CLI Rules in [`../SKILL.md`](../SKILL.md).
4
+
5
+ Domain: **Model Analysis**
6
+
7
+ ## Use Cases
8
+ - Build a validated distribution-analysis QP from structured distribution metrics.
9
+ - Distribution analysis shows how a metric value is distributed across users or events.
10
+ - Use in the mandatory builder flow before `+query_adhoc --model_type distribution`.
11
+ - This command builds QP only and does not execute the analysis query.
12
+
13
+ ## JSON Rules
14
+ - CLI flags use snake_case, but JSON object keys use camelCase.
15
+ - `--distribution_metrics` is a JSON array. Each item requires `event` and `aggregation`.
16
+ - Distribution-specific aggregations: `A200`=count, `A201`=active-days, `A202`=active-hours.
17
+ - Standard aggregations requiring `property`: A103=sum, A104=avg, A106=max, A107=min, A117=median, A119=percentile.
18
+ - Wrap JSON in single quotes in shell commands.
19
+
20
+ ## Command Syntax
21
+ ```bash
22
+ ae-cli analysis +build_distribution_analysis_qp --project_id <project_id> --time_range '<time_range_json>' --distribution_metrics '<metrics_json>'
23
+ ae-cli analysis +build_distribution_analysis_qp --project_id <project_id> --time_range '<time_range_json>' --distribution_metrics '<metrics_json>' --time_particle_size day --groups '<groups_json>' --filters '<filters_json>' --relation and
24
+ ```
25
+
26
+ ## Parameters
27
+ | Parameter | Required | Description |
28
+ |---|---|---|
29
+ | `--project_id` / `-p` | Yes | Project ID |
30
+ | `--authenticated_only` | No | Resolve only authenticated assets while building the QP. Do not pass this flag to `+query_adhoc`. |
31
+ | `--time_range` | Yes | Time range JSON |
32
+ | `--distribution_metrics` | Yes | Distribution metrics JSON array |
33
+ | `--time_particle_size` | No | Time granularity. Allowed values: day, week, month, total. Defaults to day. |
34
+ | `--groups` | No | Optional group-by dimensions JSON array |
35
+ | `--filters` | No | Optional global filters JSON array |
36
+ | `--relation` | No | Filter relation. Supported values: and, or. Default: and. |
37
+
38
+ ## JSON Shape
39
+ `--distribution_metrics` array:
40
+ ```json
41
+ [{"event":"login","aggregation":"A200"}]
42
+ ```
43
+
44
+ Each metric item fields:
45
+ - `event` (required): event name
46
+ - `aggregation` (required): aggregation code
47
+ - `property` (optional): required for property-based aggregations
48
+ - `percentile` (optional): percentile value, e.g. 90 for P90. Required when aggregation=A119.
49
+ - `intervalType` (optional): def (auto, default) / user_defined (custom) / discrete (raw value)
50
+ - `quotaIntervalArr` (optional): custom bucket boundaries, e.g. [100,1000,10000]. Required when intervalType=user_defined.
51
+ - `filters` (optional): metric-level filters
52
+ - `relation` (optional): filter relation for metric-level filters
53
+
54
+ ## Examples
55
+ ```bash
56
+ ae-cli analysis +build_distribution_analysis_qp --project_id 3137 --time_range '{"mode":"previous","unit":"day","value":7}' --distribution_metrics '[{"event":"login","aggregation":"A200"}]'
57
+
58
+ ae-cli analysis +build_distribution_analysis_qp --project_id 3137 --time_range '{"mode":"previous","unit":"day","value":7}' --distribution_metrics '[{"event":"purchase","aggregation":"A103","property":"amount"}]'
59
+ ```
60
+
61
+ ## Decision Rules
62
+ - Use `--authenticated_only true` only when the user explicitly wants authenticated assets; do not add this flag to `+query_adhoc`.
63
+ - After successful build (`status=generated`), call `+query_adhoc --model_type distribution --qp '<response.qp>'`.
64
+ - If non-generated status, stop and ask user to clarify.
65
+
66
+ ## Recommended Chain
67
+ - `+build_distribution_analysis_qp` -> if `status=generated` -> `+query_adhoc --model_type distribution --qp '<response.qp>'`
@@ -33,6 +33,7 @@ ae-cli analysis +build_event_analysis_qp --project_id <project_id> --time_range
33
33
  | Parameter | Required | Description |
34
34
  |---|---|---|
35
35
  | `--project_id` / `-p` | Yes | Project ID |
36
+ | `--authenticated_only` | No | Resolve only authenticated assets while building the QP. Do not pass this flag to `+query_adhoc`. |
36
37
  | `--time_range` | Yes | Event analysis time range JSON |
37
38
  | `--metrics` | Yes | Event metrics JSON array |
38
39
  | `--time_particle_size` | No | Time granularity. Default: total |
@@ -122,6 +123,7 @@ ae-cli analysis +build_event_analysis_qp --project_id 3137 --time_range '{"mode"
122
123
  ```
123
124
 
124
125
  ## Decision Rules
126
+ - Use `--authenticated_only true` only when the user explicitly wants authenticated assets; do not add this flag to `+query_adhoc`.
125
127
  - After successful build, call `+query_adhoc --model_type event --qp '<response.qp>'`.
126
128
  - If build returns non-generated status, stop and ask user to clarify; do not call `+query_adhoc`.
127
129
  - Wrap JSON parameters in single quotes to avoid shell escaping issues.
@@ -33,6 +33,7 @@ ae-cli analysis +build_funnel_analysis_qp --project_id <project_id> --time_range
33
33
  | Parameter | Required | Description |
34
34
  |---|---|---|
35
35
  | `--project_id` / `-p` | Yes | Project ID |
36
+ | `--authenticated_only` | No | Resolve only authenticated assets while building the QP. Do not pass this flag to `+query_adhoc`. |
36
37
  | `--time_range` | Yes | Funnel analysis time range JSON |
37
38
  | `--funnel` | Yes | Funnel intent JSON |
38
39
  | `--relation` | No | Top-level funnel filter relation. Supported values: and, or. Default: and |
@@ -131,6 +132,7 @@ ae-cli analysis +query_adhoc --project_id 3137 --model_type funnel --qp '<respon
131
132
  ```
132
133
 
133
134
  ## Decision Rules
135
+ - Use `--authenticated_only true` only when the user explicitly wants authenticated assets; do not add this flag to `+query_adhoc`.
134
136
  - After successful build, call `+query_adhoc --model_type funnel --qp '<response.qp>'`.
135
137
  - If build returns non-generated status, stop and ask user to clarify; do not call `+query_adhoc`.
136
138
  - Wrap JSON parameters in single quotes to avoid shell escaping issues.
@@ -0,0 +1,54 @@
1
+ # analysis +build_heat_map_analysis_qp (Build Heatmap Analysis QP)
2
+
3
+ > **Prerequisite:** Follow the Global AE CLI Rules in [`../SKILL.md`](../SKILL.md).
4
+
5
+ Domain: **Model Analysis**
6
+
7
+ ## Use Cases
8
+ - Build a validated heatmap-analysis QP from structured heatmap intent.
9
+ - Heatmap analysis visualizes user interaction intensity on a 2D coordinate plane (e.g. screen position).
10
+ - Use in the mandatory builder flow before `+query_adhoc --model_type heat_map`.
11
+ - This command builds QP only and does not execute the analysis query.
12
+
13
+ ## JSON Rules
14
+ - CLI flags use snake_case, but JSON object keys use camelCase.
15
+ - `--heat_map` is a JSON object. Required fields: `hotEvent`, `hotAggregation`, `xProp`, `yProp`.
16
+ - `xProp` and `yProp` must be numeric event properties (e.g. screen_width, screen_height, x_position, y_position).
17
+ - Wrap JSON in single quotes in shell commands.
18
+
19
+ ## Command Syntax
20
+ ```bash
21
+ ae-cli analysis +build_heat_map_analysis_qp --project_id <project_id> --time_range '<time_range_json>' --heat_map '<heat_map_json>'
22
+ ```
23
+
24
+ ## Parameters
25
+ | Parameter | Required | Description |
26
+ |---|---|---|
27
+ | `--project_id` / `-p` | Yes | Project ID |
28
+ | `--authenticated_only` | No | Resolve only authenticated assets while building the QP. Do not pass this flag to `+query_adhoc`. |
29
+ | `--time_range` | Yes | Time range JSON |
30
+ | `--heat_map` | Yes | Heatmap intent JSON |
31
+
32
+ ## JSON Shape
33
+ `--heat_map` object:
34
+ ```json
35
+ {"hotEvent":"screen_tap","hotAggregation":"A100","xProp":"x_position","yProp":"y_position"}
36
+ ```
37
+
38
+ Optional fields in `--heat_map`:
39
+ - `hotProperty`: required when hotAggregation is property-based (A103/A104 etc.)
40
+ - `filters`: event filters array
41
+ - `relation`: filter relation (and / or)
42
+
43
+ ## Examples
44
+ ```bash
45
+ ae-cli analysis +build_heat_map_analysis_qp --project_id 3137 --time_range '{"mode":"previous","unit":"day","value":7}' --heat_map '{"hotEvent":"screen_tap","hotAggregation":"A100","xProp":"x_position","yProp":"y_position"}'
46
+ ```
47
+
48
+ ## Decision Rules
49
+ - Use `--authenticated_only true` only when the user explicitly wants authenticated assets; do not add this flag to `+query_adhoc`.
50
+ - After successful build (`status=generated`), call `+query_adhoc --model_type heat_map --qp '<response.qp>'`.
51
+ - If non-generated status, stop and ask user to clarify.
52
+
53
+ ## Recommended Chain
54
+ - `+build_heat_map_analysis_qp` -> if `status=generated` -> `+query_adhoc --model_type heat_map --qp '<response.qp>'`