Get the FREE Ultimate OpenClaw Setup Guide →

session-memory

Scanned
npx machina-cli add skill a5c-ai/babysitter/session-memory --openclaw
Files (1)
SKILL.md
1.8 KB

Session Memory

Overview

Persistent memory system that survives Claude Code's message compaction. Uses three markdown files in .claude/cc10x/ as a permission-free database for continuity, consistency, and pattern compounding.

Memory Surfaces

  1. activeContext.md -- Current focus, decisions, learnings, next steps, blockers
  2. patterns.md -- Project conventions, architecture decisions, common gotchas, reusable solutions
  3. progress.md -- Task completion tracking with verification evidence

Iron Law

EVERY WORKFLOW MUST:

  1. LOAD memory at START (and before key decisions)
  2. UPDATE memory at END (and after learnings/decisions)

Stable Edit Anchors

Safe section headers for Edit operations:

  • activeContext: ## Recent Changes, ## Learnings, ## References
  • patterns: ## Common Gotchas, ## Project SKILL_HINTS
  • progress: ## Completed, ## Verification

Read-Edit-Verify Pattern

  1. Read file
  2. Verify anchor exists
  3. Edit with exact old_string
  4. Read back to confirm

Tool Rules

  • Use Write() for NEW files (permission-free)
  • Use Edit() for EXISTING files (permission-free)
  • Never use Write() to overwrite existing files
  • Never compound commands (mkdir && cat)

When to Use

  • At the start of every CC10X workflow (load)
  • At the end of every CC10X workflow (update)
  • Before making key decisions (check patterns)
  • After discovering learnings or gotchas (persist)

Agents Used

All CC10X agents use this skill. The cc10x-router manages load/update lifecycle.

Source

git clone https://github.com/a5c-ai/babysitter/blob/main/plugins/babysitter/skills/babysit/process/methodologies/cc10x/skills/session-memory/SKILL.mdView on GitHub

Overview

Session Memory provides a persistent memory layer across session resets by storing state in three markdown surfaces under .claude/cc10x/. It is designed to support continuity, consistency, and pattern accumulation so CC10X workflows can reference prior decisions and learnings.

How This Skill Works

The skill loads memory at the start of a workflow, reads and validates the three surfaces (activeContext.md, patterns.md, progress.md), and updates them at the end with decisions, learnings, and completion evidence. It relies on a Read-Edit-Verify pattern to ensure anchors exist and edits apply exactly, and uses Write() only for new files and Edit() for existing ones to avoid overwriting content.

When to Use It

  • At the start of every CC10X workflow (load memory)
  • At the end of every CC10X workflow (update memory)
  • Before making key decisions (check patterns and references)
  • After discovering learnings or gotchas (persist learnings)
  • During workflow design to plan memory surface usage and ensure anchors exist

Quick Start

  1. Step 1: Ensure activeContext.md, patterns.md, and progress.md exist under .claude/cc10x/
  2. Step 2: At workflow start, Read each surface and verify anchors exist
  3. Step 3: At workflow end, Edit the surfaces with new decisions, patterns, and progress; run Verify to confirm

Best Practices

  • Always load memory at the very start of a CC10X workflow
  • Verify that anchors exist in each surface before editing
  • Edit with the exact old_string to avoid unintended changes
  • Update memory at the end of the workflow with new learnings and decisions
  • Use Write() only for new files and Edit() for existing files

Example Use Cases

  • CC10X workflow starts by reading activeContext.md for current focus, decisions, and blockers
  • Patterns.md is updated to capture architecture decisions and common gotchas
  • Progress.md records completed tasks with verification evidence
  • Discovering a new blocker and persisting it to activeContext.md for visibility
  • After a run, re-reading all surfaces to verify that anchors and content reflect latest learnings

Frequently Asked Questions

Add this skill to your agents
Sponsor this space

Reach thousands of developers