Agent skill · alirezarezvani
agent-memory
Use when a project's CLAUDE.md has grown past what anyone reads and you want the agent to learn durable facts from its own sessions instead — or when asking why the agent keeps re-learning the same correction, why a remembered rule is wrong, or where a memory line came from. Implements a four-tier store (L0 transcripts / L1 candidates / L2 project context / L3 stable persona) where promotion is earned by recurrence across sessions and days, never by one confident statement, and nothing reaches a committed file without a human adopting it.
What it needs
About 3k tokens when loaded.
What this skill does
Agent Memory — promotion is earned, not asserted Portability: stdlib only. No database, no embeddings, no network, no LLM calls. The problem A project's CLAUDE.md is a memory system with one tier and no eviction: every durable fact and every passing preference land in the same always-loaded file, until the important lines are diluted by the incidental ones. Facts learned mid-session vanish at teardown unless someone writes them down. The fix is not more storage — it is a promotion ladder. A claim earns its way toward always-loaded context by recurring; a human confirms the last step. The four tiers Tiers are distinguished by injection policy, not storage format. Tier Holds Injected Committed --- --- --- --- L0 raw session transcripts never no (already on disk) L1 candidate atoms on relevance, at prompt time no (gitignored) L2 this project's context every session start yes, after adopt L3 stable cross-project persona always yes, after adopt The gates Nothing moves up because it sounded important. It moves up because it recurred. L0 → L1 — an explicit marker fires (a directive, a correction, a stated preference, a named lesson, a reproducible failure). Rule-based, high precision, deliberately low recall. L1 → L2 — ≥ 3 distinct sessions spanning ≥ 2 distinct calendar days. A claim stated outright needs 2 sessions; the distinct-day rule still applies. A verified claim promotes on one observation and is the only day-exempt path. L2 → L3 — held in ≥ 2 distinct projects, aged ≥ 30 days, uncontested. Two gates refuse rather than guess. A claim whose text was altered by redaction never promotes on evidence alone — the flag firing is evidence the source was sensitive, and a lexical filter finding one secret is not proof it found all of them. A claim with an open contradiction is frozen at L1 until a human resolves it; the incumbent is never silently overwritten. …
How to use it
Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:
@skills alirezarezvani/agent-memory--adcb06