ae-analysis
This is the single entry skill for analysis intent and command execution.
Before any command
- 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 ); do not read the exhaustive index end to end.
- Read the selected command's dedicated reference before composing it:
- ->
- ->
references/dashboard_list.md
- replace hyphens with underscores in gateway filenames.
- For an AI-facing ad-hoc definition, also read .
- For cluster/tag , also read the matching
references/user_cluster_models.md
or references/user_tag_models.md
. Shared primitives live in references/audience_models.md
.
- For analysis data retrieval, choose or using
references/analysis_data_retrieval.md
.
- When an AI-QP compile failure contains , , , and , read and follow .
The generated command index is exhaustive. This file contains routing and workflow rules only; do not duplicate a hand-maintained command inventory here.
Boundaries and priority
Use this skill for these CLI services:
- : reports, dashboards, BI panels, ad-hoc analysis, drilldown, detail data, alerts, clusters, tags, and async runs/artifacts.
- : gateway metadata assets, events, properties, virtual metadata, metrics, data tables, exchange rules, and super metadata.
- : 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.
- : 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
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
is a reason to correct the input, not to switch tools.
For tags and audience clusters, use the native
and
analysis user-cluster ...
gateway commands.
Global AE CLI Rules
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 ; the CLI sends snake_case JSON.
- JSON values must be JSON string literals.
- Global flags include , , , , , and . Use alone to normalize complex capability input; use 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 run, check stderr and . If either is present, your reply MUST open with a short ⚠️ version warning and quote the / (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; 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天 -> -> QP ,含今天;过去7天/前7天 -> -> QP ,不含今天。用户明确说明是否包含今天时,以该说明为准。完整映射见 。
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:
- with empty data is success and means no matching data. Never relabel an empty report/dashboard result as query failure.
- with is partial success. Use the successful data and explicitly report ; do not fail the whole batch or hide failed items.
- is failure. Preserve , , and , , , and 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
, ae-cli generates a
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.
Execution invariants
- Probe the first page exactly once. Verify , the documented data shape, and the effective before starting a pagination loop.
- For paginated directory results, continue only with the returned while is true. Never calculate a speculative offset, repeat the current page, or declare the list complete before is false.
- Track the normalized command, input, and announced for every invocation. Never resubmit an identical invocation while it is still in flight; wait for the current process, or inspect its returned when it is asynchronous.
- Retry only the items named in , and only when their value and 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.
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 .
- The Chinese product terms and mean a BI dashboard with worksheets, charts, and pages. Route them to
ae-cli analysis bi-panel ...
and capability IDs under .
- 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 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.
Project gate
Before a project-scoped command:
- Reuse a project only when its ID and host/environment were already verified in the same continuous conversation.
- Otherwise call and resolve the supplied ID/name.
- If there are multiple plausible projects, the host is unclear, or no project matches, show the candidates and ask; never guess.
- Re-verify after the user changes project, host, or environment.
C. FUZZY_SEARCH_FALLBACK
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
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
; cluster/tag exports use
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
; the backend resolves it and returns
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
; 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,
is authoritative: collect the whole compiler error array and follow the one aggregate online search, optional full-catalog, conversation-reuse workflow in
. Never use a candidate from either path without user confirmation.
Existing business asset before ad-hoc
When the request can map to a saved business definition:
- Extract metric, dimensions, filters, time window, and comparison semantics.
- Search reports; use dashboard search only to discover candidate embedded reports.
- Read the candidate definition and verify semantic equality, not merely a similar name.
- Use report/dashboard data when the definition matches.
- 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.
is the AI-facing contract from
, not raw QP or a frontend 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 -> or .
- Events/entities from a query result -> pass the original , follow the returned synchronous 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.
Run, export, and follow-up
- is a bounded inline preview for work that can complete within the synchronous limits. Agents should normally pass ; 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.
- is for complete, unknown-size, over-limit, or long-running results. It returns and .
- Drilldown event/entity/user-event exports are full-download streams bounded by
model_full_download_limit
; never pass or simulate , , , or .
- Plain submits only. Add to wait for terminal state, or to wait and atomically stream the completed artifact; implies wait. Existing files require explicit .
- 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 command.
- and
analysis artifact download
remain primitive lifecycle commands. Do not call raw lifecycle URLs. Use only to bound local waiting; it never changes or cancels the remote runtime.
- Drilldown requires the original , 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.
Writes and destructive operations
Write only with explicit user intent. Use
alone while correcting complex input, or
alone to inspect the resolved request and execution impact; do not stack both by default. Execute
and ordinary
commands without
. For
, dry-run first, summarize the target and impact, wait for explicit user confirmation, and only then execute the unchanged command with
.
Project-space and folder create/delete/share are L3 capabilities rather than curated
commands. Read the matching command reference, then use
ae-cli capability inspect|dry-run|run
; discover
through
capability search|inspect|run
and
references/analysis_gateway_assets.md
. For
, dry-run first, summarize the impact, and execute with
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.
Analysis workflow
For a data question:
- Clarify only missing facts that change the query: KPI, scope, time window, dimensions, filters, and baseline.
- Pass the project gate.
- For AI-facing intent models, let the backend resolve event/property wording and consume ; discover metadata directly only for explicit metadata inspection, compiler clarification, or a reported resolution capability gap.
- Check existing reports/dashboards when applicable.
- Run or export one reproducible query path.
- For anomalies, compare consistent scopes, rank drivers, then drill down to users/events only when result contexts permit it.
- 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.
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.