TICKET-120-auto-extracted-memory-inherits-active-project.md


ticket_id: "tkt_pmem_auto_extract_active_project" title: "Auto-extracted memories inherit the active project when project mode is configured" agent: "codex" done: false goal: "Automatically extracted durable memories are stored as project-scoped memories for the active project instead of defaulting to global memory."

Tasks

  • Patch the auto-extraction write path so that when activeProject is set and AI extraction stores a new memory, the write includes scope: "project" and project: activeProject.
  • Ensure the patched write path is used for automatically extracted durable facts learned from conversation.
  • Verify the patched flow stores extracted memories in the intended project namespace.

Acceptance criteria

  • With activeProject set, auto-extracted durable memories are written with project scope and the active project name.
  • Automatic project-scoped chat memory no longer lands only as global memory in the patched flow.
  • The patched behavior is demonstrated with a conversation that produces a durable extracted fact.

Tests

  • Enable activeProject and AI extraction, generate a durable repo fact through conversation, and verify the resulting memory is stored under the active project.
  • Inspect the stored memory metadata and verify both scope and project are populated from the active project configuration.

Notes

  • Source: "Patch the plugin so auto-extracted facts inherit the active project" and "when activeProject is set ... it writes with scope: "project" and project: activeProject".
  • Constraints:
    • Preserve the source behavior statement that this patch is limited to automatic chat extraction.
    • Do not claim native automatic memory creation from repo files.
  • Evidence:
    • The source cites preprocessor.ts as the auto-extraction write path.
    • The source cites config.ts for activeProject.
    • The source cites that the database store defaults scope to global unless this path is patched.
  • Dependencies:
    • TICKET-100-project-scoped-memory-writes.md
  • Unknowns:
    • Exact file and function names beyond the source references were not provided.