Memory System logo

Memory System

Community
wasintoh
memory-system

Tiered, low-token project memory protocol for .toh/memory/ — 7 files across 3 tiers (Tier 1 active.md + summary.md always read, ~800 tokens; Tier 2 architecture/components for build work and changelog for debug work; Tier 3 decisions/agents-log only on demand). Auto-saves after task completion with zero user effort; delegated agents receive context from the orchestrator instead of re-reading. Use at every session start and whenever loading or saving project memory or resuming context across sessions and IDEs.

Overview

Publisherwasintoh
Repositorytoh-framework
Skill namememory-system
Stars
96
Forks
19
Bundled files
4
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 4 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by wasintoh on GitHub. Read the source before you install it.

Installation

Install the Memory System AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/wasintoh/toh-framework.git /tmp/toh-framework
mkdir -p .claude/skills
cp -r /tmp/toh-framework/src/skills/memory-system .claude/skills/memory-system
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Memory System in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Memory System on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Memory System is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

🧠 Memory System Skill

Purpose: Tiered, low-token memory — load only what the task needs, save what matters Version: 2.0.0 For: Toh Framework v2.0.0+ Updated: 2026-07-14


Overview

Automatic memory that keeps AI in context across sessions with zero user effort. v2 replaces the old "read all files every time" mandate with tiered loading: Tier 1 is always read (~800 tokens), Tier 2 is read only for the relevant task type, Tier 3 only when explicitly referenced.

Key principles

  • Zero config — no setup required
  • Tiered — Tier 1 always; Tier 2/3 on demand (no more ~3,000 tokens every time)
  • Auto save — saves after task completion, never asks the user
  • Delegated agents don't re-read — they receive context from the orchestrator
  • IDE & model agnostic

📚 The Tiered Model (use this everywhere)

There are 7 memory files across 3 tiers. Read by tier, not all at once.

TierFilesWhen to readBudget
Tier 1active.md + summary.mdALWAYS, at every session start~800 tokens
Tier 2architecture.md + components.mdBuild / code work (creating pages, components, logic)~600 tokens
Tier 2changelog.mdDebug work (to see previous attempts)~400 tokens
Tier 3decisions.md + agents-log.mdOnly when explicitly referenced / asked abouton demand

This replaces the old "read ALL files (MANDATORY)" rule. Never bulk-read all 7. Read Tier 1 always, add the Tier 2 files that match the task type, and touch Tier 3 only when needed.

Delegated agents: an agent invoked by the orchestrator receives context from the orchestrator and does NOT re-read memory itself. This avoids every agent re-reading the same files.


📁 Directory Structure

.toh/
├── config.json              # Toh configuration
└── memory/
    ├── active.md            # 🔥 Tier 1 — current task (~300 tokens)
    ├── summary.md           # 📋 Tier 1 — project shape (~500 tokens)
    ├── architecture.md      # 🏗️ Tier 2 — structure (build/code work)
    ├── components.md        # 📦 Tier 2 — component registry (build/code work)
    ├── changelog.md         # 📝 Tier 2 — change/attempt log (debug work)
    ├── decisions.md         # 🧠 Tier 3 — key decisions (when referenced)
    ├── agents-log.md        # 🤖 Tier 3 — agent activity (when referenced)
    └── archive/             # 📦 Historical — load only when asked

agents-log.md stays a separate file — it is NOT merged into changelog.md.


🔄 Read Protocol (session start)

STEP 1 — Ensure memory exists
        .toh/memory/ exists? → continue · missing? → create from templates

STEP 2 — Read Tier 1 (ALWAYS, in parallel)
        ├── active.md    → what we're working on
        └── summary.md   → what this project is
        Budget: ~800 tokens.

STEP 3 — Add Tier 2 by task type
        ├── Build / code (create page, component, logic)
        │     → also read architecture.md + components.md
        └── Debug (fix a bug)
              → also read changelog.md (see prior attempts)

STEP 4 — Tier 3 only if referenced
        User asks "why did we decide X?"  → read decisions.md
        User asks about past agent runs    → read agents-log.md

STEP 5 — Acknowledge briefly
        "Memory loaded 📚 — working on [X]. Just completed [Y]. Ready to continue."

Do not read archive/ during normal work — only when the user asks about past work or runs a history command.


💾 Save Protocol (after completing work)

STEP 1 — active.md            → ALWAYS update (current focus, in-progress, next steps)
STEP 2 — summary.md           → update when the PROJECT SHAPE changes
                                 (feature completed, tech/stack change, new major area)
STEP 3 — architecture.md      → update if structure changed (new route/module/service, data flow)
STEP 4 — components.md         → update if components/hooks/stores/utils changed
STEP 5 — changelog.md         → append what changed / what was attempted (esp. debug work)
STEP 6 — decisions.md         → add row only if a real decision was made
STEP 7 — agents-log.md        → append if agents were delegated
STEP 8 — Confirm: "✅ Memory saved"

Write rules: always update active.md; update summary.md when the project shape changes; update the rest only when relevant to what actually happened. Keep entries concise (1-2 lines). If active.md grows past ~50 lines, roll older content into archive/YYYY-MM-DD.md.


🗂️ File Reference

FileTierHoldsUpdate when
active.md1Current focus, in-progress, next stepsAlways
summary.md1Project name, stack, completed featuresProject shape changes
architecture.md2Entry points, modules, data flow, servicesStructure changes
components.md2Pages, components, hooks, stores, utils registryComponents change
changelog.md2Chronological change & debug-attempt logEvery notable change
decisions.md3Date · Decision · Reason tableA real decision is made
agents-log.md3Which agent did what, whenAgents are delegated

📝 Templates

active.md (Tier 1)

markdown
# 🔥 Active Task
## Current Focus
[Awaiting user instructions]
## In Progress
- (none)
## Next Steps
- (awaiting)
---
*Last updated: YYYY-MM-DD*

summary.md (Tier 1)

markdown
# 📋 Project Summary
## Overview
- Name: [Project]
- Stack: Next.js 16, Tailwind, shadcn/ui, Zustand, Supabase
## Completed Features
- (none yet)
---
*Last updated: YYYY-MM-DD*

changelog.md (Tier 2 — debug)

markdown
# 📝 Changelog
| Date | Change / Attempt | Result |
|------|------------------|--------|
| YYYY-MM-DD | [what changed or was tried] | [worked / failed because …] |
---
*Last updated: YYYY-MM-DD*

agents-log.md (Tier 3)

markdown
# 🤖 Agents Log
| Date | Agent | Task | Outcome |
|------|-------|------|---------|
| YYYY-MM-DD | [agent] | [task] | [result] |
---
*Last updated: YYYY-MM-DD*

architecture.md, components.md, and decisions.md keep their existing table structures (entry points/modules, component registry, decision log).


⚠️ Anti-Patterns

❌ Don't✅ Do
Bulk-read all 7 files every timeRead Tier 1 always; Tier 2/3 by need
Make delegated agents re-read memoryPass context from the orchestrator
Read archive/ during normal workOnly when the user asks about the past
Forget to saveAlways update active.md after a task
Ask the user whether to saveSave automatically
Merge agents-log into changelogKeep the 7 files distinct

🔗 Integration

Every command applies this protocol: read Tier 1 at start, add Tier 2 for the task type, save active.md (+ relevant files) at the end. Delegated agents receive context and skip the re-read.


Memory System v2.0.0 — tiered loading, ~800-token Tier 1, 7 files across 3 tiers

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Memory System AI skill do?

Tiered, low-token project memory protocol for .toh/memory/ — 7 files across 3 tiers (Tier 1 active.md + summary.md always read, ~800 tokens; Tier 2 architecture/components for build work and changelog for debug work; Tier 3 decisions/agents-log only on demand). Auto-saves after task completion with zero user effort; delegated agents receive context from the orchestrator instead of re-reading. Use at every session start and whenever loading or saving project memory or resuming context across sessions and IDEs.

Why use Memory System on TypingMind?

Because you install it once and use it with any model. Memory System is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Memory System in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/wasintoh/toh-framework/tree/main/src/skills/memory-system. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Memory System?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Memory System?

As many as you like. As long as a model supports skills, you can use Memory System with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Memory System AI skill free?

Yes. It is published on GitHub by wasintoh under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇