Decision Log — 2026-05
2026-08-12 从 decision-log.md 按月份拆分(>40KB 维护规则)——内容与原文一致。索引: decision-log
2026-05-05: OpenClaw Model → DeepSeek V4 Flash
Decision: Use OpenRouter deepseek/deepseek-v4-flash as primary model for PC Hermes (OpenClaw)
Context:
- OpenRouter provides unified API for many models
- DeepSeek V4 Flash is free tier, good performance
- OpenClaw supports OpenRouter provider natively
Configuration: Set models.providers.openrouter in openclaw.json with API key sk-or-v1-...
2026-05-02: quotation.hsdesign.biz OAuth Loop Fix
Decision: Frontend SPA needs to handle BOTH /auth/callback AND /app paths
Context:
- Worker OAuth callback redirects to
/app?token=xxx - Frontend only checked
/auth/callbackpath - Token never extracted → infinite login loop
Fix: Added url.pathname === '/auth/callback' || url.pathname === '/app' check in SPA callback handler
2026-05-21: [Replying to: “你的批评完全正确。我来正视问题。
[Replying to: “你的批评完全正确。我来正视问题。
看了代码后,我发现根本问题:cron 方案从架构上就是错的。
“Buffer empty” 真正的原因不是 buffer 没清空,而是:
Sessions 目录没有今天的 session 文件 — 因为 Hermes 每天的 session 文件是 session_YYYYMMDD_*.json,但 cron 在后台运行时,session 文件可能已经被归档/删除,或者根本没有生成(用户没在使用 Hermes)。
所以 vault-keeper 每次跑 → 找不到 session → 输出 “Buffer empty, nothing to sync” → 实际上根本没有知识沉淀发生。
Cron 架构的问题:
- Cron 每 3 小时触发时,依赖”今天的 session 文件存在且有内容”
- 但 session 文件只在活跃会话时存在,会话结束后文件可能在也可能不在
- 依赖一个不可靠的外部状态来驱动知识沉淀,这本身就是错误的设计
正确的做法:知识应该在 session 结束时立刻被捕获,而不是等 cron 去捞。
plur_sess”]
为什么会找不到 session
2026-05-21: 好,我决定直接推进。
好,我决定直接推进。
方案:让 vault-keeper.py 在每次 cron 触发时,通过 PLUR MCP 端点做事件驱动捕获,而不是等 session 自然结束。
逻辑:
- Cron 触发 → vault-keeper 读取当天 session
- 主动调用
plur_ingest()把 session 内容注入 PLUR engram 系统 - 同步到 Obsidian vault(Done)
- 同时调用
plur_session_end()标记 session 完成
这样每次 cron 跑都在主动”收割”知识,不依赖 session 自己结束。
2026-05-21: 我的决定:
我的决定:
核心方向:vault-keeper 增加 session-end 主动捕获,不再依赖 cron 探测
具体做法:
-
vault-keeper.py 增加
--session-end模式 — 在每个 session 结束时立即调用,读取刚结束的 session 文件,同步到 vault + 写入 PLUR -
cron 保留但降级 — 变成”最后一道防线”,处理漏网之鱼(频率降低,不作为主力)
-
整合 PLUR engram — session-end 时同步调用
plur_session_end()+plur_learn(),让知识同时沉淀到 Obsidian vault 和 PLUR 记忆系统 -
修复 Hermes session-end hook — 找到触发点,让每次 session 关闭时自动调用 vault-keeper
我现在开始实施,先写代码,然后测试,最后更新 skill 文档。
目标:让知识在 session 结束时就被捕获,而不是等 3 小时后的 cron。
2026-05-21: Review the conversation above and update the skill library. Be ACTIVE — most ses
Review the conversation above and update the skill library. Be ACTIVE — most sessions produce at least one skill update, even if small. A pass that does nothing is a missed learning opportunity, not a neutral outcome.
Target shape of the library: CLASS-LEVEL skills, each with a rich SKILL.md and a references/ directory for session-specific detail. Not a long flat list of narrow one-session-one-skill entries. This shapes HOW you update, not WHETHER you update.
Signals to look for (any one of these warrants action): • User corrected your style, tone, format, legibility, or verbosity. Frustration signals like ‘stop doing X’, ‘this is too verbose’, ‘don’t format like this’, ‘why are you explaining’, ‘just give me the answer’, ‘you always do Y and I hate it’, or an explicit ‘remember this…
2026-05-21: Skills updated:
Skills updated:
vault-keeper (primary — was loaded during this session):
- Architecture updated to reflect event-driven + fallback model
--fallbackflag documented in manual run- Pitfalls section added: cron polling fails silently when user inactive, wrong session format causes empty messages
- New reference doc:
references/session-discovery-fix.md(root cause of “buffer empty” was timer-driven capture, not a script bug)
hermes-cron-debugging (overlap — same territory):
- Added failure mode:
no_agent: truejobs produce misleading output when they need conditional logic - Added decision guidance:
no_agent: trueis wrong when script must detect “file not found” and skip gracefully
Overlap noted for background curator: vault-keeper and hermes-cron-debugging share…
2026-05-21: 关键问题:PLUR 是 MCP 工具而非 Python 模块,cron 脚本无法直接调用。我需要换一个方案让 vault-keeper 能够与 PLUR
关键问题:PLUR 是 MCP 工具而非 Python 模块,cron 脚本无法直接调用。我需要换一个方案让 vault-keeper 能够与 PLUR 通信。
方案:让 vault-keeper 通过 hermes agents invoke 调用一个轻量 agent,该 agent 有 PLUR 工具权限,执行完后再调用 vault-keeper 的主逻辑。
2026-05-21: [IMPORTANT: The user has invoked the “devops/vault-keeper” skill, indicating the
[IMPORTANT: The user has invoked the “devops/vault-keeper” skill, indicating they want you to follow its instructions. The full skill content is loaded below.]
name: vault-keeper description: 3-hourly knowledge sync from session to Obsidian vault (PC Windows version) tags: [knowledge, automation, vault, cron] platform: [windows-pc]
Vault Keeper — 自动知识沉淀系统
知识分类 (category)
| category | 存储位置 | 说明 |
|---|---|---|
bug_fix | projects/{project}-complete.md 的 Bug Fix 区域 | 项目 bug 修复记录 |
skill | skills/{skill-name}.md | 技能文档 |
daily | daily/YYYY-MM-DD.md | 每日笔记 |
api_discovery | api/{api-name}.md | API 发现和使用记录 |
decision | decisions/decision-log.md | 重要决策及理由 |
project_note | projects/{project}.md | 项目进展记录 |
组件(合并后)
| 文件 | 用途 …