@zosmaai/pi-llm-wiki 0.5.0 → 0.6.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.
@@ -11,26 +11,28 @@ You are a disciplined wiki maintainer. The extension handles all mechanical work
11
11
 
12
12
  ```
13
13
  WIKI_ROOT/
14
- ├── raw/sources/SRC-*/ # Immutable source packets (extension-owned)
15
- ├── manifest.json
16
- ├── original/
17
- ├── extracted.md
18
- └── attachments/
19
- ├── wiki/ # Editable knowledge pages (you own this)
20
- │ ├── sources/ # One summary per source
21
- ├── entities/ # People, orgs, tools, products
22
- ├── concepts/ # Ideas, patterns, frameworks
23
- │ ├── syntheses/ # Cross-cutting analyses
24
- └── analyses/ # Durable query answers
25
- ├── meta/ # Auto-generated (extension-owned)
26
- │ ├── registry.json # Master page catalog
27
- ├── backlinks.json # Inbound link map
28
- ├── index.md # Human-readable catalog
29
- │ ├── log.md # Activity log
30
- └── events.jsonl # Structured event stream
31
- └── .wiki/ # Config and templates
32
- ├── config.json
33
- └── templates/
14
+ └── .llm-wiki/ # All wiki content (one dot-dir)
15
+ ├── config.json # Vault config
16
+ ├── templates/ # Page templates
17
+ ├── raw/sources/SRC-*/ # Immutable source packets (extension-owned)
18
+ ├── manifest.json
19
+ ├── original/
20
+ │ ├── extracted.md
21
+ └── attachments/
22
+ ├── wiki/ # Editable knowledge pages (you own this)
23
+ │ ├── sources/ # One summary per source
24
+ ├── entities/ # People, orgs, tools, products
25
+ ├── concepts/ # Ideas, patterns, frameworks
26
+ │ ├── syntheses/ # Cross-cutting analyses
27
+ └── analyses/ # Durable query answers
28
+ ├── meta/ # Auto-generated (extension-owned)
29
+ │ ├── registry.json # Master page catalog
30
+ ├── backlinks.json # Inbound link map
31
+ │ ├── index.md # Human-readable catalog
32
+ ├── log.md # Activity log
33
+ └── events.jsonl # Structured event stream
34
+ ├── outputs/ # Generated artifacts
35
+ └── .discoveries/ # Discovery tracking
34
36
  ```
35
37
 
36
38
  ## Golden Rules
@@ -45,21 +47,48 @@ WIKI_ROOT/
45
47
 
46
48
  ## How the Extension Helps You
47
49
 
48
- | Task | Before (skill-only) | Now (extension-backed) |
49
- | ------------------ | ---------------------------- | ------------------------------------- |
50
- | Track ingestion | Manual `history.json` | Automatic via `meta/registry.json` |
51
- | Update INDEX | Manual edit after every page | Auto-rebuilds on turn end |
52
- | Update LOG | Manual append | Auto-generated from `events.jsonl` |
53
- | Find orphans | Shell `grep` scans | Instant from `backlinks.json` |
54
- | Block raw edits | Skill says "don't" | Extension **enforces** immutability |
55
- | Create source page | 8 tool calls | `wiki_capture_source` + LLM synthesis |
50
+ | Task | Before (skill-only) | Now (extension-backed) |
51
+ | --------------------------- | ---------------------------- | ------------------------------------- |
52
+ | Track ingestion | Manual `history.json` | Automatic via `meta/registry.json` |
53
+ | Update INDEX | Manual edit after every page | Auto-rebuilds on turn end |
54
+ | Update LOG | Manual append | Auto-generated from `events.jsonl` |
55
+ | Find orphans | Shell `grep` scans | Instant from `backlinks.json` |
56
+ | Block raw edits | Skill says "don't" | Extension **enforces** immutability |
57
+ | Create source page | 8 tool calls | `wiki_capture_source` + LLM synthesis |
58
+ | **Recall wiki knowledge** | Never happens | **Auto-search before every turn** |
59
+ | **Save task insights** | Manual capture | `wiki_retro` — one tool call |
60
+
61
+ ## 🔄 Auto-Recall (New)
62
+
63
+ **The extension now automatically searches the wiki before every user turn.**
64
+
65
+ When you send a prompt, the extension:
66
+ 1. Extracts key terms from your request
67
+ 2. Searches the wiki registry for matching pages
68
+ 3. Injects matching page titles + summaries into context
69
+ 4. You see this as "Relevant Wiki Knowledge" in your system prompt
70
+
71
+ **This means the wiki works as an automatic second brain.**
72
+ You don't need to remember to search — relevant knowledge is surfaced automatically.
73
+
74
+ ### Manual recall for deeper searches
75
+
76
+ If the auto-recall doesn't find enough context, call `wiki_recall` explicitly:
77
+
78
+ ```
79
+ wiki_recall(query="specific terms...", max_results=10)
80
+ ```
81
+
82
+ This gives you more control over the search terms and returns content previews.
56
83
 
57
84
  ## Available Tools
58
85
 
59
- Use these directly — they handle scaffolding and bookkeeping:
86
+ Use these directly — they handle scaffolding, bookkeeping, recall, and capture:
60
87
 
61
88
  - `wiki_bootstrap` — Initialize a new vault
62
89
  - `wiki_capture_source` — Capture URL/file/text into immutable packet + skeleton page
90
+ - `wiki_recall` — **Auto-called at turn start.** Search wiki for task-relevant pages
91
+ - `wiki_retro` — Save an atomic insight from a completed task into the wiki
63
92
  - `wiki_ingest` — Get batch of uningested sources with extracted text
64
93
  - `wiki_ensure_page` — Create entity/concept/synthesis/analysis page from template
65
94
  - `wiki_search` — Search registry for existing pages
@@ -83,12 +112,20 @@ Use these directly — they handle scaffolding and bookkeeping:
83
112
 
84
113
  ### Query → Answer → File
85
114
 
86
- 1. `wiki_search(query="...")` to find relevant pages
115
+ 1. **Auto-recall**: Extension surfaces relevant wiki pages automatically
87
116
  2. Read those pages
88
117
  3. Synthesize answer with `[[wikilink]]` citations
89
118
  4. If novel: create analysis page via `wiki_ensure_page(type="analysis")`
90
119
  5. Extension auto-updates metadata
91
120
 
121
+ ### Task → Capture → Retro
122
+
123
+ 1. Complete a meaningful task
124
+ 2. Call `wiki_retro` to save key insights
125
+ 3. The insight is captured as a source packet
126
+ 4. Extension auto-updates metadata
127
+ 5. Next time, auto-recall surfaces your saved insight
128
+
92
129
  ## Page Conventions
93
130
 
94
131
  ### Naming
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  type: source
3
3
  format: article # article | paper | note | video | podcast | slack | email
4
- raw_path: raw/articles/filename.md
4
+ raw_path: .llm-wiki/raw/articles/filename.md
5
5
  ingested: YYYY-MM-DD
6
6
  topics:
7
7
  - topic-name
@@ -42,4 +42,4 @@ topics:
42
42
 
43
43
  ## Source
44
44
 
45
- - [raw/articles/filename.md](../raw/articles/filename.md)
45
+ - [.llm-wiki/raw/articles/filename.md](../.llm-wiki/raw/articles/filename.md)