feat(cli): move sessions, prompts and observations between projects
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 68/100
Research direction
Start from the existing RescueNullProjectOwnership transaction/journaling path and doctor repair's backup logic (under <ENGRAM_DATA_DIR>/backups/), plus the immutability guard ErrObservationProjectImmutable in internal/store/store.go. The deliverable is a new engram move --to <project> ... --dry-run|--apply subcommand with the anti-split guard reused from rescue, then the MCP mem_move_records admin counterpart; done means all six acceptance criteria pass with rescue-ownership and doctor behavior unchanged. Note the projects merge half depends on open #1451 and can be scoped out.
Written by the indexing model from the issue text.
Description
🔍 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 #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/.- MCP
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 #1296 does not exist in v2.2.1 and its building block (#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 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:
- #286 (closest existing, CLI/MCP repair with backup)
- #179 (
mem_updatenever persisted project change) - #1296 (
merge --from/--to, CLOSED without the subcommand) - #1451 (OPEN, pending seam)
- #94 (TUI delete sessions, delete not move)
- #107 (selective export TUI, not move)
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-ownershipanddoctorbehavior unchanged.
- Dominant language
- Go
- Stars
- 7.1k
- Forks
- 729
- Avg merge
- 10h 51m
- Merged PRs (30d)
- 277
Getting set up
Starts the project's dev container in your browser, under your own GitHub account.
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Gentleman-Programming/engram
-
status:needs-review
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Gentleman-Programming/engram#2065 · 1 comment ·
Maintainers usually reply within 1 day
-
feat(cli): run engram serve in the background as a daemonPossibly taken A pull request linked to this issue is open or already merged. Openstatus:needs-review type:feature
Difficulty 4/5 3-5 days Newbie friendliness 35/100
Gentleman-Programming/engram#2228 · 1 comment ·
Maintainers usually reply within 1 day
-
status:needs-review type:feature
Difficulty 4/5 3-5 days Newbie friendliness 22/100
Gentleman-Programming/engram#2203 · 1 comment ·
Maintainers usually reply within 1 day
-
feat(store): reduce isolated test fixture startup costPossibly taken @dnlrsls claimed this 3 days ago. Openstatus:approved type:feature
Gentleman-Programming/engram#2202 · 1 comment · 1 assignee ·
Maintainers usually reply within 1 day
-
status:needs-review type:question
Difficulty 5/5 Over a week Newbie friendliness 20/100
Gentleman-Programming/engram#2201 · 3 comments ·
Maintainers usually reply within 1 day
All issues in Gentleman-Programming/engram
Similar issues
-
date_time, url_encode, html_escape, to_unix_time, contains_all and contains_any panic when called without argumentsPossibly taken @antcybersec claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
projectdiscovery/dsl#372 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
JuliusBrussee/caveman#1449 ·
Maintainers usually reply within 1 day
-
clawsweeper:fix-shape-clear clawsweeper:needs-maintainer-review clawsweeper:needs-product-decision clawsweeper:no-new-fix-pr clawsweeper:source-repro impact:ux-friction issue-rating: 🦞 diamond lobster P2
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
openclaw/gogcli#1291 · 1 comment · 1 reaction ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
apache/arrow-swift#209 ·
Maintainers usually reply within 1 day
-
bug(instrumentation/kafka-go): producer hook writes trace headers into the caller's messagesPossibly taken @Aryanbhargava18 claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
open-telemetry/opentelemetry-go-compile-instrumentation#1669 ·
Maintainers usually reply within 2 days