@itradingai/aiwiki 0.2.16 → 0.2.19
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 +41 -12
- package/dist/src/app.js +226 -23
- package/dist/src/context.js +173 -16
- package/dist/src/ingest.js +52 -27
- package/dist/src/lint.js +84 -1
- package/dist/src/payload.js +25 -10
- package/dist/src/wiki-entry.js +3 -3
- package/dist/src/workspace.js +18 -9
- package/docs/20260607-aiwiki-feature-pruning-plan.md +468 -0
- package/docs/20260607-aiwiki-long-term-operating-roadmap.md +409 -0
- package/docs/AGENT_HANDOFF.md +59 -7
- package/docs/FAQ.md +4 -2
- package/docs/README.md +3 -4
- package/docs/ROADMAP.md +4 -0
- package/docs/USAGE.md +74 -12
- package/docs/development-log.md +227 -0
- package/package.json +12 -2
- package/skill/LINT_PROTOCOL.md +16 -7
- package/skill/QUERY_PROTOCOL.md +21 -4
- package/skill/SKILL.md +65 -5
- package/skill/UPGRADE_NOTES.md +22 -0
|
@@ -0,0 +1,409 @@
|
|
|
1
|
+
# AIWiki 长期运营路线图
|
|
2
|
+
|
|
3
|
+
日期:2026-06-07
|
|
4
|
+
状态:公开试用早期
|
|
5
|
+
适用范围:AIWiki 基础版、AIWiki Pro、公开试用群、内容运营和每日自动化开发队列
|
|
6
|
+
|
|
7
|
+
## 1. 北极星目标
|
|
8
|
+
|
|
9
|
+
AIWiki 的长期目标不是做一个“功能很多的知识库工具”,而是成为 Agent 时代的本地知识资产后端:
|
|
10
|
+
|
|
11
|
+
> 让用户和 Agent 能持续沉淀资料、判断、输出和上下文,并在后续工作中稳定查询、检查、引用和复用。
|
|
12
|
+
|
|
13
|
+
这意味着 AIWiki 的长期运营重点不是“加更多命令”,而是持续提升三件事:
|
|
14
|
+
|
|
15
|
+
- 第一次能不能顺利用起来。
|
|
16
|
+
- 入库后的内容能不能被再次找到和复用。
|
|
17
|
+
- 用户和 Agent 能不能判断这个知识库是否健康、可信、值得继续维护。
|
|
18
|
+
|
|
19
|
+
## 2. 当前阶段判断
|
|
20
|
+
|
|
21
|
+
项目已经公开,并有约 80 人试用群,但群内反馈很少。
|
|
22
|
+
|
|
23
|
+
这不是坏信号,但说明当前还不能以“反馈驱动功能”为主。现在更应该进入 feedback-light operating mode:
|
|
24
|
+
|
|
25
|
+
- 不等待大量反馈才行动。
|
|
26
|
+
- 主动制造清晰试用路径和使用场景。
|
|
27
|
+
- 用案例、教程和小任务引导用户产生反馈。
|
|
28
|
+
- 把重复问题、沉默和卡点都视为信号。
|
|
29
|
+
- 每周只挑少量高确定性问题进入开发队列。
|
|
30
|
+
|
|
31
|
+
当前阶段的主要风险:
|
|
32
|
+
|
|
33
|
+
- 用户看到了项目,但不知道第一步该做什么。
|
|
34
|
+
- 用户装好了,但不知道应该入库什么内容。
|
|
35
|
+
- 用户入库了,但没有体验到“复用知识”的价值。
|
|
36
|
+
- 群里没人反馈,开发方向容易被想象中的高级功能带偏。
|
|
37
|
+
- 基础版如果继续扩功能,会削弱传播和试用成功率。
|
|
38
|
+
|
|
39
|
+
## 3. 产品分层目标
|
|
40
|
+
|
|
41
|
+
### 3.1 基础版目标
|
|
42
|
+
|
|
43
|
+
基础版长期定位:
|
|
44
|
+
|
|
45
|
+
> 稳定、轻量、可信、Agent-first 的本地 Markdown 知识资产后端。
|
|
46
|
+
|
|
47
|
+
基础版必须长期坚持:
|
|
48
|
+
|
|
49
|
+
- 单知识库。
|
|
50
|
+
- 用户命令为 `aiwiki`。
|
|
51
|
+
- 不内置网页抓取。
|
|
52
|
+
- 不内置 LLM。
|
|
53
|
+
- 不做多知识库管理。
|
|
54
|
+
- 不做重型 review / retain / FSRS。
|
|
55
|
+
- 不做 RSS、定时采集、批量 URL 队列。
|
|
56
|
+
- 不做 dashboard / doctor bundle。
|
|
57
|
+
- 不为每个动作新增顶层命令。
|
|
58
|
+
|
|
59
|
+
基础版应持续强化:
|
|
60
|
+
|
|
61
|
+
- `setup`
|
|
62
|
+
- `agent sync/check`
|
|
63
|
+
- `ingest-agent`
|
|
64
|
+
- `ingest-file`
|
|
65
|
+
- `context/query`
|
|
66
|
+
- `lint`
|
|
67
|
+
- `status/doctor`
|
|
68
|
+
- Agent-readable JSON 输出
|
|
69
|
+
- 安全修复,如 `lint --fix-empty-dirs --json`
|
|
70
|
+
|
|
71
|
+
### 3.2 Pro 目标
|
|
72
|
+
|
|
73
|
+
Pro 长期定位:
|
|
74
|
+
|
|
75
|
+
> 面向长期运行、自动化维护、团队协作和商业交付的知识运营层。
|
|
76
|
+
|
|
77
|
+
Pro 承接:
|
|
78
|
+
|
|
79
|
+
- 多知识库。
|
|
80
|
+
- queue / collect / schedule。
|
|
81
|
+
- dedupe / score / route / validate。
|
|
82
|
+
- inbox / connector / collection jobs。
|
|
83
|
+
- dashboard bundle。
|
|
84
|
+
- doctor bundle。
|
|
85
|
+
- 规模化 lint。
|
|
86
|
+
- 团队部署和服务支持。
|
|
87
|
+
|
|
88
|
+
Pro 的价值不是“命令更多”,而是让用户不用每天手工维护知识库健康状态。
|
|
89
|
+
|
|
90
|
+
### 3.3 内容和服务层目标
|
|
91
|
+
|
|
92
|
+
AIWiki 的增长不只来自 npm 包或 GitHub。
|
|
93
|
+
|
|
94
|
+
长期运营应持续生产:
|
|
95
|
+
|
|
96
|
+
- 使用案例。
|
|
97
|
+
- 入门教程。
|
|
98
|
+
- 真实工作流拆解。
|
|
99
|
+
- 群内答疑复盘。
|
|
100
|
+
- 版本进展说明。
|
|
101
|
+
- 迁移和部署服务说明。
|
|
102
|
+
- 团队试点方案。
|
|
103
|
+
|
|
104
|
+
内容层的目标是降低理解成本;服务层的目标是承接复杂用户。
|
|
105
|
+
|
|
106
|
+
## 4. 30 / 90 / 180 天目标
|
|
107
|
+
|
|
108
|
+
### 4.1 30 天目标:试用成功率
|
|
109
|
+
|
|
110
|
+
30 天内不追大功能,重点是让试用者真的跑通第一轮。
|
|
111
|
+
|
|
112
|
+
目标:
|
|
113
|
+
|
|
114
|
+
- 新用户 10 分钟内能理解 AIWiki 是什么、不是什幺。
|
|
115
|
+
- 新用户能完成 `setup`。
|
|
116
|
+
- 新用户能入库第一篇内容。
|
|
117
|
+
- 新用户能用 `query` 或 `context` 找回内容。
|
|
118
|
+
- 用户能用 `lint` / `doctor` 自查问题。
|
|
119
|
+
- 默认目录不再让用户困惑。
|
|
120
|
+
- 群里能沉淀至少 3 个真实使用案例。
|
|
121
|
+
|
|
122
|
+
建议指标:
|
|
123
|
+
|
|
124
|
+
- 首次 setup 成功数。
|
|
125
|
+
- 首篇入库成功数。
|
|
126
|
+
- 用户上传或描述的 AIWiki 目录截图数。
|
|
127
|
+
- 群里重复询问的安装/目录/入库问题数量。
|
|
128
|
+
- 用户是否能说出“AIWiki 帮我复用了什么”。
|
|
129
|
+
- 真实案例数,而不是群消息数。
|
|
130
|
+
|
|
131
|
+
### 4.2 90 天目标:复用价值验证
|
|
132
|
+
|
|
133
|
+
90 天目标不是用户多,而是证明“知识复用”这件事成立。
|
|
134
|
+
|
|
135
|
+
目标:
|
|
136
|
+
|
|
137
|
+
- 形成 5 个可展示的标准场景。
|
|
138
|
+
- `query/context` 能支撑真实写作、研究、决策或项目回顾。
|
|
139
|
+
- lint 能帮助用户发现结构和证据边界问题。
|
|
140
|
+
- Agent handoff 成为稳定入口。
|
|
141
|
+
- Pro 是否值得推进有明确证据。
|
|
142
|
+
|
|
143
|
+
建议标准场景:
|
|
144
|
+
|
|
145
|
+
- 文章研究库。
|
|
146
|
+
- 公众号选题库。
|
|
147
|
+
- AI 工具调研库。
|
|
148
|
+
- 项目决策库。
|
|
149
|
+
- Agent 工作记忆库。
|
|
150
|
+
|
|
151
|
+
### 4.3 180 天目标:运营闭环和商业试点
|
|
152
|
+
|
|
153
|
+
180 天目标是形成稳定的运营和商业化入口。
|
|
154
|
+
|
|
155
|
+
目标:
|
|
156
|
+
|
|
157
|
+
- 基础版成为公开传播入口。
|
|
158
|
+
- Pro 成为自动化维护和团队试点入口。
|
|
159
|
+
- 每月至少 1 个完整案例复盘。
|
|
160
|
+
- 有清晰的部署服务、陪跑服务或团队集成服务说明。
|
|
161
|
+
- 形成基础版免费试用、Pro/服务承接复杂需求的路径。
|
|
162
|
+
|
|
163
|
+
## 5. 低反馈阶段运营策略
|
|
164
|
+
|
|
165
|
+
群里反馈少时,不要简单判断为没人需要。
|
|
166
|
+
|
|
167
|
+
优先做四件事:
|
|
168
|
+
|
|
169
|
+
### 5.1 主动设计试用任务
|
|
170
|
+
|
|
171
|
+
每周在群里给一个非常小的任务:
|
|
172
|
+
|
|
173
|
+
- 今天把一篇文章入库。
|
|
174
|
+
- 今天跑一次 `aiwiki doctor`。
|
|
175
|
+
- 今天用 `aiwiki query` 找一个旧观点。
|
|
176
|
+
- 今天贴一张 AIWiki 目录截图。
|
|
177
|
+
- 今天说一个“我想让 Agent 记住的东西”。
|
|
178
|
+
|
|
179
|
+
任务要小到用户 5-10 分钟能完成。
|
|
180
|
+
|
|
181
|
+
### 5.2 用沉默判断卡点
|
|
182
|
+
|
|
183
|
+
如果某个任务没人回应,可能不是没人感兴趣,而是:
|
|
184
|
+
|
|
185
|
+
- 不知道从哪里开始。
|
|
186
|
+
- 安装卡住。
|
|
187
|
+
- 不知道选什么内容入库。
|
|
188
|
+
- 不知道成功结果长什么样。
|
|
189
|
+
- 不敢贴自己的知识库截图。
|
|
190
|
+
|
|
191
|
+
沉默要进入运营复盘,而不是被忽略。
|
|
192
|
+
|
|
193
|
+
### 5.3 做标准案例,而不是等用户案例
|
|
194
|
+
|
|
195
|
+
反馈少时,先主动做 3-5 个标准案例。
|
|
196
|
+
|
|
197
|
+
每个案例必须包含:
|
|
198
|
+
|
|
199
|
+
- 输入材料是什么。
|
|
200
|
+
- Agent 做了什么。
|
|
201
|
+
- AIWiki 生成了什么。
|
|
202
|
+
- 后续如何用 `query/context` 复用。
|
|
203
|
+
- 这个场景为什么值得长期维护。
|
|
204
|
+
|
|
205
|
+
### 5.4 把支持问题产品化
|
|
206
|
+
|
|
207
|
+
群里每一个问题都归类:
|
|
208
|
+
|
|
209
|
+
- 安装失败。
|
|
210
|
+
- 不知道怎么开始。
|
|
211
|
+
- 入库结果不理解。
|
|
212
|
+
- 目录结构困惑。
|
|
213
|
+
- 查询找不到。
|
|
214
|
+
- 想要高级功能。
|
|
215
|
+
|
|
216
|
+
只有前三类优先进入基础版开发。高级功能先进入 backlog 或 Pro。
|
|
217
|
+
|
|
218
|
+
## 6. 运营节奏
|
|
219
|
+
|
|
220
|
+
### 每日
|
|
221
|
+
|
|
222
|
+
- 自动化队列执行一个明确任务。
|
|
223
|
+
- 若任务涉及发布,完成测试、打包、发布状态和远程验证。
|
|
224
|
+
- 不因为 npm OTP 或外部发布阻塞停止本地开发队列,但必须记录 release follow-up。
|
|
225
|
+
|
|
226
|
+
### 每周
|
|
227
|
+
|
|
228
|
+
- 周一:整理群反馈和沉默信号。
|
|
229
|
+
- 周二:发布一个 5-10 分钟试用任务。
|
|
230
|
+
- 周三:从反馈中挑 1-3 个最高价值问题进入队列。
|
|
231
|
+
- 周五:发布小版本进展或案例说明。
|
|
232
|
+
|
|
233
|
+
### 每两周
|
|
234
|
+
|
|
235
|
+
- 做一次公开试用复盘。
|
|
236
|
+
- 更新 FAQ。
|
|
237
|
+
- 更新 SHOWCASE 或新增案例。
|
|
238
|
+
- 检查是否有功能请求应该进入 Pro。
|
|
239
|
+
|
|
240
|
+
### 每月
|
|
241
|
+
|
|
242
|
+
- 复盘 30/90/180 天目标进度。
|
|
243
|
+
- 清理不值得做的功能。
|
|
244
|
+
- 更新开发队列和看板。
|
|
245
|
+
- 决定 Pro 的下一项是否恢复。
|
|
246
|
+
|
|
247
|
+
## 7. 开发计划安排
|
|
248
|
+
|
|
249
|
+
当前开发优先级:
|
|
250
|
+
|
|
251
|
+
1. `AIWIKI-006`:基础版收敛。
|
|
252
|
+
2. `AIWIKI-007`:样例、文档和全链路回归。
|
|
253
|
+
3. `AIWIKI-008`:公开试用激活闭环。
|
|
254
|
+
4. `AIWIKI-009`:案例和教程资产包。
|
|
255
|
+
5. `AIWIKI-010`:复用价值验证和 query/context 场景优化。
|
|
256
|
+
6. `AIWIKI-011`:运营复盘、指标和反馈队列机制。
|
|
257
|
+
7. `PRO-008`:在基础版契约稳定后恢复 dashboard / doctor bundle。
|
|
258
|
+
|
|
259
|
+
### AIWIKI-008:公开试用激活闭环
|
|
260
|
+
|
|
261
|
+
目标:
|
|
262
|
+
|
|
263
|
+
让新用户能完成第一次成功试用,并知道如何反馈。
|
|
264
|
+
|
|
265
|
+
范围:
|
|
266
|
+
|
|
267
|
+
- README quick start。
|
|
268
|
+
- USAGE。
|
|
269
|
+
- FAQ。
|
|
270
|
+
- AGENT_HANDOFF。
|
|
271
|
+
- SHOWCASE。
|
|
272
|
+
- skill。
|
|
273
|
+
- 群试用任务模板。
|
|
274
|
+
|
|
275
|
+
验收:
|
|
276
|
+
|
|
277
|
+
- 有一条 10 分钟试用路径。
|
|
278
|
+
- 有“第一篇文章入库”教程。
|
|
279
|
+
- 有“成功结果长什么样”的截图或文件说明。
|
|
280
|
+
- 有最小反馈模板。
|
|
281
|
+
- 不新增基础版命令。
|
|
282
|
+
- 不引入 Pro-only 能力。
|
|
283
|
+
|
|
284
|
+
### AIWIKI-009:案例和教程资产包
|
|
285
|
+
|
|
286
|
+
目标:
|
|
287
|
+
|
|
288
|
+
在反馈少的阶段主动制造可理解、可传播、可复用的案例。
|
|
289
|
+
|
|
290
|
+
范围:
|
|
291
|
+
|
|
292
|
+
- 至少 3 个标准案例。
|
|
293
|
+
- 示例输入。
|
|
294
|
+
- 生成结果说明。
|
|
295
|
+
- query/context 复用演示。
|
|
296
|
+
- 群内发布文案。
|
|
297
|
+
|
|
298
|
+
验收:
|
|
299
|
+
|
|
300
|
+
- 每个案例都能回答“为什么要长期维护这个知识库”。
|
|
301
|
+
- 每个案例都不依赖 Pro。
|
|
302
|
+
- 每个案例都能用基础版跑通。
|
|
303
|
+
|
|
304
|
+
### AIWIKI-010:复用价值验证
|
|
305
|
+
|
|
306
|
+
目标:
|
|
307
|
+
|
|
308
|
+
验证 AIWiki 不是只会保存文件,而是能帮助用户复用判断和上下文。
|
|
309
|
+
|
|
310
|
+
范围:
|
|
311
|
+
|
|
312
|
+
- query/context 场景文档。
|
|
313
|
+
- 写作、研究、决策、回顾四类查询任务。
|
|
314
|
+
- 必要时补小型 CLI 输出优化。
|
|
315
|
+
|
|
316
|
+
验收:
|
|
317
|
+
|
|
318
|
+
- 用户能看到 source、insight、output 的差异。
|
|
319
|
+
- query/context 能给出可解释的匹配理由。
|
|
320
|
+
- 文档能指导 Agent 在写作或研究前先取上下文。
|
|
321
|
+
|
|
322
|
+
### AIWIKI-011:运营复盘和反馈队列机制
|
|
323
|
+
|
|
324
|
+
目标:
|
|
325
|
+
|
|
326
|
+
把群反馈、沉默信号、案例和开发任务连接起来。
|
|
327
|
+
|
|
328
|
+
范围:
|
|
329
|
+
|
|
330
|
+
- 反馈分类模板。
|
|
331
|
+
- 每周复盘模板。
|
|
332
|
+
- 月度路线图复盘模板。
|
|
333
|
+
- 开发任务进入标准。
|
|
334
|
+
- 不值得做的功能清单维护。
|
|
335
|
+
|
|
336
|
+
验收:
|
|
337
|
+
|
|
338
|
+
- 每周能从群运营产出明确的任务判断。
|
|
339
|
+
- 反馈不会直接变成功能。
|
|
340
|
+
- Pro / 基础版边界能被持续维护。
|
|
341
|
+
|
|
342
|
+
## 8. 任务进入开发队列的标准
|
|
343
|
+
|
|
344
|
+
一个需求进入基础版开发队列前,必须满足至少两项:
|
|
345
|
+
|
|
346
|
+
- 能提升首次试用成功率。
|
|
347
|
+
- 能降低用户理解成本。
|
|
348
|
+
- 能提升知识复用效果。
|
|
349
|
+
- 能让 Agent 更稳定地自动处理。
|
|
350
|
+
- 能减少重复支持问题。
|
|
351
|
+
- 不扩大基础版边界。
|
|
352
|
+
|
|
353
|
+
进入 Pro 队列的标准:
|
|
354
|
+
|
|
355
|
+
- 涉及多知识库。
|
|
356
|
+
- 涉及长期自动化运行。
|
|
357
|
+
- 涉及队列、调度、评分、路由、采集。
|
|
358
|
+
- 涉及团队部署。
|
|
359
|
+
- 涉及 dashboard / doctor bundle。
|
|
360
|
+
- 涉及商业交付和支持。
|
|
361
|
+
|
|
362
|
+
不进入队列的情况:
|
|
363
|
+
|
|
364
|
+
- 只是“看起来酷”。
|
|
365
|
+
- 只是给已有流程换一个新命令名。
|
|
366
|
+
- 需要基础版内置网页抓取或 LLM。
|
|
367
|
+
- 会让新用户更难理解。
|
|
368
|
+
- 没有明确验证方式。
|
|
369
|
+
|
|
370
|
+
## 9. 长期运营指标
|
|
371
|
+
|
|
372
|
+
早期不建议追求活跃群消息数。
|
|
373
|
+
|
|
374
|
+
更适合的指标:
|
|
375
|
+
|
|
376
|
+
- 首次成功:能否完成 setup 和第一篇入库。
|
|
377
|
+
- 首次价值:用户是否完成一次 query/context 复用。
|
|
378
|
+
- 复用案例:是否出现真实二次使用。
|
|
379
|
+
- 支持成本:重复问题是否减少。
|
|
380
|
+
- 文档有效性:用户能否按教程自行完成。
|
|
381
|
+
- 边界稳定性:基础版是否持续避免功能膨胀。
|
|
382
|
+
- Pro 线索:是否出现明确团队、自动化或长期维护需求。
|
|
383
|
+
|
|
384
|
+
## 10. 停止条件
|
|
385
|
+
|
|
386
|
+
长期运营要敢于不做。
|
|
387
|
+
|
|
388
|
+
应该停止或暂缓的信号:
|
|
389
|
+
|
|
390
|
+
- 群里没有人能完成基础试用,却开始做高级功能。
|
|
391
|
+
- 同一个安装或入库问题重复出现,但开发队列在做 dashboard。
|
|
392
|
+
- 用户还没理解 query/context,就开始做多知识库。
|
|
393
|
+
- 新命令增加了,但成功案例没有增加。
|
|
394
|
+
- Pro 功能在基础版契约未稳定前继续扩张。
|
|
395
|
+
|
|
396
|
+
## 11. 当前建议
|
|
397
|
+
|
|
398
|
+
短期最重要的是继续跑完 `AIWIKI-006` 和 `AIWIKI-007`。
|
|
399
|
+
|
|
400
|
+
在它们完成前,不建议把主要精力切到 Pro 或高级功能。群反馈少时,更应该用案例和试用任务制造反馈,而不是用新功能赌反馈。
|
|
401
|
+
|
|
402
|
+
`AIWIKI-007` 完成后,开发队列应该转向公开试用激活:
|
|
403
|
+
|
|
404
|
+
- 让用户知道第一步做什么。
|
|
405
|
+
- 让用户知道成功结果长什么样。
|
|
406
|
+
- 让用户知道如何反馈。
|
|
407
|
+
- 让用户看到知识复用的真实价值。
|
|
408
|
+
|
|
409
|
+
这条路线比继续堆功能更适合长期运营。
|
package/docs/AGENT_HANDOFF.md
CHANGED
|
@@ -91,9 +91,6 @@ AIWiki 会修复常见 UTF-8 mojibake,但这只是兜底;宿主 Agent 仍应
|
|
|
91
91
|
"outputs": [
|
|
92
92
|
"source_card",
|
|
93
93
|
"wiki_entry",
|
|
94
|
-
"creative_assets",
|
|
95
|
-
"topics",
|
|
96
|
-
"draft_outline",
|
|
97
94
|
"processing_summary"
|
|
98
95
|
],
|
|
99
96
|
"language": "zh-CN"
|
|
@@ -193,15 +190,16 @@ aiwiki context "<主题>"
|
|
|
193
190
|
aiwiki query "<主题>"
|
|
194
191
|
```
|
|
195
192
|
|
|
196
|
-
当用户说“整理 /
|
|
193
|
+
当用户说“整理 / 检查知识库”时,先调用 JSON 检查:
|
|
197
194
|
|
|
198
195
|
```bash
|
|
199
|
-
aiwiki lint
|
|
196
|
+
aiwiki lint --json
|
|
200
197
|
```
|
|
201
198
|
|
|
202
|
-
|
|
199
|
+
如果 `safe_fixes.only_safe_fixes` 为 `true`,且用户允许整理,可以应用内置安全修复并再次检查:
|
|
203
200
|
|
|
204
201
|
```bash
|
|
202
|
+
aiwiki lint --fix-empty-dirs --json
|
|
205
203
|
aiwiki lint --json
|
|
206
204
|
```
|
|
207
205
|
|
|
@@ -219,7 +217,7 @@ aiwiki lint --severity info
|
|
|
219
217
|
aiwiki lint --no-write
|
|
220
218
|
```
|
|
221
219
|
|
|
222
|
-
Lint
|
|
220
|
+
Lint 输出会包含摘要、`safe_fixes`、最高优先级问题、分级报告,以及建议动作。把 `error` 当作必须先修的结构问题,把 `warning` 当作需要处理或复核的维护问题,把 `info` 当作富集、归档或后续整理 backlog。当前唯一可自动应用的 safe fix 是 `remove_empty_optional_dir`,只会删除已知且为空的可选增强目录;不要删除核心目录、未知目录、非空目录或文件。
|
|
223
221
|
|
|
224
222
|
`context` 返回 JSON,注意其中的 `generation_mode`、`quality` 和 `warnings`。如果结果是 `deterministic_fallback` / `scaffold`,回复时要说明它只是可追溯脚手架,不是高质量知识提炼。
|
|
225
223
|
|
|
@@ -247,3 +245,57 @@ Lint 输出会包含摘要、最高优先级问题、分级报告,以及建议
|
|
|
247
245
|
Before ingesting, querying, or reorganizing material, read `_system/purpose.md` in the target AIWiki workspace. Treat it as the local contract for what belongs in this knowledge base, what should stay out, and how future multi-knowledge-base routing should be handled.
|
|
248
246
|
|
|
249
247
|
If the material does not fit the purpose file, do not force it into the knowledge base as confirmed knowledge. Record the mismatch, ask for review when needed, or keep it as a traceable source rather than a claim.
|
|
248
|
+
|
|
249
|
+
## Context JSON for Retrieval
|
|
250
|
+
|
|
251
|
+
When answering from AIWiki, prefer:
|
|
252
|
+
|
|
253
|
+
```bash
|
|
254
|
+
aiwiki context "<topic>" --limit 10
|
|
255
|
+
```
|
|
256
|
+
|
|
257
|
+
Use filters when the user intent is narrow:
|
|
258
|
+
|
|
259
|
+
```bash
|
|
260
|
+
aiwiki context "<topic>" --type wiki_entries --source-role input --wiki-type source_knowledge --status active
|
|
261
|
+
aiwiki context "<topic>" --type source_cards --status to-review
|
|
262
|
+
```
|
|
263
|
+
|
|
264
|
+
`context` is local Markdown/frontmatter retrieval only. Do not describe it as vector search, RAG, a database query, or external web search.
|
|
265
|
+
|
|
266
|
+
Read these fields before responding:
|
|
267
|
+
|
|
268
|
+
- `query_scope`: what was searched and which filters were applied.
|
|
269
|
+
- `result_quality.total_matches` and `result_quality.has_wiki_entry`: whether the answer is grounded in a Wiki Entry or only in supporting artifacts.
|
|
270
|
+
- `recommended_next_action`: whether to answer, enrich, review grounding, or broaden the query.
|
|
271
|
+
- `match_reasons`: why each result matched, such as title, body, tags, topics, relationships, or source URL.
|
|
272
|
+
- `quality_signals`: scaffold, enriched, status, grounding, and relationship hints.
|
|
273
|
+
- `related_refs`: local wikilinks and frontmatter relationships such as `source_card`, `raw_file`, and run artifacts.
|
|
274
|
+
|
|
275
|
+
If `quality_signals` contains `quality:scaffold` or `grounding:needs_review`, tell the user the result is a traceable lead that needs enrichment or review. Do not present it as confirmed final knowledge.
|
|
276
|
+
|
|
277
|
+
## Agent Skill Upgrade Flow
|
|
278
|
+
|
|
279
|
+
When the user asks you to install, update, upgrade, or repair AIWiki integration, run:
|
|
280
|
+
|
|
281
|
+
```bash
|
|
282
|
+
aiwiki agent sync --yes
|
|
283
|
+
aiwiki agent check
|
|
284
|
+
```
|
|
285
|
+
|
|
286
|
+
Use JSON when you need exact state:
|
|
287
|
+
|
|
288
|
+
```bash
|
|
289
|
+
aiwiki agent sync --json --yes
|
|
290
|
+
aiwiki agent check --json
|
|
291
|
+
```
|
|
292
|
+
|
|
293
|
+
Interpret sync results:
|
|
294
|
+
|
|
295
|
+
- `installed`: target did not exist and now has the packaged skill.
|
|
296
|
+
- `current`: installed skill already matches the packaged skill.
|
|
297
|
+
- `updated`: installed skill differed; the old file was backed up and replaced.
|
|
298
|
+
- `would_install` / `would_update`: dry-run preview only.
|
|
299
|
+
- `unsupported`: no safe automatic target is known; use `aiwiki prompt agent`.
|
|
300
|
+
|
|
301
|
+
After sync, report the target path, backup path when present, and that the user may need to restart or reload the Agent. Do not claim the new skill is active until the Agent has reloaded it.
|
package/docs/FAQ.md
CHANGED
|
@@ -53,8 +53,8 @@ AIWiki 是一个开源的 Agent-first 本地 LLM-wiki CLI。宿主 Agent 负责
|
|
|
53
53
|
|
|
54
54
|
```bash
|
|
55
55
|
npx @itradingai/aiwiki@latest setup
|
|
56
|
-
aiwiki agent
|
|
57
|
-
aiwiki agent
|
|
56
|
+
aiwiki agent sync --yes
|
|
57
|
+
aiwiki agent check --json
|
|
58
58
|
```
|
|
59
59
|
|
|
60
60
|
然后去看:
|
|
@@ -78,3 +78,5 @@ aiwiki context "主题"
|
|
|
78
78
|
```bash
|
|
79
79
|
aiwiki lint
|
|
80
80
|
```
|
|
81
|
+
|
|
82
|
+
如果只是清理旧版本留下的空可选增强目录,可以让 Agent 先运行 `aiwiki lint --json`,确认只有 safe fix 后再运行 `aiwiki lint --fix-empty-dirs --json`。
|
package/docs/README.md
CHANGED
|
@@ -15,13 +15,12 @@ AIWiki 是一个 Agent-first 的本地知识库工具,用来把宿主 Agent
|
|
|
15
15
|
|
|
16
16
|
```bash
|
|
17
17
|
npx @itradingai/aiwiki@latest setup
|
|
18
|
-
aiwiki agent
|
|
19
|
-
aiwiki agent
|
|
20
|
-
aiwiki prompt agent
|
|
18
|
+
aiwiki agent sync --yes
|
|
19
|
+
aiwiki agent check --json
|
|
21
20
|
aiwiki doctor
|
|
22
21
|
```
|
|
23
22
|
|
|
24
|
-
优先运行 `aiwiki agent
|
|
23
|
+
优先运行 `aiwiki agent sync --yes`,让 CLI 幂等同步本机 Codex、QClaw、OpenClaw、Claude Code 等宿主 Agent 对接文件。其他宿主 Agent 可使用 `aiwiki prompt agent` 输出通用协议,再安装成 skill 或粘贴到项目/会话说明里。之后把链接发给宿主 Agent:
|
|
25
24
|
|
|
26
25
|
```text
|
|
27
26
|
入库 https://example.com/article
|
package/docs/ROADMAP.md
CHANGED
package/docs/USAGE.md
CHANGED
|
@@ -56,14 +56,14 @@ aiwiki status
|
|
|
56
56
|
|
|
57
57
|
## 2. 让宿主 Agent 学会 AIWiki
|
|
58
58
|
|
|
59
|
-
初始化知识库之后,先让宿主 Agent 学会 AIWiki
|
|
59
|
+
初始化知识库之后,先让宿主 Agent 学会 AIWiki。主路径推荐使用幂等同步:
|
|
60
60
|
|
|
61
61
|
```bash
|
|
62
|
-
aiwiki agent
|
|
63
|
-
aiwiki agent check
|
|
62
|
+
aiwiki agent sync --yes
|
|
63
|
+
aiwiki agent check --json
|
|
64
64
|
```
|
|
65
65
|
|
|
66
|
-
|
|
66
|
+
旧的安装向导仍然兼容,但不再作为首选路径:
|
|
67
67
|
|
|
68
68
|
```bash
|
|
69
69
|
aiwiki agent install
|
|
@@ -93,7 +93,7 @@ aiwiki prompt agent
|
|
|
93
93
|
|
|
94
94
|
把输出内容安装成宿主 Agent 的 skill,或粘贴到宿主 Agent 的项目/会话说明里。不同 Agent 的安装入口不同,所以 AIWiki 提供自动安装向导和通用协议两条路径。
|
|
95
95
|
|
|
96
|
-
`aiwiki agent check` 用来确认本机检测到哪些宿主 Agent、哪些已经安装 AIWiki 对接文件、哪些还需要运行 `aiwiki agent
|
|
96
|
+
`aiwiki agent check --json` 用来确认本机检测到哪些宿主 Agent、哪些已经安装 AIWiki 对接文件、哪些还需要运行 `aiwiki agent sync --agent <id> --yes`。
|
|
97
97
|
|
|
98
98
|
## 3. 日常使用
|
|
99
99
|
|
|
@@ -127,7 +127,7 @@ source_url: https://example.com/article
|
|
|
127
127
|
summary: 这里是文章前段摘要,方便 Agent 快速告诉用户文章大意。
|
|
128
128
|
run_id: 20260507-153012-abc123
|
|
129
129
|
run_dir: F:\knowledge_data\aiwiki\09-runs\20260507-153012-abc123
|
|
130
|
-
files:
|
|
130
|
+
files: 8
|
|
131
131
|
processing_summary: 09-runs/20260507-153012-abc123/processing-summary.md
|
|
132
132
|
wiki_entry: 05-wiki/source-knowledge/article-slug.md
|
|
133
133
|
wiki_entry_generation_mode: agent_enriched
|
|
@@ -138,7 +138,7 @@ grounding_needs_review: no
|
|
|
138
138
|
grounding_markers: none
|
|
139
139
|
grounding_claims_with_quotes: 1/1
|
|
140
140
|
source_card: 03-sources/article-cards/article-slug.md
|
|
141
|
-
draft_outline: 09-runs/20260507-153012-abc123/draft-outline.md
|
|
141
|
+
draft_outline: 09-runs/20260507-153012-abc123/draft-outline.md # 仅在生成大纲时出现
|
|
142
142
|
dashboard: dashboards/AIWiki Home.md
|
|
143
143
|
review_queue: dashboards/Review Queue.md
|
|
144
144
|
warnings: 0
|
|
@@ -203,8 +203,13 @@ Obsidian 入口:dashboards/AIWiki Home.md
|
|
|
203
203
|
```text
|
|
204
204
|
02-raw/articles/
|
|
205
205
|
03-sources/article-cards/
|
|
206
|
-
04-claims/_suggestions/
|
|
207
206
|
05-wiki/source-knowledge/
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
可选增强目录只在有对应内容或 `request.outputs` 明确请求时生成:
|
|
210
|
+
|
|
211
|
+
```text
|
|
212
|
+
04-claims/_suggestions/
|
|
208
213
|
06-assets/_suggestions/
|
|
209
214
|
07-topics/ready/
|
|
210
215
|
08-outputs/outlines/
|
|
@@ -252,10 +257,10 @@ AIWiki 生成的 Markdown 按 Obsidian vault 内路径组织,文件正文会
|
|
|
252
257
|
|
|
253
258
|
链接规则:
|
|
254
259
|
- wikilink 使用 vault 相对路径,统一为 `/`,并去掉 `.md` 后缀。
|
|
255
|
-
- `05-wiki/source-knowledge`
|
|
256
|
-
- `
|
|
260
|
+
- `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` 明确请求时生成。
|
|
261
|
+
- `03-sources/article-cards` 只链接本次实际生成的可选增强产物,避免空目录和断链。
|
|
257
262
|
- `09-runs/<run-id>/processing-summary.md` 会把本次生成的 Markdown 文件列成可点击 wikilink;`payload.json` 不是 Markdown,保留普通路径。
|
|
258
|
-
- frontmatter 会写入 `aiwiki_id`、`type`、`status`、`slug`、`source_url`、`content_fingerprint`、`created_at`、`captured_at`、`run_id`、`source_card`、`raw_note`、`claims_note`、`assets_note`、`topics_note`、`outline_note
|
|
263
|
+
- 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` 只在对应产物存在时出现。
|
|
259
264
|
|
|
260
265
|
### Obsidian 数据库入口
|
|
261
266
|
|
|
@@ -324,9 +329,10 @@ aiwiki lint
|
|
|
324
329
|
aiwiki lint --severity warning
|
|
325
330
|
aiwiki lint --json
|
|
326
331
|
aiwiki lint --no-write
|
|
332
|
+
aiwiki lint --fix-empty-dirs --json
|
|
327
333
|
```
|
|
328
334
|
|
|
329
|
-
`lint` 会先输出 `lint_summary`、`top_issue` 和报告路径,再按 Errors / Warnings / Info 分组展示问题。每个问题会尽量给出建议动作,例如 `enrich`、`fix_link`、`reingest`、`archive` 或 `
|
|
335
|
+
`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` 里报告删除了什么。
|
|
330
336
|
|
|
331
337
|
查看下一步建议:
|
|
332
338
|
|
|
@@ -434,3 +440,59 @@ aiwiki status
|
|
|
434
440
|
- `next_action`: the recommended next command.
|
|
435
441
|
|
|
436
442
|
`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.
|
|
443
|
+
|
|
444
|
+
## Query and Context Filters
|
|
445
|
+
|
|
446
|
+
`aiwiki context` and `aiwiki query` use local Markdown/frontmatter search. They do not use vector search, a database, external search, or RAG-over-wiki.
|
|
447
|
+
|
|
448
|
+
Useful filters:
|
|
449
|
+
|
|
450
|
+
```bash
|
|
451
|
+
aiwiki context "AI Agent" --type wiki_entries --source-role input --wiki-type source_knowledge --status active --limit 5
|
|
452
|
+
aiwiki query "AI Agent" --type source_cards --status to-review --limit 3
|
|
453
|
+
```
|
|
454
|
+
|
|
455
|
+
Supported filters:
|
|
456
|
+
|
|
457
|
+
- `--type`: one result group, such as `wiki_entries`, `source_cards`, `claims`, `topics`, `outlines`, or `raw_refs`.
|
|
458
|
+
- `--source-role`: frontmatter `source_role`, usually `input`, `processing`, or `output`.
|
|
459
|
+
- `--wiki-type`: frontmatter `wiki_type`, such as `source_knowledge` or `personal_knowledge`.
|
|
460
|
+
- `--status`: frontmatter status, such as `active`, `to-review`, `ready`, or `draft`.
|
|
461
|
+
- `--limit`: per-group result limit, clamped from 1 to 50.
|
|
462
|
+
|
|
463
|
+
The JSON result keeps the stable `schema_version: "aiwiki.context.v1"` and now also includes:
|
|
464
|
+
|
|
465
|
+
- `query_scope`: filters, limit, and searched groups.
|
|
466
|
+
- `result_quality`: total matches, best score, whether a Wiki Entry was found, and warnings.
|
|
467
|
+
- `recommended_next_action`: for example `use_matches_for_answer`, `review_grounding_or_enrich_entry`, or `broaden_query_or_ingest_source`.
|
|
468
|
+
- Per match: `match_reasons`, `quality_signals`, and `related_refs`.
|
|
469
|
+
|
|
470
|
+
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.
|
|
471
|
+
|
|
472
|
+
## Agent Skill Sync
|
|
473
|
+
|
|
474
|
+
AIWiki does not modify Agent configuration during `npm install`. After first install or upgrade, sync the packaged skill explicitly:
|
|
475
|
+
|
|
476
|
+
```bash
|
|
477
|
+
aiwiki agent sync --yes
|
|
478
|
+
aiwiki agent check
|
|
479
|
+
```
|
|
480
|
+
|
|
481
|
+
For one host Agent:
|
|
482
|
+
|
|
483
|
+
```bash
|
|
484
|
+
aiwiki agent sync --agent codex --yes
|
|
485
|
+
aiwiki agent sync --agent claude --yes
|
|
486
|
+
```
|
|
487
|
+
|
|
488
|
+
Useful Agent-facing options:
|
|
489
|
+
|
|
490
|
+
```bash
|
|
491
|
+
aiwiki agent sync --dry-run
|
|
492
|
+
aiwiki agent sync --json --yes
|
|
493
|
+
aiwiki agent check --json
|
|
494
|
+
aiwiki agent help
|
|
495
|
+
aiwiki context --help
|
|
496
|
+
```
|
|
497
|
+
|
|
498
|
+
`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.
|