Skip to content

feat(store): add free-form tags for multi-dimensional observation filtering #181

@GravityZenAI

Description

@GravityZenAI

Feature Description

The current type field is a fixed enum (bugfix, decision, architecture, etc.). In practice, observations often span multiple concerns — a bugfix that's also about auth and supabase and is critical. There's no way to express this multi-dimensionality today.

Proposal

Add an optional tags field to observations — free-form, agent-created labels for flexible categorization.

Schema change:

ALTER TABLE observations ADD COLUMN tags TEXT DEFAULT '';
-- Stored as comma-separated: "auth,supabase,critical"
-- FTS5 would index them naturally

MCP tool changes:

  • mem_save(tags: "auth,critical") — attach tags when saving
  • mem_search(tags: "auth,critical") — filter by tag intersection
  • mem_search(tags: "auth", query: "middleware") — combine with existing text search

CLI/TUI:

  • engram search --tags auth,critical
  • TUI observation view shows tags as colored badges

Why it matters

Multi-dimensional filtering. An agent could ask "show me all critical auth-related observations" — impossible today without keyword-guessing in mem_search. Tags would also enable:

  • Dashboard views in TUI grouped by tag
  • Tag clouds showing what topics dominate a project's memory
  • Cross-project tag consistency — agents could converge on shared tag vocabularies

Design principles

  • Opt-in: no tags required, existing observations unaffected
  • Free-form: no predefined tag list, agents create as needed
  • FTS5-compatible: comma-separated text is naturally searchable
  • Lightweight: single TEXT column, no join tables

Related

Affected Area

MCP tools, Store (schema), CLI, TUI

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions