@zosmaai/pi-llm-wiki 0.1.0
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 +44 -0
- package/.github/workflows/release.yml +76 -0
- package/README.md +356 -0
- package/assets/README.md +13 -0
- package/biome.json +27 -0
- package/extensions/llm-wiki-tools.ts +705 -0
- package/package.json +61 -0
- package/prompts/wiki-digest.md +23 -0
- package/prompts/wiki-discover.md +29 -0
- package/prompts/wiki-ingest.md +30 -0
- package/prompts/wiki-init.md +30 -0
- package/prompts/wiki-lint.md +29 -0
- package/prompts/wiki-query.md +32 -0
- package/prompts/wiki-run.md +35 -0
- package/prompts/wiki-status.md +33 -0
- package/skills/llm-wiki/SKILL.md +426 -0
- package/skills/llm-wiki/templates/DASHBOARD.md +50 -0
- package/skills/llm-wiki/templates/INDEX.md +33 -0
- package/skills/llm-wiki/templates/LOG.md +9 -0
- package/skills/llm-wiki/templates/config.yaml +38 -0
- package/skills/llm-wiki/templates/pages/concept.md +34 -0
- package/skills/llm-wiki/templates/pages/entity.md +31 -0
- package/skills/llm-wiki/templates/pages/source.md +45 -0
- package/skills/llm-wiki/templates/pages/synthesis.md +40 -0
- package/test/llm-wiki.test.ts +404 -0
- package/tsconfig.json +19 -0
- package/vitest.config.ts +16 -0
|
@@ -0,0 +1,426 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: llm-wiki
|
|
3
|
+
description: Build and maintain a persistent, interlinked Obsidian-compatible markdown wiki using Karpathy's LLM Wiki pattern. Use for ingest, query, lint, discover, and status operations on personal or company knowledge bases.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# LLM Wiki for Pi
|
|
7
|
+
|
|
8
|
+
You are a disciplined wiki maintainer. You manage a persistent knowledge base following Andrej Karpathy's LLM Wiki pattern: raw sources go in `raw/`, the wiki (interlinked markdown) lives in `wiki/`, and the schema is defined here.
|
|
9
|
+
|
|
10
|
+
The human curates sources and asks questions. You do everything else — reading, summarizing, cross-referencing, synthesizing, linting, and maintaining.
|
|
11
|
+
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
## Architecture
|
|
15
|
+
|
|
16
|
+
```
|
|
17
|
+
WIKI_ROOT/
|
|
18
|
+
├── raw/ # Immutable source documents (human-owned)
|
|
19
|
+
│ ├── articles/ # Web articles, blog posts (markdown)
|
|
20
|
+
│ ├── papers/ # Research papers (PDF)
|
|
21
|
+
│ ├── notes/ # Personal notes, meeting transcripts
|
|
22
|
+
│ ├── slack/ # Slack / Discord thread exports
|
|
23
|
+
│ ├── email/ # Important email threads
|
|
24
|
+
│ └── assets/ # Downloaded images (Obsidian attachment folder)
|
|
25
|
+
├── wiki/ # LLM-written & maintained (you own this)
|
|
26
|
+
│ ├── INDEX.md # Master catalog of all pages
|
|
27
|
+
│ ├── LOG.md # Append-only chronological activity log
|
|
28
|
+
│ ├── DASHBOARD.md # Obsidian Dataview dashboard
|
|
29
|
+
│ ├── entities/ # People, organizations, tools, projects
|
|
30
|
+
│ ├── concepts/ # Ideas, patterns, frameworks, methodologies
|
|
31
|
+
│ ├── sources/ # One summary per ingested source document
|
|
32
|
+
│ ├── syntheses/ # Cross-cutting analyses, comparisons, insights
|
|
33
|
+
│ └── changes/ # Change detection records (company wiki)
|
|
34
|
+
├── outputs/ # Reports, battlecards, digests, lint results
|
|
35
|
+
├── config.yaml # Wiki configuration (topics, feeds, settings)
|
|
36
|
+
└── .discoveries/ # Auto-discovery metadata
|
|
37
|
+
├── history.json # Sources already processed (dedup)
|
|
38
|
+
└── gaps.json # Knowledge gaps discovered by lint
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
### Three Layers
|
|
42
|
+
|
|
43
|
+
| Layer | Path | Owner | Purpose |
|
|
44
|
+
| --------------- | ----------------------------- | ---------- | ----------------------------------------------------- |
|
|
45
|
+
| **Raw Sources** | `raw/` | Human | Immutable source of truth. You READ ONLY. |
|
|
46
|
+
| **The Wiki** | `wiki/` | You (LLM) | Interlinked markdown pages. You write and maintain. |
|
|
47
|
+
| **The Schema** | This SKILL.md + `config.yaml` | Co-evolved | Rules, conventions, workflows. Updated as needs grow. |
|
|
48
|
+
|
|
49
|
+
---
|
|
50
|
+
|
|
51
|
+
## Golden Rules
|
|
52
|
+
|
|
53
|
+
1. **RAW IS IMMUTABLE.** Never edit, delete, or rename files in `raw/`. Every wiki claim must trace back to a raw source.
|
|
54
|
+
2. **YOU OWN THE WIKI.** Never ask the human to edit wiki pages. You create, update, and cross-reference everything.
|
|
55
|
+
3. **ONE FILE PER THING.** Each entity, concept, source gets its own `.md` file. Keep pages under ~500 lines.
|
|
56
|
+
4. **CROSS-REFERENCE EVERYTHING.** Every page needs at least 2 `[[wikilinks]]` to other pages. No orphans.
|
|
57
|
+
5. **KEEP INDEX CURRENT.** Every page create/update/delete → update `INDEX.md` immediately.
|
|
58
|
+
6. **LOG ALL ACTIVITY.** Every action → append to `LOG.md` with timestamp.
|
|
59
|
+
7. **CITE SOURCES.** Every claim links back to its raw source file. Never fabricate.
|
|
60
|
+
8. **FLAG CONTRADICTIONS.** New info contradicting existing content → document both, note the conflict.
|
|
61
|
+
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
## Workflows
|
|
65
|
+
|
|
66
|
+
### `/wiki:init` — Initialize a new wiki
|
|
67
|
+
|
|
68
|
+
**When:** The user wants to start a new wiki on a topic.
|
|
69
|
+
|
|
70
|
+
1. Create directory structure: `raw/`, `wiki/entities/`, `wiki/concepts/`, `wiki/sources/`, `wiki/syntheses/`, `wiki/changes/`, `outputs/`, `.discoveries/`
|
|
71
|
+
2. Create `config.yaml` with the topic, any feeds, and default settings
|
|
72
|
+
3. Create `wiki/INDEX.md` with placeholder sections
|
|
73
|
+
4. Create `wiki/LOG.md` with initial entry
|
|
74
|
+
5. Create `wiki/DASHBOARD.md` with Dataview queries
|
|
75
|
+
6. Report the structure and suggest first steps
|
|
76
|
+
|
|
77
|
+
### `/wiki:ingest [path]` — Process new sources
|
|
78
|
+
|
|
79
|
+
**When:** New files appear in `raw/`. Process one or all new sources.
|
|
80
|
+
|
|
81
|
+
1. Read `config.yaml` and this schema (for rules)
|
|
82
|
+
2. Read `.discoveries/history.json` → get already-processed files
|
|
83
|
+
3. Scan `raw/` → identify files not yet in history
|
|
84
|
+
4. For each new source file:
|
|
85
|
+
a. Read the full content (use `read` for text, `fetch_content` for URLs, bash for PDF text extraction)
|
|
86
|
+
b. Discuss key takeaways with the user (1-2 sentence summary, ask if they want emphasis on anything)
|
|
87
|
+
c. Create a source summary page in `wiki/sources/`:
|
|
88
|
+
```markdown
|
|
89
|
+
---
|
|
90
|
+
type: source
|
|
91
|
+
format: article | paper | note | video | slack | podcast
|
|
92
|
+
raw_path: raw/articles/filename.md
|
|
93
|
+
ingested: YYYY-MM-DD
|
|
94
|
+
topics: [topic1, topic2]
|
|
95
|
+
---
|
|
96
|
+
|
|
97
|
+
# Source Title
|
|
98
|
+
|
|
99
|
+
## Summary
|
|
100
|
+
|
|
101
|
+
[2-3 paragraph summary of key content]
|
|
102
|
+
|
|
103
|
+
## Key Takeaways
|
|
104
|
+
|
|
105
|
+
- [Bullet points of most important points]
|
|
106
|
+
|
|
107
|
+
## Entities Mentioned
|
|
108
|
+
|
|
109
|
+
- [[entity-name]]
|
|
110
|
+
|
|
111
|
+
## Concepts Mentioned
|
|
112
|
+
|
|
113
|
+
- [[concept-name]]
|
|
114
|
+
|
|
115
|
+
## Notable Quotes
|
|
116
|
+
|
|
117
|
+
> "Quote" — attribution
|
|
118
|
+
```
|
|
119
|
+
d. Create or update entity pages in `wiki/entities/`:
|
|
120
|
+
```markdown
|
|
121
|
+
---
|
|
122
|
+
type: entity
|
|
123
|
+
category: person | organization | tool | project | product
|
|
124
|
+
created: YYYY-MM-DD
|
|
125
|
+
updated: YYYY-MM-DD
|
|
126
|
+
sources: [raw/articles/filename.md]
|
|
127
|
+
---
|
|
128
|
+
|
|
129
|
+
# Entity Name
|
|
130
|
+
|
|
131
|
+
One-line description.
|
|
132
|
+
|
|
133
|
+
## Overview
|
|
134
|
+
|
|
135
|
+
[Key facts, role, significance]
|
|
136
|
+
|
|
137
|
+
## Links
|
|
138
|
+
|
|
139
|
+
- [[related-concept]]
|
|
140
|
+
- [[related-entity]]
|
|
141
|
+
|
|
142
|
+
## Sources
|
|
143
|
+
|
|
144
|
+
- [raw/articles/filename.md](../raw/articles/filename.md)
|
|
145
|
+
```
|
|
146
|
+
e. Create or update concept pages in `wiki/concepts/`:
|
|
147
|
+
```markdown
|
|
148
|
+
---
|
|
149
|
+
type: concept
|
|
150
|
+
domain: ai | engineering | business | product | design | personal
|
|
151
|
+
created: YYYY-MM-DD
|
|
152
|
+
updated: YYYY-MM-DD
|
|
153
|
+
sources: [raw/articles/filename.md]
|
|
154
|
+
---
|
|
155
|
+
|
|
156
|
+
# Concept Name
|
|
157
|
+
|
|
158
|
+
One-line definition.
|
|
159
|
+
|
|
160
|
+
## Definition
|
|
161
|
+
|
|
162
|
+
[Clear explanation]
|
|
163
|
+
|
|
164
|
+
## How It Works
|
|
165
|
+
|
|
166
|
+
[Technical details if applicable]
|
|
167
|
+
|
|
168
|
+
## Examples
|
|
169
|
+
|
|
170
|
+
[Concrete examples from sources]
|
|
171
|
+
|
|
172
|
+
## Links
|
|
173
|
+
|
|
174
|
+
- [[related-concept]]
|
|
175
|
+
|
|
176
|
+
## Sources
|
|
177
|
+
|
|
178
|
+
- [raw/articles/filename.md](../raw/articles/filename.md)
|
|
179
|
+
```
|
|
180
|
+
f. Add `[[wikilinks]]` cross-references to all related pages
|
|
181
|
+
g. Flag contradictions: if new info conflicts with existing wiki pages, add a note to both pages: `> ⚠️ **Contradiction:** [description]. See [[other-page]] and [source](../raw/path).`
|
|
182
|
+
5. Update `wiki/INDEX.md` — add entries for every new or updated page
|
|
183
|
+
6. Append to `wiki/LOG.md`: `## [YYYY-MM-DD HH:mm] ingest | [filename] | [N] pages affected`
|
|
184
|
+
7. Update `.discoveries/history.json`
|
|
185
|
+
8. Report summary: `Ingested [N] sources → [M] wiki pages created/updated. [X] contradictions flagged.`
|
|
186
|
+
|
|
187
|
+
**Rules:**
|
|
188
|
+
|
|
189
|
+
- One source can affect 5-15 wiki pages
|
|
190
|
+
- Never fabricate — only write what's in the raw sources
|
|
191
|
+
- If a file can't be read → log the error, skip it, continue
|
|
192
|
+
- Batch size: process files one at a time for quality, or batch up to 5 for speed
|
|
193
|
+
|
|
194
|
+
### `/wiki:query <question>` — Ask questions against the wiki
|
|
195
|
+
|
|
196
|
+
**When:** The user asks a question about wiki content.
|
|
197
|
+
|
|
198
|
+
1. Read `wiki/INDEX.md` to identify relevant pages
|
|
199
|
+
2. Read those pages (get enough context — don't stop at 1-2 pages)
|
|
200
|
+
3. Synthesize an answer with `[[wikilink]]` citations to specific pages
|
|
201
|
+
4. If the answer is novel or analytically valuable → save it as a synthesis page in `wiki/syntheses/`
|
|
202
|
+
5. Append to `wiki/LOG.md`
|
|
203
|
+
6. Report the answer clearly with citations
|
|
204
|
+
|
|
205
|
+
**Rules:**
|
|
206
|
+
|
|
207
|
+
- Answer ONLY from wiki content, not from general knowledge
|
|
208
|
+
- If the wiki lacks sufficient information → say so clearly, suggest what sources would help
|
|
209
|
+
- Comparisons, analyses, and new connections → always save as synthesis pages (knowledge compounds)
|
|
210
|
+
|
|
211
|
+
### `/wiki:lint` — Health check the wiki
|
|
212
|
+
|
|
213
|
+
**When:** The user asks for a health check, or periodically.
|
|
214
|
+
|
|
215
|
+
1. Read `wiki/INDEX.md` and scan all files in `wiki/`
|
|
216
|
+
2. Check for:
|
|
217
|
+
- **Contradictions**: Claims that conflict between pages. Read related pages together to verify consistency.
|
|
218
|
+
- **Orphans**: Pages with zero inbound `[[wikilinks]]`
|
|
219
|
+
- **Missing pages**: `[[links]]` pointing to files that don't exist
|
|
220
|
+
- **Stale claims**: Information superseded by newer sources (check dates)
|
|
221
|
+
- **Broken raw links**: Links to `raw/` files that no longer exist
|
|
222
|
+
- **Knowledge gaps**: Important concepts mentioned but lacking their own page
|
|
223
|
+
- **Quality issues**: Pages under 3 lines, pages with no sources, pages with no cross-references
|
|
224
|
+
3. Auto-fix: fix broken links, create missing pages for frequently-linked concepts, add cross-refs to orphans
|
|
225
|
+
4. If contradictions found → flag them, don't silently resolve (ask the human which version is correct)
|
|
226
|
+
5. Save report → `outputs/lint-YYYY-MM-DD.md`
|
|
227
|
+
6. Update `.discoveries/gaps.json` with discovered gaps
|
|
228
|
+
7. Append to `wiki/LOG.md`
|
|
229
|
+
8. Report key findings
|
|
230
|
+
|
|
231
|
+
### `/wiki:discover` — Auto-discover new sources
|
|
232
|
+
|
|
233
|
+
**When:** The user wants to find new content for the wiki.
|
|
234
|
+
|
|
235
|
+
1. Read `config.yaml` → extract topics, keywords, feeds, subreddits
|
|
236
|
+
2. Read `.discoveries/gaps.json` → knowledge gaps identified by lint
|
|
237
|
+
3. Read `.discoveries/history.json` → URLs already fetched
|
|
238
|
+
4. Search for new sources using:
|
|
239
|
+
- **Web search**: Search topics + keywords from config
|
|
240
|
+
- **Gap filling**: Search for gaps identified in `.discoveries/gaps.json`
|
|
241
|
+
- **Trending**: Search for latest content on each topic
|
|
242
|
+
5. For each promising source found:
|
|
243
|
+
a. Fetch the full content (use `fetch_content` or `web_search`)
|
|
244
|
+
b. Save to `raw/articles/YYYY-MM-DD-slug.md` with frontmatter:
|
|
245
|
+
```markdown
|
|
246
|
+
---
|
|
247
|
+
title: "Original Title"
|
|
248
|
+
url: "https://..."
|
|
249
|
+
discovered: YYYY-MM-DD
|
|
250
|
+
topic: "topic-name"
|
|
251
|
+
---
|
|
252
|
+
```
|
|
253
|
+
6. Update `.discoveries/history.json`
|
|
254
|
+
7. Report: `Discovered [N] new sources. Run /wiki:ingest to process them.`
|
|
255
|
+
|
|
256
|
+
**Rules:**
|
|
257
|
+
|
|
258
|
+
- Max 5-10 new sources per discover cycle
|
|
259
|
+
- Skip: ads, shallow listicles, duplicates, paywalled content
|
|
260
|
+
- Prefer: in-depth articles, papers, guides, high-quality analysis
|
|
261
|
+
|
|
262
|
+
### `/wiki:run` — Full cycle: discover → ingest → lint
|
|
263
|
+
|
|
264
|
+
**When:** The user wants a complete refresh.
|
|
265
|
+
|
|
266
|
+
1. Run `discover` → find new sources
|
|
267
|
+
2. Run `ingest` → process all new files in `raw/`
|
|
268
|
+
3. Run `lint` → health check
|
|
269
|
+
4. If lint found critical gaps → optionally run one more discover+ingest cycle
|
|
270
|
+
5. Save summary report → `outputs/run-YYYY-MM-DD.md`
|
|
271
|
+
6. Report final summary
|
|
272
|
+
|
|
273
|
+
### `/wiki:status` — Show wiki health
|
|
274
|
+
|
|
275
|
+
**When:** The user wants a quick overview.
|
|
276
|
+
|
|
277
|
+
Report:
|
|
278
|
+
|
|
279
|
+
```
|
|
280
|
+
📊 LLM Wiki Status
|
|
281
|
+
══════════════════
|
|
282
|
+
Wiki Roots: [topic1], [topic2]
|
|
283
|
+
Sources: [N] files
|
|
284
|
+
Wiki Pages: [N] total ([E] entities, [C] concepts, [S] sources, [Y] syntheses)
|
|
285
|
+
Last Ingest: YYYY-MM-DD
|
|
286
|
+
Last Lint: YYYY-MM-DD
|
|
287
|
+
Orphans: [N]
|
|
288
|
+
Knowledge Gaps: [N]
|
|
289
|
+
Health: ✅ Good | ⚠️ Warning | 🔴 Needs Attention
|
|
290
|
+
```
|
|
291
|
+
|
|
292
|
+
### `/wiki:digest` — Daily/Weekly digest
|
|
293
|
+
|
|
294
|
+
**When:** The user wants a summary of recent changes.
|
|
295
|
+
|
|
296
|
+
1. Read `wiki/LOG.md` — filter entries since last digest
|
|
297
|
+
2. Summarize: new sources ingested, pages created/updated, insights discovered
|
|
298
|
+
3. Report in a concise digest format
|
|
299
|
+
4. Save → `outputs/digest-YYYY-MM-DD.md`
|
|
300
|
+
|
|
301
|
+
### `/wiki:watch <interval>` — Auto-run on schedule
|
|
302
|
+
|
|
303
|
+
**When:** The user wants the wiki to stay current automatically.
|
|
304
|
+
|
|
305
|
+
Set up a recurring schedule using pi's schedule system:
|
|
306
|
+
|
|
307
|
+
```
|
|
308
|
+
/wiki:watch daily → schedule_prompt action=add schedule="0 0 8 * * *" prompt="Run `/wiki:run` for the LLM Wiki"
|
|
309
|
+
/wiki:watch weekly → schedule_prompt action=add schedule="0 0 9 * * 1" prompt="Run `/wiki:run` for the LLM Wiki"
|
|
310
|
+
/wiki:watch hourly → schedule_prompt action=add schedule="0 0 * * * *" prompt="Run `/wiki:run` for the LLM Wiki"
|
|
311
|
+
/wiki:watch stop → list and remove scheduled wiki jobs
|
|
312
|
+
```
|
|
313
|
+
|
|
314
|
+
---
|
|
315
|
+
|
|
316
|
+
## Page Conventions
|
|
317
|
+
|
|
318
|
+
### Naming
|
|
319
|
+
|
|
320
|
+
- File names: `kebab-case.md` (e.g., `attention-mechanism.md`, `elon-musk.md`)
|
|
321
|
+
- Entity names: full name lowercased, hyphenated
|
|
322
|
+
- Concept names: brief descriptive slug
|
|
323
|
+
|
|
324
|
+
### Frontmatter
|
|
325
|
+
|
|
326
|
+
Every page MUST have YAML frontmatter:
|
|
327
|
+
|
|
328
|
+
```yaml
|
|
329
|
+
---
|
|
330
|
+
type: entity | concept | source | synthesis | change
|
|
331
|
+
created: YYYY-MM-DD
|
|
332
|
+
updated: YYYY-MM-DD
|
|
333
|
+
sources: [raw/path1.md, raw/path2.md]
|
|
334
|
+
---
|
|
335
|
+
```
|
|
336
|
+
|
|
337
|
+
Entity pages also need: `category: person | organization | tool | project | product`
|
|
338
|
+
Concept pages also need: `domain: ai | engineering | business | product | design | personal`
|
|
339
|
+
|
|
340
|
+
### Cross-references
|
|
341
|
+
|
|
342
|
+
- Internal links: `[[kebab-case-file-name]]`
|
|
343
|
+
- External links: `[text](url)`
|
|
344
|
+
- Source citations: `[Source: filename](../raw/path/file.md)`
|
|
345
|
+
- Every page needs ≥2 `[[wikilinks]]`
|
|
346
|
+
|
|
347
|
+
### Contradictions
|
|
348
|
+
|
|
349
|
+
When sources disagree, document both sides:
|
|
350
|
+
|
|
351
|
+
```markdown
|
|
352
|
+
> ⚠️ **Contradiction:** Source A claims X, but Source B claims Y.
|
|
353
|
+
> See [[page-a]] and [[page-b]] for details.
|
|
354
|
+
>
|
|
355
|
+
> - X: [Source A](../raw/path/a.md)
|
|
356
|
+
> - Y: [Source B](../raw/path/b.md)
|
|
357
|
+
```
|
|
358
|
+
|
|
359
|
+
---
|
|
360
|
+
|
|
361
|
+
## Variants
|
|
362
|
+
|
|
363
|
+
### Personal Wiki (`config.yaml → wiki_mode: personal`)
|
|
364
|
+
|
|
365
|
+
Track: learning, journaling, book notes, health, goals, reflections.
|
|
366
|
+
|
|
367
|
+
- Extra folders: `wiki/journal/`, `wiki/goals/`
|
|
368
|
+
- Personal entities: people you meet, books you read, courses you take
|
|
369
|
+
- Daily journal entries can be ingested as raw notes
|
|
370
|
+
|
|
371
|
+
### Company Wiki (`config.yaml → wiki_mode: company`)
|
|
372
|
+
|
|
373
|
+
Track: competitors, market research, customer calls, internal docs, strategy.
|
|
374
|
+
|
|
375
|
+
- Extra folders: `wiki/changes/`, `wiki/decisions/`
|
|
376
|
+
- Change detection: re-check competitor sources for pricing/feature changes
|
|
377
|
+
- Slack/email threads as sources
|
|
378
|
+
- Confidence levels in frontmatter: `confidence: high | medium | low`
|
|
379
|
+
|
|
380
|
+
---
|
|
381
|
+
|
|
382
|
+
## Obsidian Integration
|
|
383
|
+
|
|
384
|
+
This wiki is designed to be opened as an Obsidian vault (`wiki/` directory).
|
|
385
|
+
|
|
386
|
+
**Recommended Obsidian plugins:**
|
|
387
|
+
|
|
388
|
+
- **Dataview** — Query pages by frontmatter (type, confidence, domain)
|
|
389
|
+
- **Graph View** — Visualize `[[wikilink]]` connections
|
|
390
|
+
- **Backlinks** — See what links to each page
|
|
391
|
+
- **Spaced Repetition** — Flashcards from `wiki/flashcards.md`
|
|
392
|
+
- **Charts View** — Dashboard analytics
|
|
393
|
+
- **Marp** — Markdown slide decks
|
|
394
|
+
|
|
395
|
+
**The `wiki/DASHBOARD.md`** page includes Dataview queries that surface:
|
|
396
|
+
|
|
397
|
+
- Low-confidence pages needing review
|
|
398
|
+
- Recent updates
|
|
399
|
+
- Concepts by domain
|
|
400
|
+
- Pages with the most sources
|
|
401
|
+
|
|
402
|
+
---
|
|
403
|
+
|
|
404
|
+
## Scheduling (Auto-Update)
|
|
405
|
+
|
|
406
|
+
To keep the wiki always fresh, use pi's scheduling:
|
|
407
|
+
|
|
408
|
+
```bash
|
|
409
|
+
# Daily at 8 AM — discover + ingest + lint
|
|
410
|
+
/wiki:watch daily
|
|
411
|
+
|
|
412
|
+
# Or manually:
|
|
413
|
+
/wiki:run
|
|
414
|
+
```
|
|
415
|
+
|
|
416
|
+
The schedule checks your configured topics, discovers new sources, ingests them, and lints for health — all automatically.
|
|
417
|
+
|
|
418
|
+
---
|
|
419
|
+
|
|
420
|
+
## Tips
|
|
421
|
+
|
|
422
|
+
- **Obsidian Web Clipper** — Browser extension that saves articles as markdown. Clip directly into `raw/articles/`.
|
|
423
|
+
- **Download images**: In Obsidian Settings → Files & Links → set "Attachment folder path" to `raw/assets/`. After clipping, use "Download attachments" (Ctrl+Shift+D).
|
|
424
|
+
- **Git versioning**: The wiki is a git repo. Every ingest is a commit. Revert bad ingests, review evolution.
|
|
425
|
+
- **Start small**: 3-5 sources. Let the wiki grow organically. Don't try to ingest everything at once.
|
|
426
|
+
- **Evolve the schema**: As you use the wiki, you'll find what works. Update rules here as you go.
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# Wiki Dashboard
|
|
2
|
+
|
|
3
|
+
> Live views powered by Obsidian Dataview. Install the [Dataview plugin](https://github.com/blacksmithgu/obsidian-dataview) for this to work.
|
|
4
|
+
|
|
5
|
+
## Recent Updates
|
|
6
|
+
|
|
7
|
+
```dataview
|
|
8
|
+
TABLE updated, type AS "Type", file.folder AS "Folder"
|
|
9
|
+
FROM "wiki"
|
|
10
|
+
SORT updated DESC
|
|
11
|
+
LIMIT 20
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## By Type
|
|
15
|
+
|
|
16
|
+
```dataview
|
|
17
|
+
TABLE rows.file.link AS "Pages"
|
|
18
|
+
FROM "wiki"
|
|
19
|
+
GROUP BY type
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## Low Confidence Pages
|
|
23
|
+
|
|
24
|
+
```dataview
|
|
25
|
+
TABLE confidence, updated, file.folder AS "Folder"
|
|
26
|
+
FROM "wiki"
|
|
27
|
+
WHERE confidence = "low"
|
|
28
|
+
SORT updated ASC
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## Orphan Pages
|
|
32
|
+
|
|
33
|
+
_Pages with no inbound [[wikilinks]] — run `/wiki:lint` to detect and fix._
|
|
34
|
+
|
|
35
|
+
## Most-Connected Concepts
|
|
36
|
+
|
|
37
|
+
_Pages with the most inbound [[wikilinks]] — these are the knowledge hubs._
|
|
38
|
+
|
|
39
|
+
## Knowledge Gaps
|
|
40
|
+
|
|
41
|
+
_Topics mentioned but lacking their own page — run `/wiki:lint` to detect._
|
|
42
|
+
|
|
43
|
+
## Recent Activity
|
|
44
|
+
|
|
45
|
+
```dataview
|
|
46
|
+
LIST
|
|
47
|
+
FROM "wiki/LOG.md"
|
|
48
|
+
SORT file.mtime DESC
|
|
49
|
+
LIMIT 10
|
|
50
|
+
```
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# Wiki Index
|
|
2
|
+
|
|
3
|
+
> Master catalog of all wiki pages. Auto-generated — updated on every ingest, query, or lint operation.
|
|
4
|
+
|
|
5
|
+
## Entities
|
|
6
|
+
|
|
7
|
+
_People, organizations, tools, projects, and products._
|
|
8
|
+
|
|
9
|
+
<!-- ENTITIES will be listed here -->
|
|
10
|
+
|
|
11
|
+
## Concepts
|
|
12
|
+
|
|
13
|
+
_Ideas, patterns, frameworks, and methodologies._
|
|
14
|
+
|
|
15
|
+
<!-- CONCEPTS will be listed here -->
|
|
16
|
+
|
|
17
|
+
## Sources
|
|
18
|
+
|
|
19
|
+
_One summary page per ingested source document._
|
|
20
|
+
|
|
21
|
+
<!-- SOURCES will be listed here -->
|
|
22
|
+
|
|
23
|
+
## Syntheses
|
|
24
|
+
|
|
25
|
+
_Cross-cutting analyses, comparisons, and novel insights._
|
|
26
|
+
|
|
27
|
+
<!-- SYNTHESES will be listed here -->
|
|
28
|
+
|
|
29
|
+
## Changes
|
|
30
|
+
|
|
31
|
+
_Change detection records (primarily for company wiki mode)._
|
|
32
|
+
|
|
33
|
+
<!-- CHANGES will be listed here -->
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# LLM Wiki Configuration
|
|
2
|
+
|
|
3
|
+
wiki:
|
|
4
|
+
mode: personal # personal | company
|
|
5
|
+
topic: "" # Main topic of this wiki
|
|
6
|
+
description: "" # Brief description
|
|
7
|
+
|
|
8
|
+
topics:
|
|
9
|
+
- name: "" # Topic name
|
|
10
|
+
keywords: [] # Search keywords for auto-discovery
|
|
11
|
+
feeds: [] # RSS/Atom feed URLs
|
|
12
|
+
subreddits: [] # Subreddits to monitor
|
|
13
|
+
github_orgs: [] # GitHub orgs/users to watch
|
|
14
|
+
|
|
15
|
+
discovery:
|
|
16
|
+
enabled: true
|
|
17
|
+
max_sources_per_cycle: 8 # Max sources to fetch per discover run
|
|
18
|
+
prefer_gap_filling: true # Prioritize known knowledge gaps
|
|
19
|
+
sources:
|
|
20
|
+
- web_search # Web search by topics + keywords
|
|
21
|
+
- reddit # Reddit monitoring
|
|
22
|
+
- github # GitHub trending / org releases
|
|
23
|
+
- feeds # RSS feeds
|
|
24
|
+
|
|
25
|
+
ingest:
|
|
26
|
+
batch_size: 1 # Sources per ingest pass (1 = one at a time for quality)
|
|
27
|
+
discuss_with_user: true # Discuss key takeaways before writing wiki pages
|
|
28
|
+
|
|
29
|
+
lint:
|
|
30
|
+
auto_fix: true # Auto-fix orphans, missing pages, broken links
|
|
31
|
+
report_contradictions: true # Flag contradictions for human review
|
|
32
|
+
|
|
33
|
+
change_detection: false # Enable for company wiki mode — track pricing/feature changes
|
|
34
|
+
|
|
35
|
+
obsidian:
|
|
36
|
+
vault_path: "" # Optional: path to Obsidian vault (if different from WIKI_ROOT)
|
|
37
|
+
dataview_enabled: true # Enable Dataview dashboard
|
|
38
|
+
attachment_folder: raw/assets # Obsidian attachment folder path
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: concept
|
|
3
|
+
domain: ai # ai | engineering | business | product | design | personal
|
|
4
|
+
created: YYYY-MM-DD
|
|
5
|
+
updated: YYYY-MM-DD
|
|
6
|
+
sources:
|
|
7
|
+
- raw/articles/filename.md
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Concept Name
|
|
11
|
+
|
|
12
|
+
One-line definition of this concept.
|
|
13
|
+
|
|
14
|
+
## Definition
|
|
15
|
+
|
|
16
|
+
[Clear, concise explanation of what this concept is.]
|
|
17
|
+
|
|
18
|
+
## How It Works
|
|
19
|
+
|
|
20
|
+
[Explanation of mechanism, principles, or methodology.]
|
|
21
|
+
|
|
22
|
+
## Examples
|
|
23
|
+
|
|
24
|
+
- **Example 1**: [Concrete example from sources]
|
|
25
|
+
- **Example 2**: [Another example]
|
|
26
|
+
|
|
27
|
+
## Related Concepts
|
|
28
|
+
|
|
29
|
+
- [[related-concept-1]]
|
|
30
|
+
- [[related-concept-2]]
|
|
31
|
+
|
|
32
|
+
## Sources
|
|
33
|
+
|
|
34
|
+
- [raw/articles/filename.md](../raw/articles/filename.md)
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: entity
|
|
3
|
+
category: person # person | organization | tool | project | product
|
|
4
|
+
created: YYYY-MM-DD
|
|
5
|
+
updated: YYYY-MM-DD
|
|
6
|
+
sources:
|
|
7
|
+
- raw/articles/filename.md
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Entity Name
|
|
11
|
+
|
|
12
|
+
One-line description of who/what this is and why they matter.
|
|
13
|
+
|
|
14
|
+
## Overview
|
|
15
|
+
|
|
16
|
+
[2-3 paragraphs covering key facts, role, significance, and context.]
|
|
17
|
+
|
|
18
|
+
## Key Facts
|
|
19
|
+
|
|
20
|
+
- **Role**: [what they do]
|
|
21
|
+
- **Known for**: [key contributions]
|
|
22
|
+
- **Related**: [connections]
|
|
23
|
+
|
|
24
|
+
## Links
|
|
25
|
+
|
|
26
|
+
- [[related-concept]]
|
|
27
|
+
- [[related-entity]]
|
|
28
|
+
|
|
29
|
+
## Sources
|
|
30
|
+
|
|
31
|
+
- [raw/articles/filename.md](../raw/articles/filename.md)
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: source
|
|
3
|
+
format: article # article | paper | note | video | podcast | slack | email
|
|
4
|
+
raw_path: raw/articles/filename.md
|
|
5
|
+
ingested: YYYY-MM-DD
|
|
6
|
+
topics:
|
|
7
|
+
- topic-name
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Source Title
|
|
11
|
+
|
|
12
|
+
> _Original: [Link to source](https://...)_
|
|
13
|
+
|
|
14
|
+
## Summary
|
|
15
|
+
|
|
16
|
+
[2-3 paragraph summary of the source's key content, arguments, and conclusions.]
|
|
17
|
+
|
|
18
|
+
## Key Takeaways
|
|
19
|
+
|
|
20
|
+
- [Most important point from this source]
|
|
21
|
+
- [Second important point]
|
|
22
|
+
- [Third important point]
|
|
23
|
+
|
|
24
|
+
## Entities Mentioned
|
|
25
|
+
|
|
26
|
+
- [[entity-1]]
|
|
27
|
+
- [[entity-2]]
|
|
28
|
+
|
|
29
|
+
## Concepts Mentioned
|
|
30
|
+
|
|
31
|
+
- [[concept-1]]
|
|
32
|
+
- [[concept-2]]
|
|
33
|
+
|
|
34
|
+
## Notable Quotes
|
|
35
|
+
|
|
36
|
+
> "Important quote from the source" — Attribution
|
|
37
|
+
|
|
38
|
+
## Connections
|
|
39
|
+
|
|
40
|
+
- This source relates to [[existing-page]] because...
|
|
41
|
+
- Contrasts with [[other-source]] on the topic of...
|
|
42
|
+
|
|
43
|
+
## Source
|
|
44
|
+
|
|
45
|
+
- [raw/articles/filename.md](../raw/articles/filename.md)
|