@thinkingai/ae-cli 6.1.25 → 6.1.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +28 -9
- package/README.zh.md +25 -9
- package/bin/ae-cli.js +6 -1
- package/cli-installation-guide.md +91 -0
- package/dist/{auth-LHM7NQPR.js → auth-WA7YGGRT.js} +6 -8
- package/dist/automation-VAAQBM7Y.js +459 -0
- package/dist/{capability-SJI5KOCK.js → capability-GAAYJ3IQ.js} +6 -6
- package/dist/{chunk-KJDOTPYU.js → chunk-3YVEAZUN.js} +59 -26
- package/dist/{chunk-KS4DE3MX.js → chunk-5XJYLEVC.js} +4 -4
- package/dist/{chunk-BW7JUDEI.js → chunk-6VNIR4AP.js} +514 -213
- package/dist/{chunk-5XRQ3CZR.js → chunk-7KU2WNQE.js} +43 -8
- package/dist/{chunk-7WZACOAI.js → chunk-AP7YP2NX.js} +2 -2
- package/dist/{chunk-XKIW3QMF.js → chunk-AQJPNWZF.js} +3 -3
- package/dist/chunk-CI24BDR2.js +43 -0
- package/dist/{chunk-SO5LKIWP.js → chunk-CT7QDJS6.js} +2 -2
- package/dist/{chunk-DU72X2IO.js → chunk-GHXZK54S.js} +22 -10
- package/dist/{chunk-2FJM4HRV.js → chunk-MWIA43UJ.js} +3 -3
- package/dist/{chunk-N4BLPJC7.js → chunk-OP44TT4H.js} +1 -1
- package/dist/chunk-Q5US7JC5.js +133 -0
- package/dist/chunk-RK6GLDGI.js +27 -0
- package/dist/chunk-RPBOAQQQ.js +56 -0
- package/dist/{chunk-GK7WDY7E.js → chunk-S6M42KND.js} +1 -1
- package/dist/{chunk-QYXDJOLA.js → chunk-VZZNLV3I.js} +19 -11
- package/dist/{chunk-YVGXGTD6.js → chunk-WNGFSIOB.js} +7 -1
- package/dist/{chunk-IG3DYEIR.js → chunk-ZL7SGNIA.js} +5 -3
- package/dist/{community-report-client-6VJDDMJJ.js → community-report-client-PEERQCX2.js} +1 -1
- package/dist/{config-XQWOPDHN.js → config-JOD5DOPE.js} +4 -4
- package/dist/context-NGVFPCBK.js +136 -0
- package/dist/{data-integration-XBTCGXQT.js → data-integration-BCLQFTGU.js} +6 -6
- package/dist/index.js +123 -46
- package/dist/{local-data-upload-client-3P7NIVQ4.js → local-data-upload-client-TWMHFLUA.js} +1 -1
- package/dist/memory-CQKH2JAV.js +580 -0
- package/dist/{metadata-JRYKNUS5.js → metadata-NR3PHR23.js} +7 -7
- package/dist/{model-ZS7HVGKN.js → model-VX5M2CJ6.js} +9 -5
- package/dist/{personal-semantic-preference-IDE2GE5T.js → personal-semantic-preference-2RAI36P3.js} +117 -11
- package/dist/{project-semantic-36KOCYN7.js → project-semantic-3BUGP3ZM.js} +6 -6
- package/dist/{sync-EQLSTUS7.js → sync-RZIAV37C.js} +12 -8
- package/dist/{te-agent-Z3HCTKR7.js → te-agent-AORRE2FM.js} +90 -454
- package/dist/{te-analysis-5ZZ6YHVH.js → te-analysis-GP7DSQ7Q.js} +297 -20
- package/dist/{te-community-Z7JACGF3.js → te-community-42M7ICDO.js} +3 -3
- package/dist/{te-dataops-F7GQOIS6.js → te-dataops-BNKNZ4F2.js} +5 -5
- package/dist/{te-engage-RNRMYDO3.js → te-engage-2CO6LRCX.js} +6 -6
- package/dist/{te-experiment-BTAC2UNK.js → te-experiment-652CLXMU.js} +6 -6
- package/dist/{te-kb-QJLJEX5K.js → te-kb-ULATOTQ3.js} +494 -214
- package/dist/{te-system-IXC43QHZ.js → te-system-UGHVKBVV.js} +10 -9
- package/dist/{te-team-BIZIKIHZ.js → te-team-YA6SNOJ3.js} +6 -6
- package/dist/things-DTCOQIQB.js +1091 -0
- package/dist/{update-W2SGQNKT.js → update-ESNYKUVR.js} +59 -51
- package/dist/workspace-JEOHKFPX.js +554 -0
- package/package.json +21 -9
- package/skills/ae-agent/SKILL.md +91 -139
- package/skills/ae-agent/references/add-model.md +1 -1
- package/skills/ae-agent/references/create-agent.md +1 -1
- package/skills/ae-agent/references/find-archived-conversations.md +12 -5
- package/skills/ae-agent/references/get-agent.md +1 -1
- package/skills/ae-agent/references/list-agents.md +2 -2
- package/skills/ae-agent/references/list-models.md +2 -2
- package/skills/ae-agent/references/restore-conversation.md +3 -1
- package/skills/ae-analysis/SKILL.md +15 -6
- package/skills/ae-analysis/references/ai_models/funnel.md +5 -3
- package/skills/ae-analysis/references/ai_models.md +27 -0
- package/skills/ae-analysis/references/command_index.md +12 -4
- package/skills/ae-analysis/references/dashboard_move.md +21 -0
- package/skills/ae-analysis/references/dashboard_report_add.md +2 -0
- package/skills/ae-analysis/references/dashboard_report_get.md +19 -0
- package/skills/ae-analysis/references/dashboard_report_update.md +27 -0
- package/skills/ae-analysis/references/dashboard_update.md +1 -1
- package/skills/ae-analysis/references/event_report_presentation.md +76 -0
- package/skills/ae-analysis/references/feedback_submit.md +37 -0
- package/skills/ae-analysis/references/metadata_resolution.md +15 -0
- package/skills/ae-analysis/references/personal_semantic_preference_review.md +9 -0
- package/skills/ae-analysis/references/personal_semantic_preference_review_list.md +7 -0
- package/skills/ae-analysis/references/personal_semantic_preference_submit.md +7 -0
- package/skills/ae-analysis/references/project_semantic_knowledge_wiki.md +68 -27
- package/skills/ae-analysis/references/project_semantic_knowledge_wiki_plan_schema.md +40 -1
- package/skills/ae-analysis/references/report_create.md +13 -3
- package/skills/ae-analysis/references/report_get.md +5 -1
- package/skills/ae-analysis/references/report_update.md +15 -4
- package/skills/ae-analysis/references/system_query_monitor_overview.md +2 -0
- package/skills/ae-analysis/references/system_query_task_cancel.md +2 -0
- package/skills/ae-analysis/references/system_query_task_export.md +6 -2
- package/skills/ae-analysis/references/system_query_task_get.md +2 -0
- package/skills/ae-analysis/references/system_query_task_list.md +7 -3
- package/skills/ae-analysis/references/system_query_task_options.md +2 -2
- package/skills/ae-analysis/references/system_query_task_realtime_list.md +15 -0
- package/skills/ae-analysis/references/user_tag_models.md +2 -0
- package/skills/ae-analysis/scripts/project-semantic-knowledge-wiki/build-empty-skeleton.mjs +105 -0
- package/skills/ae-analysis/scripts/project-semantic-knowledge-wiki/build-project-semantic-wiki.mjs +337 -22
- package/skills/ae-analysis/scripts/project-semantic-knowledge-wiki/company-kb.mjs +21 -8
- package/skills/ae-analysis/scripts/project-semantic-knowledge-wiki/default-compile-rules.md +24 -11
- package/skills/ae-analysis/scripts/project-semantic-knowledge-wiki/default-compile-schema.md +66 -0
- package/skills/ae-analysis/scripts/project-semantic-knowledge-wiki/generate-build-ir.mjs +1 -0
- package/skills/ae-analysis/scripts/project-semantic-knowledge-wiki/package-wiki-source-zip.mjs +109 -40
- package/skills/ae-analysis/scripts/project-semantic-knowledge-wiki/plan-kb-source-sync.mjs +1 -1
- package/skills/ae-analysis/scripts/project-semantic-knowledge-wiki/prepare-compile-schema.mjs +64 -0
- package/skills/ae-analysis/scripts/project-semantic-knowledge-wiki/refresh-state-parts.mjs +91 -0
- package/skills/ae-automation/SKILL.md +16 -0
- package/skills/ae-automation/references/cli.md +53 -0
- package/skills/ae-automation/references/command_index.md +17 -0
- package/skills/ae-capability/SKILL.md +15 -6
- package/skills/ae-current-context/SKILL.md +3 -2
- package/skills/ae-kb/SKILL.md +62 -12
- package/skills/ae-kb/references/analysis-workflow.md +73 -36
- package/skills/ae-kb/references/query-workflow.md +67 -33
- package/skills/ae-kb/references/schema-import.md +5 -3
- package/skills/ae-kb/references/source-mutations.md +6 -4
- package/skills/ae-kb/references/text-sources.md +53 -0
- package/skills/ae-kb-discovery/SKILL.md +1 -1
- package/skills/ae-team/SKILL.md +23 -17
- package/skills/ae-things/SKILL.md +85 -0
- package/skills/ae-things/references/cli.md +103 -0
- package/skills/ae-things-progress/SKILL.md +43 -0
- package/skills/ae-things-review/SKILL.md +42 -0
- package/skills/ae-workspace/SKILL.md +43 -0
- package/skills/ae-workspace/references/commands.md +51 -0
- package/dist/chunk-E2JKXMVO.js +0 -29
- package/dist/context-M3HDGEIR.js +0 -46
- package/dist/memory-6APEB2JB.js +0 -892
- package/skills/ae-agent/references/create-automation.md +0 -125
- package/skills/ae-agent/references/list-automations.md +0 -56
- package/skills/ae-agent/references/update-automation.md +0 -107
|
@@ -2,6 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
Reuse verified assets, canonical names and business meanings in the current project. Use this workflow for missing definitions or metadata; discovery is complete when the requested measure can be constructed or a specific business choice needs the user's reply.
|
|
4
4
|
|
|
5
|
+
After a KB semantic-only or partial-coverage handoff, retain the read KB evidence
|
|
6
|
+
and live definitions already verified. Search for a suitable saved definition
|
|
7
|
+
for the uncovered requirement, then discover only missing metadata. A related
|
|
8
|
+
asset that merges actions or lacks a requested filter is not an equivalent
|
|
9
|
+
answer. When the remaining definition is verified, continue authorized ad-hoc
|
|
10
|
+
analysis under its actual scope; disclose differences from the KB-selected
|
|
11
|
+
asset. Do not ask for continuation of the same read-only request. A genuine
|
|
12
|
+
unconfirmed business mapping still follows the confirmation rule below.
|
|
13
|
+
|
|
5
14
|
## Find a reusable definition
|
|
6
15
|
|
|
7
16
|
For an unknown business measure, search relevant saved metrics and readable analysis assets. A named asset needs only its own family; already known definitions go directly to execution. Read the selected [metric](metric_list.md) and [asset search](asset_search.md) command references together, then issue independent searches in the same model turn:
|
|
@@ -55,6 +64,12 @@ A new project uses its own filename. An explicit environment/account change or a
|
|
|
55
64
|
|
|
56
65
|
## Confirm and bind
|
|
57
66
|
|
|
67
|
+
Verifying canonical fields, types, or filter values for an already explicit or
|
|
68
|
+
confirmed business meaning is evidence completion, not automatically a new
|
|
69
|
+
business mapping. Reuse the established meaning and continue when metadata
|
|
70
|
+
supports it without a material choice. If verification exposes an ambiguous
|
|
71
|
+
entity, scope, or definition, the business mapping still needs confirmation.
|
|
72
|
+
|
|
58
73
|
Confirm a selected business mapping once, even if only one candidate is suitable. Present its meaning and any unresolved semantics. Reuse mappings already confirmed in this task. User confirmation selects the business definition; it does not verify an unknown asset formula. If the confirmation tool cannot obtain a reply, present the same choices in text and wait. A failed tool call is not confirmation. Rejected candidates are discarded; seek a different candidate for that choice using the relevant search above.
|
|
59
74
|
|
|
60
75
|
After the reply, fill the confirmed canonical name, aggregation, property and other required model parameters, then execute the complete definition. Use `--resolutions` only when binding unresolved wording retained at a compiler-reported path. Bindings select metadata; they do not fill model parameters. Their `raw_value` must match the wording at that path.
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# Review personal semantic preferences
|
|
2
|
+
|
|
3
|
+
Use `ae-cli personal-semantic-preference review` only for an explicit project review decision by an authorized reviewer. Capability: `business_semantics.personal_context.review`; risk: write. Do not use this to publish a KB or change asset certification.
|
|
4
|
+
|
|
5
|
+
An authorized project reviewer may adopt or reject an unsubmitted (`none`) preference directly; a separate submit step is optional. Pending preferences can also be reviewed.
|
|
6
|
+
|
|
7
|
+
Required flags: `--project-id`, `--ids` (JSON array of 1–100 preference IDs from review-list), `--action` (`adopt` or `reject`). Optional: `--project-review-note`, `--request-id` (reuse on retries). Validate or dry-run checks input without applying the decision.
|
|
8
|
+
|
|
9
|
+
The result contains `action`, reviewed `items`, and `reviewed_count`. Adoption makes the reviewed preference eligible for future project KB refresh; it does not confirm a successful KB compile or publication. Reload after a review-state conflict before deciding again.
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
# List personal semantic preferences for project review
|
|
2
|
+
|
|
3
|
+
Use `ae-cli personal-semantic-preference review-list` for the authorized project review queue. Capability: `business_semantics.personal_context.review_list`; risk: read. Do not use this instead of the user's personal preference list.
|
|
4
|
+
|
|
5
|
+
Required flag: `--project-id`. Optional filters: `--project-review-status` (`none`, `pending`, `adopted`, `rejected`), `--owner` (user name, login name, or user ID; open_id is not accepted), `--context-type` (`preference`, `asset_context`, `experience`, `background`), `--keyword`, `--limit`, and `--offset`.
|
|
6
|
+
|
|
7
|
+
The result includes `items`, `total`, `limit`, `offset`, `has_more`, and `next_offset`. Use the returned identifiers for an explicit adopt/reject decision; listing does not change review status or refresh a KB. Project reviewer permissions are required.
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
# Submit a personal semantic preference for project review
|
|
2
|
+
|
|
3
|
+
Use `ae-cli personal-semantic-preference submit` only when the user wants an existing personal preference reviewed for project use. Capability: `business_semantics.personal_context.submit`; risk: write. Do not use this to certify an asset or publish a KB.
|
|
4
|
+
|
|
5
|
+
Required flags: `--project-id`, `--id` (the existing preference identifier). Optional: `--project-review-note`, `--request-id` (reuse on retries). Use `--validate` or `--dry-run` to check the input without submitting.
|
|
6
|
+
|
|
7
|
+
The result includes `submitted` and the refreshed `preference`. Submission changes eligible NONE/REJECTED records to PENDING; an already submitted record does not imply a new submission. Review and KB compilation are separate steps.
|
|
@@ -2,17 +2,17 @@
|
|
|
2
2
|
|
|
3
3
|
Asset-package export requires access to the target project. Neither the retired `project_semantic_enable` project switch nor the company switch for automatic knowledge-base discovery gates an explicit build or refresh. If project access or company KB permission is denied, report the error and stop; do not switch to a different project, scope, or export path.
|
|
4
4
|
|
|
5
|
-
Build one server-consumable project semantic source Wiki from one immutable Common asset-package snapshot and prove that the KB-compiled knowledge base can be browsed and consumed correctly. The asset package is the raw truth source. Default to a governed package; use an `all_visible` package only when the user explicitly asks for all assets or for uncertified assets to be included. The Agent summarizes the asset semantics once into editable Markdown sources; KB owns
|
|
5
|
+
Build one server-consumable project semantic source Wiki from one immutable Common asset-package snapshot and prove that the KB-compiled knowledge base can be browsed and consumed correctly. The asset package is the raw truth source. Default to a governed package; use an `all_visible` package only when the user explicitly asks for all assets or for uncertified assets to be included. The Agent summarizes the asset semantics once into editable Markdown sources; KB owns formal rule application, final compilation, source lifecycle, and incremental maintenance.
|
|
6
6
|
|
|
7
7
|
The first product goal is not an asset directory. The Wiki must teach the user and Agent how this project observes business: what business system it covers, who uses it, what business objects exist, how those objects relate, which judgment chains users follow, and which assets play primary, supporting, drilldown, or exclusion roles in those chains. Asset pages, report formulas and metadata pages hang under that business judgment model. A Wiki that only lists domains, reports, metrics, dimensions, recall cards, counts, or source containers is an incomplete project semantic KB even if it compiles.
|
|
8
8
|
|
|
9
9
|
## Boundary
|
|
10
10
|
|
|
11
|
-
- This command reference covers asset-package download, one Agent semantic-planning pass, deterministic Wiki-source rendering, validation, editable ZIP source upload,
|
|
11
|
+
- This command reference covers asset-package download, one Agent semantic-planning pass, deterministic Wiki-source rendering, validation, editable ZIP source upload, preset initialization/reuse, compilation, server readback, and retrieval acceptance.
|
|
12
12
|
- The default source scope is `governed`. If and only if the user explicitly requests all assets, use `all_visible`; keep uncertified assets visible but marked `certification_state=uncertified`, and do not present uncertified or conflicting assets as governed definitions.
|
|
13
13
|
- The retired governed project-semantic candidate/review/enable/release lifecycle is not part of this workflow. A retrieval taxonomy or Wiki page is not automatically a governed project semantic.
|
|
14
14
|
- The generated Wiki is a retrieval and evidence layer. Current counts, recent customers, and live usage still require report execution.
|
|
15
|
-
- Do not use `kb +import` for this loop. `kb +import` imports an already compiled read-only snapshot; this workflow needs source upload
|
|
15
|
+
- Do not use `kb +import` for this loop. `kb +import` imports an already compiled read-only snapshot; this workflow needs editable source upload, valid formal rules, and `kb +compile`. Do not generate Schema in the normal build/refresh path.
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
## Usage and Intake Gate
|
|
@@ -47,11 +47,32 @@ node "$KB_RUN" +new --name '<company_kb_name>' \
|
|
|
47
47
|
--project-id <project_id> --project-name '<project_name>' --host <host>
|
|
48
48
|
```
|
|
49
49
|
|
|
50
|
-
The wrapper executes the installed `ae-cli
|
|
50
|
+
The wrapper executes the matching project/package CLI when present; standalone installed Skills retain `ae-cli` from PATH. Directory APIs lack a scope parameter, so it verifies the ZIP source belongs to the company KB before mutation. Permission denial stops the flow. An explicitly requested personal test uses the project CLI directly with `--scope personal` on scope-aware commands; this is never a permission fallback. Personal test KB creation follows the same description rule and must still use a business-facing description.
|
|
51
|
+
|
|
52
|
+
## Preset initialization, reuse and release acceptance
|
|
53
|
+
|
|
54
|
+
The canonical directly uploadable rules are `scripts/project-semantic-knowledge-wiki/default-compile-schema.md`. Maintain this user-visible document in Chinese while retaining literal paths and protocol field names. It defines durable compilation behavior, not project-specific facts. Review and AI-validate the exact preset bytes once before releasing a preset version; keep its hash and report as acceptance evidence. Do not run AI validation for every KB initialization or source refresh. Retain deterministic format, revision, content-hash, permissions and current-formal-hash checks.
|
|
55
|
+
|
|
56
|
+
`prepare-compile-schema.mjs` never applies rules or compiles. It returns `reuse` only after status and downloaded formal bytes agree that rules are valid. A pending new KB can contain a default placeholder even when no effective rules exist; preparation uploads the preset as a candidate and returns `review_import` with `compile_ready=false`. Download errors other than explicit missing-file errors, busy/recovery/review states and invalid established rules are terminal. Use a stable `--request-id` when resuming the same initialization; do not create a second candidate after an uncertain write.
|
|
57
|
+
|
|
58
|
+
For `review_import`, use the returned stable candidate ID with the project/package CLI. Read the entire candidate, full current-schema diff and any advisories. Then explicitly apply using the current revision, candidate hash and formal hash from that diff:
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
ae-cli kb +schema-import-content --import-id <returned_id> --host <host>
|
|
62
|
+
ae-cli kb +schema-import-diff --import-id <returned_id> --baseline current-schema --host <host>
|
|
63
|
+
ae-cli kb +schema-import-apply --import-id <returned_id> --revision <current_revision> \
|
|
64
|
+
--hash <candidate_hash> --schema-hash <formal_hash_from_diff> --request-id <apply_id> --host <host>
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
Only if the diff reports formal absence use `--schema-absent` instead of `--schema-hash`. New KB placeholders are present files and require their actual hash. `--report-id` is optional; old callers may still supply it. A successful application must have `status=applied` with no settlement/recovery pending. Read status and formal bytes again before compilation. `BASE_CHANGED` requires a fresh review, never automatic hash refresh/replay. Do not overwrite valid custom rules just because their hash differs from the preset.
|
|
68
|
+
|
|
69
|
+
Preset release acceptance explicitly uses `ae-cli kb +schema-import-validate --import-id <id> --revision <revision> --hash <hash> --request-id <validation_id> --host <host>`, followed by `+schema-import-status` until the exact candidate has a complete passing report. Validate changed preset bytes again; do not carry a report across hashes. Keep this authoring check separate from the normal KB lifecycle. Test a first full publication and a real changed-source incremental publication with unchanged formal bytes.
|
|
70
|
+
|
|
71
|
+
Compatibility: existing explicit `company-kb.mjs +schema --custom-instructions-file default-compile-rules.md` remains supported for user-requested rule generation. `default-compile-rules.md` is legacy generation guidance, not the normal preset input. Old commands, scopes and model parameters are retained; no new Skill is introduced. Servers that still require per-candidate AI reports cannot use the fast application path and must be reported as unsupported until their contract is upgraded; do not silently fall back to generation.
|
|
51
72
|
|
|
52
73
|
## User-selected model
|
|
53
74
|
|
|
54
|
-
Resolve the requested model with `ae-cli agent +list-models --host <host>` and retain its exact Model.id. Pass the same `--model <model_ref>` to
|
|
75
|
+
Resolve the requested model with `ae-cli agent +list-models --host <host>` and retain its exact Model.id. Pass the same `--model <model_ref>` to compilation, including incremental refreshes. AI rule validation is a separate preset-release acceptance step and accepts a model only when explicitly requested. Stop if the requested model is unavailable or ambiguous.
|
|
55
76
|
|
|
56
77
|
## Source directory contract
|
|
57
78
|
|
|
@@ -66,6 +87,11 @@ sources/
|
|
|
66
87
|
reports/
|
|
67
88
|
metrics/
|
|
68
89
|
metadata/
|
|
90
|
+
personal-semantics/
|
|
91
|
+
background/
|
|
92
|
+
preference/
|
|
93
|
+
experience/
|
|
94
|
+
asset-context/
|
|
69
95
|
business/
|
|
70
96
|
meetings/
|
|
71
97
|
decisions/
|
|
@@ -73,26 +99,40 @@ sources/
|
|
|
73
99
|
references/
|
|
74
100
|
```
|
|
75
101
|
|
|
76
|
-
CLI-managed asset facts go only under `sources/assets/**`. Human material goes under the other top-level categories. Asset refreshes may add, replace, or remove files owned by the generated asset package
|
|
102
|
+
CLI-managed asset facts go only under `sources/assets/**`. Adopted personal semantics exported by Common go under `sources/personal-semantics/**` by their `context_type`: `background`, `preference`, `experience`, or `asset_context` (`asset-context` path). Human material goes under the other top-level categories. Asset refreshes may add, replace, or remove files owned by the generated asset package under `sources/assets/**` and `sources/personal-semantics/**`; they must not delete user material in `project/`, `business/`, `meetings/`, `decisions/`, `corrections/`, or `references/`.
|
|
77
103
|
|
|
78
104
|
The intended compiled Wiki is organized by consumption, not by raw file shape:
|
|
79
105
|
|
|
80
106
|
```text
|
|
81
107
|
index.md
|
|
82
|
-
wiki/project
|
|
108
|
+
wiki/project-overview.md
|
|
109
|
+
wiki/common/
|
|
83
110
|
wiki/domains/
|
|
84
|
-
wiki/
|
|
85
|
-
wiki/
|
|
86
|
-
wiki/
|
|
87
|
-
wiki/review/
|
|
111
|
+
wiki/asset-index/
|
|
112
|
+
wiki/event-map/
|
|
113
|
+
wiki/governance/
|
|
88
114
|
```
|
|
89
115
|
|
|
90
116
|
The source tree only classifies material. Authority still comes from explicit facts: decisions require confirmer, status, date, and scope; corrections require target, corrected content, reason, date, and scope.
|
|
91
117
|
|
|
92
118
|
## First build: precompiled Markdown sources and KB compilation
|
|
93
119
|
|
|
94
|
-
1. Export one complete schema 3.0 governed asset package with `ae-cli project-semantic asset-package export --project-id <project_id> --asset-scope governed --output <package> --host <host>`. Require `truncated=false` and authenticated entry/dependency closure. Use `all_visible` only on explicit user request.
|
|
95
|
-
|
|
120
|
+
1. Export one complete schema 3.0 governed asset package with `ae-cli project-semantic asset-package export --project-id <project_id> --asset-scope governed --output <package> --host <host>`. Require `truncated=false` and authenticated entry/dependency closure. Use `all_visible` only on explicit user request. The export always includes current `ADOPTED` personal semantics for this project in `sources/adopted-personal-semantics.jsonl`; do not add a switch to exclude them and do not run a second personal-semantic export.
|
|
121
|
+
If the governed dashboard, report, and metric catalogs and adopted personal semantics are all empty, this is a valid new-project initialization. Do not ask the user to choose between an empty skeleton and all visible assets. Do not switch to `all_visible` or invent business facts. Run the empty-skeleton builder below, upload its ZIP through the same company-only wrapper, prepare/apply the preset as described below, compile full, and read back the project overview and governance boundary. Skip the semantic planning and normal builder steps below in this case. Resolve the model and company KB target as usual before upload.
|
|
122
|
+
|
|
123
|
+
```bash
|
|
124
|
+
node skills/ae-analysis/scripts/project-semantic-knowledge-wiki/build-empty-skeleton.mjs \
|
|
125
|
+
--asset-package <tmp>/project-assets --output <tmp>/empty-skeleton \
|
|
126
|
+
--project-name '<project_name>'
|
|
127
|
+
node "$KB_RUN" +add --name '<company_kb_name>' \
|
|
128
|
+
--files '["<tmp>/empty-skeleton/empty-skeleton.zip"]' --host <host>
|
|
129
|
+
node skills/ae-analysis/scripts/project-semantic-knowledge-wiki/prepare-compile-schema.mjs \
|
|
130
|
+
--name '<company_kb_name>' --host <host> --output '<new-formal-rules-file>' --request-id '<initialization-id>'
|
|
131
|
+
# If review_import is returned, review and apply the candidate below before compilation.
|
|
132
|
+
# Wait for generated Schema status, then compile.
|
|
133
|
+
node "$KB_RUN" +compile --name '<company_kb_name>' --mode full --model <model_ref> --host <host>
|
|
134
|
+
```
|
|
135
|
+
2. Preserve the local planning and rendering stages. Read the compact knowledge indexes, including dashboard notes, the adopted personal semantic source file, and only the normalized details needed for project positioning, business objects, object relationships, judgment chains, ambiguous grouping, conflicts, SQL semantics, personal context fusion, and recall-card choices. Author one snapshot-bound plan using [`project_semantic_knowledge_wiki_plan_schema.md`](project_semantic_knowledge_wiki_plan_schema.md). This is the run's only Agent synthesis pass. Do not create the plan with a generic script. Do not hardcode project names, business domains, asset IDs, event names, metric names, personal-semantic conclusions, or example decision chains into the workflow; examples are illustrative only, and the Agent must derive the current project's model from the current package. If many summaries share the same template with only names or fields changed, discard the plan and have the Agent reread the relevant asset definitions.
|
|
96
136
|
3. Render the locally precompiled material for review and generate Markdown sources. The review ZIP is a local artifact; upload the source ZIP from the next step:
|
|
97
137
|
|
|
98
138
|
```bash
|
|
@@ -105,7 +145,7 @@ The source tree only classifies material. Authority still comes from explicit fa
|
|
|
105
145
|
```
|
|
106
146
|
|
|
107
147
|
When the exported package is `asset_scope=all_visible`, pass `--allow-all-visible` to the builder. Do not pass this flag unless the user explicitly requested all visible assets.
|
|
108
|
-
4. Review the local project business model, domain judgment models, asset meanings, SQL summaries, domains, conflicts, and recall cards. The project overview must start with business positioning, business objects, object relationships, judgment chains, and non-goals; asset counts and snapshot metadata come later. Business-domain sources must contain the judgment model plus the short `Agent 使用摘要` for first-hop routing: business state judged, objects, signals, decision path, asset roles, primary analysis goals, preferred entries, main events, main metrics, drilldown dimensions, and boundaries. Non-SQL report summaries must not repeat the same generated sentence as both purpose and applicable question; they should expose the report's business use, usable questions, metrics/outputs, drilldown dimensions, filters and boundaries from structured asset evidence, and use "return to source report to confirm" wording for missing fields instead of parser-style `未识别/未发现` placeholders. SQL report sources must also use one `Agent 使用摘要`, but that single section must contain the complete Agent-authored SQL semantics: purpose, parameters, output fields, grain, filters, limits, question boundaries, and evidence locator. This section must be business language an Agent can use directly, not parser labels such as `SQL 输出字段`, `来源表达式`, `${Selector:...}`, `${PartDate:...}`, `C00`, raw SQL fragments, or visible build-process phrases such as `CLI Agent 基于同一资产快照生成`, `摘要来源`, `semantic_plan`, `builder`, `parser fallback`. All business analysis should be completed here; missing evidence remains explicitly unknown. Precompile affected assets and their dependent domains/cards only on refresh; reuse unchanged semantic plan entries.
|
|
148
|
+
4. Review the local project business model, domain judgment models, asset meanings, SQL summaries, adopted personal-semantic fusion, domains, conflicts, and recall cards. The project overview must start with business positioning, business objects, object relationships, judgment chains, and non-goals; asset counts and snapshot metadata come later. Business-domain sources must contain the judgment model plus the short `Agent 使用摘要` for first-hop routing: business state judged, objects, signals, decision path, asset roles, primary analysis goals, preferred entries, main events, main metrics, drilldown dimensions, and boundaries. Adopted personal semantics must be fused by type: `background` can enrich project background and domain context, `preference` can shape preferred routing and answer style, `experience` can add proven analysis heuristics and caveats, and `asset_context` can annotate concrete reports/dashboards/metrics only when the referenced asset still exists. Preserve the source person's display name and source/update time from the payload in the local source page provenance; never expose backend identifiers such as `open_id` in KB Markdown. Non-SQL report summaries must not repeat the same generated sentence as both purpose and applicable question; they should expose the report's business use, usable questions, metrics/outputs, drilldown dimensions, filters and boundaries from structured asset evidence, and use "return to source report to confirm" wording for missing fields instead of parser-style `未识别/未发现` placeholders. SQL report sources must also use one `Agent 使用摘要`, but that single section must contain the complete Agent-authored SQL semantics: purpose, parameters, output fields, grain, filters, limits, question boundaries, and evidence locator. This section must be business language an Agent can use directly, not parser labels such as `SQL 输出字段`, `来源表达式`, `${Selector:...}`, `${PartDate:...}`, `C00`, raw SQL fragments, or visible build-process phrases such as `CLI Agent 基于同一资产快照生成`, `摘要来源`, `semantic_plan`, `builder`, `parser fallback`. All business analysis should be completed here; missing evidence remains explicitly unknown. Precompile affected assets, personal-semantic source pages, and their dependent domains/cards only on refresh; reuse unchanged semantic plan entries.
|
|
109
149
|
5. Package the builder's Markdown sources. Raw JSON indexes and raw SQL remain in the local review/evidence package; the KB input contains the precompiled meanings and structured calculation facts.
|
|
110
150
|
|
|
111
151
|
Package the builder's prepared Markdown sources into the source tree:
|
|
@@ -122,18 +162,19 @@ Then upload and run KB compilation:
|
|
|
122
162
|
|
|
123
163
|
```bash
|
|
124
164
|
node "$KB_RUN" +add --name '<company_kb_name>' --files '["<new-archive>.zip"]' --host <host>
|
|
125
|
-
node
|
|
126
|
-
--
|
|
127
|
-
|
|
128
|
-
# Run only after schema generation succeeds.
|
|
165
|
+
node skills/ae-analysis/scripts/project-semantic-knowledge-wiki/prepare-compile-schema.mjs \
|
|
166
|
+
--name '<company_kb_name>' --host <host> --output '<new-formal-rules-file>' --request-id '<initialization-id>'
|
|
167
|
+
# review_import requires full candidate/diff review and explicit application; reuse is already compile-ready.
|
|
129
168
|
node "$KB_RUN" +compile --name '<company_kb_name>' --mode full --model <model_ref> --host <host>
|
|
130
169
|
```
|
|
131
170
|
|
|
132
|
-
Poll `+status`; never poll by
|
|
171
|
+
Poll `+status`; never poll by generating Schema again. Rule initialization or compilation failure stops the flow; do not switch to snapshot import. Start with a few representative assets before attempting the complete package.
|
|
133
172
|
|
|
134
173
|
## Refresh: update changed Markdown sources
|
|
135
174
|
|
|
136
|
-
|
|
175
|
+
When refreshing an empty skeleton, export a fresh governed package first. If both source classes are still empty, do not rewrite or recompile an unchanged skeleton. If governed entry assets have appeared, synthesize the first evidence-based semantic plan and run the normal builder. Read the skeleton's remote `sources/project/<namespace>-refresh-state.md` and pass it to the source-tree packager as `--previous-refresh-state`. Its taxonomy version intentionally differs from the populated Wiki, so the packager requests `compile_mode=full` and explicit rule-compatibility review. Reuse valid compatible rules; do not regenerate Schema. Apply the resulting add/replace/remove actions to the existing company ZIP with revision checks, including removal of obsolete empty-state sources; preserve human sources and unrelated ZIP paths. Never create a second KB or reuse the empty skeleton's unknown statements as business facts. If only adopted personal semantics appear while entry assets remain empty, do not run the asset builder or claim the skeleton is current; report that the personal-only source path is not yet supported.
|
|
176
|
+
|
|
177
|
+
Regenerate the local Wiki using the existing semantic-plan contract. On refresh, reuse unchanged semantic-plan entries and unchanged adopted-personal-semantic fusion entries instead of asking the Agent to rewrite them. The builder persists the reusable semantic plan and fragment-level state in `sources/project/<namespace>-refresh-state.md`, and records each Markdown source's fragment dependencies. A changed recall card, SQL summary, domain model, adopted personal semantic, appendix, or project model affects only sources that reference that fragment; never treat the whole semantic-plan file hash as a full-source rewrite trigger. When the asset package snapshot hash changes but the existing plan is intentionally reused, pass `--allow-semantic-plan-snapshot-drift`; the builder still validates current project, domain, asset, adopted personal semantic, recall-card and SQL-report references against the new package and stops if the closure no longer matches. Do not use this flag for first build or to bypass real asset additions/removals. Use normalized content hashes from the builder's upload manifests so snapshot-only header changes do not rewrite every asset:
|
|
137
178
|
|
|
138
179
|
```bash
|
|
139
180
|
node skills/ae-analysis/scripts/project-semantic-knowledge-wiki/build-project-semantic-wiki.mjs \
|
|
@@ -157,9 +198,9 @@ node skills/ae-analysis/scripts/project-semantic-knowledge-wiki/package-wiki-sou
|
|
|
157
198
|
--baseline-published-version-id <published_version_id>
|
|
158
199
|
```
|
|
159
200
|
|
|
160
|
-
The normal refresh baseline is remote managed state, not the local filesystem. Read `+list-sources` once to get the ZIP source ID and current `contentRevision`, then read
|
|
201
|
+
The normal refresh baseline is remote managed state, not the local filesystem. Read `+list-sources` once to get the ZIP source ID and current `contentRevision`, then read the small `sources/project/<namespace>-refresh-state.md` index. For schema `2.0`, read each listed `-part-NNN.md` into the same local directory using the exact filenames; never read the whole ZIP or concatenate the parts in an Agent tool response. The packager verifies each part, the complete payload, and the stored manifest before planning changes. A legacy single-file base64 state remains readable. The state contains the previous semantic plan, fragment state, source-tree manifest, source ID, content revision, published version ID, and manifest hash. If `contentRevision` matches the saved baseline, use `--previous-refresh-state` and compare against the saved source-tree manifest; do not page through every remote file and do not run full `+source-read` over the ZIP. A machine-state-only migration can advance the ZIP revision without changing business sources. If the revision differs, treat the baseline as potentially stale but still start from `--previous-refresh-state`; verify only paths that would be written or removed before mutating them, and escalate to a full source-tree read only when the refresh state is missing, corrupt, or cannot explain the required conflict check. A local `<previous>-kb-source-tree-manifest.json` with `--previous-manifest` is a compatibility fallback for manual repair runs, not the scheduled path.
|
|
161
202
|
|
|
162
|
-
The returned plan contains add/replace/remove actions and unchanged paths under `sources/...`, with `skip` or `incremental` compilation. `--previous-tree-root` lets a repair run re-hash the last applied local baseline with the current normalizer, so harmless compiler/normalization-rule changes do not create a one-time false delta. Do not replace an existing ZIP parent. Before each write, verify the target remote bytes still match the
|
|
203
|
+
The returned plan contains add/replace/remove actions and unchanged paths under `sources/...`, with `skip` or `incremental` compilation. Adopted personal semantics use the same source-tree manifest, stable ZIP-relative paths, content hashes, conflict checks, and add/replace/remove actions as asset sources; do not maintain a separate personal-semantic delta file or a second upload flow. When a previously adopted personal semantic is edited, its review status becomes `NONE`, it disappears from the next adopted source export, and the next refresh removes or rewrites only the generated paths whose fragment dependency points to that source. `--previous-tree-root` lets a repair run re-hash the last applied local baseline with the current normalizer, so harmless compiler/normalization-rule changes do not create a one-time false delta. Do not replace an existing ZIP parent. Before each write, verify the target remote bytes still match the action's `previous_content_hash`; for the v2 index and part files this is the raw file SHA-256, while legacy sources use the existing normalized content hash. Preserve unexpected manual edits and stop on conflicts. Apply the index and every listed part action; a machine-state-only change keeps `compile_mode=skip`. Compare by the stable ZIP-relative `sources/...` path. Do not replace the ZIP parent or re-upload every file. Do not run the old flat-source uploader or `plan-kb-source-sync.mjs`.
|
|
163
204
|
|
|
164
205
|
For each changed path, obtain the current revision and perform one existing command through the wrapper:
|
|
165
206
|
|
|
@@ -173,9 +214,9 @@ node "$KB_RUN" +source-rm --name '<company_kb_name>' --id <zip_source_id> \
|
|
|
173
214
|
|
|
174
215
|
Only remove files owned by this generated asset package. Preserve unrelated source material and unexpected manual edits; stop on conflicts. Keep deletion confirmation unless the exact refresh deletion scope is already authorized. Execute sequentially using returned revisions; a 409 requires fresh discovery and review, not blind retry. Failed writes stop compilation. On resume, compare current remote bytes again so already successful writes are not replayed. Unchanged files are not written. Apply changed Markdown manifest/index sources from the plan too; keep the JSON sync manifest local. A refresh-state-only baseline update is a managed-state write and does not by itself require compilation.
|
|
175
216
|
|
|
176
|
-
After all source-tree changes succeed,
|
|
217
|
+
After all source-tree changes succeed, use the source-tree packager's `compile_mode`. `skip` needs no preparation, upload, AI validation or compilation unless explicitly requested. Otherwise run `prepare-compile-schema.mjs` with a fresh output path: valid formal rules return `schema_action=reuse` and `compile_ready=true` without generation, upload, application or AI validation. Call `+compile --mode incremental --model <model_ref>` once for `incremental`, or `+compile --mode full --model <model_ref>` once for `full`. A full rebuild, source-change volume or navigation migration does not trigger Schema generation. `navigation_taxonomy_migration.requires_schema_review=true` requires checking that the formal rules support the new navigation; an incompatible older preset needs an explicit reviewed rule upgrade, never automatic replacement. The legacy `requires_schema_force` field remains false; legacy `schema_force_reasons` explain full-build reasons only. Preserve human sources and unrelated ZIP paths. Normal content updates still use incremental mode.
|
|
177
218
|
|
|
178
|
-
Compiled navigation must
|
|
219
|
+
Compiled navigation must follow the five layers: project overview, shared project knowledge, business domains, event and asset catalog, and governance with provenance. Recall cards belong under domains. The homepage should contain a small set of representative titled entries only, not every report/dashboard file or bare numeric IDs. Individual assets belong in their category index or domain context, with title-first link text and IDs as supporting identity. Public event groups are lookup indexes, not business domains.
|
|
179
220
|
|
|
180
221
|
## Acceptance and readback
|
|
181
222
|
|
|
@@ -208,13 +249,13 @@ canonical_asset_id: report:1234 | null
|
|
|
208
249
|
|
|
209
250
|
- `authenticated=true` maps only to `certification_state=certified`; it never overrides a definition conflict. In explicit `all_visible` mode, unauthenticated assets remain visible as `certification_state=uncertified` and must not be described as approved/governed semantics.
|
|
210
251
|
- A detectable conflict always yields `runtime_policy=block` and `standalone_recall=false` until reviewed.
|
|
211
|
-
- An unauthenticated child retained through a certified parent is `dependency_only`;
|
|
252
|
+
- An unauthenticated child retained through a certified parent is `dependency_only`; its verified definition and dependencies may answer definition or relationship questions. It cannot independently establish a business state or current number. When direct retrieval is unavailable, inspect the authorized parent and state the remaining gap.
|
|
212
253
|
- Technical appendix, duplicate, demo, reproduction, and targeted-diagnostic assets are blocked from standalone recall.
|
|
213
254
|
- Ranking order is: project/permission/status filter -> recall card -> canonical and valid assets -> certification -> semantic relevance and usage. Raw evidence never participates in first-round broad recall.
|
|
214
255
|
|
|
215
256
|
## SQL report rules
|
|
216
257
|
|
|
217
|
-
Every SQL report requires structured semantics grounded in the packaged SQL and parameters. The compiled Wiki must include one CLI Agent-authored `## Agent 使用摘要` for every SQL report. That single section is the primary SQL business source; do not create a second SQL-specific summary section. The local review retains `sql_semantic_facts` and raw SQL for audit. KB consumes the precompiled meanings and only reopens analysis for concrete inconsistencies or new human evidence. Apply `default-compile-
|
|
258
|
+
Every SQL report requires structured semantics grounded in the packaged SQL and parameters. The compiled Wiki must include one CLI Agent-authored `## Agent 使用摘要` for every SQL report. That single section is the primary SQL business source; do not create a second SQL-specific summary section. The local review retains `sql_semantic_facts` and raw SQL for audit. KB consumes the precompiled meanings and only reopens analysis for concrete inconsistencies or new human evidence. Apply the durable `default-compile-schema.md` preset to preserve:
|
|
218
259
|
- business purpose;
|
|
219
260
|
- input parameters and their meaning;
|
|
220
261
|
- output fields;
|
|
@@ -229,4 +270,4 @@ The builder rejects a plan that omits any SQL report or contains mechanically ge
|
|
|
229
270
|
|
|
230
271
|
## Existing flat-source knowledge bases
|
|
231
272
|
|
|
232
|
-
|
|
273
|
+
For an existing managed source-tree knowledge base, `navigation_taxonomy_version` missing or below `2.0` triggers the full Wiki rebuild on its next refresh. Source-tree refresh uses the recorded ZIP source ID and directory mutations above; it never deletes human-authored sources. Read-only snapshots and unmanaged flat sources have no verified managed baseline and must be reviewed separately before migration.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Project semantic knowledge Wiki plan
|
|
2
2
|
|
|
3
|
-
The Agent authors exactly one plan per asset-package snapshot. The builder validates every referenced asset against the package.
|
|
3
|
+
The Agent authors exactly one plan per asset-package snapshot. The builder validates every referenced asset against the package. New plans must fill `recall_cards[].routing` from verified evidence. Older 2.0 plans without routing still compile with a conservative domain fallback; branches may only target assets already listed in that card's preferred or fallback references.
|
|
4
4
|
|
|
5
5
|
```json
|
|
6
6
|
{
|
|
@@ -88,6 +88,21 @@ The Agent authors exactly one plan per asset-package snapshot. The builder valid
|
|
|
88
88
|
}
|
|
89
89
|
],
|
|
90
90
|
"fallback_asset_refs": [],
|
|
91
|
+
"routing": {
|
|
92
|
+
"applicable_when": "问法、对象与范围何时适用本卡",
|
|
93
|
+
"answer_grain": "答案对象与统计粒度",
|
|
94
|
+
"required_parameters": ["时间范围或过滤参数"],
|
|
95
|
+
"branches": [
|
|
96
|
+
{
|
|
97
|
+
"when": "满足哪种已核验的问法和口径",
|
|
98
|
+
"asset_refs": [{"resource_type": "dashboard", "resource_key": "1234", "reason": "分支采用该资产的证据"}],
|
|
99
|
+
"reason": "为什么该分支使用这些资产"
|
|
100
|
+
}
|
|
101
|
+
],
|
|
102
|
+
"stop_when": "何时已取得足够且权威的最小证据",
|
|
103
|
+
"fallback_when_unavailable": "无匹配、冲突、权限不可用时如何回到域内筛选或说明缺口",
|
|
104
|
+
"evidence_boundary": "不可互替口径、当前数值执行与证据强度边界"
|
|
105
|
+
},
|
|
91
106
|
"excluded_asset_refs": [
|
|
92
107
|
{
|
|
93
108
|
"resource_type": "report",
|
|
@@ -102,6 +117,27 @@ The Agent authors exactly one plan per asset-package snapshot. The builder valid
|
|
|
102
117
|
]
|
|
103
118
|
}
|
|
104
119
|
],
|
|
120
|
+
"personal_semantic_integrations": [
|
|
121
|
+
{
|
|
122
|
+
"integration_id": "stable-personal-semantic-integration-id",
|
|
123
|
+
"context_type": "background | preference | experience | asset_context",
|
|
124
|
+
"source_ids": ["personal_semantic:42"],
|
|
125
|
+
"title": "融合后的项目语义标题",
|
|
126
|
+
"project_usage": "这组个人语义如何被项目知识库消费",
|
|
127
|
+
"integration_target": {
|
|
128
|
+
"target_type": "project | domain | asset | recall_card",
|
|
129
|
+
"target_id": "project, domain_id, resource_key, or card_id"
|
|
130
|
+
},
|
|
131
|
+
"source_people": [
|
|
132
|
+
{
|
|
133
|
+
"owner_name": "source owner display name from payload",
|
|
134
|
+
"updated_at": "source update time from payload"
|
|
135
|
+
}
|
|
136
|
+
],
|
|
137
|
+
"conflict_policy": "compatible | scoped | blocked",
|
|
138
|
+
"boundaries": ["适用范围、冲突或必须回源确认的边界"]
|
|
139
|
+
}
|
|
140
|
+
],
|
|
105
141
|
"appendices": [
|
|
106
142
|
{
|
|
107
143
|
"appendix_id": "technical-or-temporary-assets",
|
|
@@ -139,6 +175,9 @@ The Agent authors exactly one plan per asset-package snapshot. The builder valid
|
|
|
139
175
|
- `project_business_model` is required. It must explain how the project observes business before listing assets: positioning, audience roles, business objects, object relationships, decision chains, and non-goals.
|
|
140
176
|
- `project_business_model` and every `domain_judgment_model` must be derived from current asset-package evidence. Do not hardcode project names, business domains, asset IDs, event names, metric names, or example decision chains into the workflow.
|
|
141
177
|
- Every business object, object relationship and decision chain must cite concrete `dashboard`, `report`, or `metric` refs from the current package. A decision chain must reference existing domain IDs and explain when live execution is required.
|
|
178
|
+
- Adopted personal semantic integrations must cite concrete `personal_semantic:<id>` source IDs from `sources/adopted-personal-semantics.jsonl`. Group and fuse them by `context_type`: `background`, `preference`, `experience`, and `asset_context`.
|
|
179
|
+
- `asset_context` integrations must target an existing dashboard, report, metric, domain, or recall card. If the referenced asset no longer exists, do not attach the personal semantic to a live asset page; mark the integration as blocked or scoped historical context.
|
|
180
|
+
- Personal semantic integrations are project context, routing preferences, heuristics, or asset annotations. They do not override governed project semantic records, current asset definitions, SQL/calculation facts, or live query results unless an explicit correction/decision source gives that authority.
|
|
142
181
|
- Domain titles represent business retrieval topics, not physical dashboard-space names.
|
|
143
182
|
- Every domain has one `domain_judgment_model` describing the business state judged, objects, signals, decision path, asset roles and boundaries. A domain that only lists questions, events, metrics, dimensions and assets is not acceptable.
|
|
144
183
|
- Every domain has at least one recall card. Preferred and fallback refs must belong to that domain's dashboard/report closure or be a reusable metric directly referenced by it.
|
|
@@ -9,16 +9,26 @@ Read [`ai_models.md`](ai_models.md) for the single AI-facing model registry. Rep
|
|
|
9
9
|
Command:
|
|
10
10
|
|
|
11
11
|
```bash
|
|
12
|
-
ae-cli analysis report create --project-id <project_id> --report-name "Demo" --model-type event --definition '{...}' [--resolutions '<confirmed_resolution_json>'] [--report-desc "..."] [--dashboard-ids "[1001]"]
|
|
12
|
+
ae-cli analysis report create --project-id <project_id> --report-name "Demo" --model-type event --definition '{...}' [--presentation '{"chart_type":"line","table_layout":"date"}'] [--resolutions '<confirmed_resolution_json>'] [--report-desc "..."] [--dashboard-ids "[1001]"]
|
|
13
13
|
```
|
|
14
14
|
|
|
15
15
|
When the caller supplies an existing snapshot, optional `--intent-snapshot` accepts `schema_version: 1`, non-empty `requirement`, `definition` and `model_type`. The CLI checks that its definition and model match the submitted values locally; the snapshot is never sent to Gateway.
|
|
16
16
|
|
|
17
|
-
Input sends `project_id`, `report_name`, `model_type`, `definition`, optional user-confirmed `resolutions`, `report_desc`, `cache_seconds`, `query_duration_ms`, and `dashboard_ids`. `--resolutions` is not supported with `--model-type tag`.
|
|
17
|
+
Input sends `project_id`, `report_name`, `model_type`, `definition`, optional top-level `presentation`, user-confirmed `resolutions`, `report_desc`, `cache_seconds`, `query_duration_ms`, and `dashboard_ids`. `--resolutions` is not supported with `--model-type tag`.
|
|
18
|
+
|
|
19
|
+
Omitting `--report-desc` or passing `--report-desc ""` sends `report_desc: ""`, matching analysis-page creation. This default applies only to creation: [`report update`](report_update.md) preserves the saved description when `--report-desc` is omitted, and clears it when explicitly empty.
|
|
20
|
+
|
|
21
|
+
## Event-report presentation
|
|
22
|
+
|
|
23
|
+
For `model_type=event`, optional `presentation` is separate from `definition`. `chart_type` accepts `line`, `combo`, `bar`, `stacked`, `cumulative`, or `pie`; `table_layout` accepts `date`, `event`, or `group` for the analysis page's result table. The gateway checks compatibility with the saved definition; pie always requires grouping without time comparison. A total-time report supports bar, or pie only when those grouping/comparison conditions hold. Omission leaves page-default/inherited settings. This contract does not expose presentation writes for other models.
|
|
24
|
+
|
|
25
|
+
For `combo`, explicitly set a requested non-total `definition.time_particle_size` such as `day` (omission defaults to `total`), and supply report-level `presentation.series` with metric indexes and bar/line + primary/secondary axes. Read [event-report presentation](event_report_presentation.md) for the version-bound metric binding, subset/reset contract, examples and impact on inherited dashboard trends. It also distinguishes combo from cumulative and corrects the event pie mapping; never use raw graph codes.
|
|
26
|
+
|
|
27
|
+
A table card is a dashboard-level display, not `presentation.chart_type=table` on the source report. To create a table card, create the event report, associate it through `--dashboard-ids` or [`dashboard-report add`](dashboard_report_add.md), then call [`dashboard-report update`](dashboard_report_update.md) with the returned report ID, exact dashboard ID, and `--chart-type table`. Do not insert `graphShape`, `byType`, `reportGraphShape`, or other raw QP/UI fields into the definition or presentation.
|
|
18
28
|
|
|
19
29
|
Saved report definitions follow the filter write boundary in [`ai_models.md`](ai_models.md): one compound group level with leaf-only, non-empty `items`. A deeper tree or empty group is rejected by the capability schema as `INVALID_CAPABILITY_INPUT`; use the returned field path or schema keyword to correct it, and never flatten a deeper tree.
|
|
20
30
|
|
|
21
|
-
Output is the gateway envelope. `data` contains the created `report_id`, creation status, normalized `model_type`, AI QP `definition`, and optional resolution warnings.
|
|
31
|
+
Output is the gateway envelope. `data` contains the created `report_id`, creation status, normalized `model_type`, AI QP `definition`, event-report `presentation`, and optional resolution warnings. Card presentation is read separately with `dashboard-report get`.
|
|
22
32
|
|
|
23
33
|
Report creation and its `--validate` / `--dry-run` paths use the same compiler contract. `AI_QP_COMPILE_FAILED` preserves the full structured error array. No report is created on this failure; follow [`metadata_resolution.md`](metadata_resolution.md), keep each bound field's path and original wording, fill confirmed model parameters, and pass `--resolutions` only after user confirmation.
|
|
24
34
|
|
|
@@ -14,7 +14,11 @@ Input sends `project_id` and `report_id`.
|
|
|
14
14
|
|
|
15
15
|
This command reads saved definition metadata and deliberately has no `--use-cache` option. Cache selection applies to `report-data run/export`, not to definition reads.
|
|
16
16
|
|
|
17
|
-
Output is the gateway envelope. `data` contains `version`, `model_type`, `definition`, report metadata, and dashboard membership in snake_case. Use `data.version` as `--report-version` when updating the same report. Raw frontend `events`, `event_view`, `visual_view`, and raw QP are not returned.
|
|
17
|
+
Output is the gateway envelope. `data` contains `version`, `model_type`, `definition`, report metadata, and dashboard membership in snake_case. Event reports additionally expose separate `presentation` with `chart_type` and `table_layout`. Use `data.version` as `--report-version` when updating the same report. Raw frontend `events`, `event_view`, `visual_view`, and raw QP are not returned.
|
|
18
|
+
|
|
19
|
+
`presentation.chart_type` describes the source report's effective chart under the current definition. `presentation.table_layout` describes its persisted result-table layout when readable; a legacy report without a persisted layout omits it because that setting can be inherited from the browser, not because it is necessarily `date`. For a table card on a specific analysis board, read [`dashboard-report get`](dashboard_report_get.md) with the exact dashboard ID. A raw chart code such as `L0` can coexist with a displayed result table or a dashboard table card; it is not proof of a read failure. Use the semantic response fields, and state unknown/null presentation fields as inherited/unknown rather than inventing values.
|
|
20
|
+
|
|
21
|
+
For an effective trend, presentation also returns `series_scope=report` and per-metric `series` including default styles/axes. Non-default series can make `chart_type=combo` despite native `graphShape=L0`. Match each 1-based series index to this response's `definition.metrics` order, and use its current version for a subsequent source-series write. Read [event-report presentation](event_report_presentation.md) before interpreting or editing combination styles/axes.
|
|
18
22
|
|
|
19
23
|
Reads preserve historical filter trees without flattening, including definitions deeper than the current analysis page can author. Follow the read/write boundary in [`ai_models.md`](ai_models.md): omit `definition` for metadata-only changes, and never feed an unsupported historical tree back as a definition update.
|
|
20
24
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# analysis report update
|
|
2
2
|
|
|
3
|
-
Use when the user explicitly wants to update saved report metadata
|
|
3
|
+
Use when the user explicitly wants to update saved report metadata, replace its AI QP definition, or change an event report's chart/result-table layout.
|
|
4
4
|
|
|
5
5
|
Do not use raw QP, `qp`, `report_model`, or `analysis_query`. When changing the definition, pass `model_type` and AI QP `definition` together.
|
|
6
6
|
|
|
@@ -11,15 +11,26 @@ Command:
|
|
|
11
11
|
```bash
|
|
12
12
|
ae-cli analysis report update --project-id <project_id> --report-id <report_id> --report-version <version> --report-name "New name"
|
|
13
13
|
ae-cli analysis report update --project-id <project_id> --report-id <report_id> --report-version <version> --model-type event --definition '{...}' [--resolutions '<confirmed_resolution_json>']
|
|
14
|
+
ae-cli analysis report update --project-id <project_id> --report-id <report_id> --report-version <version> --presentation '{"table_layout":"event"}'
|
|
14
15
|
```
|
|
15
16
|
|
|
16
17
|
When the caller supplies an existing snapshot, optional `--intent-snapshot` accepts `schema_version: 1`, non-empty `requirement`, `definition` and `model_type`. The CLI checks that its definition and model match the submitted values locally; the snapshot is never sent to Gateway. Metadata-only updates use no definition snapshot.
|
|
17
18
|
|
|
18
|
-
Input sends `project_id`, `report_id`, `version` from CLI `--report-version`, and at least one of `report_name`, `report_desc`, or `
|
|
19
|
+
Input sends `project_id`, `report_id`, `version` from CLI `--report-version`, and at least one of `report_name`, `report_desc`, `definition`, or top-level `presentation`. Read `version` from `analysis report get` before updating. `model_type` is required when `definition` is provided; `resolutions` is allowed only when a definition is provided and is not supported with `model_type=tag`.
|
|
20
|
+
|
|
21
|
+
## Preserve display settings
|
|
22
|
+
|
|
23
|
+
For same-model definition updates, omit `presentation` to preserve the saved event-report chart and result-table layout. For a display-only change, send `--presentation` without `--definition` or `--model-type`, using the current version. Only supplied presentation fields change; omitted fields are retained. Supported only for event reports: `chart_type=line|combo|bar|stacked|cumulative|pie`, `table_layout=date|event|group`, and report-level `series`. The gateway validates the effective presentation against the saved definition; pie always requires grouping without time comparison. Total-time reports support bar, or pie only when those grouping/comparison conditions hold. A model change uses the target model's display defaults unless an allowed event presentation is supplied.
|
|
24
|
+
|
|
25
|
+
For combination styles/axes, read [event-report presentation](event_report_presentation.md) before updating. Series is a subset patch; `[]` is an explicit reset, and `chart_type=line` resets all series to primary-axis lines. Metric positions are tied to the current returned `definition.metrics` and report version. Changing source series also affects its other trend (`L0`) cards; card updates cannot override series locally. During definition changes, the server preserves uniquely matched technical metrics and rejects unsafe non-default series loss with `SERIES_PRESERVATION_CONFLICT`; follow its reset guidance instead of silently carrying old indexes into new metrics.
|
|
26
|
+
|
|
27
|
+
Non-empty series-only updates require an existing compatible trend. Empty `series: []` also clears retained series on a compatible non-trend chart without changing that chart type. When changing from another chart, use explicit `chart_type=combo` with non-empty series; do not attach non-empty series to an explicit bar/pie/cumulative/line choice. If a definition change invalidates a previously valid chart, implicit preservation fails before writing; follow its compatible-chart guidance rather than promising an unchanged invalid display.
|
|
28
|
+
|
|
29
|
+
To change a table card on an analysis board, use [`dashboard-report update`](dashboard_report_update.md) with `--chart-type table`, not report presentation. The source report, the analysis page's result table, and a dashboard card are separate display scopes. Raw `graphShape`, `byType`, `reportGraphShape`, `tableFormat`, and `dateOutside` are not authoring fields.
|
|
19
30
|
|
|
20
31
|
Definition replacement follows the filter write boundary in [`ai_models.md`](ai_models.md): one compound group level with leaf-only, non-empty `items`. A deeper historical tree remains readable, but a deeper tree or empty group submitted for writing is rejected by the capability schema as `INVALID_CAPABILITY_INPUT`; use the returned field path or schema keyword to correct it. Omit `definition` for metadata-only changes and never flatten it.
|
|
21
32
|
|
|
22
|
-
Output is the gateway envelope. `data` contains update status, `report_id`, and the normalized AI QP definition when a definition was updated.
|
|
33
|
+
Output is the gateway envelope. `data` contains update status, `report_id`, and the normalized AI QP definition when a definition was updated, plus event-report `presentation`. It does not represent any dashboard card's display.
|
|
23
34
|
|
|
24
35
|
When a definition is supplied, update and its `--validate` / `--dry-run` paths use the same compiler contract. `AI_QP_COMPILE_FAILED` preserves the full structured error array. The report is not changed on this failure; follow [`metadata_resolution.md`](metadata_resolution.md), keep each bound field's path and original wording, fill confirmed model parameters, and retry with `--resolutions` only after confirmation.
|
|
25
36
|
|
|
@@ -29,6 +40,6 @@ For a SQL `part_date` parameter, `use_timezone` is a boolean saved definition fi
|
|
|
29
40
|
|
|
30
41
|
After a successful update, call `analysis-meta asset url-get` with the updated `report_id` and output its `markdown_link`.
|
|
31
42
|
|
|
32
|
-
The capability schema includes model-specific nested definition validation. Unknown fields, including nested filter/time-range fields and diagnostic backing fields, are rejected instead of silently ignored. Use canonical snake_case keys and aggregation names such as `user_count`; event report metrics may additionally carry `display_name`. Inspect the report capability itself for the full saved-report definition schema.
|
|
43
|
+
The capability schema includes model-specific nested definition validation. Unknown fields, including nested filter/time-range fields and diagnostic backing fields, are rejected instead of silently ignored. Use canonical snake_case keys and aggregation names such as `user_count`; event report metrics and funnel `steps[]` may additionally carry `display_name`. When replacing a funnel definition, preserve every step's returned `display_name` so custom labels survive the round trip. Inspect the report capability itself for the full saved-report definition schema.
|
|
33
44
|
|
|
34
45
|
Use `--report-desc ""` to clear an existing description. Omitting `--report-desc` preserves the saved description. Clearing only the description is a valid metadata-only update.
|
|
@@ -12,6 +12,8 @@ ae-cli system query-monitor overview --company-id <company-id> --cluster-names '
|
|
|
12
12
|
|
|
13
13
|
Capability id: `system.query_monitor.overview`.
|
|
14
14
|
|
|
15
|
+
Selected project IDs and space codes must belong to the supplied company. A different company's scope is rejected before chart data is read.
|
|
16
|
+
|
|
15
17
|
The response uses `ok`, `data`, and `meta`. Treat empty `data` as success when `ok=true`; preserve `request_id` and `invocation_id` when present.
|
|
16
18
|
|
|
17
19
|
## Parameters
|
|
@@ -13,6 +13,8 @@ ae-cli system query-task cancel --company-id <company-id> --task-id <task-id> --
|
|
|
13
13
|
|
|
14
14
|
Capability id: `system.query_task.cancel`.
|
|
15
15
|
|
|
16
|
+
The task must belong to `--company-id` by project or workspace. A foreign-company or missing task ID is rejected before cancellation.
|
|
17
|
+
|
|
16
18
|
Run `--dry-run` first, summarize the affected target and impact, then wait for explicit user confirmation before rerunning the unchanged command with global `--yes`.
|
|
17
19
|
|
|
18
20
|
The response uses `ok`, `data`, and `meta`. Treat empty `data` as success when `ok=true`; preserve `request_id` and `invocation_id` when present.
|
|
@@ -12,6 +12,10 @@ ae-cli system query-task export --company-id <company_id> --start-time '2026-07-
|
|
|
12
12
|
|
|
13
13
|
Capability id: `system.query_task.export`.
|
|
14
14
|
|
|
15
|
+
Selected project IDs and space codes must belong to the supplied company. A different company's scope is rejected before an export is submitted.
|
|
16
|
+
|
|
17
|
+
The time range has the same completion-time semantics as [`query-task list`](system_query_task_list.md): inclusive boundary seconds, including milliseconds within the end second, and a maximum 31-day window. The CSV `start_time` is task initiation time, not the timestamp used for range filtering.
|
|
18
|
+
|
|
15
19
|
If the required filter mappings are unknown, call `ae-cli system query-task options --company-id <company_id>` once. Reuse verified mappings within the same company/project scope; do not guess filter codes or cluster names.
|
|
16
20
|
|
|
17
21
|
Use `--output` to wait and download the completed artifact. If interrupted, resume with `ae-cli analysis run wait --run-id <run_id> --output <file>` using the same export response. See [`run_wait.md`](run_wait.md).
|
|
@@ -25,8 +29,8 @@ The response uses `ok`, `data`, and `meta`. Empty task data is a successful expo
|
|
|
25
29
|
| Parameter | Required | Description |
|
|
26
30
|
|---|---|---|
|
|
27
31
|
| `--company-id` | Yes | Company ID. |
|
|
28
|
-
| `--start-time` | Yes | Inclusive range start in `yyyy-MM-dd HH:mm:ss`. |
|
|
29
|
-
| `--end-time` | Yes | Inclusive range end in `yyyy-MM-dd HH:mm:ss`. |
|
|
32
|
+
| `--start-time` | Yes | Inclusive completion-time range start in `yyyy-MM-dd HH:mm:ss`. |
|
|
33
|
+
| `--end-time` | Yes | Inclusive completion-time range end, including the entire second, in `yyyy-MM-dd HH:mm:ss`. |
|
|
30
34
|
| `--status-codes` | Yes | Non-empty task status-code JSON array. |
|
|
31
35
|
| `--content-codes` | Yes | Non-empty query content-code JSON array. |
|
|
32
36
|
| `--task-type-codes` | Yes | Non-empty query task-type-code JSON array. |
|
|
@@ -12,6 +12,8 @@ ae-cli system query-task get --company-id <company-id> --task-id <task-id>
|
|
|
12
12
|
|
|
13
13
|
Capability id: `system.query_task.get`.
|
|
14
14
|
|
|
15
|
+
The task must belong to `--company-id` by project or workspace. A foreign-company or missing task ID is rejected before details are read.
|
|
16
|
+
|
|
15
17
|
The response uses `ok`, `data`, and `meta`. Treat empty `data` as success when `ok=true`; preserve `request_id` and `invocation_id` when present.
|
|
16
18
|
|
|
17
19
|
## Parameters
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# system query-task list
|
|
2
2
|
|
|
3
|
-
Use when the user needs
|
|
3
|
+
Use when the user needs historical query logs within a mandatory bounded time range. For the realtime monitoring tab, use `ae-cli system query-task realtime-list` instead.
|
|
4
4
|
|
|
5
5
|
Do not use it outside the system query-task operation or with fields absent from the inspected capability schema.
|
|
6
6
|
|
|
@@ -14,6 +14,10 @@ Capability id: `system.query_task.list`.
|
|
|
14
14
|
|
|
15
15
|
If the required filter mappings are unknown, call `ae-cli system query-task options --company-id <company_id>` once. Reuse verified mappings within the same company/project scope; do not guess filter codes or cluster names.
|
|
16
16
|
|
|
17
|
+
Project IDs and workspace codes must belong to `--company-id`; foreign-company values are rejected before querying. The global system-project ID `-1` cannot be selected as a company-scoped project.
|
|
18
|
+
|
|
19
|
+
The range filters query **completion time**, not the returned `start_time` (task initiation time). Both boundary seconds are inclusive, including milliseconds within the end second. A task started before the window can appear if it completed inside it. Compare list and export using the same completion-time window; do not reject rows solely because `start_time` is outside it. The range must not exceed 31 days.
|
|
20
|
+
|
|
17
21
|
The response uses `ok`, `data`, and `meta`. Treat empty `data` as success when `ok=true`; preserve `request_id` and `invocation_id` when present.
|
|
18
22
|
|
|
19
23
|
## Parameters
|
|
@@ -21,8 +25,8 @@ The response uses `ok`, `data`, and `meta`. Treat empty `data` as success when `
|
|
|
21
25
|
| Parameter | Required | Description |
|
|
22
26
|
|---|---|---|
|
|
23
27
|
| `--company-id` | Yes | Company ID. |
|
|
24
|
-
| `--start-time` | Yes | Inclusive lower bound in `yyyy-MM-dd HH:mm:ss`. |
|
|
25
|
-
| `--end-time` | Yes | Inclusive upper bound in `yyyy-MM-dd HH:mm:ss`. |
|
|
28
|
+
| `--start-time` | Yes | Inclusive completion-time lower bound in `yyyy-MM-dd HH:mm:ss`. |
|
|
29
|
+
| `--end-time` | Yes | Inclusive completion-time upper bound, including the entire second, in `yyyy-MM-dd HH:mm:ss`. |
|
|
26
30
|
| `--project-ids` | Conditional | Non-empty project IDs or space codes are required. |
|
|
27
31
|
| `--space-codes` | Conditional | Non-empty space codes or project IDs are required. |
|
|
28
32
|
| `--status-codes` | Yes | Task status-code JSON array. |
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# system query-task options
|
|
2
2
|
|
|
3
|
-
Use before query-task list or export to discover
|
|
3
|
+
Use before query-task list, realtime-list, or export to discover valid filter values exposed by the current environment.
|
|
4
4
|
|
|
5
5
|
Command:
|
|
6
6
|
|
|
@@ -18,7 +18,7 @@ The response maps:
|
|
|
18
18
|
- `projects[].project_id` and `workspaces[].space_code` to display names.
|
|
19
19
|
- `clusters[].cluster_name` to its query engine metadata.
|
|
20
20
|
|
|
21
|
-
Use the returned codes and names unchanged in `query-task list` or `query-task export`. Do not infer codes from UI labels or examples.
|
|
21
|
+
Project and workspace options are limited to `--company-id`; status, content, task type, and cluster codes remain discoverable. Use the returned codes and names unchanged in `query-task list`, `query-task realtime-list`, or `query-task export`. Discovery does not authorize a project or workspace; execution still checks company ownership. Do not infer codes from UI labels or examples.
|
|
22
22
|
|
|
23
23
|
## Parameters
|
|
24
24
|
|