lumina-wiki 1.4.0 → 1.5.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.
- package/CHANGELOG.md +15 -0
- package/README.md +10 -7
- package/README.vi.md +10 -7
- package/README.zh.md +10 -7
- package/package.json +2 -2
- package/src/installer/commands.js +18 -2
- package/src/installer/locales/en.mjs +2 -0
- package/src/installer/locales/vi.mjs +2 -0
- package/src/installer/locales/zh.mjs +2 -0
- package/src/installer/prompts.js +21 -3
- package/src/scripts/lint.mjs +3 -2
- package/src/scripts/schemas.mjs +17 -1
- package/src/skills/core/help/SKILL.md +1 -0
- package/src/skills/packs/learning/reflect/SKILL.md +190 -0
- package/src/templates/README.md +10 -0
- package/src/templates/README.vi.md +10 -0
- package/src/templates/README.zh.md +10 -0
- package/src/templates/_lumina/schema/cross-reference-packs.md +14 -0
- package/src/templates/_lumina/schema/lumi-help-runbook.md +6 -0
- package/src/templates/_lumina/schema/lumi-help.csv +3 -0
- package/src/templates/_lumina/schema/page-templates.md +35 -0
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,21 @@
|
|
|
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
|
+
|
|
6
21
|
## [1.4.0] - 2026-05-09
|
|
7
22
|
|
|
8
23
|
### Added — `/lumi-help` orientation skill (PR #9)
|
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 `
|
|
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 `
|
|
120
|
+
*Additional skills may be available if you installed optional packs such as `research`, `reading`, or `learning`.*
|
|
121
121
|
|
|
122
122
|
---
|
|
123
123
|
|
|
@@ -188,6 +188,7 @@ These are the commands you can use when chatting with your AI agent.
|
|
|
188
188
|
| | `/lumi-reading-character-track` | Track characters and their relationships in a story. |
|
|
189
189
|
| | `/lumi-reading-theme-map` | Identify and map themes in a narrative. |
|
|
190
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. |
|
|
191
192
|
|
|
192
193
|
The scripts behind these skills live in `_lumina/scripts/` and `_lumina/tools/`; you usually do not need to call them directly.
|
|
193
194
|
|
|
@@ -198,16 +199,18 @@ The scripts behind these skills live in `_lumina/scripts/` and `_lumina/tools/`;
|
|
|
198
199
|
Lumina-Wiki is evolving rapidly. Here is our user-facing roadmap:
|
|
199
200
|
|
|
200
201
|
**Near-term (Stability & New Ingestion)**
|
|
201
|
-
- [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.
|
|
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)*
|
|
202
204
|
- [x] **Multilingual setup:** Choose English, Vietnamese, or Chinese as your primary language during install. *(shipped in v1.2)*
|
|
203
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)*
|
|
204
|
-
- [ ] **Image OCR & Scanned PDFs:** Ingest screenshots and scanned PDFs into your wiki.
|
|
205
|
-
- [ ] **Advanced Paper Ranking:** See influence scores and quality signals for your research papers.
|
|
206
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.
|
|
207
210
|
|
|
208
211
|
**Long-term (Deep Research & Integration)**
|
|
209
|
-
- [ ] **
|
|
210
|
-
- [ ] **
|
|
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.
|
|
211
214
|
- [ ] **Google Workspace:** Ingest Google Docs and Sheets directly into your graph.
|
|
212
215
|
- [ ] **Multimedia Support:** Process YouTube videos and Audio recordings via transcripts.
|
|
213
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)
|
|
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 `
|
|
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
|
|
|
@@ -188,6 +188,7 @@ Xem [Hướng dẫn Nâng cao](docs/user-guide/advanced-qmd.vi.md) để biết
|
|
|
188
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. |
|
|
189
189
|
| | `/lumi-reading-theme-map` | Xác định và lập bản đồ các chủ đề trong một câu chuyện. |
|
|
190
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. |
|
|
191
192
|
|
|
192
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.
|
|
193
194
|
|
|
@@ -198,16 +199,18 @@ Các script chạy nền nằm trong `_lumina/scripts/` và `_lumina/tools/`; th
|
|
|
198
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:
|
|
199
200
|
|
|
200
201
|
**Sắp tới (Ổn định & Mở rộng nạp tài liệu)**
|
|
201
|
-
- [x] **Kỹ năng `/lumi-help`:** Trợ lý thông minh đọc trạng thái workspace và 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.
|
|
202
|
+
- [x] **Kỹ năng `/lumi-help`:** Trợ lý thông minh đọc trạng thái workspace và 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)*
|
|
202
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)*
|
|
203
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)*
|
|
204
|
-
- [ ] **OCR ảnh & PDF scan:** Nạp ảnh chụp màn hình và PDF dạng scan vào wiki.
|
|
205
|
-
- [ ] **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
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.
|
|
207
210
|
|
|
208
211
|
**Dài hạn (Nghiên cứu sâu & Tích hợp)**
|
|
209
|
-
- [ ] **
|
|
210
|
-
- [ ] **Theo dõi
|
|
212
|
+
- [ ] **OCR ảnh & PDF scan:** Nạp ảnh chụp màn hình và 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 có bản sửa đổi hoặc phiên bản xuất bản chính thức mới.
|
|
211
214
|
- [ ] **Google Workspace:** Nạp trực tiếp Google Docs và Sheets vào đồ thị tri thức.
|
|
212
215
|
- [ ] **Hỗ trợ đa phương tiện:** Xử lý video YouTube và ghi âm Audio thông qua transcript.
|
|
213
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
|
|
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` 或 `
|
|
120
|
+
*如果您安装了 `research`、`reading` 或 `learning` 等可选包,还会有额外技能可用。*
|
|
121
121
|
|
|
122
122
|
---
|
|
123
123
|
|
|
@@ -189,6 +189,7 @@ npx skills add https://github.com/tobi/qmd --skill qmd
|
|
|
189
189
|
| | `/lumi-reading-character-track`| 追踪故事中的角色及其关系。 |
|
|
190
190
|
| | `/lumi-reading-theme-map` | 识别并映射故事主题。 |
|
|
191
191
|
| | `/lumi-reading-plot-recap` | 提供情节的顺序回顾。 |
|
|
192
|
+
| **Learning** | `/lumi-learning-reflect` | 引导一次针对某个概念或资料的自我反思(self-reflection)。在 `wiki/reflections/` 中创建个人反思页,包含可改写的"当前理解"部分和只能追加的"演变日志"。AI 充当认知镜——引用你过去说的话并提问——但从不替你撰写反思内容。 |
|
|
192
193
|
|
|
193
194
|
后台脚本位于 `_lumina/scripts/` 和 `_lumina/tools/`;通常您不需要直接调用它们。
|
|
194
195
|
|
|
@@ -199,16 +200,18 @@ npx skills add https://github.com/tobi/qmd --skill qmd
|
|
|
199
200
|
Lumina-Wiki 正在快速演进。这是我们的用户路线图:
|
|
200
201
|
|
|
201
202
|
**近期计划(稳定性与新导入支持)**
|
|
202
|
-
- [x] **`/lumi-help` 技能:** 智能助手读取工作区状态并告诉你下一步该做什么;加参数 `/lumi-help skills` 可查看全部命令清单,或 `/lumi-help explain <主题>` 询问 Lumina
|
|
203
|
+
- [x] **`/lumi-help` 技能:** 智能助手读取工作区状态并告诉你下一步该做什么;加参数 `/lumi-help skills` 可查看全部命令清单,或 `/lumi-help explain <主题>` 询问 Lumina 本身的工作原理。*(v1.4 已发布)*
|
|
204
|
+
- [x] **学习包(Learning Pack):** 自我反思功能,帮助您追踪对某个概念的理解随时间的演变。*(v1.4 已发布)*
|
|
203
205
|
- [x] **多语言安装:** 安装时可选英文、越南文或中文作为主语言。*(v1.2 已发布)*
|
|
204
206
|
- [x] **原生 DOCX、RTF 与 EPUB 导入:** 通过 research pack 将 Word、Rich Text 与 EPUB 电子书直接导入维基。*(v1.x 已发布)*
|
|
205
|
-
- [ ] **图片 OCR 与扫描 PDF:** 将截图与扫描版 PDF 导入维基。
|
|
206
|
-
- [ ] **高级论文排名:** 查看研究论文的影响力评分和质量信号。
|
|
207
207
|
- [x] **改进的 CI/CD:** 正式支持 Bun 和 Node 22 环境。*(v1.2 已发布)*
|
|
208
|
+
- [ ] **全球数据源扩展:** 直接集成 OpenAlex、CORE 和 Unpaywall,实现可靠的 DOI-to-PDF 解析。
|
|
209
|
+
- [ ] **RSS 与博客监控:** 自动从您喜爱的实验室博客和期刊中发现新论文。
|
|
210
|
+
- [ ] **高级论文排名:** 查看研究论文的影响力评分和质量信号。
|
|
208
211
|
|
|
209
212
|
**长期计划(深度研究与集成)**
|
|
210
|
-
- [ ]
|
|
211
|
-
- [ ]
|
|
213
|
+
- [ ] **图片 OCR 与扫描 PDF:** 将截图与扫描版 PDF 导入维基。
|
|
214
|
+
- [ ] **论文版本追踪:** 当已导入的论文出现新修订版或正式发表版本时发出通知。
|
|
212
215
|
- [ ] **Google Workspace:** 直接将 Google Docs 和 Sheets 导入知识图谱。
|
|
213
216
|
- [ ] **多媒体支持:** 通过转录处理 YouTube 视频和音频录音。
|
|
214
217
|
- [ ] **知识图谱审计:** 自动检测矛盾和结构偏移。
|
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.
|
|
4
|
+
"version": "1.5.1",
|
|
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,7 +84,7 @@
|
|
|
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
90
|
"test:catalog": "node --test scripts/verify-lumi-help.test.mjs",
|
|
@@ -112,6 +112,7 @@ const CORE_WIKI_DIRS = [
|
|
|
112
112
|
|
|
113
113
|
const RESEARCH_WIKI_DIRS = ['wiki/foundations', 'wiki/topics'];
|
|
114
114
|
const READING_WIKI_DIRS = ['wiki/chapters', 'wiki/characters', 'wiki/themes', 'wiki/plot'];
|
|
115
|
+
const LEARNING_WIKI_DIRS = ['wiki/reflections'];
|
|
115
116
|
|
|
116
117
|
const CORE_RAW_DIRS = ['raw/sources', 'raw/notes', 'raw/assets', 'raw/tmp', 'raw/download'];
|
|
117
118
|
const RESEARCH_RAW_DIRS = ['raw/discovered'];
|
|
@@ -124,7 +125,7 @@ const LUMINA_DIRS = [
|
|
|
124
125
|
'_lumina/_state',
|
|
125
126
|
];
|
|
126
127
|
|
|
127
|
-
const VALID_PACKS = new Set(['core', 'research', 'reading']);
|
|
128
|
+
const VALID_PACKS = new Set(['core', 'research', 'reading', 'learning']);
|
|
128
129
|
const VALID_IDE_TARGETS = new Set(['claude_code', 'codex', 'cursor', 'gemini_cli', 'qwen', 'iflow', 'generic']);
|
|
129
130
|
|
|
130
131
|
// ---------------------------------------------------------------------------
|
|
@@ -221,6 +222,7 @@ export async function installCommand(opts = {}) {
|
|
|
221
222
|
const { projectName, researchPurpose, ideTargets, packs, communicationLang, documentOutputLang, locale } = answers;
|
|
222
223
|
const hasResearch = packs.includes('research');
|
|
223
224
|
const hasReading = packs.includes('reading');
|
|
225
|
+
const hasLearning = packs.includes('learning');
|
|
224
226
|
|
|
225
227
|
console.log('');
|
|
226
228
|
if (isUpgrade) {
|
|
@@ -242,6 +244,9 @@ export async function installCommand(opts = {}) {
|
|
|
242
244
|
if (hasReading) {
|
|
243
245
|
dirsToCreate.push(...READING_WIKI_DIRS);
|
|
244
246
|
}
|
|
247
|
+
if (hasLearning) {
|
|
248
|
+
dirsToCreate.push(...LEARNING_WIKI_DIRS);
|
|
249
|
+
}
|
|
245
250
|
|
|
246
251
|
for (const dir of dirsToCreate) {
|
|
247
252
|
await ensureDir(join(projectRoot, dir));
|
|
@@ -256,6 +261,7 @@ export async function installCommand(opts = {}) {
|
|
|
256
261
|
pack_core: true,
|
|
257
262
|
pack_research: hasResearch,
|
|
258
263
|
pack_reading: hasReading,
|
|
264
|
+
pack_learning: hasLearning,
|
|
259
265
|
created_at: new Date().toISOString().slice(0, 10),
|
|
260
266
|
schema_version: String(MANIFEST_SCHEMA_VERSION),
|
|
261
267
|
};
|
|
@@ -764,6 +770,7 @@ async function renderAndWriteConfig(projectRoot, templateVars, answers) {
|
|
|
764
770
|
core: true,
|
|
765
771
|
research: answers.packs.includes('research'),
|
|
766
772
|
reading: answers.packs.includes('reading'),
|
|
773
|
+
learning: answers.packs.includes('learning'),
|
|
767
774
|
},
|
|
768
775
|
paths: {
|
|
769
776
|
raw: 'raw',
|
|
@@ -779,7 +786,7 @@ async function renderAndWriteConfig(projectRoot, templateVars, answers) {
|
|
|
779
786
|
log_prefix: '## [{{date}}] {{skill}} | {{details}}',
|
|
780
787
|
bidirectional_links: {
|
|
781
788
|
mode: 'exempt-only',
|
|
782
|
-
exemptions: ['foundations/**', 'outputs/**', '*://*'],
|
|
789
|
+
exemptions: ['foundations/**', 'outputs/**', '*://*', ...(answers.packs.includes('learning') ? ['reflections/**'] : [])],
|
|
783
790
|
},
|
|
784
791
|
graph: {
|
|
785
792
|
enabled: true,
|
|
@@ -1063,6 +1070,15 @@ function getSkillDefs(packs) {
|
|
|
1063
1070
|
}
|
|
1064
1071
|
}
|
|
1065
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
|
+
|
|
1066
1082
|
return defs;
|
|
1067
1083
|
}
|
|
1068
1084
|
|
|
@@ -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 与你对话使用的语言)',
|
package/src/installer/prompts.js
CHANGED
|
@@ -151,7 +151,7 @@ export function buildPromptList(existingManifest, defaultLocale = 'en') {
|
|
|
151
151
|
* @param {Function} [opts.t] - Locale translator function.
|
|
152
152
|
* @returns {Promise<InstallAnswers>}
|
|
153
153
|
*/
|
|
154
|
-
export async function runInstallPrompts({ acceptDefaults = false, cwd = process.cwd(), existingManifest = null, defaultLocale = 'en', t = null } = {}) {
|
|
154
|
+
export async function runInstallPrompts({ acceptDefaults = false, cwd = process.cwd(), existingManifest = null, defaultLocale = 'en', t: initialT = null } = {}) {
|
|
155
155
|
if (acceptDefaults) {
|
|
156
156
|
const loc = existingManifest?.locale ?? defaultLocale;
|
|
157
157
|
return defaultAnswers(cwd, loc);
|
|
@@ -159,6 +159,11 @@ export async function runInstallPrompts({ acceptDefaults = false, cwd = process.
|
|
|
159
159
|
|
|
160
160
|
const { intro, outro, text, multiselect, select, confirm, isCancel, cancel } = await getClack();
|
|
161
161
|
|
|
162
|
+
// t starts as whatever the caller passed (may be null on fresh install where
|
|
163
|
+
// locale is unknown). After Prompt 0 selects the locale, we rebind t to the
|
|
164
|
+
// user-chosen locale so prompts 1-5 are localized.
|
|
165
|
+
let t = initialT;
|
|
166
|
+
|
|
162
167
|
// t may not be available yet at intro time (locale not yet selected);
|
|
163
168
|
// use hardcoded EN for intro — this is the chicken-and-egg prompt.
|
|
164
169
|
intro('Lumina Wiki Installer');
|
|
@@ -179,14 +184,26 @@ export async function runInstallPrompts({ acceptDefaults = false, cwd = process.
|
|
|
179
184
|
const locale = localeRaw;
|
|
180
185
|
const langDefault = LOCALE_LANGUAGE_NAME[locale] ?? 'English';
|
|
181
186
|
|
|
187
|
+
// Rebind t to the just-selected locale so the remaining prompts render in
|
|
188
|
+
// the user's chosen language. Without this, prompts 1-5 silently fall back
|
|
189
|
+
// to EN literals even when the user picked vi/zh at Prompt 0.
|
|
190
|
+
try {
|
|
191
|
+
const { loadLocale } = await import('./locales.js');
|
|
192
|
+
const localeMod = await loadLocale(locale);
|
|
193
|
+
t = localeMod.t;
|
|
194
|
+
} catch {
|
|
195
|
+
// Keep whatever t we had (possibly null → EN literals); never block install.
|
|
196
|
+
}
|
|
197
|
+
|
|
182
198
|
// Interactive locale-switch confirmation (Phase 5 §60-63):
|
|
183
199
|
// If user picks a locale different from the installed one on an upgrade,
|
|
184
200
|
// require explicit confirmation before destructively rewriting README.md
|
|
185
201
|
// and IDE stubs. Default N — protects user content.
|
|
186
202
|
if (existingManifest?.locale && existingManifest.locale !== locale) {
|
|
187
203
|
const proceed = await confirm({
|
|
188
|
-
// Use trilingual literal —
|
|
189
|
-
//
|
|
204
|
+
// Use trilingual literal — user is mid-switch, so both old and new
|
|
205
|
+
// locales are relevant context. t() is available here but intentionally
|
|
206
|
+
// not used so the warning is legible in either locale.
|
|
190
207
|
message: `Locale change ${existingManifest.locale} -> ${locale} will rewrite README.md and IDE stubs in the new locale. Outside-schema edits are preserved. Continue?`,
|
|
191
208
|
initialValue: false,
|
|
192
209
|
});
|
|
@@ -241,6 +258,7 @@ export async function runInstallPrompts({ acceptDefaults = false, cwd = process.
|
|
|
241
258
|
options: [
|
|
242
259
|
{ 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
260
|
{ 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' },
|
|
261
|
+
{ 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
262
|
],
|
|
245
263
|
required: false,
|
|
246
264
|
});
|
package/src/scripts/lint.mjs
CHANGED
|
@@ -1178,7 +1178,8 @@ async function runLint(projectRoot, opts) {
|
|
|
1178
1178
|
allFindings.push(...checkL08(edges));
|
|
1179
1179
|
|
|
1180
1180
|
if (indexContent !== undefined) {
|
|
1181
|
-
|
|
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; }
|
package/src/scripts/schemas.mjs
CHANGED
|
@@ -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
|
// ---------------------------------------------------------------------------
|
|
@@ -86,6 +86,7 @@ core → research → reading → other (alphabetical). Pack labels are hardcode
|
|
|
86
86
|
- `core` → "Core (always installed)"
|
|
87
87
|
- `research` → "Research pack"
|
|
88
88
|
- `reading` → "Reading pack"
|
|
89
|
+
- `learning` → "Learning pack"
|
|
89
90
|
- other → pack name with first letter capitalized
|
|
90
91
|
|
|
91
92
|
Each entry: `` `[<menu>]` `/<id>` <args if non-empty> — <description> ``. End with
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: lumi-learning-reflect
|
|
3
|
+
description: >
|
|
4
|
+
Guide a self-reflection session on a concept, source, or topic the user has studied.
|
|
5
|
+
Creates or updates a personal reflection page in wiki/reflections/ with a rewritable
|
|
6
|
+
"Current understanding" section and an append-only "Evolution" log. AI acts as a
|
|
7
|
+
metacognitive mirror — quotes the user's past words and asks questions — but never
|
|
8
|
+
writes reflection content. Use whenever the user invokes /lumi-learning-reflect, says
|
|
9
|
+
"reflect on <concept>", "update my reflection on <topic>", "what do I think about
|
|
10
|
+
<concept>?", "I want to journal about <topic>", "phản tư về <concept>", "suy ngẫm về
|
|
11
|
+
<topic>", "反思 <concept>", "我对 <topic> 的理解", or any phrasing indicating they want
|
|
12
|
+
to record or revisit their personal understanding of a wiki concept or source.
|
|
13
|
+
allowed-tools:
|
|
14
|
+
- Bash
|
|
15
|
+
- Read
|
|
16
|
+
- Write
|
|
17
|
+
- Edit
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
# /lumi-learning-reflect
|
|
21
|
+
|
|
22
|
+
Read `README.md` at the project root before this SKILL.md.
|
|
23
|
+
|
|
24
|
+
## TL;DR
|
|
25
|
+
|
|
26
|
+
Creates or updates a `wiki/reflections/<slug>.md` personal reflection page. AI acts as a
|
|
27
|
+
metacognitive mirror — it reads past entries, quotes the user's own words, and asks
|
|
28
|
+
questions — but **never writes reflection content**. The user writes their own understanding.
|
|
29
|
+
|
|
30
|
+
Reflection pages are a **personal overlay**. They do not write graph edges. They do not
|
|
31
|
+
require reverse links from academic pages. `reflections/**` is exempt from bidirectional-
|
|
32
|
+
link requirements.
|
|
33
|
+
|
|
34
|
+
## When to use
|
|
35
|
+
|
|
36
|
+
Invoke when the user wants to:
|
|
37
|
+
- Record their current understanding of a concept for the first time
|
|
38
|
+
- Revisit and update an existing reflection after learning more
|
|
39
|
+
- Compare their past understanding to their current one
|
|
40
|
+
- Receive prompting questions to deepen their thinking
|
|
41
|
+
|
|
42
|
+
This skill is **personal-layer only**. It does not modify concept, source, or any other
|
|
43
|
+
academic wiki pages.
|
|
44
|
+
|
|
45
|
+
## Inputs
|
|
46
|
+
|
|
47
|
+
- `<concept-id>` — optional. The slug of the concept, source, or topic to reflect on
|
|
48
|
+
(e.g. `cognitive-offloading`, `the-memory-paradox`). If omitted, ask the user what they
|
|
49
|
+
want to reflect on before proceeding.
|
|
50
|
+
|
|
51
|
+
## Preconditions
|
|
52
|
+
|
|
53
|
+
Before running:
|
|
54
|
+
1. Read `_lumina/config/lumina.config.yaml` to confirm `packs.learning: true`. If not
|
|
55
|
+
present, halt and inform the user that the learning pack is not installed.
|
|
56
|
+
2. Read `_lumina/schema/page-templates.md` for the Reflection page template.
|
|
57
|
+
3. If `<concept-id>` is provided, check whether a reflection page already exists at
|
|
58
|
+
`wiki/reflections/<concept-id>.md`.
|
|
59
|
+
|
|
60
|
+
## Workflow
|
|
61
|
+
|
|
62
|
+
### Step 1 — Load context (READ ONLY)
|
|
63
|
+
|
|
64
|
+
1. If the reflection page exists, read it fully. Note:
|
|
65
|
+
- The current `## Current understanding` text.
|
|
66
|
+
- The `## Evolution` log: how many entries, dates, and the trajectory of change.
|
|
67
|
+
- The `evolution_count` frontmatter field.
|
|
68
|
+
2. If related concept/source pages exist (from `related_concepts:` / `related_sources:`),
|
|
69
|
+
read their `## Definition` and `## Summary` sections only — do not scan the full page.
|
|
70
|
+
3. **Do not write anything yet.**
|
|
71
|
+
|
|
72
|
+
### Step 2 — Mirror mode (PROMPT ONLY)
|
|
73
|
+
|
|
74
|
+
Present to the user in their communication language (`communication_language` from
|
|
75
|
+
`_lumina/config/lumina.config.yaml`):
|
|
76
|
+
|
|
77
|
+
**If this is a new reflection (no existing page):**
|
|
78
|
+
> "There's no reflection yet on [Concept]. Before you write, tell me: what does
|
|
79
|
+
> [Concept] mean to you right now, in your own words?"
|
|
80
|
+
|
|
81
|
+
**If this is an existing reflection (page found):**
|
|
82
|
+
Quote 1–2 sentences from the user's most recent `## Evolution` entry (or from
|
|
83
|
+
`## Current understanding` if no Evolution entries exist). Then ask:
|
|
84
|
+
> "You wrote: '[quoted text]'. Has your understanding shifted since then? What would
|
|
85
|
+
> you add, remove, or change?"
|
|
86
|
+
|
|
87
|
+
Do **not** summarize the concept from the academic pages. Do not explain what the concept
|
|
88
|
+
means. Do not suggest answers. Just prompt and wait.
|
|
89
|
+
|
|
90
|
+
### Step 3 — User writes (WAIT)
|
|
91
|
+
|
|
92
|
+
Wait for the user to respond with their own words. **Do not proceed until the user
|
|
93
|
+
has provided content.** If the user asks "what should I write?" or "can you write it for
|
|
94
|
+
me?", respond:
|
|
95
|
+
> "This reflection is yours to write — I can only prompt you. What comes to mind when
|
|
96
|
+
> you think about [Concept]?"
|
|
97
|
+
|
|
98
|
+
### Step 4 — Ask follow-up questions (OPTIONAL, 1 round)
|
|
99
|
+
|
|
100
|
+
After the user has written something, you may ask **one clarifying question** to deepen
|
|
101
|
+
the reflection. Choose from question types appropriate to the trajectory:
|
|
102
|
+
|
|
103
|
+
- **Contrast**: "How is this different from [related concept] in your mind?"
|
|
104
|
+
- **Application**: "Can you think of a moment in your own learning where this happened?"
|
|
105
|
+
- **Uncertainty**: "What part of [Concept] are you least confident about?"
|
|
106
|
+
- **Implication**: "What would change in how you study if this is true?"
|
|
107
|
+
|
|
108
|
+
Then wait for the user's response, or let them decline to answer.
|
|
109
|
+
|
|
110
|
+
### Step 5 — Write the reflection page
|
|
111
|
+
|
|
112
|
+
Using the user's words (not a paraphrase, not a summary — their exact words), construct
|
|
113
|
+
or update the reflection page:
|
|
114
|
+
|
|
115
|
+
**Frontmatter updates:**
|
|
116
|
+
- `updated`: today's ISO date
|
|
117
|
+
- `evolution_count`: increment by 1 (or set to 1 for new pages)
|
|
118
|
+
- `related_concepts`: list any concept slugs the user mentioned or that were the focus
|
|
119
|
+
- `related_sources`: list any source slugs the user mentioned
|
|
120
|
+
|
|
121
|
+
**`## Current understanding` section:**
|
|
122
|
+
- Replace entirely with the user's written response from Step 3 (and any follow-up from
|
|
123
|
+
Step 4 if provided). This section is always the user's most recent understanding.
|
|
124
|
+
- Do **not** add any AI-generated text, qualifiers, or commentary.
|
|
125
|
+
|
|
126
|
+
**`## Evolution` section:**
|
|
127
|
+
- **Append only** — never edit or delete existing entries.
|
|
128
|
+
- Add a new entry at the **bottom** of the section:
|
|
129
|
+
```markdown
|
|
130
|
+
### YYYY-MM-DD — <brief label in 3–5 words>
|
|
131
|
+
<1–3 sentence summary of what the user wrote or changed in this session>
|
|
132
|
+
```
|
|
133
|
+
- The brief label should describe the shift (e.g. "First understanding", "Added contrast
|
|
134
|
+
with spaced repetition", "Revised after reading Memory Paradox").
|
|
135
|
+
- The summary in the Evolution entry may be written by the AI — it is a record of what
|
|
136
|
+
was written, not the reflection itself.
|
|
137
|
+
|
|
138
|
+
**Frontmatter `id` field (new pages only):** `reflection-<concept-id>` — flat slug with
|
|
139
|
+
`reflection-` prefix (e.g. `reflection-cognitive-offloading`). Do not use path-prefixed form.
|
|
140
|
+
|
|
141
|
+
**File path:**
|
|
142
|
+
- New page: `wiki/reflections/<concept-id>.md` — use `Write` tool
|
|
143
|
+
- Existing page: same path — use `Edit` tool. When editing, use the exact section heading
|
|
144
|
+
`## Current understanding` as the start anchor and `## Evolution` as the end boundary.
|
|
145
|
+
The `old_string` must span from `## Current understanding` through (but not including)
|
|
146
|
+
`## Evolution` — never let the match region cross into the Evolution log.
|
|
147
|
+
|
|
148
|
+
### Step 6 — Log and confirm
|
|
149
|
+
|
|
150
|
+
Append a log entry via the wiki engine:
|
|
151
|
+
|
|
152
|
+
```bash
|
|
153
|
+
node _lumina/scripts/wiki.mjs log lumi-learning-reflect "reflected on <concept-id>; evolution_count=<N>"
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
Then report to the user:
|
|
157
|
+
- Page path written/updated
|
|
158
|
+
- `evolution_count` after this session
|
|
159
|
+
- A one-sentence confirmation that their reflection is saved
|
|
160
|
+
|
|
161
|
+
## Output / DoD
|
|
162
|
+
|
|
163
|
+
- `wiki/reflections/<concept-id>.md` exists with valid frontmatter (`id`, `title`, `type:
|
|
164
|
+
reflection`, `created`, `updated`, `related_concepts`, `related_sources`, `evolution_count`).
|
|
165
|
+
- `## Current understanding` contains only the user's own words from this session.
|
|
166
|
+
- `## Evolution` has a new entry appended at the bottom; no existing entries are modified.
|
|
167
|
+
- `wiki/log.md` has one new appended line for this session.
|
|
168
|
+
- No academic pages (`wiki/concepts/`, `wiki/sources/`, `wiki/people/`, etc.) were modified.
|
|
169
|
+
- No graph edges were written (`edges.jsonl` unchanged).
|
|
170
|
+
|
|
171
|
+
## Boundary constraints (non-negotiable)
|
|
172
|
+
|
|
173
|
+
- **Never write to academic pages**: no edits to `wiki/concepts/`, `wiki/sources/`,
|
|
174
|
+
`wiki/people/`, or any non-reflection path.
|
|
175
|
+
- **Never write graph edges**: do not call `wiki.mjs add-edge` or modify `edges.jsonl`.
|
|
176
|
+
Frontmatter `related_concepts:` and `related_sources:` are the only connection mechanism.
|
|
177
|
+
- **Never generate reflection content**: the `## Current understanding` section must
|
|
178
|
+
contain only the user's own words. AI may only edit the Evolution entry summary and
|
|
179
|
+
the frontmatter fields.
|
|
180
|
+
- **No wikilinks in body**: reflection pages must not use `[[concept-slug]]` inline links.
|
|
181
|
+
Frontmatter lists only.
|
|
182
|
+
|
|
183
|
+
## Error cases
|
|
184
|
+
|
|
185
|
+
| Situation | Response |
|
|
186
|
+
|-----------|----------|
|
|
187
|
+
| Learning pack not installed (`packs.learning` not in config) | Halt. Inform user the learning pack is required. |
|
|
188
|
+
| User declines to write | Acknowledge and exit. Do not create an empty page. |
|
|
189
|
+
| `concept-id` not found in `wiki/concepts/` | Proceed anyway — reflections can be on any topic, not just existing concept pages. Note to user that no concept page was found. |
|
|
190
|
+
| Evolution entry already exists for today | Append a second entry for today with a different label. Do not merge. |
|
package/src/templates/README.md
CHANGED
|
@@ -48,6 +48,9 @@ Keep this mental map in immediate context:
|
|
|
48
48
|
{{#if pack_reading}}
|
|
49
49
|
- `wiki/chapters/`, `wiki/characters/`, `wiki/themes/`, `wiki/plot/` (pack: reading)
|
|
50
50
|
{{/if}}
|
|
51
|
+
{{#if pack_learning}}
|
|
52
|
+
- `wiki/reflections/` — personal reflection pages (pack: learning; personal overlay, not part of the academic graph)
|
|
53
|
+
{{/if}}
|
|
51
54
|
|
|
52
55
|
### `raw/` is user-owned
|
|
53
56
|
|
|
@@ -96,6 +99,7 @@ Every wiki page has a defined type, frontmatter, and section structure. **Open `
|
|
|
96
99
|
| Character | `characters/` | Character profile with arcs, relationships, key chapters (reading) |
|
|
97
100
|
| Theme | `themes/` | Thematic thread traced across the work (reading) |
|
|
98
101
|
| Plot | `plot/` | Plot threads, beats, and timeline (reading) |
|
|
102
|
+
{{/if}}{{#if pack_learning}}| Reflection | `reflections/`| Personal understanding of a concept; rewritable + append-only log (learning) |
|
|
99
103
|
{{/if}}
|
|
100
104
|
|
|
101
105
|
---
|
|
@@ -136,6 +140,8 @@ Some links are intentionally one-way. Defaults:
|
|
|
136
140
|
{{#if pack_research}}- **`foundations/**`** — terminal pages
|
|
137
141
|
{{/if}}- **`outputs/**`** — ephemeral artifacts
|
|
138
142
|
- **External URLs** (`*://*`) — out of wiki scope
|
|
143
|
+
{{#if pack_learning}}- **`reflections/**`** — personal overlay; never requires reverse links from academic pages
|
|
144
|
+
{{/if}}
|
|
139
145
|
|
|
140
146
|
Anything outside an exemption glob must be bidirectional.
|
|
141
147
|
|
|
@@ -197,6 +203,10 @@ Adds `/lumi-research-discover` (ranked candidate shortlist), `/lumi-research-wat
|
|
|
197
203
|
|
|
198
204
|
Adds `/lumi-reading-chapter-ingest` (file a chapter, update characters/themes/plot pages), `/lumi-reading-character-track` (build or refresh a character profile across chapters), `/lumi-reading-theme-map` (trace a theme across chapters with citations), `/lumi-reading-plot-recap` (summarize plot up to a chapter, spoiler-bounded).
|
|
199
205
|
{{/if}}
|
|
206
|
+
{{#if pack_learning}}### Pack: learning
|
|
207
|
+
|
|
208
|
+
Adds `/lumi-learning-reflect` (guide a self-reflection session; creates or updates a personal `wiki/reflections/` page with a rewritable `## Current understanding` section and an append-only `## Evolution` log; AI acts as a metacognitive mirror — quotes your past words and asks questions — but never writes reflection content for you).
|
|
209
|
+
{{/if}}
|
|
200
210
|
|
|
201
211
|
---
|
|
202
212
|
|
|
@@ -48,6 +48,9 @@ Ghi nhớ bản đồ tư duy này trong ngữ cảnh tức thì:
|
|
|
48
48
|
{{#if pack_reading}}
|
|
49
49
|
- `wiki/chapters/`, `wiki/characters/`, `wiki/themes/`, `wiki/plot/` (gói: reading)
|
|
50
50
|
{{/if}}
|
|
51
|
+
{{#if pack_learning}}
|
|
52
|
+
- `wiki/reflections/` — trang phản tư cá nhân (gói: learning; lớp phủ cá nhân, không thuộc đồ thị học thuật)
|
|
53
|
+
{{/if}}
|
|
51
54
|
|
|
52
55
|
### `raw/` thuộc quyền sở hữu của người dùng
|
|
53
56
|
|
|
@@ -96,6 +99,7 @@ Mỗi trang wiki có loại, frontmatter và cấu trúc phần được định
|
|
|
96
99
|
| Character | `characters/` | Hồ sơ nhân vật với diễn biến, mối quan hệ, các chương chính (reading) |
|
|
97
100
|
| Theme | `themes/` | Chủ đề xuyên suốt tác phẩm (reading) |
|
|
98
101
|
| Plot | `plot/` | Các luồng cốt truyện, nhịp điệu và dòng thời gian (reading) |
|
|
102
|
+
{{/if}}{{#if pack_learning}}| Reflection | `reflections/`| Hiểu biết cá nhân về một khái niệm; có thể cập nhật + nhật ký chỉ thêm (learning) |
|
|
99
103
|
{{/if}}
|
|
100
104
|
|
|
101
105
|
---
|
|
@@ -136,6 +140,8 @@ Một số liên kết cố ý chỉ một chiều. Mặc định:
|
|
|
136
140
|
{{#if pack_research}}- **`foundations/**`** — trang cuối cùng
|
|
137
141
|
{{/if}}- **`outputs/**`** — tạo phẩm tạm thời
|
|
138
142
|
- **URL bên ngoài** (`*://*`) — ngoài phạm vi wiki
|
|
143
|
+
{{#if pack_learning}}- **`reflections/**`** — lớp phủ cá nhân; không yêu cầu liên kết ngược từ các trang học thuật
|
|
144
|
+
{{/if}}
|
|
139
145
|
|
|
140
146
|
Bất kỳ thứ gì ngoài glob miễn trừ phải là hai chiều.
|
|
141
147
|
|
|
@@ -196,6 +202,10 @@ Thêm `/lumi-research-discover` (danh sách ứng viên được xếp hạng),
|
|
|
196
202
|
|
|
197
203
|
Thêm `/lumi-reading-chapter-ingest` (lưu chương, cập nhật trang nhân vật/chủ đề/cốt truyện), `/lumi-reading-character-track` (xây dựng hoặc làm mới hồ sơ nhân vật qua các chương), `/lumi-reading-theme-map` (truy tìm chủ đề qua các chương với trích dẫn), `/lumi-reading-plot-recap` (tóm tắt cốt truyện đến một chương, giới hạn spoiler).
|
|
198
204
|
{{/if}}
|
|
205
|
+
{{#if pack_learning}}### Gói: learning
|
|
206
|
+
|
|
207
|
+
Thêm `/lumi-learning-reflect` (hướng dẫn phiên phản tư; tạo hoặc cập nhật trang `wiki/reflections/` với phần `## Hiểu biết hiện tại` có thể cập nhật và nhật ký `## Tiến trình` chỉ thêm; AI hoạt động như gương nhận thức — trích dẫn lời bạn nói trước đây và đặt câu hỏi — nhưng không bao giờ tự viết nội dung phản tư).
|
|
208
|
+
{{/if}}
|
|
199
209
|
|
|
200
210
|
---
|
|
201
211
|
|
|
@@ -49,6 +49,9 @@
|
|
|
49
49
|
{{#if pack_reading}}
|
|
50
50
|
- `wiki/chapters/`、`wiki/characters/`、`wiki/themes/`、`wiki/plot/`(包:reading)
|
|
51
51
|
{{/if}}
|
|
52
|
+
{{#if pack_learning}}
|
|
53
|
+
- `wiki/reflections/` — 个人反思页面(包:learning;个人叠加层,不属于学术图谱)
|
|
54
|
+
{{/if}}
|
|
52
55
|
|
|
53
56
|
### `raw/` 属于用户
|
|
54
57
|
|
|
@@ -97,6 +100,7 @@
|
|
|
97
100
|
| Character | `characters/` | 包含弧线、关系、关键章节的人物档案(reading) |
|
|
98
101
|
| Theme | `themes/` | 贯穿作品的主题线索(reading) |
|
|
99
102
|
| Plot | `plot/` | 情节线索、节拍和时间线(reading) |
|
|
103
|
+
{{/if}}{{#if pack_learning}}| Reflection | `reflections/`| 对某个概念的个人理解;可更新内容 + 只追加的演化日志(learning) |
|
|
100
104
|
{{/if}}
|
|
101
105
|
|
|
102
106
|
---
|
|
@@ -137,6 +141,8 @@
|
|
|
137
141
|
{{#if pack_research}}- **`foundations/**`** — 终端页面
|
|
138
142
|
{{/if}}- **`outputs/**`** — 临时工件
|
|
139
143
|
- **外部 URL**(`*://*`)— 超出 wiki 范围
|
|
144
|
+
{{#if pack_learning}}- **`reflections/**`** — 个人叠加层;不需要学术页面的反向链接
|
|
145
|
+
{{/if}}
|
|
140
146
|
|
|
141
147
|
豁免 glob 之外的任何内容必须是双向的。
|
|
142
148
|
|
|
@@ -197,6 +203,10 @@
|
|
|
197
203
|
|
|
198
204
|
添加 `/lumi-reading-chapter-ingest`(归档章节,更新人物/主题/情节页面)、`/lumi-reading-character-track`(跨章节构建或刷新人物档案)、`/lumi-reading-theme-map`(带引用地跨章节追踪主题)、`/lumi-reading-plot-recap`(总结到某章为止的情节,受 spoiler 限制)。
|
|
199
205
|
{{/if}}
|
|
206
|
+
{{#if pack_learning}}### 包:learning
|
|
207
|
+
|
|
208
|
+
添加 `/lumi-learning-reflect`(引导自我反思会话;创建或更新 `wiki/reflections/` 页面,包含可更新的 `## 当前理解` 部分和只追加的 `## 演化` 日志;AI 充当认知镜子 — 引用您过去的话语并提问 — 但绝不为您撰写反思内容)。
|
|
209
|
+
{{/if}}
|
|
200
210
|
|
|
201
211
|
---
|
|
202
212
|
|
|
@@ -41,3 +41,17 @@ These apply in all workspaces regardless of installed packs.
|
|
|
41
41
|
| `chapters/C` -> `themes/T` | `themes/T` -> `chapters/C` | No |
|
|
42
42
|
| `characters/P` -> `characters/Q` | `characters/Q` -> `characters/P` | No |
|
|
43
43
|
{{/if}}
|
|
44
|
+
{{#if pack_learning}}
|
|
45
|
+
|
|
46
|
+
---
|
|
47
|
+
|
|
48
|
+
## Learning pack cross-reference rules
|
|
49
|
+
|
|
50
|
+
**No bidirectional-link rules.** `reflections/**` is listed in `EXEMPTION_GLOBS` — the entire directory is a personal overlay and is exempt from reverse-link requirements.
|
|
51
|
+
|
|
52
|
+
Reflection pages reference academic pages via frontmatter (`related_concepts:`, `related_sources:`) only. No graph edges are written and no reverse links are required from concept or source pages back to reflections.
|
|
53
|
+
|
|
54
|
+
| Forward link | Required reverse link | Exemption? |
|
|
55
|
+
|-------------------------------------|-------------------------------------------|------------|
|
|
56
|
+
| `reflections/R` -> anything | (no reverse required — personal overlay) | Yes |
|
|
57
|
+
{{/if}}
|
|
@@ -38,6 +38,9 @@ templated form.
|
|
|
38
38
|
- *Plus Lumina noun*: `lumi-`, `wiki`, `raw`, `foundations`, `outputs`,
|
|
39
39
|
`summary`, `concepts`, `sources`, `ingest`, `bidirectional`, `link`, `edge`,
|
|
40
40
|
`graph`, `frontmatter`, `slug`, `pack`, `lint`, `manifest`, `Lumina`.
|
|
41
|
+
{{#if pack_learning}}
|
|
42
|
+
Learning pack adds: `reflections`, `reflect`, `phản tư`, `反思`.
|
|
43
|
+
{{/if}}
|
|
41
44
|
|
|
42
45
|
If the question is about wiki *content* (not framework), bridge to `/lumi-ask`
|
|
43
46
|
instead of Mode C.
|
|
@@ -159,6 +162,9 @@ Pack labels (hardcoded):
|
|
|
159
162
|
- `core` → "Core (always installed)"
|
|
160
163
|
- `research` → "Research pack"
|
|
161
164
|
- `reading` → "Reading pack"
|
|
165
|
+
{{#if pack_learning}}
|
|
166
|
+
- `learning` → "Learning pack"
|
|
167
|
+
{{/if}}
|
|
162
168
|
- other → pack name with first letter capitalized
|
|
163
169
|
|
|
164
170
|
Output:
|
|
@@ -21,3 +21,6 @@ lumi-reading-character-track,RCT,reading,3-query,lumi-reading-chapter-ingest,,fa
|
|
|
21
21
|
lumi-reading-theme-map,RTM,reading,3-query,lumi-reading-chapter-ingest,,false,,wiki/themes/**,trace a theme across chapters with citations
|
|
22
22
|
lumi-reading-plot-recap,RPR,reading,3-query,lumi-reading-chapter-ingest,,false,,wiki/plot/**,spoiler-bounded plot summary up to a chapter
|
|
23
23
|
{{/if}}
|
|
24
|
+
{{#if pack_learning}}
|
|
25
|
+
lumi-learning-reflect,LR,learning,anytime,,,false,[concept-id],wiki/reflections/**,guide a self-reflection session; create or update a personal reflection page
|
|
26
|
+
{{/if}}
|
|
@@ -213,3 +213,38 @@ book: book-slug
|
|
|
213
213
|
- `## Related themes`
|
|
214
214
|
- `## Notes`
|
|
215
215
|
{{/if}}
|
|
216
|
+
{{#if pack_learning}}
|
|
217
|
+
|
|
218
|
+
---
|
|
219
|
+
|
|
220
|
+
## Reflection page — `wiki/reflections/<slug>.md` (learning pack)
|
|
221
|
+
|
|
222
|
+
Created and updated via `/lumi-learning-reflect`. AI never writes reflection content.
|
|
223
|
+
|
|
224
|
+
```yaml
|
|
225
|
+
---
|
|
226
|
+
id: reflection-<slug>
|
|
227
|
+
title: "My understanding of <Concept Name>"
|
|
228
|
+
type: reflection
|
|
229
|
+
created: YYYY-MM-DD
|
|
230
|
+
updated: YYYY-MM-DD
|
|
231
|
+
related_concepts:
|
|
232
|
+
- concept-slug
|
|
233
|
+
related_sources:
|
|
234
|
+
- source-slug
|
|
235
|
+
evolution_count: 1
|
|
236
|
+
---
|
|
237
|
+
```
|
|
238
|
+
|
|
239
|
+
**Sections:**
|
|
240
|
+
- `## Current understanding` — **rewritable**: the user's latest thinking in their own words; AI may quote past versions to prompt reflection but never edits this section
|
|
241
|
+
- `## Evolution` — **append-only**: one dated entry per reflection session; never edit or delete entries
|
|
242
|
+
|
|
243
|
+
**Evolution entry format:**
|
|
244
|
+
```markdown
|
|
245
|
+
### YYYY-MM-DD — <brief label>
|
|
246
|
+
<What you wrote or changed in this session (1–3 sentences)>
|
|
247
|
+
```
|
|
248
|
+
|
|
249
|
+
**Boundary rule:** Reflection pages are **personal overlay** — they reference academic pages via frontmatter only (no wikilinks that create graph edges). Do not write `[[concept-slug]]` inline body links; reference concepts only in `related_concepts:` frontmatter. No reverse link is required from concept/source pages back to reflections.
|
|
250
|
+
{{/if}}
|