@thinkingai/ae-cli 6.0.18 → 6.0.20
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.
- package/README.md +7 -6
- package/README.zh.md +8 -7
- package/dist/index.js +11 -6
- package/dist/{te-agent-KZRIEN4N.js → te-agent-CYZUC4US.js} +543 -19
- package/dist/{te-analysis-VAR4KUOK.js → te-analysis-HJ22TUAA.js} +318 -40
- package/dist/te-audience-MYDE5WEH.js +590 -0
- package/dist/te-dataops-ZTS7XMXM.js +1842 -0
- package/dist/{te-kb-B62KFP2A.js → te-kb-OWM3RQRH.js} +46 -21
- package/dist/{te-meta-EPZGQN56.js → te-meta-JVO4QJBH.js} +28 -11
- package/package.json +1 -1
- package/skills/ae-agent/SKILL.md +103 -4
- package/skills/ae-analysis/SKILL.md +66 -19
- package/skills/ae-analysis/references/build_attribution_analysis_qp.md +60 -0
- package/skills/ae-analysis/references/build_cluster_definition.md +60 -0
- package/skills/ae-analysis/references/build_distribution_analysis_qp.md +65 -0
- package/skills/ae-analysis/references/build_heat_map_analysis_qp.md +52 -0
- package/skills/ae-analysis/references/build_interval_analysis_qp.md +58 -0
- package/skills/ae-analysis/references/build_path_analysis_qp.md +51 -0
- package/skills/ae-analysis/references/build_rank_list_analysis_qp.md +61 -0
- package/skills/ae-analysis/references/build_tag_definition.md +63 -0
- package/skills/ae-analysis/references/cancel_query.md +2 -3
- package/skills/ae-analysis/references/copy_dashboard.md +33 -0
- package/skills/ae-analysis/references/create_id_cluster.md +40 -0
- package/skills/ae-analysis/references/create_id_tag.md +39 -0
- package/skills/ae-analysis/references/delete_alert.md +27 -0
- package/skills/ae-analysis/references/delete_cluster.md +27 -0
- package/skills/ae-analysis/references/delete_dashboard.md +30 -0
- package/skills/ae-analysis/references/delete_metric.md +27 -0
- package/skills/ae-analysis/references/delete_report.md +27 -0
- package/skills/ae-analysis/references/delete_tag.md +27 -0
- package/skills/ae-analysis/references/drilldown_user_events.md +4 -4
- package/skills/ae-analysis/references/drilldown_users.md +3 -3
- package/skills/ae-analysis/references/freeze_dashboards.md +29 -0
- package/skills/ae-analysis/references/get_table_columns.md +11 -12
- package/skills/ae-analysis/references/list_cluster_members.md +4 -4
- package/skills/ae-analysis/references/list_clusters.md +3 -3
- package/skills/ae-analysis/references/list_dashboards.md +3 -3
- package/skills/ae-analysis/references/list_entities.md +1 -1
- package/skills/ae-analysis/references/list_events.md +3 -3
- package/skills/ae-analysis/references/list_metrics.md +2 -2
- package/skills/ae-analysis/references/list_properties.md +3 -3
- package/skills/ae-analysis/references/list_reports.md +3 -3
- package/skills/ae-analysis/references/list_spaces.md +27 -0
- package/skills/ae-analysis/references/list_tag_members.md +4 -4
- package/skills/ae-analysis/references/list_tags.md +2 -2
- package/skills/ae-analysis/references/move_dashboard.md +33 -0
- package/skills/ae-analysis/references/query_adhoc.md +2 -2
- package/skills/ae-analysis/references/query_bi_panel_data.md +2 -2
- package/skills/ae-analysis/references/query_dashboard_report_data.md +4 -4
- package/skills/ae-analysis/references/query_entity_details.md +4 -4
- package/skills/ae-analysis/references/query_event_details.md +3 -3
- package/skills/ae-analysis/references/query_report_data.md +37 -3
- package/skills/ae-analysis/references/update_id_cluster.md +36 -0
- package/skills/ae-analysis/references/update_id_tag.md +37 -0
- package/skills/ae-analysis/references/update_report.md +35 -0
- package/skills/ae-analysis-intent/SKILL.md +1 -1
- package/skills/ae-dataops/SKILL.md +54 -522
- package/skills/ae-dataops/references/dataops-flow-create.md +78 -75
- package/skills/ae-dataops/references/dataops-flow-monitor.md +58 -51
- package/skills/ae-dataops/references/dataops-integration.md +80 -41
- package/skills/ae-dataops/references/dataops-query.md +54 -53
- package/skills/ae-dataops/references/dataops-table.md +28 -59
- package/dist/te-audience-KMKYI2YJ.js +0 -400
- 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
|
|
21
|
-
|
|
22
|
-
| `--format <json\|table>` | Output format. Default is JSON.
|
|
23
|
-
| `--jq <expr>`
|
|
24
|
-
| `--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.
|
|
@@ -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.
|
|
@@ -158,22 +169,26 @@ Builder-supported model routing is:
|
|
|
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
|
|
|
160
171
|
Event metric shortcut:
|
|
172
|
+
|
|
161
173
|
- 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
174
|
- Do not call `analysis_meta +list_metrics` or `analysis_meta +get_metric` first just to expand the metric definition.
|
|
163
175
|
- 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
176
|
|
|
165
177
|
Metric result vs metric metadata:
|
|
178
|
+
|
|
166
179
|
- "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
180
|
- "Inspect/search/update/create metric definition" is metadata/governance. Only then use `analysis_meta +list_metrics`, `+get_metric`, `+create_metric`, or `+update_metric`.
|
|
168
181
|
|
|
169
182
|
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
183
|
|
|
171
184
|
Execution rule:
|
|
185
|
+
|
|
172
186
|
- If builder result `status=generated`, call `+query_adhoc` with the same `model_type` and the returned `qp`.
|
|
173
187
|
- 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
188
|
- Never bypass a failed builder by manually assembling QP for `event`, `retention`, `funnel`, or `prop_analysis`.
|
|
175
189
|
|
|
176
190
|
Builder payload rules:
|
|
191
|
+
|
|
177
192
|
- 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
193
|
- 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
194
|
- Builder dry-run still requires the normal required flags. Do not run builder dry-run by itself.
|
|
@@ -184,6 +199,7 @@ Builder payload rules:
|
|
|
184
199
|
- 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
200
|
|
|
186
201
|
Supported builder chain:
|
|
202
|
+
|
|
187
203
|
1. Read the builder reference for the target model.
|
|
188
204
|
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
205
|
3. Run the matching `+build_*_analysis_qp` command.
|
|
@@ -191,6 +207,7 @@ Supported builder chain:
|
|
|
191
207
|
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
208
|
|
|
193
209
|
Legacy query_adhoc chain:
|
|
210
|
+
|
|
194
211
|
1. Use only for `distribution`, `attribution`, `heat_map`, `interval`, `path`, `rank_list`, or `sql`.
|
|
195
212
|
2. Read `references/query_adhoc.md` and required schema/metadata references.
|
|
196
213
|
3. Build QP manually from the documented schema and verified project metadata.
|
|
@@ -205,10 +222,10 @@ Legacy query_adhoc chain:
|
|
|
205
222
|
Base rate fallacy causes inaccurate attribution:
|
|
206
223
|
|
|
207
224
|
| Dimension | Baseline | Comparison | Absolute Δ | Relative Δ | Contribution |
|
|
208
|
-
|
|
209
|
-
| A | 1 | 5 | +4
|
|
210
|
-
| B | 50 | 55 | +5
|
|
211
|
-
| C | 49 | 50 | +1
|
|
225
|
+
| --------- | -------- | ---------- | ---------- | ---------- | ------------ |
|
|
226
|
+
| A | 1 | 5 | +4 | +400% | **40%** |
|
|
227
|
+
| B | 50 | 55 | +5 | +10% | **50%** |
|
|
228
|
+
| C | 49 | 50 | +1 | +2% | **10%** |
|
|
212
229
|
|
|
213
230
|
Wrong: "Dimension A grew 400%, it is the main driver."
|
|
214
231
|
Correct: "Dimension B contributed 50% of the absolute increase (+5), making it the primary driver."
|
|
@@ -231,6 +248,7 @@ contribution_pct_i = delta_dim_i / delta_total * 100%
|
|
|
231
248
|
##### Scenario 2: Ratio / Conversion Metrics
|
|
232
249
|
|
|
233
250
|
Ratio changes come from two components:
|
|
251
|
+
|
|
234
252
|
- **Composition effect**: changes in subgroup weight.
|
|
235
253
|
- **Rate effect**: changes in each subgroup's own rate.
|
|
236
254
|
|
|
@@ -281,6 +299,7 @@ If any dimension shows a cross-effect, such as positive contribution but negativ
|
|
|
281
299
|
#### Exceptions
|
|
282
300
|
|
|
283
301
|
Skip absolute contribution decomposition when:
|
|
302
|
+
|
|
284
303
|
- The user explicitly asks for growth-rate or percentage-change ranking only.
|
|
285
304
|
- The user asks for a single dimension's trend without cross-dimension comparison.
|
|
286
305
|
- A dimension baseline is zero; mark it as a new dimension separately.
|
|
@@ -289,28 +308,36 @@ Skip absolute contribution decomposition when:
|
|
|
289
308
|
|
|
290
309
|
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
310
|
|
|
292
|
-
## Tool Groups (
|
|
311
|
+
## Tool Groups (100)
|
|
293
312
|
|
|
294
|
-
### analysis (
|
|
313
|
+
### analysis (61)
|
|
295
314
|
|
|
296
|
-
Alerts (
|
|
315
|
+
Alerts (6):
|
|
297
316
|
- `+get_alert_definition_schema` ([doc](references/get_alert_definition_schema.md))
|
|
298
317
|
- `+list_alerts` ([doc](references/list_alerts.md))
|
|
299
318
|
- `+get_alert` ([doc](references/get_alert.md))
|
|
300
319
|
- `+create_alert` ([doc](references/create_alert.md))
|
|
301
320
|
- `+update_alert` ([doc](references/update_alert.md))
|
|
321
|
+
- `+delete_alert` ([doc](references/delete_alert.md))
|
|
302
322
|
|
|
303
|
-
Reports and Dashboards (
|
|
323
|
+
Reports and Dashboards (24):
|
|
304
324
|
- `+create_report` ([doc](references/create_report.md))
|
|
305
325
|
- `+get_report_definition` ([doc](references/get_report_definition.md))
|
|
306
326
|
- `+list_reports` ([doc](references/list_reports.md))
|
|
307
327
|
- `+query_report_data` ([doc](references/query_report_data.md))
|
|
328
|
+
- `+update_report` ([doc](references/update_report.md))
|
|
329
|
+
- `+delete_report` ([doc](references/delete_report.md))
|
|
308
330
|
- `+create_space` ([doc](references/create_space.md))
|
|
331
|
+
- `+list_spaces` ([doc](references/list_spaces.md))
|
|
309
332
|
- `+create_dashboard` ([doc](references/create_dashboard.md))
|
|
310
333
|
- `+list_dashboards` ([doc](references/list_dashboards.md))
|
|
311
334
|
- `+query_dashboard_detail` ([doc](references/query_dashboard_detail.md))
|
|
312
335
|
- `+query_dashboard_report_data` ([doc](references/query_dashboard_report_data.md))
|
|
313
336
|
- `+update_dashboard` ([doc](references/update_dashboard.md))
|
|
337
|
+
- `+delete_dashboard` ([doc](references/delete_dashboard.md))
|
|
338
|
+
- `+copy_dashboard` ([doc](references/copy_dashboard.md))
|
|
339
|
+
- `+freeze_dashboards` ([doc](references/freeze_dashboards.md))
|
|
340
|
+
- `+move_dashboard` ([doc](references/move_dashboard.md))
|
|
314
341
|
- `+create_or_update_dashboard_note` ([doc](references/create_or_update_dashboard_note.md))
|
|
315
342
|
- `+list_public_access_links` ([doc](references/list_public_access_links.md))
|
|
316
343
|
- `+create_public_access_link` ([doc](references/create_public_access_link.md))
|
|
@@ -319,11 +346,17 @@ Reports and Dashboards (17):
|
|
|
319
346
|
- `+get_bi_panel_detail` ([doc](references/get_bi_panel_detail.md))
|
|
320
347
|
- `+query_bi_panel_data` ([doc](references/query_bi_panel_data.md))
|
|
321
348
|
|
|
322
|
-
Model Analysis (
|
|
349
|
+
Model Analysis (17):
|
|
323
350
|
- `+build_event_analysis_qp` ([doc](references/build_event_analysis_qp.md))
|
|
324
351
|
- `+build_retention_analysis_qp` ([doc](references/build_retention_analysis_qp.md))
|
|
325
352
|
- `+build_funnel_analysis_qp` ([doc](references/build_funnel_analysis_qp.md))
|
|
326
353
|
- `+build_prop_analysis_qp` ([doc](references/build_prop_analysis_qp.md))
|
|
354
|
+
- `+build_attribution_analysis_qp` ([doc](references/build_attribution_analysis_qp.md))
|
|
355
|
+
- `+build_distribution_analysis_qp` ([doc](references/build_distribution_analysis_qp.md))
|
|
356
|
+
- `+build_heat_map_analysis_qp` ([doc](references/build_heat_map_analysis_qp.md))
|
|
357
|
+
- `+build_interval_analysis_qp` ([doc](references/build_interval_analysis_qp.md))
|
|
358
|
+
- `+build_path_analysis_qp` ([doc](references/build_path_analysis_qp.md))
|
|
359
|
+
- `+build_rank_list_analysis_qp` ([doc](references/build_rank_list_analysis_qp.md))
|
|
327
360
|
- `+query_adhoc` ([doc](references/query_adhoc.md))
|
|
328
361
|
- `+cancel_query` ([doc](references/cancel_query.md))
|
|
329
362
|
- `+drilldown_users` ([doc](references/drilldown_users.md))
|
|
@@ -333,53 +366,66 @@ Model Analysis (11):
|
|
|
333
366
|
- `+get_table_columns` ([doc](references/get_table_columns.md))
|
|
334
367
|
|
|
335
368
|
Entity/Event Details (4):
|
|
369
|
+
|
|
336
370
|
- `+query_entity_details` ([doc](references/query_entity_details.md))
|
|
337
371
|
- `+query_event_details` ([doc](references/query_event_details.md))
|
|
338
372
|
- `+build_entity_details_sql` ([doc](references/build_entity_details_sql.md))
|
|
339
373
|
- `+build_event_details_sql` ([doc](references/build_event_details_sql.md))
|
|
340
374
|
|
|
341
375
|
Schema (3):
|
|
376
|
+
|
|
342
377
|
- `+get_analysis_query_schema` ([doc](references/get_analysis_query_schema.md))
|
|
343
378
|
- `+get_filter_schema` ([doc](references/get_filter_schema.md))
|
|
344
379
|
- `+get_groupby_schema` ([doc](references/get_groupby_schema.md))
|
|
345
380
|
|
|
346
|
-
### analysis_audience (
|
|
381
|
+
### analysis_audience (22)
|
|
347
382
|
|
|
348
|
-
Clusters (
|
|
383
|
+
Clusters (10):
|
|
349
384
|
- `+create_cluster` ([doc](references/create_cluster.md))
|
|
350
385
|
- `+get_clusters_by_name` ([doc](references/get_clusters_by_name.md))
|
|
351
386
|
- `+list_cluster_members` ([doc](references/list_cluster_members.md))
|
|
352
387
|
- `+list_clusters` ([doc](references/list_clusters.md))
|
|
353
388
|
- `+update_cluster` ([doc](references/update_cluster.md))
|
|
354
389
|
- `+refresh_cluster` ([doc](references/refresh_cluster.md))
|
|
390
|
+
- `+create_id_cluster` ([doc](references/create_id_cluster.md))
|
|
391
|
+
- `+update_id_cluster` ([doc](references/update_id_cluster.md))
|
|
392
|
+
- `+delete_cluster` ([doc](references/delete_cluster.md))
|
|
393
|
+
- `+build_cluster_definition` ([doc](references/build_cluster_definition.md))
|
|
355
394
|
|
|
356
|
-
Tags (
|
|
395
|
+
Tags (10):
|
|
357
396
|
- `+create_tag` ([doc](references/create_tag.md))
|
|
358
397
|
- `+get_tags_by_name` ([doc](references/get_tags_by_name.md))
|
|
359
398
|
- `+list_tag_members` ([doc](references/list_tag_members.md))
|
|
360
399
|
- `+list_tags` ([doc](references/list_tags.md))
|
|
361
400
|
- `+update_tag` ([doc](references/update_tag.md))
|
|
362
401
|
- `+refresh_tag` ([doc](references/refresh_tag.md))
|
|
402
|
+
- `+create_id_tag` ([doc](references/create_id_tag.md))
|
|
403
|
+
- `+update_id_tag` ([doc](references/update_id_tag.md))
|
|
404
|
+
- `+delete_tag` ([doc](references/delete_tag.md))
|
|
405
|
+
- `+build_tag_definition` ([doc](references/build_tag_definition.md))
|
|
363
406
|
|
|
364
407
|
Schema Definitions (2):
|
|
408
|
+
|
|
365
409
|
- `+get_cluster_definition_schema` ([doc](references/get_cluster_definition_schema.md))
|
|
366
410
|
- `+get_tag_definition_schema` ([doc](references/get_tag_definition_schema.md))
|
|
367
411
|
|
|
368
|
-
### analysis_meta (
|
|
412
|
+
### analysis_meta (24)
|
|
369
413
|
|
|
370
|
-
Metadata and Governance (
|
|
414
|
+
Metadata and Governance (11):
|
|
371
415
|
- `+list_events` ([doc](references/list_events.md))
|
|
372
416
|
- `+list_properties` ([doc](references/list_properties.md))
|
|
373
417
|
- `+list_metrics` ([doc](references/list_metrics.md))
|
|
374
418
|
- `+get_metric` ([doc](references/get_metric.md))
|
|
375
419
|
- `+create_metric` ([doc](references/create_metric.md))
|
|
376
420
|
- `+update_metric` ([doc](references/update_metric.md))
|
|
421
|
+
- `+delete_metric` ([doc](references/delete_metric.md))
|
|
377
422
|
- `+batch_edit_metadata` ([doc](references/batch_edit_metadata.md))
|
|
378
423
|
- `+batch_create_metadata` ([doc](references/batch_create_metadata.md))
|
|
379
424
|
- `+create_virtual_event` ([doc](references/create_virtual_event.md))
|
|
380
425
|
- `+create_virtual_property` ([doc](references/create_virtual_property.md))
|
|
381
426
|
|
|
382
427
|
Project and Tracking (11):
|
|
428
|
+
|
|
383
429
|
- `+get_project_config` ([doc](references/get_project_config.md))
|
|
384
430
|
- `+list_project_users` ([doc](references/list_project_users.md))
|
|
385
431
|
- `+get_track_program` ([doc](references/get_track_program.md))
|
|
@@ -393,6 +439,7 @@ Project and Tracking (11):
|
|
|
393
439
|
- `+delete_project_mark_times` ([doc](references/delete_project_mark_times.md))
|
|
394
440
|
|
|
395
441
|
Entity Catalog (2):
|
|
442
|
+
|
|
396
443
|
- `+create_entity` ([doc](references/create_entity.md))
|
|
397
444
|
- `+list_entities` ([doc](references/list_entities.md))
|
|
398
445
|
|
|
@@ -0,0 +1,60 @@
|
|
|
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
|
+
| `--time_range` | Yes | Time range JSON |
|
|
30
|
+
| `--attribution` | Yes | Attribution intent JSON |
|
|
31
|
+
|
|
32
|
+
## JSON Shape
|
|
33
|
+
`--attribution` object:
|
|
34
|
+
```json
|
|
35
|
+
{
|
|
36
|
+
"targetEvent": "purchase",
|
|
37
|
+
"targetAggregation": "A101",
|
|
38
|
+
"attributionEvents": [{"event": "click_ad"}, {"event": "view_product"}],
|
|
39
|
+
"attributionModel": "last",
|
|
40
|
+
"window": {"value": 7, "unit": "day"}
|
|
41
|
+
}
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
Optional fields in `--attribution`:
|
|
45
|
+
- `targetProperty`: required when targetAggregation is property-based (A103/A104/A106/A107/A108 etc.)
|
|
46
|
+
- `directConversion`: include direct conversions without touchpoints. Defaults to true.
|
|
47
|
+
- `filters`: global filters array
|
|
48
|
+
- `relation`: filter relation (and / or)
|
|
49
|
+
|
|
50
|
+
## Examples
|
|
51
|
+
```bash
|
|
52
|
+
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"}}'
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
## Decision Rules
|
|
56
|
+
- After successful build (`status=generated`), call `+query_adhoc --model_type attribution --qp '<response.qp>'`.
|
|
57
|
+
- If non-generated status, stop and ask user to clarify.
|
|
58
|
+
|
|
59
|
+
## Recommended Chain
|
|
60
|
+
- `+build_attribution_analysis_qp` -> if `status=generated` -> `+query_adhoc --model_type attribution --qp '<response.qp>'`
|
|
@@ -0,0 +1,60 @@
|
|
|
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
|
+
| `--type` | Yes | Cluster type. Supported values: `condition`, `sql` |
|
|
37
|
+
| `--conditions` | No | For type=condition: main condition group JSON (required when type=condition). See `+get_cluster_definition_schema` for the structure. |
|
|
38
|
+
| `--include_filter` | No | For type=condition: global include condition group JSON. |
|
|
39
|
+
| `--exclude_filter` | No | For type=condition: global exclude condition group JSON. |
|
|
40
|
+
| `--sql` | No | For type=sql: SQL query returning a single column named `#user_id`. |
|
|
41
|
+
|
|
42
|
+
## Decision Rules
|
|
43
|
+
|
|
44
|
+
- Determine `--type` first, then pass the corresponding parameters.
|
|
45
|
+
- For type=condition, `--conditions` is effectively required; `--include_filter` and `--exclude_filter` are optional global filters.
|
|
46
|
+
- For type=sql, only `--sql` is needed; condition-related parameters are ignored.
|
|
47
|
+
- Event and property names in condition JSON must come from session-verified metadata (`analysis_meta +list_events` / `+list_properties` for the same `project_id`).
|
|
48
|
+
- Do not guess event or property names — always verify against real metadata first.
|
|
49
|
+
- Wrap JSON parameters in single quotes (e.g. `--conditions '{}'`) to avoid shell escaping issues.
|
|
50
|
+
- Run `--dry-run` first to inspect the request mapping before making the actual call.
|
|
51
|
+
|
|
52
|
+
## Next Step on Failure
|
|
53
|
+
|
|
54
|
+
- If required parameters are missing, check that `--project_id` and `--type` are provided.
|
|
55
|
+
- 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.
|
|
56
|
+
|
|
57
|
+
## Recommended Chain
|
|
58
|
+
|
|
59
|
+
- `+get_cluster_definition_schema` → (first build/update in session or refresh) `analysis_meta +list_events` → `analysis_meta +list_properties` → `+build_cluster_definition` → `+create_cluster`
|
|
60
|
+
- `+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,65 @@
|
|
|
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
|
+
| `--time_range` | Yes | Time range JSON |
|
|
31
|
+
| `--distribution_metrics` | Yes | Distribution metrics JSON array |
|
|
32
|
+
| `--time_particle_size` | No | Time granularity. Allowed values: day, week, month, total. Defaults to day. |
|
|
33
|
+
| `--groups` | No | Optional group-by dimensions JSON array |
|
|
34
|
+
| `--filters` | No | Optional global filters JSON array |
|
|
35
|
+
| `--relation` | No | Filter relation. Supported values: and, or. Default: and. |
|
|
36
|
+
|
|
37
|
+
## JSON Shape
|
|
38
|
+
`--distribution_metrics` array:
|
|
39
|
+
```json
|
|
40
|
+
[{"event":"login","aggregation":"A200"}]
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
Each metric item fields:
|
|
44
|
+
- `event` (required): event name
|
|
45
|
+
- `aggregation` (required): aggregation code
|
|
46
|
+
- `property` (optional): required for property-based aggregations
|
|
47
|
+
- `percentile` (optional): percentile value, e.g. 90 for P90. Required when aggregation=A119.
|
|
48
|
+
- `intervalType` (optional): def (auto, default) / user_defined (custom) / discrete (raw value)
|
|
49
|
+
- `quotaIntervalArr` (optional): custom bucket boundaries, e.g. [100,1000,10000]. Required when intervalType=user_defined.
|
|
50
|
+
- `filters` (optional): metric-level filters
|
|
51
|
+
- `relation` (optional): filter relation for metric-level filters
|
|
52
|
+
|
|
53
|
+
## Examples
|
|
54
|
+
```bash
|
|
55
|
+
ae-cli analysis +build_distribution_analysis_qp --project_id 3137 --time_range '{"mode":"previous","unit":"day","value":7}' --distribution_metrics '[{"event":"login","aggregation":"A200"}]'
|
|
56
|
+
|
|
57
|
+
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"}]'
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
## Decision Rules
|
|
61
|
+
- After successful build (`status=generated`), call `+query_adhoc --model_type distribution --qp '<response.qp>'`.
|
|
62
|
+
- If non-generated status, stop and ask user to clarify.
|
|
63
|
+
|
|
64
|
+
## Recommended Chain
|
|
65
|
+
- `+build_distribution_analysis_qp` -> if `status=generated` -> `+query_adhoc --model_type distribution --qp '<response.qp>'`
|
|
@@ -0,0 +1,52 @@
|
|
|
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
|
+
| `--time_range` | Yes | Time range JSON |
|
|
29
|
+
| `--heat_map` | Yes | Heatmap intent JSON |
|
|
30
|
+
|
|
31
|
+
## JSON Shape
|
|
32
|
+
`--heat_map` object:
|
|
33
|
+
```json
|
|
34
|
+
{"hotEvent":"screen_tap","hotAggregation":"A100","xProp":"x_position","yProp":"y_position"}
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Optional fields in `--heat_map`:
|
|
38
|
+
- `hotProperty`: required when hotAggregation is property-based (A103/A104 etc.)
|
|
39
|
+
- `filters`: event filters array
|
|
40
|
+
- `relation`: filter relation (and / or)
|
|
41
|
+
|
|
42
|
+
## Examples
|
|
43
|
+
```bash
|
|
44
|
+
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"}'
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## Decision Rules
|
|
48
|
+
- After successful build (`status=generated`), call `+query_adhoc --model_type heat_map --qp '<response.qp>'`.
|
|
49
|
+
- If non-generated status, stop and ask user to clarify.
|
|
50
|
+
|
|
51
|
+
## Recommended Chain
|
|
52
|
+
- `+build_heat_map_analysis_qp` -> if `status=generated` -> `+query_adhoc --model_type heat_map --qp '<response.qp>'`
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# analysis +build_interval_analysis_qp (Build Interval 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 interval-analysis QP from structured interval intent.
|
|
9
|
+
- Interval analysis measures the time elapsed between an initial event and a return event per user.
|
|
10
|
+
- Use in the mandatory builder flow before `+query_adhoc --model_type interval`.
|
|
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
|
+
- `--interval` is a JSON object. Required fields: `initialEvent`, `returnEvent`, `window` (`{value, unit}`).
|
|
16
|
+
- `window.unit`: second / minute / hour / day / week / month.
|
|
17
|
+
- Wrap JSON in single quotes in shell commands.
|
|
18
|
+
- Do not call `list_events` or `list_properties` before this builder for normal ad-hoc analysis.
|
|
19
|
+
|
|
20
|
+
## Command Syntax
|
|
21
|
+
```bash
|
|
22
|
+
ae-cli analysis +build_interval_analysis_qp --project_id <project_id> --time_range '<time_range_json>' --interval '<interval_json>'
|
|
23
|
+
ae-cli analysis +build_interval_analysis_qp --project_id <project_id> --time_range '<time_range_json>' --interval '<interval_json>' --relation and --time_particle_size day
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Parameters
|
|
27
|
+
| Parameter | Required | Description |
|
|
28
|
+
|---|---|---|
|
|
29
|
+
| `--project_id` / `-p` | Yes | Project ID |
|
|
30
|
+
| `--time_range` | Yes | Time range JSON |
|
|
31
|
+
| `--interval` | Yes | Interval intent JSON |
|
|
32
|
+
| `--relation` | No | Filter relation for top-level filters. Values: and, or. Default: and. |
|
|
33
|
+
| `--time_particle_size` | No | Time granularity. Allowed values: day, week, month. Defaults to day. |
|
|
34
|
+
|
|
35
|
+
## JSON Shape
|
|
36
|
+
`--interval` object:
|
|
37
|
+
```json
|
|
38
|
+
{"initialEvent":"login","returnEvent":"purchase","window":{"value":7,"unit":"day"}}
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Optional fields in `--interval`:
|
|
42
|
+
- `relationEventPropertyName`: shared relation property for both events
|
|
43
|
+
- `groups`: group-by dimensions array
|
|
44
|
+
- `filters`: global filters array
|
|
45
|
+
- `initialFilters` / `returnFilters`: event-level filters (event properties only)
|
|
46
|
+
- `initialFilterRelation` / `returnFilterRelation`: and / or
|
|
47
|
+
|
|
48
|
+
## Examples
|
|
49
|
+
```bash
|
|
50
|
+
ae-cli analysis +build_interval_analysis_qp --project_id 3137 --time_range '{"mode":"previous","unit":"day","value":7}' --interval '{"initialEvent":"login","returnEvent":"purchase","window":{"value":7,"unit":"day"}}'
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## Decision Rules
|
|
54
|
+
- After successful build (`status=generated`), call `+query_adhoc --model_type interval --qp '<response.qp>'`.
|
|
55
|
+
- If non-generated status, stop and ask user to clarify.
|
|
56
|
+
|
|
57
|
+
## Recommended Chain
|
|
58
|
+
- `+build_interval_analysis_qp` -> if `status=generated` -> `+query_adhoc --model_type interval --qp '<response.qp>'`
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# analysis +build_path_analysis_qp (Build Path 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 path-analysis QP from structured path intent.
|
|
9
|
+
- Path analysis visualizes user navigation flows between events within a session.
|
|
10
|
+
- Use in the mandatory builder flow before `+query_adhoc --model_type path`.
|
|
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
|
+
- `--path` is a JSON object. Required fields: `sourceEvent`, `eventNames` (array), `sessionInterval`, `sessionUnit`.
|
|
16
|
+
- `sessionUnit`: second / minute / hour.
|
|
17
|
+
- `sourceType`: 0=forward path (after source event, default), 1=backward path (before source event).
|
|
18
|
+
- Wrap JSON in single quotes in shell commands.
|
|
19
|
+
|
|
20
|
+
## Command Syntax
|
|
21
|
+
```bash
|
|
22
|
+
ae-cli analysis +build_path_analysis_qp --project_id <project_id> --time_range '<time_range_json>' --path '<path_json>'
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Parameters
|
|
26
|
+
| Parameter | Required | Description |
|
|
27
|
+
|---|---|---|
|
|
28
|
+
| `--project_id` / `-p` | Yes | Project ID |
|
|
29
|
+
| `--time_range` | Yes | Time range JSON |
|
|
30
|
+
| `--path` | Yes | Path intent JSON |
|
|
31
|
+
|
|
32
|
+
## JSON Shape
|
|
33
|
+
`--path` object:
|
|
34
|
+
```json
|
|
35
|
+
{"sourceEvent":"login","eventNames":["login","view_product","purchase"],"sessionInterval":30,"sessionUnit":"minute"}
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Optional fields in `--path`:
|
|
39
|
+
- `sourceType`: 0=forward (default), 1=backward
|
|
40
|
+
|
|
41
|
+
## Examples
|
|
42
|
+
```bash
|
|
43
|
+
ae-cli analysis +build_path_analysis_qp --project_id 3137 --time_range '{"mode":"previous","unit":"day","value":7}' --path '{"sourceEvent":"login","eventNames":["login","view_product","purchase"],"sessionInterval":30,"sessionUnit":"minute"}'
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## Decision Rules
|
|
47
|
+
- After successful build (`status=generated`), call `+query_adhoc --model_type path --qp '<response.qp>'`.
|
|
48
|
+
- If non-generated status, stop and ask user to clarify.
|
|
49
|
+
|
|
50
|
+
## Recommended Chain
|
|
51
|
+
- `+build_path_analysis_qp` -> if `status=generated` -> `+query_adhoc --model_type path --qp '<response.qp>'`
|