@itradingai/aiwiki 0.2.20 → 0.2.22

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/docs/USAGE.md CHANGED
@@ -1,496 +1,310 @@
1
- # AIWiki 使用说明
1
+ # AIWiki Usage Guide
2
2
 
3
- 目标体验:
3
+ AIWiki is meant to be used through an AI assistant.
4
+
5
+ The target experience is simple:
4
6
 
5
7
  ```text
6
- 用户只做一次 setup -> 之后只把链接发给 Agent -> Agent 自动调用 AIWiki 入库
8
+ set up once
9
+ -> send links, files, or notes to your assistant
10
+ -> the assistant calls AIWiki
11
+ -> AIWiki writes reusable local Markdown knowledge
7
12
  ```
8
13
 
9
- AIWiki CLI 不负责网页抓取。Qclaw、Codex、Claude Code、Cursor、Gemini CLI 等都只是宿主 Agent 的例子;这份文档面向的是通用宿主 Agent 协作。
10
-
11
- AIWiki CLI 也不调用 LLM。高质量 Wiki Entry 来自宿主 Agent 提供的 `analysis` 或 `wiki_entry`;如果没有这些字段,AIWiki 会生成可追溯的 deterministic fallback 条目,只包含来源、反链、正文预览和待补全区。
14
+ AIWiki does not fetch webpages and does not call an LLM. The host assistant reads and understands sources; AIWiki validates, writes, links, queries, and checks the local knowledge base.
12
15
 
13
- AIWiki 会把证据通道和疑似风险分开记录。`source_quote` 等宿主 Agent 提供的原文引用属于证据通道;`coverage_suspected_incomplete`、`unsupported_claims`、`needs_review` 等属于 AIWiki 生成的启发式复核信号,不等于已经证明内容遗漏。
16
+ ## 1. Ask Your Assistant to Install AIWiki
14
17
 
15
- 成功入库的正文会写入稳定的 `content_fingerprint`。如果同一来源同一正文重复入库,AIWiki 会保留新的 run 记录、给出重复 fingerprint warning,并把长期文件改名保存,避免静默覆盖已有知识资产。
18
+ Copy this prompt into your assistant:
16
19
 
17
- ## 1. 一次性设置
20
+ ```text
21
+ Please install and configure AIWiki for me.
18
22
 
19
- 发布后直接运行交互式 setup:
23
+ First check that Node.js is installed and that node --version is >=20.
24
+ If Node.js is missing or older than 20, stop and tell me how to upgrade before running npm install.
20
25
 
21
- ```bash
22
- npx @itradingai/aiwiki@latest setup
23
- ```
26
+ Use this knowledge base path:
24
27
 
25
- CLI 会询问知识库路径。直接回车会使用默认目录;输入 `y` 后会创建或补齐目录,并设置为默认知识库。
28
+ <replace-with-my-aiwiki-path>
26
29
 
27
- 如果你想一行命令完成,也可以运行:
30
+ Run these commands:
28
31
 
29
- ```bash
30
- npx @itradingai/aiwiki@latest setup --path "F:\knowledge_data\aiwiki" --yes
31
- ```
32
-
33
- 本地仓库测试时:
32
+ npm install -g @itradingai/aiwiki@latest
33
+ aiwiki setup --path "<replace-with-my-aiwiki-path>" --yes
34
+ aiwiki agent sync --yes
35
+ aiwiki agent sync --path "<replace-with-my-aiwiki-path>" --yes
36
+ aiwiki agent check --json
37
+ aiwiki agent check --path "<replace-with-my-aiwiki-path>" --json
38
+ aiwiki doctor --path "<replace-with-my-aiwiki-path>"
39
+ aiwiki status --path "<replace-with-my-aiwiki-path>"
34
40
 
35
- ```bash
36
- cd "<AIWiki 仓库路径>"
37
- npm install
38
- npm run build
39
- npm link
40
- aiwiki setup --path "F:\knowledge_data\aiwiki-test" --yes
41
+ Then summarize what was installed, what was synced, whether workspace guidance exists, and whether I need to restart or reload the assistant.
41
42
  ```
42
43
 
43
- 验证:
44
+ Example knowledge base paths:
44
45
 
45
- ```bash
46
- aiwiki doctor
47
- aiwiki status
46
+ ```text
47
+ Windows: D:\AIWiki
48
+ macOS/Linux: ~/AIWiki
49
+ Project test: ./aiwiki-test
48
50
  ```
49
51
 
50
- `setup` 会做两件事:
52
+ This creates or repairs the knowledge base, syncs the packaged AIWiki skill into supported assistant environments, and writes workspace-level `AGENTS.md` guidance.
51
53
 
52
- - 创建或补齐知识库目录。
53
- - 写入默认知识库配置到用户目录,例如 `%USERPROFILE%\.aiwiki\config.json`。
54
+ Expected result:
54
55
 
55
- 之后大多数命令都可以省略 `--path`。
56
+ - `aiwiki --version` works
57
+ - `aiwiki doctor --path <workspace>` passes or reports actionable fixes
58
+ - `aiwiki agent check --json` reports supported targets as `installed`, `updated`, or `current`
59
+ - `aiwiki agent check --path <workspace> --json` reports workspace guidance as current
60
+ - `aiwiki status --path <workspace>` shows the workspace state and next action
56
61
 
57
- ## 2. 让宿主 Agent 学会 AIWiki
62
+ ## 2. Agent Sync Layers
58
63
 
59
- 初始化知识库之后,先让宿主 Agent 学会 AIWiki。主路径推荐使用幂等同步:
64
+ AIWiki has two sync layers:
60
65
 
61
66
  ```bash
62
67
  aiwiki agent sync --yes
63
- aiwiki agent check --json
64
68
  ```
65
69
 
66
- 旧的安装向导仍然兼容,但不再作为首选路径:
70
+ Syncs AIWiki instructions into supported local assistant targets such as Codex, Claude Code, QClaw, and OpenClaw.
67
71
 
68
72
  ```bash
69
- aiwiki agent install
73
+ aiwiki agent sync --path <workspace> --yes
70
74
  ```
71
75
 
72
- 也可以跳过选择,直接指定目标:
76
+ Writes marker-bounded guidance into the knowledge base root so future assistants entering that workspace know to use AIWiki commands before generic file search.
77
+
78
+ Verify both layers:
73
79
 
74
80
  ```bash
75
- aiwiki agent install --agent codex --yes
76
- aiwiki agent install --agent qclaw --yes
77
- aiwiki agent install --agent openclaw --yes
78
- aiwiki agent install --agent claude --yes
81
+ aiwiki agent check --json
82
+ aiwiki agent check --path <workspace> --json
79
83
  ```
80
84
 
81
- 当前自动复制范围:
82
-
83
- - `codex`:复制到 Codex 用户 skills 目录。
84
- - `qclaw`:复制到 QClaw skills 目录。
85
- - `openclaw`:复制到 OpenClaw workspace skills 目录。
86
- - `claude`:复制为 Claude Code slash-command 提示文件。
87
-
88
- `opencode` 和 `hermes` 会被扫描出来,但 AIWiki 暂不自动写入它们的配置。确认官方用户提示/skill 目录后再开放自动安装。现在可先输出通用对接协议:
85
+ For unsupported hosts, print the generic assistant protocol:
89
86
 
90
87
  ```bash
91
88
  aiwiki prompt agent
92
89
  ```
93
90
 
94
- 把输出内容安装成宿主 Agent skill,或粘贴到宿主 Agent 的项目/会话说明里。不同 Agent 的安装入口不同,所以 AIWiki 提供自动安装向导和通用协议两条路径。
95
-
96
- `aiwiki agent check --json` 用来确认本机检测到哪些宿主 Agent、哪些已经安装 AIWiki 对接文件、哪些还需要运行 `aiwiki agent sync --agent <id> --yes`。
97
-
98
- ## 3. 日常使用
99
-
100
- 宿主 Agent 已经加载 AIWiki 协议后,把下面的话发给它,并替换链接:
101
-
102
- ```text
103
- 入库 https://example.com/article
104
- ```
105
-
106
- 宿主 Agent 应该自动完成:
107
-
108
- 1. 读取网页正文。
109
- 2. 生成 `aiwiki.agent_payload.v1`。
110
- 3. 通过 stdin 调用 `aiwiki ingest-agent --stdin`。
111
- 4. 把 AIWiki CLI 输出的入库结果摘要回复给用户。
112
-
113
- 用户不需要保存 JSON,不需要手动运行 `ingest-agent`,也不需要每次输入知识库路径。
91
+ ## 3. Ingest a Source
114
92
 
115
- ## 4. 宿主 Agent 端应回复什么
93
+ ### 10-minute trial route
116
94
 
117
- AIWiki CLI 会输出 key-value 信息。成功入库时类似:
95
+ For a first public trial, keep the loop deliberately small:
118
96
 
119
97
  ```text
120
- ingested: yes
121
- recorded: yes
122
- fetch_status: ok
123
- fit_score: 90
124
- fit_level: high
125
- source_title: 文章标题
126
- source_url: https://example.com/article
127
- summary: 这里是文章前段摘要,方便 Agent 快速告诉用户文章大意。
128
- run_id: 20260507-153012-abc123
129
- run_dir: F:\knowledge_data\aiwiki\09-runs\20260507-153012-abc123
130
- files: 8
131
- processing_summary: 09-runs/20260507-153012-abc123/processing-summary.md
132
- wiki_entry: 05-wiki/source-knowledge/article-slug.md
133
- wiki_entry_generation_mode: agent_enriched
134
- wiki_entry_quality: enriched
135
- grounding_evidence_available: yes
136
- grounding_evidence_channel: host_supplied
137
- grounding_needs_review: no
138
- grounding_markers: none
139
- grounding_claims_with_quotes: 1/1
140
- source_card: 03-sources/article-cards/article-slug.md
141
- draft_outline: 09-runs/20260507-153012-abc123/draft-outline.md # 仅在生成大纲时出现
142
- dashboard: dashboards/AIWiki Home.md
143
- review_queue: dashboards/Review Queue.md
144
- warnings: 0
98
+ setup
99
+ -> first source ingest
100
+ -> inspect generated artifacts
101
+ -> query/context reuse
102
+ -> lint/doctor check
103
+ -> short feedback note
145
104
  ```
146
105
 
147
- 宿主 Agent 回复用户时建议展示:
106
+ Concrete command surface:
148
107
 
149
- ```text
150
- AIWiki 已完成入库,并生成 Wiki 条目。
151
- 契合度:90 / high
152
- 摘要:……
153
- Wiki 条目:……
154
- 质量模式:enriched / agent_enriched
155
- 资料卡:……
156
- 处理记录:……
108
+ ```bash
109
+ aiwiki setup --path <workspace> --yes
110
+ aiwiki doctor --path <workspace>
111
+ aiwiki ingest-file --file <file> --path <workspace>
112
+ aiwiki query "<topic>" --path <workspace>
113
+ aiwiki context "<topic>" --path <workspace>
114
+ aiwiki lint --json --path <workspace>
157
115
  ```
158
116
 
159
- 网页读取失败但已记录原因时类似:
117
+ When the source is a URL, the assistant reads it first and then calls `aiwiki ingest-agent`; AIWiki itself does not crawl the page.
160
118
 
161
- ```text
162
- ingested: no
163
- recorded: yes
164
- fetch_status: failed
165
- fit_score: 0
166
- fit_level: fetch_failed
167
- summary: 网页需要登录或宿主 Agent 无法访问正文。
168
- run_id: 20260507-153012-abc123-fetch-failed
169
- run_dir: F:\knowledge_data\aiwiki\09-runs\20260507-153012-abc123-fetch-failed
170
- files: 2
171
- processing_summary: 09-runs/20260507-153012-abc123-fetch-failed/processing-summary.md
172
- dashboard: dashboards/AIWiki Home.md
173
- review_queue: dashboards/Review Queue.md
174
- warnings: 0
175
- ```
176
-
177
- 宿主 Agent 回复用户时建议展示:
119
+ Tell your assistant:
178
120
 
179
121
  ```text
180
- 未成功入库正文,但已记录失败原因。
181
- 原因:……
182
- 记录目录:……
183
- 处理记录:……
184
- Obsidian 入口:dashboards/AIWiki Home.md
122
+ Ingest this into AIWiki:
123
+ https://example.com/article
185
124
  ```
186
125
 
187
- ## 5. 成功后会生成什么
188
-
189
- 每次成功 run 先看核心产物:
126
+ The assistant should:
190
127
 
191
- ```text
192
- 09-runs/<run-id>/payload.json
193
- 09-runs/<run-id>/raw.md
194
- 09-runs/<run-id>/source-card.md
195
- 09-runs/<run-id>/wiki-entry.md
196
- 09-runs/<run-id>/processing-summary.md
197
- 02-raw/articles/
198
- 03-sources/article-cards/
199
- 05-wiki/source-knowledge/
200
- ```
128
+ 1. read the source
129
+ 2. build an `aiwiki.agent_payload.v1` payload
130
+ 3. provide `analysis` or `wiki_entry` when it understands the source
131
+ 4. call `aiwiki ingest-agent --stdin`
132
+ 5. report the generated Wiki Entry, Source Card, and Processing Summary
201
133
 
202
- 只有 payload 有对应内容或 `request.outputs` 明确请求时,才会出现可选增强产物:
134
+ For local files, the assistant may call:
203
135
 
204
- ```text
205
- 09-runs/<run-id>/creative-assets.md
206
- 09-runs/<run-id>/topics.md
207
- 09-runs/<run-id>/draft-outline.md
208
- 04-claims/_suggestions/
209
- 06-assets/_suggestions/
210
- 07-topics/ready/
211
- 08-outputs/outlines/
136
+ ```bash
137
+ aiwiki ingest-file --file <file>
212
138
  ```
213
139
 
214
- `05-wiki/source-knowledge` 是默认知识层;`09-runs` 用于追溯每次处理。
215
-
216
- 可以直接查看仓库里的 `examples/demo-run/` 和 `examples/obsidian-vault-sample/`,它们由当前 CLI 生成,展示普通本地文件只生成核心产物、enriched Agent payload 才生成可选增强产物。
217
-
218
- Wiki Entry 有两种质量模式:
219
-
220
- - `agent_enriched` / `enriched`:宿主 Agent 提供了 `analysis` 或 `wiki_entry`。
221
- - `deterministic_fallback` / `scaffold`:AIWiki 只生成来源、反链、正文预览和待补全区。
222
-
223
- `analysis` 可以继续只传旧字段,也可以补充 `entities`、`concepts`、`tensions`、`reusable_judgments`、`suggested_links`。这些字段会进入 Wiki Entry,帮助用户区分“实体/概念”“可复用判断”“证据边界”和“后续可链接条目”,但不会被 AIWiki 当作已经证实的事实。
224
-
225
- Artifact 角色保持固定:
226
-
227
- - `03-sources/article-cards` 是 trace-first 的资料卡:保留来源、反链、原文预览和 grounding 状态,不承担完整知识正文。
228
- - `05-wiki/source-knowledge` 是 enriched knowledge surface:宿主 Agent 的 `analysis` / `wiki_entry` 会进入这里。
229
- - `02-raw/articles` 是原始证据层,后续摘要、Claim 和复核都应能回查这里。
230
-
231
- Grounding 字段都是 additive,可被旧工具忽略:
232
-
233
- - `grounding_evidence_available`:是否存在可回查的宿主证据。
234
- - `grounding_evidence_channel`:`host_supplied` 或 `none`。
235
- - `grounding_needs_review`:是否需要复核。
236
- - `grounding_markers`:例如 `unsupported_claims`、`source_quote_not_found`、`coverage_suspected_incomplete`。
237
- - `coverage_suspected_incomplete`:长文提取过少时的启发式疑似标记,不是确定遗漏结论。
140
+ If webpage reading fails, the assistant should still record the failure with `fetch_status: "failed"` so the run is traceable.
238
141
 
239
- Wiki Entry 还会记录来源角色:
142
+ ## 4. Ask the Knowledge Base
240
143
 
241
- - `source_role: input`:默认值,外部文章、网页、书籍、视频等资料;`represents_user_view: false`。
242
- - `source_role: output`:用户已发布文章、演讲稿、公众号文章等个人输出;通常可配合 `represents_user_view: true`。
243
- - `source_role: processing`:用户自己的草稿、笔记、思考过程;默认不直接代表最终观点。
244
-
245
- ### Obsidian 链接规则
246
-
247
- AIWiki 生成的 Markdown 按 Obsidian vault 内路径组织,文件正文会使用 wikilink:
144
+ Tell your assistant:
248
145
 
249
146
  ```text
250
- [[03-sources/article-cards/article-slug|资料卡]]
251
- [[05-wiki/source-knowledge/article-slug|Wiki 条目]]
252
- [[02-raw/articles/article-slug|原文]]
253
- [[09-runs/20260507-153012-abc123/processing-summary|处理记录]]
147
+ What does AIWiki know about <topic>?
254
148
  ```
255
149
 
256
- 链接规则:
257
- - wikilink 使用 vault 相对路径,统一为 `/`,并去掉 `.md` 后缀。
258
- - `02-raw/articles`、`03-sources/article-cards`、`05-wiki/source-knowledge` 和 `09-runs/<run-id>` 是核心产物;`04-claims/_suggestions`、`06-assets/_suggestions`、`07-topics/ready`、`08-outputs/outlines` 只在 payload 有对应内容或 `request.outputs` 明确请求时生成。
259
- - `03-sources/article-cards` 只链接本次实际生成的可选增强产物,避免空目录和断链。
260
- - `09-runs/<run-id>/processing-summary.md` 会把本次生成的 Markdown 文件列成可点击 wikilink;`payload.json` 不是 Markdown,保留普通路径。
261
- - frontmatter 会写入 `aiwiki_id`、`type`、`status`、`slug`、`source_url`、`content_fingerprint`、`created_at`、`captured_at`、`run_id`、`source_card`、`raw_note`、`run_summary` 等核心字段;`claims_note`、`assets_note`、`topics_note`、`outline_note` 只在对应产物存在时出现。
262
-
263
- ### Obsidian 数据库入口
150
+ The assistant should call:
264
151
 
265
- `setup` 会创建或补齐 Obsidian 数据库资产:
266
-
267
- ```text
268
- dashboards/AIWiki Home.md
269
- dashboards/Wiki Entries.md
270
- dashboards/Source Cards.md
271
- dashboards/Review Queue.md
272
- dashboards/Recent Runs.md
273
- dashboards/Topic Pipeline.md
274
- _system/schemas/aiwiki-frontmatter.md
275
- _system/templates/source-card.md
276
- _system/templates/review-note.md
152
+ ```bash
153
+ aiwiki context "<topic>"
277
154
  ```
278
155
 
279
- 这些文件只在缺失时创建;如果你已经在 Obsidian 中改过 dashboard 或模板,重新运行 `aiwiki setup` 不会覆盖。
280
-
281
- 不安装 Dataview 也可以使用:
282
- - 用 `dashboards/AIWiki Home.md` 作为入口。
283
- - 用 Obsidian Properties 查看字段。
284
- - 用 Backlinks / Graph View 查看资料卡和原文、Claim、素材、选题、大纲之间的关系。
285
-
286
- 安装 Dataview 后,dashboard 中的 `dataview` 代码块会渲染成表格,用来查看最近入库、待审队列、选题管线和处理记录。
287
-
288
- Dataview 是可选增强,不是 AIWiki 的必需依赖。AIWiki 不会自动修改 `.obsidian` 或安装社区插件;需要时请在 Obsidian 的 Community plugins 中自行安装并启用 Dataview。
156
+ `context` returns JSON for assistants. It includes query scope, result quality, match reasons, quality signals, and related references.
289
157
 
290
- ## 6. Agent 对接协议
158
+ For human-readable terminal output:
291
159
 
292
- 给任意宿主 Agent 的详细协议见:
293
-
294
- ```text
295
- docs/AGENT_HANDOFF.md
160
+ ```bash
161
+ aiwiki query "<topic>"
296
162
  ```
297
163
 
298
- 核心要求:
299
-
300
- - Agent 负责读取网页正文。
301
- - Agent 应尽量提供 `analysis` 或 `wiki_entry`,让 Wiki Entry 进入 enriched 模式。
302
- - Agent 不要让用户保存 payload。
303
- - Agent 不要让用户手动运行 `ingest-agent`。
304
- - Agent 生成 payload 后优先通过 stdin 调用 `aiwiki ingest-agent --stdin`。
305
- - Agent 最后向用户汇报入库状态、摘要、Wiki 条目、质量模式、资料卡和处理记录。
306
-
307
- ## 7. 查询和整理
308
-
309
- 从知识库调度内容:
164
+ Useful filters:
310
165
 
311
166
  ```bash
312
- aiwiki context "AI Agent"
313
- aiwiki query "AI Agent"
167
+ aiwiki context "AI Agent" --type wiki_entries --source-role input --wiki-type source_knowledge --status active --limit 5
168
+ aiwiki query "AI Agent" --type source_cards --status to-review --limit 3
314
169
  ```
315
170
 
316
- `context` 返回 JSON 给宿主 Agent 使用;`query` 使用同一套检索结果,输出给人看的分组摘要。
171
+ AIWiki retrieval is local Markdown/frontmatter search. It is not vector search, external search, or RAG-over-wiki.
317
172
 
318
- 检查知识库结构:
173
+ ## 5. Check and Maintain the Workspace
319
174
 
320
- ```bash
321
- aiwiki lint
175
+ Tell your assistant:
176
+
177
+ ```text
178
+ Check and organize my AIWiki workspace.
322
179
  ```
323
180
 
324
- 常用工作台模式:
181
+ The assistant should run:
325
182
 
326
183
  ```bash
327
- aiwiki lint --severity warning
328
184
  aiwiki lint --json
329
- aiwiki lint --no-write
330
- aiwiki lint --fix-empty-dirs --json
331
185
  ```
332
186
 
333
- `lint` 会先输出 `lint_summary`、`safe_fixes`、`top_issue` 和报告路径,再按 Errors / Warnings / Info 分组展示问题。每个问题会尽量给出建议动作,例如 `enrich`、`fix_link`、`reingest`、`archive`、`mark_reviewed` 或 `remove_empty_optional_dir`。`--severity` 只查看指定级别,`--json` 给宿主 Agent 使用,`--no-write` 只在终端检查而不更新 `dashboards/Lint Report.md`。`--fix-empty-dirs --json` 只会删除已知且为空的可选增强目录,并在 `safe_fixes.applied` 里报告删除了什么。
334
-
335
- 查看下一步建议:
187
+ If only safe fixes are available and you allow cleanup:
336
188
 
337
189
  ```bash
338
- aiwiki next
190
+ aiwiki lint --fix-empty-dirs --json
191
+ aiwiki lint --json
339
192
  ```
340
193
 
341
- 默认情况下,`lint` 输出报告并写入 `dashboards/Lint Report.md`。
342
-
343
- ## 8. 高级调试
344
-
345
- 如果 Agent 只能输出 JSON,才需要手动保存 payload:
194
+ Current automatic safe fix:
346
195
 
347
- ```bash
348
- aiwiki ingest-agent --payload "F:\knowledge_data\payload.json"
349
- ```
196
+ - remove known empty optional enhancement directories
350
197
 
351
- 也可以用 stdin:
198
+ AIWiki must not delete core directories, unknown directories, non-empty directories, or files as a safe fix.
352
199
 
353
- ```bash
354
- type "F:\knowledge_data\payload.json" | aiwiki ingest-agent --stdin
355
- ```
200
+ ## 6. Generated Artifacts
356
201
 
357
- 本地 Markdown 文件:
202
+ Core artifacts:
358
203
 
359
- ```bash
360
- aiwiki ingest-file --file "F:\knowledge_data\article.md"
204
+ ```text
205
+ 09-runs/<run-id>/payload.json
206
+ 09-runs/<run-id>/raw.md
207
+ 09-runs/<run-id>/source-card.md
208
+ 09-runs/<run-id>/wiki-entry.md
209
+ 09-runs/<run-id>/processing-summary.md
210
+ 02-raw/articles/
211
+ 03-sources/article-cards/
212
+ 05-wiki/source-knowledge/
361
213
  ```
362
214
 
363
- 命名规则:
364
- - 本地 `md` 导入时,AIWiki 优先使用文件标题或文件名生成外部文件名。
365
- - 不会优先从正文内容里的 `# 一级标题` 反推文件名,避免整理后的文件名失去来源可追踪性。
366
- - 如果文件名本身没有语义,才会继续回退到更弱的兜底命名。
215
+ Optional artifacts appear only when the assistant provides matching content or explicitly requests them:
367
216
 
368
- 链接加正文文件:
369
-
370
- ```bash
371
- aiwiki ingest-url "https://example.com/article" --content-file "F:\knowledge_data\article.md"
217
+ ```text
218
+ 09-runs/<run-id>/creative-assets.md
219
+ 09-runs/<run-id>/topics.md
220
+ 09-runs/<run-id>/draft-outline.md
221
+ 04-claims/_suggestions/
222
+ 06-assets/_suggestions/
223
+ 07-topics/ready/
224
+ 08-outputs/outlines/
372
225
  ```
373
226
 
374
- 注意:`ingest-url` 不会抓网页,只会读取 `--content-file`。
375
-
376
- ## 9. 常见问题
227
+ Wiki Entry quality modes:
377
228
 
378
- ### 找不到 `aiwiki` 命令
229
+ - `agent_enriched` / `enriched`: the assistant provided analysis or wiki content.
230
+ - `deterministic_fallback` / `scaffold`: AIWiki created a traceable shell from source content only.
379
231
 
380
- 本地仓库测试时重新执行:
232
+ First-run success checklist:
381
233
 
382
- ```bash
383
- cd "<AIWiki 仓库路径>"
384
- npm run build
385
- npm link
386
- ```
234
+ - `09-runs/<run-id>/processing-summary.md` exists
235
+ - a raw record exists under `02-raw/articles/`
236
+ - a Source Card exists under `03-sources/article-cards/`
237
+ - a Wiki Entry exists under `05-wiki/source-knowledge/`
238
+ - `aiwiki query "<topic>" --path <workspace>` returns a relevant match
239
+ - `aiwiki context "<topic>" --path <workspace>` returns machine-readable context for the assistant
240
+ - `aiwiki lint --json --path <workspace>` returns structured workspace feedback
387
241
 
388
- ### `doctor` 提示没有默认知识库
242
+ ## 7. Obsidian and Dataview
389
243
 
390
- 运行:
244
+ AIWiki writes plain Markdown and frontmatter.
391
245
 
392
- ```bash
393
- aiwiki setup --path "F:\knowledge_data\aiwiki" --yes
394
- ```
246
+ Obsidian is optional. Dataview is optional. AIWiki does not edit `.obsidian`, install plugins, or require Dataview to query the knowledge base.
395
247
 
396
- ### 宿主 Agent 抓不到网页
248
+ `aiwiki setup` creates dashboard and schema files when missing and preserves user-edited files.
397
249
 
398
- 这是宿主 Agent 的网页读取问题,不是 AIWiki CLI 的问题。让宿主 Agent 生成 `fetch_status=failed` 的 payload,AIWiki 会记录失败原因。
250
+ ## 8. Troubleshooting
399
251
 
400
- ### 想换默认知识库目录
252
+ ### The `aiwiki` command is missing
401
253
 
402
- 重新运行:
254
+ Ask your assistant to reinstall globally:
403
255
 
404
256
  ```bash
405
- aiwiki setup --path "新的知识库路径" --yes
257
+ npm install -g @itradingai/aiwiki@latest
258
+ aiwiki --version
406
259
  ```
407
260
 
408
- ## 10. 最小验收清单
261
+ ### The assistant still searches files directly
409
262
 
410
- 完成一次 Agent 入库测试后,检查:
263
+ Run:
411
264
 
412
265
  ```bash
413
- aiwiki status
266
+ aiwiki agent sync --yes
267
+ aiwiki agent sync --path <workspace> --yes
268
+ aiwiki agent check --path <workspace> --json
414
269
  ```
415
270
 
416
- 验收标准:
417
-
418
- - `run_count` 增加。
419
- - `09-runs` 下出现新目录。
420
- - `processing-summary.md` 存在。
421
- - 成功读取时,`03-sources/article-cards` 下出现资料卡。
422
- - 成功读取时,`05-wiki/source-knowledge` 下出现 Wiki Entry。
423
- - 抓取失败时,`09-runs/<run-id>-fetch-failed` 下出现失败记录。
424
- # System Purpose Files
425
-
426
- `aiwiki setup` now also seeds `_system/purpose.md`, `_system/index.md`, and `_system/log.md` when they are missing. These files give humans and host Agents a stable entry point for the knowledge-base goal, scope, common folders, common commands, and lightweight event notes. Re-running setup preserves user edits.
427
-
428
- ## Diagnostic Commands
429
-
430
- `aiwiki doctor` checks the workspace directories, write permission, and required system files: `_system/purpose.md`, `_system/index.md`, and `_system/log.md`.
271
+ Then restart or reload the assistant if needed.
431
272
 
432
- `aiwiki status` keeps the existing run-count summary and also reports:
273
+ The assistant should use `aiwiki lint`, `aiwiki status`, `aiwiki query`, `aiwiki context`, `aiwiki ingest-file`, or `aiwiki ingest-agent` before falling back to generic file search.
433
274
 
434
- - `fallback_entries`: Wiki entries generated as deterministic fallback/scaffold.
435
- - `grounding_review_entries`: Wiki entries marked for grounding review.
436
- - `lint_status`: whether a lint report is missing, clean, or needs attention.
437
- - `system_files`: readiness of purpose, index, and log files.
438
- - `next_action`: the recommended next command.
275
+ ### The assistant cannot read a webpage
439
276
 
440
- `aiwiki next` uses the same repair order: fix workspace structure first, then lint errors, lint warnings, empty-workspace onboarding, and finally healthy-state query guidance.
277
+ That is a host assistant access issue, not an AIWiki crawler failure. Ask the assistant to record a failed fetch payload so the attempt remains traceable.
441
278
 
442
- ## Query and Context Filters
279
+ ### You want to move the default workspace
443
280
 
444
- `aiwiki context` and `aiwiki query` use local Markdown/frontmatter search. They do not use vector search, a database, external search, or RAG-over-wiki.
445
-
446
- Useful filters:
281
+ Run:
447
282
 
448
283
  ```bash
449
- aiwiki context "AI Agent" --type wiki_entries --source-role input --wiki-type source_knowledge --status active --limit 5
450
- aiwiki query "AI Agent" --type source_cards --status to-review --limit 3
284
+ aiwiki setup --path <new-workspace> --yes
285
+ aiwiki agent sync --path <new-workspace> --yes
286
+ aiwiki agent check --path <new-workspace> --json
451
287
  ```
452
288
 
453
- Supported filters:
454
-
455
- - `--type`: one result group, such as `wiki_entries`, `source_cards`, `claims`, `topics`, `outlines`, or `raw_refs`.
456
- - `--source-role`: frontmatter `source_role`, usually `input`, `processing`, or `output`.
457
- - `--wiki-type`: frontmatter `wiki_type`, such as `source_knowledge` or `personal_knowledge`.
458
- - `--status`: frontmatter status, such as `active`, `to-review`, `ready`, or `draft`.
459
- - `--limit`: per-group result limit, clamped from 1 to 50.
289
+ ### You want to give trial feedback
460
290
 
461
- The JSON result keeps the stable `schema_version: "aiwiki.context.v1"` and now also includes:
291
+ Use [`TRIAL_FEEDBACK_TEMPLATE.md`](TRIAL_FEEDBACK_TEMPLATE.md). The template captures setup, first ingest, query/context reuse, lint/doctor clarity, and the user's practical scenario without adding a new AIWiki command.
462
292
 
463
- - `query_scope`: filters, limit, and searched groups.
464
- - `result_quality`: total matches, best score, whether a Wiki Entry was found, and warnings.
465
- - `recommended_next_action`: for example `use_matches_for_answer`, `review_grounding_or_enrich_entry`, or `broaden_query_or_ingest_source`.
466
- - Per match: `match_reasons`, `quality_signals`, and `related_refs`.
293
+ ## 9. Local Development
467
294
 
468
- Use `match_reasons` to explain why a result matched. Use `quality_signals` before answering confidently: scaffold or grounding-review entries should be treated as traceable leads, not final knowledge.
469
-
470
- ## Agent Skill Sync
471
-
472
- AIWiki does not modify Agent configuration during `npm install`. After first install or upgrade, sync the packaged skill explicitly:
295
+ For repository development:
473
296
 
474
297
  ```bash
475
- aiwiki agent sync --yes
476
- aiwiki agent check
477
- ```
478
-
479
- For one host Agent:
480
-
481
- ```bash
482
- aiwiki agent sync --agent codex --yes
483
- aiwiki agent sync --agent claude --yes
298
+ npm install
299
+ npm run build
300
+ npm test
301
+ npm link
484
302
  ```
485
303
 
486
- Useful Agent-facing options:
304
+ Use a temporary test workspace:
487
305
 
488
306
  ```bash
489
- aiwiki agent sync --dry-run
490
- aiwiki agent sync --json --yes
491
- aiwiki agent check --json
492
- aiwiki agent help
493
- aiwiki context --help
307
+ aiwiki setup --path "./aiwiki-test" --yes
308
+ aiwiki doctor --path "./aiwiki-test"
309
+ aiwiki status --path "./aiwiki-test"
494
310
  ```
495
-
496
- `agent sync` is safe for first install and cross-version upgrades. It installs missing targets, leaves current targets unchanged, and backs up changed installed skill files before overwrite. If a backup is created, tell the user the backup path and that rollback means copying the backup file back to the target path.