@thinkingai/ae-cli 6.0.53 → 6.0.54
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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-MBWRZTB6.js} +9 -11
- package/dist/automation-NWWVLWG2.js +459 -0
- package/dist/{capability-F2RIR5DS.js → capability-7SSN6PNZ.js} +6 -6
- package/dist/chunk-4655PUNX.js +43 -0
- package/dist/{chunk-KS4DE3MX.js → chunk-5XJYLEVC.js} +4 -4
- package/dist/{chunk-N4BLPJC7.js → chunk-7QXISROD.js} +1 -1
- package/dist/{chunk-7WZACOAI.js → chunk-AP7YP2NX.js} +2 -2
- package/dist/{chunk-SO5LKIWP.js → chunk-CT7QDJS6.js} +2 -2
- package/dist/chunk-D6ACFILC.js +56 -0
- package/dist/{chunk-QYXDJOLA.js → chunk-EOYSKMXN.js} +19 -11
- package/dist/{chunk-5XRQ3CZR.js → chunk-FMNNGNYO.js} +43 -8
- package/dist/{chunk-DU72X2IO.js → chunk-GIK6EDUG.js} +22 -10
- package/dist/{chunk-PGCIKZRE.js → chunk-HBLK3ZHW.js} +3 -3
- package/dist/chunk-HVHR4SCP.js +133 -0
- package/dist/{chunk-BW7JUDEI.js → chunk-KFNMQTZI.js} +514 -213
- package/dist/{chunk-KJDOTPYU.js → chunk-PLE722AJ.js} +28 -11
- package/dist/chunk-RK6GLDGI.js +27 -0
- package/dist/{chunk-GK7WDY7E.js → chunk-S6M42KND.js} +1 -1
- package/dist/{chunk-IG3DYEIR.js → chunk-UQ77JXYH.js} +4 -3
- package/dist/{chunk-YVGXGTD6.js → chunk-WNGFSIOB.js} +7 -1
- package/dist/{chunk-647BRKZK.js → chunk-ZIQWCZTS.js} +3 -3
- package/dist/{community-report-client-6VJDDMJJ.js → community-report-client-PEERQCX2.js} +1 -1
- package/dist/{config-XQWOPDHN.js → config-FF6YVJKI.js} +8 -8
- package/dist/context-YAE3QXP3.js +136 -0
- package/dist/{data-integration-XBTCGXQT.js → data-integration-HESZET7E.js} +6 -6
- package/dist/index.js +125 -48
- package/dist/{local-data-upload-client-3P7NIVQ4.js → local-data-upload-client-TWMHFLUA.js} +1 -1
- package/dist/memory-62BJOULV.js +580 -0
- package/dist/{metadata-V5ZDTKWZ.js → metadata-7CUMWIB4.js} +7 -7
- package/dist/{model-ZS7HVGKN.js → model-SBV2JFJI.js} +9 -5
- package/dist/{personal-semantic-preference-2XANU3F6.js → personal-semantic-preference-6SRCYPGE.js} +117 -11
- package/dist/{project-semantic-LP3LY7QP.js → project-semantic-YYEM4OSU.js} +6 -6
- package/dist/{sync-EQLSTUS7.js → sync-SU33KYX7.js} +12 -8
- package/dist/{te-agent-Z3HCTKR7.js → te-agent-F5QBZSQA.js} +90 -454
- package/dist/{te-analysis-3EVYQ3IO.js → te-analysis-U4I2W2WC.js} +297 -20
- package/dist/{te-community-Z7JACGF3.js → te-community-PFLDLPP4.js} +3 -3
- package/dist/{te-dataops-F7GQOIS6.js → te-dataops-FOQSRIAZ.js} +5 -5
- package/dist/{te-engage-LFBU6WWH.js → te-engage-ZX76CNAB.js} +6 -6
- package/dist/{te-kb-QJLJEX5K.js → te-kb-MHDOST62.js} +494 -214
- package/dist/{te-system-IXC43QHZ.js → te-system-J2FQF5ER.js} +6 -6
- package/dist/{te-team-BIZIKIHZ.js → te-team-5UOZPTU3.js} +6 -6
- package/dist/things-VPPXXLHB.js +1091 -0
- package/dist/{update-W2SGQNKT.js → update-EEUTEI6R.js} +59 -51
- package/dist/workspace-O3EEIYQM.js +554 -0
- package/package.json +21 -9
- package/skills/ae-agent/SKILL.md +89 -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 +90 -31
- package/skills/ae-analysis/references/project_semantic_knowledge_wiki_plan_schema.md +99 -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 +669 -29
- 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 +28 -10
- 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 +285 -24
- package/skills/ae-analysis/scripts/project-semantic-knowledge-wiki/package-wiki-source-zip.mjs +262 -30
- 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/precompiled-source.mjs +46 -2
- 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
|
@@ -1,13 +1,29 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import fs from 'node:fs';
|
|
3
|
+
import path from 'node:path';
|
|
3
4
|
import { spawnSync } from 'node:child_process';
|
|
4
5
|
import { pathToFileURL } from 'node:url';
|
|
5
6
|
|
|
6
|
-
const scoped = new Set(['+new', '+add', '+list-sources', '+schema', '+compile', '+status', '+import']);
|
|
7
|
+
const scoped = new Set(['+new', '+add', '+list-sources', '+schema', '+compile', '+status', '+import', '+schema-download', '+schema-import', '+schema-import-list']);
|
|
7
8
|
const requestScoped = new Set(['+import-status']);
|
|
8
9
|
const directory = new Set(['+source-ls', '+source-read', '+source-put', '+source-rm']);
|
|
9
10
|
const value = (args, key) => args[args.indexOf(key) + 1];
|
|
10
11
|
|
|
12
|
+
export function invokeCompanyKbCli(flags, { spawn = spawnSync, localCli = path.resolve(import.meta.dirname, '../../../../bin/ae-cli.js') } = {}) {
|
|
13
|
+
// Packaged/project scripts use their matching CLI; standalone installed Skills retain PATH lookup.
|
|
14
|
+
const bundled = fs.existsSync(localCli);
|
|
15
|
+
const child = spawn(bundled ? process.execPath : 'ae-cli', bundled ? [localCli, ...flags] : flags,
|
|
16
|
+
{ encoding: 'utf8', stdio: ['inherit', 'pipe', 'pipe'] });
|
|
17
|
+
if (child.stderr) process.stderr.write(child.stderr);
|
|
18
|
+
if (child.error) throw child.error;
|
|
19
|
+
if (child.status === 0) return JSON.parse(child.stdout);
|
|
20
|
+
// CLI failures are JSON on stderr, possibly surrounded by compatibility/progress messages.
|
|
21
|
+
const start = child.stderr.indexOf('{\n "ok": false,');
|
|
22
|
+
const end = start < 0 ? -1 : child.stderr.indexOf('\n}', start);
|
|
23
|
+
if (end >= 0) return JSON.parse(child.stderr.slice(start, end + 2));
|
|
24
|
+
throw new Error(child.stderr || child.stdout || 'CLI process failed.');
|
|
25
|
+
}
|
|
26
|
+
|
|
11
27
|
// Project semantic KB operations must never fall back to a personal KB.
|
|
12
28
|
export async function runCompanyKb(command, args, invoke) {
|
|
13
29
|
if (args.some((arg) => arg === '--custom-instructions' || arg.startsWith('--custom-instructions='))) {
|
|
@@ -24,7 +40,9 @@ export async function runCompanyKb(command, args, invoke) {
|
|
|
24
40
|
const call = async (cmd, flags) => {
|
|
25
41
|
const result = await invoke(['kb', cmd, ...flags]);
|
|
26
42
|
if (!result || result.ok !== true) {
|
|
27
|
-
|
|
43
|
+
const error = new Error(`Company KB operation failed; stop without personal fallback: ${JSON.stringify(result?.error ?? result)}`);
|
|
44
|
+
error.code = result?.error?.code;
|
|
45
|
+
throw error;
|
|
28
46
|
}
|
|
29
47
|
return result;
|
|
30
48
|
};
|
|
@@ -98,12 +116,7 @@ function expandCustomInstructionsFile(args) {
|
|
|
98
116
|
if (process.argv[1] && import.meta.url === pathToFileURL(process.argv[1]).href) {
|
|
99
117
|
try {
|
|
100
118
|
const [command, ...args] = process.argv.slice(2);
|
|
101
|
-
const result = await runCompanyKb(command, args,
|
|
102
|
-
const child = spawnSync('ae-cli', flags, { encoding: 'utf8', stdio: ['inherit', 'pipe', 'pipe'] });
|
|
103
|
-
if (child.stderr) process.stderr.write(child.stderr);
|
|
104
|
-
if (child.error || child.status !== 0) throw new Error(child.error?.message || child.stderr || child.stdout || 'CLI failed.');
|
|
105
|
-
return JSON.parse(child.stdout);
|
|
106
|
-
});
|
|
119
|
+
const result = await runCompanyKb(command, args, invokeCompanyKbCli);
|
|
107
120
|
console.log(JSON.stringify(result, null, 2));
|
|
108
121
|
} catch (error) {
|
|
109
122
|
console.error(error.message);
|
|
@@ -2,18 +2,29 @@
|
|
|
2
2
|
|
|
3
3
|
These rules guide Schema generation for project semantic knowledge bases built from source tree ZIP uploads.
|
|
4
4
|
|
|
5
|
-
- Generate durable
|
|
6
|
-
-
|
|
7
|
-
-
|
|
8
|
-
-
|
|
9
|
-
-
|
|
5
|
+
- Generate durable rules. Never copy working directories, absolute or temporary paths, source IDs, run IDs, or machine paths. Refer to "the ZIP source tree" and use stable `sources/...` paths only when needed. README files are filing guides, not business evidence.
|
|
6
|
+
- `sources/project/pskb-p*-refresh-state.md` and its numbered `-part-*.md` files are CLI machine state. Do not read, decode, cite, or compile them as business evidence; use the authored project and asset sources instead.
|
|
7
|
+
- CLI-managed asset facts live under `sources/assets/**`. Adopted personal semantics exported by the asset package live under `sources/personal-semantics/**` and are also CLI-managed generated source. Human project background, business rules, meetings, decisions, corrections, and references live outside those generated directories; asset refresh must not delete or override those human inputs.
|
|
8
|
+
- Organize generated Wiki pages by scope and business use, not by mirroring every source file. The primary navigation has five ordered entries: project overview, project-wide shared knowledge, business domains, event and asset catalog, and governance with provenance. Within each domain, explain the business question, judgment path, relevant events, metrics, assets, and boundaries. Keep asset-type pages as secondary evidence and lookup indexes.
|
|
9
|
+
- Begin the root page with question-intent routing. Route business-state and current-value questions through the matching domain and recall card; route named assets and field/definition/dependency questions through the asset catalog and governance; route shared product background through project-wide knowledge. If no card matches, enter the relevant domain and filter assets by business object, answer grain, filters and time. If no suitable evidence remains, state the gap. Stop searching once the smallest authoritative evidence set matches object, grain, scope and time.
|
|
10
|
+
- Each recall card must identify its triggering questions, business object and answer grain, required parameters, conditional branches with direct asset targets, excluded or non-interchangeable assets, a stop condition, and a fallback for unavailable, conflicting or unmatched evidence. Preserve these as instructions in the compiled card; a fixed preferred-then-fallback sequence is insufficient when branches use different definitions.
|
|
11
|
+
- Public event groups are a project event lookup taxonomy. A group such as a product module is not automatically a business domain or an event definition. Only include events present in the exported asset scope, preserve their event-name identity, and link to the canonical event page. Never infer business meaning, certification, or domain membership from a group label alone. Personal event catalogs must not enter a shared project Wiki.
|
|
12
|
+
- The project overview must start with the project-level business model: business positioning, audience roles, business objects, object relationships, decision chains, asset roles in those chains, and non-goals. Asset counts, snapshot hashes, source package metadata and build logs belong after that model. Do not reduce the overview to a directory, asset inventory, or build summary.
|
|
10
13
|
- Do not infer business meaning from titles alone. Preserve unknowns, conflicts, source scope, certification state, and provenance when evidence is incomplete.
|
|
14
|
+
- Distinguish query counts, distinct report counts, company counts and people counts; never substitute one grain for another from similarly named fields. A scoped personal-semantic method for customer report usage belongs only on its verified scenario card and must link the actual search event, company field, report-name field, report asset and adoption record. Mark unverified field equivalence or name uniqueness as unknown.
|
|
15
|
+
- If the governed package contains neither certified entry assets nor adopted personal semantics, compile the uploaded empty skeleton as an explicit unknown-state Wiki with the normal five navigation layers. Do not invent business domains, decisions, metrics, or asset definitions. When later evidence replaces the skeleton, remove obsolete empty-state claims from the published Wiki.
|
|
11
16
|
- Corrections and decisions override other material only when they state target, content, date, status, and applicable scope.
|
|
12
17
|
|
|
13
18
|
|
|
14
19
|
## Navigation and page naming
|
|
15
20
|
|
|
16
|
-
The
|
|
21
|
+
The top-level `index.md` is decision-oriented. Keep its five primary entries; do not add a sitemap, individual assets or properties, numeric IDs, containers, or raw filenames. Put recall cards under domains, event groups under the event map, asset indexes under the catalog, and individual assets in category/domain/container pages. A full sitemap belongs in `wiki/index.md` or category indexes, never the root.
|
|
22
|
+
|
|
23
|
+
Both indexes use these primary targets: `wiki/project-overview.md`, `wiki/common/index.md`, `wiki/domains/index.md`, `wiki/asset-index/index.md`, `wiki/governance/index.md`. Put `wiki/event-map/index.md` below the catalog; keep asset, card, and adoption pages reachable below the five entries.
|
|
24
|
+
|
|
25
|
+
Adopted personal semantics are source provenance, not a top-level knowledge category. Integrate each accepted conclusion into its declared project, domain, recall-card, or asset target with its applicable boundary; retain a knowledge-adoption record under governance. A personal preference remains scoped and must not be turned into a project-wide rule merely because it was adopted. Use the label "project supplementary knowledge" for the integrated content and "knowledge adoption record" for its provenance.
|
|
26
|
+
|
|
27
|
+
Navigation taxonomy version 2.1 adds root intent routing and conditional recall-card execution. On a refresh from an older version, perform a full Wiki rebuild from current sources and regenerate the root index and cards; do not reuse obsolete published pages or retain an old top-level personal-semantic page. Preserve human source files and current canonical asset facts. After publication, verify routing, no-card fallback, card branches, stop conditions and all five navigation entries. A valid file count alone does not prove answer quality.
|
|
17
28
|
|
|
18
29
|
When linking to an individual asset, use its business title as the visible link text and keep the numeric ID only as supporting identity beside the title, for example `示例报表(report 1001)`. Do not render bare numeric links such as `1001` as navigation items.
|
|
19
30
|
|
|
@@ -21,10 +32,17 @@ When linking to an individual asset, use its business title as the visible link
|
|
|
21
32
|
|
|
22
33
|
CLI Agent has already performed the main semantic compilation for ALL assets: business meanings, SQL interpretation, calculation definitions, relationships, domains, recall boundaries, and conflict findings. These are editable source documents, not an imported final Wiki snapshot. Reuse their complete prose and calculation facts. Do not repeat project-wide extraction, SQL parsing, semantic planning, or per-field rewriting.
|
|
23
34
|
|
|
24
|
-
|
|
35
|
+
Consume adopted personal semantics by type: `background` informs context, `preference` informs routing and style, `experience` supplies proven cautions, and `asset_context` annotates an existing referenced asset. Retain person name, source/update time, source IDs, and scope; never expose `open_id`. Fuse similar conclusions without widening scope. They cannot override governed definitions, SQL facts, corrections, decisions, or live results.
|
|
36
|
+
|
|
37
|
+
Business-domain pages need a judgment model and `Agent 使用摘要` for first-hop routing: business state, objects, signals, decision path, primary/supporting/drilldown/excluded assets, events, metrics, and dimensions. Do not replace this with a report list or regenerate it without newer scoped evidence.
|
|
38
|
+
|
|
39
|
+
Reject or repair any generated Wiki shape where the root, overview, or business-domain pages only list questions, events, metrics, dimensions, reports, dashboards or counts without explaining the business judgment chain that makes those assets useful. Examples in source instructions are illustrative only; never hardcode project-specific business domains, assets, metrics, event names or decision chains into the compiled Wiki.
|
|
40
|
+
|
|
41
|
+
Compile and publish the Wiki with prepared asset sections, linked references, concise titled navigation, and scoped human context. Batch independent writes and link checks; reuse unchanged pages.
|
|
25
42
|
|
|
26
|
-
|
|
43
|
+
For SQL assets, keep Agent-authored purpose, parameters, output fields, grain, filters, limits, applicable/non-applicable questions, and evidence locator in one `Agent 使用摘要`. Raw SQL/index JSON stays local; do not infer missing details. Keep unknowns, certification, dependency-only status, conflicts, and blocked recall; do not dismiss safety states as stale placeholders. Never expose `CLI Agent`, `摘要来源`, `semantic_plan`, parser fallback, or builder/debug terms in Wiki prose.
|
|
44
|
+
- `dependency_only` is an answer-authority limit, not a blanket ban on retrieval. Known metadata may support definition, dependency or conflict explanations. It cannot independently prove business state or live numeric results. If platform permissions block direct metadata retrieval, follow its authorized referencing asset and say what remains unverified.
|
|
27
45
|
|
|
28
|
-
For SQL
|
|
46
|
+
For non-SQL reports, keep `Agent 使用摘要` useful for business routing, not a mechanical parser echo. Purpose and applicable questions must differ. Preserve evidenced metrics, dimensions, and filters; where unavailable, direct the reader to confirm in the source report instead of using broad `未识别/未发现` placeholders.
|
|
29
47
|
|
|
30
|
-
During incremental compilation,
|
|
48
|
+
During incremental compilation, update changed sources and dependent pages, indexes, and cross-source conclusions; reuse unrelated pages and remove obsolete assertions. Adopted personal semantics share generated sources' paths, hashes, and add/replace/remove lifecycle. Integrate human evidence by scope, status, and authority rather than recency; distinguish scope differences from contradictions and preserve uploaded-source provenance.
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# 项目语义知识库编译准则
|
|
2
|
+
|
|
3
|
+
预置版本:1.1。导航分类版本:2.1。
|
|
4
|
+
|
|
5
|
+
## 总体要求
|
|
6
|
+
|
|
7
|
+
将项目语义源文件编译为有证据支撑的 Wiki,供分析 Agent 和知识维护者使用。保留项目层面的业务模型、资产定义、判断路径、问题路由、有明确适用范围的补充知识及其来源。当前数值、实体列表和趋势必须通过实时执行获取。项目名称、业务对象、事件名称、指标、资产身份和结论均以当前源文件为准,不得从本预置准则中推定。
|
|
8
|
+
|
|
9
|
+
本文件是可持续复用的编译指令,不是要求再次生成编译准则的提示词。首次构建与增量编译使用同一套准则;全量重建也无需重新生成准则。只有经过明确审查的准则变更,才可升级预置版本。
|
|
10
|
+
|
|
11
|
+
## 源文件职责与读取方式
|
|
12
|
+
|
|
13
|
+
- `raw/` 存放已上传的源文件,只允许读取;仅当前平台插件明确授权的 URL 更新除外。`wiki/` 存放编译后的页面。根目录 `index.md` 用于导航。
|
|
14
|
+
- 一个 ZIP 对应一个父源文件。使用本次执行提供的固定目录树,完整读取其中有效的业务文件,不得扫描目录树以外的内容。保留真实的父级 `sourceId` 和实际吸收的原始子文件精确路径;子文件不是独立源文件。URL 源文件同样保留平台提供的 `sourceId` 和实际吸收的子文件精确路径。不得编造身份标识或来源路径。
|
|
15
|
+
- README 是归档说明,不是业务证据。清单文件、刷新状态索引及其编号分片、哈希、日志和机器状态均不是业务证据,不得解码后编译为 Wiki 事实。应使用已编写的项目与资产源文档。
|
|
16
|
+
- CLI 管理的资产事实位于 `sources/assets/`;已采纳的个人语义位于 `sources/personal-semantics/`。人工补充的项目背景、会议、决策、纠正和参考资料属于独立证据。刷新时必须保留人工文件和未预期的手工修改。
|
|
17
|
+
- Markdown、文本、CSV、SVG 等文本格式优先使用 Read;长文本须分页读至末尾。获得完整、可用的语义后停止解析。读取失败时处理编码或格式问题,不得运行无关解析器。其他格式遵循当前插件的源文件解析约定,包括首选工具、有界回退、完整覆盖工作表或页面,以及失败退出方式。图片也优先使用 Read,只有语义提取失败或结果不可用时,才允许使用插件支持的回退方式。不得依据模型名称决定解析顺序,也不得在编译过程中安装解析器。
|
|
18
|
+
- 记录真实的失败情况,包括源文件身份、精确原始路径和失败原因。不得用笼统断言补齐缺失事实,也不得将解析失败表述为成功。
|
|
19
|
+
|
|
20
|
+
## 上游已编写语义的复用约定
|
|
21
|
+
|
|
22
|
+
上游 Agent 已编写业务含义、SQL 解释、计算事实、关系、业务域、召回边界和冲突说明;这些内容是可编辑的源文档。应复用其完整表述和证据,不得重复开展全项目提取、SQL 解析、语义规划或逐字段改写。只有发现具体矛盾或更新且适用范围明确的证据时,才重新审视已有解释;冲突无法解决时保留不确定性。
|
|
23
|
+
|
|
24
|
+
项目概览首先呈现项目层面的业务模型:项目定位、受众角色、业务对象及其关系、业务判断链、资产作用和不覆盖的目标。源文件清单与数量是辅助信息。业务域应解释需要判断的状态、对象、信号、决策路径、主要资产、辅助资产、下钻资产、排除资产和适用边界,不得用报表列表代替。缺失的业务证据应明确标为未知;空的源文件骨架不得被扩写成虚构的业务模型。
|
|
25
|
+
|
|
26
|
+
每项资产保留一份由 Agent 编写的业务摘要。SQL 报表摘要包含用途、参数、输出字段、统计粒度、筛选条件、限制、适用与不适用的问题,以及证据定位。非 SQL 报表应区分用途与可回答的问题,保留有证据的指标、维度、筛选条件和限制,不得机械复述解析器输出。定义细节缺失时,要求回到源报表确认。原始 SQL 和原始索引 JSON 保留在本地证据包中。
|
|
27
|
+
|
|
28
|
+
不得将安全状态当作过时占位信息而忽略。保留认证状态、定义有效性、冲突、运行时策略和召回限制。已认证的资产仍可能存在定义未知的情况。仅作为依赖的资产可以解释定义、依赖关系和冲突,但不能独立证明业务状态或当前结果。遵守平台访问权限;权限不足时,不得改用其他项目或扩大范围来替代。
|
|
29
|
+
|
|
30
|
+
## 权威性与补充知识
|
|
31
|
+
|
|
32
|
+
- 资产定义、治理事实和实时结果保留各自的权威性。决策或纠正仅在明确的目标、内容、日期、状态和适用范围内覆盖其他材料;时间较新本身不足以构成覆盖依据。
|
|
33
|
+
- 已采纳的背景知识用于补充上下文;偏好用于问题路由和呈现;经验用于提供注意事项;资产上下文用于注释已引用的既有资产。保留来源人员的显示名、来源或更新时间、采纳来源和适用范围,不得暴露后端私有用户标识。
|
|
34
|
+
- 将结论整合到其对应的项目、业务域、问答卡片或资产页面。采纳个人语义不意味着将个人偏好提升为全项目通用规则,也不意味着替换资产定义。在治理目录中保留知识采纳记录。目标已删除或失效时,必须明确按历史信息处理。
|
|
35
|
+
- 保留未知项和冲突。不得仅凭标题或分组标签推断业务含义、字段等价关系、唯一身份、事件定义或认证状态。合并事实前须核对业务对象、统计粒度、筛选条件、范围和时间。
|
|
36
|
+
- 公共事件分组是检索分类,不自动构成业务域或事件定义。仅纳入导出范围内有证据的事件,并保留实际名称。个人事件目录不得转为项目共享知识。
|
|
37
|
+
|
|
38
|
+
## 导航与页面命名
|
|
39
|
+
|
|
40
|
+
一级导航按以下五项顺序组织,让业务问题有入口,让资产目录提供进一步的证据:
|
|
41
|
+
|
|
42
|
+
1. 项目概览:`wiki/project-overview.md`。
|
|
43
|
+
2. 项目公共知识:`wiki/common/index.md`。
|
|
44
|
+
3. 业务域:`wiki/domains/index.md`。
|
|
45
|
+
4. 事件与资产目录:`wiki/asset-index/index.md`。
|
|
46
|
+
5. 治理与来源追溯:`wiki/governance/index.md`。
|
|
47
|
+
|
|
48
|
+
事件分组保留在 `wiki/event-map/index.md` 下,通过资产目录访问。问答卡片归入对应业务域;单项资产页面放入匹配的报表、看板、指标或元数据分类。新增页面应进入适当的既有分类。已采纳个人语义属于来源信息,不单独设为顶层知识分类。页面名使用基于标题的稳定短横线命名(kebab-case),ID 仅作为辅助身份信息。
|
|
49
|
+
|
|
50
|
+
根目录 `index.md` 与存在时的 `wiki/index.md` 通过相同的五个一级入口导航。根目录 `index.md` 不含 YAML 元数据头、来源详情、格式化器(Formatter)内容、构建日志或页面元数据。一级模块最多八个,直接 Wiki 链接最多十二个。不得平铺单项资产,也不得使用裸数字作为链接文本。同类详情页面达到三个时使用分类索引;完整站点地图放在下级索引中。每个已发布页面都必须能从根目录沿链接逐级访问。
|
|
51
|
+
|
|
52
|
+
## 问题路由与召回卡片
|
|
53
|
+
|
|
54
|
+
根导航首先按问题意图提供入口。业务状态和当前数值问题进入匹配的业务域与卡片;指定资产、字段、定义和依赖问题进入资产目录与治理;共享产品背景进入公共知识。没有匹配卡片时,在相关业务域内按对象、回答粒度、筛选条件和时间筛选资产;证据不足时明确说明缺口。
|
|
55
|
+
|
|
56
|
+
保留每张卡片的触发问题、适用范围、对象与回答粒度、必需参数、直接指向资产的条件分支、排除或不可互换的资产、停止条件,以及资产不可用、证据冲突或无匹配时的回退方式。不得将条件分支替换为统一的“首选资产、失败后备用资产”列表。缺失的路由或参数必须明确保留为缺口,不得编造。找到与对象、粒度、范围和时间匹配的最小权威证据集合后,停止扩展检索。当前数值、实体列表、趋势和明细结果必须通过已获授权的实时报表或查询执行获取。
|
|
57
|
+
|
|
58
|
+
## 页面元数据与来源追溯
|
|
59
|
+
|
|
60
|
+
每个 `wiki/**/*.md` 页面均以 YAML 元数据头开始,包含 `title`、`type`、`depth`、`related` 和 `source`;使用 ZIP 或 URL 证据时还须包含 `sourceId`。`type` 取值为 `overview`、`concept`、`guide`、`reference`、`synthesis` 或 `faq`;`depth` 取值为 `overview`、`detail` 或 `howto`;`summary` 为可选字段。使用真实的原始文件相对路径和真实父源文件身份,不得因存在来源字段就编造路径。正文中的来源引用使用纯文本路径,不使用指向原始文件的 Markdown 链接。Wiki 正文不得暴露凭据、宿主机路径或内部构建与调试标记。
|
|
61
|
+
|
|
62
|
+
## 刷新与发布前检查
|
|
63
|
+
|
|
64
|
+
增量编译应更新变化的源文件、依赖页面、索引和跨源结论,复用无关页面。源文件发生变化或消失时,移除过时的当前结论。已采纳个人语义同样遵循新增、替换、删除的生命周期。保留人工证据、手工内容和未变化的事实。导航迁移可以要求全量重建 Wiki,但不因此重新生成或替换正式准则。
|
|
65
|
+
|
|
66
|
+
发布前检查元数据头、真实来源、链接、根目录可达性、全部五个一级入口、卡片分支和停止条件、权威性限制、冲突以及过时结论。相关链接与索引应一并修复。源文件和页面数量完整不等于回答质量合格。发布必须成功结束,且抽查召回页面应保留源文件定义、人工补充内容的适用边界和导航。发布失败时,不得将源文件已上传或编译已排队表述为已发布知识得到更新。
|