feat(backup): add S2.6 daily profile backup (fixes #50)
One liveness-gated snapshot pass per launch, chained after provisioning: gateway.pid pid-liveness + ps scan (skip while the engine runs), 24 h age check, curated recursive copy (credentials and SQLite sidecars in; logs/caches/locks out), atomic temp+rename install, keep last 7. Restore stays manual copy-back in v1 — Help > Open Backup Folder and a RESTORE.md written beside the snapshots. [Generated by AI]
This commit is contained in:
1 parent
f21d3a6844
commit
e5b7203906
11 files changed
+593
-5
No files matched your search
@@ -16,7 +16,7 @@
|
||||
- **Engine (G1, resolved):** Museion is the shell; Hermes (Python, NousResearch, MIT) is the engine, driven over **ACP** — spawned as a child process `hermes acp -p museion` (stdio JSON-RPC). **User-installed Hermes** — no app-managed install, no bundled Python. First run gates on `hermes acp --check`.
|
||||
- **Profile isolation (G3, this session):** Museion always runs Hermes under the dedicated `museion` profile (`~/.hermes/profiles/museion/` — isolated config, memory, skills, credentials, chat history). Coding learnings and writing learnings never mix. Not configurable in v1.
|
||||
- **Provisioning (G3a):** first run creates the `museion` profile if missing, then seeds the writing skills bundled in the app (Serif stack, merged deslop, container personas, demonstrator doctrine, distilled craft canon, drill packs — spec: *The bundled skill set*) into `~/.hermes/profiles/museion/skills/`. Seeding is **additive only** — a bundled skill absent from the profile is copied; an existing one is never overwritten, because the mentor's self-improving skills live there.
|
||||
- **Profile backup (G4):** Museion snapshots `~/.hermes/profiles/museion/` to `~/Library/Application Support/Museion/Backups/` — timestamped, at most once per day on launch, keeping the last 7. Snapshot is a complete copy (credentials included) so restore is one Finder copy-back; backups stay user-local, never in the project or git.
|
||||
- **Profile backup (G4, amended #15):** Museion snapshots `~/.hermes/profiles/museion/` to `~/Library/Application Support/Museion/Backups/` — timestamped, at most once per day on launch, keeping the last 7, and only when the engine isn't running (liveness gate). The snapshot is a complete copy of what matters (credentials and SQLite sidecars included) with curated exclusions — `logs/`, `cache/`, `audio_cache/`, `image_cache/`, `*.pid`/`*.sock`/`*.lock`, `.DS_Store`, model-cache files — so restore is one Finder copy-back; backups stay user-local, never in the project or git.
|
||||
- **Content layout (G5, merged):** one Museion Home; a post is a folder `posts/<post id>/` holding `post.md`, `research/`, `assets/` — created lazily on first write. Further writing types (`essays/`, `stories/`) get the same shape when they arrive; v1 ships `posts/` only. Post id = slug of the draft's first line, computed at first save; explicit Rename moves the folder (the file is always `post.md`); external markdown edits as-is, Import (copy, never move) makes it a Post. ADR-0004.
|
||||
- **Writing tools (G6, merged; ADR-0008 + ADR-0006):** the Museion binary doubles as the stdio MCP server `museion-tools`, registered into the profile via `hermes mcp add` once the mode exists (#23) — provisioning never writes `mcp_servers` (#44) — any MCP-capable engine registers it as a client (engine-swap seam — Hermes today, Pi the identified fallback, ADR-0007). Tool surface: `query_learnings`, `submit_fix_cards` — the fix-card tool's argument schema is the fix-card schema; anchors are quote-based (exact substring + occurrence + context), so edits between issue and accept degrade to a loud no-match, never a wrong-span patch. Research stays engine-native; draft stats are computed natively in Swift at capture time — not an agent tool. Pass prompts are Museion-sent minimal stubs (pass name, piece path, tool reminders) — all methodology lives in the profile's skills. The Serif methodology (SKILL.md files, agentskills.io-standard) stays the mentor's operating system. Fallbacks if ACP ever falls short: Hermes gateway JSON-RPC (every feature), HTTP+SSE API server.
|
||||
- **Critique memory home (ADR-0005):** writer learnings live in the Home's `learnings/` (no dot — hand-editable, git-diffable), scoped per content type (`learnings/posts/`, …), one markdown file per learning with decay state in frontmatter. The mentor's own automated memory stays in the profile; Museion never reads or writes it. Fresh start in v1 — verified: the hand-maintained MEMORY.md carries agent-tooling notes, no writing learnings to import.
|
||||
@@ -91,7 +91,7 @@ From the 2026-08-28 sessions (Sudowrite/Muse learnings; issues #9, #10). None of
|
||||
- **S2.3 — Session lifecycle.** As the writer, each session is a conversation with the standard affordances. *AC:* new/cancel/fork/resume/compact; every pass auto-creates its session; freeform sessions always allowed, free-floating or Piece-associated; sessions are engine-owned — Museion only UIs them (swap the engine, transcripts stay behind); cancel mid-pass stops the agent; streamed output renders live.
|
||||
- **S2.4 — Writing tools, Museion-hosted.** As the mentor, I have purpose-built tools. *AC:* the Museion binary serves them over stdio MCP (`museion-tools`), registered into the `museion` profile via `hermes mcp add` once the mode exists (#23); provisioning never writes `mcp_servers` (#44); surface = `query_learnings` + `submit_fix_cards`, typed and quote-anchored (ADR-0006); callable mid-pass; outputs land in Museion's UI; passes are Museion-driven over ACP; research stays engine-native; draft stats are computed natively in Swift at capture time — not an agent tool; `query_learnings` returns only the visible set — Decay filtering happens inside `museion-tools`, the mentor never sees the mechanics.
|
||||
- **S2.5 — Trust model.** As the writer, the mentor acts only within trust levels: auto-act / inform-after / ask-before / never-do. *AC:* trust level maps to UI (dimmed inline edits vs blocking asks); never-do actions never auto-apply. Defaults, not configurable in v1: research fetch = auto-act; candidate source-note = inform-after; apply any fix, promote, keep note, publish = ask-before; delete files, touch anything outside Home and profile, shell, git = never-do.
|
||||
- **S2.6 — The engine is backed up.** As the writer, the mentor's accumulated state (memory, skills, history) survives profile corruption or a bad update. *AC:* on launch, if the last snapshot is older than a day, Museion copies `~/.hermes/profiles/museion/` to a timestamped snapshot under `~/Library/Application Support/Museion/Backups/`, keeping the last 7 (G4); complete copy, credentials included; restore is manual copy-back in v1; snapshots never land in the project or git.
|
||||
- **S2.6 — The engine is backed up.** As the writer, the mentor's accumulated state (memory, skills, history) survives profile corruption or a bad update. *AC:* on launch, if the last snapshot is older than a day and the engine isn't running (liveness gate: gateway.pid pid-liveness + `ps` scan), Museion copies `~/.hermes/profiles/museion/` to a timestamped snapshot under `~/Library/Application Support/Museion/Backups/`, keeping the last 7 (G4); complete copy of what matters — credentials included, logs/caches/locks excluded; a failed backup is one log line, never an alert; restore is manual copy-back in v1 (Help → Open Backup Folder; `RESTORE.md` beside the snapshots); snapshots never land in the project or git.
|
||||
- **S2.7 — Draft from session.** As the writer, a freeform session can birth a Post. *AC:* "New Post from Session" creates the piece folder, writes the draft, stamps `origin: ai` (immutable — never stats-eligible); brainstorming is a session started with a brainstorm prompt — no separate machinery; session↔Post association stays by name/convention.
|
||||
- **S2.8 — Drill offers at the motivation moment.** As the writer, when a pass exposes a weakness, the mentor may offer a micro-drill targeting exactly that weakness. *AC:* drills are session flavor (bundled prompt-pack skill — see *The bundled skill set*), no machinery beyond S2.3; ≤2 minutes, offered right after the pass finding that motivates it; single-dimension rule — a drill targets exactly one weakness shelf, the pattern the pass just exposed, nothing else; never homework, queues, or streaks; a declined drill vanishes; drills never edit the draft.
|
||||
|
||||
|
||||
Reference in new issue
Block a user