convention/cron-wiki-sync
Wiki Sync 规范(2026-05-03 更新)
目标
将 session highlights 里的知识内化到 wiki 分类文件,而不是只堆日志。
Obsidian Local REST API
- API Key:
047e84eb941910b7ae221ea6b458fbd6c9b2bbfbeab654e05a59893520cd29f9 - Base:
http://100.83.112.84:27123 - Endpoint:
POST /vault/{filename}.md - Header:
Authorization: Bearer {key} - Content-Type:
text/markdown
同步优先级
- 优先使用 Obsidian Local REST API
- 如果 API 失败(连接错误或”Could not determine home directory”):使用 SCP fallback
- 如果都失败:保存到本地
~/.hermes/hermes-wiki/draft-{date}.md和D:\\hermes\\sessions\\wiki-draft-{date}.md
SCP Fallback 路径
scp -i ~/.ssh/id_ed25519_hermes \
~/.hermes/hermes-wiki/{filename}.md \
[email protected]:'H:\\My Drive\\Jakephone\\Obsidian Vault\\'知识分类规则
| 类别 | 内容 |
|---|---|
env/ | 平台、环境、工具、路径 |
project/ | 项目状态、配置、IDs |
skill/ | 技能流程、调试方法 |
convention/ | 工作流规范、调度规则 |
user/ | 用户偏好、沟通风格 |
Known Issues
- ⚠️ check_recent_chat.sh scheduler bug RECURRING (2026-05-05): The fix in scheduler.py line 482 was documented as applied at 00:02 on May 5, but
scheduler.pydoes not exist in~/.hermes/. Timeouts occurred again at 02:03 and 03:25. Need to locate and properly fix scheduler.py on the actual running instance. - sqlite3 超时:如果
check_recent_chat.sh脚本超时(120s),可能是hermes.db的 messages 表过大。检查:sqlite3 ~/.hermes/hermes.db "SELECT COUNT(*) FROM messages;" - 脚本本身很快(文件 stat + 简单 sqlite 查询),超时通常是 DB 查询卡住 或 scheduler.py bug
- Job ID:
ee43bb83e0ef - Schedule:
0 */3 * * *(每3小时) - 脚本:
check_recent_chat.sh - 技能:
llm-wiki
convention/cron-wiki-sync
Wiki Sync 规范(2026-05-03 更新)
目标
将 session highlights 里的知识内化到 wiki 分类文件,而不是只堆日志。
Obsidian Local REST API
- API Key:
047e84eb941910b7ae221ea6b458fbd6c9b2bbfbeab654e05a59893520cd29f9 - Base:
http://100.83.112.84:27123 - Endpoint:
POST /vault/{filename}.md - Header:
Authorization: Bearer {key} - Content-Type:
text/markdown
同步优先级
- 优先使用 Obsidian Local REST API
- 如果 API 失败(连接错误或”Could not determine home directory”):使用 SCP fallback
- 如果都失败:保存到本地
~/.hermes/hermes-wiki/draft-{date}.md和D:\\hermes\\sessions\\wiki-draft-{date}.md
SCP Fallback 路径
scp -i ~/.ssh/id_ed25519_hermes \
~/.hermes/hermes-wiki/{filename}.md \
[email protected]:'H:\\My Drive\\Jakephone\\Obsidian Vault\\'知识分类规则
| 类别 | 内容 |
|---|---|
env/ | 平台、环境、工具、路径 |
project/ | 项目状态、配置、IDs |
skill/ | 技能流程、调试方法 |
convention/ | 工作流规范、调度规则 |
user/ | 用户偏好、沟通风格 |
Known Issues
⚠️ Network Isolation in Cron Context (2026-05-10)
Both the Obsidian Local REST API (http://100.83.112.84:27123) AND SSH/SCP to PC (100.83.112.84) timeout in cron job context. This is Termux cron network namespace isolation — both paths are blocked even though they work fine in interactive sessions.
Confirmed failures in cron context:
- API:
curlexits 28 (connection timeout) - SCP:
sshexits 255 (connection timeout) - Both work fine in interactive Termux sessions
Current fallback: Save to local draft (~/.hermes/hermes-wiki/draft/wiki-draft-{date}.md). Manual sync needed after returning to interactive session.
Dream Consolidation — vault-keeper Integration (2026-05-19)
The two systems are 串联 (series), not competing:
03:30 dream-consolidation.py → 提取 session 知识 → knowledge_buffer.json
03:35 vault-keeper.py sync → 同步 buffer → Obsidian vault
04:00 vault-keeper 3h sync → buffer 已空,显示 "nothing to sync" (正常)
“Buffer empty” 是正常状态,不是错误 — 说明上一次 sync 成功清空了 buffer。
Knowledge Categories for Wiki
| category | Wiki target | Notes |
|---|---|---|
skill | skill/{name}.md | 技能文档 |
decision | decisions/decision-log.md | 重要决策及理由 |
bug_fix | projects/{project}-complete.md | 项目 bug 修复 |
env | env/{name}.md | 环境配置 |
daily | daily/{YYYY-MM-DD}.md | 每日日志 |
project_note | projects/{project}.md | 项目进展 |
Wiki Sync Rules (2026-05-19)
- 优先写入 wiki 分类:
skill/、convention/、env/、projects/ - 遵守 frontmatter 规范:title, created, updated, tags, sources
- 每个页面至少 2 个 wikilinks 到其他相关页面
- 保留原有快速沉淀层:
decisions/decision-log.md、daily/继续追加 - 更新 index.md:新增页面必须在索引中体现
Cron Job Architecture
| Job | Schedule | Script | Role |
|---|---|---|---|
vault-keeper 3h sync | 0 1,4,7,10,13,16,19,22 * * * | vault-keeper.py | 同步 buffer → vault |
dream-consolidation | 30 3 * * * | dream-consolidation.py | 提取 session → buffer |
Job ID (removed): 8a183e5876f0 (daily-consolidation.sh — script not found, removed 2026-05-19)
- 脚本本身很快(文件 stat + 简单 sqlite 查询),超时通常是 DB 查询卡住 或 scheduler.py bug
- Job ID:
ee43bb83e0ef - Schedule:
0 */3 * * *(每3小时) - 脚本:
check_recent_chat.sh - 技能:
llm-wiki
convention/cron-wiki-sync
Wiki Sync 规范(2026-05-03 更新)
目标
将 session highlights 里的知识内化到 wiki 分类文件,而不是只堆日志。
Obsidian Local REST API
- API Key:
047e84eb941910b7ae221ea6b458fbd6c9b2bbfbeab654e05a59893520cd29f9 - Base:
http://100.83.112.84:27123 - Endpoint:
POST /vault/{filename}.md - Header:
Authorization: Bearer {key} - Content-Type:
text/markdown
同步优先级
- 优先使用 Obsidian Local REST API
- 如果 API 失败(连接错误或”Could not determine home directory”):使用 SCP fallback
- 如果都失败:保存到本地
~/.hermes/hermes-wiki/draft-{date}.md和D:\\hermes\\sessions\\wiki-draft-{date}.md
SCP Fallback 路径
scp -i ~/.ssh/id_ed25519_hermes \
~/.hermes/hermes-wiki/{filename}.md \
[email protected]:'H:\\My Drive\\Jakephone\\Obsidian Vault\\'知识分类规则
| 类别 | 内容 |
|---|---|
env/ | 平台、环境、工具、路径 |
project/ | 项目状态、配置、IDs |
skill/ | 技能流程、调试方法 |
convention/ | 工作流规范、调度规则 |
user/ | 用户偏好、沟通风格 |
Known Issues
⚠️ Network Isolation in Cron Context (2026-05-10)
Both the Obsidian Local REST API (http://100.83.112.84:27123) AND SSH/SCP to PC (100.83.112.84) timeout in cron job context. This is Termux cron network namespace isolation — both paths are blocked even though they work fine in interactive sessions.
Confirmed failures in cron context:
- API:
curlexits 28 (connection timeout) - SCP:
sshexits 255 (connection timeout) - Both work fine in interactive Termux sessions
Current fallback: Save to local draft (~/.hermes/hermes-wiki/draft/wiki-draft-{date}.md). Manual sync needed after returning to interactive session.
- ⚠️ check_recent_chat.sh scheduler bug RECURRING (2026-05-06): Timeouts continue (now 13th at 06:02). Script works directly but times out in cron. Root cause in scheduler.py subprocess execution — NOT in script logic.
- ⚠️ Dream task recursive loop bug (2026-05-06 06:02): Dream task reads session files and accidentally reads its own active session → recursive feedback loop → timeout. Fix: use
sessions.jsoninstead of*.jsonfiles. Seeskill/llm-wiki-dream-bug.md. - sqlite3 超时:如果
check_recent_chat.sh脚本超时(120s),可能是hermes.db的 messages 表过大。检查:sqlite3 ~/.hermes/hermes.db "SELECT COUNT(*) FROM messages;"
Dream Task Scheduler Info
- Job ID:
ee43bb83e0ef - Schedule:
0 */3 * * *(每3小时) - 脚本:
check_recent_chat.sh - 技能:
cron-wiki-sync(注意:不要用llm-wiki— 该名称不会解析到 convention category 下的 skill,应直接使用cron-wiki-sync)
⚠️ skill: llm-wiki 不会解析到 cron-wiki-sync
尽管 cron-wiki-sync SKILL.md 的 triggers 包含 llm-wiki,但 cron job scheduler 按名称直接查找根级 skill 时无法找到它。根级存在 skills/llm-wiki/ 但它与 cron-wiki-sync 是不同 skill。正确做法:cron job 直接设置 skill: cron-wiki-sync**。
Dream Consolidation + vault-keeper Integration (2026-05-19)
The two systems are 串联 (series), not competing:
03:30 dream-consolidation.py → 提取 session 知识 → knowledge_buffer.json
03:35 vault-keeper.py sync → 同步 buffer → Obsidian vault
04:00 vault-keeper 3h sync → buffer 已空,显示 "nothing to sync" (正常)
“Buffer empty” 是正常状态,不是错误 — 说明上一次 sync 成功清空了 buffer。
Cron Job Architecture
| Job | Schedule | Script | Role |
|---|---|---|---|
vault-keeper 3h sync | 0 1,4,7,10,13,16,19,22 * * * | vault-keeper.py | 同步 buffer → vault |
dream-consolidation | 30 3 * * * | dream-consolidation.py | 提取 session → buffer |
Removed job: 8a183e5876f0 (daily-consolidation.sh — script not found, removed 2026-05-19)