@itradingai/aiwiki 0.2.12 → 0.2.13
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/dist/src/app.js +1 -0
- package/dist/src/workspace.js +88 -0
- package/docs/AGENT_HANDOFF.md +5 -0
- package/docs/USAGE.md +3 -0
- package/package.json +1 -1
package/dist/src/app.js
CHANGED
|
@@ -416,6 +416,7 @@ function printAgentPrompt(stream) {
|
|
|
416
416
|
writeLine(stream, "- 收录 <url>");
|
|
417
417
|
writeLine(stream, "- 存一下 <url>");
|
|
418
418
|
writeLine(stream, "- aiwiki <url>");
|
|
419
|
+
writeLine(stream, "Before ingesting, querying, or reorganizing, read `_system/purpose.md` and keep material aligned with the knowledge-base goal, scope, and unsuitable-content rules.");
|
|
419
420
|
writeLine(stream, "");
|
|
420
421
|
writeLine(stream, "如果当前会话被用户明确设定为 AIWiki 入库助手,则用户只发送 URL 也默认触发入库。普通会话中不要把所有 URL 都自动入库。");
|
|
421
422
|
writeLine(stream, "");
|
package/dist/src/workspace.js
CHANGED
|
@@ -21,6 +21,94 @@ export const REQUIRED_DIRS = [
|
|
|
21
21
|
"_system/logs"
|
|
22
22
|
];
|
|
23
23
|
const WORKSPACE_SEEDS = [
|
|
24
|
+
{
|
|
25
|
+
path: "_system/purpose.md",
|
|
26
|
+
content: `# AIWiki Knowledge Base Purpose
|
|
27
|
+
|
|
28
|
+
This file defines what this knowledge base is for. Host Agents should read it before ingesting, querying, or reorganizing content.
|
|
29
|
+
|
|
30
|
+
## Goal
|
|
31
|
+
|
|
32
|
+
Build a local, traceable AI knowledge base that turns useful articles, notes, and source material into Obsidian-ready Markdown.
|
|
33
|
+
|
|
34
|
+
## Suitable Materials
|
|
35
|
+
|
|
36
|
+
- Articles, notes, transcripts, and references that can become source cards, wiki entries, claims, topics, outlines, or reusable assets.
|
|
37
|
+
- External materials with clear source information.
|
|
38
|
+
- User-owned drafts or published work when the user explicitly says the material represents their own output.
|
|
39
|
+
|
|
40
|
+
## Unsuitable Materials
|
|
41
|
+
|
|
42
|
+
- Content without a usable source or context.
|
|
43
|
+
- Purely private, sensitive, illegal, or unsafe material.
|
|
44
|
+
- Generic web noise that cannot become reusable knowledge.
|
|
45
|
+
- Claims that cannot be tied back to evidence.
|
|
46
|
+
|
|
47
|
+
## Multi-Knowledge-Base Boundary
|
|
48
|
+
|
|
49
|
+
This base AIWiki workspace is a single knowledge base. If the user later creates multiple knowledge bases, each one should have its own purpose file and Agents should route material according to that local purpose.
|
|
50
|
+
|
|
51
|
+
## Agent Rules
|
|
52
|
+
|
|
53
|
+
- Respect this purpose before ingesting material.
|
|
54
|
+
- Keep evidence and inference separate.
|
|
55
|
+
- Do not treat external input as the user's own view unless the user says so.
|
|
56
|
+
- Prefer traceable source cards and wiki entries over unsupported summaries.
|
|
57
|
+
`
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
path: "_system/index.md",
|
|
61
|
+
content: `# AIWiki System Index
|
|
62
|
+
|
|
63
|
+
Use this file as the human and Agent entry point for the knowledge base.
|
|
64
|
+
|
|
65
|
+
## Core Areas
|
|
66
|
+
|
|
67
|
+
- [[02-raw/articles|Raw Articles]]
|
|
68
|
+
- [[03-sources/article-cards|Source Cards]]
|
|
69
|
+
- [[04-claims/_suggestions|Claim Suggestions]]
|
|
70
|
+
- [[05-wiki|Wiki Entries]]
|
|
71
|
+
- [[06-assets/_suggestions|Asset Suggestions]]
|
|
72
|
+
- [[07-topics/ready|Topic Pipeline]]
|
|
73
|
+
- [[08-outputs/outlines|Draft Outlines]]
|
|
74
|
+
- [[09-runs|Processing Runs]]
|
|
75
|
+
|
|
76
|
+
## Dashboards
|
|
77
|
+
|
|
78
|
+
- [[dashboards/AIWiki Home|AIWiki Home]]
|
|
79
|
+
- [[dashboards/Review Queue|Review Queue]]
|
|
80
|
+
- [[dashboards/Recent Runs|Recent Runs]]
|
|
81
|
+
- [[dashboards/Lint Report|Lint Report]]
|
|
82
|
+
|
|
83
|
+
## System Files
|
|
84
|
+
|
|
85
|
+
- [[_system/purpose|Purpose]]
|
|
86
|
+
- [[_system/log|Log]]
|
|
87
|
+
- [[_system/schemas/aiwiki-frontmatter|Frontmatter Schema]]
|
|
88
|
+
|
|
89
|
+
## Common Commands
|
|
90
|
+
|
|
91
|
+
\`\`\`bash
|
|
92
|
+
aiwiki status
|
|
93
|
+
aiwiki next
|
|
94
|
+
aiwiki query "<topic>"
|
|
95
|
+
aiwiki context "<topic>"
|
|
96
|
+
aiwiki lint
|
|
97
|
+
\`\`\`
|
|
98
|
+
`
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
path: "_system/log.md",
|
|
102
|
+
content: `# AIWiki System Log
|
|
103
|
+
|
|
104
|
+
This lightweight log is reserved for important workspace events. It keeps the base edition file-first and does not require a database.
|
|
105
|
+
|
|
106
|
+
## Entries
|
|
107
|
+
|
|
108
|
+
<!-- Add manual or future automated events below. -->
|
|
109
|
+
|
|
110
|
+
`
|
|
111
|
+
},
|
|
24
112
|
{
|
|
25
113
|
path: "dashboards/AIWiki Home.md",
|
|
26
114
|
content: `# AIWiki 首页
|
package/docs/AGENT_HANDOFF.md
CHANGED
|
@@ -208,3 +208,8 @@ aiwiki lint
|
|
|
208
208
|
```
|
|
209
209
|
|
|
210
210
|
不要把外部资料标成代表用户观点。
|
|
211
|
+
# Knowledge Base Purpose
|
|
212
|
+
|
|
213
|
+
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.
|
|
214
|
+
|
|
215
|
+
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.
|
package/docs/USAGE.md
CHANGED
|
@@ -403,3 +403,6 @@ aiwiki status
|
|
|
403
403
|
- 成功读取时,`03-sources/article-cards` 下出现资料卡。
|
|
404
404
|
- 成功读取时,`05-wiki/source-knowledge` 下出现 Wiki Entry。
|
|
405
405
|
- 抓取失败时,`09-runs/<run-id>-fetch-failed` 下出现失败记录。
|
|
406
|
+
# System Purpose Files
|
|
407
|
+
|
|
408
|
+
`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.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@itradingai/aiwiki",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.13",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Agent-first AI knowledge base CLI for turning articles, links and notes into Obsidian-ready source cards, topics, outlines and reusable knowledge assets.",
|
|
6
6
|
"license": "MIT",
|