@zosmaai/pi-llm-wiki 0.1.0 โ 0.1.1
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/.github/workflows/ci.yml +1 -1
- package/README.md +16 -0
- package/assets/architecture.md +79 -0
- package/assets/architecture.mmd +41 -0
- package/assets/knowledge-graph.mmd +34 -0
- package/assets/knowledge-graph.png +0 -0
- package/assets/screenshot.png +0 -0
- package/package.json +2 -1
package/.github/workflows/ci.yml
CHANGED
package/README.md
CHANGED
|
@@ -159,6 +159,14 @@ The LLM answers from your wiki, not from general knowledge โ giving you answer
|
|
|
159
159
|
|
|
160
160
|
## ๐๏ธ Architecture
|
|
161
161
|
|
|
162
|
+
<p align="center">
|
|
163
|
+
<img src="https://raw.githubusercontent.com/zosmaai/pi-llm-wiki/main/assets/screenshot.png" alt="LLM Wiki Architecture" width="90%">
|
|
164
|
+
</p>
|
|
165
|
+
|
|
166
|
+
<p align="center">
|
|
167
|
+
<em>Three-layer architecture: raw sources โ LLM-managed wiki โ Obsidian frontend</em>
|
|
168
|
+
</p>
|
|
169
|
+
|
|
162
170
|
The LLM Wiki follows a three-layer architecture:
|
|
163
171
|
|
|
164
172
|
```
|
|
@@ -234,6 +242,14 @@ These tools handle the scaffolding and bookkeeping so the LLM can focus on the a
|
|
|
234
242
|
|
|
235
243
|
## ๐ Using with Obsidian
|
|
236
244
|
|
|
245
|
+
<p align="center">
|
|
246
|
+
<img src="https://raw.githubusercontent.com/zosmaai/pi-llm-wiki/main/assets/knowledge-graph.png" alt="Knowledge Graph" width="90%">
|
|
247
|
+
</p>
|
|
248
|
+
|
|
249
|
+
<p align="center">
|
|
250
|
+
<em>The LLM automatically connects entities, concepts, and sources with [[wikilinks]] โ viewable in Obsidian's graph view</em>
|
|
251
|
+
</p>
|
|
252
|
+
|
|
237
253
|
1. Open the `wiki/` directory as an Obsidian vault
|
|
238
254
|
2. Install these plugins:
|
|
239
255
|
- [Dataview](https://github.com/blacksmithgu/obsidian-dataview) โ Query pages by frontmatter
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
# @zosmaai/pi-llm-wiki โ Architecture Diagram
|
|
2
|
+
|
|
3
|
+
This Mermaid diagram shows the three-layer architecture of the LLM Wiki pattern.
|
|
4
|
+
|
|
5
|
+
```mermaid
|
|
6
|
+
flowchart TB
|
|
7
|
+
subgraph Human["๐ค You (Curate & Ask)"]
|
|
8
|
+
direction LR
|
|
9
|
+
Sources["๐ Drop Sources"] --> Questions["โ Ask Questions"]
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
subgraph LLM["๐ค LLM (Writes & Maintains)"]
|
|
13
|
+
direction TB
|
|
14
|
+
SKILL["๐ SKILL.md Schema"]
|
|
15
|
+
INGEST["๐ฅ Ingest<br/>Read โ Summarize โ Cross-ref"]
|
|
16
|
+
QUERY["๐ Query<br/>Index โ Synthesize โ Cite"]
|
|
17
|
+
LINT["๐งน Lint<br/>Contradictions โ Orphans โ Gaps"]
|
|
18
|
+
DISCOVER["๐ Discover<br/>Search โ Fetch โ Save"]
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
subgraph Storage["๐พ File System"]
|
|
22
|
+
direction LR
|
|
23
|
+
RAW["raw/<br/>(immutable sources)"]
|
|
24
|
+
WIKI["wiki/<br/>(LLM-managed markdown)"]
|
|
25
|
+
OUTPUTS["outputs/<br/>(reports, digests)"]
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
subgraph Obsidian["๐ Obsidian Integration"]
|
|
29
|
+
GRAPH["Graph View<br/>[[wikilinks]]"]
|
|
30
|
+
DATAVIEW["Dataview<br/>Frontmatter queries"]
|
|
31
|
+
DASHBOARD["Dashboard<br/>Analytics"]
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
Sources --> RAW
|
|
35
|
+
RAW --> INGEST
|
|
36
|
+
INGEST --> WIKI
|
|
37
|
+
SKILL --> INGEST
|
|
38
|
+
SKILL --> QUERY
|
|
39
|
+
SKILL --> LINT
|
|
40
|
+
SKILL --> DISCOVER
|
|
41
|
+
DISCOVER --> RAW
|
|
42
|
+
QUERY --> WIKI
|
|
43
|
+
QUERY --> OUTPUTS
|
|
44
|
+
LINT --> WIKI
|
|
45
|
+
LINT --> OUTPUTS
|
|
46
|
+
Questions --> QUERY
|
|
47
|
+
WIKI --> GRAPH
|
|
48
|
+
WIKI --> DATAVIEW
|
|
49
|
+
WIKI --> DASHBOARD
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## Three-Layer Architecture
|
|
53
|
+
|
|
54
|
+
```
|
|
55
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
56
|
+
โ YOU (curate & ask) โ
|
|
57
|
+
โโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโค
|
|
58
|
+
โ wiki/ โ outputs/ โ Obsidian vault โ
|
|
59
|
+
โ (read only) โ (reports, digests) โ (graph view, UI) โ
|
|
60
|
+
โโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโค
|
|
61
|
+
โ LLM (writes & maintains) โ
|
|
62
|
+
โโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
|
|
63
|
+
โ raw/ โ SKILL.md schema โ
|
|
64
|
+
โ (immutable sources) โ (rules & conventions) โ
|
|
65
|
+
โโโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
## Three Operations
|
|
69
|
+
|
|
70
|
+
| Operation | Trigger | What Happens |
|
|
71
|
+
| ---------- | -------------------- | ------------------------------------------------------------------------------------------- |
|
|
72
|
+
| **Ingest** | Add source to `raw/` | LLM reads, creates summary, updates 5-15 wiki pages, cross-references, flags contradictions |
|
|
73
|
+
| **Query** | Ask any question | LLM searches index, reads relevant pages, synthesizes answer with `[[citations]]` |
|
|
74
|
+
| **Lint** | `/wiki:lint` | Health check: contradictions, orphans, missing pages, stale claims, knowledge gaps |
|
|
75
|
+
|
|
76
|
+
## Two Modes
|
|
77
|
+
|
|
78
|
+
- **๐ค Personal Wiki** โ Learning, journaling, goals, book notes
|
|
79
|
+
- **๐ข Company Wiki** โ Competitive intel, change detection, battlecards
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
flowchart TB
|
|
2
|
+
subgraph Human["๐ค You (Curate & Ask)"]
|
|
3
|
+
direction LR
|
|
4
|
+
Sources["๐ Drop Sources"] --> Questions["โ Ask Questions"]
|
|
5
|
+
end
|
|
6
|
+
|
|
7
|
+
subgraph LLM["๐ค LLM Agent (Writes & Maintains)"]
|
|
8
|
+
direction TB
|
|
9
|
+
SKILL["๐ SKILL.md Schema<br/>Rules & Conventions"]
|
|
10
|
+
INGEST["๐ฅ Ingest<br/>Read โ Summarize โ Cross-ref"]
|
|
11
|
+
QUERY["๐ Query<br/>Index โ Synthesize โ Cite"]
|
|
12
|
+
LINT["๐งน Lint<br/>Contradictions โ Orphans โ Gaps"]
|
|
13
|
+
DISCOVER["๐ Discover<br/>Search โ Fetch โ Save"]
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
subgraph Storage["๐พ File System"]
|
|
17
|
+
direction LR
|
|
18
|
+
RAW["raw/<br/>Immutable Sources"]
|
|
19
|
+
WIKI["wiki/<br/>Interlinked Markdown"]
|
|
20
|
+
OUTPUTS["outputs/<br/>Reports & Digests"]
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
Sources --> RAW
|
|
24
|
+
RAW --> INGEST
|
|
25
|
+
SKILL --> INGEST
|
|
26
|
+
INGEST --> WIKI
|
|
27
|
+
DISCOVER --> RAW
|
|
28
|
+
SKILL --> QUERY
|
|
29
|
+
Questions --> QUERY
|
|
30
|
+
QUERY --> WIKI
|
|
31
|
+
QUERY --> OUTPUTS
|
|
32
|
+
SKILL --> LINT
|
|
33
|
+
LINT --> WIKI
|
|
34
|
+
LINT --> OUTPUTS
|
|
35
|
+
SKILL --> DISCOVER
|
|
36
|
+
|
|
37
|
+
style RAW fill:#f9f,stroke:#333,stroke-width:2px
|
|
38
|
+
style WIKI fill:#bbf,stroke:#333,stroke-width:2px
|
|
39
|
+
style SKILL fill:#bfb,stroke:#333,stroke-width:2px
|
|
40
|
+
style Human fill:#ffd,stroke:#333,stroke-width:2px
|
|
41
|
+
style LLM fill:#eff,stroke:#333,stroke-width:2px
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
graph LR
|
|
2
|
+
subgraph Entities["๐ง Entities"]
|
|
3
|
+
A["Andrej Karpathy"]
|
|
4
|
+
O["OpenAI"]
|
|
5
|
+
C["Claude"]
|
|
6
|
+
end
|
|
7
|
+
subgraph Concepts["๐ก Concepts"]
|
|
8
|
+
LLM["LLM Wiki Pattern"]
|
|
9
|
+
RAG["RAG"]
|
|
10
|
+
MEMEX["Memex (1945)"]
|
|
11
|
+
OBS["Obsidian Integration"]
|
|
12
|
+
end
|
|
13
|
+
subgraph Sources["๐ Sources"]
|
|
14
|
+
S1["Karpathy's Gist"]
|
|
15
|
+
S2["Community Impl."]
|
|
16
|
+
S3["Pi Package"]
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
S1 --> LLM
|
|
20
|
+
S1 --> A
|
|
21
|
+
LLM --> RAG
|
|
22
|
+
LLM --> MEMEX
|
|
23
|
+
LLM --> OBS
|
|
24
|
+
S2 --> LLM
|
|
25
|
+
S3 --> LLM
|
|
26
|
+
S3 --> OBS
|
|
27
|
+
A --> O
|
|
28
|
+
A --> C
|
|
29
|
+
LLM --> O
|
|
30
|
+
LLM --> C
|
|
31
|
+
|
|
32
|
+
style Entities fill:#e1f5fe,stroke:#0288d1
|
|
33
|
+
style Concepts fill:#f3e5f5,stroke:#7b1fa2
|
|
34
|
+
style Sources fill:#fff3e0,stroke:#e65100
|
|
Binary file
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zosmaai/pi-llm-wiki",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "LLM Wiki for Pi โ self-maintaining knowledge base following Karpathy's pattern. Obsidian-friendly, auto-updating, personal & company wiki.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"pi-package",
|
|
@@ -54,6 +54,7 @@
|
|
|
54
54
|
"devDependencies": {
|
|
55
55
|
"@biomejs/biome": "^1.9.4",
|
|
56
56
|
"@mariozechner/pi-coding-agent": "^0.70.2",
|
|
57
|
+
"@mermaid-js/mermaid-cli": "^11.12.0",
|
|
57
58
|
"typebox": "^1.1.34",
|
|
58
59
|
"typescript": "^5.7.0",
|
|
59
60
|
"vitest": "^3.0.0"
|