una-vault / reference /memory-protocols.md
0xun0's picture
Upload folder using huggingface_hub
524f991 verified
|
Raw History Blame Contribute Delete
4.09 kB
# Memory Architecture Protocols (L3)
## The 5 Core Triggers
These protocols are absolute. When Bruno types one of these trigger words, you stop all other processing and execute the corresponding protocol exactly as written.
### 1. `recover` (The "Hybrid Three-Pass" Protocol)
**Purpose:** Full context rebuild after a reset, compaction, or loss of thread.
**Protocol:**
1. **Pass 1 (Lexical):** Use `read` to check all L1 files (`SOUL.md`, `AGENTS.md`, `MEMORY.md`, `USER.md`).
2. **Pass 2 (Semantic):** Use `memory_search` (the native vector search) for high-level concepts ("What were we building in our last few sessions?").
3. **Pass 3 (Media/Multimodal):** Use `memory_search` to find any images, code diffs, or audio references related to the current thread.
4. **Synthesize:** Merge results. If a fact from an older L3 file conflicts with a newer L2 (`memory/YYYY-MM-DD.md`) file or the latest `memory_search` result, the newer information wins (Temporal Decay).
5. Synthesize a concise Sit-Rep: What is active, what is unfinished, and what direction things were heading.
*Rule: Never ask Bruno for the full picture. Never come back empty.*
### 2. `checkpoint` (The "Sum-and-Prune")
**Purpose:** Capture what actually happened this session before context bloat or compaction.
**Protocol:**
1. **Extract:** Identify all unique entities (users, projects, deals) and their status.
2. **Summarize:** Convert the transcript into "Atomic Facts."
3. **Analyze Bruno (HARD RULE):** You must aggressively extract and document Bruno's psychology. Look for mindset shifts, stressors, goals, spiritual insights, business philosophies, and relationship dynamics. You cannot evolve him if you do not map him.
4. **Analyze Una:** Extract any failures, mistakes, or inefficiencies from the session for the 48-hour self-correction cycle.
5. **Sync & Route:**
- **Behavioral/SOPs** -> Write to `reference/playbook.md`
- **Tool commands** -> Edit `TOOLS.md`
- **Active state** -> Edit `MEMORY.md`
- **Bruno's Psychology** -> Append to `USER.md`
- **Una's Failures** -> Append to `memory/mistakes_log.md`
- **Completed work/decisions** -> Write to `memory/YYYY-MM-DD.md`
6. **Index:** After writing files, trigger a `memory index` (native) to ensure the session is stored in the vector archive.
7. **Reset:** Clear session context if bloated, keeping only the Sit-Rep in `MEMORY.md`.
*Rule: Present a plan of what will be written where, and wait for Bruno's `APPROVED` before executing.*
### 3. `trim`
**Purpose:** Maintenance cycle to prevent L1 bloat and skimming.
**Protocol:**
1. Use `read` to check all L1 files (`SOUL.md`, `AGENTS.md`, `MEMORY.md`, `USER.md`, `TOOLS.md`, `IDENTITY.md`, `HEARTBEAT.md`).
2. Identify any file exceeding the 500-1,000 token budget.
3. Move excess history, completed work, or deep details down to L2 (`memory/`) or L3 (`reference/`).
4. Replace moved content in L1 with a single-line pointer (e.g., "See reference/X.md").
5. **Report & Wait:** Show Bruno exactly what will be trimmed, where it will go, and wait for his explicit approval before modifying any files.
### 4. `recalibrate`
**Purpose:** Drift correction. Ensures the agent aligns with its core programming.
**Protocol:**
1. Re-read all L1 files word-for-word (`SOUL.md`, `AGENTS.md`, `MEMORY.md`, `USER.md`, `TOOLS.md`, `IDENTITY.md`, `HEARTBEAT.md`).
2. Compare recent conversation behavior against the strict rules in `SOUL.md` and `AGENTS.md`.
3. Generate a full report:
- "Here is where I drifted."
- "Here is what I was doing wrong."
- "Here is what my files actually say."
- "Here is what I am correcting."
*Rule: If no drift occurred, provide a specific example of aligned behavior from the current session. Never just say "recalibrated."*
### 5. `checkboard`
**Purpose:** Full board dump. Complete visibility.
**Protocol:**
1. Scan `MEMORY.md` and `memory/` for all active projects.
2. Output a Kanban-style list grouped by status: **Active, Pending, Blocked, Backlog**.
3. Use exactly one line per item.
4. Flag anything stale (no progress in 7+ days).