@itradingai/aiwiki 0.2.19 → 0.2.21

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.
Files changed (57) hide show
  1. package/README.md +14 -1
  2. package/dist/src/app.js +120 -10
  3. package/docs/AGENT_HANDOFF.md +27 -0
  4. package/docs/FAQ.md +18 -0
  5. package/docs/README.md +5 -0
  6. package/docs/RELEASE.md +9 -14
  7. package/docs/ROADMAP.md +1 -0
  8. package/docs/SHOWCASE.md +19 -9
  9. package/docs/USAGE.md +15 -11
  10. package/examples/demo-run/README.md +28 -0
  11. package/examples/demo-run/context-output.json +341 -0
  12. package/examples/demo-run/ingest-agent-output.txt +25 -0
  13. package/examples/demo-run/ingest-file-output.txt +23 -0
  14. package/examples/demo-run/input/agent-enriched-payload.json +88 -0
  15. package/examples/demo-run/input/local-article.md +5 -0
  16. package/examples/demo-run/lint-output.json +46 -0
  17. package/examples/demo-run/query-output.txt +54 -0
  18. package/examples/demo-run/setup-output.txt +9 -0
  19. package/examples/demo-run/status-output.txt +20 -0
  20. package/examples/obsidian-vault-sample/02-raw/articles/llm-wiki-notes.md +32 -0
  21. package/examples/obsidian-vault-sample/02-raw/articles/local-article.md +33 -0
  22. package/examples/obsidian-vault-sample/03-sources/article-cards/llm-wiki-notes.md +62 -0
  23. package/examples/obsidian-vault-sample/03-sources/article-cards/local-article.md +58 -0
  24. package/examples/obsidian-vault-sample/04-claims/_suggestions/llm-wiki-notes-claims.md +58 -0
  25. package/examples/obsidian-vault-sample/05-wiki/source-knowledge/llm-wiki-notes.md +103 -0
  26. package/examples/obsidian-vault-sample/05-wiki/source-knowledge/local-article.md +72 -0
  27. package/examples/obsidian-vault-sample/06-assets/_suggestions/llm-wiki-notes-assets.md +29 -0
  28. package/examples/obsidian-vault-sample/07-topics/ready/llm-wiki-notes-topics.md +29 -0
  29. package/examples/obsidian-vault-sample/08-outputs/outlines/llm-wiki-notes-outline.md +43 -0
  30. package/examples/obsidian-vault-sample/09-runs/20260608-160603905-085f05/payload.json +24 -0
  31. package/examples/obsidian-vault-sample/09-runs/20260608-160603905-085f05/processing-summary.md +56 -0
  32. package/examples/obsidian-vault-sample/09-runs/20260608-160603905-085f05/raw.md +33 -0
  33. package/examples/obsidian-vault-sample/09-runs/20260608-160603905-085f05/source-card.md +58 -0
  34. package/examples/obsidian-vault-sample/09-runs/20260608-160603905-085f05/wiki-entry.md +72 -0
  35. package/examples/obsidian-vault-sample/09-runs/20260608-160603980-89f570/creative-assets.md +29 -0
  36. package/examples/obsidian-vault-sample/09-runs/20260608-160603980-89f570/draft-outline.md +43 -0
  37. package/examples/obsidian-vault-sample/09-runs/20260608-160603980-89f570/payload.json +91 -0
  38. package/examples/obsidian-vault-sample/09-runs/20260608-160603980-89f570/processing-summary.md +67 -0
  39. package/examples/obsidian-vault-sample/09-runs/20260608-160603980-89f570/raw.md +32 -0
  40. package/examples/obsidian-vault-sample/09-runs/20260608-160603980-89f570/source-card.md +62 -0
  41. package/examples/obsidian-vault-sample/09-runs/20260608-160603980-89f570/topics.md +29 -0
  42. package/examples/obsidian-vault-sample/09-runs/20260608-160603980-89f570/wiki-entry.md +103 -0
  43. package/examples/obsidian-vault-sample/_system/index.md +37 -0
  44. package/examples/obsidian-vault-sample/_system/log.md +8 -0
  45. package/examples/obsidian-vault-sample/_system/purpose.md +31 -0
  46. package/examples/obsidian-vault-sample/_system/schemas/aiwiki-frontmatter.md +21 -0
  47. package/examples/obsidian-vault-sample/_system/templates/review-note.md +16 -0
  48. package/examples/obsidian-vault-sample/_system/templates/source-card.md +34 -0
  49. package/examples/obsidian-vault-sample/aiwiki.yaml +18 -0
  50. package/examples/obsidian-vault-sample/dashboards/AIWiki Home.md +31 -0
  51. package/examples/obsidian-vault-sample/dashboards/Recent Runs.md +10 -0
  52. package/examples/obsidian-vault-sample/dashboards/Review Queue.md +12 -0
  53. package/examples/obsidian-vault-sample/dashboards/Source Cards.md +10 -0
  54. package/examples/obsidian-vault-sample/dashboards/Topic Pipeline.md +10 -0
  55. package/examples/obsidian-vault-sample/dashboards/Wiki Entries.md +10 -0
  56. package/package.json +2 -1
  57. package/skill/SKILL.md +28 -1
@@ -0,0 +1,34 @@
1
+ ---
2
+ aiwiki_id: ""
3
+ type: "source_card"
4
+ status: "to-review"
5
+ slug: ""
6
+ title: ""
7
+ source_url: ""
8
+ source_type: ""
9
+ created_at: ""
10
+ captured_at: ""
11
+ run_id: ""
12
+ source_card: ""
13
+ raw_note: ""
14
+ claims_note: ""
15
+ assets_note: ""
16
+ topics_note: ""
17
+ outline_note: ""
18
+ run_summary: ""
19
+ tags: ["aiwiki/source-card"]
20
+ ---
21
+
22
+ # 资料卡
23
+
24
+ ## Obsidian 链接
25
+
26
+ - 原文:
27
+ - Claim 建议:
28
+ - 素材建议:
29
+ - 选题:
30
+ - 大纲:
31
+ - 处理记录:
32
+
33
+ ## 摘要
34
+
@@ -0,0 +1,18 @@
1
+ product: aiwiki
2
+ schema_version: 1
3
+ created_at: "2026-06-08T16:06:03.826Z"
4
+
5
+ knowledge_base:
6
+ id: default
7
+ name: AIWiki
8
+ language: zh-CN
9
+
10
+ agent:
11
+ url_first: true
12
+ fetch_owner: host_agent
13
+ cli_fetch_webpage: false
14
+
15
+ review:
16
+ wiki_merge_policy: manual
17
+ claim_policy: suggest_only
18
+ asset_policy: suggest_only
@@ -0,0 +1,31 @@
1
+ # AIWiki 首页
2
+
3
+ AIWiki 的 Obsidian 入口。Dataview 是可选增强;未安装时仍可使用下方普通链接、Properties、Backlinks 和 Graph View。
4
+
5
+ ## 原生链接入口
6
+
7
+ - [[dashboards/Wiki Entries|Wiki 条目]]
8
+ - [[dashboards/Source Cards|资料卡]]
9
+ - [[dashboards/Review Queue|待审队列]]
10
+ - [[dashboards/Recent Runs|最近处理]]
11
+ - [[dashboards/Topic Pipeline|选题管线]]
12
+ - [[dashboards/Lint Report|结构检查]]
13
+ - [[_system/schemas/aiwiki-frontmatter|字段说明]]
14
+
15
+ ## 最近收录
16
+
17
+ ```dataview
18
+ TABLE status, source_url, captured_at, run_summary
19
+ FROM "03-sources/article-cards"
20
+ WHERE type = "source_card"
21
+ SORT captured_at DESC
22
+ ```
23
+
24
+ ## 待审队列
25
+
26
+ ```dataview
27
+ TABLE type, status, source_card, raw_note, run_summary
28
+ FROM "03-sources/article-cards" or "04-claims/_suggestions" or "06-assets/_suggestions" or "08-outputs/outlines"
29
+ WHERE status = "to-review"
30
+ SORT created_at DESC
31
+ ```
@@ -0,0 +1,10 @@
1
+ # 最近处理
2
+
3
+ 处理记录用于追溯每次宿主 Agent 入库的 payload、产物和告警。
4
+
5
+ ```dataview
6
+ TABLE status, source_url, source_card, raw_note, created_at
7
+ FROM "09-runs"
8
+ WHERE type = "processing_summary"
9
+ SORT created_at DESC
10
+ ```
@@ -0,0 +1,12 @@
1
+ # 待审队列
2
+
3
+ 未安装 Dataview 时,可直接打开 [[03-sources/article-cards]]、[[04-claims/_suggestions]]、[[06-assets/_suggestions]] 和 [[08-outputs/outlines]] 手工审阅。
4
+
5
+ ## 待审内容
6
+
7
+ ```dataview
8
+ TABLE type, source_url, source_card, raw_note, claims_note, assets_note, outline_note
9
+ FROM "03-sources/article-cards" or "04-claims/_suggestions" or "06-assets/_suggestions" or "08-outputs/outlines"
10
+ WHERE status = "to-review"
11
+ SORT captured_at DESC
12
+ ```
@@ -0,0 +1,10 @@
1
+ # 资料卡
2
+
3
+ 资料卡用于追踪来源、原文、Claim 建议、素材建议、选题和大纲。
4
+
5
+ ```dataview
6
+ TABLE status, source_url, wiki_entry, raw_note, captured_at
7
+ FROM "03-sources/article-cards"
8
+ WHERE type = "source_card"
9
+ SORT captured_at DESC
10
+ ```
@@ -0,0 +1,10 @@
1
+ # 选题管线
2
+
3
+ 选题和大纲是从资料卡继续写作的入口。
4
+
5
+ ```dataview
6
+ TABLE status, source_card, outline_note, source_url, created_at
7
+ FROM "07-topics/ready" or "08-outputs/outlines"
8
+ WHERE type = "topic_candidates" or type = "draft_outline"
9
+ SORT created_at DESC
10
+ ```
@@ -0,0 +1,10 @@
1
+ # Wiki 条目
2
+
3
+ AIWiki 每次成功入库都会生成 Wiki Entry。这里是知识层入口,不要求先经过 Review Queue 才能查询。
4
+
5
+ ```dataview
6
+ TABLE wiki_type, source_role, represents_user_view, quality, source_card, raw_file, updated_at
7
+ FROM "05-wiki"
8
+ WHERE type = "wiki_entry"
9
+ SORT updated_at DESC
10
+ ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@itradingai/aiwiki",
3
- "version": "0.2.19",
3
+ "version": "0.2.21",
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",
@@ -50,6 +50,7 @@
50
50
  "docs/USAGE.md",
51
51
  "docs/development-log.md",
52
52
  "docs/architecture.svg",
53
+ "examples",
53
54
  "skill"
54
55
  ],
55
56
  "bin": {
package/skill/SKILL.md CHANGED
@@ -3,7 +3,7 @@ name: aiwiki
3
3
  description: Agent-first AIWiki workflow for turning one URL/body into local Wiki knowledge files.
4
4
  ---
5
5
 
6
- <!-- aiwiki-skill-version: 0.2.19 -->
6
+ <!-- aiwiki-skill-version: 0.2.21 -->
7
7
 
8
8
  # AIWiki Skill
9
9
 
@@ -34,15 +34,42 @@ aiwiki agent sync --json --yes
34
34
  aiwiki agent check --json
35
35
  ```
36
36
 
37
+ For a project or vault workspace, also sync root guidance so future Agents see the command contract before they inspect files:
38
+
39
+ ```bash
40
+ aiwiki agent sync --path <workspace> --yes
41
+ aiwiki agent check --path <workspace> --json
42
+ ```
43
+
37
44
  Sync behavior:
38
45
 
39
46
  - missing installed skill: install the packaged AIWiki skill
40
47
  - current installed skill: leave unchanged
41
48
  - different installed skill: backup the old file, then overwrite with the packaged skill
49
+ - workspace `AGENTS.md`: append or refresh the marker-bounded AIWiki block without removing user instructions
42
50
  - unsupported host: do not write; use `aiwiki prompt agent` as a manual fallback
43
51
 
44
52
  After sync, tell the user the target path, any backup path, and that the target Agent may need to restart or reload before the new skill is active. Never edit Agent config during `npm install`; sync is the explicit safe step.
45
53
 
54
+ ## Required Command-First Loop
55
+
56
+ When the user asks you to organize, inspect, ingest, query, reuse, or maintain an AIWiki workspace, run the AIWiki command surface before generic file search or ad hoc note edits:
57
+
58
+ ```bash
59
+ aiwiki setup --path <workspace> --yes
60
+ aiwiki agent sync --path <workspace> --yes
61
+ aiwiki agent check --path <workspace> --json
62
+ aiwiki lint --json --path <workspace>
63
+ aiwiki lint --fix-empty-dirs --json --path <workspace>
64
+ aiwiki ingest-file --file <file> --path <workspace>
65
+ aiwiki ingest-agent --stdin --path <workspace>
66
+ aiwiki status --path <workspace>
67
+ aiwiki query <topic> --path <workspace>
68
+ aiwiki context <topic> --path <workspace>
69
+ ```
70
+
71
+ Use fallback shell/file search only after the relevant AIWiki command has been tried or when the command is unavailable. If you fall back, explain which AIWiki command was insufficient and why. If you skip the AIWiki commands entirely, the knowledge-base features are not being exercised.
72
+
46
73
  ## Knowledge Base Purpose
47
74
 
48
75
  Before ingesting, querying, linting, or reorganizing material, read `_system/purpose.md` in the target AIWiki workspace when it exists. Treat it as the local contract for: