@itradingai/aiwiki 0.2.21 → 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 -176
- package/README.zh-CN.md +323 -0
- package/docs/AGENT_HANDOFF.md +115 -185
- package/docs/AGENT_HANDOFF.zh-CN.md +150 -0
- package/docs/FAQ.md +73 -49
- 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 -364
- package/docs/USAGE.zh-CN.md +243 -0
- package/docs/development-log.md +80 -0
- package/package.json +11 -2
- package/skill/SKILL.md +6 -2
package/docs/USAGE.md
CHANGED
|
@@ -1,502 +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
|
|
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.
|
|
10
15
|
|
|
11
|
-
|
|
16
|
+
## 1. Ask Your Assistant to Install AIWiki
|
|
12
17
|
|
|
13
|
-
|
|
18
|
+
Copy this prompt into your assistant:
|
|
14
19
|
|
|
15
|
-
|
|
20
|
+
```text
|
|
21
|
+
Please install and configure AIWiki for me.
|
|
16
22
|
|
|
17
|
-
|
|
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.
|
|
18
25
|
|
|
19
|
-
|
|
26
|
+
Use this knowledge base path:
|
|
20
27
|
|
|
21
|
-
|
|
22
|
-
npx @itradingai/aiwiki@latest setup
|
|
23
|
-
```
|
|
28
|
+
<replace-with-my-aiwiki-path>
|
|
24
29
|
|
|
25
|
-
|
|
30
|
+
Run these commands:
|
|
26
31
|
|
|
27
|
-
|
|
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>"
|
|
28
40
|
|
|
29
|
-
|
|
30
|
-
npx @itradingai/aiwiki@latest setup --path "F:\knowledge_data\aiwiki" --yes
|
|
41
|
+
Then summarize what was installed, what was synced, whether workspace guidance exists, and whether I need to restart or reload the assistant.
|
|
31
42
|
```
|
|
32
43
|
|
|
33
|
-
|
|
44
|
+
Example knowledge base paths:
|
|
34
45
|
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
npm link
|
|
40
|
-
aiwiki setup --path "F:\knowledge_data\aiwiki-test" --yes
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
验证:
|
|
44
|
-
|
|
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
|
-
`
|
|
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
|
-
aiwiki agent sync --path <workspace> --yes
|
|
65
|
-
aiwiki agent check --path <workspace> --json
|
|
66
68
|
```
|
|
67
69
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
旧的安装向导仍然兼容,但不再作为首选路径:
|
|
70
|
+
Syncs AIWiki instructions into supported local assistant targets such as Codex, Claude Code, QClaw, and OpenClaw.
|
|
71
71
|
|
|
72
72
|
```bash
|
|
73
|
-
aiwiki agent
|
|
73
|
+
aiwiki agent sync --path <workspace> --yes
|
|
74
74
|
```
|
|
75
75
|
|
|
76
|
-
|
|
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:
|
|
77
79
|
|
|
78
80
|
```bash
|
|
79
|
-
aiwiki agent
|
|
80
|
-
aiwiki agent
|
|
81
|
-
aiwiki agent install --agent openclaw --yes
|
|
82
|
-
aiwiki agent install --agent claude --yes
|
|
81
|
+
aiwiki agent check --json
|
|
82
|
+
aiwiki agent check --path <workspace> --json
|
|
83
83
|
```
|
|
84
84
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
- `codex`:复制到 Codex 用户 skills 目录。
|
|
88
|
-
- `qclaw`:复制到 QClaw skills 目录。
|
|
89
|
-
- `openclaw`:复制到 OpenClaw workspace skills 目录。
|
|
90
|
-
- `claude`:复制为 Claude Code slash-command 提示文件。
|
|
91
|
-
|
|
92
|
-
`opencode` 和 `hermes` 会被扫描出来,但 AIWiki 暂不自动写入它们的配置。确认官方用户提示/skill 目录后再开放自动安装。现在可先输出通用对接协议:
|
|
85
|
+
For unsupported hosts, print the generic assistant protocol:
|
|
93
86
|
|
|
94
87
|
```bash
|
|
95
88
|
aiwiki prompt agent
|
|
96
89
|
```
|
|
97
90
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
`aiwiki agent check --json` 用来确认本机检测到哪些宿主 Agent、哪些已经安装 AIWiki 对接文件、哪些还需要运行 `aiwiki agent sync --agent <id> --yes`。`aiwiki agent check --path <workspace> --json` 会同时检查知识库根目录的 `AGENTS.md` 是否包含当前 AIWiki 命令优先指导,缺失或过期时会提示运行 `aiwiki agent sync --path <workspace> --yes`。
|
|
91
|
+
## 3. Ingest a Source
|
|
101
92
|
|
|
102
|
-
|
|
93
|
+
### 10-minute trial route
|
|
103
94
|
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
宿主 Agent 已经加载 AIWiki 协议后,把下面的话发给它,并替换链接:
|
|
95
|
+
For a first public trial, keep the loop deliberately small:
|
|
107
96
|
|
|
108
97
|
```text
|
|
109
|
-
|
|
98
|
+
setup
|
|
99
|
+
-> first source ingest
|
|
100
|
+
-> inspect generated artifacts
|
|
101
|
+
-> query/context reuse
|
|
102
|
+
-> lint/doctor check
|
|
103
|
+
-> short feedback note
|
|
110
104
|
```
|
|
111
105
|
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
1. 读取网页正文。
|
|
115
|
-
2. 生成 `aiwiki.agent_payload.v1`。
|
|
116
|
-
3. 通过 stdin 调用 `aiwiki ingest-agent --stdin`。
|
|
117
|
-
4. 把 AIWiki CLI 输出的入库结果摘要回复给用户。
|
|
106
|
+
Concrete command surface:
|
|
118
107
|
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
ingested: yes
|
|
127
|
-
recorded: yes
|
|
128
|
-
fetch_status: ok
|
|
129
|
-
fit_score: 90
|
|
130
|
-
fit_level: high
|
|
131
|
-
source_title: 文章标题
|
|
132
|
-
source_url: https://example.com/article
|
|
133
|
-
summary: 这里是文章前段摘要,方便 Agent 快速告诉用户文章大意。
|
|
134
|
-
run_id: 20260507-153012-abc123
|
|
135
|
-
run_dir: F:\knowledge_data\aiwiki\09-runs\20260507-153012-abc123
|
|
136
|
-
files: 8
|
|
137
|
-
processing_summary: 09-runs/20260507-153012-abc123/processing-summary.md
|
|
138
|
-
wiki_entry: 05-wiki/source-knowledge/article-slug.md
|
|
139
|
-
wiki_entry_generation_mode: agent_enriched
|
|
140
|
-
wiki_entry_quality: enriched
|
|
141
|
-
grounding_evidence_available: yes
|
|
142
|
-
grounding_evidence_channel: host_supplied
|
|
143
|
-
grounding_needs_review: no
|
|
144
|
-
grounding_markers: none
|
|
145
|
-
grounding_claims_with_quotes: 1/1
|
|
146
|
-
source_card: 03-sources/article-cards/article-slug.md
|
|
147
|
-
draft_outline: 09-runs/20260507-153012-abc123/draft-outline.md # 仅在生成大纲时出现
|
|
148
|
-
dashboard: dashboards/AIWiki Home.md
|
|
149
|
-
review_queue: dashboards/Review Queue.md
|
|
150
|
-
warnings: 0
|
|
151
|
-
```
|
|
152
|
-
|
|
153
|
-
宿主 Agent 回复用户时建议展示:
|
|
154
|
-
|
|
155
|
-
```text
|
|
156
|
-
AIWiki 已完成入库,并生成 Wiki 条目。
|
|
157
|
-
契合度:90 / high
|
|
158
|
-
摘要:……
|
|
159
|
-
Wiki 条目:……
|
|
160
|
-
质量模式:enriched / agent_enriched
|
|
161
|
-
资料卡:……
|
|
162
|
-
处理记录:……
|
|
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>
|
|
163
115
|
```
|
|
164
116
|
|
|
165
|
-
|
|
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.
|
|
166
118
|
|
|
167
|
-
|
|
168
|
-
ingested: no
|
|
169
|
-
recorded: yes
|
|
170
|
-
fetch_status: failed
|
|
171
|
-
fit_score: 0
|
|
172
|
-
fit_level: fetch_failed
|
|
173
|
-
summary: 网页需要登录或宿主 Agent 无法访问正文。
|
|
174
|
-
run_id: 20260507-153012-abc123-fetch-failed
|
|
175
|
-
run_dir: F:\knowledge_data\aiwiki\09-runs\20260507-153012-abc123-fetch-failed
|
|
176
|
-
files: 2
|
|
177
|
-
processing_summary: 09-runs/20260507-153012-abc123-fetch-failed/processing-summary.md
|
|
178
|
-
dashboard: dashboards/AIWiki Home.md
|
|
179
|
-
review_queue: dashboards/Review Queue.md
|
|
180
|
-
warnings: 0
|
|
181
|
-
```
|
|
182
|
-
|
|
183
|
-
宿主 Agent 回复用户时建议展示:
|
|
119
|
+
Tell your assistant:
|
|
184
120
|
|
|
185
121
|
```text
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
记录目录:……
|
|
189
|
-
处理记录:……
|
|
190
|
-
Obsidian 入口:dashboards/AIWiki Home.md
|
|
122
|
+
Ingest this into AIWiki:
|
|
123
|
+
https://example.com/article
|
|
191
124
|
```
|
|
192
125
|
|
|
193
|
-
|
|
126
|
+
The assistant should:
|
|
194
127
|
|
|
195
|
-
|
|
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
|
|
196
133
|
|
|
197
|
-
|
|
198
|
-
09-runs/<run-id>/payload.json
|
|
199
|
-
09-runs/<run-id>/raw.md
|
|
200
|
-
09-runs/<run-id>/source-card.md
|
|
201
|
-
09-runs/<run-id>/wiki-entry.md
|
|
202
|
-
09-runs/<run-id>/processing-summary.md
|
|
203
|
-
02-raw/articles/
|
|
204
|
-
03-sources/article-cards/
|
|
205
|
-
05-wiki/source-knowledge/
|
|
206
|
-
```
|
|
134
|
+
For local files, the assistant may call:
|
|
207
135
|
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
```text
|
|
211
|
-
09-runs/<run-id>/creative-assets.md
|
|
212
|
-
09-runs/<run-id>/topics.md
|
|
213
|
-
09-runs/<run-id>/draft-outline.md
|
|
214
|
-
04-claims/_suggestions/
|
|
215
|
-
06-assets/_suggestions/
|
|
216
|
-
07-topics/ready/
|
|
217
|
-
08-outputs/outlines/
|
|
136
|
+
```bash
|
|
137
|
+
aiwiki ingest-file --file <file>
|
|
218
138
|
```
|
|
219
139
|
|
|
220
|
-
`
|
|
221
|
-
|
|
222
|
-
可以直接查看仓库里的 `examples/demo-run/` 和 `examples/obsidian-vault-sample/`,它们由当前 CLI 生成,展示普通本地文件只生成核心产物、enriched Agent payload 才生成可选增强产物。
|
|
223
|
-
|
|
224
|
-
Wiki Entry 有两种质量模式:
|
|
225
|
-
|
|
226
|
-
- `agent_enriched` / `enriched`:宿主 Agent 提供了 `analysis` 或 `wiki_entry`。
|
|
227
|
-
- `deterministic_fallback` / `scaffold`:AIWiki 只生成来源、反链、正文预览和待补全区。
|
|
228
|
-
|
|
229
|
-
`analysis` 可以继续只传旧字段,也可以补充 `entities`、`concepts`、`tensions`、`reusable_judgments`、`suggested_links`。这些字段会进入 Wiki Entry,帮助用户区分“实体/概念”“可复用判断”“证据边界”和“后续可链接条目”,但不会被 AIWiki 当作已经证实的事实。
|
|
230
|
-
|
|
231
|
-
Artifact 角色保持固定:
|
|
232
|
-
|
|
233
|
-
- `03-sources/article-cards` 是 trace-first 的资料卡:保留来源、反链、原文预览和 grounding 状态,不承担完整知识正文。
|
|
234
|
-
- `05-wiki/source-knowledge` 是 enriched knowledge surface:宿主 Agent 的 `analysis` / `wiki_entry` 会进入这里。
|
|
235
|
-
- `02-raw/articles` 是原始证据层,后续摘要、Claim 和复核都应能回查这里。
|
|
140
|
+
If webpage reading fails, the assistant should still record the failure with `fetch_status: "failed"` so the run is traceable.
|
|
236
141
|
|
|
237
|
-
|
|
142
|
+
## 4. Ask the Knowledge Base
|
|
238
143
|
|
|
239
|
-
|
|
240
|
-
- `grounding_evidence_channel`:`host_supplied` 或 `none`。
|
|
241
|
-
- `grounding_needs_review`:是否需要复核。
|
|
242
|
-
- `grounding_markers`:例如 `unsupported_claims`、`source_quote_not_found`、`coverage_suspected_incomplete`。
|
|
243
|
-
- `coverage_suspected_incomplete`:长文提取过少时的启发式疑似标记,不是确定遗漏结论。
|
|
244
|
-
|
|
245
|
-
Wiki Entry 还会记录来源角色:
|
|
246
|
-
|
|
247
|
-
- `source_role: input`:默认值,外部文章、网页、书籍、视频等资料;`represents_user_view: false`。
|
|
248
|
-
- `source_role: output`:用户已发布文章、演讲稿、公众号文章等个人输出;通常可配合 `represents_user_view: true`。
|
|
249
|
-
- `source_role: processing`:用户自己的草稿、笔记、思考过程;默认不直接代表最终观点。
|
|
250
|
-
|
|
251
|
-
### Obsidian 链接规则
|
|
252
|
-
|
|
253
|
-
AIWiki 生成的 Markdown 按 Obsidian vault 内路径组织,文件正文会使用 wikilink:
|
|
144
|
+
Tell your assistant:
|
|
254
145
|
|
|
255
146
|
```text
|
|
256
|
-
|
|
257
|
-
[[05-wiki/source-knowledge/article-slug|Wiki 条目]]
|
|
258
|
-
[[02-raw/articles/article-slug|原文]]
|
|
259
|
-
[[09-runs/20260507-153012-abc123/processing-summary|处理记录]]
|
|
147
|
+
What does AIWiki know about <topic>?
|
|
260
148
|
```
|
|
261
149
|
|
|
262
|
-
|
|
263
|
-
- wikilink 使用 vault 相对路径,统一为 `/`,并去掉 `.md` 后缀。
|
|
264
|
-
- `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` 明确请求时生成。
|
|
265
|
-
- `03-sources/article-cards` 只链接本次实际生成的可选增强产物,避免空目录和断链。
|
|
266
|
-
- `09-runs/<run-id>/processing-summary.md` 会把本次生成的 Markdown 文件列成可点击 wikilink;`payload.json` 不是 Markdown,保留普通路径。
|
|
267
|
-
- 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` 只在对应产物存在时出现。
|
|
268
|
-
|
|
269
|
-
### Obsidian 数据库入口
|
|
150
|
+
The assistant should call:
|
|
270
151
|
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
```text
|
|
274
|
-
dashboards/AIWiki Home.md
|
|
275
|
-
dashboards/Wiki Entries.md
|
|
276
|
-
dashboards/Source Cards.md
|
|
277
|
-
dashboards/Review Queue.md
|
|
278
|
-
dashboards/Recent Runs.md
|
|
279
|
-
dashboards/Topic Pipeline.md
|
|
280
|
-
_system/schemas/aiwiki-frontmatter.md
|
|
281
|
-
_system/templates/source-card.md
|
|
282
|
-
_system/templates/review-note.md
|
|
152
|
+
```bash
|
|
153
|
+
aiwiki context "<topic>"
|
|
283
154
|
```
|
|
284
155
|
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
不安装 Dataview 也可以使用:
|
|
288
|
-
- 用 `dashboards/AIWiki Home.md` 作为入口。
|
|
289
|
-
- 用 Obsidian Properties 查看字段。
|
|
290
|
-
- 用 Backlinks / Graph View 查看资料卡和原文、Claim、素材、选题、大纲之间的关系。
|
|
156
|
+
`context` returns JSON for assistants. It includes query scope, result quality, match reasons, quality signals, and related references.
|
|
291
157
|
|
|
292
|
-
|
|
158
|
+
For human-readable terminal output:
|
|
293
159
|
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
## 6. Agent 对接协议
|
|
297
|
-
|
|
298
|
-
给任意宿主 Agent 的详细协议见:
|
|
299
|
-
|
|
300
|
-
```text
|
|
301
|
-
docs/AGENT_HANDOFF.md
|
|
160
|
+
```bash
|
|
161
|
+
aiwiki query "<topic>"
|
|
302
162
|
```
|
|
303
163
|
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
- Agent 负责读取网页正文。
|
|
307
|
-
- Agent 应尽量提供 `analysis` 或 `wiki_entry`,让 Wiki Entry 进入 enriched 模式。
|
|
308
|
-
- Agent 不要让用户保存 payload。
|
|
309
|
-
- Agent 不要让用户手动运行 `ingest-agent`。
|
|
310
|
-
- Agent 生成 payload 后优先通过 stdin 调用 `aiwiki ingest-agent --stdin`。
|
|
311
|
-
- Agent 最后向用户汇报入库状态、摘要、Wiki 条目、质量模式、资料卡和处理记录。
|
|
312
|
-
|
|
313
|
-
## 7. 查询和整理
|
|
314
|
-
|
|
315
|
-
从知识库调度内容:
|
|
164
|
+
Useful filters:
|
|
316
165
|
|
|
317
166
|
```bash
|
|
318
|
-
aiwiki context "AI Agent"
|
|
319
|
-
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
|
|
320
169
|
```
|
|
321
170
|
|
|
322
|
-
|
|
171
|
+
AIWiki retrieval is local Markdown/frontmatter search. It is not vector search, external search, or RAG-over-wiki.
|
|
323
172
|
|
|
324
|
-
|
|
173
|
+
## 5. Check and Maintain the Workspace
|
|
325
174
|
|
|
326
|
-
|
|
327
|
-
|
|
175
|
+
Tell your assistant:
|
|
176
|
+
|
|
177
|
+
```text
|
|
178
|
+
Check and organize my AIWiki workspace.
|
|
328
179
|
```
|
|
329
180
|
|
|
330
|
-
|
|
181
|
+
The assistant should run:
|
|
331
182
|
|
|
332
183
|
```bash
|
|
333
|
-
aiwiki lint --severity warning
|
|
334
184
|
aiwiki lint --json
|
|
335
|
-
aiwiki lint --no-write
|
|
336
|
-
aiwiki lint --fix-empty-dirs --json
|
|
337
185
|
```
|
|
338
186
|
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
查看下一步建议:
|
|
187
|
+
If only safe fixes are available and you allow cleanup:
|
|
342
188
|
|
|
343
189
|
```bash
|
|
344
|
-
aiwiki
|
|
190
|
+
aiwiki lint --fix-empty-dirs --json
|
|
191
|
+
aiwiki lint --json
|
|
345
192
|
```
|
|
346
193
|
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
## 8. 高级调试
|
|
194
|
+
Current automatic safe fix:
|
|
350
195
|
|
|
351
|
-
|
|
196
|
+
- remove known empty optional enhancement directories
|
|
352
197
|
|
|
353
|
-
|
|
354
|
-
aiwiki ingest-agent --payload "F:\knowledge_data\payload.json"
|
|
355
|
-
```
|
|
356
|
-
|
|
357
|
-
也可以用 stdin:
|
|
198
|
+
AIWiki must not delete core directories, unknown directories, non-empty directories, or files as a safe fix.
|
|
358
199
|
|
|
359
|
-
|
|
360
|
-
type "F:\knowledge_data\payload.json" | aiwiki ingest-agent --stdin
|
|
361
|
-
```
|
|
200
|
+
## 6. Generated Artifacts
|
|
362
201
|
|
|
363
|
-
|
|
202
|
+
Core artifacts:
|
|
364
203
|
|
|
365
|
-
```
|
|
366
|
-
|
|
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/
|
|
367
213
|
```
|
|
368
214
|
|
|
369
|
-
|
|
370
|
-
- 本地 `md` 导入时,AIWiki 优先使用文件标题或文件名生成外部文件名。
|
|
371
|
-
- 不会优先从正文内容里的 `# 一级标题` 反推文件名,避免整理后的文件名失去来源可追踪性。
|
|
372
|
-
- 如果文件名本身没有语义,才会继续回退到更弱的兜底命名。
|
|
215
|
+
Optional artifacts appear only when the assistant provides matching content or explicitly requests them:
|
|
373
216
|
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
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/
|
|
378
225
|
```
|
|
379
226
|
|
|
380
|
-
|
|
227
|
+
Wiki Entry quality modes:
|
|
381
228
|
|
|
382
|
-
|
|
229
|
+
- `agent_enriched` / `enriched`: the assistant provided analysis or wiki content.
|
|
230
|
+
- `deterministic_fallback` / `scaffold`: AIWiki created a traceable shell from source content only.
|
|
383
231
|
|
|
384
|
-
|
|
232
|
+
First-run success checklist:
|
|
385
233
|
|
|
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
|
-
|
|
389
|
-
cd "<AIWiki 仓库路径>"
|
|
390
|
-
npm run build
|
|
391
|
-
npm link
|
|
392
|
-
```
|
|
242
|
+
## 7. Obsidian and Dataview
|
|
393
243
|
|
|
394
|
-
|
|
244
|
+
AIWiki writes plain Markdown and frontmatter.
|
|
395
245
|
|
|
396
|
-
|
|
246
|
+
Obsidian is optional. Dataview is optional. AIWiki does not edit `.obsidian`, install plugins, or require Dataview to query the knowledge base.
|
|
397
247
|
|
|
398
|
-
|
|
399
|
-
aiwiki setup --path "F:\knowledge_data\aiwiki" --yes
|
|
400
|
-
```
|
|
401
|
-
|
|
402
|
-
### 宿主 Agent 抓不到网页
|
|
248
|
+
`aiwiki setup` creates dashboard and schema files when missing and preserves user-edited files.
|
|
403
249
|
|
|
404
|
-
|
|
250
|
+
## 8. Troubleshooting
|
|
405
251
|
|
|
406
|
-
###
|
|
252
|
+
### The `aiwiki` command is missing
|
|
407
253
|
|
|
408
|
-
|
|
254
|
+
Ask your assistant to reinstall globally:
|
|
409
255
|
|
|
410
256
|
```bash
|
|
411
|
-
|
|
257
|
+
npm install -g @itradingai/aiwiki@latest
|
|
258
|
+
aiwiki --version
|
|
412
259
|
```
|
|
413
260
|
|
|
414
|
-
|
|
261
|
+
### The assistant still searches files directly
|
|
415
262
|
|
|
416
|
-
|
|
263
|
+
Run:
|
|
417
264
|
|
|
418
265
|
```bash
|
|
419
|
-
aiwiki
|
|
266
|
+
aiwiki agent sync --yes
|
|
267
|
+
aiwiki agent sync --path <workspace> --yes
|
|
268
|
+
aiwiki agent check --path <workspace> --json
|
|
420
269
|
```
|
|
421
270
|
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
- `run_count` 增加。
|
|
425
|
-
- `09-runs` 下出现新目录。
|
|
426
|
-
- `processing-summary.md` 存在。
|
|
427
|
-
- 成功读取时,`03-sources/article-cards` 下出现资料卡。
|
|
428
|
-
- 成功读取时,`05-wiki/source-knowledge` 下出现 Wiki Entry。
|
|
429
|
-
- 抓取失败时,`09-runs/<run-id>-fetch-failed` 下出现失败记录。
|
|
430
|
-
# System Purpose Files
|
|
431
|
-
|
|
432
|
-
`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.
|
|
433
|
-
|
|
434
|
-
## Diagnostic Commands
|
|
271
|
+
Then restart or reload the assistant if needed.
|
|
435
272
|
|
|
436
|
-
|
|
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.
|
|
437
274
|
|
|
438
|
-
|
|
275
|
+
### The assistant cannot read a webpage
|
|
439
276
|
|
|
440
|
-
|
|
441
|
-
- `grounding_review_entries`: Wiki entries marked for grounding review.
|
|
442
|
-
- `lint_status`: whether a lint report is missing, clean, or needs attention.
|
|
443
|
-
- `system_files`: readiness of purpose, index, and log files.
|
|
444
|
-
- `next_action`: the recommended next command.
|
|
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.
|
|
445
278
|
|
|
446
|
-
|
|
279
|
+
### You want to move the default workspace
|
|
447
280
|
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
`aiwiki context` and `aiwiki query` use local Markdown/frontmatter search. They do not use vector search, a database, external search, or RAG-over-wiki.
|
|
451
|
-
|
|
452
|
-
Useful filters:
|
|
281
|
+
Run:
|
|
453
282
|
|
|
454
283
|
```bash
|
|
455
|
-
aiwiki
|
|
456
|
-
aiwiki
|
|
284
|
+
aiwiki setup --path <new-workspace> --yes
|
|
285
|
+
aiwiki agent sync --path <new-workspace> --yes
|
|
286
|
+
aiwiki agent check --path <new-workspace> --json
|
|
457
287
|
```
|
|
458
288
|
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
- `--type`: one result group, such as `wiki_entries`, `source_cards`, `claims`, `topics`, `outlines`, or `raw_refs`.
|
|
462
|
-
- `--source-role`: frontmatter `source_role`, usually `input`, `processing`, or `output`.
|
|
463
|
-
- `--wiki-type`: frontmatter `wiki_type`, such as `source_knowledge` or `personal_knowledge`.
|
|
464
|
-
- `--status`: frontmatter status, such as `active`, `to-review`, `ready`, or `draft`.
|
|
465
|
-
- `--limit`: per-group result limit, clamped from 1 to 50.
|
|
466
|
-
|
|
467
|
-
The JSON result keeps the stable `schema_version: "aiwiki.context.v1"` and now also includes:
|
|
468
|
-
|
|
469
|
-
- `query_scope`: filters, limit, and searched groups.
|
|
470
|
-
- `result_quality`: total matches, best score, whether a Wiki Entry was found, and warnings.
|
|
471
|
-
- `recommended_next_action`: for example `use_matches_for_answer`, `review_grounding_or_enrich_entry`, or `broaden_query_or_ingest_source`.
|
|
472
|
-
- Per match: `match_reasons`, `quality_signals`, and `related_refs`.
|
|
473
|
-
|
|
474
|
-
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.
|
|
289
|
+
### You want to give trial feedback
|
|
475
290
|
|
|
476
|
-
|
|
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.
|
|
477
292
|
|
|
478
|
-
|
|
293
|
+
## 9. Local Development
|
|
479
294
|
|
|
480
|
-
|
|
481
|
-
aiwiki agent sync --yes
|
|
482
|
-
aiwiki agent check
|
|
483
|
-
```
|
|
484
|
-
|
|
485
|
-
For one host Agent:
|
|
295
|
+
For repository development:
|
|
486
296
|
|
|
487
297
|
```bash
|
|
488
|
-
|
|
489
|
-
|
|
298
|
+
npm install
|
|
299
|
+
npm run build
|
|
300
|
+
npm test
|
|
301
|
+
npm link
|
|
490
302
|
```
|
|
491
303
|
|
|
492
|
-
|
|
304
|
+
Use a temporary test workspace:
|
|
493
305
|
|
|
494
306
|
```bash
|
|
495
|
-
aiwiki
|
|
496
|
-
aiwiki
|
|
497
|
-
aiwiki
|
|
498
|
-
aiwiki agent help
|
|
499
|
-
aiwiki context --help
|
|
307
|
+
aiwiki setup --path "./aiwiki-test" --yes
|
|
308
|
+
aiwiki doctor --path "./aiwiki-test"
|
|
309
|
+
aiwiki status --path "./aiwiki-test"
|
|
500
310
|
```
|
|
501
|
-
|
|
502
|
-
`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.
|