Skip to content

feat(cli): move sessions, prompts and observations between projects #1463

Description

@ciltocruz

🔍 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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions