ae-analysis

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

ae-analysis

ae-analysis

This is the single entry skill for analysis intent and command execution.
这是处理分析意图与命令执行的唯一入口技能。

Before any command

执行任何命令前

  1. If the command family is already known, open its dedicated reference directly. Otherwise search only the matching row in
    references/command_index.md
    (for example with
    rg
    ); do not read the exhaustive index end to end.
  2. Read the selected command's dedicated reference before composing it:
    • event list
      ->
      references/event_list.md
    • analysis dashboard list
      ->
      references/dashboard_list.md
    • replace hyphens with underscores in gateway filenames.
  3. For an AI-facing ad-hoc definition, also read
    references/ai_models.md
    .
  4. For cluster/tag
    --definition-request
    , also read the matching
    references/user_cluster_models.md
    or
    references/user_tag_models.md
    . Shared primitives live in
    references/audience_models.md
    .
  5. For analysis data retrieval, choose
    run
    or
    export
    using
    references/analysis_data_retrieval.md
    .
  6. When an AI-QP compile failure contains
    slot_kind
    ,
    allowed_resource_types
    ,
    search_targets
    , and
    next_action
    , read and follow
    metadata_resolution.md
    .
The generated command index is exhaustive. This file contains routing and workflow rules only; do not duplicate a hand-maintained command inventory here.
  1. 若已知命令类别,直接打开其专用参考文档;否则仅在
    references/command_index.md
    中搜索匹配行(例如使用
    rg
    工具),无需通读完整索引。
  2. 在编写命令前,先阅读对应命令的专用参考文档:
    • event list
      ->
      references/event_list.md
    • analysis dashboard list
      ->
      references/dashboard_list.md
    • 网关文件名中的连字符需替换为下划线。
  3. 若涉及面向AI的临时定义,还需阅读
    references/ai_models.md
  4. 若为集群/标签的
    --definition-request
    ,还需阅读对应的
    references/user_cluster_models.md
    references/user_tag_models.md
    。通用基础定义见
    references/audience_models.md
  5. 对于分析数据检索,需参考
    references/analysis_data_retrieval.md
    选择
    run
    export
    命令。
  6. 若AI-QP编译失败信息包含
    slot_kind
    allowed_resource_types
    search_targets
    next_action
    ,需阅读并遵循
    metadata_resolution.md
    中的指引。
生成的命令索引已涵盖所有内容。本文档仅包含路由与工作流规则,请勿在此处手动维护命令清单。

Boundaries and priority

边界与优先级

Use this skill for these CLI services:
  • analysis
    : reports, dashboards, BI panels, ad-hoc analysis, drilldown, detail data, alerts, clusters, tags, and async runs/artifacts.
  • analysis-meta
    : gateway metadata assets, events, properties, virtual metadata, metrics, data tables, exchange rules, and super metadata.
  • 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.
  • tracking
    : gateway tracking plan, checking, ingest, live-data, and event blacklist operations.
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.
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 the gap and stop or provide framework-level guidance; do not switch to direct MCP execution. Repeated failures are not evidence of a capability gap until parameters, types, time formats, permissions, timeout choice, and payload construction have been checked. A validation error or
need_clarification
is a reason to correct the input, not to switch tools.
For tags and audience clusters, use the native
analysis user-tag ...
and
analysis user-cluster ...
gateway commands.
本技能适用于以下CLI服务:
  • analysis
    :报表、仪表盘、BI面板、临时分析、下钻分析、明细数据、告警、集群、标签,以及异步运行/工件。
  • analysis-meta
    :网关元数据资产、事件、属性、虚拟元数据、指标、数据表、交换规则和超级元数据。
  • analysis-governance
    :网关资产治理操作,包括治理资产列表/导出、血缘关系、依赖关系、影响分析、查询历史、规则 schema/列表/创建/更新/删除、批量资产操作及操作记录。此服务仅用于资产治理工作流,不处理元数据事件/属性/指标的增删改查。
  • tracking
    :网关追踪计划、校验、数据摄入、实时数据及事件黑名单操作。
若需处理生成索引中未涵盖的元数据网关细节,请使用元数据技能。若涉及Engage、DataOps或社区相关工作,请使用对应技能。
本技能仅通过
ae-cli
执行命令。若命令缺失、不支持、未实现或确认存在能力缺口,需报告缺口并停止操作或提供框架级指导;请勿切换至直接MCP执行。在检查完参数、类型、时间格式、权限、超时选项及负载构造前,重复失败不能作为能力缺口的证据。验证错误或
need_clarification
是修正输入的理由,而非切换工具的依据。
对于标签和受众集群,请使用原生的
analysis user-tag ...
analysis user-cluster ...
网关命令。

Global AE CLI Rules

全局AE CLI规则

Command forms:
bash
ae-cli analysis <resource> <action> [options]
ae-cli analysis-meta <resource> <action> [options]
ae-cli analysis-governance <resource> <action> [options]
ae-cli tracking <resource> <action> [options]
ae-cli capability search|inspect|validate|dry-run|run [options]
  • Gateway commands use kebab-case flags such as
    --project-id
    ; the CLI sends snake_case JSON.
  • JSON values must be JSON string literals.
  • Global flags include
    --host
    ,
    --format json|table
    ,
    --jq
    ,
    --validate
    ,
    --dry-run
    , and
    --yes
    . Use
    --validate
    alone to normalize complex capability input; use
    --dry-run
    alone for execution or risk preview.
  • JSON is the default machine-readable output. On failure, preserve the structured error and non-zero exit.
  • CRITICAL — Host compat (do this first): After each
    ae-cli
    run, check stderr and
    _notice.host_compat
    . If either is present, your reply MUST open with a short ⚠️ version warning and quote the
    npm i -g
    /
    npx skills add
    (or update-cluster) lines verbatim
    , then present the business result. Never answer with only a project/table summary when a host_compat notice exists. Soft tip;
    ok: true
    can still carry the notice.
  • Never invent command names, flags, payload fields, projects, resource IDs, asset names, event/property names, metric definitions, or dates.
  • 中文时间表达必须按固定语义映射:最近7天/近7天 ->
    mode=recent
    -> QP
    recentDay=0-7
    ,含今天;过去7天/前7天 ->
    mode=previous
    -> QP
    recentDay=1-7
    ,不含今天。用户明确说明是否包含今天时,以该说明为准。完整映射见
    references/ai_models.md
CAPABILITY_NOT_FOUND
means the current host does not expose that gateway capability; changing parameters will not fix it. A permission error stops any dependent chain. A 404 while inspecting an async run is a route/deployment failure; do not poll the same ID forever.
Interpret gateway envelopes by state:
  • ok: true
    with empty data is success and means no matching data. Never relabel an empty report/dashboard result as query failure.
  • ok: true
    with
    meta.partial: true
    is partial success. Use the successful data and explicitly report
    meta.failures
    ; do not fail the whole batch or hide failed items.
  • ok: false
    is failure. Preserve
    error.code
    ,
    error.message
    , and
    meta.request_id
    ,
    meta.invocation_id
    ,
    meta.stage
    , and
    meta.failures
    when present.
  • Do not retry an unchanged failed command or guess alternative payload shapes. Retry only after applying concrete validation/clarification guidance or correcting a verified transient condition.
For every gateway command that exposes
--request-id
, ae-cli generates a
request_id
and prints it to stderr before dispatch when the caller omits it. Preserve that ID with the final envelope and diagnostics. Pass an explicit
--request-id cli_<32 lowercase hex>
only when a caller-owned correlation ID is required.
命令格式:
bash
ae-cli analysis <resource> <action> [options]
ae-cli analysis-meta <resource> <action> [options]
ae-cli analysis-governance <resource> <action> [options]
ae-cli tracking <resource> <action> [options]
ae-cli capability search|inspect|validate|dry-run|run [options]
  • 网关命令使用短横线命名法(kebab-case)的标志,例如
    --project-id
    ;CLI会将其转换为蛇形命名法(snake_case)的JSON格式发送。
  • JSON值必须为JSON字符串字面量。
  • 全局标志包括
    --host
    --format json|table
    --jq
    --validate
    --dry-run
    --yes
    。单独使用
    --validate
    可规范化复杂的能力输入;单独使用
    --dry-run
    可预览执行或风险。
  • JSON是默认的机器可读输出格式。执行失败时,需保留结构化错误信息及非零退出码。
  • 关键——主机兼容性(优先处理):每次
    ae-cli
    运行后,检查stderr和
    _notice.host_compat
    。若存在其中任意一项,回复必须以简短的⚠️版本警告开头,并逐字引用
    npm i -g
    /
    npx skills add
    (或update-cluster)命令行
    ,然后再展示业务结果。当存在host_compat通知时,绝不能仅返回项目/表格摘要。注意:即使
    ok: true
    仍可能携带该通知。
  • 不得自行发明命令名称、标志、负载字段、项目、资源ID、资产名称、事件/属性名称、指标定义或日期。
  • 中文时间表达必须按固定语义映射:最近7天/近7天 ->
    mode=recent
    -> QP
    recentDay=0-7
    ,含今天;过去7天/前7天 ->
    mode=previous
    -> QP
    recentDay=1-7
    ,不含今天。用户明确说明是否包含今天时,以用户说明为准。完整映射见
    references/ai_models.md
CAPABILITY_NOT_FOUND
表示当前主机未暴露该网关能力,修改参数无法解决此问题。权限错误会终止所有依赖链。检查异步运行时出现404错误属于路由/部署失败,请勿持续轮询同一ID。
根据状态解析网关信封:
  • ok: true
    且数据为空表示执行成功,意味着无匹配数据。绝不能将空报表/仪表盘结果标记为查询失败。
  • ok: true
    meta.partial: true
    表示部分成功。需使用成功数据并明确报告
    meta.failures
    ;不得终止整个批量操作或隐藏失败项。
  • ok: false
    表示执行失败。若存在
    error.code
    error.message
    meta.request_id
    meta.invocation_id
    meta.stage
    meta.failures
    ,需全部保留。
  • 不得重试未修改的失败命令或猜测替代负载格式。仅在应用具体的验证/澄清指引或修正已确认的临时问题后,方可重试。
对于所有支持
--request-id
的网关命令,若调用者未提供该参数,ae-cli会生成一个
request_id
并在调度前打印至stderr。需将该ID与最终信封及诊断信息一同保留。仅当需要调用者提供的关联ID时,才需显式传递
--request-id cli_<32位小写十六进制字符串>

Execution invariants

执行不变量

  • Probe the first page exactly once. Verify
    ok
    , the documented data shape, and the effective
    limit
    before starting a pagination loop.
  • For paginated directory results, continue only with the returned
    next_offset
    while
    has_more
    is true. Never calculate a speculative offset, repeat the current page, or declare the list complete before
    has_more
    is false.
  • Track the normalized command, input, and announced
    request_id
    for every invocation. Never resubmit an identical invocation while it is still in flight; wait for the current process, or inspect its returned
    run_id
    when it is asynchronous.
  • Retry only the items named in
    meta.failures
    , and only when their
    retryable
    value and
    next_action
    permit it. Never retry successful or empty items from the same batch.
  • For black-box coverage audits, maintain an explicit module × model × outcome matrix. Mark coverage complete only from observed responses; missing assets, permissions, or fixtures are environment gaps, not passing coverage.
  • 仅精确探测第一页数据。在开始分页循环前,需验证
    ok
    状态、文档化的数据格式及实际生效的
    limit
    值。
  • 对于分页目录结果,仅当
    has_more
    为true时,使用返回的
    next_offset
    继续分页。绝不能计算推测性偏移量、重复当前页面,或在
    has_more
    变为false前宣布列表已完成。
  • 需追踪每次调用的规范化命令、输入及公布的
    request_id
    。当前调用仍在执行时,不得重新提交完全相同的调用;需等待当前进程完成,或对于异步调用,检查其返回的
    run_id
  • 仅重试
    meta.failures
    中指定的项,且仅当该项的
    retryable
    值和
    next_action
    允许时方可重试。不得重试同一批量操作中的成功项或空项。
  • 对于黑盒覆盖审计,需维护明确的模块×模型×结果矩阵。仅当从观测响应中确认覆盖完成时,方可标记为覆盖完成;缺失资产、权限或测试环境属于环境缺口,不能视为覆盖通过。

Mandatory routing

强制路由规则

Product terminology gate

产品术语网关

  • The Chinese product term
    看板
    means an analysis board backed by saved reports. Route it to
    ae-cli analysis dashboard ...
    and capability IDs under
    analysis.dashboard.*
    .
  • The Chinese product terms
    仪表盘
    and
    BI 仪表盘
    mean a BI dashboard with worksheets, charts, and pages. Route them to
    ae-cli analysis bi-panel ...
    and capability IDs under
    analysis.bi_panel.*
    .
  • These assets are not aliases. Never substitute an analysis board for a BI dashboard, or a BI dashboard for an analysis board.
  • The standalone English word
    dashboard
    is ambiguous in this product. Before a write, ask whether the user means an analysis board (
    看板
    ) or a BI dashboard (
    仪表盘
    ) unless the surrounding context already makes the product asset explicit.
  • If the requested BI-panel capability is unavailable or unauthorized, report that constraint. Do not fall back to creating an analysis board.
  • 中文产品术语
    看板
    指由已保存报表支撑的分析看板,需路由至
    ae-cli analysis dashboard ...
    analysis.dashboard.*
    下的能力ID。
  • 中文产品术语
    仪表盘
    BI 仪表盘
    指包含工作表、图表和页面的BI仪表盘,需路由至
    ae-cli analysis bi-panel ...
    analysis.bi_panel.*
    下的能力ID。
  • 这些资产并非别名。绝不能用分析看板替代BI仪表盘,也不能用BI仪表盘替代分析看板。
  • 在本产品中,单独的英文单词
    dashboard
    含义模糊。在执行写入操作前,需询问用户指的是分析看板(
    看板
    )还是BI仪表盘(
    仪表盘
    ),除非上下文已明确指明产品资产类型。
  • 若请求的BI-panel能力不可用或未授权,需报告该限制。不得退而求其次创建分析看板。

Project gate

项目网关

Before a project-scoped command:
  1. Reuse a project only when its ID and host/environment were already verified in the same continuous conversation.
  2. Otherwise call
    project info list
    and resolve the supplied ID/name.
  3. If there are multiple plausible projects, the host is unclear, or no project matches, show the candidates and ask; never guess.
  4. Re-verify after the user changes project, host, or environment.
在执行项目范围的命令前:
  1. 仅当项目ID及主机/环境在同一场连续对话中已验证时,方可复用该项目。
  2. 否则调用
    project info list
    并解析提供的ID/名称。
  3. 若存在多个可能的项目、主机不明确或无匹配项目,需展示候选项目并询问用户;绝不能猜测。
  4. 用户更改项目、主机或环境后,需重新验证。

C. FUZZY_SEARCH_FALLBACK

C. 模糊搜索回退

For saved-asset operations on reports, dashboards, metrics, clusters, tags, and alerts, use the relevant list/search command first unless an exact ID or canonical asset name was already verified. For event, property, metric, cluster, and tag catalogs, put the user's phrase and its useful synonyms in one
--queries
JSON array; matching is OR across at most 20 keywords. For ordinary asset discovery, broaden the keyword batch up to two times, then list all candidates. If no resource exists, stop instead of fabricating one.
Only when explicitly complete event, property, metric, cluster, or tag metadata is needed, use that resource's
export --output <temporary_path>/<resource>
command. Event/property/metric exports use
.json
; cluster/tag exports use
.jsonl
and an integrity sidecar. Search the temporary file locally and keep the full rows out of model context. Do not page repeatedly to synthesize a complete catalog.
Do not pre-list events or properties before constructing an AI-facing intent model. Pass the user's wording directly in
definition
; the backend resolves it and returns
resolved
evidence. Call event/property metadata commands only when the user explicitly asks to inspect metadata, a structured compiler error instructs
next_action=search_candidates
, or the compiler reports an explicit metadata-resolution capability gap. When compiler candidates already exist, ask the user to confirm without another metadata call. If the user explicitly rejects every candidate for that path, treat the rejected set as exhausted and continue through the one aggregate-search workflow in
metadata_resolution.md
; do not terminate the original task or repeat the rejected candidates.
The generic saved-asset search rule above does not control structured AI-QP metadata failures. For those failures,
allowed_resource_types
is authoritative: collect the whole compiler error array and follow the one aggregate online search, optional full-catalog, conversation-reuse workflow in
metadata_resolution.md
. Never use a candidate from either path without user confirmation.
对于报表、仪表盘、指标、集群、标签和告警的已保存资产操作,除非已验证精确ID或规范资产名称,否则需先使用相关的列表/搜索命令。对于事件、属性、指标、集群和标签目录,需将用户的表述及其有用同义词放入一个
--queries
JSON数组中;匹配时最多包含20个关键词,采用OR逻辑。对于普通资产发现,可将关键词范围扩大最多两次,然后列出所有候选项目。若无匹配资源,需停止操作,不得虚构资源。
仅当明确需要完整的事件、属性、指标、集群或标签元数据时,才使用该资源的
export --output <temporary_path>/<resource>
命令。事件/属性/指标导出使用
.json
格式;集群/标签导出使用
.jsonl
格式及完整性副文件。需在本地搜索临时文件,避免将完整行数据带入模型上下文。不得通过多次分页来合成完整目录。
在构建面向AI的意图模型前,无需预先列出事件或属性。直接将用户表述传入
definition
;后端会解析并返回
resolved
证据。仅当用户明确要求查看元数据、结构化编译器错误指示
next_action=search_candidates
或编译器报告明确的元数据解析能力缺口时,才调用事件/属性元数据命令。若编译器已提供候选项,需询问用户确认,无需再次调用元数据命令。若用户明确拒绝该路径下的所有候选项,需将被拒绝的集合视为已穷尽,并继续执行
metadata_resolution.md
中的聚合搜索工作流;不得终止原始任务或重复展示被拒绝的候选项。
上述通用已保存资产搜索规则不适用于结构化AI-QP元数据失败场景。对于此类失败,
allowed_resource_types
为权威依据:需收集完整的编译器错误数组,并遵循
metadata_resolution.md
中的聚合在线搜索、可选全目录搜索、对话复用工作流。未获得用户确认前,不得使用任一路径下的候选项。

Existing business asset before ad-hoc

优先使用现有业务资产而非临时资产

When the request can map to a saved business definition:
  1. Extract metric, dimensions, filters, time window, and comparison semantics.
  2. Search reports; use dashboard search only to discover candidate embedded reports.
  3. Read the candidate definition and verify semantic equality, not merely a similar name.
  4. Use report/dashboard data when the definition matches.
  5. Use
    analysis adhoc run|export
    when no definition matches, the user explicitly requests ad-hoc exploration, or custom grouping/filtering is required.
Do not call removed QP builders or schema helpers for ad-hoc analysis.
--definition
is the AI-facing contract from
ai_models.md
, not raw QP or a frontend DTO.
当请求可映射至已保存的业务定义时:
  1. 提取指标、维度、过滤器、时间窗口及对比语义。
  2. 搜索报表;仅使用仪表盘搜索来发现候选嵌入式报表。
  3. 读取候选定义并验证语义等价性,而非仅匹配相似名称。
  4. 若定义匹配,使用报表/仪表盘数据。
  5. 若无匹配定义、用户明确要求临时探索或需要自定义分组/过滤时,使用
    analysis adhoc run|export
    命令。
不得为临时分析调用已移除的QP构建器或schema助手。
--definition
ai_models.md
中定义的面向AI的契约,而非原始QP或前端DTO。

Result data versus metadata

结果数据与元数据区分

  • Metric value, trend, comparison, or anomaly -> saved report/dashboard first, then ad-hoc data.
  • Metric definition search/create/update -> metadata commands.
  • Event/entity rows ->
    event-detail run|export
    or
    entity-detail run|export
    .
  • Events/entities from a query result -> pass the original
    --project-id
    , follow the returned synchronous
    query_context_id
    and compact source action summary, then call
    analysis query-context get
    for full coordinate options; never reconstruct raw QP or use export rows as coordinates.
  • Cluster/tag definition -> matching gateway cluster/tag commands and matching model reference.
  • Tag/cluster candidate values, including requests phrased as "latest version" or "latest result" -> resolve the exact asset, then use
    analysis filter-value list
    with
    cluster_date_policy=LATEST
    . This means the latest computed data snapshot, never a definition or configuration release; do not invent version lists, version IDs, draft states, or publish states.
  • Alert/configuration/tracking-plan requests -> the dedicated gateway command reference from the index.
  • 指标值、趋势、对比或异常 -> 优先使用已保存的报表/仪表盘,再使用临时数据。
  • 指标定义搜索/创建/更新 -> 使用元数据命令。
  • 事件/实体行数据 -> 使用
    event-detail run|export
    entity-detail run|export
  • 查询结果中的事件/实体 -> 传入原始
    --project-id
    ,遵循返回的同步
    query_context_id
    及紧凑的源操作摘要,然后调用
    analysis query-context get
    获取完整坐标选项;不得重构原始QP或使用导出行作为坐标。
  • 集群/标签定义 -> 使用匹配的网关集群/标签命令及模型参考文档。
  • 标签/集群候选值,包括表述为“最新版本”或“最新结果”的请求 -> 解析精确资产,然后使用
    analysis filter-value list
    并设置
    cluster_date_policy=LATEST
    。这表示最新计算的数据快照,而非定义或配置版本;不得自行创建版本列表、版本ID、草稿状态或发布状态。
  • 告警/配置/追踪计划请求 -> 使用索引中的专用网关命令参考文档。

Run, export, and follow-up

运行、导出与后续操作

  • run
    is a bounded inline preview for work that can complete within the synchronous limits. Agents should normally pass
    --preview-rows 100
    ; omitting it deliberately uses the model's current cluster-configured synchronous limit. User tag/cluster member list commands are the exception: omission defaults to 1000 rows, matching the UI member query.
  • export
    is for complete, unknown-size, over-limit, or long-running results. It returns
    run_id
    and
    artifact_id
    .
  • Drilldown event/entity/user-event exports are
    csv.gz
    full-download streams bounded by
    model_full_download_limit
    ; never pass or simulate
    limit
    ,
    offset
    ,
    page_num
    , or
    page_size
    .
  • Plain
    export
    submits only. Add
    --wait
    to wait for terminal state, or
    --output <file>
    to wait and atomically stream the completed artifact;
    --output
    implies wait. Existing files require explicit
    --force
    .
  • Resume detached or interrupted work with
    analysis run wait --run-id <run_id> [--output <file>]
    . Local interruption never cancels the remote run; cancel only through the explicit
    analysis query cancel
    command.
  • analysis run inspect
    and
    analysis artifact download
    remain primitive lifecycle commands. Do not call raw lifecycle URLs. Use
    --wait-timeout-seconds
    only to bound local waiting; it never changes or cancels the remote runtime.
  • Drilldown requires the original
    --project-id
    , a synchronous preview context, and row/column/metric coordinate options fetched with
    analysis query-context get
    . Common rejects a project ID that does not match the stored context. If the context/options are absent or the action is not advertised, report that drilldown/result-cluster creation is unavailable.
  • run
    是有界的内联预览,适用于可在同步限制内完成的工作。Agent通常应传递
    --preview-rows 100
    ;若省略该参数,则使用模型当前集群配置的同步限制。用户标签/集群成员列表命令除外:省略该参数默认返回1000行,与UI成员查询一致。
  • export
    适用于完整、未知大小、超出限制或长时间运行的结果。该命令返回
    run_id
    artifact_id
  • 下钻事件/实体/用户事件导出为
    csv.gz
    格式的完整下载流,受
    model_full_download_limit
    限制;不得传递或模拟
    limit
    offset
    page_num
    page_size
    参数。
  • 普通
    export
    仅提交任务。添加
    --wait
    可等待终端状态,或添加
    --output <file>
    可等待并原子化流式传输完成的工件;
    --output
    隐含
    --wait
    。若文件已存在,需显式传递
    --force
  • 可使用
    analysis run wait --run-id <run_id> [--output <file>]
    恢复已分离或中断的工作。本地中断不会取消远程运行;仅可通过显式的
    analysis query cancel
    命令取消。
  • analysis run inspect
    analysis artifact download
    仍是原始生命周期命令。不得调用原始生命周期URL。仅可使用
    --wait-timeout-seconds
    限制本地等待时间;该参数不会更改或取消远程运行时长。
  • 下钻分析需要原始
    --project-id
    、同步预览上下文及通过
    analysis query-context get
    获取的行/列/指标坐标选项。若上下文/选项缺失或操作未被支持,需报告下钻分析/结果集群创建不可用。

Writes and destructive operations

写入与破坏性操作

Write only with explicit user intent. Use
--validate
alone while correcting complex input, or
--dry-run
alone to inspect the resolved request and execution impact; do not stack both by default. Execute
read
and ordinary
write
commands without
--yes
. For
high-risk-write
, dry-run first, summarize the target and impact, wait for explicit user confirmation, and only then execute the unchanged command with
--yes
.
Project-space and folder create/delete/share are L3 capabilities rather than curated
analysis
commands. Read the matching command reference, then use
ae-cli capability inspect|dry-run|run
; discover
*.members
through
capability search|inspect|run
and
references/analysis_gateway_assets.md
. For
risk=high-risk-write
, dry-run first, summarize the impact, and execute with
--yes
only after a later explicit confirmation.
After a successful create/update, if a resource ID and supported resource type are available, call
analysis-meta asset url-get
and return the link. Explicitly state when link generation is skipped because no resource ID exists or when it fails.
仅当用户明确表达意图时,方可执行写入操作。在修正复杂输入时,单独使用
--validate
;或单独使用
--dry-run
检查解析后的请求及执行影响;默认不得同时使用两者。执行
read
和普通
write
命令时无需
--yes
。对于
high-risk-write
操作,需先执行dry-run,总结目标及影响,等待用户明确确认,然后再执行未修改的命令并添加
--yes
项目空间和文件夹的创建/删除/共享属于L3能力,而非预设的
analysis
命令。需先阅读匹配的命令参考文档,然后使用
ae-cli capability inspect|dry-run|run
;通过
capability search|inspect|run
references/analysis_gateway_assets.md
发现
*.members
。对于
risk=high-risk-write
操作,需先执行dry-run,总结影响,仅在获得用户明确确认后,再添加
--yes
执行。
成功创建/更新后,若资源ID及支持的资源类型可用,需调用
analysis-meta asset url-get
并返回链接。若因无资源ID或生成失败而跳过链接生成,需明确说明。

Analysis workflow

分析工作流

For a data question:
  1. Clarify only missing facts that change the query: KPI, scope, time window, dimensions, filters, and baseline.
  2. Pass the project gate.
  3. For AI-facing intent models, let the backend resolve event/property wording and consume
    resolved
    ; discover metadata directly only for explicit metadata inspection, compiler clarification, or a reported resolution capability gap.
  4. Check existing reports/dashboards when applicable.
  5. Run or export one reproducible query path.
  6. For anomalies, compare consistent scopes, rank drivers, then drill down to users/events only when result contexts permit it.
  7. Return conclusion, evidence, limitations, and a concrete next action.
For attribution, use the algorithms and self-checks in
references/analysis_interpretation.md
. The main driver is determined by absolute contribution, not the largest relative growth rate.
处理数据问题时:
  1. 仅澄清会改变查询结果的缺失信息:KPI、范围、时间窗口、维度、过滤器及基线。
  2. 通过项目网关验证。
  3. 对于面向AI的意图模型,由后端解析事件/属性表述并使用
    resolved
    结果;仅在明确要求查看元数据、编译器需要澄清或报告解析能力缺口时,才直接查询元数据。
  4. 适用时检查现有报表/仪表盘。
  5. 运行或导出一条可复现的查询路径。
  6. 对于异常情况,对比一致范围,排序驱动因素,仅当结果上下文允许时,才下钻至用户/事件层面。
  7. 返回结论、证据、局限性及具体的下一步操作。
进行归因分析时,需使用
references/analysis_interpretation.md
中的算法及自检步骤。主要驱动因素由绝对贡献值决定,而非最大相对增长率。

Output requirements

输出要求

  • Lead with the conclusion.
  • Include the metric, time window, dimension/filter scope, value, and baseline needed to reproduce it.
  • Separate observed evidence from inferred causes and state uncertainty.
  • For attribution, include total absolute/percentage change and dimension contributions sorted by absolute delta; verify the contribution sum.
  • Do not return an unexplained raw table.
  • State missing data, definition, permission, or capability constraints explicitly.
  • 以结论开头。
  • 包含重现结果所需的指标、时间窗口、维度/过滤器范围、数值及基线。
  • 将观测证据与推断原因分开,并说明不确定性。
  • 归因分析需包含总绝对/百分比变化及按绝对增量排序的维度贡献值;需验证贡献值之和。
  • 不得返回未解释的原始表格。
  • 需明确说明缺失数据、定义、权限或能力限制。

Maintenance

维护

When commands change, update source command metadata and the dedicated reference, then run:
bash
npm run generate:analysis-skill
npm run verify:analysis-skill
npm run verify:analysis-tools
The verification fails for missing command references, retired/orphan command references, or a stale generated index.
当命令变更时,需更新源命令元数据及专用参考文档,然后运行:
bash
npm run generate:analysis-skill
npm run verify:analysis-skill
npm run verify:analysis-tools
若存在缺失的命令参考文档、已废弃/孤立的命令参考文档或过期的生成索引,验证会失败。