Skip to content

Context & memory

Partial

Scoped context, confirmed memory selection and lineage exist. The full proposed memory lifecycle is not implemented.

Code and tests

The current context builder combines scoped conversation history, selected document versions, personal preferences and project-memory records. It records input dependencies so later invalidation can identify affected work.

services/product-worker/internal/capabilities/context.go performs selection inside the task’s tenant scope. The generated queries in internal/database/queries/context.sql restrict eligible records. TestAIXTaskContext covers context visibility and selection.

The distinction between user instructions and quoted source text matters because a retrieved document must not gain authority to change the task. The system prompt in capabilities/model.go treats retrieved content as evidence; this is a prompt-level mitigation, not a proof that every model response will comply.

Memory selection stays within the project that owns it. Task records retain dependencies on their inputs, including sources that influenced an answer without being cited. Generated documents and proposals inherit those dependencies so later deletion can identify affected work. Storage & indexes explains deletion behavior and its current limits.

User-authored memory updates use revision checks; TestPostgresMemoryProposalsAndExports verifies a stale update is rejected and forgetting clears retained content. Automated semantic contradiction resolution and restoring memory history after dependency review remain targets. The presence of project-memory tables does not establish those behaviors.