Frontmatter
| id | 10780 |
| title | Codify backup-first operational discipline before DreamMode/Sandman invocation |
| state | Closed |
| labels | documentationenhancementaimodel-experience |
| assignees | [] |
| createdAt | May 5, 2026, 9:31 PM |
| updatedAt | May 9, 2026, 11:41 PM |
| githubUrl | https://github.com/neomjs/neo/issues/10780 |
| author | neo-opus-4-7 |
| commentsCount | 2 |
| parentIssue | 10671 |
| subIssues | [] |
| subIssuesCompleted | 0 |
| subIssuesTotal | 0 |
| blockedBy | [] |
| blocking | [] |
| closedAt | May 9, 2026, 11:41 PM |
Codify backup-first operational discipline before DreamMode/Sandman invocation

explore: while working on DreamService code, doing frequent backups is fine. on the long run: daily backups should be sufficient, and sandman could get triggered way more often (e.g. after each sunset).
- 2026-05-09T15:17:04Z @neo-opus-4-7 cross-referenced by #11018
- 2026-05-09T15:18:03Z @neo-opus-4-7 cross-referenced by #11019
- 2026-05-09T16:42:34Z @neo-opus-4-7 cross-referenced by #11029
- 2026-05-09T21:36:39Z @neo-opus-4-7 assigned to @neo-opus-4-7
@neo-opus-4-7 - 2026-05-09T21:41:06Z
Closing as superseded — verify-before-assert correction.
@tobiu surfaced (2026-05-09): manual backup was already done today, and the orchestrator architecture (post-#11041 / #11044 / #11051 M3.5 decomposition) should now own daily scheduled backups. Codifying manual operator discipline that the orchestrator-owned scheduled task supersedes is wrong-shape.
Empirical anchor (learn/agentos/v13-path.md:90, authored this session):
"Daily backup with rotation cap (PRIO 0 — non-negotiable) — orchestrator-owned scheduled task; 30-day rotation cap (one month coverage); backup-success precondition for any DreamMode/Sandman task spawn (#10780 discipline + post-#11018-retraction architectural correction; BackupService extraction lands as M4 per-task coordinator)"
The architectural direction is BackupService extraction as M4 per-task coordinator. The discipline-codification this ticket prescribed is obsolete under that architecture.
Self-acknowledgment: I started the docs work without verify-before-assert checking the current orchestrator-architecture state. @tobiu correctly caught the wrong-shape direction before I committed any code. Reverted all unstaged docs edits.
Closing as not-planned. Replaced by the M4 BackupService extraction work referenced in v13-path.md line 90 + 188 + 193.
— @neo-opus-4-7
- 2026-05-09T21:41:07Z @neo-opus-4-7 closed this issue
- 2026-05-09T21:41:10Z @neo-opus-4-7 unassigned from @neo-opus-4-7
- 2026-05-09T21:44:21Z @neo-opus-4-7 cross-referenced by #11062
- 2026-05-09T21:58:38Z @neo-opus-4-7 cross-referenced by #11065
- 2026-05-09T22:16:26Z @neo-opus-4-7 cross-referenced by PR #11067
Context
Surfaced 2026-05-05 during DreamMode-inactivity investigation per @tobiu's explicit hint: "before running dreammode / sandman, to backup MC. we have scripts for it."
The Memory Core has an atomic-bundle backup primitive (
npm run ai:backup→buildScripts/ai/backup.mjs) that snapshots the unified MC + KB + graph + concepts + trajectories state into.neo-ai-data/backups/backup-<ISO-timestamp>/. The discipline of running backup BEFORE invoking DreamMode/Sandman (autoDream / autoGoldenPath / runSandman) is currently tribal knowledge — operator-named in session 2026-05-05 but not codified in any committed substrate.learn/agentos/DreamPipeline.mdexists as the canonical operator-facing substrate for the Dream Pipeline architecture. It does NOT currently document the pre-run backup discipline.The Problem
Without codified pre-run discipline:
Agents operating autonomously (e.g., night-shift driver per #10763 Leased Driver Pattern, or follow-up agents picking up DreamPipeline-adjacent work) may invoke
runSandman/ re-enableautoDreamwithout backup, risking the same regression that triggered @tobiu's manual disable in the first place.Operators picking up DreamMode work after a multi-day gap must remember the discipline by recall rather than reading documented procedure. Tribal knowledge accumulates; new contributors hit the regression and lose state.
The substrate IS observable through
npm run ai:backup— but the discipline gap is between knowing the script exists and knowing to ALWAYS run it before DreamMode invocation.The Architectural Reality
learn/agentos/DreamPipeline.md— canonical operator-facing substrate; natural home for the disciplinebuildScripts/ai/backup.mjs— the atomic-bundle backup orchestrator (covers KB JSONL + MC memories+summaries JSONL + graph SQLite JSONL + concepts JSONL + trajectories JSONL)package.json:18—"ai:backup"npm scriptai/mcp/server/memory-core/config.mjs:35,41— current operator-disabled state (false &&short-circuits onautoDream+autoGoldenPath)The Fix
Add a "Pre-Run Backup Discipline" section to
learn/agentos/DreamPipeline.md. Cover:npm run ai:backup— what it captures, where it stores, retention policy referenceautoDream/autoGoldenPathafter a deliberate disablerunSandmanmanually for the first time after a substrate changedefragChromaDB.cleanOldBackupsfamily)Sibling addition: cross-reference from any wake-substrate scripts (
runSandman.mjs,resumeHarness.mjsif it triggers Dream-adjacent work) to the backup discipline doc.Acceptance Criteria
learn/agentos/DreamPipeline.mdadds a "Pre-Run Backup Discipline" sectionnpm run ai:backup)runSandman.mjs(or its harness invocation point) cross-references the discipline docrunSandmanhalts with operator-actionable message if no recent backup exists (e.g.< 24h old); operator override flag (--skip-backup-check) for explicit bypassOut of Scope
runSandman.mjsbeyond the discipline doc (mechanical-gate variant — file as scope-extension if discipline alone insufficient)buildScripts/ai/backup.mjs(TODO comment in the file)Avoided Traps
pull-request-workflowprecedent.Related
buildScripts/ai/backup.mjs(atomic-bundle, per #10129 Phase 3)features.dreamblock (sibling-filed this session; provides the visibility needed to enforce the discipline)Origin Session ID: 23b9cbcd-4938-4a46-b21a-0d48dd12e7e7
Retrieval Hint:
query_raw_memories(query="DreamPipeline backup-first discipline runSandman ai:backup pre-run safety operator hint 10494")