| 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 |
|
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.
- 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).
| 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 | 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.
The 7 above plus relationship, instruction, goal, commitment, context, event, observation, artifact, error - reserved for human curation.
| 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 is not an error - it is an opportunity to refine.
- Detect contradiction between active entries of the same type/topic.
- Resolve by recency + confidence: newest and most confident wins.
- The loser is archived with a conflict note (
superseded_by), never deleted. - 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.
- Every entry has a type.
- Archiving is not deleting - history preserves provenance.
- One entry = one concept.
- Fact is not opinion - "X is a good leader" is an
observation, not asemantic. - Drafts enter with confidence < 0.5 so they don't inflate the signal.
- Hot cache (the harness memory) is not cold storage (the vault). Neither substitutes for the other.
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]
- Typeless entries. "Every entry has a type" is rule 1 for a reason - untyped memory is noise.
- No provenance. An entry without a source is a rumor. Always record
source. - Overwriting instead of superseding. Archive the old entry with a
superseded_bylink. History is evidence. - Confidence inflation. Drafts and guesses at 0.9 pollute retrieval. Start low, let reinforcement raise it.
- Deleting on expiry. TTL flags, it does not delete. The compiler prunes.
- The compiler only reads the first 2000 chars of a note - long notes are classified by their beginning. Keep note openings informative.
- 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