@thinkingai/ae-cli 1.0.18 → 1.0.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. package/dist/{auth-ECD46NBA.js → auth-T3ILGJKW.js} +2 -2
  2. package/dist/{auth-2UTBG5U3.js → auth-ZPA6O5KO.js} +25 -6
  3. package/dist/{chunk-7QBNU44L.js → chunk-5CCFSPAF.js} +8 -30
  4. package/dist/{chunk-LAAS6ITR.js → chunk-7G2F7IVO.js} +32 -2
  5. package/dist/{chunk-4KQ7H7DY.js → chunk-OVMQFFC2.js} +1 -1
  6. package/dist/{chunk-MR57UIKC.js → chunk-TMMUBSKW.js} +10 -0
  7. package/dist/{client-O56G2SNJ.js → client-NYAEJDQZ.js} +7 -3
  8. package/dist/{config-BU5FHGGE.js → config-QZIEYXQZ.js} +2 -2
  9. package/dist/index.js +18 -13
  10. package/dist/{raw-A3VN2B6I.js → raw-6ZPW3YII.js} +3 -3
  11. package/dist/{te-analysis-UGKESPBE.js → te-analysis-CFQBXUCO.js} +93 -7
  12. package/dist/{te-audience-THZNVHYB.js → te-audience-WPBBWADL.js} +3 -3
  13. package/dist/{te-common-QZOUME3S.js → te-common-GL3KBZPD.js} +3 -3
  14. package/dist/{te-community-AZVW3NFX.js → te-community-3XEJNSQL.js} +3 -3
  15. package/dist/{te-dataops-OE5PX2K6.js → te-dataops-H4WSMCG5.js} +3 -3
  16. package/dist/{te-engage-RYGEQTYK.js → te-engage-2VFM37ZM.js} +3 -3
  17. package/dist/te-kb-EHHYPYBN.js +407 -0
  18. package/dist/{te-meta-MGO5BCMG.js → te-meta-BO45GW32.js} +7 -7
  19. package/package.json +4 -1
  20. package/skills/ae-analysis/SKILL.md +69 -37
  21. package/skills/ae-analysis/references/build_event_analysis_qp.md +132 -0
  22. package/skills/ae-analysis/references/build_funnel_analysis_qp.md +143 -0
  23. package/skills/ae-analysis/references/build_prop_analysis_qp.md +122 -0
  24. package/skills/ae-analysis/references/build_retention_analysis_qp.md +141 -0
  25. package/skills/ae-analysis/references/get_analysis_query_schema.md +22 -11
  26. package/skills/ae-analysis/references/get_metric.md +7 -1
  27. package/skills/ae-analysis/references/get_report_definition.md +4 -0
  28. package/skills/ae-analysis/references/list_dashboards.md +2 -0
  29. package/skills/ae-analysis/references/list_events.md +4 -1
  30. package/skills/ae-analysis/references/list_metrics.md +5 -0
  31. package/skills/ae-analysis/references/list_properties.md +6 -1
  32. package/skills/ae-analysis/references/list_reports.md +2 -0
  33. package/skills/ae-analysis/references/query_adhoc.md +71 -31
  34. package/skills/ae-community/SKILL.md +14 -101
  35. package/skills/ae-dataops/SKILL.md +13 -58
  36. package/skills/ae-engage/SKILL.md +15 -98
@@ -4,6 +4,10 @@
4
4
 
5
5
  Domain: **Report Management**
6
6
 
7
+ ## Constraints
8
+
9
+ **Not a builder fallback:** Do not call `+get_report_definition` to repair or replace a failed `+build_event_analysis_qp`, `+build_retention_analysis_qp`, `+build_funnel_analysis_qp`, or `+build_prop_analysis_qp` call. For builder-supported ad-hoc analysis, builder failure means stop and ask for clarification or report the structured error.
10
+
7
11
  ## Use Cases
8
12
  - Get the definition details of a single report. Returns model type, event configuration, display configuration, and other definition data without executing a data query.
9
13
  - Get the definition details of a single report.
@@ -8,6 +8,8 @@ Domain: **Dashboard management**
8
8
 
9
9
  **Fuzzy Search Fallback:** If `--query` returns no results, retry with broader keywords (max 3 attempts), then fall back to full list. See [SKILL.md § C. FUZZY_SEARCH_FALLBACK](../SKILL.md#c-fuzzy_search_fallback).
10
10
 
11
+ **Builder failure is terminal:** For builder-supported ad-hoc analysis, this command may be used only in the initial `QUERY_EXISTING_FIRST` dashboard search. Do not call dashboard/report detail tools as a fallback after a QP builder returns non-generated status.
12
+
11
13
  ## Use Cases
12
14
  - List dashboard metadata accessible to the current user in the project. Supports keyword filtering and returns dashboard IDs, names, descriptions, and related metadata, but not dashboard configuration or report data.
13
15
  - List dashboard metadata accessible to the current user in the project.
@@ -8,9 +8,11 @@ Domain: **Metadata Query**
8
8
 
9
9
  **Fuzzy Search Fallback:** If `--query` returns no results, retry with broader keywords (max 3 attempts), then fall back to full list. See [SKILL.md § C. FUZZY_SEARCH_FALLBACK](../SKILL.md#c-fuzzy_search_fallback).
10
10
 
11
+ **Not a builder pre-step:** Do not call `+list_events` before builder-supported ad-hoc analysis (`event`, `retention`, `funnel`, `prop_analysis`). The matching QP builder resolves event names internally. If the builder returns MCP failure, stop and ask for clarification instead of using this command as a fallback.
12
+
11
13
  ## Use Cases
12
14
  - Read-only query for SYSTEM METADATA already effective in the project. Use for super events in production metadata. Do NOT use for tracking-plan metadata (bury/track program); that belongs to BuryProgramTool.
13
- - Read-only query for SYSTEM METADATA already effective in the project.
15
+ - Read-only query for SYSTEM METADATA already effective in the project. Use when the user explicitly asks to inspect event metadata, not as a required preparation step for QP builder.
14
16
 
15
17
  ## Commands
16
18
  ```bash
@@ -30,6 +32,7 @@ ae-cli analysis_meta +list_events --dry-run
30
32
  | `--offset` / `-o` | No | Optional page offset. Default: 0. |
31
33
  ## Decision Rules
32
34
  - For the first run, pass only the required parameter (`--project_id`) to confirm the path works, then add optional parameters.
35
+ - For builder-supported ad-hoc analysis, pass the user's event wording to the builder instead of pre-querying event metadata.
33
36
  - For cross-project troubleshooting, first confirm whether `--project_id` matches the current permissions and target environment.
34
37
 
35
38
  ## Next Steps After Failure
@@ -8,10 +8,13 @@ Domain: **Metadata Query**
8
8
 
9
9
  **Fuzzy Search Fallback:** If `--query` returns no results, retry with broader keywords (max 3 attempts), then fall back to full list. See [SKILL.md § C. FUZZY_SEARCH_FALLBACK](../SKILL.md#c-fuzzy_search_fallback).
10
10
 
11
+ **Not a builder pre-step:** Do not call `+list_metrics` before `+build_event_analysis_qp`, `+build_retention_analysis_qp`, `+build_funnel_analysis_qp`, or `+build_prop_analysis_qp` for normal ad-hoc analysis. Event builder resolves saved metric names internally when the metric name is passed in `metrics[].event`. If the builder fails, stop and ask for clarification instead of using this command as a fallback.
12
+
11
13
  ## Use Cases
12
14
  - List metric metadata in the project. Supports keyword filtering and returns metric IDs, names, display names, model types, remarks, and related metadata, but not metric calculation results.
13
15
  - Supports pagination with fields/limit/offset for payload governance.
14
16
  - Query performs fuzzy matching on metricName, metricDesc, and metricRemark.
17
+ - Use this command for metric metadata management, metric editing, auditing, or when the user explicitly asks to inspect/search metric metadata. Do not use it merely to prepare a builder-supported ad-hoc query.
15
18
 
16
19
  ## Command
17
20
  ```bash
@@ -34,6 +37,7 @@ ae-cli analysis_meta +list_metrics --dry-run
34
37
  - First run should only pass the required parameter (`--project_id`), and add optional parameters only after the path is confirmed to work.
35
38
  - For pagination, use `--limit` and `--offset` together. Default limit is 20.
36
39
  - Use `--fields` to select specific columns for lighter response payloads.
40
+ - For builder-supported ad-hoc analysis, do not search metrics here first. Pass the user-provided metric name directly to the builder.
37
41
  - For cross-project troubleshooting, first confirm whether `--project_id` matches the current permissions and target environment.
38
42
 
39
43
  ## Next Steps After Failure
@@ -43,3 +47,4 @@ ae-cli analysis_meta +list_metrics --dry-run
43
47
 
44
48
  ## Recommended Chaining
45
49
  - +list_metrics -> +create_metric -> +get_metric
50
+ - For ad-hoc event metric query: +build_event_analysis_qp -> +query_adhoc
@@ -4,9 +4,13 @@
4
4
 
5
5
  Domain: **Metadata Query**
6
6
 
7
+ ## Constraints
8
+
9
+ **Not a builder pre-step:** Do not call `+list_properties` before builder-supported ad-hoc analysis (`event`, `retention`, `funnel`, `prop_analysis`). The matching QP builder resolves property names internally. If the builder returns MCP failure, stop and ask for clarification instead of using this command as a fallback.
10
+
7
11
  ## Use Cases
8
12
  - Read-only query for SYSTEM METADATA properties already effective in the project. Supports event/user scope. Do NOT use for tracking-plan metadata (bury/track program); that belongs to BuryProgramTool.
9
- - Read-only query for SYSTEM METADATA properties already effective in the project.
13
+ - Read-only query for SYSTEM METADATA properties already effective in the project. Use when the user explicitly asks to inspect property metadata, not as a required preparation step for QP builder.
10
14
 
11
15
  ## Commands
12
16
  ```bash
@@ -30,6 +34,7 @@ ae-cli analysis_meta +list_properties --dry-run
30
34
 
31
35
  ## Decision Rules
32
36
  - For the first run, pass only the required parameter (`--project_id`) to confirm the path works, then add optional parameters.
37
+ - For builder-supported ad-hoc analysis, pass the user's property wording to the builder instead of pre-querying property metadata.
33
38
  - For cross-project troubleshooting, first confirm whether `--project_id` matches the current permissions and target environment.
34
39
 
35
40
  ## Next Steps After Failure
@@ -8,6 +8,8 @@ Domain: **Report management**
8
8
 
9
9
  **Fuzzy Search Fallback:** If `--query` returns no results, retry with broader keywords (max 3 attempts), then fall back to full list. See [SKILL.md § C. FUZZY_SEARCH_FALLBACK](../SKILL.md#c-fuzzy_search_fallback).
10
10
 
11
+ **Builder failure is terminal:** For builder-supported ad-hoc analysis, this command may be used only in the initial `QUERY_EXISTING_FIRST` report search. Do not call `+list_reports` or `+get_report_definition` as a fallback after a QP builder returns non-generated status.
12
+
11
13
  ## Use Cases
12
14
  - List report metadata accessible to the current user in the project. Supports keyword filtering and returns report IDs, names, model types, update times, and related metadata, but not report definitions or analysis data.
13
15
  - List report metadata accessible to the current user in the project.
@@ -8,15 +8,33 @@ Domain: **Model analysis**
8
8
 
9
9
  **⚠️ QUERY_EXISTING_FIRST:** Before using ad-hoc query, you MUST first check for existing reports/dashboards with `list_reports` and `list_dashboards`. Only use `query_adhoc` if no matching reports found. See [SKILL.md § D. QUERY_EXISTING_FIRST](../SKILL.md#d-query_existing_first).
10
10
 
11
+ **⚠️ QP_BUILDER_SUPPORTED_MODELS_ONLY:** QP builder supports exactly four ad-hoc model types: `event`, `retention`, `funnel`, and `prop_analysis`.
12
+
13
+ For these four model types, call the matching builder before `query_adhoc`. Do not handcraft QP from `get_analysis_query_schema`, examples, or prior knowledge.
14
+
15
+ For all other model types (`distribution`, `attribution`, `heat_map`, `interval`, `path`, `rank_list`, `sql`), QP builder is not supported. Use the legacy schema/metadata path and construct QP manually according to the model schema.
16
+
17
+ For builder-supported models, schema/metadata tools are not builder pre-steps. After report/dashboard lookup misses, do not call `get_analysis_query_schema`, `list_events`, `list_properties`, `list_metrics`, `get_metric`, or `get_report_definition` before the builder. The builder resolves event/property/metric metadata internally.
18
+
19
+ **Hard stop rule:** If builder status is not `generated`, stop and ask the user to clarify or report the builder error. Do not call `query_adhoc`, `get_analysis_query_schema`, or manually assemble QP for `event`, `retention`, `funnel`, or `prop_analysis`.
20
+
21
+ Builder mapping:
22
+ 1. `event` -> `+build_event_analysis_qp`
23
+ 2. `retention` -> `+build_retention_analysis_qp`
24
+ 3. `funnel` -> `+build_funnel_analysis_qp`
25
+ 4. `prop_analysis` -> `+build_prop_analysis_qp`
26
+
11
27
  **Quick check workflow:**
12
28
  1. `list_reports --query <keyword>` - search matching reports
13
29
  2. `list_dashboards --query <keyword>` - search matching dashboards
14
30
  3. If found → use `query_report_data` or `query_dashboard_report_data`
15
- 4. If not found → only then use `query_adhoc`
31
+ 4. If not found and model is builder-supported (`event`/`retention`/`funnel`/`prop_analysis`) → read matching builder reference, call matching builder, then call `query_adhoc` with `model_type` + built `qp`; do not insert schema or metadata lookup before the builder
32
+ 5. If not found and model is not builder-supported (`distribution`/`attribution`/`heat_map`/`interval`/`path`/`rank_list`/`sql`) → use the legacy schema/metadata path, then call `query_adhoc`
16
33
 
17
34
  ## Use Cases
18
- - Precondition helper: call `+get_analysis_query_schema` to get the structure before using this tool.
19
- - When constructing a real `qp`, you must supplement it with real project metadata; first call `analysis_meta +list_events` and `analysis_meta +list_properties`.
35
+ - Execute a QP produced by the required chain for the target model.
36
+ - Builder-supported models (`event`, `retention`, `funnel`, `prop_analysis`): execute the `qp` returned by builder tools.
37
+ - Non-builder models (`distribution`, `attribution`, `heat_map`, `interval`, `path`, `rank_list`, `sql`): execute handcrafted QP from the legacy schema/metadata path when needed.
20
38
  - Event analysis: metrics such as event trigger counts, user counts, sums, averages, and more.
21
39
  - Retention analysis: metrics such as user churn and retention.
22
40
  - Funnel analysis: metrics such as multi-step conversion.
@@ -28,27 +46,41 @@ Domain: **Model analysis**
28
46
  - Heat map: visual heat map analysis of user interactions.
29
47
  - Rank list: ranking / leaderboard analysis.
30
48
  - SQL: custom SQL analysis.
31
- - Process: fetch events/properties and the schema first, then assemble the query JSON, and finally execute the analysis.
32
-
33
- ## Mandatory prerequisites (MUST)
34
- - Before constructing `--qp`, you must first read and follow these reference documents:
35
- - [`./get_analysis_query_schema.md`](./get_analysis_query_schema.md)
36
- - [`./list_events.md`](./list_events.md)
37
- - [`./list_properties.md`](./list_properties.md)
38
- - Do not generate the final `qp` until the documentation review and prerequisite command calls are complete.
39
-
40
- ## Prerequisite call chain (required for constructing qp)
41
- 1. First determine `--model_type`.
42
- 2. Read `get_analysis_query_schema.md`, then call `ae-cli analysis +get_analysis_query_schema --model_type <model_type>` to get the structure.
43
- 3. Read `list_events.md`, then call `ae-cli analysis_meta +list_events --project_id <project_id>` to get the available events.
44
- 4. Read `list_properties.md`, then call `ae-cli analysis_meta +list_properties --project_id <project_id>` to get the available properties.
45
- 5. Build `qp` from the schema + metadata, then call `+query_adhoc`.
46
-
47
- ## Command
49
+ - Process:
50
+ - Builder-supported models: builder -> `query_adhoc`
51
+ - Non-builder models: metadata/schema lookup -> handcraft `qp` -> `query_adhoc`
52
+
53
+ ## Builder-Supported Model Chain
54
+ Use this chain only for `event`, `retention`, `funnel`, and `prop_analysis`.
55
+
56
+ 1. Read the matching builder reference:
57
+ - `event`: [`build_event_analysis_qp.md`](./build_event_analysis_qp.md)
58
+ - `retention`: [`build_retention_analysis_qp.md`](./build_retention_analysis_qp.md)
59
+ - `funnel`: [`build_funnel_analysis_qp.md`](./build_funnel_analysis_qp.md)
60
+ - `prop_analysis`: [`build_prop_analysis_qp.md`](./build_prop_analysis_qp.md)
61
+ 2. Compose the builder JSON using the documented DTO keys. Nested JSON keys are camelCase, not snake_case.
62
+ 3. Run the builder with all required flags. `--dry-run` is allowed only with complete required builder inputs, not by itself.
63
+ 4. If builder returns `status=generated`, copy `data.qp` from the builder response and pass it as `--qp`.
64
+ 5. If the builder returns `need_clarification`, `invalid_argument`, `unsupported_feature`, or `validation_error`, stop and ask for clarification. Do not use the legacy/manual path as a fallback for these four models.
65
+
66
+ ## Legacy Query Chain
67
+ Use this chain only for `distribution`, `attribution`, `heat_map`, `interval`, `path`, `rank_list`, and `sql`.
68
+
69
+ 1. Read this reference and the required schema/metadata references.
70
+ 2. Call `+get_analysis_query_schema` for the target model when the QP shape is not already verified.
71
+ 3. Discover real events/properties/metrics with analysis metadata commands as needed.
72
+ 4. Construct QP according to the documented schema and verified metadata.
73
+ 5. Call `+query_adhoc`.
74
+
75
+ Timezone rule:
76
+ - Builder commands do not accept `zone_offset`.
77
+ - Apply timezone only on this execution command, for example `--zone_offset -11`.
78
+
79
+ ## Command Syntax
48
80
  ```bash
49
- ae-cli analysis +query_adhoc --project_id <project_id> --model_type event --qp '{}'
50
- ae-cli analysis +query_adhoc --project_id <project_id> --model_type event --qp '{}' --fields '["date","event"]' --limit 10 --offset 0 --zone_offset 8 --request_id demo --use_cache true --is_sort_by_columns true --resolve_recent_day true --timeout_minutes 8
51
- ae-cli analysis +query_adhoc --dry-run
81
+ ae-cli analysis +query_adhoc --project_id <project_id> --model_type <model_type> --qp '<qp_json_from_builder_or_legacy_chain>'
82
+ ae-cli analysis +query_adhoc --project_id <project_id> --model_type <model_type> --qp '<qp_json_from_builder_or_legacy_chain>' --fields '["date","event"]' --limit 10 --offset 0 --zone_offset 8 --request_id demo --use_cache true --is_sort_by_columns true --resolve_recent_day true --timeout_minutes 8
83
+ ae-cli analysis +query_adhoc --project_id <project_id> --model_type <model_type> --qp '<qp_json_from_builder_or_legacy_chain>' --dry-run
52
84
  ```
53
85
 
54
86
  ## Parameters
@@ -56,12 +88,12 @@ ae-cli analysis +query_adhoc --dry-run
56
88
  |---|---|---|
57
89
  | `--project_id` / `-p` | Yes | Project ID used to identify the analysis project |
58
90
  | `--model_type` | Yes | Model type. Supported values: event, retention, funnel, distribution, attribution, heat_map, interval, path, rank_list, prop_analysis, sql. |
59
- | `--qp` | Yes | Query parameter JSON. MUST call `+get_analysis_query_schema` first, and use event/property metadata from `analysis_meta +list_events` / `analysis_meta +list_properties` in the same `project_id`. |
91
+ | `--qp` | Yes | Query parameter JSON. For `event`/`retention`/`funnel`/`prop_analysis`, pass QP returned by the matching builder tool. For non-builder models, construct QP through the legacy schema/metadata path. |
60
92
  | `--request_id` | No | Optional unique request ID used for tracking and deduplication. Generated automatically if omitted. |
61
93
  | `--use_cache` | No | Whether to use result cache. Default: true |
62
94
  | `--zone_offset` | No | Time zone offset in hours. For example, UTC+8 is 8 and UTC-5 is -5 |
63
95
  | `--is_sort_by_columns` | No | Whether to sort query results by columns. Default: false |
64
- | `--resolve_recent_day` | No | Whether to resolve relative time expressions such as "last 7 days". Default: false |
96
+ | `--resolve_recent_day` | No | Whether to resolve relative time expressions such as "last 7 days". If omitted, service auto-resolves when `qp.eventView.recentDay` exists and `startTime`/`endTime` is incomplete; otherwise defaults to false. |
65
97
  | `--fields` | No | Optional fields to return. Must match column names in result. Invalid fields cause INVALID_FIELDS error. |
66
98
  | `--limit` | No | Optional limit. Default: 20, maximum: 50. |
67
99
  | `--offset` | No | Optional offset. Default: 0. |
@@ -69,18 +101,26 @@ ae-cli analysis +query_adhoc --dry-run
69
101
 
70
102
  ## Decision Rules
71
103
  - On the first run, start with only the required parameters (`--project_id`,`--model_type`,`--qp`), and add optional parameters after confirming the path works.
104
+ - Do not call this command with placeholder QP such as `{}`. For builder-supported models, wait for builder `status=generated`; for non-builder models, build QP from verified schema/metadata first.
105
+ - For builder-supported models, do not run metadata/schema lookup to "help" the builder. The builder is the metadata resolver.
72
106
  - For pagination, use `--limit` and `--offset` together. Default limit is 20.
73
107
  - Use `--fields` to select specific columns for lighter response payloads.
74
- - `qp` cannot be written from experience alone: it must satisfy both the schema structure and the project metadata constraints.
75
- - Before calling `list_events` / `list_properties`, you must first study the corresponding reference documents.
76
- - Wrap JSON parameters in single quotes (for example `--qp '{}'`) to avoid shell escaping issues.
108
+ - `event`, `retention`, `funnel`, and `prop_analysis` must not manually craft QP with schema-first flow; call the builder and use the returned `qp`.
109
+ - For non-builder models, `qp` must satisfy both schema structure and project metadata constraints.
110
+ - Wrap JSON parameters in single quotes (for example `--qp '<real_qp_json>'`) to avoid shell escaping issues.
77
111
  - For cross-project troubleshooting, first confirm whether `--project_id` matches the current permissions and target environment.
112
+ - If the user supplied a timezone such as UTC-11, pass `--zone_offset -11` here, not to the builder.
78
113
 
79
114
  ## Next Steps on Failure
80
- - If required parameters are missing, fall back to the smallest runnable command and fill them in first (focus on `--project_id`, `--model_type`, `--qp`).
81
- - If `Invalid JSON` appears, first check the schema required fields, then verify whether the event/property names come from metadata query results for the same `project_id`.
115
+ - If required parameters are missing, resolve `project_id`, `model_type`, and a real `qp` first. Do not run placeholder calls except explicit `--dry-run` validation.
116
+ - If a builder returns non-`generated` status for `event`, `retention`, `funnel`, or `prop_analysis`, stop and ask user to clarify before calling `query_adhoc`.
117
+ - If `Invalid JSON` appears on legacy manual QP paths, first check schema required fields, then verify whether event/property names come from metadata query results for the same `project_id`.
82
118
  - If the query times out or results are abnormal, first narrow the time range / grouping dimensions, then split the subqueries to locate the issue.
83
119
 
84
120
  ## Recommended chaining
85
- - +get_analysis_query_schema -> analysis_meta +list_events -> analysis_meta +list_properties -> +query_adhoc
121
+ - +build_event_analysis_qp -> +query_adhoc
122
+ - +build_retention_analysis_qp -> +query_adhoc
123
+ - +build_funnel_analysis_qp -> +query_adhoc
124
+ - +build_prop_analysis_qp -> +query_adhoc
125
+ - +get_analysis_query_schema -> analysis_meta +list_events -> analysis_meta +list_properties -> +query_adhoc (non-builder models only)
86
126
  - +list_events -> +list_properties -> +query_adhoc -> +drilldown_users -> +drilldown_user_events
@@ -2,10 +2,6 @@
2
2
  name: ae-community
3
3
  version: 2.0.0
4
4
  description: "AE community analysis: post search, comment sentiment, topic trends, risky content, livestream data. Includes AE CLI authentication, global parameters, and safety rules (self-contained)."
5
- metadata:
6
- requires:
7
- bins: ["ae-cli"]
8
- cliHelp: "ae-cli community --help"
9
5
  ---
10
6
 
11
7
  # ae-community
@@ -24,107 +20,24 @@ The AE Community domain provides social data analysis: post/video search, commen
24
20
 
25
21
  ## Global AE CLI Rules
26
22
 
27
- AE CLI (`ae-cli`) is the command-line tool for the ThinkingEngine data analysis platform, used by AI Agents and human users. For community-side requests, prefer `ae-cli` and this skill’s reference docs over model memory.
23
+ AE CLI (`ae-cli`) is the command-line tool for the AE / TE / ThinkingEngine analysis platform. For AE analysis-side requests, prefer `ae-cli` and this skill's reference docs over model memory.
28
24
 
29
- ### Authentication
25
+ Global parameters:
30
26
 
31
- You must authenticate before use. Authentication priority:
27
+ | Parameter | Description |
28
+ |---|---|
29
+ | `--format <json\|table>` | Output format. Default is JSON. |
30
+ | `--jq <expr>` | jq filter expression for JSON output. |
32
31
 
33
- 1. Environment variable `TE_TOKEN` (highest priority, suitable for CI/scripts)
34
- 2. Cached token (`~/.ae-cli/tokens.json`, valid for 20 hours)
35
- 3. macOS automatically extracts it from Chrome (macOS only)
32
+ Output and errors:
33
+ - Successful commands return machine-readable JSON by default.
34
+ - Failed commands return `{ "ok": false, "error": { "type": "...", "message": "...", "hint": "..." } }` and exit non-zero.
36
35
 
37
- **Authentication commands**
38
-
39
- ```bash
40
- # Automatic macOS authentication (extract token from Chrome)
41
- ae-cli auth login
42
-
43
- # Manually set token
44
- ae-cli auth set-token <token>
45
-
46
- # View authentication status
47
- ae-cli auth status
48
-
49
- # Log out
50
- ae-cli auth logout
51
- ```
52
-
53
- **Multi-environment support**
54
-
55
- ```bash
56
- # Specify host
57
- ae-cli auth login --host ta-staging.example.com
58
- ae-cli auth set-token <token> --host ta-staging.example.com
59
-
60
- # Configure default host
61
- ae-cli config set defaultHost ta-staging.example.com
62
- ```
63
-
64
- ### Global parameters
65
-
66
- All commands support the following global parameters:
67
-
68
- | Parameter | Description | Default |
69
- |------|------|--------|
70
- | `--host <host>` | AE instance address | defaultHost from config or ta.thinkingdata.cn |
71
- | `--format <json\|table>` | Output format | json |
72
- | `--jq <expr>` | jq filter expression | - |
73
- | `--dry-run` | Show the request only, do not execute it | false |
74
- | `--yes` | Skip confirmation for write operations | false |
75
-
76
- ### Output format
77
-
78
- **JSON (default)**
79
-
80
- ```json
81
- {
82
- "ok": true,
83
- "data": { ... }
84
- }
85
- ```
86
-
87
- **Table**
88
-
89
- ```bash
90
- ae-cli analysis_meta +list_events --project_id <YOUR_PROJECT_ID> --format table
91
- ```
92
-
93
- **jq filtering**
94
-
95
- ```bash
96
- ae-cli analysis_meta +list_events --project_id <YOUR_PROJECT_ID> --jq '.'
97
- ```
98
-
99
- ### Error handling
100
-
101
- Error output goes to stderr, in the following format:
102
-
103
- ```json
104
- {
105
- "ok": false,
106
- "error": {
107
- "type": "auth | api | validation | config",
108
- "message": "...",
109
- "hint": "..."
110
- }
111
- }
112
- ```
113
-
114
- Exit code: success `0`, error `1`.
115
-
116
- ### Security constraints
117
-
118
- - Commands with `risk: read` execute directly
119
- - Commands with `risk: write` require confirmation unless `--yes` is passed
120
- - Use `--dry-run` to preview the request that will be sent
121
-
122
- ### Command structure
123
-
124
- ```bash
125
- ae-cli <domain> +<command> [flags]
126
- ae-cli api <METHOD> <PATH> [--params] [--data]
127
- ```
36
+ Safety constraints:
37
+ - Read commands can execute directly after required IDs and references are verified.
38
+ - Write commands require explicit user intent and normally keep the confirmation prompt.
39
+ - Never invent command names, flags, JSON payloads, `project_id`, resource IDs, field names, event names, property names, metric definitions, or date formats. Read the matching command reference and discover real project metadata first.
40
+ - **NEVER fabricate or guess resource names** (reports, dashboards, events, properties, metrics, clusters, tags, alerts). Always use list commands to discover real resources first. If a resource is not found after fuzzy search and full list fallback, explicitly tell the user "resource not found" and stop - do not proceed with fabricated names.
128
41
 
129
42
  **Community** commands use the domain `community` (this skill). Other AE domains include: `analysis` (analysis), `analysis_audience` (audience), `analysis_meta` (metadata), `analysis_common` (common), `operation` (operations).
130
43
 
@@ -2,10 +2,6 @@
2
2
  name: ae-dataops
3
3
  version: 2.0.0
4
4
  description: "AE Data Development and Operations: Data warehouse management, flow orchestration, IDE queries, data integration, operations and backfill management"
5
- metadata:
6
- requires:
7
- bins: ["ae-cli"]
8
- cliHelp: "ae-cli dataops_repo --help, ae-cli dataops_datatable --help, ae-cli dataops_flow --help, ae-cli dataops_ide --help, ae-cli dataops_integration --help, ae-cli dataops_operations --help"
9
5
  ---
10
6
 
11
7
  # ae-dataops
@@ -26,68 +22,27 @@ The AE Data Development and Operations domain provides capabilities for data war
26
22
 
27
23
  ---
28
24
 
29
- ## Global AE CLI Rules
30
-
31
- AE CLI (`ae-cli`) is the command-line tool for the AE data development and operations platform. For DataOps-side requests, prefer `ae-cli` and this skill's reference docs over model memory.
32
-
33
- Authentication priority:
34
- 1. `TE_TOKEN` environment variable.
35
- 2. Cached token in `~/.ae-cli/tokens.json`, usually valid for 20 hours.
36
- 3. macOS Chrome token extraction via `ae-cli auth login`.
37
-
38
- Useful authentication commands:
39
-
40
- ```bash
41
- ae-cli auth login
42
- ae-cli auth set-token <token>
43
- ae-cli auth status
44
- ae-cli auth logout
45
- ```
46
25
 
47
- Multi-environment support:
26
+ ## Global AE CLI Rules
48
27
 
49
- ```bash
50
- # Specify host
51
- ae-cli auth login --host ta-staging.example.com
52
- ae-cli auth set-token <token> --host ta-staging.example.com
53
-
54
- # Configure default host
55
- ae-cli config set defaultHost ta-staging.example.com
56
- ```
28
+ AE CLI (`ae-cli`) is the command-line tool for the AE / TE / ThinkingEngine analysis platform. For AE analysis-side requests, prefer `ae-cli` and this skill's reference docs over model memory.
57
29
 
58
30
  Global parameters:
59
31
 
60
- | Parameter | Description | Default |
61
- |---|---|---|
62
- | `--host <host>` | Target AE instance address | defaultHost from config or ta.thinkingdata.cn |
63
- | `--format <json|table>` | Output format | json |
64
- | `--jq <expr>` | jq filter expression for JSON output | - |
65
- | `--dry-run` | Preview the request without executing it | false |
66
- | `--yes` | Skip confirmation for write operations | false |
67
-
68
- Output format:
69
-
70
- - JSON (default): `{ "ok": true, "data": { ... } }`
71
- - Table: `ae-cli dataops_flow +list_flows --spaceCode xxx --format table`
72
- - jq filtering: `ae-cli dataops_flow +list_flows --spaceCode xxx --jq '.'`
32
+ | Parameter | Description |
33
+ |---|---|
34
+ | `--format <json\|table>` | Output format. Default is JSON. |
35
+ | `--jq <expr>` | jq filter expression for JSON output. |
73
36
 
74
- Error handling:
75
-
76
- - Failed commands return `{ "ok": false, "error": { "type": "auth|api|validation|config", "message": "...", "hint": "..." } }` to stderr.
77
- - Exit code: success `0`, error `1`.
37
+ Output and errors:
38
+ - Successful commands return machine-readable JSON by default.
39
+ - Failed commands return `{ "ok": false, "error": { "type": "...", "message": "...", "hint": "..." } }` and exit non-zero.
78
40
 
79
41
  Safety constraints:
80
-
81
- - Commands with `risk: read` execute directly.
82
- - Commands with `risk: write` require confirmation unless `--yes` is passed.
83
- - Use `--dry-run` to preview the request that will be sent.
84
-
85
- Command structure:
86
-
87
- ```bash
88
- ae-cli <domain> +<command> [flags]
89
- ae-cli api <METHOD> <PATH> [--params] [--data]
90
- ```
42
+ - Read commands can execute directly after required IDs and references are verified.
43
+ - Write commands require explicit user intent and normally keep the confirmation prompt.
44
+ - Never invent command names, flags, JSON payloads, `project_id`, resource IDs, field names, event names, property names, metric definitions, or date formats. Read the matching command reference and discover real project metadata first.
45
+ - **NEVER fabricate or guess resource names** (reports, dashboards, events, properties, metrics, clusters, tags, alerts). Always use list commands to discover real resources first. If a resource is not found after fuzzy search and full list fallback, explicitly tell the user "resource not found" and stop - do not proceed with fabricated names.
91
46
 
92
47
  Domains for DataOps: `dataops_repo`, `dataops_datatable`, `dataops_flow`, `dataops_ide`, `dataops_integration`, `dataops_operations`
93
48
 
@@ -2,115 +2,32 @@
2
2
  name: ae-engage
3
3
  version: 1.0.0
4
4
  description: "AE Engage MCP: config items, flows, channel settings, task data query, and management"
5
- metadata:
6
- requires:
7
- bins: ["ae-cli"]
8
- cliHelp: "ae-cli engage --help"
9
5
  ---
10
6
 
11
7
  # ae-engage
12
8
 
13
9
  AE CLI (`ae-cli`) is the command-line tool for the ThinkingEngine data analysis platform, used by AI Agents and human users.
14
10
 
15
- ## Authentication
11
+ ## Global AE CLI Rules
16
12
 
17
- You must authenticate before use. Authentication priority:
13
+ AE CLI (`ae-cli`) is the command-line tool for the AE / TE / ThinkingEngine analysis platform. For AE analysis-side requests, prefer `ae-cli` and this skill's reference docs over model memory.
18
14
 
19
- 1. Environment variable `TE_TOKEN` (highest priority, suitable for CI/scripts)
20
- 2. Cached token (`~/.ae-cli/tokens.json`, valid for 20 hours)
21
- 3. macOS automatically extracts it from Chrome (macOS only)
15
+ Global parameters:
22
16
 
23
- ### Authentication Commands
17
+ | Parameter | Description |
18
+ |---|---|
19
+ | `--format <json\|table>` | Output format. Default is JSON. |
20
+ | `--jq <expr>` | jq filter expression for JSON output. |
24
21
 
25
- ```bash
26
- # Automatic macOS authentication (extract token from Chrome)
27
- ae-cli auth login
28
-
29
- # Manually set token
30
- ae-cli auth set-token <token>
31
-
32
- # View authentication status
33
- ae-cli auth status
34
-
35
- # Log out
36
- ae-cli auth logout
37
- ```
38
-
39
- ### Multi-environment Support
40
-
41
- ```bash
42
- # Specify host
43
- ae-cli auth login --host ta-staging.example.com
44
- ae-cli auth set-token <token> --host ta-staging.example.com
45
-
46
- # Configure default host
47
- ae-cli config set defaultHost ta-staging.example.com
48
- ```
49
-
50
- ## Global Parameters
51
-
52
- All commands support the following global parameters:
53
-
54
- | Parameter | Description | Default |
55
- |------|------|--------|
56
- | `--host <host>` | AE instance address | defaultHost from config or ta.thinkingdata.cn |
57
- | `--format <json\|table>` | Output format | json |
58
- | `--jq <expr>` | jq filter expression | - |
59
- | `--dry-run` | Show the request only, do not execute it | false |
60
- | `--yes` | Skip confirmation for write operations | false |
61
-
62
- ## Output Format
63
-
64
- ### JSON (default)
65
-
66
- ```json
67
- {
68
- "ok": true,
69
- "data": { ... }
70
- }
71
- ```
72
-
73
- ### Table
22
+ Output and errors:
23
+ - Successful commands return machine-readable JSON by default.
24
+ - Failed commands return `{ "ok": false, "error": { "type": "...", "message": "...", "hint": "..." } }` and exit non-zero.
74
25
 
75
- ```bash
76
- ae-cli engage +channel_list --project_id <YOUR_PROJECT_ID> --format table
77
- ```
78
-
79
- ### jq Filtering
80
-
81
- ```bash
82
- ae-cli engage +channel_list --project_id <YOUR_PROJECT_ID> --jq '.'
83
- ```
84
-
85
- ## Error Handling
86
-
87
- Error output goes to stderr, in the following format:
88
-
89
- ```json
90
- {
91
- "ok": false,
92
- "error": {
93
- "type": "auth | api | validation | config",
94
- "message": "...",
95
- "hint": "..."
96
- }
97
- }
98
- ```
99
-
100
- Exit code: success `0`, error `1`.
101
-
102
- ## Security Constraints
103
-
104
- - Commands with `risk: read` execute directly
105
- - Commands with `risk: write` require confirmation unless `--yes` is passed
106
- - Use `--dry-run` to preview the request that will be sent
107
-
108
- ## Command Structure
109
-
110
- ```bash
111
- ae-cli <domain> +<command> [flags]
112
- ae-cli api <METHOD> <PATH> [--params] [--data]
113
- ```
26
+ Safety constraints:
27
+ - Read commands can execute directly after required IDs and references are verified.
28
+ - Write commands require explicit user intent and normally keep the confirmation prompt.
29
+ - Never invent command names, flags, JSON payloads, `project_id`, resource IDs, field names, event names, property names, metric definitions, or date formats. Read the matching command reference and discover real project metadata first.
30
+ - **NEVER fabricate or guess resource names** (reports, dashboards, events, properties, metrics, clusters, tags, alerts). Always use list commands to discover real resources first. If a resource is not found after fuzzy search and full list fallback, explicitly tell the user "resource not found" and stop - do not proceed with fabricated names.
114
31
 
115
32
  ## Overview
116
33