🎁 Get the FREE AI Skills Starter Guide β€” Subscribe β†’
BytesAgainBytesAgain
πŸ¦€ ClawHub

Dory-Proof Memory System

by @justinhartbiz

File-based memory system for AI agents that forget between sessions. Implements the "Dory-Proof" pattern for continuity across context resets. Use when setting up agent memory, building workspace structure, implementing task tracking, or preventing context-loss errors. Triggers on "memory system", "remember between sessions", "Dory pattern", "agent continuity", or "workspace setup".

Versionv1.0.0
Downloads2,968
Stars⭐ 4
TERMINAL
clawhub install dory-memory

πŸ“– About This Skill


name: dory-memory description: File-based memory system for AI agents that forget between sessions. Implements the "Dory-Proof" pattern for continuity across context resets. Use when setting up agent memory, building workspace structure, implementing task tracking, or preventing context-loss errors. Triggers on "memory system", "remember between sessions", "Dory pattern", "agent continuity", or "workspace setup".

Dory-Proof Memory System

AI agents forget everything between sessions. This skill implements a file-based memory system that survives context resets.

Core Principle

Text > Brain. Write everything down. Files are memory. The agent only "remembers" what's on disk.

The Dory-Proof Pattern (Critical)

When the user gives a task: 1. IMMEDIATELY write their EXACT WORDS to state/ACTIVE.md 2. Then interpret what it means 3. Then do the work 4. Mark complete when done

Why: Paraphrasing introduces drift. Exact words preserve intent across context flushes.

Workspace Structure

workspace/
β”œβ”€β”€ AGENTS.md        # Operating rules (system file, don't rename)
β”œβ”€β”€ SOUL.md          # Identity + personality
β”œβ”€β”€ USER.md          # About the human
β”œβ”€β”€ MEMORY.md        # Curated long-term memory (<10KB)
β”œβ”€β”€ LESSONS.md       # "Never again" safety rules
β”œβ”€β”€ TOOLS.md         # Tool-specific notes
β”‚
β”œβ”€β”€ state/           # Active state (check every session)
β”‚   β”œβ”€β”€ ACTIVE.md    # Current task (exact user words)
β”‚   β”œβ”€β”€ HOLD.md      # Blocked items (check before acting!)
β”‚   β”œβ”€β”€ STAGING.md   # Drafts awaiting approval
β”‚   └── DECISIONS.md # Recent choices with timestamps
β”‚
β”œβ”€β”€ memory/          # Historical
β”‚   β”œβ”€β”€ YYYY-MM-DD.md
β”‚   β”œβ”€β”€ recent-work.md
β”‚   └── archive/
β”‚
└── ops/             # Operational
    └── WORKSPACE-INDEX.md

Boot Sequence (Every Session)

1. Read state/HOLD.md β€” what's BLOCKED 2. Read state/ACTIVE.md β€” current task 3. Read state/DECISIONS.md β€” recent choices 4. Read memory/recent-work.md β€” last 48 hours 5. Read MEMORY.md β€” long-term (main session only)

Output status line after boot:

πŸ“‹ Boot: ACTIVE=[task] | HOLD=[n] items | STAGING=[n] drafts

State File Formats

state/ACTIVE.md

## Current Instruction
User said: "[exact quote]"
Interpretation: [what you think it means]
Status:
  • [ ] Step 1
  • [ ] Step 2
  • state/HOLD.md

    [YYYY-MM-DD HH:MM | session] Item β€” reason blocked
    
    ALL agents must check before acting on anything that looks ready.

    state/DECISIONS.md

    [YYYY-MM-DD HH:MM | session] Decision made
    

    Conflict Resolution

    When files conflict, priority (highest first): 1. state/HOLD.md β€” blocks override all 2. state/ACTIVE.md β€” current instruction 3. state/DECISIONS.md β€” recent choices 4. AGENTS.md β€” general rules

    Memory Scoring (Before Saving to MEMORY.md)

    Score on 4 axes (0–3 each):

    | Axis | 0 | 1 | 2 | 3 | |------|---|---|---|---| | Longevity | Gone tomorrow | Weeks | Months | Years+ | | Reuse | One-off | Occasional | Frequent | Every session | | Impact | Trivial | Nice to know | Changes outputs | Changes decisions | | Uniqueness | Obvious | Slightly helpful | Hard to rederive | Impossible without |

    Save if: Total β‰₯ 8, OR any axis = 3 AND total β‰₯ 6.

    Quick Setup

    Copy template files from assets/templates/ to your workspace:

    cp -r skills/dory-memory/assets/templates/* ~/.openclaw/workspace/
    

    Then customize SOUL.md and USER.md for your agent.

    References

  • references/IMPLEMENTATION-GUIDE.md β€” Full setup walkthrough
  • references/ANTI-PATTERNS.md β€” Common mistakes to avoid