mnemon-seed-persistence
Persist Mnemon memory across Codespace rebuilds.
- License 许可
- MIT
- 最近更新
- 2026-11-13
- Stars
- ★ 2
- Forks
- 2
01 前言 Front Matter
- name
- mnemon-seed-persistence
- tags
- [ "mnemon", "seed", "persistence", "codespace", "memory" ]
- author
- hermes-agent
- license
- MIT
- version
- 1.0.0
- description
- Persist Mnemon memory across Codespace rebuilds.
03 SKILL.md 正文
Mnemon Seed Persistence (survive Codespace rebuilds)
CRITICAL: the live Mnemon DB is ephemeral. Each fresh Codespace spawn re-seeds from the
checked-in JSON file mnemon/seed.json, imported by boot.sh on every
boot. mnemon_remember writes only land in ~/.mnemon/data/default/mnemon.db for THIS instance
— they do NOT survive a container rebuild. To make a memory or skill available to a future fresh
Codespace, it must be in seed.json (and committed), not just the live DB.
Format & contract
{ "schema_version": "1",
"insights": [
{ "content": "Lead with the salient fact; plain text, no headers.",
"category": "context", // preference|decision|insight|fact|context|general
"importance": 5, // 1–5
"tags": ["codespace","cdp"],
"entities": [],
"source": "agent" }
] }
Import deduplicates by content prefix. check-seed-export.sh flags any live Mnemon entry with
importance ≥ 4 missing from seed.json (action-needed before merge).
Workflow (when committing a skill or durable insight)
- Propose the entry for user review — do NOT blind auto-commit (user wants sign-off on durable memory).
- Edit
mnemon/seed.json— append to theinsightsarray with correct field names:- Use
content(nottext) for the insight body - Include
category,importance,tags,entities,source: "agent"
- Use
- Also commit a standalone extract
seed-<topic>.json(same schema, just the new insights) into the same PR, so the memory ships with the code that needs it. - Validate before commit (the exact step
boot.shruns):mnemon import --dry-run mnemon/seed.jsonexpect: "Dry run: N insights, 0 explicit edges — validation passed." - Commit with
--no-gpg-sign(GPG unavailable; plaingit commitexits 128). Push with the VS Code server token (see codespace-gh-auth):git -c credential.helper= -c "url.https://gitricko:${GH_TOKEN}@github.com/.insteadOf=https://github.com/" push origin <branch>
Live tool still matters
Use mnemon_remember/mnemon_recall during the session for immediate recall and for staging what
should later be promoted to seed.json. Live DB = working set; seed.json = durable snapshot.
Cleanup
When deleting a skill/project, also purge its seed.json entries:
- persistent-knowledge/references/cleanup-deleted-skill.md — Full procedure for wiki, Mnemon DB, seed.json, and cross-references
Related
- codespace/memory-automation — the live Mnemon workflow this extends with durable persistence
- codespace/codespace-persistent-symlinks — whole-folder symlink persistence (memories/ + skills/)
04 同仓库更多 Skills
version-single-source
Use when adding a new component dependency or versioning a binary in install/boot scripts.
tdd
Test-driven development. Use when the user wants to build features or fix bugs test-first, mentions "red-green-refactor", or wants integration tests.
shell-path-login
Use when a binary or script works in one shell context but not another (interactive vs non-interactive login vs non-login shell).
self-update-fix
Fix a failing dependency update PR. Use when a self-update PR's CI fails, or when invoked by scripts/self-update-fix.sh.
pr-change-log
Use when a multi-commit PR needs its description written/updated, or when closing out a long branch with many fix commits.
persistent-knowledge
Persistent skills/knowledge in Codespace via symlinks.