🔍 Problem Description
Engram sometimes stores information in the wrong project and there is no way to move a session, prompt or individual observation that already has a project assigned to another project, neither via CLI, MCP nor TUI.
Verified today on v2.2.1:
💡 Proposed Solution
New engram move --to <project> [--session <id>]... [--observation <id>]... [--prompt <id>]... [--dry-run|--apply], reusing the transaction/journaling of RescueNullProjectOwnership but WITHOUT requiring empty project, with prior backup like doctor --apply, recalculated ownership_mode, and rejection when an observation would be split from its session (same anti-split guard as rescue).
MCP counterpart mem_move_records under admin profile with identical parameters.
In parallel, engram projects merge --from A --to B --dry-run|--apply on top of #1451.
📦 Affected Area
CLI (commands, flags)
🔄 Alternatives Considered
Evaluated existing paths, none of which move already-owned records: rescue-ownership (NULL/empty rows only), doctor repair (evidence-based reclassification only), projects consolidate / mem_merge_projects (normalization-equivalent name variants only), mem_update (project immutable by design).
📎 Additional Context
References:
Acceptance criteria:
- Move one already-assigned session to another project via CLI with dry-run first and backup on apply.
- Move one already-assigned observation to another project via CLI with dry-run first and backup on apply.
- Move one already-assigned prompt to another project via CLI with dry-run first and backup on apply.
- MCP admin equivalent (
mem_move_records).
- Docs updated.
- Existing
rescue-ownership and doctor behavior unchanged.
🔍 Problem Description
Engram sometimes stores information in the wrong project and there is no way to move a session, prompt or individual observation that already has a project assigned to another project, neither via CLI, MCP nor TUI.
Verified today on v2.2.1:
engram projects rescue-ownership --project <name> --session/--observation/--prompt <id>only rescues rows with NULL/empty project and reports already-owned rows as Blocked.engram doctor repair --project P --check ... --apply(from feat(doctor): detect and repair project-contaminated sessions #286) only reclassifies contaminated sessions when there is trustworthy evidence (git_remote/git_rootormanual-save-{known-project}name), with SQLite backup under<ENGRAM_DATA_DIR>/backups/.mem_updateexposes noprojectfield and the store rejects project changes withErrObservationProjectImmutable(internal/store/store.go).engram projects consolidateand MCPmem_merge_projects {from,to}(admin profile) only merge name variants equivalent under normalization and reject arbitrary pairs likeacmeapi→acme-api.engram projects merge --from/--torequested in feat(cli): merge two explicitly named projects when "projects consolidate --all" finds no groups #1296 does not exist in v2.2.1 and its building block (feat(store): explicit by-name project merge entry and record counts #1451,MergeProjectsByName+CountProjectRecords) is still OPEN.💡 Proposed Solution
New
engram move --to <project> [--session <id>]... [--observation <id>]... [--prompt <id>]... [--dry-run|--apply], reusing the transaction/journaling ofRescueNullProjectOwnershipbut WITHOUT requiring empty project, with prior backup likedoctor --apply, recalculatedownership_mode, and rejection when an observation would be split from its session (same anti-split guard as rescue).MCP counterpart
mem_move_recordsunder admin profile with identical parameters.In parallel,
engram projects merge --from A --to B --dry-run|--applyon top of #1451.📦 Affected Area
CLI (commands, flags)
🔄 Alternatives Considered
Evaluated existing paths, none of which move already-owned records:
rescue-ownership(NULL/empty rows only),doctor repair(evidence-based reclassification only),projects consolidate/mem_merge_projects(normalization-equivalent name variants only),mem_update(project immutable by design).📎 Additional Context
References:
mem_updatenever persisted project change)merge --from/--to, CLOSED without the subcommand)Acceptance criteria:
mem_move_records).rescue-ownershipanddoctorbehavior unchanged.