Skip to content

Ambient context search: automatic project-aware retrieval (ADR-008) #28

@Paul-Kyle

Description

@Paul-Kyle

Problem

With many memory files across multiple projects, search results from unrelated projects drown out relevant ones. A search for "ADR-004" from a palinode working directory returns results from other projects instead of the palinode-specific memory.

Solution

Automatic ambient context boost. When searching from a project directory, memories tagged with matching project entities get a score boost after hybrid search fusion. Not a filter — a lens. Cross-project results still appear if they're genuinely the best match.

How it works

  1. Context resolution: CWD → project entity (configurable map or auto-detect from directory name)
  2. Entity boost: Results from files tagged with the matching project entity get a 1.5x score multiplier
  3. Embedding augmentation: Query is prepended with project context before embedding for semantic-level awareness
  4. CLI flag: --no-context to disable when you want unbiased results

Interfaces

  • MCP: Auto-detects from PALINODE_PROJECT env var or CWD
  • API: Optional context field on search request
  • CLI: Auto-detects from CWD, --no-context to disable

Config

context:
  enabled: true
  boost: 1.5
  auto_detect: true
  project_map:
    my-project: project/my-project

Status

Phase G1 (project entity boost) is implemented with 10 tests. See ADR-008 for full design including Phase G2 (server-side session context) and G3 (multi-signal fusion with learned weights).

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions