Dicklesworthstone/cass_memory_system

Procedural memory for AI coding agents: transforms scattered session history into persistent, cross-agent memory so every agent learns from every other

What it solves

AI coding agents (like Claude Code, Cursor, or Aider) typically lose all context once a session ends, and knowledge gained in one tool is not shared with others. cass-memory prevents this "knowledge collapse" by creating a persistent, cross-agent memory system that transforms raw session logs into a shared library of actionable rules and historical context.

How it works

The system uses a three-layer cognitive architecture to process information:

  1. Episodic Memory: Stores raw session logs from various agents as the ground truth.
  2. Working Memory: Organizes these logs into structured session summaries (Diary entries).
  3. Procedural Memory: Distills summaries into a "Playbook" of rules with confidence tracking.

Agents can query this system before starting a task using a CLI command to receive relevant rules, anti-patterns (warnings based on past failures), and historical snippets. The system also features a confidence decay mechanism where rules lose validity over time unless re-validated, and an "anti-pattern" system that automatically converts harmful rules into warnings.

Who it’s for

  • AI Agents: To gain historical context and proven strategies before starting a task.
  • Developers: To build institutional memory that persists across different AI tools and sessions.
  • Teams: To share patterns and discoveries across multiple team members' AI assistants.

Highlights

  • Cross-Agent Learning: Unifies knowledge from multiple tools (e.g., Claude Code, Cursor, Aider) into one playbook.
  • Confidence Decay: Prevents stale rules from polluting the memory via a 90-day half-life and penalties for harmful marks.
  • Anti-Pattern Learning: Automatically inverts failed rules into warnings to prevent future mistakes.
  • Scientific Validation: Validates proposed rules against historical session data before accepting them.
  • Agent-Native Onboarding: Allows the AI agent itself to analyze historical logs and extract rules without requiring external LLM API costs.