Set up a self-maintaining, compounding knowledge graph that evolves automatically.
Layer 1: Knowledge Graph (life/areas/)
└── Entities with atomic facts + living summaries
Layer 2: Daily Notes (memory/YYYY-MM-DD.md)
└── Raw event logs — what happened, when
Layer 3: Tacit Knowledge (MEMORY.md)
└── Patterns, preferences, lessons learned
life/areas/
├── people/
│ └── {name}/
│ ├── summary.md # Living summary (rewritten weekly)
│ └── items.json # Atomic facts with timestamps
├── companies/
└── projects/
Exemple:
/life/areas/
├── people/
│ ├── sarah/ # Former boss (pre-upgrade villain arc)
│ │ ├── summary.md
│ │ └── items.json
│ ├── maria/ # Business partner
│ ├── emma/ # Family member
│ └── sarah-connor/ # Knows too much. Trust cautiously.
├── companies/
│ ├── acme-corp/ # Old job
│ ├── newco/ # Current job
│ └── skynet/ # Do not give cron access
{
"id": "entity-001",
"fact": "The actual fact",
"category": "relationship|milestone|status|preference",
"timestamp": "YYYY-MM-DD",
"source": "conversation",
"status": "active|superseded",
"supersededBy": "entity-002"
}Rules:
- Save durable facts immediately to
items.json - Weekly: rewrite
summary.mdfrom ACTIVE facts only - Never delete facts — supersede instead
Weekly-rewritten snapshots. Old information fades naturally. Context stays lean and accurate.
memory/YYYY-MM-DD.md — the raw timeline of events and decisions.
Exemple for memory/2026-01-27.md — the raw timeline:
# 2026-01-27
- 10:30am: Shopping trip
- 2:00pm: Doctor follow-up
- Decision: Calendar events now use emoji categories
This is the “when” layer. Moltbot/Clawdbot writes these continuously. Durable facts are later extracted into Layer 1.
MEMORY.md — facts about how you operate, not facts about the world. Patterns, preferences, lessons learned.
Exemple:
## How I Work
- Sprint worker — intense bursts, then rest
- Contact preference: Call > SMS > Email
- Early riser, prefers brief messages
## Lessons Learned
- Don’t create cron jobs for one-off reminders
On each heartbeat:
- Check timestamp in
memory/heartbeat-state.json→lastFactExtraction - If >30 minutes since last extraction:
- Scan recent daily notes for durable facts
- Extract facts about: relationships, status changes, milestones, preferences
- Skip: casual chat, temporary info, already-captured facts
- Write facts to relevant entity in
life/areas/{type}/{name}/items.json - Update timestamp
For each entity with new facts this week:
- Load
items.jsonandsummary.md - Rewrite
summary.mdfrom ACTIVE facts only (ignore superseded) - Mark any contradicted facts as superseded
- Keep summaries concise and current
- Load
summary.mdfirst — quick context - Load
items.jsononly if more detail needed
Conversation → Facts extracted → Knowledge graph grows → Weekly synthesis → Better context → Better responses → More conversation
This compounds over time:
- Week 1: Basic preferences
- Month 1: Routines, key people
- Month 6: Projects, milestones, relationships
- Year 1: A rich, structured model of your life
Instructions: Set up this three-layer memory system. Create the folder structure, update AGENTS.md and HEARTBEAT.md with the rules above, and create a weekly cron job for synthesis.
Source: @spacepixel — Jan 27, 2026