Skip to main content
TENET’s memory system ensures nothing is forgotten between sessions. Every journal entry, code change, and decision is indexed, embedded, and searchable.

What Gets Remembered

How Search Works

TENET uses hybrid search — combining lexical and semantic approaches for best results:

BM25+ (Always Available)

Term-frequency scoring with:
  • Stopword removal and phrase detection
  • Adaptive document length normalization
  • Query term weighting based on IDF
  • Positive IDF floor (BM25+ variant) — common terms still contribute

Semantic Search (When Embeddings Available)

Cosine similarity on text-embedding-3-small vectors:
  • 1536 dimensions
  • OpenAI or OpenRouter fallback
  • Auto-backfill: if key was missing when indexed, embeddings are added later

Reciprocal Rank Fusion

Merges BM25 and embedding results by rank position, not raw scores. More robust than linear interpolation because it doesn’t require score normalization.

Current Stats

349/349 memories embedded — zero gaps.

Graph Edges

Memories aren’t isolated. They connect to each other:

Code Header Indexing

Files with @purpose annotations are automatically indexed:
This creates a searchable memory entry:
  • Source: file
  • Type: code-header
  • Content: src/lib/memory-indexer.ts: Automatic indexing of journal entries and code headers
Scans: src/, packages/, scripts/, eval/ Updates if @purpose changes. Deduped by file path.

Knowledge Doc Lifecycle

Knowledge docs (VISION.md, THESIS.md, etc.) are audited for staleness:
When docs drift from journal evidence, tenet organize generates a PENDING.md with proposed updates and open questions for human review.

Search

BM25+ hybrid search internals and query optimization.

Graph Edges

Structured relationships between memories.

Embeddings

Auto-backfill, model selection, and fallback behavior.

Code Headers

Indexing @purpose annotations from source files.