Skip to content

feat: project-aware memory tagging for noise-free recall - #616

Merged
ajianaz merged 1 commit into
developfrom
feat/project-aware-memory-tagging
Jul 8, 2026
Merged

ajianaz merged 1 commit into
developfrom
feat/project-aware-memory-tagging

Conversation

@ajianaz

@ajianaz ajianaz commented Jul 8, 2026

Copy link
Copy Markdown
Collaborator

Problem

When agents work across multiple projects (Bond, Corin, Uteke, etc.), all memories are stored in a single namespace without project-level scoping. This causes noise during recall — querying "fix auth bug" while working on project Bond returns results from project Corin's auth system, wasting context tokens and creating confusion.

Solution

Tag-based project scoping using existing --tags flag support. No Uteke binary changes required.

Changes

1. SKILL.md — Project-Aware Memory (MANDATORY) section

  • Instructions for all agents (pi, claude, cursor, opencode) to always tag project:<name>
  • Detection rules from workdir, file paths, and conversation context
  • Examples and rationale

2. pi-memory-provider extension — auto project detection

  • Detects project from cwd (walks up to known project root directories)
  • Falls back to detecting project name from user prompt text
  • Recall filtered by --tags project:<name>
  • /uteke-save command auto-tags with project:<name>
  • Status bar shows active project name

3. Hermes hooks (external, applied separately)

  • uteke-extract: Scans session messages for /repos/<project>/ paths, auto-tags extracted facts
  • uteke-recall: Detects project from user_message, filters recall by --tags project:<name>

Detection Strategy

  1. File paths: /repos/<project>/ pattern in text
  2. CWD: Walk up from current directory to known project roots (/opt/data/repos/, ~/repos/)
  3. Majority vote: When multiple projects mentioned in session, most frequent wins

Example Flow

CTO works on Bond → session messages contain /opt/data/repos/bond/
→ hook extract detects "bond" → auto-tags: project:bond
→ hook recall filters --tags project:bond → only Bond memories appear

Pi works in /opt/data/repos/corin/
→ extension detects cwd → project:corin
→ recall automatically scoped to corin memories only
→ /uteke-save auto-tags project:corin

What's NOT changed

  • Uteke binary — no rebuild needed
  • Existing memories — untouched (can be backfilled with project tags later)
  • Namespace isolation — remains per-agent (cto, cfo, etc.)

Add automatic project detection and tag-based scoping to all memory
operations. This prevents noise when recalling — agents only see memories
relevant to the current project.

Changes:
- SKILL.md: Add 'Project-Aware Memory (MANDATORY)' section with rules,
  examples, and rationale for project:{name} tagging
- pi-memory-provider extension: Auto-detect project from cwd and user
  prompt text, filter recall by --tags project:<name>, auto-tag remember
  commands with project:<name>
- Hermes hook extract (external): Auto-detect project from session
  messages file paths, add project:<name> tag on auto-extract
- Hermes hook recall (external): Auto-detect project from user_message,
  filter recall by --tags project:<name>

Detection strategies:
1. File paths: /repos/<project>/ pattern matching
2. CWD: walk up from current directory to known project roots
3. Majority vote when multiple projects mentioned in session

No Uteke binary changes required — all implemented via existing --tags
flag support.
@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown

🔍 Cora AI Code Review

⚠️ Review recommended — warnings found.

🟡 Warning (1)

  • unknown:? — Cora AI review could not complete: failed to parse LLM JSON response: parse failed (original: EOF while parsing a value at line 1 column 0, after repair: EOF while parsing a value at line 1 column 0). Review was skipped; no code quality issues were found by the automated check.

Review powered by cora-cli · BYOK · MIT

@ajianaz
ajianaz merged commit 38b528e into develop Jul 8, 2026
9 checks passed
@ajianaz
ajianaz deleted the feat/project-aware-memory-tagging branch July 8, 2026 07:35
ajianaz added a commit that referenced this pull request Aug 13, 2026
…gging

feat: project-aware memory tagging for noise-free recall
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant