Skip to content

Latest commit

 

History

History
133 lines (104 loc) · 5.08 KB

File metadata and controls

133 lines (104 loc) · 5.08 KB
name memory
description Use when storing, retrieving, or reasoning about typed memory - facts, preferences, decisions, observations - with schema, confidence, TTL, decay, and conflict resolution. Governs what is stored, how it ages, and how conflicts resolve.
version 1.0.0
license MIT
metadata
hermes
tags related_skills
second-brain
memory
typed-memory
knowledge-management
capture
consolidate
reflect

Memory

Memory is not a flat dump in context. Every fact, preference, decision or observation has a type, confidence, provenance and lifecycle. This skill governs what is stored, how it ages, and how conflicts resolve.

When to Use

  • Storing a fact, preference, correction, or decision
  • Reviewing what the brain knows about a topic or person
  • Resolving contradictory memories
  • Running the nightly consolidation of the memory store
  • Answering "what do we know about X?" from the vault

Don't use for: full-text retrieval (see retrieval), or capturing notes (see capture).

Two parallel tracks

Aspect Compiler store (auto-generated) Curated entries (human-edited)
Origin Auto-generated from vault notes by the compiler Manual / migrated from legacy systems
Schema 7 JSON types 13 types, Markdown + YAML frontmatter
Durability Ephemeral (regenerated nightly) Permanent (git-versioned)
Conflicts Dedup by hash (higher confidence wins) supersedes / superseded_by chain
Use Fast recovery, bulk context Authoritative, traceable facts

The compiler does NOT read curated entries. For facts confirmed by the human, prefer curated entries.

Type schema

Compiler types (7, with TTL and default confidence)

Type TTL Confidence Heuristic
raw 7d 0.3 Lives in 00-Inbox/
working 30d 0.5 Default
semantic 365d 0.8 >500 chars, formal content
episodic 180d 0.7 Date + meeting/call context
procedural 365d 0.8 "How to", workflow, playbook
preference 365d 0.6 "I like", "I prefer", style
decision 730d 0.7 "I decided", "approved", "signed"

Fields: id, type, title, content(<=2000), source, confidence, created/updated, valid_until, ttl_days, tags, links, superseded_by, hash.

Curated types (13)

The 7 above plus relationship, instruction, goal, commitment, context, event, observation, artifact, error - reserved for human curation.

Decay

Type Rule
preference -0.1 @ 30d, -0.2 @ 90d
decision -0.05 @ 180d
context -0.1 @ 14d
observation -0.15 @ 7d, -0.3 @ 30d
learning +0.05 per validation (reinforcement)

Decay is healthy: preferences change, observations age. TTL (valid_until) marks expiry but does not remove - the compiler keeps the store clean.

Conflict resolution

Conflict is not an error - it is an opportunity to refine.

  1. Detect contradiction between active entries of the same type/topic.
  2. Resolve by recency + confidence: newest and most confident wins.
  3. The loser is archived with a conflict note (superseded_by), never deleted.
  4. Unresolved conflict becomes silent contradiction - apply the policy automatically.

Example: "I prefer in-person meetings" (conf 0.8, 90d old) vs "remote meetings are more productive" (conf 0.85, today) -> the newer entry wins, the old one is archived with a supersedes note.

Golden rules

  1. Every entry has a type.
  2. Archiving is not deleting - history preserves provenance.
  3. One entry = one concept.
  4. Fact is not opinion - "X is a good leader" is an observation, not a semantic.
  5. Drafts enter with confidence < 0.5 so they don't inflate the signal.
  6. Hot cache (the harness memory) is not cold storage (the vault). Neither substitutes for the other.

Workflow

1. Detect the trigger (correction, decision, preference, pattern)
2. Assign type + confidence (see schema)
3. Store: curated entry (Markdown) and/or let the compiler pick it up
4. On conflict: apply recency + confidence policy, archive the loser
5. Run compiler (nightly or manually): python3 bin/memory-compiler.py [--quick]

Common Pitfalls

  1. Typeless entries. "Every entry has a type" is rule 1 for a reason - untyped memory is noise.
  2. No provenance. An entry without a source is a rumor. Always record source.
  3. Overwriting instead of superseding. Archive the old entry with a superseded_by link. History is evidence.
  4. Confidence inflation. Drafts and guesses at 0.9 pollute retrieval. Start low, let reinforcement raise it.
  5. Deleting on expiry. TTL flags, it does not delete. The compiler prunes.
  6. The compiler only reads the first 2000 chars of a note - long notes are classified by their beginning. Keep note openings informative.

Verification Checklist

  • Every entry has a type, source, and confidence
  • Conflicts resolved by recency + confidence, loser archived
  • Decay applied where applicable (TTL respected, nothing deleted)
  • Compiler run succeeded (nightly or manual)
  • No silent contradictions left unresolved