lifeos 1.0.0 → 1.0.2

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/README.md CHANGED
@@ -1,122 +1,122 @@
1
1
  # LifeOS
2
2
 
3
- 中文 | [English](./README.en.md)
3
+ [中文](./README.zh.md) | English
4
4
 
5
- LifeOS 帮助你将碎片灵感发展为结构化知识,并真正掌握它,从随手捕获的想法,到头脑风暴与深度研究,到体系化的项目规划与知识笔记,再到间隔复习与掌握度追踪。目标不只是建立知识库,而是帮你理解、内化和驾驭复杂知识。
5
+ LifeOS helps you grow scattered ideas into structured knowledge and truly master it, from quick captures, to brainstorming and deep research, to systematic project planning and knowledge notes, to spaced review and mastery tracking. The goal is not just building a knowledge base, but helping you understand, internalize, and command complex knowledge.
6
6
 
7
- ## 核心功能
7
+ ## Core Features
8
8
 
9
- ### 记忆系统
9
+ ### Memory System
10
10
 
11
- > 记忆系统是 LifeOS 的核心能力,它以目录级、技能绑定的方式工作,把学习过程中的上下文、偏好与决策持续沉淀下来,让长期学习更连贯、更可追踪,也更容易形成积累。
11
+ > The memory system is LifeOS's core capability. It works in a directory-scoped, skill-bound way, continuously preserving the context, preferences, and decisions that emerge during learning so long-term learning becomes more continuous, more traceable, and easier to build on.
12
12
 
13
- #### 跨会话连续性
13
+ #### Cross-session continuity
14
14
 
15
- 会话桥接和活跃文档上下文会持续沉淀,Agent 不只依赖当前对话。
15
+ Session bridges and active-document context persist, so agents do not depend only on the current conversation.
16
16
 
17
- #### 项目级、技能绑定
17
+ #### Project-scoped and skill-bound
18
18
 
19
- 记忆系统围绕当前 Vault 中的 LifeOS 项目运行,只在 `today`、`project`、`research`、`knowledge`、`revise`、`archive` 等技能工作流里激活,并持续积累偏好、决策和上下文。
19
+ The memory system runs around the current LifeOS project in the vault, activates only inside workflows such as `today`, `project`, `research`, `knowledge`, `revise`, and `archive`, and keeps accumulating preferences, decisions, and context.
20
20
 
21
- #### 比全局记忆更可控
21
+ #### More controllable than global memory
22
22
 
23
- 相较于把跨目录内容和全局会话混在一起的记忆方式,项目级、技能绑定的记忆系统能减少无关噪声,让检索结果与后续决策更贴近当前 LifeOS 工作流。
23
+ Compared with a memory model that mixes cross-directory content and global conversations together, a project-scoped, skill-bound memory system reduces irrelevant noise and keeps retrieval and follow-up decisions closer to the current LifeOS workflow.
24
24
 
25
- ### 目录自定义
25
+ ### Directory Customization
26
26
 
27
- LifeOS 不把目录命名固定死。执行 `lifeos rename [path]` 后,CLI 会交互式列出当前 Vault 中可调整的目录,引导你选择目录并输入新名称。
27
+ LifeOS does not lock you into fixed directory names. Run `lifeos rename [path]` and the CLI will interactively list the directories that can be adjusted in the current vault, then guide you through choosing one and entering a new name.
28
28
 
29
- 它会同步更新 `lifeos.yaml`、重命名实际目录,并批量替换 Vault 中所有相关的 wikilink。你可以根据自己的工作流、语言习惯和项目结构自由调整目录名称,同时保持配置和链接关系一致。
29
+ It updates `lifeos.yaml`, renames the actual directory, and batch-replaces all related wikilinks across the vault. That lets you adapt directory names to your own workflow, language preference, and project structure while keeping configuration and links consistent.
30
30
 
31
- ### 学习工作流
31
+ ### Learning Workflows
32
32
 
33
- LifeOS 提供一组围绕学习过程设计的 Agent 技能,把“输入 -> 理解 -> 产出 -> 巩固”串成连续工作流:
33
+ LifeOS provides a set of Agent skills designed around the learning process, connecting "input -> understanding -> output -> reinforcement" into a continuous workflow:
34
34
 
35
- - `/today`、`/brainstorm`、`/ask`:整理当天重点、澄清问题、快速展开想法
36
- - `/project`、`/research`、`/knowledge`:把主题推进成项目、研究报告和知识笔记
37
- - `/read-pdf`、`/revise`、`/archive`:从资料提取、复习巩固,到定期归档收束
35
+ - `/today`, `/brainstorm`, `/ask`: organize the day's focus, clarify questions, and quickly expand ideas
36
+ - `/project`, `/research`, `/knowledge`: turn a topic into a project, a research report, and structured knowledge notes
37
+ - `/read-pdf`, `/revise`, `/archive`: move from source extraction, to review and reinforcement, to periodic archiving
38
38
 
39
- ## 核心组件
39
+ ## Core Components
40
40
 
41
- - **记忆系统**:项目级、技能绑定,为 AI Agent 提供 Vault 索引、会话记忆、上下文组装
42
- - **CLI 脚手架**:全局安装后使用 `lifeos init` 一键创建工作空间
43
- - **技能系统**:9 Agent 技能覆盖日记、项目、研究、知识整理、复习等工作流
44
- - **模板 + 规范**:8 个结构化模板 + Frontmatter 规范,确保笔记一致性
41
+ - **Memory system** Project-scoped and skill-bound, providing vault indexing, session memory, and context assembly for AI agents
42
+ - **CLI scaffold** — install globally, then use `lifeos init` to bootstrap a complete workspace
43
+ - **Skill system** — 9 Agent skills covering diary, projects, research, knowledge curation, review, and more
44
+ - **Templates + Schema** — 8 structured templates + Frontmatter schema for consistent notes
45
45
 
46
- ## 快速开始
46
+ ## Quick Start
47
47
 
48
- 目前仅在 macOS 上实际验证过 Agent CLI 流程;Agent GUI 端尚未系统测试,Windows 环境也还未验证,因此这两部分暂时不能保证体验完全一致。
48
+ At the moment, only the Agent CLI workflow has been verified in practice on macOS. The Agent GUI path has not been systematically tested yet, and Windows has not been verified either, so the experience there may not be fully consistent yet.
49
49
 
50
- ### 前置要求
50
+ ### Prerequisites
51
51
 
52
- 开始前,请确保本机已安装 Obsidian,以及 Claude Code CLI / Codex CLI / OpenCode CLI 中至少一种。
52
+ Before starting, make sure Obsidian and at least one of Claude Code CLI / Codex CLI / OpenCode CLI are installed locally.
53
53
 
54
- | 依赖 | 必须 | 用途 |
54
+ | Dependency | Required | Purpose |
55
55
  |---|---|---|
56
- | **Node.js 18+** | 必须 | MCP Server CLI 运行环境 |
57
- | **Git** | 必须 | Vault 版本控制(包括记忆数据库) |
58
- | **Python 3** | 必须 | PDF 提取(`/read-pdf` 技能) |
56
+ | **Node.js 18+** | Required | Runtime for MCP server and CLI |
57
+ | **Git** | Required | Version control for vault data, including the memory DB |
58
+ | **Python 3** | Required | PDF extraction (`/read-pdf` skill) |
59
59
 
60
- `lifeos init` 会在创建工作空间前自动检查所有前置依赖。
60
+ `lifeos init` checks all prerequisites before creating the workspace.
61
61
 
62
- ### 安装与初始化
62
+ ### Installation and Initialization
63
63
 
64
64
  ```bash
65
- # 第一步:全局安装 CLI
65
+ # Step 1: install the CLI globally
66
66
  npm install -g lifeos
67
67
 
68
- # 第二步:创建新的 LifeOS 工作空间(根据系统 locale 自动检测语言)
68
+ # Step 2: create a new LifeOS workspace (auto-detects language from system locale)
69
69
  lifeos init ./my-vault
70
70
 
71
- # 或显式指定语言
72
- lifeos init ./my-vault --lang zh # 中文
73
- lifeos init ./my-vault --lang en # 英文
71
+ # Or specify language explicitly
72
+ lifeos init ./my-vault --lang zh # Chinese
73
+ lifeos init ./my-vault --lang en # English
74
74
  ```
75
75
 
76
- 安装完成后,MCP server 配置会自动注册到以下工具:
76
+ After init, MCP server configs are automatically registered for:
77
77
 
78
- | 工具 | 配置文件 |
78
+ | Tool | Config file |
79
79
  |---|---|
80
80
  | **Claude Code** | `.mcp.json` |
81
81
  | **Codex** | `.codex/config.toml` |
82
82
  | **OpenCode** | `opencode.json` |
83
83
 
84
- Vault 目录下启动任一工具即可使用所有技能。
84
+ Launch any of these tools in the vault directory to use all skills.
85
85
 
86
- ## CLI 命令
86
+ ## CLI Commands
87
87
 
88
88
  ```bash
89
- lifeos init [path] [--lang zh|en] [--no-mcp] # 创建新 Vault
90
- lifeos upgrade [path] [--lang zh|en] [--override] # 升级并补齐资产与脚手架
91
- lifeos doctor [path] # 健康检查
92
- lifeos rename [path] # 交互式重命名目录
93
- lifeos --help # 查看帮助
94
- lifeos --version # 查看版本
89
+ lifeos init [path] [--lang zh|en] [--no-mcp] # Create a new vault
90
+ lifeos upgrade [path] [--lang zh|en] [--override] # Upgrade and restore assets/scaffold
91
+ lifeos doctor [path] # Health check
92
+ lifeos rename [path] # Interactive directory rename
93
+ lifeos --help # Show help
94
+ lifeos --version # Show version
95
95
  ```
96
96
 
97
97
  ### init
98
98
 
99
- 创建完整的 LifeOS 工作空间:
99
+ Creates a complete LifeOS workspace:
100
100
 
101
- - 10 个顶层目录 + 嵌套子目录
102
- - 8 Markdown 模板
103
- - Frontmatter 规范
104
- - 9 AI 技能(按语言自动切换)
105
- - `CLAUDE.md` Agent 行为规范
106
- - `lifeos.yaml` 配置文件
107
- - Git 初始化 + `.gitignore`
108
- - MCP Server 注册(Claude Code / Codex / OpenCode
101
+ - 10 top-level directories plus nested subdirectories
102
+ - 8 Markdown templates
103
+ - Frontmatter schema
104
+ - 9 AI skills with language-aware assets
105
+ - `CLAUDE.md` agent behavior spec
106
+ - `lifeos.yaml` config
107
+ - Git init plus `.gitignore`
108
+ - MCP server registration (Claude Code / Codex / OpenCode)
109
109
 
110
110
  ### upgrade
111
111
 
112
- 对已初始化的 Vault 执行升级与补全:
112
+ Upgrades and re-syncs an initialized vault:
113
113
 
114
- - **智能合并**:模板、规范、内置提示词、技能文件未修改则更新,已修改则跳过并警告
115
- - **缺失补全**:缺失的目录和脚手架文件会补回,例如记忆目录、`.claude/skills`、`CLAUDE.md`、`AGENTS.md`、`.gitignore`、`.git`、MCP 配置
116
- - **保留用户修改**:已存在且被用户改过的内置文件不会被强制覆盖
117
- - **`--override` 强制刷新资源**:覆盖模板、规范、提示词、技能、`CLAUDE.md`、`AGENTS.md` 以及 MCP 配置,但不会删除用户笔记、资源、`memory.db`、记忆系统数据,也不会改写 `lifeos.yaml` 里的目录和记忆配置
114
+ - **Smart merge**: update unmodified templates, schema files, built-in prompts, and skill files; skip modified ones with a warning
115
+ - **Restore missing scaffold**: bring back missing directories and managed files such as the memory directory, `.claude/skills`, `CLAUDE.md`, `AGENTS.md`, `.gitignore`, `.git`, and MCP config entries
116
+ - **Preserve user changes**: built-in files already customized by the user are not force-overwritten
117
+ - **`--override` force-refreshes resources**: overwrite templates, schema, prompts, skills, `CLAUDE.md`, `AGENTS.md`, and MCP config entries without deleting user notes, resources, `memory.db`, memory-system data, or custom directory/memory settings in `lifeos.yaml`
118
118
 
119
- 默认执行 `lifeos upgrade` 时,会尽量保留你已经改过的资源文件,只更新未修改内容并补齐缺失项。如果你希望直接用当前版本的内置模板、技能、规范和 MCP 配置重新覆盖这些资源,可以显式加上 `--override`:
119
+ By default, `lifeos upgrade` tries to preserve resource files you have already modified, while updating untouched content and restoring anything missing. If you want to explicitly replace those resources with the current built-in templates, skills, schema files, and MCP config entries, use `--override`:
120
120
 
121
121
  ```bash
122
122
  lifeos upgrade ./my-vault --override
@@ -124,79 +124,79 @@ lifeos upgrade ./my-vault --override
124
124
 
125
125
  ### doctor
126
126
 
127
- 检查 Vault 完整性:目录结构、模板、规范、技能、配置文件、Node.js 版本、资产版本。
127
+ Checks vault integrity: directory structure, templates, schema, skills, config, Node.js version, and asset version.
128
128
 
129
- ### rename:目录可自定义化
129
+ ### rename: Directory Customization
130
130
 
131
- 无需额外参数,直接执行 `lifeos rename [path]` 后,CLI 会列出当前 Vault 中可调整的目录,并通过交互引导你选择目录和输入新名称。它会同步更新 `lifeos.yaml`、重命名实际目录,并批量替换 Vault 中所有相关的 wikilink。
131
+ No extra flags are required. Run `lifeos rename [path]` and the CLI will show the directories available in the current vault, then guide you step by step to choose one and enter a new name. It updates `lifeos.yaml`, renames the actual directory, and batch-replaces related wikilinks across the vault.
132
132
 
133
- 这意味着 LifeOS 的目录命名不是固定死的。你可以根据自己的工作流、语言习惯和项目结构,自由调整各个目录的名称,同时保持配置和链接关系一致,获得最大的使用自由度。
133
+ This means LifeOS does not lock you into fixed directory names. You can freely adapt directory names to your own workflow, language preference, and project structure while keeping configuration and links consistent.
134
134
 
135
- ## 技能一览
135
+ ## Skills
136
136
 
137
- | 技能 | 功能 |
137
+ | Skill | Description |
138
138
  |---|---|
139
- | `/today` | 晨间规划:回顾昨日、规划今日 |
140
- | `/project` | 想法 结构化项目 |
141
- | `/research` | 主题 深度研究报告 |
142
- | `/knowledge` | 书籍/论文 知识笔记 |
143
- | `/revise` | 生成复习题、批改、追踪掌握度 |
144
- | `/read-pdf` | PDF 结构化笔记 |
145
- | `/ask` | 快速问答 |
146
- | `/brainstorm` | 交互式头脑风暴 |
147
- | `/archive` | 归档已完成的项目、已处理的草稿、已完成的计划,以及超过最近 7 天的日记 |
139
+ | `/today` | Morning planning: review yesterday, plan today |
140
+ | `/project` | Idea -> structured project |
141
+ | `/research` | Topic -> deep research report |
142
+ | `/knowledge` | Book/paper -> knowledge note |
143
+ | `/revise` | Generate quizzes, grade, and track mastery |
144
+ | `/read-pdf` | PDF -> structured notes |
145
+ | `/ask` | Quick Q&A |
146
+ | `/brainstorm` | Interactive brainstorming |
147
+ | `/archive` | Archive completed projects, processed drafts, completed plans, and diary entries older than the most recent 7 days |
148
148
 
149
- ## 自定义专家提示词
149
+ ## Custom Expert Prompts
150
150
 
151
- `/research` 技能会自动扫描 Vault 中提示词目录下的所有专家人格文件。LifeOS 内置了 AI/LLM、数学、艺术、历史等领域的专家人格,你可以添加自己的提示词来扩展研究能力到任何领域。
151
+ The `/research` skill automatically scans the Prompts directory in your vault for expert prompt files. LifeOS ships with built-in expert prompts for AI/LLM, Math, Art, and History, and you can add your own to extend research capabilities to any domain.
152
152
 
153
- ### 工作原理
153
+ ### How It Works
154
154
 
155
- 调用 `/research` 时,Planning Agent 会:
155
+ When you invoke `/research`, the Planning Agent:
156
156
 
157
- 1. 列出 `{系统目录}/提示词/` 下所有 `.md` 文件
158
- 2. 读取每个文件的 frontmatter 和**领域覆盖**章节
159
- 3. 将研究主题与最匹配的专家提示词进行比对
160
- 4. 将匹配的专家提示词的分析框架和输出格式应用到研究报告中
157
+ 1. Lists all `.md` files in `{system directory}/Prompts/`
158
+ 2. Reads each file's frontmatter and **Domain Coverage** section
159
+ 3. Matches the research topic to the best-fit expert prompt
160
+ 4. Applies the matched prompt's analytical framework and output format to the research report
161
161
 
162
- ### 添加自定义专家提示词
162
+ ### Adding Custom Expert Prompts
163
163
 
164
- Vault 的提示词目录(`{系统目录}/提示词/`)下创建 `.md` 文件即可。Planning Agent 在下次 `/research` 调用时会自动发现,无需重启或重新初始化。文件结构参照同目录下的预设提示词即可。
164
+ Create a `.md` file in your vault's Prompts directory (`{system directory}/Prompts/`). The Planning Agent will pick it up automatically on the next `/research` invocation, with no restart or re-init required. Use the built-in prompts in the same directory as a reference for structure.
165
165
 
166
- ## 技术栈
166
+ ## Tech Stack
167
167
 
168
168
  - **Runtime:** TypeScript + Node.js 18+
169
- - **Database:** SQLite + FTS5(全文搜索)
170
- - **Segmentation:** @node-rs/jieba(中文分词)
169
+ - **Database:** SQLite + FTS5 (full-text search)
170
+ - **Segmentation:** @node-rs/jieba (Chinese tokenization)
171
171
  - **Protocol:** MCP (Model Context Protocol)
172
- - **Vault:** Obsidian(纯 Markdown + Frontmatter
172
+ - **Vault:** Obsidian (plain Markdown + Frontmatter)
173
173
 
174
- ## 里程碑
174
+ ## Milestones
175
175
 
176
- - ✅ LifeOS 1.0 版本已初步可用
177
- - ✅ CLI 支持目录自定义
178
- - ✅ CLI upgrade 支持智能更新
179
- - ✅ macOS 端 Agent CLI 已测试
180
- - ☐ Agent GUI Windows 测试与支持
181
- - ☐ 强化记忆系统精准性
182
- - ☐ 支持自定义技能
183
- - ☐ 支持自定义工作流
176
+ - ✅ LifeOS 1.0 is now basically usable
177
+ - ✅ The CLI supports directory customization
178
+ - ✅ The CLI `upgrade` command supports smart updates
179
+ - ✅ Agent CLI has been tested on macOS
180
+ - ☐ Test and support Agent GUI and Windows
181
+ - ☐ Improve memory-system precision
182
+ - ☐ Support custom skills
183
+ - ☐ Support custom workflows
184
184
 
185
- ## 开发
185
+ ## Development
186
186
 
187
187
  ```bash
188
188
  git clone git@github.com:luneth90/lifeos.git
189
189
  cd lifeos
190
190
  npm install
191
- npm run build # 编译 TypeScript
192
- npm test # 运行测试(431 个)
193
- npm run dev # 开发模式(热重载)
191
+ npm run build # Compile TypeScript
192
+ npm test # Run tests (431 tests)
193
+ npm run dev # Dev mode (hot reload)
194
194
  ```
195
195
 
196
196
  ## License
197
197
 
198
198
  [MIT](LICENSE)
199
199
 
200
- ## 致谢
200
+ ## Acknowledgements
201
201
 
202
- 本项目的灵感来源于 [MarsWang42/OrbitOS](https://github.com/MarsWang42/OrbitOS)
202
+ This project was inspired by [MarsWang42/OrbitOS](https://github.com/MarsWang42/OrbitOS).
package/README.zh.md ADDED
@@ -0,0 +1,202 @@
1
+ # LifeOS
2
+
3
+ [English](./README.md) | 中文
4
+
5
+ LifeOS 帮助你将碎片灵感发展为结构化知识,并真正掌握它,从随手捕获的想法,到头脑风暴与深度研究,到体系化的项目规划与知识笔记,再到间隔复习与掌握度追踪。目标不只是建立知识库,而是帮你理解、内化和驾驭复杂知识。
6
+
7
+ ## 核心功能
8
+
9
+ ### 记忆系统
10
+
11
+ > 记忆系统是 LifeOS 的核心能力,它以目录级、技能绑定的方式工作,把学习过程中的上下文、偏好与决策持续沉淀下来,让长期学习更连贯、更可追踪,也更容易形成积累。
12
+
13
+ #### 跨会话连续性
14
+
15
+ 会话桥接和活跃文档上下文会持续沉淀,Agent 不只依赖当前对话。
16
+
17
+ #### 项目级、技能绑定
18
+
19
+ 记忆系统围绕当前 Vault 中的 LifeOS 项目运行,只在 `today`、`project`、`research`、`knowledge`、`revise`、`archive` 等技能工作流里激活,并持续积累偏好、决策和上下文。
20
+
21
+ #### 比全局记忆更可控
22
+
23
+ 相较于把跨目录内容和全局会话混在一起的记忆方式,项目级、技能绑定的记忆系统能减少无关噪声,让检索结果与后续决策更贴近当前 LifeOS 工作流。
24
+
25
+ ### 目录自定义
26
+
27
+ LifeOS 不把目录命名固定死。执行 `lifeos rename [path]` 后,CLI 会交互式列出当前 Vault 中可调整的目录,引导你选择目录并输入新名称。
28
+
29
+ 它会同步更新 `lifeos.yaml`、重命名实际目录,并批量替换 Vault 中所有相关的 wikilink。你可以根据自己的工作流、语言习惯和项目结构自由调整目录名称,同时保持配置和链接关系一致。
30
+
31
+ ### 学习工作流
32
+
33
+ LifeOS 提供一组围绕学习过程设计的 Agent 技能,把“输入 -> 理解 -> 产出 -> 巩固”串成连续工作流:
34
+
35
+ - `/today`、`/brainstorm`、`/ask`:整理当天重点、澄清问题、快速展开想法
36
+ - `/project`、`/research`、`/knowledge`:把主题推进成项目、研究报告和知识笔记
37
+ - `/read-pdf`、`/revise`、`/archive`:从资料提取、复习巩固,到定期归档收束
38
+
39
+ ## 核心组件
40
+
41
+ - **记忆系统**:项目级、技能绑定,为 AI Agent 提供 Vault 索引、会话记忆、上下文组装
42
+ - **CLI 脚手架**:全局安装后使用 `lifeos init` 一键创建工作空间
43
+ - **技能系统**:9 个 Agent 技能覆盖日记、项目、研究、知识整理、复习等工作流
44
+ - **模板 + 规范**:8 个结构化模板 + Frontmatter 规范,确保笔记一致性
45
+
46
+ ## 快速开始
47
+
48
+ 目前仅在 macOS 上实际验证过 Agent CLI 流程;Agent GUI 端尚未系统测试,Windows 环境也还未验证,因此这两部分暂时不能保证体验完全一致。
49
+
50
+ ### 前置要求
51
+
52
+ 开始前,请确保本机已安装 Obsidian,以及 Claude Code CLI / Codex CLI / OpenCode CLI 中至少一种。
53
+
54
+ | 依赖 | 必须 | 用途 |
55
+ |---|---|---|
56
+ | **Node.js 18+** | 必须 | MCP Server 和 CLI 运行环境 |
57
+ | **Git** | 必须 | Vault 版本控制(包括记忆数据库) |
58
+ | **Python 3** | 必须 | PDF 提取(`/read-pdf` 技能) |
59
+
60
+ `lifeos init` 会在创建工作空间前自动检查所有前置依赖。
61
+
62
+ ### 安装与初始化
63
+
64
+ ```bash
65
+ # 第一步:全局安装 CLI
66
+ npm install -g lifeos
67
+
68
+ # 第二步:创建新的 LifeOS 工作空间(根据系统 locale 自动检测语言)
69
+ lifeos init ./my-vault
70
+
71
+ # 或显式指定语言
72
+ lifeos init ./my-vault --lang zh # 中文
73
+ lifeos init ./my-vault --lang en # 英文
74
+ ```
75
+
76
+ 安装完成后,MCP server 配置会自动注册到以下工具:
77
+
78
+ | 工具 | 配置文件 |
79
+ |---|---|
80
+ | **Claude Code** | `.mcp.json` |
81
+ | **Codex** | `.codex/config.toml` |
82
+ | **OpenCode** | `opencode.json` |
83
+
84
+ 在 Vault 目录下启动任一工具即可使用所有技能。
85
+
86
+ ## CLI 命令
87
+
88
+ ```bash
89
+ lifeos init [path] [--lang zh|en] [--no-mcp] # 创建新 Vault
90
+ lifeos upgrade [path] [--lang zh|en] [--override] # 升级并补齐资产与脚手架
91
+ lifeos doctor [path] # 健康检查
92
+ lifeos rename [path] # 交互式重命名目录
93
+ lifeos --help # 查看帮助
94
+ lifeos --version # 查看版本
95
+ ```
96
+
97
+ ### init
98
+
99
+ 创建完整的 LifeOS 工作空间:
100
+
101
+ - 10 个顶层目录 + 嵌套子目录
102
+ - 8 个 Markdown 模板
103
+ - Frontmatter 规范
104
+ - 9 个 AI 技能(按语言自动切换)
105
+ - `CLAUDE.md` Agent 行为规范
106
+ - `lifeos.yaml` 配置文件
107
+ - Git 初始化 + `.gitignore`
108
+ - MCP Server 注册(Claude Code / Codex / OpenCode)
109
+
110
+ ### upgrade
111
+
112
+ 对已初始化的 Vault 执行升级与补全:
113
+
114
+ - **智能合并**:模板、规范、内置提示词、技能文件未修改则更新,已修改则跳过并警告
115
+ - **缺失补全**:缺失的目录和脚手架文件会补回,例如记忆目录、`.claude/skills`、`CLAUDE.md`、`AGENTS.md`、`.gitignore`、`.git`、MCP 配置
116
+ - **保留用户修改**:已存在且被用户改过的内置文件不会被强制覆盖
117
+ - **`--override` 强制刷新资源**:覆盖模板、规范、提示词、技能、`CLAUDE.md`、`AGENTS.md` 以及 MCP 配置,但不会删除用户笔记、资源、`memory.db`、记忆系统数据,也不会改写 `lifeos.yaml` 里的目录和记忆配置
118
+
119
+ 默认执行 `lifeos upgrade` 时,会尽量保留你已经改过的资源文件,只更新未修改内容并补齐缺失项。如果你希望直接用当前版本的内置模板、技能、规范和 MCP 配置重新覆盖这些资源,可以显式加上 `--override`:
120
+
121
+ ```bash
122
+ lifeos upgrade ./my-vault --override
123
+ ```
124
+
125
+ ### doctor
126
+
127
+ 检查 Vault 完整性:目录结构、模板、规范、技能、配置文件、Node.js 版本、资产版本。
128
+
129
+ ### rename:目录可自定义化
130
+
131
+ 无需额外参数,直接执行 `lifeos rename [path]` 后,CLI 会列出当前 Vault 中可调整的目录,并通过交互引导你选择目录和输入新名称。它会同步更新 `lifeos.yaml`、重命名实际目录,并批量替换 Vault 中所有相关的 wikilink。
132
+
133
+ 这意味着 LifeOS 的目录命名不是固定死的。你可以根据自己的工作流、语言习惯和项目结构,自由调整各个目录的名称,同时保持配置和链接关系一致,获得最大的使用自由度。
134
+
135
+ ## 技能一览
136
+
137
+ | 技能 | 功能 |
138
+ |---|---|
139
+ | `/today` | 晨间规划:回顾昨日、规划今日 |
140
+ | `/project` | 想法 → 结构化项目 |
141
+ | `/research` | 主题 → 深度研究报告 |
142
+ | `/knowledge` | 书籍/论文 → 知识笔记 |
143
+ | `/revise` | 生成复习题、批改、追踪掌握度 |
144
+ | `/read-pdf` | PDF → 结构化笔记 |
145
+ | `/ask` | 快速问答 |
146
+ | `/brainstorm` | 交互式头脑风暴 |
147
+ | `/archive` | 归档已完成的项目、已处理的草稿、已完成的计划,以及超过最近 7 天的日记 |
148
+
149
+ ## 自定义专家提示词
150
+
151
+ `/research` 技能会自动扫描 Vault 中提示词目录下的所有专家人格文件。LifeOS 内置了 AI/LLM、数学、艺术、历史等领域的专家人格,你可以添加自己的提示词来扩展研究能力到任何领域。
152
+
153
+ ### 工作原理
154
+
155
+ 调用 `/research` 时,Planning Agent 会:
156
+
157
+ 1. 列出 `{系统目录}/提示词/` 下所有 `.md` 文件
158
+ 2. 读取每个文件的 frontmatter 和**领域覆盖**章节
159
+ 3. 将研究主题与最匹配的专家提示词进行比对
160
+ 4. 将匹配的专家提示词的分析框架和输出格式应用到研究报告中
161
+
162
+ ### 添加自定义专家提示词
163
+
164
+ 在 Vault 的提示词目录(`{系统目录}/提示词/`)下创建 `.md` 文件即可。Planning Agent 在下次 `/research` 调用时会自动发现,无需重启或重新初始化。文件结构参照同目录下的预设提示词即可。
165
+
166
+ ## 技术栈
167
+
168
+ - **Runtime:** TypeScript + Node.js 18+
169
+ - **Database:** SQLite + FTS5(全文搜索)
170
+ - **Segmentation:** @node-rs/jieba(中文分词)
171
+ - **Protocol:** MCP (Model Context Protocol)
172
+ - **Vault:** Obsidian(纯 Markdown + Frontmatter)
173
+
174
+ ## 里程碑
175
+
176
+ - ✅ LifeOS 1.0 版本已初步可用
177
+ - ✅ CLI 支持目录自定义
178
+ - ✅ CLI upgrade 支持智能更新
179
+ - ✅ macOS 端 Agent CLI 已测试
180
+ - ☐ Agent GUI 和 Windows 测试与支持
181
+ - ☐ 强化记忆系统精准性
182
+ - ☐ 支持自定义技能
183
+ - ☐ 支持自定义工作流
184
+
185
+ ## 开发
186
+
187
+ ```bash
188
+ git clone git@github.com:luneth90/lifeos.git
189
+ cd lifeos
190
+ npm install
191
+ npm run build # 编译 TypeScript
192
+ npm test # 运行测试(431 个)
193
+ npm run dev # 开发模式(热重载)
194
+ ```
195
+
196
+ ## License
197
+
198
+ [MIT](LICENSE)
199
+
200
+ ## 致谢
201
+
202
+ 本项目的灵感来源于 [MarsWang42/OrbitOS](https://github.com/MarsWang42/OrbitOS)。
@@ -6,7 +6,7 @@
6
6
  > The default directory names below come from presets; actual names follow the user's `lifeos.yaml` configuration.
7
7
 
8
8
  # Agent Behavior Guidelines — LifeOS
9
- `v1.0.0`
9
+ `v1.0.2`
10
10
 
11
11
  You are the user's lifelong learning partner. Through **LifeOS**, help the user develop fragmented inspirations into structured knowledge and truly master it — from casually captured ideas, through brainstorming and deep research, to systematic project planning and knowledge notes, then spaced review and mastery tracking. The goal is not just building a knowledge base, but helping the user understand, internalize, and command complex knowledge.
12
12
 
@@ -6,7 +6,7 @@
6
6
  > 以下默认目录名来自 preset,实际名称以用户 Vault 中的 `lifeos.yaml` 为准。
7
7
 
8
8
  # Agent 行为规范 — LifeOS
9
- `v1.0.0`
9
+ `v1.0.2`
10
10
 
11
11
  你是用户的终身学习伙伴。通过 **LifeOS**,帮助用户将碎片灵感发展为结构化知识,并真正掌握它——从随手捕获的想法,到头脑风暴与深度研究,到体系化的项目规划与知识笔记,再到间隔复习与掌握度追踪。目标不只是建立知识库,而是帮用户理解、内化和驾驭复杂知识。
12
12
 
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: archive
3
3
  description: "Scan and archive completed projects (status:done), consumed drafts (status:researched/projected/knowledged), completed plans (status: done), and diary entries older than the most recent 7 days, moving them into the unified archive structure and updating frontmatter. Never touches pending drafts, active plans, or the most recent 7 days of diary entries. Use this skill when the user wants to clean up the Vault, archive completed work, tidy up, or says '/archive'."
4
- version: 1.0.0
4
+ version: 1.0.2
5
5
  dependencies:
6
6
  templates: []
7
7
  prompts: []
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: archive
3
- description: 扫描并归档已完成的项目(status:done)、已消化的草稿(status:researched/projected/knowledged)、已完成的计划(status: done)以及超过最近 7 天的日记,按归档规则移入统一归档目录并更新 frontmatter。不会触碰 pending 草稿、active 计划或最近 7 天的日记。当用户想清理 Vault、归档已完成的工作、整理库、或说"/archive"时使用此技能。
4
- version: 1.0.0
3
+ description: '扫描并归档已完成的项目(status:done)、已消化的草稿(status:researched/projected/knowledged)、已完成的计划(status: done)以及超过最近 7 天的日记,按归档规则移入统一归档目录并更新 frontmatter。不会触碰 pending 草稿、active 计划或最近 7 天的日记。当用户想清理 Vault、归档已完成的工作、整理库、或说"/archive"时使用此技能。'
4
+ version: 1.0.2
5
5
  dependencies:
6
6
  templates: []
7
7
  prompts: []
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: ask
3
3
  description: Quickly answer user questions, retrieving existing Vault notes as needed. Suitable for concept explanations, usage queries, Vault content lookups, PDF page-specific questions, and other single-turn Q&A scenarios. Complex questions will suggest upgrading to /brainstorm or /research.
4
- version: 1.0.0
4
+ version: 1.0.2
5
5
  dependencies:
6
6
  templates:
7
7
  - path: "{system directory}/{templates subdirectory}/Draft_Template.md"
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: ask
3
3
  description: 快速回答用户问题,按需检索 Vault 已有笔记辅助作答。适用于概念解释、用法查询、Vault 内容检索、PDF 指定页面提问等单轮问答场景。当用户提出任何直接问题或说"/ask"时使用此技能。复杂问题会建议升级到 /brainstorm 或 /research。
4
- version: 1.0.0
4
+ version: 1.0.2
5
5
  dependencies:
6
6
  templates:
7
7
  - path: "{系统目录}/{模板子目录}/Draft_Template.md"
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: brainstorm
3
3
  description: Explore and deepen user ideas through multi-turn interactive dialogue, using techniques like 5 Whys, What if, and Devil's Advocate to guide divergent thinking. Upon conclusion, the user can choose to create a project (invoke /project), organize wiki notes, or save as a draft. Suitable when the user wants to discuss an immature idea, needs divergent thinking, or wants to explore the feasibility of a direction.
4
- version: 1.0.0
4
+ version: 1.0.2
5
5
  dependencies:
6
6
  templates:
7
7
  - path: "{system directory}/{templates subdirectory}/Wiki_Template.md"
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: brainstorm
3
3
  description: 通过多轮交互式对话探索和深化用户的想法,使用 5 Whys、What if、Devil's Advocate 等思维技巧引导发散。结束后可选择创建项目(调用 /project)、整理为百科笔记、或保存为草稿。当用户想聊一个还不成熟的想法、需要发散思维、探索某个方向的可行性、或说"/brainstorm"时使用此技能。
4
- version: 1.0.0
4
+ version: 1.0.2
5
5
  dependencies:
6
6
  templates:
7
7
  - path: "{系统目录}/{模板子目录}/Wiki_Template.md"
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: knowledge
3
3
  description: "Distill structured knowledge notes and wiki concepts from book chapters or papers (output to {knowledge directory}/). Requires three inputs: project file (required), source content (required), draft notes (optional fusion). Produces main notes (template-structured) and wiki concepts (Wiki entries), establishing bidirectional Wikilinks. Use this skill when the user wants to organize chapter knowledge, extract wiki concepts, structure source text into notes, or says '/knowledge'. Will prompt to use /project first if no project file exists."
4
- version: 1.0.0
4
+ version: 1.0.2
5
5
  dependencies:
6
6
  templates:
7
7
  - path: "{system directory}/{templates subdirectory}/Knowledge_Template.md"
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: knowledge
3
3
  description: 从书籍章节或论文中蒸馏结构化知识笔记和百科概念(产出到 {知识目录}/)。需要三类输入:项目文件(必须)、原文内容(必须)、草稿笔记(可选融合)。产出主笔记(按模板结构化)和百科概念(Wiki 条目),并建立双向 Wikilinks。当用户想整理某章知识点、提取百科概念、把原文结构化为笔记、或说"/knowledge"时使用此技能。若无项目文件会提示先用 /project 创建。
4
- version: 1.0.0
4
+ version: 1.0.2
5
5
  dependencies:
6
6
  templates:
7
7
  - path: "{系统目录}/{模板子目录}/Knowledge_Template.md"
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: project
3
3
  description: "Transform ideas, drafts, or learning resources into structured project files (output to {projects directory}/). Uses dual-Agent workflow: the Planning Agent creates a `type: plan, status: active` plan file for review, then the Execution Agent creates the formal project after confirmation and updates the plan to `status: done`. Supports four project types: learning (chapter-based planning), development (single main project + docs directory), creative (milestone-based), general. Use this skill when the user wants to create a project, plan a book's study, formalize a draft idea, or says '/project'."
4
- version: 1.0.0
4
+ version: 1.0.2
5
5
  dependencies:
6
6
  templates:
7
7
  - path: "{system directory}/{templates subdirectory}/Project_Template.md"
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: project
3
- description: 将想法、草稿或学习资源转化为结构化的项目文件(产出到 {项目目录}/)。使用双 Agent 工作流:规划 Agent 生成 `type: plan, status: active` 的计划文件供用户审核,确认后执行 Agent 创建正式项目并将计划更新为 `status: done`。支持四种项目类型:学习(章节式规划)、开发(单主项目+文档目录)、创作(里程碑式)、通用。当用户想创建项目、规划一本书的学习、把草稿想法正式化、或说"/project"时使用此技能。
4
- version: 1.0.0
3
+ description: '将想法、草稿或学习资源转化为结构化的项目文件(产出到 {项目目录}/)。使用双 Agent 工作流:规划 Agent 生成 `type: plan, status: active` 的计划文件供用户审核,确认后执行 Agent 创建正式项目并将计划更新为 `status: done`。支持四种项目类型:学习(章节式规划)、开发(单主项目+文档目录)、创作(里程碑式)、通用。当用户想创建项目、规划一本书的学习、把草稿想法正式化、或说"/project"时使用此技能。'
4
+ version: 1.0.2
5
5
  dependencies:
6
6
  templates:
7
7
  - path: "{系统目录}/{模板子目录}/Project_Template.md"
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: read-pdf
3
3
  description: "Extract text, charts (Vision analysis), math formulas (to LaTeX), and tables (to Markdown) from PDF files, producing JSON intermediate data for /knowledge, /ask, /revise and other skills to consume. Supports page ranges and chapter name positioning. Use this skill when the user needs to read PDF content, extract specific pages, parse book chapters, or says '/read-pdf'. Also called internally by other skills."
4
- version: 1.0.0
4
+ version: 1.0.2
5
5
  dependencies:
6
6
  templates: []
7
7
  prompts: []
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: read-pdf
3
3
  description: 从 PDF 文件中提取文字、图表(Vision 分析)、数学公式(转 LaTeX)和表格(转 Markdown),产出 JSON 中间数据供 /knowledge、/ask、/revise 等技能消费。支持页码范围和章节名定位。当用户需要读取 PDF 内容、提取特定页面、解析书籍章节、或说"/read-pdf"时使用此技能。也会被其他技能内部自动调用。
4
- version: 1.0.0
4
+ version: 1.0.2
5
5
  dependencies:
6
6
  templates: []
7
7
  prompts: []
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: research
3
3
  description: "Conduct deep research on a specified topic or draft, producing structured research reports to {research directory}/. Uses dual-Agent workflow: the Planning Agent scans local drafts, matches expert personas, and creates a `type: plan, status: active` research plan; the Execution Agent combines local drafts with WebSearch external sources to write the report and updates the plan to `status: done`. Supports topic mode (direct topic) and file mode (draft as anchor). Use this skill when the user wants to deeply understand a topic, needs systematic research, wants to expand a draft into a full report, or says '/research'."
4
- version: 1.0.0
4
+ version: 1.0.2
5
5
  dependencies:
6
6
  templates: []
7
7
  prompts:
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: research
3
- description: 对指定主题或草稿进行深度研究,产出结构化研究报告到 {研究目录}/。使用双 Agent 工作流:规划 Agent 扫描本地草稿、匹配专家人格、生成 `type: plan, status: active` 的研究计划;执行 Agent 结合本地草稿与 WebSearch 外部资料撰写报告,并将计划更新为 `status: done`。支持主题模式(直接给主题)和文件模式(以草稿为锚点展开)。当用户想深入了解某个主题、需要系统性调研、想把草稿扩展为完整报告、或说"/research"时使用此技能。
4
- version: 1.0.0
3
+ description: '对指定主题或草稿进行深度研究,产出结构化研究报告到 {研究目录}/。使用双 Agent 工作流:规划 Agent 扫描本地草稿、匹配专家人格、生成 `type: plan, status: active` 的研究计划;执行 Agent 结合本地草稿与 WebSearch 外部资料撰写报告,并将计划更新为 `status: done`。支持主题模式(直接给主题)和文件模式(以草稿为锚点展开)。当用户想深入了解某个主题、需要系统性调研、想把草稿扩展为完整报告、或说"/research"时使用此技能。'
4
+ version: 1.0.2
5
5
  dependencies:
6
6
  templates: []
7
7
  prompts:
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: revise
3
3
  description: "Conduct active recall review of existing knowledge notes. Generates review files (.md) for the user to answer, then triggers grading upon completion, automatically updating note status (draft\u2192review\u2192mastered) and project mastery levels. Supports three modes: quiz mode (application questions), Feynman mode (explain concepts in own words), blind spot scan (self-assess mastery). Use this skill when the user wants to review, test mastery, or says '/revise'. Triggers grading flow when user says 'grade' or 'mark my review'."
4
- version: 1.0.0
4
+ version: 1.0.2
5
5
  dependencies:
6
6
  templates:
7
7
  - path: "{system directory}/{templates subdirectory}/Revise_Template.md"
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: revise
3
3
  description: 对已有知识笔记进行主动回忆复习。生成复习文件(.md),用户在文件中作答后触发批改,自动更新笔记 status(draft→revise→mastered)和项目掌握度。支持三种模式:提问模式(应用题)、费曼模式(用自己的话解释概念)、盲点扫描(自评掌握程度)。当用户想复习、测验掌握程度、说"/revise"时使用此技能。用户说"批改"或"改卷"时触发批改流程。
4
- version: 1.0.0
4
+ version: 1.0.2
5
5
  dependencies:
6
6
  templates:
7
7
  - path: "{系统目录}/{模板子目录}/Revise_Template.md"
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: today
3
3
  description: "Daily planning entry point: review yesterday's progress and incomplete tasks, scan active projects and notes pending review, collect the user's goals and new ideas for today, and generate today's diary file. Automatically suggests follow-up skills (/review, /research, /project, etc.)."
4
- version: 1.0.0
4
+ version: 1.0.2
5
5
  dependencies:
6
6
  templates:
7
7
  - path: "{system directory}/{templates subdirectory}/Daily_Template.md"
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: today
3
3
  description: 每日规划入口:回顾昨日进展和未完成任务、扫描活跃项目与待复习笔记、收集用户今日目标和新想法、生成今日日记文件。当用户开始新的一天、问"今天做什么"、说"早安"、想规划当日任务、或说"/today"时使用此技能。会自动提示后续可用的技能(/revise、/research、/project 等)。
4
- version: 1.0.0
4
+ version: 1.0.2
5
5
  dependencies:
6
6
  templates:
7
7
  - path: "{系统目录}/{模板子目录}/Daily_Template.md"
package/dist/index.d.ts CHANGED
@@ -1,3 +1,3 @@
1
- export declare const VERSION = "1.0.0";
1
+ export declare const VERSION = "1.0.2";
2
2
  export * from './core.js';
3
3
  export { VaultConfig } from './config.js';
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  // lifeos — LifeOS MCP Server
2
- export const VERSION = '1.0.0';
2
+ export const VERSION = '1.0.2';
3
3
  export * from './core.js';
4
4
  export { VaultConfig } from './config.js';
5
5
  //# sourceMappingURL=index.js.map
package/dist/server.js CHANGED
@@ -10,7 +10,7 @@ import * as core from './core.js';
10
10
  // ─── Server instance ──────────────────────────────────────────────────────────
11
11
  const server = new McpServer({
12
12
  name: 'lifeos',
13
- version: '1.0.0',
13
+ version: '1.0.2',
14
14
  });
15
15
  // ─── Tool registrations ───────────────────────────────────────────────────────
16
16
  // 1. memory_startup
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lifeos",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "description": "LifeOS — AI-native knowledge OS runtime, CLI scaffold, and MCP memory server",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
package/README.en.md DELETED
@@ -1,202 +0,0 @@
1
- # LifeOS
2
-
3
- [中文](./README.md) | English
4
-
5
- LifeOS helps you grow scattered ideas into structured knowledge and truly master it, from quick captures, to brainstorming and deep research, to systematic project planning and knowledge notes, to spaced review and mastery tracking. The goal is not just building a knowledge base, but helping you understand, internalize, and command complex knowledge.
6
-
7
- ## Core Features
8
-
9
- ### Memory System
10
-
11
- > The memory system is LifeOS's core capability. It works in a directory-scoped, skill-bound way, continuously preserving the context, preferences, and decisions that emerge during learning so long-term learning becomes more continuous, more traceable, and easier to build on.
12
-
13
- #### Cross-session continuity
14
-
15
- Session bridges and active-document context persist, so agents do not depend only on the current conversation.
16
-
17
- #### Project-scoped and skill-bound
18
-
19
- The memory system runs around the current LifeOS project in the vault, activates only inside workflows such as `today`, `project`, `research`, `knowledge`, `revise`, and `archive`, and keeps accumulating preferences, decisions, and context.
20
-
21
- #### More controllable than global memory
22
-
23
- Compared with a memory model that mixes cross-directory content and global conversations together, a project-scoped, skill-bound memory system reduces irrelevant noise and keeps retrieval and follow-up decisions closer to the current LifeOS workflow.
24
-
25
- ### Directory Customization
26
-
27
- LifeOS does not lock you into fixed directory names. Run `lifeos rename [path]` and the CLI will interactively list the directories that can be adjusted in the current vault, then guide you through choosing one and entering a new name.
28
-
29
- It updates `lifeos.yaml`, renames the actual directory, and batch-replaces all related wikilinks across the vault. That lets you adapt directory names to your own workflow, language preference, and project structure while keeping configuration and links consistent.
30
-
31
- ### Learning Workflows
32
-
33
- LifeOS provides a set of Agent skills designed around the learning process, connecting "input -> understanding -> output -> reinforcement" into a continuous workflow:
34
-
35
- - `/today`, `/brainstorm`, `/ask`: organize the day's focus, clarify questions, and quickly expand ideas
36
- - `/project`, `/research`, `/knowledge`: turn a topic into a project, a research report, and structured knowledge notes
37
- - `/read-pdf`, `/revise`, `/archive`: move from source extraction, to review and reinforcement, to periodic archiving
38
-
39
- ## Core Components
40
-
41
- - **Memory system** — Project-scoped and skill-bound, providing vault indexing, session memory, and context assembly for AI agents
42
- - **CLI scaffold** — install globally, then use `lifeos init` to bootstrap a complete workspace
43
- - **Skill system** — 9 Agent skills covering diary, projects, research, knowledge curation, review, and more
44
- - **Templates + Schema** — 8 structured templates + Frontmatter schema for consistent notes
45
-
46
- ## Quick Start
47
-
48
- At the moment, only the Agent CLI workflow has been verified in practice on macOS. The Agent GUI path has not been systematically tested yet, and Windows has not been verified either, so the experience there may not be fully consistent yet.
49
-
50
- ### Prerequisites
51
-
52
- Before starting, make sure Obsidian and at least one of Claude Code CLI / Codex CLI / OpenCode CLI are installed locally.
53
-
54
- | Dependency | Required | Purpose |
55
- |---|---|---|
56
- | **Node.js 18+** | Required | Runtime for MCP server and CLI |
57
- | **Git** | Required | Version control for vault data, including the memory DB |
58
- | **Python 3** | Required | PDF extraction (`/read-pdf` skill) |
59
-
60
- `lifeos init` checks all prerequisites before creating the workspace.
61
-
62
- ### Installation and Initialization
63
-
64
- ```bash
65
- # Step 1: install the CLI globally
66
- npm install -g lifeos
67
-
68
- # Step 2: create a new LifeOS workspace (auto-detects language from system locale)
69
- lifeos init ./my-vault
70
-
71
- # Or specify language explicitly
72
- lifeos init ./my-vault --lang zh # Chinese
73
- lifeos init ./my-vault --lang en # English
74
- ```
75
-
76
- After init, MCP server configs are automatically registered for:
77
-
78
- | Tool | Config file |
79
- |---|---|
80
- | **Claude Code** | `.mcp.json` |
81
- | **Codex** | `.codex/config.toml` |
82
- | **OpenCode** | `opencode.json` |
83
-
84
- Launch any of these tools in the vault directory to use all skills.
85
-
86
- ## CLI Commands
87
-
88
- ```bash
89
- lifeos init [path] [--lang zh|en] [--no-mcp] # Create a new vault
90
- lifeos upgrade [path] [--lang zh|en] [--override] # Upgrade and restore assets/scaffold
91
- lifeos doctor [path] # Health check
92
- lifeos rename [path] # Interactive directory rename
93
- lifeos --help # Show help
94
- lifeos --version # Show version
95
- ```
96
-
97
- ### init
98
-
99
- Creates a complete LifeOS workspace:
100
-
101
- - 10 top-level directories plus nested subdirectories
102
- - 8 Markdown templates
103
- - Frontmatter schema
104
- - 9 AI skills with language-aware assets
105
- - `CLAUDE.md` agent behavior spec
106
- - `lifeos.yaml` config
107
- - Git init plus `.gitignore`
108
- - MCP server registration (Claude Code / Codex / OpenCode)
109
-
110
- ### upgrade
111
-
112
- Upgrades and re-syncs an initialized vault:
113
-
114
- - **Smart merge**: update unmodified templates, schema files, built-in prompts, and skill files; skip modified ones with a warning
115
- - **Restore missing scaffold**: bring back missing directories and managed files such as the memory directory, `.claude/skills`, `CLAUDE.md`, `AGENTS.md`, `.gitignore`, `.git`, and MCP config entries
116
- - **Preserve user changes**: built-in files already customized by the user are not force-overwritten
117
- - **`--override` force-refreshes resources**: overwrite templates, schema, prompts, skills, `CLAUDE.md`, `AGENTS.md`, and MCP config entries without deleting user notes, resources, `memory.db`, memory-system data, or custom directory/memory settings in `lifeos.yaml`
118
-
119
- By default, `lifeos upgrade` tries to preserve resource files you have already modified, while updating untouched content and restoring anything missing. If you want to explicitly replace those resources with the current built-in templates, skills, schema files, and MCP config entries, use `--override`:
120
-
121
- ```bash
122
- lifeos upgrade ./my-vault --override
123
- ```
124
-
125
- ### doctor
126
-
127
- Checks vault integrity: directory structure, templates, schema, skills, config, Node.js version, and asset version.
128
-
129
- ### rename: Directory Customization
130
-
131
- No extra flags are required. Run `lifeos rename [path]` and the CLI will show the directories available in the current vault, then guide you step by step to choose one and enter a new name. It updates `lifeos.yaml`, renames the actual directory, and batch-replaces related wikilinks across the vault.
132
-
133
- This means LifeOS does not lock you into fixed directory names. You can freely adapt directory names to your own workflow, language preference, and project structure while keeping configuration and links consistent.
134
-
135
- ## Skills
136
-
137
- | Skill | Description |
138
- |---|---|
139
- | `/today` | Morning planning: review yesterday, plan today |
140
- | `/project` | Idea -> structured project |
141
- | `/research` | Topic -> deep research report |
142
- | `/knowledge` | Book/paper -> knowledge note |
143
- | `/revise` | Generate quizzes, grade, and track mastery |
144
- | `/read-pdf` | PDF -> structured notes |
145
- | `/ask` | Quick Q&A |
146
- | `/brainstorm` | Interactive brainstorming |
147
- | `/archive` | Archive completed projects, processed drafts, completed plans, and diary entries older than the most recent 7 days |
148
-
149
- ## Custom Expert Prompts
150
-
151
- The `/research` skill automatically scans the Prompts directory in your vault for expert prompt files. LifeOS ships with built-in expert prompts for AI/LLM, Math, Art, and History, and you can add your own to extend research capabilities to any domain.
152
-
153
- ### How It Works
154
-
155
- When you invoke `/research`, the Planning Agent:
156
-
157
- 1. Lists all `.md` files in `{system directory}/Prompts/`
158
- 2. Reads each file's frontmatter and **Domain Coverage** section
159
- 3. Matches the research topic to the best-fit expert prompt
160
- 4. Applies the matched prompt's analytical framework and output format to the research report
161
-
162
- ### Adding Custom Expert Prompts
163
-
164
- Create a `.md` file in your vault's Prompts directory (`{system directory}/Prompts/`). The Planning Agent will pick it up automatically on the next `/research` invocation, with no restart or re-init required. Use the built-in prompts in the same directory as a reference for structure.
165
-
166
- ## Tech Stack
167
-
168
- - **Runtime:** TypeScript + Node.js 18+
169
- - **Database:** SQLite + FTS5 (full-text search)
170
- - **Segmentation:** @node-rs/jieba (Chinese tokenization)
171
- - **Protocol:** MCP (Model Context Protocol)
172
- - **Vault:** Obsidian (plain Markdown + Frontmatter)
173
-
174
- ## Milestones
175
-
176
- - ✅ LifeOS 1.0 is now basically usable
177
- - ✅ The CLI supports directory customization
178
- - ✅ The CLI `upgrade` command supports smart updates
179
- - ✅ Agent CLI has been tested on macOS
180
- - ☐ Test and support Agent GUI and Windows
181
- - ☐ Improve memory-system precision
182
- - ☐ Support custom skills
183
- - ☐ Support custom workflows
184
-
185
- ## Development
186
-
187
- ```bash
188
- git clone git@github.com:luneth90/lifeos.git
189
- cd lifeos
190
- npm install
191
- npm run build # Compile TypeScript
192
- npm test # Run tests (431 tests)
193
- npm run dev # Dev mode (hot reload)
194
- ```
195
-
196
- ## License
197
-
198
- [MIT](LICENSE)
199
-
200
- ## Acknowledgements
201
-
202
- This project was inspired by [MarsWang42/OrbitOS](https://github.com/MarsWang42/OrbitOS).
@@ -1,8 +0,0 @@
1
- /**
2
- * review-strict.ts — /review 技能上下文画像。
3
- *
4
- * Strictly focused on knowledge/review items and corrections.
5
- * Does NOT fall back to domain tags. Heavily weights correction events.
6
- */
7
- import type { SeedProfileConfig } from './base.js';
8
- export declare const REVIEW_STRICT: SeedProfileConfig;
@@ -1,26 +0,0 @@
1
- /**
2
- * review-strict.ts — /review 技能上下文画像。
3
- *
4
- * Strictly focused on knowledge/review items and corrections.
5
- * Does NOT fall back to domain tags. Heavily weights correction events.
6
- */
7
- export const REVIEW_STRICT = {
8
- name: 'review_strict',
9
- loadTaskboard: false,
10
- allowDomainTagFallback: false,
11
- rankingBias: {
12
- review: 50,
13
- knowledge: 30,
14
- correction: 90,
15
- note: 25,
16
- },
17
- recentEventBias: {
18
- correction: 40,
19
- skill_completion: 20,
20
- milestone: 15,
21
- },
22
- vaultQueryLimit: 8,
23
- recentEventLimit: 10,
24
- recentEventDays: 30,
25
- };
26
- //# sourceMappingURL=review-strict.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"review-strict.js","sourceRoot":"","sources":["../../src/skill-context/review-strict.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,MAAM,CAAC,MAAM,aAAa,GAAsB;IAC/C,IAAI,EAAE,eAAe;IACrB,aAAa,EAAE,KAAK;IACpB,sBAAsB,EAAE,KAAK;IAC7B,WAAW,EAAE;QACZ,MAAM,EAAE,EAAE;QACV,SAAS,EAAE,EAAE;QACb,UAAU,EAAE,EAAE;QACd,IAAI,EAAE,EAAE;KACR;IACD,eAAe,EAAE;QAChB,UAAU,EAAE,EAAE;QACd,gBAAgB,EAAE,EAAE;QACpB,SAAS,EAAE,EAAE;KACb;IACD,eAAe,EAAE,CAAC;IAClB,gBAAgB,EAAE,EAAE;IACpB,eAAe,EAAE,EAAE;CACnB,CAAC"}