# The More You Teach Your AI, the Worse It Remembers

Every session adds another line to your AI's memory file. Nothing ever leaves — so the notes
that mattered six weeks ago sit buried under this morning's session log, and recall gets worse
exactly when the file has the most in it. The fix isn't "write a shorter memory file." It's a
weekly diet: a script that trims what's safe to trim, protects what actually matters, and
archives the rest instead of deleting it. This page hands you The Memory Diet — the exact
cron script, the install guide, and a worked before/after.


## Why a memory file that only grows eventually stops working

A memory file is supposed to make your AI's recall better over time. But without a diet, it does
the opposite: every bullet you add makes the next read-through longer, so the two or three rules
that actually govern how it should behave get harder to find in the noise. You don't notice the
damage bullet by bullet — you notice it the day your AI forgets something you told it three weeks
ago, because that line is now buried under ninety session-log entries. The fix isn't discipline
("write less"). It's a deterministic weekly pass that does the trimming for you.

The full step-by-step (about 3 minutes)

1. Drop the script somewhere permanent. DIET-SCRIPT.sh and its engine
(memory-diet-engine.js) live together in one folder — anywhere on your machine works.

2. Point it at your memory file. Set MEMORY_DIR (and optionally MEMORY_FILE/
ARCHIVE_FILE) as environment variables. Defaults assume $HOME/memory/Memory.md.

3. Run it dry first. ./DIET-SCRIPT.sh writes nothing — it just prints the before/after
byte counts so you can see what it *would* do.

4. Apply it. ./DIET-SCRIPT.sh --apply rewrites the memory file in place and appends every
trimmed bullet's full text to an archive file — nothing is ever deleted, it just moves out of
the file you re-read every session.

5. Put it on a cron. One line in crontab -e (weekly, off-hours) turns this from a one-time
cleanup into a system that keeps your AI's recall sharp forever, automatically.

The rules, distilled

- Protected, always: headers, prose, and any bullet inside a named standing-rules section,
or containing a strong marker phrase like "case law" or "standing order." These never get
touched, no matter how old or long.
- Trimmed: any non-protected bullet over 400 bytes gets folded into a one-line pointer; the
full text moves to the archive.
- Archived: any non-protected bullet that's small but dated before your cutoff also moves to
the archive, collapsed into one summary line if several land at once.

Real result, measured on a live file: 115,491 bytes down to 42,913 — 63% gone, with the standing
rules exactly where they were left. See EXAMPLE.md in the kit for the full worked before/after.

What's in the kit

- DIET-SCRIPT.sh + memory-diet-engine.js — the exact weekly compaction logic, sanitized to
generic $HOME paths so it drops into any setup
- INSTALL.md — cron and launchd setup, a stranger can follow it start to finish
- RULES.md — what gets trimmed vs. protected, in plain English
- EXAMPLE.md — a bloated memory snippet, before and after one diet run

Comment DIET on today's video and the kit lands in your DMs — or grab it right here with the
button above. The comment word rotates out at 4pm today when tomorrow's drop lands.

Includes a free download

Enter your email to read the full how-to

Confirm via the email link to unlock the full how-to and the free download inside. Free forever.

No spam. Unsubscribe anytime.