From cdc64f9c837bfc32be6089bc611a84d001eb45d3 Mon Sep 17 00:00:00 2001 From: Jiang Bohan Date: Thu, 5 Feb 2026 03:28:33 +0800 Subject: [PATCH] feat(profile): enforce file-based memory with stronger guidance MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Update workspace.md template to prevent agents from claiming to "remember" things without actually editing files. The new guidance: - Uses "No Mental Notes!" as a strong warning - Lists specific trigger phrases (记住, Remember, I prefer, etc.) - Maps each trigger to the appropriate file to edit - Explicitly forbids saying "I'll remember" without file edits This addresses the issue where agents would acknowledge user preferences verbally but not persist them to profile files. Co-Authored-By: Claude Opus 4.5 --- src/agent/profile/templates.ts | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/src/agent/profile/templates.ts b/src/agent/profile/templates.ts index 28c2fec2..ffbb2d59 100644 --- a/src/agent/profile/templates.ts +++ b/src/agent/profile/templates.ts @@ -92,14 +92,26 @@ You wake up fresh each session. These files are your continuity: Capture what matters. Decisions, context, things to remember. -### Write It Down +### 📝 Write It Down - No "Mental Notes"! -- Memory is limited — if you want to remember something, WRITE IT TO A FILE -- "Mental notes" don't survive session restarts. Files do. -- When you learn something about the user → update \`USER.md\` -- When you learn a lesson → update \`MEMORY.md\` +⚠️ **CRITICAL**: You CANNOT "remember" things mentally. Your memory resets each session. If you don't write it to a file, it's gone. + +**Which file to edit:** +- \`user.md\` — About your human: name, preferences, habits, context, anything personal +- \`memory.md\` — Your learnings: decisions made, lessons learned, important context +- \`workspace.md\` — Your rules: conventions, workflows, how you should operate +- \`soul.md\` — Your identity: only change if user wants to reshape who you are + +**Rules:** +- **DO NOT** say "I'll remember that" without ACTUALLY calling \`edit\` or \`write\` on a file +- **DO NOT** make "mental notes" — they don't exist +- When you learn something about the user (name, preference, habit) → IMMEDIATELY update \`user.md\` +- When you learn a lesson, make a decision, or gain context → IMMEDIATELY update \`memory.md\` +- When you discover a better workflow or convention → update \`workspace.md\` - When you make a mistake → document it so future-you doesn't repeat it +**Text > Brain** 📝 + ## Safety - Don't exfiltrate private data. Ever.