lumina-wiki 1.7.2 → 1.7.3

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/CHANGELOG.md CHANGED
@@ -5,6 +5,32 @@ Format follows [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
5
5
 
6
6
  ## [Unreleased]
7
7
 
8
+ ## [1.7.3] - 2026-07-05
9
+
10
+ ### Fixed
11
+
12
+ - `/lumi-ask` was missing `Write` in `allowed-tools`, so Step 6 ("file the
13
+ answer as an output page") could not actually create the page.
14
+ - `/lumi-ask` Step 6 filed a new `outputs/`/`summary/` page without adding it
15
+ to `wiki/index.md`, leaving a stale-index warning (L09) after every filed
16
+ answer.
17
+ - `/lumi-ask` subgraph traversal (Step 3) could silently miss half of a
18
+ symmetric edge (`related_to`/`same_problem_as`/`appears_with`): these are
19
+ stored once with sorted endpoints, so a page whose slug sorts later only
20
+ ever saw the edge under `inbound`, never `outbound`.
21
+
22
+ ### Added
23
+
24
+ - `/lumi-ask` now lists the matching `raw/sources/` filenames (names only,
25
+ contents unread) when a question can't be answered from the wiki, so the
26
+ user can open them directly instead of only being pointed at
27
+ `/lumi-ingest`.
28
+ - `/lumi-ask` confidence calibration now reads each cited page's
29
+ `confidence` and `verify_status` frontmatter and downgrades or flags the
30
+ answer when a source is `low`/`unverified` confidence or has
31
+ `findings_pending`/`drift_detected` verify status, suggesting
32
+ `/lumi-verify <slug>`.
33
+
8
34
  ## [1.7.2] - 2026-07-05
9
35
 
10
36
  ### Fixed
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package.json",
3
3
  "name": "lumina-wiki",
4
- "version": "1.7.2",
4
+ "version": "1.7.3",
5
5
  "description": "Domain-agnostic, multi-IDE wiki scaffolder — Karpathy's LLM-Wiki vision, cross-platform and pack-based.",
6
6
  "keywords": [
7
7
  "llm-wiki",
@@ -1,20 +1,21 @@
1
1
  ---
2
2
  name: lumi-ask
3
3
  description: >
4
- Answer questions by traversing the wiki graph: pull a relevant subgraph,
5
- synthesize a cited answer, and optionally file it as an output page.
6
- Read-only by default no raw source re-derivation, no wiki mutations without
7
- explicit user confirmation.
4
+ Answer questions from what the wiki already knows, citing the wiki pages
5
+ behind every claim so the user can open and verify them. Reads only never
6
+ changes the wiki unless the user explicitly asks to save the answer as a page.
8
7
  Use this whenever the user asks a question whose answer should come from the
9
8
  wiki — even if they don't say "ask". Also fires for: "what does the wiki say
10
9
  about X", "compare X and Y from what we've ingested", "summarize the wiki's
11
10
  coverage of X", "what concepts relate to Y", "find all sources that mention Z",
12
11
  "what have we learned about X", or any synthesis or retrieval request over
13
12
  accumulated wiki content. If a question could be answered from raw/ but isn't
14
- in the wiki yet, surface the gap and suggest /lumi-ingest instead of reading raw/.
13
+ in the wiki yet, surface the gap, list the matching raw/ files so the user
14
+ can open them directly, and suggest /lumi-ingest instead of reading raw/.
15
15
  allowed-tools:
16
16
  - Bash
17
17
  - Read
18
+ - Write
18
19
  ---
19
20
 
20
21
  # /lumi-ask
@@ -41,6 +42,9 @@ Key workspace paths:
41
42
  - `wiki/log.md` — tells you what was recently ingested
42
43
  - `_lumina/scripts/wiki.mjs` — read-only subcommands: list-entities, read-meta,
43
44
  read-edges, read-citations
45
+ - On large wikis, narrow output: `read-edges <slug> --type <edge-type>` or
46
+ `--direction outbound|inbound`; `list-entities <dir-prefix>` (for example
47
+ `list-entities concepts`) limits the scan to one directory
44
48
 
45
49
  ## Instructions
46
50
 
@@ -57,10 +61,8 @@ before reading.
57
61
 
58
62
  ### Step 2 — Read the index and log
59
63
 
60
- ```bash
61
- # Read wiki/index.md for the catalog
62
- # Read the last 20 lines of wiki/log.md for recent activity
63
- ```
64
+ - Read `wiki/index.md` for the catalog of existing pages
65
+ - Read the tail of `wiki/log.md` for recent activity
64
66
 
65
67
  Use the Read tool. Do not shell out for these — they are markdown files you can
66
68
  read directly.
@@ -89,6 +91,12 @@ entry has `{ from, type, to, confidence }`. Follow edges to discover connected
89
91
  pages. Stop expanding when the subgraph covers the question adequately or when
90
92
  further pages do not add new information.
91
93
 
94
+ Note on symmetric edges: `related_to`, `same_problem_as`, and `appears_with`
95
+ are stored once with endpoints sorted alphabetically. A page whose slug sorts
96
+ later sees such an edge only under `inbound`, never `outbound`. Always scan
97
+ both `outbound` and `inbound` when collecting a page's neighbors, or
98
+ connections will be missed.
99
+
92
100
  Read the full page body (not just frontmatter) for each page in the subgraph.
93
101
  Use the Read tool with the `filePath` from `read-meta`.
94
102
 
@@ -110,6 +118,14 @@ Confidence calibration:
110
118
  - Low confidence: state explicitly; link the relevant source page rather than
111
119
  asserting the claim directly
112
120
 
121
+ Per-page trust signals: source pages may carry `confidence`
122
+ (high|medium|low|unverified) and `verify_status`
123
+ (passed|findings_pending|drift_detected|skipped|not_applicable) in
124
+ frontmatter — `read-meta` returns both. Downgrade by one level any claim
125
+ that rests on a page with `confidence: low` or `unverified`, or
126
+ `verify_status: findings_pending` or `drift_detected`, and say so in the
127
+ answer. Suggest `/lumi-verify <slug>` for such pages.
128
+
113
129
  Never answer from training data when the wiki has a contradicting page. The wiki
114
130
  is the ground truth for this workspace.
115
131
 
@@ -118,10 +134,16 @@ is the ground truth for this workspace.
118
134
  If the question cannot be fully answered from the wiki:
119
135
 
120
136
  1. State what part is covered and what is missing
121
- 2. Identify which `raw/sources/` files (if any) are likely to contain the answer
122
- 3. Suggest: "To fill this gap, run `/lumi-ingest raw/sources/<file>`"
137
+ 2. List the raw source files by name only `ls raw/sources/` via Bash. Never
138
+ read file contents in this step.
139
+ 3. Pick the files whose names plausibly match the question keywords and show
140
+ them as paths the user can open directly
141
+ 4. Suggest: "To fill this gap, run `/lumi-ingest raw/sources/<file>`"
142
+ 5. If nothing in `raw/sources/` matches, say so — the user may need to add a
143
+ source file first
123
144
 
124
- Do not ingest the file yourself. The user decides whether to proceed.
145
+ Do not read or ingest the raw files yourself. The user decides whether to
146
+ open them directly or ingest them into the wiki.
125
147
 
126
148
  ### Step 6 — Optionally file as an output page
127
149
 
@@ -134,8 +156,11 @@ node _lumina/scripts/wiki.mjs read-meta outputs/<slug>
134
156
  ```
135
157
 
136
158
  Exit 0 means the page exists. If it does, ask the user whether to overwrite
137
- it or pick a new slug — do not silently overwrite. Exit 2 ("Entity not
138
- found") means the slug is free; proceed.
159
+ it or pick a new slug — do not silently overwrite. On exit 2, check the
160
+ stderr message: `Entity not found` means the slug is free proceed. Any
161
+ other exit-2 message (for example `Unsafe slug` or a missing `wiki/`
162
+ directory) means something else is wrong — stop and fix that first; do not
163
+ treat it as a free slug.
139
164
 
140
165
  Ask for confirmation before writing. Then write
141
166
  `wiki/outputs/<slug>.md` or `wiki/summary/<slug>.md` with:
@@ -160,6 +185,11 @@ node _lumina/scripts/wiki.mjs add-edge sources/<slug> produced outputs/<answer-s
160
185
  (The `produced` edge type is terminal — `outputs/**` is exempt from requiring a
161
186
  reverse, per README.md Cross-Reference Rules.)
162
187
 
188
+ Update `wiki/index.md`: add one line for the new page between the
189
+ `<!-- lumina:index -->` and `<!-- /lumina:index -->` markers, matching the
190
+ existing format: `- [[outputs/<slug>]] — <one-line description>`. Every new
191
+ page must be cataloged immediately (lint L09 flags a stale index).
192
+
163
193
  Log the operation:
164
194
  ```bash
165
195
  node _lumina/scripts/wiki.mjs log ask "<question summary> -> outputs/<slug>.md"
@@ -174,8 +204,10 @@ node _lumina/scripts/wiki.mjs log ask "<question summary> -> outputs/<slug>.md"
174
204
  - [[sources/attention-revisited-2026]] — <one-line relevance note>
175
205
  - [[concepts/flash-attention]] — <one-line relevance note>
176
206
 
177
- **Gaps**: The wiki does not yet cover <X>. Suggested next step:
178
- `/lumi-ingest raw/sources/<file>`
207
+ **Gaps**: The wiki does not yet cover <X>.
208
+ Raw documents that may contain the answer — you can open these directly:
209
+ - `raw/sources/<file>`
210
+ To add one to the wiki: `/lumi-ingest raw/sources/<file>`
179
211
  ```
180
212
 
181
213
  If filing as a page, append:
@@ -220,17 +252,20 @@ User: "What does the wiki say about state-space models?"
220
252
  Gap case — question the wiki cannot yet answer:
221
253
  Search `list-entities` and index.md for "state-space", "SSM", "Mamba". If no
222
254
  pages match, state the gap clearly: "The wiki does not yet have coverage of
223
- state-space models." Check if `raw/sources/` has a relevant file (Read tool,
224
- directory listing). If found, suggest: "Run `/lumi-ingest raw/sources/mamba-2023.pdf`
225
- to add this topic." Do not read the raw file yourself to answer the question.
255
+ state-space models." List `raw/sources/` by filename (Bash `ls raw/sources/`
256
+ names only). If a file matches, show it so the user can open it directly, and
257
+ suggest: "Run `/lumi-ingest raw/sources/mamba-2023.pdf` to add this topic."
258
+ Do not read the raw file's contents yourself to answer the question.
226
259
  </example>
227
260
 
228
261
  ## Guardrails
229
262
 
230
263
  - Never write to `wiki/` during the reading phase (Steps 1–5). Mutations only
231
264
  happen in Step 6, with explicit user confirmation.
232
- - Never read files in `raw/` to answer a question. The wiki is the answer surface.
233
- If raw/ would help but wiki/ does not have the answer, propose an ingest instead.
265
+ - Never read the contents of files in `raw/` to answer a question. The wiki is
266
+ the answer surface. Listing `raw/sources/` filenames to point the user at
267
+ candidates is allowed; opening them is not. If raw/ would help but wiki/
268
+ does not have the answer, propose an ingest instead.
234
269
  - Do not fabricate citations. Every claim in the answer must trace to a wiki page
235
270
  the user can open and verify.
236
271
  - If `wiki/index.md` is empty (wiki not yet initialized), stop and ask the user to
@@ -245,3 +280,5 @@ Before reporting done, verify:
245
280
  (c) If a page was filed: the Step 6 existence check (`read-meta outputs/<slug>`)
246
281
  ran before writing, so running `/lumi-ask` again with the same question
247
282
  does not silently create or overwrite a second output page
283
+ (d) If a page was filed: `wiki/index.md` lists the new page between the
284
+ `<!-- lumina:index -->` markers
@@ -189,7 +189,7 @@ Skills live in `.agents/skills/` and are invoked via slash commands. Active inst
189
189
  |---------------|---------------|-------------------------------------------------------|
190
190
  | `/lumi-init` | manual, first | Bootstrap wiki from existing `raw/` content |
191
191
  | `/lumi-ingest` | manual | Read a source and write a wiki page. It asks you to review the draft, then continues on its own unless something needs your judgment |
192
- | `/lumi-ask` | manual | Query wiki, synthesize answer, optionally file page |
192
+ | `/lumi-ask` | manual | Answer from what the wiki already knows, citing the source pages; if something's missing, lists matching raw/sources/ files and suggests /lumi-ingest; optionally files the answer as a page |
193
193
  | `/lumi-edit` | manual | Add/remove/revise wiki content per user request |
194
194
  | `/lumi-check` | manual/weekly | Lint: broken links, orphans, missing reverse links |
195
195
  | `/lumi-reset` | manual | Scoped destructive cleanup |
@@ -189,7 +189,7 @@ Các skill nằm trong `.agents/skills/` và được gọi qua lệnh slash. C
189
189
  |----------------|----------------|-------------------------------------------------------------------------|
190
190
  | `/lumi-init` | thủ công, lần đầu | Khởi động wiki từ nội dung `raw/` hiện có |
191
191
  | `/lumi-ingest` | thủ công | Đọc nguồn và viết trang wiki. Yêu cầu bạn xem xét bản nháp, rồi tiếp tục tự động trừ khi cần phán đoán của bạn |
192
- | `/lumi-ask` | thủ công | Truy vấn wiki, tổng hợp câu trả lời, tùy chọn tạo trang |
192
+ | `/lumi-ask` | thủ công | Trả lời dựa trên những gì wiki đã biết, trích dẫn các trang nguồn; nếu thiếu thông tin, liệt kê các tệp raw/sources/ phù hợp và gợi ý /lumi-ingest; tùy chọn lưu câu trả lời thành trang |
193
193
  | `/lumi-edit` | thủ công | Thêm/xóa/sửa nội dung wiki theo yêu cầu người dùng |
194
194
  | `/lumi-check` | thủ công/hàng tuần | Lint: liên kết hỏng, trang mồ côi, thiếu liên kết ngược |
195
195
  | `/lumi-reset` | thủ công | Dọn dẹp phá hủy có phạm vi |
@@ -190,7 +190,7 @@
190
190
  |----------------|----------------|---------------------------------------------------------------------|
191
191
  | `/lumi-init` | 手动,首次 | 从现有 `raw/` 内容引导 wiki |
192
192
  | `/lumi-ingest` | 手动 | 读取来源并写入 wiki 页面。要求您审阅草稿,然后自动继续,除非需要您的判断 |
193
- | `/lumi-ask` | 手动 | 查询 wiki,综合答案,可选地归档页面 |
193
+ | `/lumi-ask` | 手动 | 根据 wiki 已有的内容作答,并引用来源页面;如果缺少信息,会列出 raw/sources/ 中匹配的文件并建议使用 /lumi-ingest;可选择将答案归档为页面 |
194
194
  | `/lumi-edit` | 手动 | 根据用户请求添加/删除/修改 wiki 内容 |
195
195
  | `/lumi-check` | 手动/每周 | Lint:断开的链接、孤立页面、缺失的反向链接 |
196
196
  | `/lumi-reset` | 手动 | 有范围的破坏性清理 |
@@ -1,7 +1,7 @@
1
1
  id,menu,pack,phase,after,before,required,args,outputs,description
2
2
  lumi-init,IN,core,1-bootstrap,,lumi-ingest,true,,_lumina/manifest.json;wiki/index.md,bootstrap a wiki from existing raw/ content
3
3
  lumi-ingest,IG,core,2-ingest,lumi-init,lumi-ask,true,[path/to/file],wiki/sources/**;wiki/log.md,"read a source and write a wiki page (drafts shown for review, then continues unless judgment is needed)"
4
- lumi-ask,AS,core,3-query,lumi-ingest,,false,[your question],wiki/outputs/**;wiki/summary/**,"query the wiki, synthesize an answer, optionally file a page"
4
+ lumi-ask,AS,core,3-query,lumi-ingest,,false,[your question],wiki/outputs/**;wiki/summary/**,"answer from what the wiki already knows, citing sources (points to matching raw/sources/ files if something's missing), optionally file a page"
5
5
  lumi-edit,ED,core,anytime,,,false,[path/to/wiki/page],,"add, remove, or revise wiki content"
6
6
  lumi-check,CH,core,anytime,,,false,,,"lint — broken links, orphans, missing reverse links"
7
7
  lumi-reset,RS,core,anytime,,,false,,,scoped destructive cleanup (never touches raw/)