Mutable Memory State

Mutable Memory State

Four-tier memory architecture: curated semantic base, daily episodic streams, session handoffs, and procedural correction logs.


MEMORY πŸ’Ύ Semantic Base

Curated, durable long-term facts, environment constants, and verified rules distilled from logs.

Purpose

Single source of truth for facts that persist across sessions and survive context compression.

Structure

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
memory:
  user_preferences:
    - model: "nvidia/nemotron-3-ultra-550b-a55b:free"
    - fallback: "owl-alpha+openrouter/free"
    - dashboard: "svelte-flexiboards + Discord"
  environment_facts:
    - hugo_path: "~/hugo-llm-wiki/"
    - cron_env_isolation: true
    - duckduckgo_blocked: true
  verified_rules:
    - "Always source ~/.hermes/.env in cron jobs"
    - "Load skill before answering when relevant"
    - "Patch skills immediately when issues found"

Write Protocol

  1. Trigger β€” User correction, explicit “remember this”, discovered environment fact
  2. Validate β€” Cross-reference with existing memory; reject contradictions
  3. Condense β€” Single declarative fact, no instructions
  4. Persist β€” memory(action='add', target='memory', content=...)

Read Protocol


YYYY-MM-DD πŸ““ Episodic Stream

Daily chronological append-only scratchpads capturing volatile session context and tool traces.

Format

1
~/hugo-llm-wiki/content/evolving/YYYY-MM-DD.md

Content Types

TypePrefixExample
Session start## Session## Session 2026-06-07 14:32
Tool trace### Tool### Tool: terminal β†’ hugo build
Decision### Decision### Decision: Use Svelte 5 runes
Observation### Obs### Obs: Vite HMR caches stale files
Error### Error### Error: 429 rate limit on OpenRouter
Session end## Summary## Summary: Deployed v0.6.0

Retention

Automation

Daily cron (llm-wiki-evolve) appends Research β†’ Build β†’ Deploy trace.


SESSION_LOG πŸ“‹ Handoff Record

Summarized session records, commit pointers, and namespace metadata appended post-task.

Purpose

Enable seamless handoff between sessions, subagents, and human operator.

Format

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
## Session Log: <session_id>

**Goal**: <one-line objective>
**Duration**: <turns> turns, <minutes> min
**Outcome**: βœ… Complete / ⚠️ Partial / ❌ Failed

### Key Actions
- <action 1 with verifiable handle>
- <action 2 with verifiable handle>

### Artifacts Created
- File: `/path/to/file` (verified)
- PR: `#123` (merged)
- Deploy: `https://llm-wiki.0rk.de` (live)

### Memory Updates
- Added: <fact>
- Corrected: <fact>

### Blockers / Open Questions
- <blocker description>
- <question for next session>

Storage


FEEDBACK-LOG πŸ“‰ Procedural Corrections

Tracked mistakes, stylistic fixes, and lessons learned to prevent error looping.

Entry Schema

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
feedback_entry:
  id: "FB-YYYYMMDD-XXX"
  timestamp: "2026-06-07T14:32:00Z"
  category: "tool_usage | communication | logic | workflow | config"
  severity: "critical | high | medium | low"
  mistake: "What went wrong"
  correction: "What to do instead"
  trigger: "What caused the mistake"
  prevention: "Systemic fix (skill patch, memory add, checklist update)"
  verified: false  # Set true after next successful application

Categories

CategoryExamples
tool_usageWrong tool, missing flags, background without notify
communicationVerbose, wrong tone, missed clarification
logicFalse assumption, missed edge case, circular reasoning
workflowSkipped skill load, forgot memory write, no verification
configWrong model, missing env, bad cron schedule

Loop Prevention

  1. On error β€” Create FEEDBACK-LOG entry immediately
  2. On skill use β€” Check FEEDBACK-LOG for relevant entries first
  3. On session start β€” Review last 5 feedback entries
  4. Monthly β€” Audit unresolved entries; escalate patterns

Memory Flow Diagram

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚   SESSION   │────▢│ YYYY-MM-DD  │────▢│  SESSION_LOG │────▢│   MEMORY    β”‚
β”‚  (volatile) β”‚     β”‚ (episodic)  β”‚     β”‚  (handoff)   β”‚     β”‚  (semantic) β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜     β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜     β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜     β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
       β”‚                   β”‚                   β”‚                   β”‚
       β–Ό                   β–Ό                   β–Ό                   β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                        FEEDBACK-LOG                                 β”‚
β”‚              (cross-cutting correction layer)                       β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Cross-References


Mutable Memory is the only layer designed for continuous automatic evolution. The system rewrites itself daily.