@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/README.md +245 -172
- package/README.zh-CN.md +323 -0
- package/dist/src/app.js +120 -10
- package/docs/AGENT_HANDOFF.md +133 -177
- package/docs/AGENT_HANDOFF.zh-CN.md +150 -0
- package/docs/FAQ.md +80 -42
- package/docs/FAQ.zh-CN.md +103 -0
- package/docs/README.md +34 -23
- package/docs/README.zh-CN.md +34 -0
- package/docs/RELEASE.md +46 -16
- package/docs/RELEASE.zh-CN.md +84 -0
- package/docs/ROADMAP.md +51 -29
- package/docs/ROADMAP.zh-CN.md +65 -0
- package/docs/SHOWCASE.md +59 -45
- package/docs/SHOWCASE.zh-CN.md +81 -0
- package/docs/TRIAL_FEEDBACK_TEMPLATE.md +49 -0
- package/docs/USAGE.md +172 -358
- package/docs/USAGE.zh-CN.md +243 -0
- package/docs/development-log.md +80 -0
- package/package.json +11 -2
- package/skill/SKILL.md +33 -2
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
|
-
|
|
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
|
|
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
|
-
|
|
16
|
+
## 1. Ask Your Assistant to Install AIWiki
|
|
14
17
|
|
|
15
|
-
|
|
18
|
+
Copy this prompt into your assistant:
|
|
16
19
|
|
|
17
|
-
|
|
20
|
+
```text
|
|
21
|
+
Please install and configure AIWiki for me.
|
|
18
22
|
|
|
19
|
-
|
|
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
|
-
|
|
22
|
-
npx @itradingai/aiwiki@latest setup
|
|
23
|
-
```
|
|
26
|
+
Use this knowledge base path:
|
|
24
27
|
|
|
25
|
-
|
|
28
|
+
<replace-with-my-aiwiki-path>
|
|
26
29
|
|
|
27
|
-
|
|
30
|
+
Run these commands:
|
|
28
31
|
|
|
29
|
-
|
|
30
|
-
|
|
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
|
-
|
|
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
|
-
```
|
|
46
|
-
|
|
47
|
-
|
|
46
|
+
```text
|
|
47
|
+
Windows: D:\AIWiki
|
|
48
|
+
macOS/Linux: ~/AIWiki
|
|
49
|
+
Project test: ./aiwiki-test
|
|
48
50
|
```
|
|
49
51
|
|
|
50
|
-
`
|
|
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
|
-
|
|
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.
|
|
62
|
+
## 2. Agent Sync Layers
|
|
58
63
|
|
|
59
|
-
|
|
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
|
|
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
|
|
76
|
-
aiwiki agent
|
|
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
|
-
|
|
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
|
-
|
|
93
|
+
### 10-minute trial route
|
|
116
94
|
|
|
117
|
-
|
|
95
|
+
For a first public trial, keep the loop deliberately small:
|
|
118
96
|
|
|
119
97
|
```text
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
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
|
-
|
|
106
|
+
Concrete command surface:
|
|
148
107
|
|
|
149
|
-
```
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
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
|
-
|
|
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
|
-
|
|
188
|
-
|
|
189
|
-
每次成功 run 先看核心产物:
|
|
126
|
+
The assistant should:
|
|
190
127
|
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
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
|
-
|
|
134
|
+
For local files, the assistant may call:
|
|
203
135
|
|
|
204
|
-
```
|
|
205
|
-
|
|
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
|
-
`
|
|
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
|
-
|
|
142
|
+
## 4. Ask the Knowledge Base
|
|
240
143
|
|
|
241
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
158
|
+
For human-readable terminal output:
|
|
291
159
|
|
|
292
|
-
|
|
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
|
-
|
|
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
|
-
|
|
321
|
-
|
|
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
|
-
|
|
334
|
-
|
|
335
|
-
查看下一步建议:
|
|
187
|
+
If only safe fixes are available and you allow cleanup:
|
|
336
188
|
|
|
337
189
|
```bash
|
|
338
|
-
aiwiki
|
|
190
|
+
aiwiki lint --fix-empty-dirs --json
|
|
191
|
+
aiwiki lint --json
|
|
339
192
|
```
|
|
340
193
|
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
## 8. 高级调试
|
|
344
|
-
|
|
345
|
-
如果 Agent 只能输出 JSON,才需要手动保存 payload:
|
|
194
|
+
Current automatic safe fix:
|
|
346
195
|
|
|
347
|
-
|
|
348
|
-
aiwiki ingest-agent --payload "F:\knowledge_data\payload.json"
|
|
349
|
-
```
|
|
196
|
+
- remove known empty optional enhancement directories
|
|
350
197
|
|
|
351
|
-
|
|
198
|
+
AIWiki must not delete core directories, unknown directories, non-empty directories, or files as a safe fix.
|
|
352
199
|
|
|
353
|
-
|
|
354
|
-
type "F:\knowledge_data\payload.json" | aiwiki ingest-agent --stdin
|
|
355
|
-
```
|
|
200
|
+
## 6. Generated Artifacts
|
|
356
201
|
|
|
357
|
-
|
|
202
|
+
Core artifacts:
|
|
358
203
|
|
|
359
|
-
```
|
|
360
|
-
|
|
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
|
-
|
|
371
|
-
|
|
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
|
-
|
|
375
|
-
|
|
376
|
-
## 9. 常见问题
|
|
227
|
+
Wiki Entry quality modes:
|
|
377
228
|
|
|
378
|
-
|
|
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
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
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
|
-
|
|
242
|
+
## 7. Obsidian and Dataview
|
|
389
243
|
|
|
390
|
-
|
|
244
|
+
AIWiki writes plain Markdown and frontmatter.
|
|
391
245
|
|
|
392
|
-
|
|
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
|
-
|
|
248
|
+
`aiwiki setup` creates dashboard and schema files when missing and preserves user-edited files.
|
|
397
249
|
|
|
398
|
-
|
|
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
|
-
|
|
257
|
+
npm install -g @itradingai/aiwiki@latest
|
|
258
|
+
aiwiki --version
|
|
406
259
|
```
|
|
407
260
|
|
|
408
|
-
|
|
261
|
+
### The assistant still searches files directly
|
|
409
262
|
|
|
410
|
-
|
|
263
|
+
Run:
|
|
411
264
|
|
|
412
265
|
```bash
|
|
413
|
-
aiwiki
|
|
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`
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
279
|
+
### You want to move the default workspace
|
|
443
280
|
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
Useful filters:
|
|
281
|
+
Run:
|
|
447
282
|
|
|
448
283
|
```bash
|
|
449
|
-
aiwiki
|
|
450
|
-
aiwiki
|
|
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
|
-
|
|
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
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
476
|
-
|
|
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
|
-
|
|
304
|
+
Use a temporary test workspace:
|
|
487
305
|
|
|
488
306
|
```bash
|
|
489
|
-
aiwiki
|
|
490
|
-
aiwiki
|
|
491
|
-
aiwiki
|
|
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.
|