Skip to content

mcs-cli/memory

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

73 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Memory

A tech pack that gives Claude Code persistent memory across sessions (formerly "Continuous Learning"). Claude Code forgets everything the moment a session ends — this pack captures debugging discoveries, architectural decisions, and project conventions into a searchable knowledge base, so Claude gets increasingly effective at your codebase instead of starting from zero every time.

identifier: memory
requires:   mcs >= 2026.4.12

Install

brew install mcs-cli/tap/mcs      # 1. install mcs
mcs pack add mcs-cli/memory       # 2. register this pack
mcs sync --global                 # 3. install globally (~/.claude)
mcs doctor                        # 4. verify everything is healthy

Prerequisites: macOS, Claude Code, and Ollama (local embeddings runtime). mcs installs the rest (Node, gh, jq) automatically.

Global is the recommended scope — this pack has no per-project config, so installing once makes memory available in every project automatically. To scope it to a single repo instead, run mcs sync from inside that repo.


How it works

flowchart LR
    A[Session start] --> B[Search the KB]
    B --> C[Work session]
    C --> D[Capture learnings & decisions]
    D --> E[(.claude/memories/)]
    E --> F["Ollama embeddings<br/>semantic index"]
    F -. re-index on session start / change .-> B
Loading
  1. Session starts — a hook re-indexes .claude/memories/ into a local vector store (Ollama nomic-embed-text), in the background.
  2. Before any task — Claude is instructed to search the knowledge base first, surfacing relevant past learnings and decisions.
  3. During work — a prompt-submit hook reminds Claude to notice when the current interaction produces knowledge worth saving.
  4. After valuable work — the continuous-learning skill extracts structured memories, checks for duplicates, and writes them to .claude/memories/.
  5. Next session — the new memories are indexed and surfaced again. The loop compounds: debugging patterns aren't rediscovered, decisions aren't re-litigated, conventions aren't re-explained.

What's included

Component What it does
docs-mcp-server (MCP) Read-only semantic search over .claude/memories/, backed by local Ollama embeddings
continuous-learning (skill) Extracts learnings and decisions from a session into structured memory files
memory-audit (skill) Reviews existing memories and flags stale or duplicate entries to keep the KB lean
sync-memories.sh (hook) Indexes/re-indexes memories on session start and when they change mid-session
continuous-learning-activator.sh (hook) Reminds Claude to check for extractable knowledge after each prompt
autoMemoryEnabled: false (setting) Disables Claude Code's built-in memory in favor of this system

Memories come in two flavors, both stored as version-controlled, human-readable markdown:

  • Learnings — non-obvious discoveries from debugging, e.g. learning_orm_batch_insert_memory_spike.md. Template: Problem → Trigger Conditions → Solution → Verification → Example → Notes.
  • Decisions — deliberate architecture/convention choices, e.g. decision_testing_snapshot_strategy.md. ADR-inspired template: Decision → Context → Options Considered → Choice → Consequences.

Directory structure

memory/
├── techpack.yaml                        # Manifest — defines all components
├── config/settings.json                 # Disables built-in auto-memory
├── hooks/
│   ├── sync-memories.sh                 # Ollama health + memory indexing/reindexing
│   └── continuous-learning-activator.sh # Knowledge extraction reminder
├── skills/
│   ├── continuous-learning/             # Extraction rules + memory templates
│   └── memory-audit/                    # Audit workflow (KEEP/DROP/UPDATE)
└── templates/
    └── continuous-learning.md           # "Search KB before any task"

Companion pack

shared-memories extends this pack by auto-syncing .claude/memories/ across teammates via a dedicated git repo. Install both together for team-shared memory — mcs-cli/memory captures and retrieves, shared-memories distributes.


You might also like

Pack Description
dev Foundational settings, plugins, and git workflows
ios Xcode integration, simulator management, and Apple documentation

Links


License

MIT

About

Continuous Learning tech pack for MCS

Resources

Stars

29 stars

Watchers

0 watching

Forks

Releases

No releases published

Contributors

Languages