{"slug": "i-dropped-a-slime-mold-into-my-local-folders-to-stop-paying-the-ai-amnesia-tax", "title": "I Dropped a Slime Mold Into My Local Folders to Stop Paying the AI \"Amnesia Tax\"", "summary": "A developer released SOP.md (v0.3.1), an open plain-text spec and zero-dependency Python CLI that gives AI coding agents procedural memory across local folders, pairing with SKILL.md to govern cross-file, resumable workflows. In sandbox runs across 27 operational documents (257.8 kB), the workspace's Layer 1 routing cut blind-test context reads by 81.5% (309.1 kB to 57.3 kB) and halved latency (118s to 58s) while holding 20/20 rule recall parity. The spec uses a sop-workspace.yaml with logical @mounts so physical folders stay in place and agents read only the 2–3 relevant nodes.", "body_md": "If you have been living inside Claude Code, Codex, Gemini CLI, or Antigravity lately, you have probably felt the quota squeeze. Limits drop, prices creep up, and every long session costs real money.\n\nA few months ago I finally pulled my raw execution transcripts to see where all those tokens were actually going. Half of my bill had nothing to do with writing code. I was paying an **amnesia tax**.\n\nEvery time I opened a fresh chat window, my agent would rummage through forty local folders just to figure out where things lived—and then cheerfully suggest publishing to a platform where my account had been locked last Tuesday. I would hit stop, sigh, and type out the same backstory all over again.\n\nI just finished making a 14-minute math-animated explainer video about how I fixed this with a plain-text open spec called **[SOP.md (v0.3.1)](https://github.com/hooosberg/SOP.md)**. Rather than writing another formal architecture paper, I want to share the messy engineering story behind it: what broke first, why a brainless slime mold saved my token budget, and the copy-paste setup you can try in two minutes.\n\n`SKILL.md` Alone Hits a Wall\nI love `SKILL.md`. Skills teach an AI how to do one specific job well: compress a video, query an API, drive a browser. Think of them as precision wrenches sitting in a toolbox.\n\nReal work rarely finishes after turning one bolt. Shipping an App Store build, reconciling monthly invoices, or syndicating a launch across a dozen channels spans multiple folders, multiple tools, and multiple days. You stop halfway on Tuesday and pick up in a cold session on Thursday.\n\nHolding ten great wrenches still leaves an agent guessing:\n\n`SOP.md` sits right alongside `SKILL.md` as its stateful partner. Skills govern single capabilities; `SOP.md` governs cross-file workflows, resumable state (`run.yaml`), and empirical routing across time. No SaaS lock-in, no database, and no background daemon—just plain Markdown, YAML, and a zero-dependency Python 3 stdlib CLI.\n\nPeople often compare local file graphs to Obsidian. Obsidian is fantastic for human reading, where your eyes instantly skip a three-year-old scratch folder.\n\nAn AI agent has no such instinct. Hand it an unindexed directory and it happily inhales 300 kB of stale notes into the context window or follows an outdated draft from six months ago.\n\nSo the first rule of `SOP.md` is blunt: **your physical folders stay exactly where they are**. You drop a tiny `sop-workspace.yaml` at the root and wire existing directories using logical `@mounts`:\n\n```\nworkspace_version: \"0.3\"\nname: \"my-ops-hub\"\nenv:\n  hash_algorithm: \"sha256\"\nmounts:\n  release: \"../release-governance\"\n  finance: \"../financial-reconciliation\"\nregistry:\n  shared/privacy-sanitize: \"shared/privacy-sanitize.sop.md\"\nmasters:\n  - \"masters/software-release.sop.md\"\ntrails_file: \"trails.log\"\n```\n\nWhen I ask for a release check, the agent activates only the 2–3 relevant nodes. That 300 kB archive folder stays completely dark—zero bytes read. In controlled sandbox runs across 27 real operational docs (`257.8 kB`), Layer 1 cut total blind-test context reads by **81.5%** (` 309.1 kB` down to `57.3 kB`) and cut latency in half (` 118s` to `58s`) while keeping `20/20` rule recall parity. On my real Mac with fifteen active projects, noise filtering routinely clears 90%.\n\nIn 1980, cognitive scientists Cohen and Squire drew the classic line in *Science* between **declarative memory** (knowing facts) and **procedural memory** (knowing how to execute a multi-step process). Built-in chat memory remembers that you prefer TypeScript inside one vendor's app. `SOP.md` puts procedural memory directly onto your local filesystem so any agent you run can read it.\n\nThe tricky part was dynamic routing. Endpoints go down, hit rate limits, get locked, or quietly recover months later.\n\nMy first attempt was obvious and terrible: I told agents to edit floating-point weights inside each station's `.sop.md` YAML frontmatter after every run.\n\nIt fell apart almost immediately because **LLMs are lazy editors**. Asking an agent to open seven files, recalculate floating-point decay by hand, and keep everything synchronized burns a pile of output tokens—and one skipped edit silently corrupts the whole workspace.\n\nThat failure pushed me to borrow two ideas straight from biology:\n\nI distilled both mechanisms into an append-only plain-text file called `trails.log`. Static `.sop.md` files are **never edited** during routine runs. When a task finishes, the agent atomically appends one line:\n\n```\n2026-12-05 | + | dev-to        | Canonical URL and preview verified\n2026-12-05 | - | mirror-b      | Upload retry friction\n2026-12-05 | x | legacy-forum  | Account read-only lock, never auto-route\n2026-12-05 | ~ | awesome-lists | Cooldown until:2026-12-19 req:age>=14d\n2026-12-05 | ! | gateway-c     | Transient 502 blip (0 penalty)\n```\n\nNothing runs in the background. Only at the exact millisecond an agent reads `trails.log`, `sop_cli.py smell` computes live freshness using a simple read-time exponential half-life formula:\n\n```\nW(u, t) = sum( s_i * 2^(-(t - t_i) / H_i) )\n```\n\n`+` adds `+1.0` (30-day half-life). Left untouched past 120 days (`|W| < 0.15`), a single path automatically decays into `-` applies `-0.6` mild friction (45-day half-life) and recovers naturally over time.`x` is the ant `-2.5`). It takes highest precedence and blocks auto-routing outright. After 150 days it stays blocked and surfaces a gentle `OLD x` prompt asking a human whether to re-check.`~` pauses a target until a calendar date (`until:YYYY-MM-DD`) without erasing positive history, then checks any `req:` precondition gate.`!` records a transient 502 or timeout for audit traceability with `0.0` weight penalty so one network hiccup never kills a healthy endpoint.\nTo test whether this actually saved tokens, I built an isolated sandbox with six completely amnesiac agents simulating **Day 1 -> Day 12 -> Day 185** on the exact same model and tasks. Arm A updated static YAML weights; Arm B used the static skeleton plus append-only `trails.log`.\n\nPulling numbers directly from the raw transcripts:\n\n| Cumulative 3-Era Metric (185 Days) | Arm A (Mutable YAML) | Arm B ( `trails.log` ) | Delta | \n|---|---|---|---|\n| Output Tokens (Reasoning + Edits) | 27,048 | **13,995** | **-48.3%** | \n| File Write / Edit Calls | 18 | **5** | **-72.2%** | \n| Total Write Volume | 14.3 kB | **3.3 kB** | **-76.9%** | \n| Static `.sop.md` Files Mutated | 5 | **0** | **-100%** | \n| Tool Calls / Wall-Clock Time | 55 / 153s | **43 / 121s** | **-21.8% / -20.9%** | \n\n*(Full disclosure from the whitepaper: in the early sandbox run, leaving a 4.6 kB prototype script inside the workspace caused a `+8.3%` read-volume bump because three amnesiac agents re-read it; moving that logic into the external `sop_cli.py` removes that overhead.)*\n\nIn my own daily work, the shift felt even bigger. My App Store compliance folder had grown into 25 overlapping notes totaling ~300 kB, and agents kept throwing false alarms on archived apps. Collapsing it into one Master SOP plus a 10-second read-only preflight script killed those repeat mistakes overnight.\n\nEven better: on my Mac I symlinked five different tools—Antigravity, Claude Code, Codex, Gemini CLI, and WorkBuddy—to the same local hub. Fifteen minutes after Antigravity appended a `x` veto and a `~` cooldown, I opened a free Claude Code session cold, never typed the letters \"SOP,\" and asked in plain English which channels were safe today. It sniffed the hub and dodged every single blocked and cooling target on the first try.\n\nYou do not want an agent scanning workflow graphs when you just ask a quick regex question. `SOP.md` uses conditional implicit invocation: install one meta-skill (`sop-runner`) and paste a 5-line trigger rule into `AGENTS.md`, `CLAUDE.md`, or `GEMINI.md`:\n\n```\n# Option A: Install via the universal Agent Skills CLI\nnpx skills add hooosberg/SOP.md --skill sop-runner\n\n# Option B: Run the zero-dependency Python 3 validator directly via uvx\nuvx --from git+https://github.com/hooosberg/SOP.md sop-md validate-graph sop-workspace.yaml\n```\n\nPair it with a hard `gate: human_signoff` on any irreversible step (publishing, money movement, production deletes)—especially when combining `SOP.md` with browser automation like [AgentLimb](https://agentlimb.com/). Let the agent do the prep work and keep the final click strictly human.\n\nEverything—the RFC 2119 spec (CC BY 4.0), zero-dependency Python 3 CLI (Apache 2.0), schemas, and cross-domain blueprints—is live and archived:\n\n`SOP.md v0.3.1`)`#61`) & AgentSkills (`#257`)\nDrop the GitHub link into your favorite coding agent and see how much of your amnesia tax disappears. If you run into weird edge cases with multi-agent setups, open an issue or leave a comment below—I would genuinely love to compare notes.", "url": "https://wpnews.pro/news/i-dropped-a-slime-mold-into-my-local-folders-to-stop-paying-the-ai-amnesia-tax", "canonical_source": "https://dev.to/hooosberg/i-dropped-a-slime-mold-into-my-local-folders-to-stop-paying-the-ai-amnesia-tax-81a", "published_at": "2026-12-06 16:30:09+00:00", "updated_at": "2026-12-06 16:44:22.930349+00:00", "lang": "en", "topics": ["ai-agents", "ai-tools", "developer-tools", "ai-infrastructure"], "entities": ["Claude Code", "Codex", "Gemini CLI", "Antigravity", "Obsidian"], "also_reported_by": [], "takeaway": "Mounting existing folders through a sop-workspace.yaml and activating only the 2–3 relevant SOP nodes cut blind-test context reads 81.5% (309.1 kB to 57.3 kB) and latency from 118s to 58s with 20/20 rule recall parity.", "recommendation": {"advice": "Index local workflow docs with a mounted SOP.md workspace so agents load only the 2–3 relevant nodes instead of whole directories; the source measured 81.5% fewer context reads at equal recall.", "playbook": "llm-cost", "playbook_url": "https://wpnews.pro/playbooks/llm-cost"}, "alternates": {"html": "https://wpnews.pro/news/i-dropped-a-slime-mold-into-my-local-folders-to-stop-paying-the-ai-amnesia-tax", "markdown": "https://wpnews.pro/news/i-dropped-a-slime-mold-into-my-local-folders-to-stop-paying-the-ai-amnesia-tax.md", "text": "https://wpnews.pro/news/i-dropped-a-slime-mold-into-my-local-folders-to-stop-paying-the-ai-amnesia-tax.txt", "jsonld": "https://wpnews.pro/news/i-dropped-a-slime-mold-into-my-local-folders-to-stop-paying-the-ai-amnesia-tax.jsonld"}}