@meitouai/mem-note-cli 0.0.1 → 0.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.
@@ -129,12 +129,12 @@ archived: 2026-04-10 # 归档日期
129
129
 
130
130
  ## 4. 文件命名
131
131
 
132
- | 类型 | 路径模板 | 示例 |
133
- | ------------- | ------------------------------------------------- | ----------------------------------------- |
134
- | Note | `notes/<topic>/<slug>.md` | `notes/user/dark-mode.md` |
132
+ | 类型 | 路径模板 | 示例 |
133
+ | ------------- | ---------------------------------------------------------------------------------------------------------- | ----------------------------------------- |
134
+ | Note | `notes/<topic>/<slug>.md` | `notes/user/dark-mode.md` |
135
135
  | Inbox entry | `inbox/<YYYY-MM-DD-HHMMSS>_<slug>.md` (collisions within the same second get a `-<n>` suffix before `.md`) | `inbox/2026-04-10-142030_dark-mode.md` |
136
- | Archived note | `notes/_archived/<YYYY-MM-DD>_<original-slug>.md` | `notes/_archived/2026-04-10_dark-mode.md` |
137
- | Insight | `insights/<id>.md` | `insights/insight-v1K2p7.md` |
136
+ | Archived note | `notes/_archived/<YYYY-MM-DD>_<original-slug>.md` | `notes/_archived/2026-04-10_dark-mode.md` |
137
+ | Insight | `insights/<id>.md` | `insights/insight-v1K2p7.md` |
138
138
 
139
139
  **slug 约定**:小写 kebab-case,只含 `[a-z0-9-]`,最长 60 字符。`mem-note save` 自动从内容前若干字生成。
140
140
 
@@ -242,30 +242,30 @@ notes/_archived/<date>_<slug>.md (+ remove from topic's NOTES.md)
242
242
  AI agent 在 skill 会话中处理数据时,**优先使用原生文件工具**。
243
243
  CLI 只在下表标注的少数场景调用。
244
244
 
245
- | 操作 | 首选 | 不要用 |
246
- | ------------------------ | ------------------------------------------------------------------ | ---------------------------------- |
245
+ | 操作 | 首选 | 不要用 |
246
+ | ------------------------ | ------------------------------------------------------------------------ | ---------------------------------- |
247
247
  | 列出所有 note | `Glob notes/**/*.md`(记得排除 `_archived/**`、`skills/**`、`NOTES.md`) | ❌ `mem-note list-notes`(不存在) |
248
- | 发现用户 skill | `Glob notes/skills/*/SKILL.md` + 读 frontmatter | ❌ 任何 CLI |
249
- | 读一个 note | `Read notes/path/foo.md` | ❌ CLI |
250
- | 读某目录的索引视图 | `Read notes/<topic>/NOTES.md` | ❌ CLI |
251
- | 写 / 更新 note | `Write` / `Edit` + 记得同步 `NOTES.md` | ❌ CLI |
252
- | 搜索 note 内容 | `Grep "query" notes/**/*.md` | ❌ CLI |
253
- | 处理 inbox entry | `Bash mv inbox/x.md inbox/.processed/` | ❌ CLI |
254
- | 写 insight | `Write insights/<id>.md` | ❌ CLI |
255
- | 编译 `.context/index.md` | `Write .context/index.md` | ❌ CLI |
256
- | **归档 note** | ✅ `mem-note archive <path>`(封装多步操作) | `mv` + 手动更新 NOTES.md(易漏) |
257
- | **检查一致性** | ✅ `mem-note doctor`(每次 groom 末尾) | 手动检查(不现实) |
258
- | 追加 audit log | `Bash` 追加 `.reports/<date>.md` 或最后一次 `Write` | — |
248
+ | 发现用户 skill | `Glob notes/skills/*/SKILL.md` + 读 frontmatter | ❌ 任何 CLI |
249
+ | 读一个 note | `Read notes/path/foo.md` | ❌ CLI |
250
+ | 读某目录的索引视图 | `Read notes/<topic>/NOTES.md` | ❌ CLI |
251
+ | 写 / 更新 note | `Write` / `Edit` + 记得同步 `NOTES.md` | ❌ CLI |
252
+ | 搜索 note 内容 | `Grep "query" notes/**/*.md` | ❌ CLI |
253
+ | 处理 inbox entry | `Bash mv inbox/x.md inbox/.processed/` | ❌ CLI |
254
+ | 写 insight | `Write insights/<id>.md` | ❌ CLI |
255
+ | 编译 `.context/index.md` | `Write .context/index.md` | ❌ CLI |
256
+ | **归档 note** | ✅ `mem-note archive <path>`(封装多步操作) | `mv` + 手动更新 NOTES.md(易漏) |
257
+ | **检查一致性** | ✅ `mem-note doctor`(每次 groom 末尾) | 手动检查(不现实) |
258
+ | 追加 audit log | `Bash` 追加 `.reports/<date>.md` 或最后一次 `Write` | — |
259
259
 
260
260
  ## 9. CLI 命令清单(5 个)
261
261
 
262
- | # | 命令 | 职责 | 典型调用方 |
263
- | --- | ------------------------- | ------------------------------------------------------ | -------------------------------- |
264
- | 1 | `mem-note init` | 幂等创建目录 + 写入 `CONVENTIONS.md`(已存在则跳过) | 人(首次安装) |
265
- | 2 | `mem-note save <content>` | 存一条 inbox entry。支持 `--type`、`--source`、stdin | 人 / hook / 外部脚本 |
262
+ | # | 命令 | 职责 | 典型调用方 |
263
+ | --- | ------------------------- | ------------------------------------------------------ | ---------------------------------- |
264
+ | 1 | `mem-note init` | 幂等创建目录 + 写入 `CONVENTIONS.md`(已存在则跳过) | 人(首次安装) |
265
+ | 2 | `mem-note save <content>` | 存一条 inbox entry。支持 `--type`、`--source`、stdin | 人 / hook / 外部脚本 |
266
266
  | 3 | `mem-note archive <path>` | 封装 "加日期前缀 + mv 到 `_archived/` + 更新 NOTES.md" | 人 / AI agent |
267
267
  | 4 | `mem-note doctor` | 检查 frontmatter schema、NOTES.md 漂移、归档命名一致性 | 人 / AI agent(每次 groom 结束时) |
268
- | 5 | `mem-note quick-context` | 输出 `.context/index.md` 内容(封装路径解析) | hook (SessionStart / PreCompact) |
268
+ | 5 | `mem-note quick-context` | 输出 `.context/index.md` 内容(封装路径解析) | hook (SessionStart / PreCompact) |
269
269
 
270
270
  其他一切都是 AI agent / 人用原生工具直接做。
271
271
 
@@ -295,7 +295,7 @@ CLI 只在下表标注的少数场景调用。
295
295
 
296
296
  - `mem-note save` / `mem-note archive` 每次成功写入后自 commit,message 形如
297
297
  `save: <slug>` / `archive: <slug>`。
298
- - 插件的 Stop hook (`session-commit.sh`) 在每次 Claude Code 会话结束时兜底
298
+ - 插件的 Stop hook (`session-commit.js`) 在每次 Claude Code 会话结束时兜底
299
299
  commit 剩余未提交的改动,message 形如 `session: <ISO timestamp>`,
300
300
  用于捕获 skill 通过 `Write`/`Edit`/`Bash mv` 直接做的写入。
301
301