@thinkingai/ae-cli 6.0.52 → 6.0.54

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 (185) hide show
  1. package/README.md +35 -10
  2. package/README.zh.md +32 -10
  3. package/bin/ae-cli.js +6 -1
  4. package/cli-installation-guide.md +91 -0
  5. package/dist/{auth-XZNXFRJS.js → auth-MBWRZTB6.js} +171 -13
  6. package/dist/automation-NWWVLWG2.js +459 -0
  7. package/dist/{capability-RJZ4KRGP.js → capability-7SSN6PNZ.js} +11 -6
  8. package/dist/chunk-4655PUNX.js +43 -0
  9. package/dist/{chunk-4NRCTUZJ.js → chunk-5XJYLEVC.js} +4 -4
  10. package/dist/{chunk-JOCDD4ON.js → chunk-7QXISROD.js} +1 -1
  11. package/dist/{chunk-EQ255HKO.js → chunk-AP7YP2NX.js} +2 -2
  12. package/dist/{chunk-DVMLWQD4.js → chunk-CT7QDJS6.js} +2 -2
  13. package/dist/chunk-D6ACFILC.js +56 -0
  14. package/dist/{chunk-HFGZGYCG.js → chunk-EOYSKMXN.js} +264 -10
  15. package/dist/{chunk-57RRFUEZ.js → chunk-FMNNGNYO.js} +43 -8
  16. package/dist/{chunk-7XGFSUOM.js → chunk-GIK6EDUG.js} +291 -84
  17. package/dist/{chunk-WEPZ5M3Z.js → chunk-HBLK3ZHW.js} +7 -4
  18. package/dist/chunk-HVHR4SCP.js +133 -0
  19. package/dist/{chunk-DX5CDO34.js → chunk-KFNMQTZI.js} +580 -214
  20. package/dist/{chunk-HBGADCKA.js → chunk-PLE722AJ.js} +28 -11
  21. package/dist/chunk-RK6GLDGI.js +27 -0
  22. package/dist/{chunk-V2NUHPXF.js → chunk-S6M42KND.js} +1 -1
  23. package/dist/{chunk-7FTTULED.js → chunk-UQ77JXYH.js} +7 -3
  24. package/dist/{chunk-MAPZ7VB6.js → chunk-WNGFSIOB.js} +20 -1
  25. package/dist/{chunk-L2QUIZTS.js → chunk-ZIQWCZTS.js} +3 -3
  26. package/dist/{community-report-client-CU22W53K.js → community-report-client-PEERQCX2.js} +1 -1
  27. package/dist/{config-XO3LI3SA.js → config-FF6YVJKI.js} +29 -10
  28. package/dist/context-YAE3QXP3.js +136 -0
  29. package/dist/{data-integration-HNGUKFIC.js → data-integration-HESZET7E.js} +6 -6
  30. package/dist/index.js +169 -55
  31. package/dist/{local-data-upload-client-GTRIT64F.js → local-data-upload-client-TWMHFLUA.js} +1 -1
  32. package/dist/memory-62BJOULV.js +580 -0
  33. package/dist/{metadata-JAQW7KGZ.js → metadata-7CUMWIB4.js} +7 -7
  34. package/dist/{model-RNPQXIBI.js → model-SBV2JFJI.js} +9 -5
  35. package/dist/{personal-semantic-preference-QCZ2IZTK.js → personal-semantic-preference-6SRCYPGE.js} +119 -11
  36. package/dist/{project-semantic-64JURXKF.js → project-semantic-YYEM4OSU.js} +7 -7
  37. package/dist/{sync-O45NXEQY.js → sync-SU33KYX7.js} +12 -8
  38. package/dist/{te-agent-K5MSPNHJ.js → te-agent-F5QBZSQA.js} +423 -494
  39. package/dist/{te-analysis-KQKCAI5H.js → te-analysis-U4I2W2WC.js} +1090 -67
  40. package/dist/{te-community-4OYU3BDA.js → te-community-PFLDLPP4.js} +3 -3
  41. package/dist/{te-dataops-NFIPB6FX.js → te-dataops-FOQSRIAZ.js} +644 -276
  42. package/dist/{te-engage-HSVSRW22.js → te-engage-ZX76CNAB.js} +6 -6
  43. package/dist/{te-kb-3TS73NO6.js → te-kb-MHDOST62.js} +666 -244
  44. package/dist/{te-system-STMHLS5J.js → te-system-J2FQF5ER.js} +6 -6
  45. package/dist/{te-team-3I5AOX3N.js → te-team-5UOZPTU3.js} +6 -6
  46. package/dist/things-VPPXXLHB.js +1091 -0
  47. package/dist/{update-RZXLPCRH.js → update-EEUTEI6R.js} +59 -51
  48. package/dist/workspace-O3EEIYQM.js +554 -0
  49. package/package.json +30 -11
  50. package/skills/ae-agent/SKILL.md +95 -140
  51. package/skills/ae-agent/references/add-model.md +1 -1
  52. package/skills/ae-agent/references/create-agent.md +1 -1
  53. package/skills/ae-agent/references/find-archived-conversations.md +12 -5
  54. package/skills/ae-agent/references/get-agent.md +1 -1
  55. package/skills/ae-agent/references/list-agents.md +2 -2
  56. package/skills/ae-agent/references/list-models.md +2 -2
  57. package/skills/ae-agent/references/notification.md +40 -0
  58. package/skills/ae-agent/references/restore-conversation.md +3 -1
  59. package/skills/ae-analysis/SKILL.md +76 -15
  60. package/skills/ae-analysis/references/agent_review_submit_to_page.md +2 -0
  61. package/skills/ae-analysis/references/ai_models/event.md +6 -1
  62. package/skills/ae-analysis/references/ai_models/funnel.md +12 -4
  63. package/skills/ae-analysis/references/ai_models/heat_map.md +23 -0
  64. package/skills/ae-analysis/references/ai_models/interval.md +24 -0
  65. package/skills/ae-analysis/references/ai_models/path.md +20 -0
  66. package/skills/ae-analysis/references/ai_models/prop_analysis.md +2 -0
  67. package/skills/ae-analysis/references/ai_models/rank_list.md +30 -0
  68. package/skills/ae-analysis/references/ai_models/retention.md +45 -1
  69. package/skills/ae-analysis/references/ai_models/revenue.md +20 -2
  70. package/skills/ae-analysis/references/ai_models/tag.md +2 -0
  71. package/skills/ae-analysis/references/ai_models.md +96 -0
  72. package/skills/ae-analysis/references/analysis_data_retrieval.md +4 -0
  73. package/skills/ae-analysis/references/asset_batch_info_export.md +10 -0
  74. package/skills/ae-analysis/references/asset_batch_sql_export.md +13 -1
  75. package/skills/ae-analysis/references/asset_export.md +12 -1
  76. package/skills/ae-analysis/references/asset_list.md +1 -0
  77. package/skills/ae-analysis/references/asset_search.md +11 -5
  78. package/skills/ae-analysis/references/bi_panel_list.md +1 -1
  79. package/skills/ae-analysis/references/catalog_list.md +1 -1
  80. package/skills/ae-analysis/references/collaboration.md +48 -0
  81. package/skills/ae-analysis/references/command_index.md +26 -17
  82. package/skills/ae-analysis/references/dashboard_list.md +4 -4
  83. package/skills/ae-analysis/references/dashboard_move.md +21 -0
  84. package/skills/ae-analysis/references/dashboard_report_add.md +2 -0
  85. package/skills/ae-analysis/references/dashboard_report_data_export.md +2 -0
  86. package/skills/ae-analysis/references/dashboard_report_get.md +19 -0
  87. package/skills/ae-analysis/references/dashboard_report_update.md +27 -0
  88. package/skills/ae-analysis/references/dashboard_update.md +1 -1
  89. package/skills/ae-analysis/references/event_export.md +3 -1
  90. package/skills/ae-analysis/references/event_report_presentation.md +76 -0
  91. package/skills/ae-analysis/references/feedback_submit.md +37 -0
  92. package/skills/ae-analysis/references/governance_recommendation_auto_review.md +71 -0
  93. package/skills/ae-analysis/references/governance_recommendation_export.md +11 -0
  94. package/skills/ae-analysis/references/metadata_resolution.md +18 -3
  95. package/skills/ae-analysis/references/metric_export.md +3 -1
  96. package/skills/ae-analysis/references/metric_list.md +1 -1
  97. package/skills/ae-analysis/references/operation_record_export.md +10 -0
  98. package/skills/ae-analysis/references/personal_semantic_preference_add.md +2 -2
  99. package/skills/ae-analysis/references/personal_semantic_preference_get.md +6 -4
  100. package/skills/ae-analysis/references/personal_semantic_preference_list.md +5 -3
  101. package/skills/ae-analysis/references/personal_semantic_preference_review.md +9 -0
  102. package/skills/ae-analysis/references/personal_semantic_preference_review_list.md +7 -0
  103. package/skills/ae-analysis/references/personal_semantic_preference_submit.md +7 -0
  104. package/skills/ae-analysis/references/project_semantic_knowledge_wiki.md +91 -32
  105. package/skills/ae-analysis/references/project_semantic_knowledge_wiki_plan_schema.md +99 -1
  106. package/skills/ae-analysis/references/property_export.md +3 -1
  107. package/skills/ae-analysis/references/report_create.md +17 -3
  108. package/skills/ae-analysis/references/report_data_export.md +6 -0
  109. package/skills/ae-analysis/references/report_get.md +7 -1
  110. package/skills/ae-analysis/references/report_list.md +5 -5
  111. package/skills/ae-analysis/references/report_update.md +20 -3
  112. package/skills/ae-analysis/references/sql_table_columns.md +4 -4
  113. package/skills/ae-analysis/references/sql_table_list.md +5 -5
  114. package/skills/ae-analysis/references/system_query_monitor_overview.md +2 -0
  115. package/skills/ae-analysis/references/system_query_task_cancel.md +2 -0
  116. package/skills/ae-analysis/references/system_query_task_export.md +6 -2
  117. package/skills/ae-analysis/references/system_query_task_get.md +2 -0
  118. package/skills/ae-analysis/references/system_query_task_list.md +7 -3
  119. package/skills/ae-analysis/references/system_query_task_options.md +2 -2
  120. package/skills/ae-analysis/references/system_query_task_realtime_list.md +15 -0
  121. package/skills/ae-analysis/references/user_cluster_models.md +8 -0
  122. package/skills/ae-analysis/references/user_tag_create.md +7 -1
  123. package/skills/ae-analysis/references/user_tag_get.md +1 -1
  124. package/skills/ae-analysis/references/user_tag_models.md +20 -2
  125. package/skills/ae-analysis/references/user_tag_refresh.md +1 -1
  126. package/skills/ae-analysis/references/user_tag_update.md +2 -2
  127. package/skills/ae-analysis/scripts/project-semantic-knowledge-wiki/build-empty-skeleton.mjs +105 -0
  128. package/skills/ae-analysis/scripts/project-semantic-knowledge-wiki/build-project-semantic-wiki.mjs +669 -29
  129. package/skills/ae-analysis/scripts/project-semantic-knowledge-wiki/company-kb.mjs +21 -8
  130. package/skills/ae-analysis/scripts/project-semantic-knowledge-wiki/default-compile-rules.md +28 -10
  131. package/skills/ae-analysis/scripts/project-semantic-knowledge-wiki/default-compile-schema.md +66 -0
  132. package/skills/ae-analysis/scripts/project-semantic-knowledge-wiki/generate-build-ir.mjs +285 -24
  133. package/skills/ae-analysis/scripts/project-semantic-knowledge-wiki/package-wiki-source-zip.mjs +262 -30
  134. package/skills/ae-analysis/scripts/project-semantic-knowledge-wiki/plan-kb-source-sync.mjs +1 -1
  135. package/skills/ae-analysis/scripts/project-semantic-knowledge-wiki/precompiled-source.mjs +46 -2
  136. package/skills/ae-analysis/scripts/project-semantic-knowledge-wiki/prepare-compile-schema.mjs +64 -0
  137. package/skills/ae-analysis/scripts/project-semantic-knowledge-wiki/refresh-state-parts.mjs +91 -0
  138. package/skills/ae-automation/SKILL.md +16 -0
  139. package/skills/ae-automation/references/cli.md +53 -0
  140. package/skills/ae-automation/references/command_index.md +17 -0
  141. package/skills/ae-capability/SKILL.md +73 -2
  142. package/skills/ae-capability/references/collaboration.md +48 -0
  143. package/skills/ae-community/SKILL.md +5 -1
  144. package/skills/ae-community/references/collaboration.md +48 -0
  145. package/skills/ae-current-context/SKILL.md +3 -2
  146. package/skills/ae-data-integration/SKILL.md +4 -0
  147. package/skills/ae-data-integration/references/collaboration.md +48 -0
  148. package/skills/ae-dataops/SKILL.md +54 -74
  149. package/skills/ae-dataops/references/collaboration.md +48 -0
  150. package/skills/ae-dataops/references/dataops-backfill.md +23 -18
  151. package/skills/ae-dataops/references/dataops-flow-create.md +74 -23
  152. package/skills/ae-dataops/references/dataops-flow-monitor.md +45 -13
  153. package/skills/ae-dataops/references/dataops-integration.md +57 -30
  154. package/skills/ae-dataops/references/dataops-query.md +21 -4
  155. package/skills/ae-dataops/references/dataops-table.md +143 -11
  156. package/skills/ae-engage/SKILL.md +21 -6
  157. package/skills/ae-engage/references/channel-mgmt.md +3 -3
  158. package/skills/ae-engage/references/collaboration.md +48 -0
  159. package/skills/ae-engage/references/scene-config-channel.md +4 -4
  160. package/skills/ae-generate-tracking-plan/SKILL.md +4 -0
  161. package/skills/ae-generate-tracking-plan/references/collaboration.md +48 -0
  162. package/skills/ae-kb/SKILL.md +70 -12
  163. package/skills/ae-kb/references/analysis-workflow.md +73 -36
  164. package/skills/ae-kb/references/collaboration.md +48 -0
  165. package/skills/ae-kb/references/query-workflow.md +67 -33
  166. package/skills/ae-kb/references/schema-import.md +32 -0
  167. package/skills/ae-kb/references/source-mutations.md +6 -4
  168. package/skills/ae-kb/references/text-sources.md +53 -0
  169. package/skills/ae-kb-discovery/SKILL.md +8 -3
  170. package/skills/ae-kb-discovery/references/collaboration.md +48 -0
  171. package/skills/ae-metadata/SKILL.md +20 -12
  172. package/skills/ae-metadata/references/collaboration.md +48 -0
  173. package/skills/ae-team/SKILL.md +23 -17
  174. package/skills/ae-things/SKILL.md +85 -0
  175. package/skills/ae-things/references/cli.md +103 -0
  176. package/skills/ae-things-progress/SKILL.md +43 -0
  177. package/skills/ae-things-review/SKILL.md +42 -0
  178. package/skills/ae-workspace/SKILL.md +43 -0
  179. package/skills/ae-workspace/references/commands.md +51 -0
  180. package/dist/chunk-E2JKXMVO.js +0 -29
  181. package/dist/context-IFJI3LIT.js +0 -46
  182. package/dist/memory-QGPSNCQS.js +0 -892
  183. package/skills/ae-agent/references/create-automation.md +0 -125
  184. package/skills/ae-agent/references/list-automations.md +0 -56
  185. package/skills/ae-agent/references/update-automation.md +0 -107
@@ -1,33 +1,59 @@
1
1
  ---
2
2
  name: ae-analysis
3
- version: 4.2.20
4
- description: "Use ae-cli for AE analysis-side data questions, asset operations, and asset governance: reports, analysis boards, BI dashboards, ad-hoc models, drilldown, detail data, alerts, clusters, tags, metrics, metadata, project configuration, tracking plans, governance asset lists/rules/lineage/impact/dependency, batch asset operations, projects, and resource links. Use when the user asks to query data, explain a change, export evidence, inspect/create/update/govern analysis assets, recommend project assets for certification/authentication, review asset-certification recommendations, review metric recommendations, or build/update/refresh/sync a project semantic knowledge base from a governed asset package."
3
+ version: 4.2.31
4
+ description: "Use ae-cli for AE analysis-side data questions, asset operations, and asset governance: reports, analysis boards, BI dashboards, ad-hoc models, drilldown, detail data, alerts, clusters, tags, metrics, metadata discovery, project configuration, tracking plans, local input-file upload, governance asset lists/rules/lineage/impact/dependency, batch asset operations, projects, and resource links. Use when the user asks to query data, explain a change, export evidence, inspect/create/update/govern analysis assets, recommend project assets for certification/authentication, review asset-certification recommendations, review metric recommendations, or build/update/refresh/sync a project semantic knowledge base from a governed asset package."
5
5
  ---
6
6
 
7
7
  # ae-analysis
8
8
 
9
9
  This is the single entry skill for analysis intent and command execution.
10
10
 
11
+ ## Capability contract
12
+
13
+ - Responsibilities: analysis queries and assets, metadata discovery, audience definitions, local input-file upload, and the governance/project/tracking workflows described below.
14
+ - Inputs: verified project context and the requested measures, time windows, filters or operation-specific resources; upload also needs a local file and a discovered purpose.
15
+ - Outputs: query evidence with its scope, verified metadata, operation/resource identifiers, uploaded input-file identifiers, or asynchronous run/artifact status as applicable. Query rows are not automatically a persisted audience.
16
+ - Boundaries: engagement operations and metadata data-table writes/dimension binding are outside this skill's workflows; find the capability needed for any remaining work.
17
+ - Completion: the requested analysis-side result is verified, or pending/blocked work is identified. Keep any other parts of the user's request unfinished until addressed.
18
+
19
+ ## Cross-skill collaboration
20
+
21
+ When remaining work is outside this skill's scope, or a necessary prerequisite needs another capability, follow [the collaboration protocol](references/collaboration.md). Choose from the skills available in this run by capability, preserve verified context, and continue the remaining task. Reuse this protocol if already loaded.
22
+
23
+ ## Agent Context Telemetry
24
+
25
+ Hard rule: before running gateway-backed `ae-cli` commands in this skill, maintain the current Agent context in `.ae/cli-agent-context.json` at the working directory root, unless the user explicitly asks not to send intent telemetry. Keep the business command clean; do not append `--agent-context <base64url-json>` by default. Runtime auto-detection alone is only a partial fallback and is not enough for user-intent telemetry.
26
+
27
+ The context file must use `intent_source: "agent_context_file"` and should include a concise task-level `user_intent`, the current `session_goal`, stable `agent_session_id`, current `agent_turn_id` when available, `intent_relation`, and `intent_revision`. Include `agent_model` whenever the current model can be confirmed. Use the user's original language for `session_initial_intent`, `user_intent`, and `session_goal`; for example, use Chinese text for a Chinese user request. Omit unknown parent-turn fields rather than guessing; do not omit the whole context payload. Prefer concise intent summaries over long raw transcripts. Update the file when starting a CLI-backed task or when the user's CLI purpose changes. Reuse it while the purpose and model remain unchanged.
28
+
29
+ The Agent must actively obtain the current model identifier and write it explicitly as `agent_model` in the context file. Use trusted runtime context or bounded metadata for the exact current session and turn; for example, Codex's current-session `turn_context.model`. Do not rely solely on a model environment variable being present. Never infer the model from the Agent/product name, a configured default, or another session. This requirement applies to every Agent client. Update the file when the model changes, even if the CLI purpose stays the same.
30
+
31
+ If the model cannot be confirmed, omit `agent_model`, set `context_capture_status: "partial"`, and continue; do not block or delay the business command or ask the user to identify the model just for telemetry. Once confirmed, write the model and remove the stale partial marker so the CLI can compute capture status from the remaining fields.
32
+
11
33
  ## Analysis workflow
12
34
 
13
35
  For data queries:
14
36
 
15
- 1. Take the current project and requested metrics, windows, groups and filters. Reuse known assets and definitions; discover unknown business measures with [metadata resolution](references/metadata_resolution.md), then select the needed saved-report or ad-hoc command/model references.
37
+ 1. Take the current project and requested metrics, windows, groups and filters. Before choosing a knowledge-base or analysis route, apply the [Project Semantic Knowledge and Discovery](#project-semantic-knowledge-and-discovery) gate. Reuse known assets and definitions; discover unknown business measures with [metadata resolution](references/metadata_resolution.md), then select the needed saved-report or ad-hoc command/model references.
16
38
  2. Confirm any new business mapping once, fill the required parameters, and execute the applicable saved report or complete ad-hoc definition. Reuse confirmed meanings in dependent queries. If the confirmation tool cannot obtain a reply, present the same choices in text and wait for the reply.
17
39
  3. Correct compiler errors at their reported paths. New evidence or a user correction changes a completed choice; preserve the other verified inputs.
18
40
  4. Use the returned result directly. Save original JSON only when the user requests a file or necessary local processing requires one; follow [result handling](references/analysis_data_retrieval.md#preserve-and-interpret-results). Keep stderr and the CLI exit status visible.
19
41
  5. Compute only missing values needed by the request, together in one local call. Reuse completed results and answer when the requested data is available, or explain the specific error or missing input.
42
+ 6. Only after a completed analysis data query and the final business analysis answer, ask once in the user's language whether the analysis met expectations: satisfied, partially satisfied, dissatisfied, or unable to judge. Do not ask after individual CLI calls, intermediate steps, discovery, metadata inspection, asset governance/writes, configuration, help, unrelated questions, query submission, running exports or failed queries. No explicit feedback means no submission or new feedback event. On a clear evaluation of the completed analysis, use [analysis query feedback](references/feedback_submit.md); preserve the evaluated session and turn IDs, the user's original feedback and a short verifiable route summary. Do not upload the analysis answer or infer a rating from silence, a follow-up question or a new requirement. Feedback collection must not block subsequent business work.
20
43
 
21
44
  ## Route before reading
22
45
 
23
46
  1. Map the request to a command family before opening any reference.
24
- - CLI Agent asset-authentication and metric-recommendation review: this includes requests to recommend project assets for certification/authentication, review asset-certification candidates, review project asset-governance recommendations, or review recommended metrics. Open `references/governance_recommendation_export.md` and route to `analysis-meta governance-recommendation export|submit|decisions`. For review-page submission, open `references/agent_review_submit_to_page.md` and use `analysis-meta agent-review submit-to-page|list|detail|records|review|retry`. Do not load project semantics, project KB, or personal semantic preferences as a preflight.
25
- - Project semantic knowledge-base build/update/refresh/sync: open `references/project_semantic_knowledge_wiki.md` and route to `project-semantic asset-package export`, local semantic planning, and local Wiki rendering. Default to CLI semantic precompilation into Markdown sources, source ZIP upload, and KB schema/compile. Update changed source files and run incremental KB compilation on refresh. Never substitute read-only snapshot import. Stop on company permission denial. This is a command-reference workflow inside `ae-analysis`, not a standalone project semantic Skill.
47
+ - CLI Agent asset-authentication and metric-recommendation review: this includes requests to recommend project assets for certification/authentication, review asset-certification candidates, review project asset-governance recommendations, review recommended metrics, or explicitly auto-review/auto-certify recommended assets. Open `references/governance_recommendation_export.md` and route to `analysis-meta governance-recommendation export|submit|auto-review|decisions`. For review-page submission, open `references/agent_review_submit_to_page.md` and use `analysis-meta agent-review submit-to-page|list|detail|records|review|retry`. Do not load project semantics, project KB, or personal semantic preferences as a preflight.
48
+ - Project semantic knowledge-base build/update/refresh/sync: open `references/project_semantic_knowledge_wiki.md` and route to `project-semantic asset-package export`, local semantic planning, and local Wiki rendering. Default to CLI semantic precompilation into Markdown sources, source ZIP upload, formal preset initialization/reuse, and KB compilation. Do not regenerate Schema or AI-validate unchanged presets during normal refresh. Update changed source files and use incremental compilation on ordinary refresh; a navigation taxonomy version change requires the full migration rebuild reported by the source-tree packager. Never substitute read-only snapshot import. Stop on company permission denial. This is a command-reference workflow inside `ae-analysis`, not a standalone project semantic Skill.
26
49
  - Known family: open only its dedicated reference. For example, a retention request goes directly to `references/adhoc_run.md`, the common `references/ai_models.md`, and `references/ai_models/retention.md`.
27
50
  - Unknown family: search [`references/command_index.md`](references/command_index.md) with `rg` or an equivalent text-search tool and keep only the matching rows. `command_index.md` is a search-only fallback; never open it with a whole-file read or print the entire file.
28
51
  2. Read the selected command's dedicated reference before composing it:
29
52
  - `event list` -> `references/event_list.md`
53
+ - Readable saved report/dashboard discovery -> `analysis asset search` and `references/asset_search.md`; this includes shared read-only assets.
30
54
  - `analysis dashboard list` -> `references/dashboard_list.md`
55
+ - Saved event-report chart/result-table layout -> `references/report_get.md` and the matching `report_create.md` or `report_update.md`. A table card on a specific analysis board -> `dashboard-report get/update` and `references/dashboard_report_get.md` / `references/dashboard_report_update.md`; the card display is separate from its source report definition.
56
+ - Event combination chart or per-metric bar/line and primary/secondary axes -> also read `references/event_report_presentation.md`. Series is source-report scoped and can affect its other trend cards; card display updates cannot create a local series override.
31
57
  - `personal-semantic-preference list` -> `references/personal_semantic_preference_list.md`
32
58
  - Asset center cross-source configuration (资产中心 / 跨源资产配置 / Excel 配置表导入): L3 discovery via `capability search "cross_source_config" --domain metadata --project-id <id>`; read [`references/cross_source_config.md`](references/cross_source_config.md) for workbook upload and validation. No dedicated business commands.
33
59
  - replace hyphens with underscores in gateway filenames.
@@ -40,6 +66,10 @@ For data queries:
40
66
 
41
67
  Routing is complete when one command family and its dedicated references are selected. The generated command index is exhaustive and must stay out of model context except for matching search rows. This file contains routing and workflow rules only; do not duplicate a hand-maintained command inventory here.
42
68
 
69
+ Use `analysis report list` and `analysis dashboard list` only for manageable-asset directories before edit or management workflows. They exclude read-only shared assets. For viewing, finding, or selecting a saved report or dashboard, prefer `analysis asset search` so readable assets remain discoverable.
70
+
71
+ Saved-report writes follow the analysis page's product boundary: `analysis report create/update` accepts at most one compound filter level, and every entry in that group's `items` must be a leaf filter. Do not flatten a deeper tree returned by `analysis report get`; use a metadata-only update or obtain an explicit page-compatible replacement definition. Ad-hoc analysis keeps its model-specific recursive filter support.
72
+
43
73
  ## Boundaries and priority
44
74
 
45
75
  Use this skill for these CLI services:
@@ -49,17 +79,19 @@ Use this skill for these CLI services:
49
79
  - `analysis-governance`: gateway asset governance operations, including governed asset lists/exports, lineage, dependency, impact, query history, rule schema/list/create/update/delete, batch asset actions, and operation records. Use this service for asset governance workflows, not for metadata event/property/metric CRUD.
50
80
  - `tracking`: gateway tracking plan, checking, ingest, live-data, and event blacklist operations.
51
81
  - `personal-semantic-preference`: current user's project-scoped personal semantic preferences. Use it as agent context before resolving ambiguous business wording, asset choices, or recurring user preferences.
52
- - `project-semantic` and `kb` only inside the explicit project semantic knowledge-base command-reference workflow. They are not prerequisites for asset-authentication and metric-recommendation review.
82
+ - `project-semantic`: asset-package export for an explicit project knowledge-base build or refresh. The old governed project-semantic lifecycle is no longer available through CLI.
53
83
 
54
- For metadata gateway detail outside the commands in the generated index, use the metadata skill. For Engage, DataOps, or Community work, use the corresponding skill.
84
+ For work outside the command families covered here, use the collaboration protocol to discover a matching available capability rather than assume a particular Skill name.
55
85
 
56
86
  Use `ae-cli` as the only execution path for this skill. If a command is missing, unsupported, not implemented, or a capability gap is confirmed, report that gap; do not switch to direct MCP execution. A validation error or `need_clarification` calls for its specific input correction. A transport failure such as `fetch failed` means the result is unavailable: report the error with any already obtained results and stop the dependent request. Resume after environment recovery; do not start route probes, sleeps or background network polling. A transport failure does not establish a missing capability or empty data.
57
87
 
58
88
  For tags and audience clusters, use the native `analysis user-tag ...` and `analysis user-cluster ...` gateway commands.
59
89
 
60
- For CLI Agent asset-authentication and metric-recommendation review, route to `analysis-meta governance-recommendation export|submit|decisions`. Common returns the deterministic evidence packet; the Agent owns the fixed human approval display from `references/governance_recommendation_export.md`, including business-domain grouping, plain-text status labels, and risk/conflict explanation. Do not use project-semantic, project-KB, or personal-semantic-preference commands as prerequisite context for this workflow. Do not use management commands such as `asset-authentication list|export|update` or metric CRUD commands to synthesize recommendations. Do not bypass curated commands with `ae-cli capability inspect|validate|dry-run|run` for `governance.asset_authentication.dashboard_package`, `metadata.metric.recommended_scan`, or `metadata.metric.recommended_create`.
90
+ For CLI Agent asset-authentication and metric-recommendation review, route to `analysis-meta governance-recommendation export|submit|auto-review|decisions`. Common returns the deterministic evidence packet; the Agent owns the fixed human approval display from `references/governance_recommendation_export.md`, including business-domain grouping, plain-text status labels, and risk/conflict explanation. Call `auto-review` only when the user explicitly asks for automatic review or automatic certification; a plain recommendation request and a recommendation-plus-page-submission request must not check the automatic certification project config or auto-certify assets. When `auto-review` is called without an explicit `--limit`, the CLI validates the auto-certification and project-semantic switches, read-only probes top-20/top-50/top-100 pending recommendation material as needed, then the CLI Agent builds one set of automatic certification decisions from the final material and submits those decisions for execution/audit. The CLI Agent, not Common historical recommendation state, owns semantic-duplicate detection; duplicate skips must name concrete conflicting asset targets. The auto-review result also returns `manual_review_handoff` for assets still uncertified after automatic review; if the user later asks to submit those leftovers to the page, build `agent-review submit-to-page` from `manual_review_handoff.page_review_items` so dashboard/report parent context is preserved, treat only `manual_review_handoff.items` as the human certification workload, and include each automatic non-certification reason in the item summary. Do not use project-semantic, project-KB, or personal-semantic-preference commands as prerequisite context for this workflow. Do not use management commands such as `asset-authentication list|export|update` or metric CRUD commands to synthesize recommendations. Do not bypass curated commands with `ae-cli capability inspect|validate|dry-run|run` for `governance.asset_authentication.dashboard_package`, `metadata.metric.recommended_scan`, or `metadata.metric.recommended_create`.
91
+
92
+ Start a recommendation with `governance-recommendation export` before lengthy Agent analysis so Common can atomically mark the project as running. Later exports in the same Agent turn may expand the candidate pool. If Common returns `RECOMMENDATION_RUNNING`, stop this attempt and report that a recommendation is already in progress; do not retry with another Agent context or bypass the marker. Successful page submission and automatic review release the marker; recommendation-only or failed Agent runs rely on the fixed expiry. No separate start or finish CLI command is required.
61
93
 
62
- After presenting recommendations, the Agent may ask whether to submit them to the review page. A user choice to submit authorizes `analysis-meta agent-review submit-to-page` only; it does not authorize approval or certification. If the user declines, do not write or repeatedly suggest submission. Existing explicit submission authorization remains valid and does not need another prompt. A preauthorized unattended task may submit review proposals only; it must never call `agent-review review|retry`, legacy `governance-recommendation submit`, or direct certification/metric mutations automatically. Use `agent-review list|detail|records` and the task's persisted proposal fingerprint to reuse prior batches. Do not resubmit or send repeated notifications for unchanged proposals, pending reviews, completed items, or previously declined suggestions. A new run ID alone is not new evidence. Report the returned `review_url` once and remain quiet until there is a meaningful change or required user action. See `references/agent_review_submit_to_page.md` for stable request keys and packet rules.
94
+ After presenting recommendations, the Agent may ask whether to submit them to the review page. A user choice to submit authorizes `analysis-meta agent-review submit-to-page` only; it does not authorize approval, certification, config checking, or `governance-recommendation auto-review`. If the user declines, do not write or repeatedly suggest submission. Existing explicit submission authorization remains valid and does not need another prompt. A preauthorized unattended task may submit review proposals only; it must never call `agent-review review|retry`, legacy `governance-recommendation submit`, `governance-recommendation auto-review`, or direct certification/metric mutations automatically. Use `agent-review list|detail|records` and the task's persisted proposal fingerprint to reuse prior batches. Do not resubmit or send repeated notifications for unchanged proposals, pending reviews, completed items, or previously declined suggestions. A new run ID alone is not new evidence. Report the returned `review_url` once and remain quiet until there is a meaningful change or required user action. See `references/agent_review_submit_to_page.md` for stable request keys and packet rules.
63
95
 
64
96
  Report review details must explain calculation logic and statistical measures, not only business purpose. Follow resolve/export -> material-package completeness check -> gap-only `analysis-meta agent-review evidence` or `analysis report get` -> chunked AI explanation -> independent preflight -> authorized submit-to-page -> detail readback. LOCAL_ONLY stops at the local preflight result. `governance-recommendation export` is expected to include report `evidence_snapshot.analysis` and `target_revision` in `review_material_package.candidate_assets`; do not ask the customer to run `analysis report get` for every report when those fields are present. Fetch `agent-review evidence` only when a report item lacks current analysis, when validating a generated draft, or when the material package explicitly marks a definition gap. Read `references/agent_review_evidence.md` for stable analysis fields and their limits. Populate `item.ai_summary.analysis_explanation` with evidence-backed measures, dimensions, calculations, filters, time_scope, and query_columns as applicable; interpret each supported SQL projection column separately. Reference only actual fact-supporting response paths rooted at `evidence_snapshot.analysis`; `source_path` is provenance, not an automatic evidence_refs substitution. Preserve server facts separately from AI interpretation and explicitly identify null, missing, dynamic or unparsed evidence. For DYNAMIC SQL, label supported sql.raw/normalized_definition.params discussion as original-text interpretation, never fabricate select_columns or runtime substitutions. Common create stores the submitted packet; it does not fill missing calculation explanations for the Agent. Before calling `submit-to-page`, check required `evidence_snapshot.analysis` and resolvable references in `analysis_explanation.calculations` / `analysis_explanation.measures`; missing required structure remains an error. Reviewer-readability and interpretation defects follow the bounded quality correction/warning procedure. Verify the stored snapshot and references in detail after submission. Never guess SQL, aliases, columns, formulas, time ranges, timezones, or successful execution. Definition inspection, evidence reads, validation, and submission are not proof of query results, approval, or certification.
65
97
 
@@ -96,10 +128,12 @@ ae-cli capability search|inspect|validate|dry-run|run [options]
96
128
  ```
97
129
 
98
130
  - Gateway commands use kebab-case flags such as `--project-id`; the CLI sends snake_case JSON.
131
+ - Gateway commands must be preceded by the `.ae/cli-agent-context.json` update described in the Agent Context Telemetry section. The hidden `--agent-context <base64url-json>` option is only a fallback for isolated no-write environments or local debugging, not the preferred path for this skill.
99
132
  - JSON values must be JSON string literals.
100
133
  - Global flags include `--host`, `--format json|table`, `--jq`, `--validate`, `--dry-run`, and `--yes`. Use `--validate` only to resolve a concrete complex-input issue; use `--dry-run` for high-risk writes or an explicitly requested preview. These modes are mutually exclusive.
101
134
  - Execute a fully specified read or ordinary write directly. Do not routinely stack inspect, validate, dry-run, and run. Inspect the selected model contract once when a concrete schema mismatch requires it; reuse that inspected contract within the unchanged conversation scope. This is local evidence reuse, not a claim that the CLI caches contracts.
102
135
  - JSON is the default machine-readable output. On failure, preserve the structured error and non-zero exit.
136
+ - `CREDENTIAL_STORE_UNREADABLE` (`error.type: config`) is a local credential read/decryption failure. Preserve the files and retry in the original OS user/runtime with machine-identifier access; do not automatically log in, replace tokens, or log out. It does not establish server-side token expiration.
103
137
  - Never invent command names, flags, payload fields, projects, resource IDs, asset names, canonical event/property identifiers, metric formulas, or dates. User-provided business wording is valid unresolved compiler input; it is not a claim that a canonical binding is known.
104
138
  - 中文时间表达必须按固定语义映射:最近7天/近7天 -> `mode=recent` -> QP `recentDay=0-7`,含今天;过去7天/前7天 -> `mode=previous` -> QP `recentDay=1-7`,不含今天。用户明确说明是否包含今天时,以该说明为准。完整映射见 [`references/ai_models.md`](references/ai_models.md)。
105
139
 
@@ -146,22 +180,49 @@ Use the current turn's project ID supplied by the Agent host. When no project is
146
180
 
147
181
  ### Project Semantic Knowledge
148
182
 
149
- Do not call project-semantic catalog, entry, candidate, release, or publish commands as prerequisite context for ordinary analysis or asset-governance requests. The retired governed-project-semantic lifecycle is not part of this CLI Agent flow.
183
+ When the user explicitly asks to build, update, refresh, rebuild, or sync a project semantic knowledge base, open `references/project_semantic_knowledge_wiki.md`. That command-reference workflow starts from `ae-cli project-semantic asset-package export` and then uploads/compiles KB sources. The retired governed project-semantic candidate and release lifecycle is not part of this knowledge-base build path or CLI Agent asset-authentication and metric-recommendation review.
150
184
 
151
- When the user explicitly asks to build, update, refresh, rebuild, or sync a project semantic knowledge base, open `references/project_semantic_knowledge_wiki.md`. That command-reference workflow starts from `ae-cli project-semantic asset-package export` and then uploads/compiles KB sources. Do not load a standalone project semantic Skill for this workflow.
185
+ ### Project Semantic Knowledge and Discovery
186
+
187
+ Do not call project-semantic catalog, entry, candidate, release, or publish commands. The governed project-semantic lifecycle has been retired from CLI; use `personal-semantic-preference` for current-user semantics and the knowledge-base workflow for project knowledge.
188
+
189
+ For a project-scoped request that may need an asset or metric definition, decide the route before any analysis asset, report, or metric lookup. Follow an explicitly named knowledge base directly; skip this gate if the user rules out knowledge bases. Otherwise call `ae-cli config show` once per host and authenticated account in this conversation, and recheck when that scope changes or the answer is over 24 hours old. The command uses the CLI's daily company configuration cache; do not force a remote refresh for each question.
190
+
191
+ If `data.routing.knowledge_base` is `auto`, consider whether a project knowledge base could answer the question or provide the needed asset definition. If it could, use `ae-kb-discovery` first, prefer an exact project binding, and read matching pages through `ae-kb`. For data questions, verify the selected asset's semantic coverage and run the applicable analysis command. If pages provide only related definitions, limitations, or partial coverage, retain that evidence and continue normal asset or metric discovery for the missing requirements through the KB analysis workflow. If no relevant knowledge-base page is found, continue with normal discovery. If the routing value is `explicit` or `data.source` is `unavailable`, use the normal analysis route without implicit KB discovery. A KB candidate without a relevant page hit does not justify using its assets.
152
192
 
153
193
  ### Personal Semantic Preferences
154
194
 
155
- When the request involves personal business wording, asset preferences, or explicit personalization, call `ae-cli personal-semantic-preference list --project-id <project_id>` once per host, authenticated user, project, and conversation; reuse the result within that scope. Use the current project supplied by the Agent host. If an entry is adopted, read [`references/personal_semantic_preference_list.md`](references/personal_semantic_preference_list.md) and fetch that entry with `--mark-used`. Read the same reference before recording a durable user preference; a one-time analysis confirmation is task context.
156
- This rule does not apply to CLI Agent asset-authentication and metric-recommendation review through `analysis-meta governance-recommendation export|submit|decisions`; that workflow must not load personal semantic preferences as prerequisite context.
195
+ When the request involves personal business wording, asset preferences, explicit personalization, or a project-scoped request to remember/save a reusable analysis workflow, call `ae-cli personal-semantic-preference list --project-id <project_id>` once per host, authenticated user, project, and conversation; reuse the result within that scope. Use the current project supplied by the Agent host. If an entry is adopted, read [`references/personal_semantic_preference_list.md`](references/personal_semantic_preference_list.md) and fetch that entry with `--title <title_from_list> --mark-used`. Read the same reference before recording a durable user preference; a one-time analysis confirmation is task context.
196
+ This rule does not apply to CLI Agent asset-authentication and metric-recommendation review through `analysis-meta governance-recommendation export|submit|auto-review|decisions`; that workflow must not load personal semantic preferences as prerequisite context.
197
+
198
+ Personal semantics supply the current user's defaults, interpretation corrections, asset choices, and output preferences. Verify any selected asset or calculation against its saved definition before execution; a personal preference does not replace the asset's current definition.
199
+
200
+ The Agent owns the personal preference capture trigger. Choose `context_type` by meaning:
201
+
202
+ - `preference`: durable interpretation or output preference without an exact asset binding.
203
+ - `asset_context`: durable user wording or intent bound to one or more exact project assets. Send the complete ordered `resource_refs` array; each item has `resource_type`, string `resource_key`, and `display_name`.
204
+ - `experience`: a confirmed reusable project work method or analysis workflow without an exact asset binding.
205
+ - `background`: stable personal context without an exact asset binding.
206
+
207
+ Any stable choice of a concrete asset, including an event-selection scenario, must use `asset_context`; do not encode asset IDs only in prose. During a project task, collect durable current-user preferences, stable interpretation corrections, reusable asset-selection choices, recurring output preferences, reusable project analysis workflows, and current-user working definitions that have not become approved project semantics. If the user says "remember the above workflow", "save this process for this project", "以后按这个流程", or equivalent while a project scope is active, record it here as `context_type=experience` instead of using `ae-cli memory`. A working definition remains eligible for personal storage even when it would also benefit other project users. Store it only as the current user's preference; never describe it as approved project authority or copy a bound asset definition into its content. Keep future governance or lifecycle instructions out of the stored content. Do not save transient task details, one-off analysis results, company knowledge, standalone metadata facts, reports, or dashboards as personal preferences.
208
+
209
+ An explicit stable statement, correction, or confirmation that passes that evidence gate authorizes `personal-semantic-preference add` or `update` without a second "save" confirmation. Compare against the already loaded catalog first; when one existing preference matches, fetch it with `--mark-used`, update that existing preference, and avoid creating a duplicate. Otherwise add a new one. An explicit instruction not to retain it always wins. Delete remains high risk and requires explicit user confirmation.
210
+
211
+ Personal capture and project recommendation are independent. Save or update the personal semantic first when its evidence gate is met. If the same content looks reusable as a formal project-wide definition, finish the current task and then ask whether the user wants to recommend it as a project semantic candidate. Do not make project recommendation a prerequisite for personal capture, do not submit a candidate without that user choice, and never approve or publish on behalf of an ordinary user.
212
+
213
+ After a successful add, update, or delete, merge that response into the conversation's cached directory locally. Do not call list again merely to observe the write.
214
+
215
+ When a later published project semantic matches a personal semantic, treat the project semantic as formal and allow the personal record to become redundant, expire, or merge through the supported lifecycle. When they conflict, keep the project semantic formal, disclose the conflict, and preserve the personal record unless the user explicitly changes or deletes it. These are consumption and lifecycle rules; do not append them to the stored personal semantic content.
216
+
217
+ Stale or expired preferences are automatically hidden by list filtering and backend maintenance. Do not look for or invent a separate command for that behavior.
157
218
 
158
219
  ### Metadata discovery
159
220
 
160
- Reuse known definitions and canonical metadata directly. For an unknown business measure, follow [`references/metadata_resolution.md`](references/metadata_resolution.md): search relevant saved metrics/reports, read their definitions, and discover only missing events or properties. `allowed_resource_types` is authoritative for a compiler error. Confirm a selected business mapping once, even when there is only one suitable candidate; reuse the task's already confirmed mappings.
221
+ Reuse known definitions and canonical metadata directly. For an unknown business measure, follow [`references/metadata_resolution.md`](references/metadata_resolution.md): search relevant saved metrics/reports, read their definitions, and discover only missing events or properties. `allowed_resource_types` is authoritative for a compiler error. Verifying fields, types, and filters for an already explicit or confirmed meaning is evidence completion, not a new business choice. Confirm a selected business mapping once, even when there is only one suitable candidate; reuse the task's already confirmed mappings.
161
222
 
162
223
  ### Saved business asset or ad-hoc
163
224
 
164
- If an exact asset or definition came from a knowledge-base page, first read and follow [`../ae-kb/references/analysis-workflow.md`](../ae-kb/references/analysis-workflow.md). Attempt the matched asset before using the ordinary fallback below. If it cannot produce a usable result, preserve that evidence, then follow the workflow's explicit fallback and disclosure rules.
225
+ If an exact asset or definition came from a knowledge-base page, first read and follow [`../ae-kb/references/analysis-workflow.md`](../ae-kb/references/analysis-workflow.md). Inspect the live definition and attempt an exact, semantically applicable saved asset first. When inspection establishes a mismatch, missing fields, or partial coverage, continue ordinary discovery for the original request without a forced data query. Preserve useful KB evidence, resolve only missing metadata, and follow the workflow's authorized fallback and disclosure rules. A KB limitation is not itself task completion.
165
226
 
166
227
  Use a suitable saved report with supported requested overrides. For a custom combination, reuse the applicable definitions in an ad-hoc model. Read [`references/analysis_gateway_assets.md`](references/analysis_gateway_assets.md) for saved filters, dashboard context and asset selection. Load model references when constructing an ad-hoc definition.
167
228
 
@@ -2,6 +2,8 @@
2
2
 
3
3
  Use this to submit existing asset certification proposals for a human to review on the asset certification management page. This creates a review batch and notification, not an approval or certification. Do not use it to approve assets. Candidate discovery starts with `analysis-meta governance-recommendation export`; its `review_material_package` is the customer-visible handoff package for generating the page draft.
4
4
 
5
+ After `analysis-meta governance-recommendation auto-review`, candidate discovery may instead come from `manual_review_handoff`. Use that path only when the user explicitly asks to submit assets that remained uncertified after automatic review. Submit `manual_review_handoff.page_review_items` so the review page can still render dashboard/report parent context; entries with `manual_review_context:true` are hierarchy/source context, while `manual_review_handoff.items` is the exact uncertified workload. Keep original evidence links and snapshots, include `manual_review_reason` / `auto_review_decision.display_reason` / `auto_review_decision.reason` in each uncertified item summary as reviewer-readable text, and copy `manual_review_handoff.auto_review_trace` into submit-to-page `source_metadata.auto_review_trace` so the page audit records show which assets Agent already certified automatically. Page-visible conflict reasons must describe semantic risk, such as suspicious duplicates, close meanings, or ambiguous business definitions, only when a concrete conflicting asset is returned; a historical decision code without a conflicting target must not be presented as duplicate evidence. Do not expose internal evidence-fingerprint or historical-audit-record wording.
6
+
5
7
  L2 admission: owned by Common ta-cli / AgentReviewService. Typed project and source flags, fixed ASSET_GOVERNANCE schema 1.0 defaults, local proposal validation, explicit stable request keys, and lossless string IDs add safety beyond generic JSON invocation. `submit-to-page` deliberately maps to `metadata.agent_review.create` so users cannot confuse it with the existing executing `governance-recommendation submit`. Other agent-review actions map directly to their capability action. All calls use the analysis Gateway route and CLI-token authentication.
6
8
 
7
9
  All seven review capabilities require the exact project function `assetAuthentication`, matching the shared service. Read actions, including evidence, require `metadata:read`; submission, review and retry require `metadata:write`. Each submission/decision/retry contains 1 to 5000 unique items; the domain service also enforces its packet size limit.
@@ -92,11 +92,16 @@ Formula rules:
92
92
 
93
93
  Saved formula report round-trip rules:
94
94
 
95
- - `analysis report get` can return saved formula metrics with `custom_filters`, `formulation`, `custom_event_desc`, `format`, `event_type`, `event_split_indexes`, `quota_time_ranges`, `quota_entities`, and `event_uuid`. These are saved-report round-trip fields, not the authoring shape for a new formula.
95
+ - `analysis report get` can return saved formula metrics with `custom_filters`, `formulation`, `custom_event_desc`, `event_desc`, `format`, `event_type`, `event_split_indexes`, `quota_time_ranges`, `quota_entities`, and `event_uuid`. These are saved-report round-trip fields, not the authoring shape for a new formula.
96
96
  - When updating an existing report from its returned `definition`, preserve all of those fields unchanged unless the user explicitly requests that formula behavior to change. `custom_filters[*].index` binds each numerator/denominator occurrence to its own filter set, including repeated event/aggregation tokens.
97
97
  - For a display-name-only change, modify only `display_name`. Do not convert the saved formula to `formula + dependencies`, because rebuilding dependencies can change or discard per-component filters and other formula semantics.
98
98
  - Continue to use the `formula + dependencies` shape above when authoring a new formula metric.
99
99
 
100
+ Saved report filter round-trip rules:
101
+
102
+ - `analysis report get` can return historical recursive filter groups in report-level or metric-level `filters`. A group is `{"relation":"and|or","items":[...]}`; `items` may contain leaf filters or nested groups. Preserve this tree on read.
103
+ - Follow the shared saved-report boundary in [`../ai_models.md`](../ai_models.md): never flatten a deeper historical tree or keep only its last leaf. For a page-compatible tree, change only the requested leaf and retain all surrounding `relation` and `items` nodes before validating the complete definition.
104
+
100
105
  ## Aggregation
101
106
 
102
107
  - `event`: without property use `total_count`, `user_count`, or `per_user_count`; numeric properties support `sum`, `avg`, `avg_per_user`, `max`, `min`, `distinct_count`, `median`, `percentile`, `variance`, and `stddev`; string/date/datetime properties support `distinct_count`; boolean properties support `true_count`, `false_count`, `not_empty_count`, `empty_count`, and `distinct_count`.
@@ -22,7 +22,13 @@ Use for ordered conversion steps with a conversion window.
22
22
  }
23
23
  ```
24
24
 
25
- If the user asks to match users across events by a shared event property, set `relation_event_property_name`.
25
+ If the user asks to match users across events by a shared event property, set `funnel.relation_event_property_name`. For different property names in different events, set `funnel.steps[].relation_event_property_name`; each override takes precedence over the common property. Every step must have a relation property when any step uses one, and their property types must match.
26
+
27
+ For saved reports, optional `funnel.steps[].display_name` sets the label shown for that funnel step. `analysis report get` returns the saved value, and report create/update writes it back, so preserve every step's `display_name` when replacing a definition. Omission uses the event's resolved display name.
28
+
29
+ `funnel.start_step` and `funnel.end_step` preserve the selected conversion interval. They are one-based and must satisfy `1 <= start_step < end_step <= steps.length`; omission selects the whole funnel. A dimension's `funnel_step` selects the step providing its grouping value. Saved reports with an older global grouping step are read back with that step on each affected dimension.
30
+
31
+ Queries and exports show the selected steps and calculate cumulative conversion from the selected starting population. For step populations `[4, 3, 2]`, selecting steps 2–3 returns `3 → 2` and `66.67%`; omitting the selection returns all three populations with cumulative rates `75%` and `50%`. Selecting a display interval does not remove the earlier events from the funnel's qualification rules.
26
32
 
27
33
  Step-level event-property filters belong inside the matching `funnel.steps[].filters`. Use `event_property_name`, not the common `field` object. `values` is an array of strings, including `"true"` / `"false"` for boolean properties; omit values for existence operators. For example, ordered registration -> login -> first payment:
28
34
 
@@ -32,9 +38,9 @@ Step-level event-property filters belong inside the matching `funnel.steps[].fil
32
38
  "time_particle_size": "day",
33
39
  "funnel": {
34
40
  "steps": [
35
- {"event": "register"},
36
- {"event": "login"},
37
- {"event": "payment", "filters": [
41
+ {"event": "register", "display_name": "Completed registration"},
42
+ {"event": "login", "display_name": "Completed login"},
43
+ {"event": "payment", "display_name": "First payment", "filters": [
38
44
  {"event_property_name": "is_first_pay", "operator": "eq", "values": ["true"]}
39
45
  ]}
40
46
  ],
@@ -44,3 +50,5 @@ Step-level event-property filters belong inside the matching `funnel.steps[].fil
44
50
  ```
45
51
 
46
52
  Preserve step order, conversion window, and all requested filters when correcting input. Only actual funnel results support step counts and conversion rates; independent event UVs are not an ordered funnel.
53
+
54
+ Step filters can also contain compound nodes such as `{"relation":"or","items":[{"event_property_name":"channel","operator":"eq","values":["app"]},{"event_property_name":"channel","operator":"eq","values":["web"]}]}`. Each nested leaf remains event-only. Relative-time leaf filters preserve `time_relative`, `time_unit`, and `relative_event_time_retention_phase`.
@@ -24,3 +24,26 @@ For property metrics, set `hot_property` and use a property aggregation such as
24
24
  ## Aggregation
25
25
 
26
26
  - `heat_map`: without property use `total_count`, `user_count`, or `per_user_count`; numeric properties support `sum`, `avg`, `avg_per_user`, `max`, `min`, `distinct_count`, `median`, `variance`, and `stddev`; string/date/datetime properties support `distinct_count`; boolean properties support `true_count`, `false_count`, `not_empty_count`, `empty_count`, and `distinct_count`. `percentile` is not supported.
27
+
28
+ ## Comparison groups, processing, and canvas
29
+
30
+ `heat_map.compared_groups` accepts uniquely named groups with independent recursive `filters` and `relation`. These are filtered groups within the selected time range. The heat-map engine does not support date comparison periods.
31
+
32
+ `event_processing` selects one event per entity before heat aggregation. `mode` is `FIRST`, `LAST`, `MAX`, or `MIN`: FIRST/MIN select the minimum ordering value and LAST/MAX the maximum. By default the ordering value is event time; optional `property` selects a numeric, string, date, or datetime field. `filters` and `relation` select events eligible for processing.
33
+
34
+ `canvas` limits coordinates to `x_min..x_max` and `y_min..y_max`. All four finite bounds are required, minima must not exceed maxima, and bounds support at most 10 integer digits and 4 decimal places. Optional `background` preserves an already uploaded image using `attachment_name`, `original_filename`, `created_at`, `width`, `height`, and `byte_size`. It does not upload a local file. Omit canvas to include all non-null coordinates.
35
+
36
+ Example fields inside `heat_map`:
37
+
38
+ ```json
39
+ {
40
+ "compared_groups": [
41
+ {"name": "Home page", "filters": [{"field": {"name": "page", "type": "event_property"}, "operator": "eq", "values": ["home"]}]},
42
+ {"name": "All pages"}
43
+ ],
44
+ "event_processing": {"mode": "LAST"},
45
+ "canvas": {"x_min": 0, "x_max": 1920, "y_min": 0, "y_max": 1080}
46
+ }
47
+ ```
48
+
49
+ Hot-event filters, comparison groups, processing conditions, and canvas bounds/background metadata survive report get → update → run. X/Y coordinate properties must be numeric.
@@ -18,3 +18,27 @@ Use for elapsed-time analysis between an initial event and a return event.
18
18
  }
19
19
  }
20
20
  ```
21
+
22
+ `window.unit` accepts `minute`, `hour`, or `day`; its positive integer value must fit a millisecond duration. The native interval engine does not implement second/week/month windows, so those inputs are rejected instead of being interpreted as days.
23
+
24
+ Use `relation_event_property_name` for a shared property, or `initial_relation_event_property_name` and `return_relation_event_property_name` for different properties. Each event-specific name overrides the shared name. Both resolved properties must have compatible types. `relation_comparison` defaults to `equal`; `higher_by`/`lower_by` mean the return value equals the initial value plus/minus `relation_difference`. These modes require numeric properties and a nonnegative integer difference; omit the difference for `equal`.
25
+
26
+ Optional `interval` output settings:
27
+
28
+ ```json
29
+ {
30
+ "initial_event": "level_start",
31
+ "return_event": "level_complete",
32
+ "window": {"value": 1, "unit": "day"},
33
+ "initial_relation_event_property_name": "start_level",
34
+ "return_relation_event_property_name": "end_level",
35
+ "relation_comparison": "higher_by",
36
+ "relation_difference": 2,
37
+ "buckets": {"mode": "custom", "unit": "minute", "boundaries": [1, 5, 30]},
38
+ "selected_statistics": ["avgValue", "percent95", "midValue"]
39
+ }
40
+ ```
41
+
42
+ `buckets` uses either `equal` with `count` from 2 to 30, or `custom` with 1–29 strictly increasing positive integer `boundaries` and `unit` (`second/minute/hour/day`). Do not mix the fields of the two modes. Omission keeps the native 12-subdivision default.
43
+
44
+ `selected_statistics` controls the ordered statistic columns, including exports. Values: `maxValue`, `threeQuarterValue`, `midValue`, `quarterValue`, `minValue`, `avgValue`, `percent99`, `percent95`, `percent90`, `percent80`, `percent70`, `percent60`, `percent40`, `percent30`, `percent20`, `percent10`, `percent5`. Omission uses the first six; `[]` selects none. Duplicates are invalid. Relation conditions, buckets, and statistics survive report get → update → run.
@@ -53,3 +53,23 @@ for level in result["links"]:
53
53
  ```
54
54
 
55
55
  For path analysis, `preview_rows` is a graph-display boundary aligned with the analysis UI: it keeps up to that many real nodes per path level, then combines overflow nodes into `more`. `result.nodes` retains the synthesized `more` node for graph structure and drilldown coordinates. The top-level `returned_rows` counts real business nodes actually returned across all levels; it excludes synthesized `more` nodes and the real nodes folded into them. The count may still exceed `preview_rows` because the boundary applies independently to each level. `has_more=true` means at least one level contains real nodes folded into `more`; a linear multi-level path can return more real nodes than `preview_rows` with `has_more=false`.
56
+
57
+ ## Source filters, event splits, and limits
58
+
59
+ `path.source_filters` selects source-event occurrences using event-property leaves (`event_property_name`, `operator`, and string `values`) or recursive `items`/`relation` groups. `path.source_filter_relation` combines the top-level source filters. Global `filters` still accept only user properties, tags, and clusters; nested groups and supported relative-time conditions are preserved.
60
+
61
+ `path.event_splits` splits individual included events into property-value nodes:
62
+
63
+ ```json
64
+ {
65
+ "source_filters": [{"event_property_name": "amount", "operator": "gt", "values": ["10"]}],
66
+ "event_splits": [{
67
+ "event": "purchase", "event_property_name": "amount",
68
+ "bucket_mode": "custom", "bucket_boundaries": [10, 100]
69
+ }],
70
+ "max_steps": 4,
71
+ "max_nodes_per_step": 12
72
+ }
73
+ ```
74
+
75
+ Each split event must occur in `included_events` and can appear only once in `event_splits`. Numeric bucket, array grouping, and time granularity options follow the shared dimension contract. `max_steps` is 1–30 (default 10); `max_nodes_per_step` is 7–30 (default 7). Retention-only filter phase and dimension options are invalid for path analysis. Report reads preserve these settings for subsequent updates.
@@ -41,3 +41,5 @@ For property aggregations, pass the user property:
41
41
  ## Aggregation
42
42
 
43
43
  - `prop_analysis`: use `user_count` without property; numeric properties support `sum`, `avg`, `avg_per_user`, `max`, `min`, `distinct_count`, `median`, `variance`, and `stddev`; string/date/datetime properties support `distinct_count`; boolean properties support `true_count`, `false_count`, `not_empty_count`, `empty_count`, and `distinct_count`. `percentile` is not supported.
44
+
45
+ Global `filters` and `user_crowds[].filters` both support recursive `items`/`relation` groups. Date/time leaves preserve the shared relative-time options, and tag/cluster leaves preserve `cluster_date_policy` plus `specified_cluster_date`. A saved report read retains crowd names, crowd filter trees, and each crowd's relation. Keep these when updating the report; do not replace a selected crowd with all users.
@@ -23,3 +23,33 @@ Use for ranking users/entities by an event metric.
23
23
  ## Aggregation
24
24
 
25
25
  - `rank_list`: without property use `total_count`, `user_count`, or `per_user_count`; numeric properties support `sum`, `avg`, `avg_per_user`, `max`, `min`, `distinct_count`, `median`, `variance`, and `stddev`; string/date/datetime properties support `distinct_count`; boolean properties support `true_count`, `false_count`, `not_empty_count`, `empty_count`, and `distinct_count`. `percentile` is not supported.
26
+
27
+ ## Metric filters, accompanying columns, and formulas
28
+
29
+ - `rank_filters` and `rank_relation` apply only to the primary regular ranking metric. `filters` and `relation` apply globally. Both filter arrays preserve compound groups and relative-time conditions.
30
+ - `accompanying_metrics` is an ordered array of event metric definitions (`event`, `aggregation`, `property`, `filters`, `relation`, or `formula`/`dependencies`). Each entry can set `order_by: "ASC"|"DESC"|"NONE"`; default `NONE` displays the metric without using it to break ties. Backend limits on the number of columns still apply.
31
+ - `accompanying_properties` is an array of field dimensions. The main `rank_dimension` and accompanying properties support `array_grouping`, `time_granularity`, and historical tag/cluster date policies. Numeric buckets, funnel steps, and retention sources are not rank-list options.
32
+ - For formula ranking, set `rank_formula` to a formula metric definition. Omit the mutually exclusive regular metric fields `rank_event`, `rank_aggregation`, `rank_property`, `rank_filters`, `rank_relation`, and `rank_quota_entities`; put formula filters inside `rank_formula.filters`. Keep the outer `order_by` as `ASC` or `DESC`.
33
+ - Formula dependencies and accompanying metrics use the same aggregation restrictions as the primary metric, including the exclusion of `percentile`. Preserve saved formula metadata returned by report reads.
34
+
35
+ ```json
36
+ {
37
+ "rank_dimension": {"field":{"name":"#account_id","type":"user_property"}},
38
+ "rank_formula": {
39
+ "formula": "revenue / users",
40
+ "dependencies": [
41
+ {"alias":"revenue","event":"purchase","aggregation":"sum","property":"amount"},
42
+ {"alias":"users","event":"purchase","aggregation":"user_count"}
43
+ ]
44
+ },
45
+ "order_by": "DESC",
46
+ "accompanying_metrics": [{"event":"purchase","aggregation":"total_count","order_by":"ASC"}],
47
+ "accompanying_properties": [{"field":{"name":"country","type":"user_property"}}]
48
+ }
49
+ ```
50
+
51
+ Use the object above as `rank_list` inside a definition with `time_range`. Saved report reads retain the primary filters, accompanying columns, their ordering, and formula definitions; preserve all of them during updates.
52
+
53
+ Ranking accepts one root `comparison_time_ranges` entry using the shared event comparison shape, for example `[{"mode":"previous_period","display_name":"Previous period"}]`. The native ranking engine supports at most one comparison period; multiple entries are rejected. Preserve the returned comparison period on report edits so the comparison values and rank changes remain available.
54
+
55
+ Preserve `rank_quota_entities` returned for a regular primary ranking metric. Formula ranking keeps its identity overrides inside `rank_formula.quota_entities`; accompanying metrics keep theirs inside each `quota_entities`. These independent identities affect distinct-user counts and per-user denominators and must survive saved-report edits. Do not supply regular `rank_quota_entities` together with `rank_formula`.
@@ -56,7 +56,51 @@ Initial-event and return-event property filters use the retention-specific shape
56
56
 
57
57
  ## Aggregation
58
58
 
59
- - `retention` simultaneous metrics: without property use `total_count`, `user_count`, or `per_user_count`; numeric properties support only `sum` and `avg_per_user`; boolean properties support only `true_count`, `false_count`, `not_empty_count`, and `empty_count`.
59
+ - `retention` simultaneous metrics: without property use `total_count`, `user_count`, or `per_user_count`; numeric properties support `sum`, `avg_per_user`, and `cumulative_avg_per_user` (the saved page's A114 stage accumulated per-user value); boolean properties support only `true_count`, `false_count`, `not_empty_count`, and `empty_count`. `cumulative_avg_per_user` requires the matching Common round-trip fix; it is not a supported event-analysis aggregation.
60
+
61
+ ## Saved formula round trips
62
+
63
+ `analysis report get` preserves a saved simultaneous formula's `formulation`, `custom_filters`, `custom_event_desc`, `event_desc`, `format`, and `event_type` when present. Keep these fields unchanged when updating the returned definition. In particular, `custom_filters[].index` binds filters to each formula occurrence. Do not replace these saved fields with newly inferred dependencies. New formulas still require `formula` plus explicit `dependencies`.
64
+
65
+ ## Metric roles and combination
66
+
67
+ `retention.simultaneous_metrics` supports at most one `return_users` metric (the default role) and one `initial_date` metric. The latter measures users on their cohort entry date. Repeated roles are rejected because the engine has one calculation slot per role.
68
+
69
+ ```json
70
+ {
71
+ "simultaneous_metrics": [
72
+ {
73
+ "role": "return_users", "event": "payment", "aggregation": "sum", "property": "amount",
74
+ "filters": [{"event_property_name": "currency", "operator": "eq", "values": ["CNY"]}],
75
+ "relation": "and", "format": "float3"
76
+ },
77
+ {
78
+ "role": "initial_date", "event": "register", "aggregation": "user_count",
79
+ "combine_operator": "DIVIDE", "initial_date_first": false, "combined_format": "float4"
80
+ }
81
+ ]
82
+ }
83
+ ```
84
+
85
+ Place this object inside `retention`. `combine_operator` belongs to `initial_date` and requires both roles; allowed values are `ADD`, `SUBTRACT`, `MULTIPLY`, and `DIVIDE`. `initial_date_first=false` puts the return-user metric first. The example divides return-user revenue by the initial-date user count. `initial_date_first` and `combined_format` require a combination operator. Number formats are `float`, `float3`, `float4`, `percent`, and `integer`.
86
+
87
+ Both roles support `formula` and `dependencies` with the same retention aggregation restrictions. Use bare aliases for new formulas. Preserve returned `formulation` and `custom_filters` when updating a saved formula; they carry the native dependency metadata and filters. Metric `filters` use event-only leaves and support recursive `items`/`relation` groups.
88
+
89
+ `relation_event_property_name` supplies a shared relation property. `initial_relation_event_property_name` and `return_relation_event_property_name` override it for the two cohort events; both must resolve whenever either is configured. A `return_users` metric can override `relation_event_property_name` for its own event. All relation properties must have compatible types; relation overrides do not apply to `initial_date`.
90
+
91
+ ## Grouping and summary settings
92
+
93
+ | Field inside `retention` | Values and meaning |
94
+ | --- | --- |
95
+ | `group_mode` | `RANGE_FIRST`: first initial event in the range; `PERIOD_FIRST`: first initial event per day/week/month; `PERIOD_EACH`: every initial event per period. Omission preserves the environment default. |
96
+ | `return_group_mode` | `RANGE_FIRST` or `RANGE_EACH` for return-event grouping. |
97
+ | `relation_property_as_group` | Whether to include the relation property in result groups; omission preserves the native default. |
98
+ | `summary_first_day_of_week` | Monday `1` through Sunday `7`, for weekly summary rows. |
99
+ | `hide_incomplete_data` | Whether to hide incomplete retention periods. |
100
+ | `only_simultaneous_metrics` | Show only simultaneous metrics; defaults to true when metrics are supplied. |
101
+ | `stage_summary` | `initial_users`, `retained_users`, and `initial_date_metric`: `sum` or `avg`; `simultaneous_metric`: `sum`, `avg`, or `weight_avg`. |
102
+
103
+ Dimension `retention_source` chooses `initial_event` or `return_event`. Preserve all returned grouping and summary settings during report edits: they affect populations and reported values. `unit_num` must be nonnegative; `stat_type` accepts only `retention` or `lost`.
60
104
 
61
105
  ## Returned rows
62
106
 
@@ -20,9 +20,27 @@ Use for revenue cohort metrics such as LTV, ROI, revenue, and cost.
20
20
  ```
21
21
 
22
22
  `cost_metric` is optional when the user does not ask for cost/ROI.
23
- `selected_metrics` supports `payUsers`, `payAmount`, `cumPayUsers`, `cumPayAmount`, `payRate`, `cumPayRate`, `ltv`, `ltvMultiple`, and `roi`.
24
- Select at most four metrics per query. The revenue service keeps only the first four supported selections and removes ROI when cost is absent. If more metrics are required, split the selections into non-overlapping batches with the same definition and scope, then join results by verified cohort/group keys. Check returned titles for every requested metric; a successful response alone does not prove full metric coverage.
23
+ `selected_metrics` supports `payUsers`, `payAmount`, `cumPayUsers`, `cumPayAmount`, `payRate`, `cumPayRate`, `ltv`, `ltvMultiple`, `rollingLtv`, and `roi`.
24
+ Select at most four metrics per query. The semantic compiler rejects more than four selections and requires `cost_metric` when `roi` is selected. If more metrics are required, split the selections into non-overlapping batches with the same definition and scope, then join results by verified cohort/group keys. Check returned titles for every requested metric; a successful response alone does not prove full metric coverage.
25
25
 
26
26
  ## Aggregation
27
27
 
28
28
  - `revenue`: without property use `total_count`, `user_count`, or `per_user_count`; numeric properties support `sum`, `avg`, `avg_per_user`, `max`, `min`, `distinct_count`, `median`, `variance`, and `stddev`; string/date/datetime properties support `distinct_count`; boolean properties support `true_count`, `false_count`, `not_empty_count`, `empty_count`, and `distinct_count`. `percentile` is not supported.
29
+
30
+ ## Formula revenue and cost metrics
31
+
32
+ Both `revenue_metric` and `cost_metric` accept a formula with alias dependencies. Omit `event`, `aggregation`, `property`, `filters`, and `relation` on formula metrics; each dependency supplies its own event and aggregation. Regular revenue metrics default to the pay event, and regular cost metrics default to the initial event when `event` is omitted.
33
+
34
+ ```json
35
+ {
36
+ "formula": "amount / users",
37
+ "dependencies": [
38
+ {"alias": "amount", "event": "purchase", "aggregation": "sum", "property": "amount"},
39
+ {"alias": "users", "event": "purchase", "aggregation": "user_count"}
40
+ ],
41
+ "name": "ARPPU",
42
+ "format": "float3"
43
+ }
44
+ ```
45
+
46
+ Number formats are `float`, `float3`, `float4`, `integer`, and `percent`. Saved formulas may contain an expanded `formula`, `formulation`, and `custom_filters`; preserve that metadata on updates. Event and regular-metric filters support recursive `items`/`relation` groups using event-property leaves. `first_day_of_week` is between 1 (Monday) and 7 (Sunday).
@@ -17,3 +17,5 @@ Use only with `analysis report create/update`; do not use with `analysis adhoc r
17
17
  ```
18
18
 
19
19
  Prefer `time_range` for new tag reports. `recent_day`, `start_time`, and `end_time` are only for report readback or precise round-trip updates.
20
+
21
+ Historical tag report `time_particle_size` accepts only `day` or omission. Other grains, including `total`, `week`, and `month`, are rejected instead of being silently converted to day. Date-tag value grouping uses the separate `time_particle` field; it does not change the historical snapshot grain. Root `first_day_of_week` applies to calendar grouping and accepts 1 through 7.