🧠 Memory System Skill

SkillFiles & storage

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.

Available today. Use it from your connected AI after setup.

Connect ahel once, and every AI you use reads what you have installed.

Then ask your AI: use the 🧠 Memory System Skill skill

What this skill tells your AI

The instructions your AI receives, as published by wasintoh/toh-framework in src/skills/memory-system/SKILL.md and read by ahel’s review.

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)

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

summary.md (Tier 1)

# πŸ“‹ 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)

# πŸ“ 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)

# πŸ€– 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

Signals

GitHub stars
96
Forks
19
Last commit
Sep 2026
Advanced
Catalog kind
skill
Gateway key
memory-system-wasintoh
Source
github.com/wasintoh/toh-framework