lumina-wiki 1.3.0 → 1.5.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/CHANGELOG.md CHANGED
@@ -3,6 +3,60 @@
3
3
  All notable changes to Lumina-Wiki are documented here.
4
4
  Format follows [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
5
5
 
6
+ ## [1.5.0] - 2026-05-10
7
+
8
+ ### Added — Learning Pack: `/lumi-learning-reflect` self-reflection skill (PRs #16, #17)
9
+
10
+ - New optional **learning** pack installable via `npx lumina-wiki install --packs core,learning`.
11
+ - New skill `/lumi-learning-reflect`: guides metacognitive self-reflection sessions on any concept or source in the wiki.
12
+ - Creates or updates `wiki/reflections/<slug>.md` — a personal reflection page with a rewritable **"Current understanding"** section and an append-only **"Evolution"** log.
13
+ - AI acts as a metacognitive mirror: reads past entries, quotes the user's own words, and asks prompting questions — but **never writes reflection content**. The user always authors their own understanding.
14
+ - Reflection pages are a personal overlay exempt from bidirectional-link requirements (`reflections/**` added to exempt globs in `schemas.mjs`).
15
+ - `schemas.mjs` gains the `reflections` entity type (7 required frontmatter fields: `id`, `title`, `type`, `created`, `updated`, `related_concepts`, `related_sources`, `evolution_count`) scoped to the learning pack.
16
+ - `commands.js` registers the learning pack as a valid selectable option (`VALID_PACKS`), creates `wiki/reflections/` on install, and wires up the `/lumi-learning-reflect` skill symlink.
17
+ - Template READMEs (EN/VI/ZH) and `lumi-help.csv` catalog updated to include the new skill and Learning Pack install option.
18
+ - `cross-reference-packs.md` and `page-templates.md` schema docs extended with reflection page format.
19
+ - PR #17 follow-up: locale strings (EN/VI/ZH) for the new pack prompt, `prompts.js` pack description, and `assert.rejects` CI fix.
20
+
21
+ ## [1.4.0] - 2026-05-09
22
+
23
+ ### Added — `/lumi-help` orientation skill (PR #9)
24
+
25
+ - New core skill `/lumi-help` with three modes:
26
+ - **Mode A — Orientation** (default): reads live workspace state
27
+ (`manifest.json`, `wiki/index.md`, `wiki/log.md`, `raw/`) and recommends
28
+ a single next action. Stale-log surfaces as a 30-day idle hint after
29
+ the primary recommendation, not as the primary action itself.
30
+ - **Mode B — Catalog** (`/lumi-help skills` or `/lumi-help catalog`): parses
31
+ `_lumina/schema/lumi-help.csv` and renders the full skill list grouped by
32
+ pack. Only sections matching installed packs are rendered at install time.
33
+ - **Mode C — Framework Q&A** (`/lumi-help explain <question>`): answers
34
+ how-it-works questions by citing shipped schema docs (`README.md` schema
35
+ block, `page-templates.md`, `cross-reference-packs.md`, `graph-packs.md`,
36
+ and the relevant `SKILL.md`).
37
+ - `src/templates/_lumina/schema/lumi-help.csv` — pack-conditional skill
38
+ catalog (CSV, `{{#if pack_*}}` gates rendered at install time). Single
39
+ source of truth for skill names, menu strings, and prerequisite ordering.
40
+ - `src/templates/_lumina/schema/lumi-help-runbook.md` — procedural detail
41
+ (bash probes, decision ladder, output formats) separated from the SKILL.md
42
+ contract; loaded on demand.
43
+ - `cleanupObsoleteCatalog()` in `manifest.js` removes the pre-v1.4
44
+ `skills-catalog.md` and `_state/skills-manifest.json` on re-install —
45
+ best-effort, `ENOENT` is not an error.
46
+ - `scripts/verify-lumi-help.test.mjs` — integrity test: validates CSV header
47
+ contract, column counts, id/menu uniqueness, valid enum values, pack gating,
48
+ and cross-references for all four pack combinations.
49
+ - `test:catalog` script wired into `package.json` (`node --test scripts/verify-lumi-help.test.mjs`).
50
+ - User guides (EN/VI/ZH) gain a `/lumi-help` section and a "Meet /lumi-help"
51
+ opener in Quick Start.
52
+
53
+ ### Fixed
54
+
55
+ - `--cwd` / `--directory` flag propagation regression: dropping the
56
+ program-level `process.cwd()` default unmasks user-supplied `--cwd` values
57
+ that were being short-circuited by commander's `??` chain. Pinned by new
58
+ tests in `bin/lumina.deprecations.test.js`.
59
+
6
60
  ## [1.3.0] - 2026-05-09
7
61
 
8
62
  ### Added — Local text-document ingestion (research pack)
@@ -344,7 +398,11 @@ Format follows [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
344
398
 
345
399
  ---
346
400
 
347
- [Unreleased]: https://github.com/tronghieu/lumina-wiki/compare/v1.0.0...HEAD
401
+ [Unreleased]: https://github.com/tronghieu/lumina-wiki/compare/v1.4.0...HEAD
402
+ [1.4.0]: https://github.com/tronghieu/lumina-wiki/compare/v1.3.0...v1.4.0
403
+ [1.3.0]: https://github.com/tronghieu/lumina-wiki/compare/v1.2.0...v1.3.0
404
+ [1.2.0]: https://github.com/tronghieu/lumina-wiki/compare/v1.1.0...v1.2.0
405
+ [1.1.0]: https://github.com/tronghieu/lumina-wiki/compare/v1.0.0...v1.1.0
348
406
  [1.0.0]: https://github.com/tronghieu/lumina-wiki/compare/v0.9.1...v1.0.0
349
407
  [0.9.1]: https://github.com/tronghieu/lumina-wiki/compare/v0.9.0...v0.9.1
350
408
  [0.9.0]: https://github.com/tronghieu/lumina-wiki/compare/v0.8.1...v0.9.0
package/README.md CHANGED
@@ -78,7 +78,7 @@ npx lumina-wiki install
78
78
 
79
79
  > **Note for Windows users:** For the best experience, enable [Developer Mode](https://learn.microsoft.com/en-us/windows/apps/get-started/enable-your-device-for-development) so the installer can use symlinks correctly. If Developer Mode is off, the installer falls back to copying skill files; everything still works, but updates are less ideal.
80
80
 
81
- The installer will guide you through a quick setup, including optional **Packs** such as `research` and `reading`.
81
+ The installer will guide you through a quick setup, including optional **Packs** such as `research`, `reading`, and `learning`.
82
82
 
83
83
  ### **Step 2 (Optional): Configure the Research Pack**
84
84
 
@@ -117,7 +117,7 @@ Interact with your wiki using these commands in your AI chat interface, such as
117
117
  - `/lumi-edit [path/to/wiki/page]`: Request a change or correction to a specific wiki page.
118
118
  - `/lumi-check`: Check the whole wiki for errors, such as broken links or orphan pages.
119
119
 
120
- *Additional skills may be available if you installed optional packs such as `research` or `reading`.*
120
+ *Additional skills may be available if you installed optional packs such as `research`, `reading`, or `learning`.*
121
121
 
122
122
  ---
123
123
 
@@ -177,6 +177,7 @@ These are the commands you can use when chatting with your AI agent.
177
177
  | | `/lumi-check` | Check the wiki for errors, such as broken links. |
178
178
  | | `/lumi-reset` | Safely reset parts of the wiki. |
179
179
  | | `/lumi-verify` | Check that wiki notes match the sources they cite. Reports anything suspicious for your review; never edits notes for you. |
180
+ | | `/lumi-help` | Read your workspace state and recommend one next action. Pass `skills` to list every command, or `explain <topic>` to ask how Lumina itself works (e.g., `/lumi-help explain bidirectional links`). |
180
181
  | **Research** | `/lumi-research-discover` | Discover and rank relevant research papers. |
181
182
  | | `/lumi-research-watchlist` | Choose research topics for scheduled discovery with AI help. |
182
183
  | | `/lumi-research-survey` | Create a survey or summary from existing knowledge. |
@@ -187,6 +188,7 @@ These are the commands you can use when chatting with your AI agent.
187
188
  | | `/lumi-reading-character-track` | Track characters and their relationships in a story. |
188
189
  | | `/lumi-reading-theme-map` | Identify and map themes in a narrative. |
189
190
  | | `/lumi-reading-plot-recap` | Provide a progressive plot recap. |
191
+ | **Learning** | `/lumi-learning-reflect` | Guide a self-reflection session on a concept or source you have studied. Creates a personal reflection page in `wiki/reflections/` with a rewritable "Current understanding" section and an append-only "Evolution" log. The AI acts as a metacognitive mirror — it quotes your past words and asks questions — but never writes the reflection for you. |
190
192
 
191
193
  The scripts behind these skills live in `_lumina/scripts/` and `_lumina/tools/`; you usually do not need to call them directly.
192
194
 
@@ -197,16 +199,18 @@ The scripts behind these skills live in `_lumina/scripts/` and `_lumina/tools/`;
197
199
  Lumina-Wiki is evolving rapidly. Here is our user-facing roadmap:
198
200
 
199
201
  **Near-term (Stability & New Ingestion)**
200
- - [ ] **`/lumi-help` Skill:** A smart assistant to help you learn and use Lumina-Wiki instantly.
202
+ - [x] **`/lumi-help` Skill:** A smart assistant that reads your workspace state and tells you the one thing to do next; `skills` shows every command, `explain <topic>` answers how Lumina itself works. *(shipped in v1.4)*
203
+ - [x] **Learning Pack:** Self-reflection sessions that track how your understanding of a concept evolves over time. *(shipped in v1.4)*
201
204
  - [x] **Multilingual setup:** Choose English, Vietnamese, or Chinese as your primary language during install. *(shipped in v1.2)*
202
205
  - [x] **Native DOCX, RTF & EPUB ingestion:** Pull Word, Rich Text, and EPUB books straight into your wiki via the research pack. *(shipped in v1.x)*
203
- - [ ] **Image OCR & Scanned PDFs:** Ingest screenshots and scanned PDFs into your wiki.
204
- - [ ] **Advanced Paper Ranking:** See influence scores and quality signals for your research papers.
205
206
  - [x] **Improved CI/CD:** Native support for Bun and Node 22 environments. *(shipped in v1.2)*
207
+ - [ ] **Global Source Expansion:** Direct integration with OpenAlex, CORE, and Unpaywall for reliable DOI-to-PDF resolution.
208
+ - [ ] **RSS & Blog Monitoring:** Automatically surface new papers from your favorite lab blogs and journals.
209
+ - [ ] **Advanced Paper Ranking:** See influence scores and quality signals for your research papers.
206
210
 
207
211
  **Long-term (Deep Research & Integration)**
208
- - [ ] **Global Source Expansion:** Direct integration with OpenAlex, CORE, and Unpaywall.
209
- - [ ] **RSS & Blog Monitoring:** Automatically identify new papers from your favorite lab blogs.
212
+ - [ ] **Image OCR & Scanned PDFs:** Ingest screenshots and scanned PDFs into your wiki.
213
+ - [ ] **Paper Version Tracking:** Get notified when an already-ingested paper has a new revision or published version.
210
214
  - [ ] **Google Workspace:** Ingest Google Docs and Sheets directly into your graph.
211
215
  - [ ] **Multimedia Support:** Process YouTube videos and Audio recordings via transcripts.
212
216
  - [ ] **Knowledge Graph Auditing:** Automated checks for contradictions and structural drift.
package/README.vi.md CHANGED
@@ -78,7 +78,7 @@ npx lumina-wiki install
78
78
 
79
79
  > **Lưu ý cho người dùng Windows:** Để có trải nghiệm tốt nhất, bạn nên [bật Chế độ nhà phát triển (Developer Mode)](https://learn.microsoft.com/vi-vn/windows/apps/get-started/enable-your-device-for-development) để trình cài đặt có thể sử dụng symlink một cách chính xác. Nếu Developer Mode bị tắt, trình cài đặt sẽ chuyển sang sao chép các file skill; chức năng vẫn hoạt động nhưng sẽ không lý tưởng bằng cho việc cập nhật.
80
80
 
81
- Trình cài đặt sẽ hướng dẫn bạn qua một vài bước thiết lập nhanh, bao gồm cả việc lựa chọn các **Gói (Packs)** tùy chọn như `research` (nghiên cứu) `reading` (đọc hiểu).
81
+ Trình cài đặt sẽ hướng dẫn bạn qua một vài bước thiết lập nhanh, bao gồm cả việc lựa chọn các **Gói (Packs)** tùy chọn như `research` (nghiên cứu), `reading` (đọc hiểu) và `learning` (học tập).
82
82
 
83
83
  ### **Bước 2 (Tùy chọn): Cấu hình Gói Research**
84
84
 
@@ -117,7 +117,7 @@ Tương tác với wiki của bạn bằng cách sử dụng các lệnh này tr
117
117
  - `/lumi-edit [đường/dẫn/tới/trang/wiki]`: Yêu cầu thay đổi hoặc sửa lỗi cho một trang wiki cụ thể.
118
118
  - `/lumi-check`: Kiểm tra toàn bộ wiki để tìm lỗi (liên kết hỏng, trang mồ côi, v.v.).
119
119
 
120
- *Các kỹ năng bổ sung có thể có sẵn nếu bạn đã cài đặt các gói tùy chọn như `research` hoặc `reading`.*
120
+ *Các kỹ năng bổ sung có thể có sẵn nếu bạn đã cài đặt các gói tùy chọn như `research`, `reading` hoặc `learning`.*
121
121
 
122
122
  ---
123
123
 
@@ -177,6 +177,7 @@ Xem [Hướng dẫn Nâng cao](docs/user-guide/advanced-qmd.vi.md) để biết
177
177
  | | `/lumi-check` | Kiểm tra lỗi trong wiki (liên kết hỏng, v.v.). |
178
178
  | | `/lumi-reset` | Xóa các phần của wiki một cách an toàn. |
179
179
  | | `/lumi-verify` | Kiểm tra xem các trang wiki có khớp với nguồn đã trích dẫn không. Báo cáo những điểm đáng ngờ để bạn xem xét; không tự sửa ghi chú giúp bạn. |
180
+ | | `/lumi-help` | Đọc trạng thái workspace và đề xuất một bước tiếp theo. Gõ `/lumi-help skills` để xem toàn bộ danh sách lệnh, hoặc `/lumi-help explain <chủ đề>` để hỏi Lumina hoạt động ra sao (ví dụ `/lumi-help explain bidirectional links`). |
180
181
  | **Research**| `/lumi-research-discover` | Khám phá và xếp hạng các bài báo nghiên cứu liên quan. |
181
182
  | | `/lumi-research-watchlist` | Giúp bạn chọn các chủ đề nghiên cứu để AI tìm định kỳ. |
182
183
  | | `/lumi-research-survey` | Tạo một bài tổng quan/khảo sát từ kiến thức hiện có. |
@@ -187,6 +188,7 @@ Xem [Hướng dẫn Nâng cao](docs/user-guide/advanced-qmd.vi.md) để biết
187
188
  | | `/lumi-reading-character-track`| Theo dõi các nhân vật và mối quan hệ của họ trong truyện. |
188
189
  | | `/lumi-reading-theme-map` | Xác định và lập bản đồ các chủ đề trong một câu chuyện. |
189
190
  | | `/lumi-reading-plot-recap` | Cung cấp một bản tóm tắt tuần tự của cốt truyện. |
191
+ | **Learning** | `/lumi-learning-reflect` | Hướng dẫn một buổi phản tư (self-reflection) về một khái niệm hoặc tài liệu bạn đã học. Tạo trang phản tư cá nhân trong `wiki/reflections/` với phần "Hiểu biết hiện tại" có thể chỉnh sửa và nhật ký "Quá trình phát triển" chỉ được ghi thêm (không xóa). AI đóng vai trò gương nhận thức — trích dẫn lại lời bạn và đặt câu hỏi — nhưng không bao giờ viết nội dung phản tư thay bạn. |
190
192
 
191
193
  Các script chạy nền nằm trong `_lumina/scripts/` và `_lumina/tools/`; thông thường bạn không cần gọi trực tiếp.
192
194
 
@@ -197,16 +199,18 @@ Các script chạy nền nằm trong `_lumina/scripts/` và `_lumina/tools/`; th
197
199
  Lumina-Wiki đang phát triển nhanh chóng. Dưới đây là lộ trình hướng tới người dùng của chúng tôi:
198
200
 
199
201
  **Sắp tới (Ổn định & Mở rộng nạp tài liệu)**
200
- - [ ] **Kỹ năng `/lumi-help`:** Trợ lý thông minh giúp bạn họcsử dụng Lumina-Wiki tức thì.
202
+ - [x] **Kỹ năng `/lumi-help`:** Trợ lý thông minh đọc trạng thái workspace mách bạn bước tiếp theo; gõ `/lumi-help skills` để xem toàn bộ lệnh, hoặc `/lumi-help explain <chủ đề>` để hỏi Lumina hoạt động ra sao. *(đã phát hành trong v1.4)*
203
+ - [x] **Gói Learning:** Các buổi phản tư cá nhân giúp bạn theo dõi sự tiến triển trong hiểu biết về một khái niệm theo thời gian. *(đã phát hành trong v1.4)*
201
204
  - [x] **Cài đặt đa ngôn ngữ:** Chọn Tiếng Anh, Tiếng Việt hoặc Tiếng Trung làm ngôn ngữ chính khi cài đặt. *(đã phát hành trong v1.2)*
202
205
  - [x] **Nạp DOCX, RTF & EPUB native:** Đưa thẳng file Word, Rich Text và sách EPUB vào wiki qua research pack. *(đã phát hành trong v1.x)*
203
- - [ ] **OCR ảnh & PDF scan:** Nạp ảnh chụp màn hình và PDF dạng scan vào wiki.
204
- - [ ] **Xếp hạng bài báo nâng cao:** Xem điểm số ảnh hưởng và tín hiệu chất lượng cho các nghiên cứu của bạn.
205
206
  - [x] **Cải thiện CI/CD:** Hỗ trợ chính thức cho môi trường Bun và Node 22. *(đã phát hành trong v1.2)*
207
+ - [ ] **Mở rộng nguồn dữ liệu toàn cầu:** Tích hợp trực tiếp với OpenAlex, CORE và Unpaywall để tra cứu DOI-to-PDF đáng tin cậy.
208
+ - [ ] **Theo dõi RSS & Blog:** Tự động phát hiện bài báo mới từ các blog phòng thí nghiệm và tạp chí yêu thích.
209
+ - [ ] **Xếp hạng bài báo nâng cao:** Xem điểm số ảnh hưởng và tín hiệu chất lượng cho các nghiên cứu của bạn.
206
210
 
207
211
  **Dài hạn (Nghiên cứu sâu & Tích hợp)**
208
- - [ ] **Mở rộng nguồn dữ liệu toàn cầu:** Tích hợp trực tiếp với OpenAlex, CORE Unpaywall.
209
- - [ ] **Theo dõi RSS & Blog:** Tự động tìm bài báo mới từ các blog phòng thí nghiệm yêu thích.
212
+ - [ ] **OCR ảnh & PDF scan:** Nạp ảnh chụp màn hình PDF dạng scan vào wiki.
213
+ - [ ] **Theo dõi phiên bản bài báo:** Nhận thông báo khi một bài báo đã nạp bản sửa đổi hoặc phiên bản xuất bản chính thức mới.
210
214
  - [ ] **Google Workspace:** Nạp trực tiếp Google Docs và Sheets vào đồ thị tri thức.
211
215
  - [ ] **Hỗ trợ đa phương tiện:** Xử lý video YouTube và ghi âm Audio thông qua transcript.
212
216
  - [ ] **Kiểm định đồ thị tri thức:** Tự động phát hiện mâu thuẫn và sai lệch cấu trúc.
package/README.zh.md CHANGED
@@ -78,7 +78,7 @@ npx lumina-wiki install
78
78
 
79
79
  > **Windows 用户注意:** 为了获得最佳体验,建议[启用开发者模式](https://learn.microsoft.com/zh-cn/windows/apps/get-started/enable-your-device-for-development),以便安装程序正确使用符号链接。如果开发者模式关闭,安装程序会退回到复制 skill 文件;功能仍然可用,但对后续更新不如符号链接理想。
80
80
 
81
- 安装程序会引导您完成几个快速设置步骤,包括选择可选的 **Packs**,例如 `research`(研究)和 `reading`(阅读)。
81
+ 安装程序会引导您完成几个快速设置步骤,包括选择可选的 **Packs**,例如 `research`(研究)、`reading`(阅读)和 `learning`(学习)。
82
82
 
83
83
  ### **第二步(可选):配置 Research Pack**
84
84
 
@@ -117,7 +117,7 @@ node _lumina/scripts/wiki.mjs migrate --add-defaults
117
117
  - `/lumi-edit [path/to/wiki/page]`: 要求修改或修正某个具体 wiki 页面。
118
118
  - `/lumi-check`: 检查整个 wiki 的问题(断链、孤立页面等)。
119
119
 
120
- *如果您安装了 `research` 或 `reading` 等可选包,还会有额外技能可用。*
120
+ *如果您安装了 `research`、`reading` 或 `learning` 等可选包,还会有额外技能可用。*
121
121
 
122
122
  ---
123
123
 
@@ -178,6 +178,7 @@ npx skills add https://github.com/tobi/qmd --skill qmd
178
178
  | | `/lumi-check` | 检查 wiki 中的问题(断链等)。 |
179
179
  | | `/lumi-reset` | 安全地删除 wiki 的部分内容。 |
180
180
  | | `/lumi-verify` | 核查 wiki 里的笔记是否与引用的来源相符。把可疑之处报告给你审阅;不会替你修改笔记。 |
181
+ | | `/lumi-help` | 读取工作区状态,给出下一步该做的一条建议。加参数 `/lumi-help skills` 可查看全部命令清单,或 `/lumi-help explain <主题>` 询问 Lumina 自己的工作原理(例如 `/lumi-help explain bidirectional links`)。 |
181
182
  | **Research**| `/lumi-research-discover` | 发现并排序相关研究论文。 |
182
183
  | | `/lumi-research-watchlist` | 帮你选择要定期查找的研究主题。 |
183
184
  | | `/lumi-research-survey` | 从现有知识创建综述/调研。 |
@@ -188,6 +189,7 @@ npx skills add https://github.com/tobi/qmd --skill qmd
188
189
  | | `/lumi-reading-character-track`| 追踪故事中的角色及其关系。 |
189
190
  | | `/lumi-reading-theme-map` | 识别并映射故事主题。 |
190
191
  | | `/lumi-reading-plot-recap` | 提供情节的顺序回顾。 |
192
+ | **Learning** | `/lumi-learning-reflect` | 引导一次针对某个概念或资料的自我反思(self-reflection)。在 `wiki/reflections/` 中创建个人反思页,包含可改写的"当前理解"部分和只能追加的"演变日志"。AI 充当认知镜——引用你过去说的话并提问——但从不替你撰写反思内容。 |
191
193
 
192
194
  后台脚本位于 `_lumina/scripts/` 和 `_lumina/tools/`;通常您不需要直接调用它们。
193
195
 
@@ -198,16 +200,18 @@ npx skills add https://github.com/tobi/qmd --skill qmd
198
200
  Lumina-Wiki 正在快速演进。这是我们的用户路线图:
199
201
 
200
202
  **近期计划(稳定性与新导入支持)**
201
- - [ ] **`/lumi-help` 技能:** 智能助手,帮您即时学习和使用 Lumina-Wiki。
203
+ - [x] **`/lumi-help` 技能:** 智能助手读取工作区状态并告诉你下一步该做什么;加参数 `/lumi-help skills` 可查看全部命令清单,或 `/lumi-help explain <主题>` 询问 Lumina 本身的工作原理。*(v1.4 已发布)*
204
+ - [x] **学习包(Learning Pack):** 自我反思功能,帮助您追踪对某个概念的理解随时间的演变。*(v1.4 已发布)*
202
205
  - [x] **多语言安装:** 安装时可选英文、越南文或中文作为主语言。*(v1.2 已发布)*
203
206
  - [x] **原生 DOCX、RTF 与 EPUB 导入:** 通过 research pack 将 Word、Rich Text 与 EPUB 电子书直接导入维基。*(v1.x 已发布)*
204
- - [ ] **图片 OCR 与扫描 PDF:** 将截图与扫描版 PDF 导入维基。
205
- - [ ] **高级论文排名:** 查看研究论文的影响力评分和质量信号。
206
207
  - [x] **改进的 CI/CD:** 正式支持 Bun 和 Node 22 环境。*(v1.2 已发布)*
208
+ - [ ] **全球数据源扩展:** 直接集成 OpenAlex、CORE 和 Unpaywall,实现可靠的 DOI-to-PDF 解析。
209
+ - [ ] **RSS 与博客监控:** 自动从您喜爱的实验室博客和期刊中发现新论文。
210
+ - [ ] **高级论文排名:** 查看研究论文的影响力评分和质量信号。
207
211
 
208
212
  **长期计划(深度研究与集成)**
209
- - [ ] **全球数据源扩展:** 直接集成 OpenAlex、CORE Unpaywall。
210
- - [ ] **RSS 与博客监控:** 自动从您喜爱的实验室博客中发现新论文。
213
+ - [ ] **图片 OCR 与扫描 PDF:** 将截图与扫描版 PDF 导入维基。
214
+ - [ ] **论文版本追踪:** 当已导入的论文出现新修订版或正式发表版本时发出通知。
211
215
  - [ ] **Google Workspace:** 直接将 Google Docs 和 Sheets 导入知识图谱。
212
216
  - [ ] **多媒体支持:** 通过转录处理 YouTube 视频和音频录音。
213
217
  - [ ] **知识图谱审计:** 自动检测矛盾和结构偏移。
package/bin/lumina.js CHANGED
@@ -145,8 +145,21 @@ Examples:
145
145
  // ---------------------------------------------------------------------------
146
146
  // Global options
147
147
  // ---------------------------------------------------------------------------
148
+ //
149
+ // IMPORTANT: --directory has NO default here on purpose.
150
+ // If we set `process.cwd()` as the default, commander stores it on
151
+ // `globalOpts.directory` for every invocation — even when the user only
152
+ // passed `--cwd <path>` (which lands on globalOpts.cwd because commander
153
+ // hoists global-shaped flags up regardless of where in argv they appear).
154
+ // The merge expression in each subcommand uses
155
+ // cmdOpts.directory ?? cmdOpts.cwd ?? globalOpts.directory ?? globalOpts.cwd ?? process.cwd()
156
+ // and `??` short-circuits as soon as one of those is non-nullish — so a
157
+ // program-level default of process.cwd() would *always* win over the user's
158
+ // `--cwd` value. The trailing `?? process.cwd()` in the merge expression is
159
+ // the single source of truth for the no-flag default; do not duplicate it
160
+ // here. Regression: see test "install --cwd <tmp> writes into <tmp>, not cwd".
148
161
  program
149
- .option('--directory <path>', 'installation directory', process.cwd())
162
+ .option('--directory <path>', 'installation directory')
150
163
  .addOption(new Option('--cwd <path>', 'alias for --directory').hideHelp())
151
164
  .option('-y, --yes', 'accept all defaults (non-interactive)')
152
165
  .option('--no-update', 'skip npm registry version check')
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.3.0",
4
+ "version": "1.5.0",
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",
@@ -84,9 +84,10 @@
84
84
  "scripts": {
85
85
  "test": "npm run test:installer",
86
86
  "test:installer": "node --test bin/lumina.flags.test.js bin/lumina.deprecations.test.js bin/lumina.cancel.test.js src/installer/commands.test.js src/installer/fs.test.js src/installer/locales.test.js src/installer/manifest.test.js src/installer/prompts.test.js src/installer/readme-templates.test.js src/installer/template-engine.test.js src/installer/update-check.test.js",
87
- "test:scripts": "node --test src/scripts/lint.test.mjs src/scripts/reset.test.mjs src/scripts/wiki.test.mjs src/scripts/discover-runner.test.mjs src/scripts/external-ids.test.mjs src/scripts/parse-ids.test.mjs src/scripts/merge-ids.test.mjs src/scripts/build-source.test.mjs src/scripts/wiki-yaml-object.test.mjs",
87
+ "test:scripts": "node --test src/scripts/lint.test.mjs src/scripts/reset.test.mjs src/scripts/wiki.test.mjs src/scripts/discover-runner.test.mjs src/scripts/external-ids.test.mjs src/scripts/parse-ids.test.mjs src/scripts/merge-ids.test.mjs src/scripts/build-source.test.mjs src/scripts/wiki-yaml-object.test.mjs src/scripts/schemas.test.mjs",
88
88
  "test:python": "node scripts/run-pytest.mjs",
89
89
  "test:all": "npm run test:installer && npm run test:scripts && npm run test:python",
90
+ "test:catalog": "node --test scripts/verify-lumi-help.test.mjs",
90
91
  "test:fs": "node --test src/installer/fs.test.js",
91
92
  "test:manifest": "node --test src/installer/manifest.test.js",
92
93
  "test:template": "node --test src/installer/template-engine.test.js",
@@ -37,6 +37,7 @@ import {
37
37
  writeSkillsManifest,
38
38
  readFilesManifest,
39
39
  writeFilesManifest,
40
+ cleanupObsoleteCatalog,
40
41
  MANIFEST_SCHEMA_VERSION,
41
42
  } from './manifest.js';
42
43
  import {
@@ -111,6 +112,7 @@ const CORE_WIKI_DIRS = [
111
112
 
112
113
  const RESEARCH_WIKI_DIRS = ['wiki/foundations', 'wiki/topics'];
113
114
  const READING_WIKI_DIRS = ['wiki/chapters', 'wiki/characters', 'wiki/themes', 'wiki/plot'];
115
+ const LEARNING_WIKI_DIRS = ['wiki/reflections'];
114
116
 
115
117
  const CORE_RAW_DIRS = ['raw/sources', 'raw/notes', 'raw/assets', 'raw/tmp', 'raw/download'];
116
118
  const RESEARCH_RAW_DIRS = ['raw/discovered'];
@@ -123,7 +125,7 @@ const LUMINA_DIRS = [
123
125
  '_lumina/_state',
124
126
  ];
125
127
 
126
- const VALID_PACKS = new Set(['core', 'research', 'reading']);
128
+ const VALID_PACKS = new Set(['core', 'research', 'reading', 'learning']);
127
129
  const VALID_IDE_TARGETS = new Set(['claude_code', 'codex', 'cursor', 'gemini_cli', 'qwen', 'iflow', 'generic']);
128
130
 
129
131
  // ---------------------------------------------------------------------------
@@ -220,6 +222,7 @@ export async function installCommand(opts = {}) {
220
222
  const { projectName, researchPurpose, ideTargets, packs, communicationLang, documentOutputLang, locale } = answers;
221
223
  const hasResearch = packs.includes('research');
222
224
  const hasReading = packs.includes('reading');
225
+ const hasLearning = packs.includes('learning');
223
226
 
224
227
  console.log('');
225
228
  if (isUpgrade) {
@@ -241,6 +244,9 @@ export async function installCommand(opts = {}) {
241
244
  if (hasReading) {
242
245
  dirsToCreate.push(...READING_WIKI_DIRS);
243
246
  }
247
+ if (hasLearning) {
248
+ dirsToCreate.push(...LEARNING_WIKI_DIRS);
249
+ }
244
250
 
245
251
  for (const dir of dirsToCreate) {
246
252
  await ensureDir(join(projectRoot, dir));
@@ -255,6 +261,7 @@ export async function installCommand(opts = {}) {
255
261
  pack_core: true,
256
262
  pack_research: hasResearch,
257
263
  pack_reading: hasReading,
264
+ pack_learning: hasLearning,
258
265
  created_at: new Date().toISOString().slice(0, 10),
259
266
  schema_version: String(MANIFEST_SCHEMA_VERSION),
260
267
  };
@@ -338,6 +345,10 @@ export async function installCommand(opts = {}) {
338
345
  await writeManifest(projectRoot, manifest);
339
346
  await writeSkillsManifest(projectRoot, skillRows);
340
347
  await writeFilesManifest(projectRoot, fileRows);
348
+ // Remove pre-v1.4 catalog files (skills-catalog.md, _state/skills-manifest.json)
349
+ // if they linger from an earlier install. The canonical catalog is
350
+ // _lumina/schema/lumi-help.csv, rendered by renderSchemaDocs above.
351
+ await cleanupObsoleteCatalog(projectRoot);
341
352
 
342
353
  // 17.5. Post-upgrade: spawn lint --summary, print banner if findings exist
343
354
  if (isUpgrade && existingManifest.packageVersion !== PKG.version) {
@@ -759,6 +770,7 @@ async function renderAndWriteConfig(projectRoot, templateVars, answers) {
759
770
  core: true,
760
771
  research: answers.packs.includes('research'),
761
772
  reading: answers.packs.includes('reading'),
773
+ learning: answers.packs.includes('learning'),
762
774
  },
763
775
  paths: {
764
776
  raw: 'raw',
@@ -774,7 +786,7 @@ async function renderAndWriteConfig(projectRoot, templateVars, answers) {
774
786
  log_prefix: '## [{{date}}] {{skill}} | {{details}}',
775
787
  bidirectional_links: {
776
788
  mode: 'exempt-only',
777
- exemptions: ['foundations/**', 'outputs/**', '*://*'],
789
+ exemptions: ['foundations/**', 'outputs/**', '*://*', ...(answers.packs.includes('learning') ? ['reflections/**'] : [])],
778
790
  },
779
791
  graph: {
780
792
  enabled: true,
@@ -1025,6 +1037,7 @@ function getSkillDefs(packs) {
1025
1037
  { name: 'reset', canonicalId: 'lumi-reset', displayName: '/lumi-reset' },
1026
1038
  { name: 'verify', canonicalId: 'lumi-verify', displayName: '/lumi-verify' },
1027
1039
  { name: 'migrate-legacy', canonicalId: 'lumi-migrate-legacy', displayName: '/lumi-migrate-legacy' },
1040
+ { name: 'help', canonicalId: 'lumi-help', displayName: '/lumi-help' },
1028
1041
  ];
1029
1042
  for (const s of coreSkills) {
1030
1043
  defs.push({ ...s, pack: 'core', srcPackPath: 'core' });
@@ -1057,6 +1070,15 @@ function getSkillDefs(packs) {
1057
1070
  }
1058
1071
  }
1059
1072
 
1073
+ if (packs.includes('learning')) {
1074
+ const learningSkills = [
1075
+ { name: 'reflect', canonicalId: 'lumi-learning-reflect', displayName: '/lumi-learning-reflect' },
1076
+ ];
1077
+ for (const s of learningSkills) {
1078
+ defs.push({ ...s, pack: 'learning', srcPackPath: 'packs/learning' });
1079
+ }
1080
+ }
1081
+
1060
1082
  return defs;
1061
1083
  }
1062
1084
 
@@ -1086,7 +1108,7 @@ async function copyTools(projectRoot, { research }) {
1086
1108
 
1087
1109
  async function renderSchemaDocs(projectRoot, templateVars) {
1088
1110
  const schemaDir = join(projectRoot, '_lumina', 'schema');
1089
- const schemaDocs = ['page-templates.md', 'cross-reference-packs.md', 'graph-packs.md'];
1111
+ const schemaDocs = ['page-templates.md', 'cross-reference-packs.md', 'graph-packs.md', 'lumi-help.csv', 'lumi-help-runbook.md'];
1090
1112
 
1091
1113
  for (const doc of schemaDocs) {
1092
1114
  const templatePath = join(TEMPLATES_DIR, '_lumina', 'schema', doc);
@@ -1215,6 +1237,8 @@ async function buildFilesManifest(projectRoot, packs, pkgVersion) {
1215
1237
  '_lumina/schema/page-templates.md',
1216
1238
  '_lumina/schema/cross-reference-packs.md',
1217
1239
  '_lumina/schema/graph-packs.md',
1240
+ '_lumina/schema/lumi-help.csv',
1241
+ '_lumina/schema/lumi-help-runbook.md',
1218
1242
  'CLAUDE.md',
1219
1243
  'AGENTS.md',
1220
1244
  'GEMINI.md',
@@ -37,6 +37,8 @@ export default {
37
37
  'prompt.packs.option.research.hint': 'discover/survey/prefill/setup skills + source-fetcher tools',
38
38
  'prompt.packs.option.reading.label': 'Reading',
39
39
  'prompt.packs.option.reading.hint': 'chapter-ingest/character-track/theme-map/plot-recap skills',
40
+ 'prompt.packs.option.learning.label': 'Learning',
41
+ 'prompt.packs.option.learning.hint': 'self-reflection skills (reflect skill + wiki/reflections/)',
40
42
 
41
43
  // ── Language pair ──────────────────────────────────────────────────────────
42
44
  'prompt.communication_language.message': 'Communication language (how the LLM talks to you)',
@@ -36,6 +36,8 @@ export default {
36
36
  'prompt.packs.option.research.hint': 'kỹ năng discover/survey/prefill/setup + công cụ lấy nguồn',
37
37
  'prompt.packs.option.reading.label': 'Reading',
38
38
  'prompt.packs.option.reading.hint': 'kỹ năng chapter-ingest/character-track/theme-map/plot-recap',
39
+ 'prompt.packs.option.learning.label': 'Learning',
40
+ 'prompt.packs.option.learning.hint': 'kỹ năng tự phản tư (reflect + wiki/reflections/)',
39
41
 
40
42
  // ── Language pair ──────────────────────────────────────────────────────────
41
43
  'prompt.communication_language.message': 'Ngôn ngữ giao tiếp (LLM trò chuyện với bạn)',
@@ -42,6 +42,8 @@ export default {
42
42
  'prompt.packs.option.research.hint': 'discover/survey/prefill/setup 技能 + 来源抓取工具',
43
43
  'prompt.packs.option.reading.label': 'Reading',
44
44
  'prompt.packs.option.reading.hint': 'chapter-ingest/character-track/theme-map/plot-recap 技能',
45
+ 'prompt.packs.option.learning.label': 'Learning',
46
+ 'prompt.packs.option.learning.hint': '自我反思技能 (reflect 技能 + wiki/reflections/)',
45
47
 
46
48
  // ── Language pair ──────────────────────────────────────────────────────────
47
49
  'prompt.communication_language.message': '交流语言(LLM 与你对话使用的语言)',
@@ -3,10 +3,17 @@
3
3
  * @description Reader/writer for the three Lumina installer state files.
4
4
  *
5
5
  * Three state files (single concern each, atomic write per file):
6
- * 1. _lumina/manifest.json — install state
7
- * 2. _lumina/_state/skills-manifest.csv — skill inventory
6
+ * 1. _lumina/manifest.json — install state
7
+ * 2. _lumina/_state/skills-manifest.csv — skill inventory (paths/sha/version)
8
8
  * 3. _lumina/_state/files-manifest.csv — hash tracking
9
9
  *
10
+ * The workflow catalog is _lumina/schema/lumi-help.csv — it is the
11
+ * canonical source of truth for /lumi-help (read directly at runtime). No
12
+ * derived JSON mirror exists; commands.js renders the .csv template at
13
+ * install time and lumi-help reads it via Bash. Earlier versions of the
14
+ * installer wrote a derived _state/skills-manifest.json — that file is now
15
+ * obsolete and is cleaned up on re-install.
16
+ *
10
17
  * All writes go through atomicWrite from fs.js.
11
18
  * Reads are defensive: missing file → null; truncated CSV → empty rows + warning.
12
19
  */
@@ -355,12 +362,41 @@ export function migrateManifest(manifest, targetVersion) {
355
362
  return m;
356
363
  }
357
364
 
365
+ // ---------------------------------------------------------------------------
366
+ // Obsolete-file cleanup
367
+ // ---------------------------------------------------------------------------
368
+
369
+ /**
370
+ * Remove obsolete catalog files left behind by older installs.
371
+ *
372
+ * Pre-v1.4 installs wrote two files that are no longer used:
373
+ * - _lumina/schema/skills-catalog.md (replaced by lumi-help.csv)
374
+ * - _lumina/_state/skills-manifest.json (no longer derived)
375
+ *
376
+ * This is best-effort — missing files are not an error.
377
+ *
378
+ * @param {string} projectRoot
379
+ * @returns {Promise<void>}
380
+ */
381
+ export async function cleanupObsoleteCatalog(projectRoot) {
382
+ const { unlink } = await import('node:fs/promises');
383
+ const candidates = [
384
+ join(projectRoot, '_lumina', 'schema', 'skills-catalog.md'),
385
+ join(projectRoot, '_lumina', '_state', 'skills-manifest.json'),
386
+ ];
387
+ await Promise.all(candidates.map(async (p) => {
388
+ try { await unlink(p); } catch (err) {
389
+ if (err.code !== 'ENOENT') throw err;
390
+ }
391
+ }));
392
+ }
393
+
358
394
  // ---------------------------------------------------------------------------
359
395
  // State file paths helper
360
396
  // ---------------------------------------------------------------------------
361
397
 
362
398
  /**
363
- * Return the canonical paths for all three state files.
399
+ * Return the canonical paths for all installer state files.
364
400
  *
365
401
  * @param {string} projectRoot
366
402
  * @returns {{ manifestJson: string, skillsCsv: string, filesCsv: string }}
@@ -241,6 +241,7 @@ export async function runInstallPrompts({ acceptDefaults = false, cwd = process.
241
241
  options: [
242
242
  { value: 'research', label: t ? t('prompt.packs.option.research.label') : 'Research', hint: t ? t('prompt.packs.option.research.hint') : 'discover/survey/prefill/setup skills + source-fetcher tools' },
243
243
  { value: 'reading', label: t ? t('prompt.packs.option.reading.label') : 'Reading', hint: t ? t('prompt.packs.option.reading.hint') : 'chapter-ingest/character-track/theme-map/plot-recap skills' },
244
+ { value: 'learning', label: t ? t('prompt.packs.option.learning.label') : 'Learning', hint: t ? t('prompt.packs.option.learning.hint') : 'self-reflection skills (reflect skill + wiki/reflections/)' },
244
245
  ],
245
246
  required: false,
246
247
  });
@@ -1178,7 +1178,8 @@ async function runLint(projectRoot, opts) {
1178
1178
  allFindings.push(...checkL08(edges));
1179
1179
 
1180
1180
  if (indexContent !== undefined) {
1181
- allFindings.push(...checkL09(indexPath, indexContent, entityFiles));
1181
+ const indexEntityFiles = entityFiles.filter(f => !f.startsWith('reflections/'));
1182
+ allFindings.push(...checkL09(indexPath, indexContent, indexEntityFiles));
1182
1183
  }
1183
1184
 
1184
1185
  // L10: collect all foundation frontmatters in one pass, then check for alias conflicts.
@@ -1284,7 +1285,7 @@ async function applyFixes(findings, wikiRoot, edgesPath, indexPath, indexContent
1284
1285
  // Fix L09.
1285
1286
  const l09findings = findings.filter(f => f.id === 'L09-index-stale');
1286
1287
  if (l09findings.length > 0) {
1287
- const { newContent, preview } = fixL09(indexContent, entityFiles);
1288
+ const { newContent, preview } = fixL09(indexContent, entityFiles.filter(f => !f.startsWith('reflections/')));
1288
1289
  if (newContent !== indexContent) {
1289
1290
  if (opts.dryRun) {
1290
1291
  for (const f of l09findings) { f.proposed_fix = preview; }
@@ -35,6 +35,7 @@ export const SCHEMA_VERSION = '0.1.0';
35
35
  export const EXEMPTION_GLOBS = [
36
36
  'foundations/**',
37
37
  'outputs/**',
38
+ 'reflections/**',
38
39
  '*://*',
39
40
  ];
40
41
 
@@ -86,7 +87,7 @@ export const ENUMS = {
86
87
  // ---------------------------------------------------------------------------
87
88
 
88
89
  /**
89
- * @typedef {'core'|'research'|'reading'} Pack
90
+ * @typedef {'core'|'research'|'reading'|'learning'} Pack
90
91
  */
91
92
 
92
93
  /**
@@ -114,6 +115,9 @@ export const ENTITY_DIRS = {
114
115
  characters: { dir: 'characters/', pack: 'reading' },
115
116
  themes: { dir: 'themes/', pack: 'reading' },
116
117
  plot: { dir: 'plot/', pack: 'reading' },
118
+
119
+ // learning pack
120
+ reflections: { dir: 'reflections/', pack: 'learning' },
117
121
  };
118
122
 
119
123
  // ---------------------------------------------------------------------------
@@ -374,6 +378,18 @@ export const REQUIRED_FRONTMATTER = {
374
378
  { key: 'book', type: 'string', required: true, pack: 'reading' },
375
379
  { key: 'up_to_chapter', type: 'number', required: true, pack: 'reading' },
376
380
  ],
381
+
382
+ // Learning pack: reflection page (personal overlay — exempt from bidi links)
383
+ reflections: [
384
+ { key: 'id', type: 'string', required: true, pack: 'learning' },
385
+ { key: 'title', type: 'string', required: true, pack: 'learning' },
386
+ { key: 'type', type: 'string', required: true, pack: 'learning' },
387
+ { key: 'created', type: 'iso-date', required: true, pack: 'learning' },
388
+ { key: 'updated', type: 'iso-date', required: true, pack: 'learning' },
389
+ { key: 'related_concepts', type: 'array', required: true, pack: 'learning' },
390
+ { key: 'related_sources', type: 'array', required: true, pack: 'learning' },
391
+ { key: 'evolution_count', type: 'number', required: true, pack: 'learning' },
392
+ ],
377
393
  };
378
394
 
379
395
  // ---------------------------------------------------------------------------