Skip to content

feat: memory type formalization — typed memory categories with auto-inference #349

Closed

Description

@ajianaz

Motivation

Uteke has a memory_type field (default: 'fact') but it's barely used — no filtering, no validation, no auto-inference. GBrain's schema packs make types a first-class concept that threads through every read/write path.

This issue formalizes memory_type into a useful taxonomy — no LLM, pure pattern-based inference.

Proposal

Formal Type Taxonomy

pub enum MemoryType {
    Note,        // general freeform note
    Decision,    // a decision that was made (contains "decided", "chose", "will use")
    Insight,     // a realization or learning (contains "realized", "learned", "discovered")
    Reference,   // factual reference info (links, specs, docs)
    Procedure,   // how-to / steps (contains "steps:", "how to", numbered lists)
    Preference,  // user preference (contains "prefer", "always", "never")
    Event,       // time-bound event (has explicit date/time)
    Fact,        // verifiable fact (default, backward compatible)
}

Auto-Inference (zero LLM)

Pattern-based inference when user doesn't specify --type:

Pattern Inferred Type
Contains "decided to", "chose", "will use", "going with" Decision
Contains "realized", "learned", "discovered", "turns out" Insight
Starts with URL or "ref:", "see:", "docs:" Reference
Contains numbered list or "step 1", "how to" Procedure
Contains "always", "never", "prefer", "hate" Preference
Contains ISO date pattern (2026-06-14) + time word Event
Fallback Note

CLI Changes

# Explicit type
uteke remember "Decided to use SQLite for local storage" --type decision

# Auto-inferred (no --type flag → pattern matching kicks in)
uteke remember "Decided to use SQLite for local storage"
# → auto-inferred as "decision"

# Filter recall by type
uteke recall "storage" --type decision
uteke list --type reference --namespace work

# Type statistics
uteke stats --by-type

Recall Boost

Memories of type Decision and Preference get a small score boost in recall (they're high-value, long-lived). Type Event gets a recency boost. All configurable.

Scope

  • Define MemoryType enum with serde + Display
  • Implement pattern-based auto-inference function
  • Add --type flag to remember CLI
  • Add --type filter to recall and list
  • Add type-based score boost in recall ranking
  • Add uteke stats --by-type breakdown
  • Migration: map existing 'fact' → Fact, others → Note
  • Tests: inference patterns, filtering, boost, backward compat

Non-Goals

  • Custom/user-defined types (fixed enum only for now)
  • LLM-based type classification (pattern matching only)
  • Schema pack system (GBrain's 14-verb schema authoring — too complex)

References

  • GBrain: gbrain-base-v2 schema pack — 15-type taxonomy
  • Current: memory_type TEXT NOT NULL DEFAULT 'fact' in store.rs

Activity

  1. added this to the milestone on Jun 14, 2026
  2. added
    enhancement
    scope:core
    scope:cli
    type:feature
    on Jun 14, 2026
  3. modified the milestones: , v0.2.1 — DX & Ecosystem on Jun 14, 2026
  4. added 8 commits that reference this issue on Jun 18, 2026
  5. added a commit that references this issue on Jul 2, 2026
  6. added a commit that references this issue on Aug 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementpriority:mediumscope:cliscope:coretype:feature

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions