lumina-wiki 1.7.1 → 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 +55 -0
- package/package.json +1 -1
- package/src/skills/core/ask/SKILL.md +58 -21
- package/src/skills/core/ingest/references/dedup-policy.md +41 -1
- package/src/skills/core/ingest/references/step-01-draft.md +19 -5
- package/src/skills/core/ingest/references/step-03-verify.md +5 -4
- package/src/templates/README.md +1 -1
- package/src/templates/README.vi.md +1 -1
- package/src/templates/README.zh.md +1 -1
- package/src/templates/_lumina/schema/lumi-help.csv +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,61 @@ 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
|
+
|
|
34
|
+
## [1.7.2] - 2026-07-05
|
|
35
|
+
|
|
36
|
+
### Fixed
|
|
37
|
+
|
|
38
|
+
- `/lumi-ingest` step-03-verify referenced `src/skills/core/verify/` — the
|
|
39
|
+
repo source tree — instead of the installed workspace path. On any
|
|
40
|
+
non-Claude-Code IDE target (Codex, Gemini, Cursor, generic), the file
|
|
41
|
+
never existed post-install, so grounding verification silently had
|
|
42
|
+
nothing to follow. Fixed all three references to
|
|
43
|
+
`.agents/skills/lumi-verify/`, which the installer copies unconditionally
|
|
44
|
+
for every IDE target.
|
|
45
|
+
- Added an `ingest_status` handler for the `not_applicable` verify verdict,
|
|
46
|
+
which was previously unhandled during ingest.
|
|
47
|
+
|
|
48
|
+
### Added
|
|
49
|
+
|
|
50
|
+
- `/lumi-ingest` now checks external identifiers (DOI/arxiv/S2) for an
|
|
51
|
+
existing source page before generating a slug, so the same paper
|
|
52
|
+
ingested under a different title no longer creates a duplicate page.
|
|
53
|
+
- Concept stub creation now scans existing concepts for acronym/expansion
|
|
54
|
+
and singular/plural variants before creating a new one.
|
|
55
|
+
- Key Claims in drafted source pages now require a source locator
|
|
56
|
+
(section/page/heading), so the grounding reviewer in step-03 no longer
|
|
57
|
+
has to re-scan the whole raw file to check a claim.
|
|
58
|
+
- A concept-count rubric (roughly 3-7 per source) to keep the graph from
|
|
59
|
+
being diluted by over-extracted keyword stubs.
|
|
60
|
+
- PDF preprocessing now runs before type detection in step-01, so runtimes
|
|
61
|
+
without native PDF reading don't fail attempting to read the raw binary.
|
|
62
|
+
|
|
8
63
|
## [1.7.1] - 2026-07-02
|
|
9
64
|
|
|
10
65
|
### Added
|
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.
|
|
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
|
|
5
|
-
|
|
6
|
-
|
|
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
|
|
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
|
-
|
|
61
|
-
|
|
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.
|
|
122
|
-
|
|
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
|
|
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.
|
|
138
|
-
found
|
|
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>.
|
|
178
|
-
|
|
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."
|
|
224
|
-
|
|
225
|
-
|
|
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
|
|
233
|
-
|
|
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
|
|
@@ -3,6 +3,31 @@
|
|
|
3
3
|
Use this reference before creating or updating source, concept, person, and graph
|
|
4
4
|
records during `/lumi-ingest`.
|
|
5
5
|
|
|
6
|
+
## Identifier Dedup (Before Slug Generation)
|
|
7
|
+
|
|
8
|
+
Slug comparison alone misses duplicates: the same paper ingested under two title
|
|
9
|
+
variants (with/without subtitle, arxiv version suffix, translated title) produces
|
|
10
|
+
two different slugs. External identifiers are the stronger key, so check them
|
|
11
|
+
first whenever one is known (from `resolve_pdf.py` output, or parsed from the
|
|
12
|
+
input URL).
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
# One grep per known identifier, over source-page frontmatter.
|
|
16
|
+
# Use the normalized value: bare DOI (10.x/y), bare arxiv id (2604.03501 — no version suffix).
|
|
17
|
+
grep -rln "10.48550/arxiv.2604.03501" wiki/sources/
|
|
18
|
+
grep -rln "2604.03501" wiki/sources/
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
- **Hit** — an existing page carries the same identifier. This run is a re-ingest
|
|
22
|
+
of that page's slug, regardless of what slug the current title would generate.
|
|
23
|
+
Confirm with the user, then follow the re-ingest path below; do not create a
|
|
24
|
+
second page.
|
|
25
|
+
- **No hit** — proceed to slug generation.
|
|
26
|
+
|
|
27
|
+
A plain substring grep is deliberate: identifiers are unique enough that false
|
|
28
|
+
positives are rare, and a rare false positive only costs one confirmation
|
|
29
|
+
question. A false negative (skipping the check) costs a duplicate source page.
|
|
30
|
+
|
|
6
31
|
## Source Pages
|
|
7
32
|
|
|
8
33
|
Generate the source slug with:
|
|
@@ -47,7 +72,22 @@ making any `add-edge concepts/<slug>` calls.
|
|
|
47
72
|
|
|
48
73
|
## Concept And Person Stubs
|
|
49
74
|
|
|
50
|
-
|
|
75
|
+
Exact-slug lookup only catches exact matches — `rlhf` and
|
|
76
|
+
`reinforcement-learning-from-human-feedback` would become two pages. Once per
|
|
77
|
+
ingest run, list the existing concepts and hold the list in mind while creating
|
|
78
|
+
stubs:
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
node _lumina/scripts/wiki.mjs list-entities --type concept
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
For each candidate concept, scan that list for variants of the same term:
|
|
85
|
+
acronym vs expansion, singular vs plural, hyphenation or word-order differences.
|
|
86
|
+
If a variant exists, link to the existing slug instead of creating a new stub —
|
|
87
|
+
and if unsure whether two terms are the same concept, ask the user rather than
|
|
88
|
+
guessing.
|
|
89
|
+
|
|
90
|
+
Then, before creating a concept or person page, check metadata:
|
|
51
91
|
|
|
52
92
|
```bash
|
|
53
93
|
node _lumina/scripts/wiki.mjs read-meta concepts/<slug>
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
- Never modify files in `raw/`. Read-only.
|
|
7
7
|
- Never hand-edit `wiki/graph/edges.jsonl` or `wiki/graph/citations.jsonl`; use `wiki.mjs add-edge` and `wiki.mjs add-citation`.
|
|
8
8
|
- Never overwrite an existing wiki page without user confirmation.
|
|
9
|
-
-
|
|
9
|
+
- Frontmatter discipline, two cases: (a) **initial creation** of a page that does not exist yet — Write the whole file (frontmatter + body) in one shot from the template; (b) **any change to an existing page's frontmatter** — always `wiki.mjs set-meta`, never Write/Edit on the frontmatter block. Body text of an existing page may be edited with Write/Edit; the frontmatter block may not.
|
|
10
10
|
- `raw/tmp/` accepts additions only; never overwrite a file there.
|
|
11
11
|
- `raw_paths` must list permanent artifacts only. Reject `raw/tmp/*` entries.
|
|
12
12
|
- Keep a phase-level checkpoint after every phase — an interrupted run must resume cleanly.
|
|
@@ -69,9 +69,13 @@ node _lumina/scripts/wiki.mjs checkpoint-read research-discover shortlist
|
|
|
69
69
|
|
|
70
70
|
Match title to a shortlist entry, extract URL, fall through to Mode B.
|
|
71
71
|
|
|
72
|
+
Fallback: if the checkpoint does not exist (research pack not installed, or no discover run yet) or no shortlist entry matches the title, do not guess. Ask the user for a URL or identifier (arxiv ID / DOI), then fall through to Mode B with their answer.
|
|
73
|
+
|
|
72
74
|
### Phase 1 — Detect type
|
|
73
75
|
|
|
74
|
-
|
|
76
|
+
If the source is a PDF or too large to read comfortably in one pass, follow `pdf-preprocessing.md` **before reading anything** — on runtimes without native PDF reading, a direct Read of the binary fails here, not in Phase 3.
|
|
77
|
+
|
|
78
|
+
Read first ~200 lines of the source (or of the extracted text). Classify:
|
|
75
79
|
- "Abstract", "Introduction", "References" → `paper`
|
|
76
80
|
- Chapter structure → `book`
|
|
77
81
|
- Web byline + publication → `article`
|
|
@@ -82,6 +86,8 @@ Write checkpoint: `phase: "detect"`.
|
|
|
82
86
|
|
|
83
87
|
### Phase 2 — Generate slug
|
|
84
88
|
|
|
89
|
+
**Identifier dedup comes first.** If any external identifier is known at this point (DOI / arxiv ID / S2 ID — from Mode B resolution or parsed from the input URL), check for an existing source page carrying the same identifier BEFORE generating a slug — title variants produce different slugs, so slug comparison alone misses duplicates. See `dedup-policy.md` § Identifier Dedup. On a hit, this run is a re-ingest of the matched slug: confirm with the user and skip new-page creation.
|
|
90
|
+
|
|
85
91
|
```bash
|
|
86
92
|
node _lumina/scripts/wiki.mjs slug "<Title>"
|
|
87
93
|
```
|
|
@@ -107,7 +113,7 @@ Write checkpoint: `phase: "slug"` (already included in the merge above).
|
|
|
107
113
|
|
|
108
114
|
### Phase 3 — Write source page
|
|
109
115
|
|
|
110
|
-
For PDFs / large sources,
|
|
116
|
+
For PDFs / large sources, the extraction from Phase 1 (`pdf-preprocessing.md`) applies here too — draft from the extracted text, section by section for long sources.
|
|
111
117
|
|
|
112
118
|
Draft `wiki/sources/<slug>.md` from `_lumina/schema/page-templates.md` Source template. Required frontmatter: `id`, `title`, `type`, `created`, `updated`, `authors`, `year`, `importance`, `provenance`. Optional but encouraged: `urls`, `raw_paths`, `confidence`, `external_ids`.
|
|
113
119
|
|
|
@@ -131,6 +137,10 @@ node _lumina/scripts/wiki.mjs set-meta sources/<slug> sources "[$entry]" --json-
|
|
|
131
137
|
|
|
132
138
|
Required body sections: `## Summary` (2–4 sentences), `## Key Claims` (bulleted, with confidence), `## Concepts` (`[[concept-slug]]` links), `## People` (`[[person-slug]]` links), `## Open Questions`.
|
|
133
139
|
|
|
140
|
+
`## Key Claims` — each claim ends with a locator pointing at where the source supports it: a section anchor, page, or heading, e.g. `(§3.2)`, `(p. 5)`, `(Table 1)`. The grounding check in step-03 reads these locators to find evidence; a claim without one forces the reviewer to re-read the whole raw file and weakens the check. If a claim synthesizes multiple places, list the primary locator.
|
|
141
|
+
|
|
142
|
+
`## Concepts` — be selective, not exhaustive. A term earns a concept link only if (a) it is central to this source's contribution, or (b) it is likely to recur across other sources in this wiki. Aim for roughly 3–7 concepts per source; minor keywords belong in body prose, not as concept links. Every linked concept implies a stub + edges in Phases 4–5, so over-extraction dilutes the graph.
|
|
143
|
+
|
|
134
144
|
Provenance rubric (raw-centric):
|
|
135
145
|
- `replayable` — `raw_paths` non-empty, every entry resolves to existing file
|
|
136
146
|
- `partial` — `urls` has entries but `raw_paths` empty or missing
|
|
@@ -156,7 +166,7 @@ node _lumina/scripts/wiki.mjs resolve-alias "<concept-name>"
|
|
|
156
166
|
|
|
157
167
|
If it resolves to a foundation, link via `[[foundations/<slug>]]` and add `grounded_in` edge instead of creating a stub. See `dedup-policy.md` § Foundation Resolution.
|
|
158
168
|
|
|
159
|
-
Apply `dedup-policy.md` before creating/updating stubs. Existing pages are updated conservatively.
|
|
169
|
+
Apply `dedup-policy.md` before creating/updating stubs — including the concept variant scan (acronym vs expansion, singular vs plural), which catches duplicates that exact-slug lookup misses. Existing pages are updated conservatively.
|
|
160
170
|
|
|
161
171
|
New stubs use the templates in `_lumina/schema/page-templates.md`.
|
|
162
172
|
|
|
@@ -187,10 +197,14 @@ node _lumina/scripts/wiki.mjs add-citation sources/<slug> sources/<cited-slug>
|
|
|
187
197
|
|
|
188
198
|
Do not create stubs for cited sources not yet ingested — note them in `## Open Questions`.
|
|
189
199
|
|
|
200
|
+
Write checkpoint: `phase: "citations"`.
|
|
201
|
+
|
|
190
202
|
### Phase 7 — Update wiki/index.md
|
|
191
203
|
|
|
192
204
|
Add the new source page (and any new concept/person pages) to the catalog between `<!-- lumina:index -->` markers. Format: `- [[sources/<slug>]] — <one-line description>`.
|
|
193
205
|
|
|
206
|
+
Write checkpoint: `phase: "index"`.
|
|
207
|
+
|
|
194
208
|
## Draft Gate
|
|
195
209
|
|
|
196
210
|
Present a draft summary to the user:
|
|
@@ -211,7 +225,7 @@ Use the user's configured communication language. Explain "provenance", "edges",
|
|
|
211
225
|
```
|
|
212
226
|
→ NEXT
|
|
213
227
|
- **E**: Take the user's revision instructions. Re-edit the affected files (source page, stubs, or edges as instructed). Re-present the draft summary. Loop back to "HALT and ask human" — do not advance.
|
|
214
|
-
- **Q**: Leave the phase-level checkpoint in place; do not write `ingest_status`. **STOP — do not read the NEXT directive below.** Exit cleanly with no further action this run.
|
|
228
|
+
- **Q**: Leave the phase-level checkpoint in place; do not write `ingest_status`. Before exiting, tell the user in plain language that the draft pages and links written so far stay in the wiki as work-in-progress — coming back to `/lumi-ingest <slug>` continues from here, and `/lumi-reset` can clean up if they decide not to keep this source at all. **STOP — do not read the NEXT directive below.** Exit cleanly with no further action this run.
|
|
215
229
|
|
|
216
230
|
## NEXT
|
|
217
231
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
## RULES
|
|
4
4
|
|
|
5
5
|
- Read `README.md` at the project root before this step if you have not already in this session.
|
|
6
|
-
- Reuse the existing `/lumi-verify` skill in grounding-only mode. Do not inline a duplicate grounding reviewer here — single source of truth for grounding logic lives in
|
|
6
|
+
- Reuse the existing `/lumi-verify` skill in grounding-only mode. Do not inline a duplicate grounding reviewer here — single source of truth for grounding logic lives in `.agents/skills/lumi-verify/`.
|
|
7
7
|
- All frontmatter writes go through `wiki.mjs set-meta`. Never write to `wiki/*.md` directly.
|
|
8
8
|
- Drift is a hard halt: a missing `raw_paths` file is a stronger signal than any finding and should not be silently downgraded.
|
|
9
9
|
- This step asks the user only when there are source-check findings, missing source files, or a confidence downgrade. If the source check passes, continue automatically.
|
|
@@ -24,7 +24,7 @@ Invoke `/lumi-verify` on the entry restricted to the grounding reviewer. Three r
|
|
|
24
24
|
|
|
25
25
|
**Tier 1 — Agent tool available (Claude Code):**
|
|
26
26
|
|
|
27
|
-
Spawn a sub-agent
|
|
27
|
+
Spawn a sub-agent instructed to read and follow `.agents/skills/lumi-verify/SKILL.md` with this slug as the target, grounding only (skip blind, skip external). The sub-agent is deliberate: it activates the verify skill in a blank context, so the verdict is not anchored by the reasoning chain that just drafted the pages. Do not invoke the verify skill inline in this conversation (e.g. via a skill-invocation tool) — same-context verification inherits drafting bias. Wait for completion, then read the writeback:
|
|
28
28
|
|
|
29
29
|
```bash
|
|
30
30
|
node _lumina/scripts/wiki.mjs read-meta sources/<slug>
|
|
@@ -32,9 +32,9 @@ node _lumina/scripts/wiki.mjs read-meta sources/<slug>
|
|
|
32
32
|
|
|
33
33
|
**Tier 2 — Bash-only runtime (Codex, Gemini, Cursor, generic):**
|
|
34
34
|
|
|
35
|
-
Read fully and follow
|
|
35
|
+
Read fully and follow `.agents/skills/lumi-verify/SKILL.md` Grounding pipeline (Section: "Grounding reviewer"), with this slug as the target. The verify skill's writeback contract is the same — `verify_status` and `findings` written to the entry frontmatter. After the grounding pass returns, control returns to this step's Phase 8.6.
|
|
36
36
|
|
|
37
|
-
If
|
|
37
|
+
If `.agents/skills/lumi-verify/references/reviewers.md` exists, it is the canonical Grounding reviewer prompt; load it as part of following the verify SKILL.
|
|
38
38
|
|
|
39
39
|
**Tier 3 — User opts out:**
|
|
40
40
|
|
|
@@ -54,6 +54,7 @@ Inspect `verify_status` and `findings`:
|
|
|
54
54
|
| `findings_pending` | Patch/defer findings written | Present findings inline; user chooses A/E/W/Q |
|
|
55
55
|
| `drift_detected` | `raw_paths` resolves to missing files | **Hard HALT** — do not present standard menu; force user to repair raw or set `provenance: missing` explicitly |
|
|
56
56
|
| `skipped` | Tier 3 opt-out | Write verified status and continue automatically; the user already opted out |
|
|
57
|
+
| `not_applicable` | Verify refused: target is not a `sources/*` entry | Should never happen during ingest (the target is always `sources/<slug>`). Treat as an internal error: HALT, report the slug that was passed to verify, and do not advance `ingest_status`. |
|
|
57
58
|
|
|
58
59
|
For `passed`, tell the user in one short sentence that the page matched the source closely enough to continue. Then write `ingest_status: verified` and go to NEXT:
|
|
59
60
|
|
package/src/templates/README.md
CHANGED
|
@@ -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 |
|
|
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 |
|
|
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` | 手动 |
|
|
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/**,"
|
|
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/)
|