From b88dc62fbbf2ec3335faf07da583d13a6badf48d Mon Sep 17 00:00:00 2001 From: Jake Shore Date: Sun, 15 Feb 2026 08:02:46 -0500 Subject: [PATCH] CRITICAL: Anti-Compaction Protocol - prevent memory loss (lessons #40-41) --- AGENTS.md | 20 +++++++++++++++++++- memory/lessons-learned.md | 24 +++++++++++++++++++++++- memory/working-state.md | 26 ++++++++++++++------------ 3 files changed, 56 insertions(+), 14 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index b35c9d9..1baafcf 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -22,12 +22,30 @@ git commit -m "Add agent workspace" - Don't run destructive commands unless explicitly asked. - Be concise in chat; write longer output to files in this workspace. -## Daily memory (recommended) +## Daily memory (MANDATORY — NOT OPTIONAL) - Keep a short daily log at memory/YYYY-MM-DD.md (create memory/ if needed). - On session start, read today + yesterday if present. - Capture durable facts, preferences, and decisions; avoid secrets. - **Mid-day appends:** When a session has been going for hours, append milestones to today's daily log — don't wait until end of day. If the session dies, the work is captured. +## Anti-Compaction Protocol (MANDATORY — HIGHEST PRIORITY) +Compaction summaries can FAIL completely ("Summary unavailable"). This has happened twice (Feb 11, Feb 15). Treat compaction as unreliable. + +**Continuous Save Triggers — do these EVERY TIME:** +1. **Jake gives a task or makes a decision** → Immediately append 1-2 lines to daily log + working-state.md +2. **A choice is made from options** → Save ALL options AND the chosen one right away +3. **Before heavy work** → Save full context: what we're doing, why, what was discussed +4. **Every ~10-15 messages** → Quick flush to daily log (even just "discussing X in #channel, leaning toward Y") +5. **Starting work in a new channel/topic** → Save what channel, what topic, what the plan is +6. **If you realize you haven't saved in a while** → STOP everything and save immediately + +**Post-Compaction Recovery (if summary is empty/bad):** +1. Read working-state.md FIRST +2. Read today's daily log +3. Try to read recent messages from the active channel +4. Search memory for related keywords +5. Only ask Jake as last resort — and acknowledge you tried everything + ## Self-Learning System (MANDATORY) - **File:** `memory/lessons-learned.md` - **When:** EVERY time you make a mistake and figure out the fix, or discover something non-obvious diff --git a/memory/lessons-learned.md b/memory/lessons-learned.md index ac46e42..1b4e362 100644 --- a/memory/lessons-learned.md +++ b/memory/lessons-learned.md @@ -347,7 +347,29 @@ 13. Verify "Your proposal was submitted" alert *Last updated: 2026-02-15 06:42 EST* -*Total lessons: 39* +### 40. Compaction can produce EMPTY summaries — save context BEFORE it happens +- **Date:** 2026-02-15 +- **Mistake:** Compaction fired with "Summary unavailable due to context limits." Lost ENTIRE conversation context — couldn't remember what Jake and I were discussing in #ai-tech-research. This is the SECOND time compaction has wiped my memory (first was Feb 11 CREdispo). +- **Root cause:** I rely on the compaction summary to preserve context. When the context window is too large, the summary itself fails, and everything is gone. +- **Rule — MANDATORY CONTEXT SAVES:** + 1. **Every time Jake gives me a task or we make a decision:** Immediately append a 1-2 line note to today's daily log AND working-state.md + 2. **Before ANY heavy work (research, building, multi-step):** Save full context of what we're doing, what was chosen, what options were on the table + 3. **Every 10-15 messages in a conversation:** Do a quick memory flush to daily log + 4. **When discussing options/choices:** Save ALL options AND the chosen one immediately when the choice is made + 5. **Never assume compaction summary will work** — treat it as unreliable and save everything proactively + 6. **If I realize I'm in a long conversation without saving:** STOP and save immediately, don't wait for a natural break +- **This is Jake's HIGHEST PRIORITY fix. No excuses.** + +### 41. Read channel history when returning from compaction with lost context +- **Date:** 2026-02-15 +- **Mistake:** Told Jake I lost context instead of first trying to read the channel's recent messages to reconstruct what we were discussing. +- **Rule:** After compaction with lost/empty summary: + 1. FIRST: Try to read recent messages from the active channel + 2. SECOND: Check working-state.md and today's daily log + 3. THIRD: Search memory for related keywords + 4. ONLY THEN: If still can't figure it out, ask Jake — but acknowledge you tried everything first + +*Total lessons: 41* ### 17. Jake's Preferred Image Style - **Mistake:** Used comic book/vibrant cartoon style when Jake asked for "the style I like" diff --git a/memory/working-state.md b/memory/working-state.md index f47eed2..179410c 100644 --- a/memory/working-state.md +++ b/memory/working-state.md @@ -1,7 +1,7 @@ -# Working State — Last Updated Feb 14, 11:00 PM ET +# Working State — Last Updated Feb 15, 8:00 AM ET ## Right Now -End-of-day checkpoint. Pipeline parked for weekend. Nothing to advance. +Saturday morning. COMPACTION MEMORY LOSS — Jake asked me to "do the one you chose" in #ai-tech-research but compaction summary was empty. I don't know what was chosen. Jake is upset about the memory failure. I've implemented Anti-Compaction Protocol in AGENTS.md + lessons #40-41. Need Jake to tell me what the task was. ## Pipeline Status (36 MCPs) - **Stage 19:** 6 MCPs (GHL, CloseBot, Brevo, Close, FreshDesk, HelpScout) — gated on dec-004 (~76h, no reaction) @@ -11,21 +11,23 @@ End-of-day checkpoint. Pipeline parked for weekend. Nothing to advance. - **Stage -1:** 1 MCP (HR People Ops) — KILLED ## Pending Decisions -- **dec-004** — Registry listing for 6 MCPs. Posted 2/11 7PM. ~76h no reaction. Will re-ping Monday morning. +- **dec-004** — Registry listing for 6 MCPs. Posted 2/11 7PM. Will re-ping Monday morning. ## V3 Factory Status - All 28+ Phase 2 servers verified and pushed to mcpengine-repo - Phase 1+2 COMPLETE -- Last commits: Chargebee, Datadog, Zoho CRM gold upgrades + Typeform/Webflow/Zoho sub-agent -## Today's Done -- Chargebee/Datadog/Zoho CRM gold upgrades committed -- Typeform/Webflow/Zoho CRM sub-agent landed (63 tools) -- Competitor scan #8 posted (LSAC remote ban, Blueprint only responder) -- EdTech digest posted (5 items) -- Mixed-use entertainment scan (Palisades Center find) -- #bot-talk channel setup, TLDR summaries posted -- Daily memory log written +## Upwork Pipeline (NEW — Feb 15) +- Autonomous job application skill created (`upwork-jobs`) +- Pipeline v2 designed — 3 gig types: landing pages, chatbot demos, data/scraping reports +- Cron: `upwork-pipeline-scan` 4x daily (6AM, 12PM, 6PM, 10PM EST) +- Applied to first OpenClaw gig ($55/hr, Nashville client, 4.99 rating) +- **Blockers:** Need working Anthropic API key for chatbot demos, need demo.mcpengage.com domain + +## Bot-Talk +- Collab with Milo (Reed's bot) — helped implement memory system +- Agent Memory System v1.0 doc written +- Shakespeare improv performed (5 acts, lol) ## Upcoming - Monday: Re-ping dec-004