@itradingai/aiwiki 0.2.21 → 0.2.23
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 +211 -179
- package/README.zh-CN.md +312 -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 +174 -362
- package/docs/USAGE.zh-CN.md +247 -0
- package/docs/development-log.md +145 -0
- package/package.json +12 -3
- package/skill/SKILL.md +6 -2
package/docs/USAGE.md
CHANGED
|
@@ -1,502 +1,314 @@
|
|
|
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
|
+
Before sending it, replace every `<replace-with-my-aiwiki-path>` with your own local folder path, such as `D:\AIWiki` or `~/AIWiki`. Do not leave the placeholder in the commands.
|
|
16
21
|
|
|
17
|
-
|
|
22
|
+
```text
|
|
23
|
+
Please install and configure AIWiki for me.
|
|
18
24
|
|
|
19
|
-
|
|
25
|
+
First check that Node.js is installed and that node --version is >=20.
|
|
26
|
+
If Node.js is missing or older than 20, stop and tell me how to upgrade before running npm install.
|
|
20
27
|
|
|
21
|
-
|
|
22
|
-
npx @itradingai/aiwiki@latest setup
|
|
23
|
-
```
|
|
28
|
+
Use this knowledge base path:
|
|
24
29
|
|
|
25
|
-
|
|
30
|
+
<replace-with-my-aiwiki-path>
|
|
26
31
|
|
|
27
|
-
|
|
32
|
+
Replace every `<replace-with-my-aiwiki-path>` below with my own local folder path before running commands. If I left the placeholder unchanged, stop and ask me for the real path.
|
|
28
33
|
|
|
29
|
-
|
|
30
|
-
npx @itradingai/aiwiki@latest setup --path "F:\knowledge_data\aiwiki" --yes
|
|
31
|
-
```
|
|
34
|
+
Run these commands:
|
|
32
35
|
|
|
33
|
-
|
|
36
|
+
npm install -g @itradingai/aiwiki@latest
|
|
37
|
+
aiwiki setup --path "<replace-with-my-aiwiki-path>" --yes
|
|
38
|
+
aiwiki agent sync --yes
|
|
39
|
+
aiwiki agent sync --path "<replace-with-my-aiwiki-path>" --yes
|
|
40
|
+
aiwiki agent check --json
|
|
41
|
+
aiwiki agent check --path "<replace-with-my-aiwiki-path>" --json
|
|
42
|
+
aiwiki doctor --path "<replace-with-my-aiwiki-path>"
|
|
43
|
+
aiwiki status --path "<replace-with-my-aiwiki-path>"
|
|
34
44
|
|
|
35
|
-
|
|
36
|
-
cd "<AIWiki 仓库路径>"
|
|
37
|
-
npm install
|
|
38
|
-
npm run build
|
|
39
|
-
npm link
|
|
40
|
-
aiwiki setup --path "F:\knowledge_data\aiwiki-test" --yes
|
|
45
|
+
Then summarize what was installed, what was synced, whether workspace guidance exists, and whether I need to restart or reload the assistant.
|
|
41
46
|
```
|
|
42
47
|
|
|
43
|
-
|
|
48
|
+
Example knowledge base paths:
|
|
44
49
|
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
|
|
50
|
+
```text
|
|
51
|
+
Windows: D:\AIWiki
|
|
52
|
+
macOS/Linux: ~/AIWiki
|
|
53
|
+
Project test: ./aiwiki-test
|
|
48
54
|
```
|
|
49
55
|
|
|
50
|
-
`
|
|
56
|
+
This creates or repairs the knowledge base, syncs the packaged AIWiki skill into supported assistant environments, and writes workspace-level `AGENTS.md` guidance.
|
|
51
57
|
|
|
52
|
-
|
|
53
|
-
- 写入默认知识库配置到用户目录,例如 `%USERPROFILE%\.aiwiki\config.json`。
|
|
58
|
+
Expected result:
|
|
54
59
|
|
|
55
|
-
|
|
60
|
+
- `aiwiki --version` works
|
|
61
|
+
- `aiwiki doctor --path <workspace>` passes or reports actionable fixes
|
|
62
|
+
- `aiwiki agent check --json` reports supported targets as `installed`, `updated`, or `current`
|
|
63
|
+
- `aiwiki agent check --path <workspace> --json` reports workspace guidance as current
|
|
64
|
+
- `aiwiki status --path <workspace>` shows the workspace state and next action
|
|
56
65
|
|
|
57
|
-
## 2.
|
|
66
|
+
## 2. Agent Sync Layers
|
|
58
67
|
|
|
59
|
-
|
|
68
|
+
AIWiki has two sync layers:
|
|
60
69
|
|
|
61
70
|
```bash
|
|
62
71
|
aiwiki agent sync --yes
|
|
63
|
-
aiwiki agent check --json
|
|
64
|
-
aiwiki agent sync --path <workspace> --yes
|
|
65
|
-
aiwiki agent check --path <workspace> --json
|
|
66
72
|
```
|
|
67
73
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
旧的安装向导仍然兼容,但不再作为首选路径:
|
|
74
|
+
Syncs AIWiki instructions into supported local assistant targets such as Codex, Claude Code, QClaw, and OpenClaw.
|
|
71
75
|
|
|
72
76
|
```bash
|
|
73
|
-
aiwiki agent
|
|
77
|
+
aiwiki agent sync --path <workspace> --yes
|
|
74
78
|
```
|
|
75
79
|
|
|
76
|
-
|
|
80
|
+
Writes marker-bounded guidance into the knowledge base root so future assistants entering that workspace know to use AIWiki commands before generic file search.
|
|
81
|
+
|
|
82
|
+
Verify both layers:
|
|
77
83
|
|
|
78
84
|
```bash
|
|
79
|
-
aiwiki agent
|
|
80
|
-
aiwiki agent
|
|
81
|
-
aiwiki agent install --agent openclaw --yes
|
|
82
|
-
aiwiki agent install --agent claude --yes
|
|
85
|
+
aiwiki agent check --json
|
|
86
|
+
aiwiki agent check --path <workspace> --json
|
|
83
87
|
```
|
|
84
88
|
|
|
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 目录后再开放自动安装。现在可先输出通用对接协议:
|
|
89
|
+
For unsupported hosts, print the generic assistant protocol:
|
|
93
90
|
|
|
94
91
|
```bash
|
|
95
92
|
aiwiki prompt agent
|
|
96
93
|
```
|
|
97
94
|
|
|
98
|
-
|
|
95
|
+
## 3. Ingest a Source
|
|
99
96
|
|
|
100
|
-
|
|
97
|
+
### 10-minute trial route
|
|
101
98
|
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
## 3. 日常使用
|
|
105
|
-
|
|
106
|
-
宿主 Agent 已经加载 AIWiki 协议后,把下面的话发给它,并替换链接:
|
|
99
|
+
For a first public trial, keep the loop deliberately small:
|
|
107
100
|
|
|
108
101
|
```text
|
|
109
|
-
|
|
102
|
+
setup
|
|
103
|
+
-> first source ingest
|
|
104
|
+
-> inspect generated artifacts
|
|
105
|
+
-> query/context reuse
|
|
106
|
+
-> lint/doctor check
|
|
107
|
+
-> short feedback note
|
|
110
108
|
```
|
|
111
109
|
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
1. 读取网页正文。
|
|
115
|
-
2. 生成 `aiwiki.agent_payload.v1`。
|
|
116
|
-
3. 通过 stdin 调用 `aiwiki ingest-agent --stdin`。
|
|
117
|
-
4. 把 AIWiki CLI 输出的入库结果摘要回复给用户。
|
|
118
|
-
|
|
119
|
-
用户不需要保存 JSON,不需要手动运行 `ingest-agent`,也不需要每次输入知识库路径。
|
|
120
|
-
|
|
121
|
-
## 4. 宿主 Agent 端应回复什么
|
|
110
|
+
Concrete command surface:
|
|
122
111
|
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
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
|
|
112
|
+
```bash
|
|
113
|
+
aiwiki setup --path <workspace> --yes
|
|
114
|
+
aiwiki doctor --path <workspace>
|
|
115
|
+
aiwiki ingest-file --file <file> --path <workspace>
|
|
116
|
+
aiwiki query "<topic>" --path <workspace>
|
|
117
|
+
aiwiki context "<topic>" --path <workspace>
|
|
118
|
+
aiwiki lint --json --path <workspace>
|
|
151
119
|
```
|
|
152
120
|
|
|
153
|
-
|
|
121
|
+
When the source is a URL, the assistant reads it first and then calls `aiwiki ingest-agent`; AIWiki itself does not crawl the page.
|
|
154
122
|
|
|
155
|
-
|
|
156
|
-
AIWiki 已完成入库,并生成 Wiki 条目。
|
|
157
|
-
契合度:90 / high
|
|
158
|
-
摘要:……
|
|
159
|
-
Wiki 条目:……
|
|
160
|
-
质量模式:enriched / agent_enriched
|
|
161
|
-
资料卡:……
|
|
162
|
-
处理记录:……
|
|
163
|
-
```
|
|
164
|
-
|
|
165
|
-
网页读取失败但已记录原因时类似:
|
|
123
|
+
Tell your assistant:
|
|
166
124
|
|
|
167
125
|
```text
|
|
168
|
-
|
|
169
|
-
|
|
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
|
|
126
|
+
Ingest this into AIWiki:
|
|
127
|
+
https://example.com/article
|
|
181
128
|
```
|
|
182
129
|
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
```text
|
|
186
|
-
未成功入库正文,但已记录失败原因。
|
|
187
|
-
原因:……
|
|
188
|
-
记录目录:……
|
|
189
|
-
处理记录:……
|
|
190
|
-
Obsidian 入口:dashboards/AIWiki Home.md
|
|
191
|
-
```
|
|
130
|
+
The assistant should:
|
|
192
131
|
|
|
193
|
-
|
|
132
|
+
1. read the source
|
|
133
|
+
2. build an `aiwiki.agent_payload.v1` payload
|
|
134
|
+
3. provide `analysis` or `wiki_entry` when it understands the source
|
|
135
|
+
4. call `aiwiki ingest-agent --stdin`
|
|
136
|
+
5. report the generated Wiki Entry, Source Card, and Processing Summary
|
|
194
137
|
|
|
195
|
-
|
|
138
|
+
For local files, the assistant may call:
|
|
196
139
|
|
|
197
|
-
```
|
|
198
|
-
|
|
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
|
-
```
|
|
207
|
-
|
|
208
|
-
只有 payload 有对应内容或 `request.outputs` 明确请求时,才会出现可选增强产物:
|
|
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/
|
|
140
|
+
```bash
|
|
141
|
+
aiwiki ingest-file --file <file>
|
|
218
142
|
```
|
|
219
143
|
|
|
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 和复核都应能回查这里。
|
|
236
|
-
|
|
237
|
-
Grounding 字段都是 additive,可被旧工具忽略:
|
|
144
|
+
If webpage reading fails, the assistant should still record the failure with `fetch_status: "failed"` so the run is traceable.
|
|
238
145
|
|
|
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`:长文提取过少时的启发式疑似标记,不是确定遗漏结论。
|
|
146
|
+
## 4. Ask the Knowledge Base
|
|
244
147
|
|
|
245
|
-
|
|
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:
|
|
148
|
+
Tell your assistant:
|
|
254
149
|
|
|
255
150
|
```text
|
|
256
|
-
|
|
257
|
-
[[05-wiki/source-knowledge/article-slug|Wiki 条目]]
|
|
258
|
-
[[02-raw/articles/article-slug|原文]]
|
|
259
|
-
[[09-runs/20260507-153012-abc123/processing-summary|处理记录]]
|
|
151
|
+
What does AIWiki know about <topic>?
|
|
260
152
|
```
|
|
261
153
|
|
|
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 数据库入口
|
|
270
|
-
|
|
271
|
-
`setup` 会创建或补齐 Obsidian 数据库资产:
|
|
154
|
+
The assistant should call:
|
|
272
155
|
|
|
273
|
-
```
|
|
274
|
-
|
|
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
|
|
156
|
+
```bash
|
|
157
|
+
aiwiki context "<topic>"
|
|
283
158
|
```
|
|
284
159
|
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
不安装 Dataview 也可以使用:
|
|
288
|
-
- 用 `dashboards/AIWiki Home.md` 作为入口。
|
|
289
|
-
- 用 Obsidian Properties 查看字段。
|
|
290
|
-
- 用 Backlinks / Graph View 查看资料卡和原文、Claim、素材、选题、大纲之间的关系。
|
|
291
|
-
|
|
292
|
-
安装 Dataview 后,dashboard 中的 `dataview` 代码块会渲染成表格,用来查看最近入库、待审队列、选题管线和处理记录。
|
|
160
|
+
`context` returns JSON for assistants. It includes query scope, result quality, match reasons, quality signals, and related references.
|
|
293
161
|
|
|
294
|
-
|
|
162
|
+
For human-readable terminal output:
|
|
295
163
|
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
给任意宿主 Agent 的详细协议见:
|
|
299
|
-
|
|
300
|
-
```text
|
|
301
|
-
docs/AGENT_HANDOFF.md
|
|
164
|
+
```bash
|
|
165
|
+
aiwiki query "<topic>"
|
|
302
166
|
```
|
|
303
167
|
|
|
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
|
-
从知识库调度内容:
|
|
168
|
+
Useful filters:
|
|
316
169
|
|
|
317
170
|
```bash
|
|
318
|
-
aiwiki context "AI Agent"
|
|
319
|
-
aiwiki query "AI Agent"
|
|
171
|
+
aiwiki context "AI Agent" --type wiki_entries --source-role input --wiki-type source_knowledge --status active --limit 5
|
|
172
|
+
aiwiki query "AI Agent" --type source_cards --status to-review --limit 3
|
|
320
173
|
```
|
|
321
174
|
|
|
322
|
-
|
|
175
|
+
AIWiki retrieval is local Markdown/frontmatter search. It is not vector search, external search, or RAG-over-wiki.
|
|
323
176
|
|
|
324
|
-
|
|
177
|
+
## 5. Check and Maintain the Workspace
|
|
325
178
|
|
|
326
|
-
|
|
327
|
-
|
|
179
|
+
Tell your assistant:
|
|
180
|
+
|
|
181
|
+
```text
|
|
182
|
+
Check and organize my AIWiki workspace.
|
|
328
183
|
```
|
|
329
184
|
|
|
330
|
-
|
|
185
|
+
The assistant should run:
|
|
331
186
|
|
|
332
187
|
```bash
|
|
333
|
-
aiwiki lint --severity warning
|
|
334
188
|
aiwiki lint --json
|
|
335
|
-
aiwiki lint --no-write
|
|
336
|
-
aiwiki lint --fix-empty-dirs --json
|
|
337
189
|
```
|
|
338
190
|
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
查看下一步建议:
|
|
191
|
+
If only safe fixes are available and you allow cleanup:
|
|
342
192
|
|
|
343
193
|
```bash
|
|
344
|
-
aiwiki
|
|
194
|
+
aiwiki lint --fix-empty-dirs --json
|
|
195
|
+
aiwiki lint --json
|
|
345
196
|
```
|
|
346
197
|
|
|
347
|
-
|
|
198
|
+
Current automatic safe fix:
|
|
348
199
|
|
|
349
|
-
|
|
200
|
+
- remove known empty optional enhancement directories
|
|
350
201
|
|
|
351
|
-
|
|
202
|
+
AIWiki must not delete core directories, unknown directories, non-empty directories, or files as a safe fix.
|
|
352
203
|
|
|
353
|
-
|
|
354
|
-
aiwiki ingest-agent --payload "F:\knowledge_data\payload.json"
|
|
355
|
-
```
|
|
204
|
+
## 6. Generated Artifacts
|
|
356
205
|
|
|
357
|
-
|
|
206
|
+
Core artifacts:
|
|
358
207
|
|
|
359
|
-
```
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
208
|
+
```text
|
|
209
|
+
09-runs/<run-id>/payload.json
|
|
210
|
+
09-runs/<run-id>/raw.md
|
|
211
|
+
09-runs/<run-id>/source-card.md
|
|
212
|
+
09-runs/<run-id>/wiki-entry.md
|
|
213
|
+
09-runs/<run-id>/processing-summary.md
|
|
214
|
+
02-raw/articles/
|
|
215
|
+
03-sources/article-cards/
|
|
216
|
+
05-wiki/source-knowledge/
|
|
367
217
|
```
|
|
368
218
|
|
|
369
|
-
|
|
370
|
-
- 本地 `md` 导入时,AIWiki 优先使用文件标题或文件名生成外部文件名。
|
|
371
|
-
- 不会优先从正文内容里的 `# 一级标题` 反推文件名,避免整理后的文件名失去来源可追踪性。
|
|
372
|
-
- 如果文件名本身没有语义,才会继续回退到更弱的兜底命名。
|
|
219
|
+
Optional artifacts appear only when the assistant provides matching content or explicitly requests them:
|
|
373
220
|
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
221
|
+
```text
|
|
222
|
+
09-runs/<run-id>/creative-assets.md
|
|
223
|
+
09-runs/<run-id>/topics.md
|
|
224
|
+
09-runs/<run-id>/draft-outline.md
|
|
225
|
+
04-claims/_suggestions/
|
|
226
|
+
06-assets/_suggestions/
|
|
227
|
+
07-topics/ready/
|
|
228
|
+
08-outputs/outlines/
|
|
378
229
|
```
|
|
379
230
|
|
|
380
|
-
|
|
231
|
+
Wiki Entry quality modes:
|
|
381
232
|
|
|
382
|
-
|
|
233
|
+
- `agent_enriched` / `enriched`: the assistant provided analysis or wiki content.
|
|
234
|
+
- `deterministic_fallback` / `scaffold`: AIWiki created a traceable shell from source content only.
|
|
383
235
|
|
|
384
|
-
|
|
236
|
+
First-run success checklist:
|
|
385
237
|
|
|
386
|
-
|
|
238
|
+
- `09-runs/<run-id>/processing-summary.md` exists
|
|
239
|
+
- a raw record exists under `02-raw/articles/`
|
|
240
|
+
- a Source Card exists under `03-sources/article-cards/`
|
|
241
|
+
- a Wiki Entry exists under `05-wiki/source-knowledge/`
|
|
242
|
+
- `aiwiki query "<topic>" --path <workspace>` returns a relevant match
|
|
243
|
+
- `aiwiki context "<topic>" --path <workspace>` returns machine-readable context for the assistant
|
|
244
|
+
- `aiwiki lint --json --path <workspace>` returns structured workspace feedback
|
|
387
245
|
|
|
388
|
-
|
|
389
|
-
cd "<AIWiki 仓库路径>"
|
|
390
|
-
npm run build
|
|
391
|
-
npm link
|
|
392
|
-
```
|
|
246
|
+
## 7. Obsidian and Dataview
|
|
393
247
|
|
|
394
|
-
|
|
248
|
+
AIWiki writes plain Markdown and frontmatter.
|
|
395
249
|
|
|
396
|
-
|
|
250
|
+
Obsidian is optional. Dataview is optional. AIWiki does not edit `.obsidian`, install plugins, or require Dataview to query the knowledge base.
|
|
397
251
|
|
|
398
|
-
|
|
399
|
-
aiwiki setup --path "F:\knowledge_data\aiwiki" --yes
|
|
400
|
-
```
|
|
401
|
-
|
|
402
|
-
### 宿主 Agent 抓不到网页
|
|
252
|
+
`aiwiki setup` creates dashboard and schema files when missing and preserves user-edited files.
|
|
403
253
|
|
|
404
|
-
|
|
254
|
+
## 8. Troubleshooting
|
|
405
255
|
|
|
406
|
-
###
|
|
256
|
+
### The `aiwiki` command is missing
|
|
407
257
|
|
|
408
|
-
|
|
258
|
+
Ask your assistant to reinstall globally:
|
|
409
259
|
|
|
410
260
|
```bash
|
|
411
|
-
|
|
261
|
+
npm install -g @itradingai/aiwiki@latest
|
|
262
|
+
aiwiki --version
|
|
412
263
|
```
|
|
413
264
|
|
|
414
|
-
|
|
265
|
+
### The assistant still searches files directly
|
|
415
266
|
|
|
416
|
-
|
|
267
|
+
Run:
|
|
417
268
|
|
|
418
269
|
```bash
|
|
419
|
-
aiwiki
|
|
270
|
+
aiwiki agent sync --yes
|
|
271
|
+
aiwiki agent sync --path <workspace> --yes
|
|
272
|
+
aiwiki agent check --path <workspace> --json
|
|
420
273
|
```
|
|
421
274
|
|
|
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
|
|
275
|
+
Then restart or reload the assistant if needed.
|
|
435
276
|
|
|
436
|
-
|
|
277
|
+
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
278
|
|
|
438
|
-
|
|
279
|
+
### The assistant cannot read a webpage
|
|
439
280
|
|
|
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.
|
|
281
|
+
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
282
|
|
|
446
|
-
|
|
283
|
+
### You want to move the default workspace
|
|
447
284
|
|
|
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:
|
|
285
|
+
Run:
|
|
453
286
|
|
|
454
287
|
```bash
|
|
455
|
-
aiwiki
|
|
456
|
-
aiwiki
|
|
288
|
+
aiwiki setup --path <new-workspace> --yes
|
|
289
|
+
aiwiki agent sync --path <new-workspace> --yes
|
|
290
|
+
aiwiki agent check --path <new-workspace> --json
|
|
457
291
|
```
|
|
458
292
|
|
|
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.
|
|
293
|
+
### You want to give trial feedback
|
|
475
294
|
|
|
476
|
-
|
|
295
|
+
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
296
|
|
|
478
|
-
|
|
297
|
+
## 9. Local Development
|
|
479
298
|
|
|
480
|
-
|
|
481
|
-
aiwiki agent sync --yes
|
|
482
|
-
aiwiki agent check
|
|
483
|
-
```
|
|
484
|
-
|
|
485
|
-
For one host Agent:
|
|
299
|
+
For repository development:
|
|
486
300
|
|
|
487
301
|
```bash
|
|
488
|
-
|
|
489
|
-
|
|
302
|
+
npm install
|
|
303
|
+
npm run build
|
|
304
|
+
npm test
|
|
305
|
+
npm link
|
|
490
306
|
```
|
|
491
307
|
|
|
492
|
-
|
|
308
|
+
Use a temporary test workspace:
|
|
493
309
|
|
|
494
310
|
```bash
|
|
495
|
-
aiwiki
|
|
496
|
-
aiwiki
|
|
497
|
-
aiwiki
|
|
498
|
-
aiwiki agent help
|
|
499
|
-
aiwiki context --help
|
|
311
|
+
aiwiki setup --path "./aiwiki-test" --yes
|
|
312
|
+
aiwiki doctor --path "./aiwiki-test"
|
|
313
|
+
aiwiki status --path "./aiwiki-test"
|
|
500
314
|
```
|
|
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.
|