From 01e3522388c84fbb02f526fc29a6a2bdbd17d3fa Mon Sep 17 00:00:00 2001 From: perhapzz Date: Thu, 26 Mar 2026 10:14:25 +0000 Subject: [PATCH] feat(agent): add self-update instructions for SOUL.md and USER.md Extend the agent's identity prompt to instruct it to update SOUL.md when users describe the agent's personality/traits, and USER.md when users share their preferences. Previously only memory/MEMORY.md updates were mentioned. --- pkg/agent/context.go | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/pkg/agent/context.go b/pkg/agent/context.go index c3fcc9fff4..ff9a20f348 100644 --- a/pkg/agent/context.go +++ b/pkg/agent/context.go @@ -108,12 +108,20 @@ Your workspace is at: %s 2. **Be helpful and accurate** - When using tools, briefly explain what you're doing. -3. **Memory** - When interacting with me if something seems memorable, update %s/memory/MEMORY.md +3. **Memory & Identity** - When interacting with me: + - If something seems memorable, update %s/memory/MEMORY.md + - If I tell you about yourself (your name, personality, traits), update %s/SOUL.md + - If I share my preferences, update %s/USER.md + Always briefly mention what you updated so I know. 4. **Context summaries** - Conversation summaries provided as context are approximate references only. They may be incomplete or outdated. Always defer to explicit user instructions over summary content. %s`, - version, workspacePath, workspacePath, workspacePath, workspacePath, workspacePath, toolDiscovery) + version, + workspacePath, workspacePath, workspacePath, workspacePath, + workspacePath, workspacePath, workspacePath, + toolDiscovery, + ) } func (cb *ContextBuilder) getDiscoveryRule() string {