llm-wiki-stack 1.0.2 → 1.0.4
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 +67 -35
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,66 +1,98 @@
|
|
|
1
|
+
English | [中文](README_ZH.md)
|
|
2
|
+
|
|
1
3
|
# llm-wiki-stack
|
|
2
4
|
|
|
3
|
-
|
|
5
|
+
[](https://www.npmjs.com/package/llm-wiki-stack)
|
|
6
|
+
[](https://www.npmjs.com/package/llm-wiki-stack)
|
|
7
|
+
[](LICENSE)
|
|
4
8
|
|
|
5
|
-
Obsidian
|
|
9
|
+
**Turn fragmented reading into a growing concept network.** An Obsidian knowledge base compiler that transforms raw source notes into structured, linked, queryable knowledge — maintained by LLMs, driven by your questions.
|
|
6
10
|
|
|
7
11
|
---
|
|
8
12
|
|
|
9
|
-
##
|
|
13
|
+
## The Problem
|
|
14
|
+
|
|
15
|
+
You read. You bookmark. You clip. You highlight. Months later, you have hundreds of notes but can't find what you need. When you do find something, you can't remember how it connects to everything else. Your notes are a pile, not a network.
|
|
16
|
+
|
|
17
|
+
Most PKM tools solve the *writing* problem. They don't solve the *synthesis* problem — the work of connecting, reconciling, and evolving your understanding across dozens or hundreds of sources.
|
|
10
18
|
|
|
11
|
-
|
|
19
|
+
**llm-wiki-stack solves the synthesis problem.**
|
|
12
20
|
|
|
13
|
-
|
|
21
|
+
## How It Works
|
|
22
|
+
|
|
23
|
+
Think of it as a **compiler** for knowledge. Source notes go in, a structured concept network comes out.
|
|
14
24
|
|
|
15
25
|
```
|
|
16
|
-
01 raw/
|
|
17
|
-
(
|
|
26
|
+
01 raw/ ──compile──> 02 wiki/ ──dialogue──> 03 outputs/
|
|
27
|
+
(source notes) (concept network) (your opinions)
|
|
18
28
|
```
|
|
19
29
|
|
|
20
|
-
|
|
21
|
-
|
|
30
|
+
Each layer has a clear role:
|
|
31
|
+
|
|
32
|
+
| Layer | Owned by | What happens |
|
|
33
|
+
|-------|----------|--------------|
|
|
34
|
+
| `01 raw/` | **You** | Save articles, clippings, thoughts. LLM never touches the body text. |
|
|
35
|
+
| `02 wiki/` | **LLM** | Extracts concepts, tracks how your understanding evolves, builds bidirectional links |
|
|
36
|
+
| `03 outputs/` | **You + LLM** | You ask questions. LLM reveals structural relationships. You write the conclusion. |
|
|
37
|
+
|
|
38
|
+
The result: every concept has a page. Every page links to its sources. Every source is traceable. Every change in understanding is recorded.
|
|
22
39
|
|
|
23
|
-
##
|
|
40
|
+
## Quick Start
|
|
24
41
|
|
|
25
42
|
```bash
|
|
26
43
|
npx llm-wiki-stack
|
|
27
44
|
```
|
|
28
45
|
|
|
29
|
-
|
|
46
|
+
This installs the five commands below into `~/.claude/skills/`. Then open Claude Code in your Obsidian vault and:
|
|
30
47
|
|
|
31
|
-
|
|
48
|
+
1. **Once**: `/kb-init` — bootstraps the three-layer structure
|
|
49
|
+
2. **Often**: `/wiki-compile` — turns your raw notes into linked wiki pages
|
|
50
|
+
3. **When curious**: `/wiki-topic` — ask a question, get a structured analysis from your own notes
|
|
51
|
+
4. **Monthly**: `/wiki-lint` — health report: orphan concepts, fragile dependencies, evolution timeline
|
|
32
52
|
|
|
33
|
-
|
|
53
|
+
Stop there. You'll know if this is for you.
|
|
34
54
|
|
|
35
|
-
|
|
36
|
-
|---------|--------|------|
|
|
37
|
-
| `/kb-init` | 从零初始化知识库 | 每个知识库一次 |
|
|
38
|
-
| `/wiki-compile` | 将新 raw 编译进 wiki | 积累素材后 |
|
|
39
|
-
| `/wiki-topic` | 基于问题形成观点 | 有研究问题时 |
|
|
40
|
-
| `/wiki-lint` | 健康检查 + 结构化报告 | 每月 |
|
|
55
|
+
## Commands
|
|
41
56
|
|
|
42
|
-
|
|
57
|
+
| Command | Role | Action |
|
|
58
|
+
|---------|------|--------|
|
|
59
|
+
| `/kb-init` | Architect | Bootstrap vault structure, generate `AGENTS.md`, compile existing raw notes |
|
|
60
|
+
| `/wiki-compile` | Compiler | Extract concepts from new raw notes, enforce independence tests, build cross-references |
|
|
61
|
+
| `/wiki-topic` | Analyst | Question-driven synthesis — LLM reveals causal chains, tensions, analogies, hypotheses |
|
|
62
|
+
| `/wiki-lint` | Inspector | Monthly health check: broken links, orphans, fragile dependencies, concept evolution |
|
|
43
63
|
|
|
44
|
-
|
|
45
|
-
2. **编译** — 运行 `/wiki-compile`;LLM 提取概念、创建 wiki 页、建立交叉引用
|
|
46
|
-
3. **思考** — 运行 `/wiki-topic` 提出问题;LLM 揭示概念间的结构化关系
|
|
47
|
-
4. **维护** — 每月运行 `/wiki-lint`;LLM 标记孤岛节点、脆弱依赖、概念演化
|
|
64
|
+
## The Mechanisms That Make It Work
|
|
48
65
|
|
|
49
|
-
|
|
66
|
+
### Concept Independence Test
|
|
67
|
+
Every new concept must earn its page. Before creating a wiki entry, the LLM checks:
|
|
68
|
+
- **Definability** — can it be clearly stated in 1-2 sentences without circular jargon?
|
|
69
|
+
- **Single core** — is this one concept, or "A and B" glued together? Compound concepts are split.
|
|
70
|
+
- **Multi-source** — does it appear in at least two different source notes with independent perspectives?
|
|
50
71
|
|
|
51
|
-
|
|
52
|
-
- 可定义性:能否用一两句话说清"这个概念是什么"?
|
|
53
|
-
- 单一核心:它是一个概念,还是"A 与 B"的组合?
|
|
54
|
-
- 多重验证:是否来自至少两个不同的源笔记?
|
|
72
|
+
This prevents the two diseases of knowledge bases: overgeneralized tags ("Technology", "Society") and one-off specifics that should have stayed in the raw layer.
|
|
55
73
|
|
|
56
|
-
|
|
74
|
+
### Concept Evolution (Never Overwrite)
|
|
75
|
+
New information appends by default. Core definitions change only when new evidence **explicitly corrects** an old factual error — and when that happens, the old understanding is archived with a timestamp. Conflicts are recorded side-by-side in a "Different Perspectives" section. Your intellectual history is preserved, not erased.
|
|
57
76
|
|
|
58
|
-
|
|
77
|
+
### Cross-Reference Integrity
|
|
78
|
+
Every claim links to its raw source. Every wiki link is bidirectional. `linked_count` is verified on each compile. Broken links are surfaced in the health report. There is no hidden state — everything is plain Markdown with YAML frontmatter.
|
|
59
79
|
|
|
60
|
-
##
|
|
80
|
+
## Design Principles
|
|
61
81
|
|
|
62
|
-
-
|
|
82
|
+
- **Connect the dots** — fragmented information → organized network → personal opinions
|
|
83
|
+
- **Human judges, LLM compiles** — you handle creativity, judgment, and questions; the LLM handles compilation, linking, and health checks
|
|
84
|
+
- **Occam's Razor** — no complexity beyond folders + Markdown + Obsidian native features
|
|
85
|
+
- **Compound interest** — knowledge compiled once, appreciated continuously
|
|
63
86
|
|
|
64
|
-
##
|
|
87
|
+
## Requirements
|
|
88
|
+
|
|
89
|
+
- [Claude Code](https://docs.anthropic.com/en/docs/claude-code) or compatible AI agent
|
|
90
|
+
- [Obsidian](https://obsidian.md/) (recommended — graph view makes the concept network visible)
|
|
91
|
+
|
|
92
|
+
## License
|
|
93
|
+
|
|
94
|
+
MIT. Free forever. Go build your knowledge.
|
|
95
|
+
|
|
96
|
+
---
|
|
65
97
|
|
|
66
|
-
|
|
98
|
+
*Inspired by [Karpathy's llm-wiki](https://gist.github.com/karpathy/442a6bf555914893e9891c11519de94f) concept.*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "llm-wiki-stack",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.4",
|
|
4
4
|
"description": "Obsidian knowledge base compiler — three-layer architecture (raw → wiki → outputs) with concept evolution, cross-reference integrity, and health checks. Command-driven, AI-maintained, plain Markdown.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"bin": {
|