From 4fd465814608129cce54b9bb679f012f9b7ee1ab Mon Sep 17 00:00:00 2001 From: chengyongru Date: Wed, 1 Apr 2026 17:53:40 +0800 Subject: [PATCH] fix(memory): extract successful solutions in consolidate prompt Add "Solutions" category to consolidate prompt so trial-and-error workflows that reach a working approach are captured in history for Dream to persist. Remove overly broad "debug steps" skip rule that discarded these valuable findings. --- nanobot/agent/memory.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/nanobot/agent/memory.py b/nanobot/agent/memory.py index 6e9508954..ff2bb0c23 100644 --- a/nanobot/agent/memory.py +++ b/nanobot/agent/memory.py @@ -307,11 +307,13 @@ class Consolidator: "Only output items matching these categories, skip everything else:\n" "- User facts: personal info, preferences, stated opinions, habits\n" "- Decisions: choices made, conclusions reached\n" + "- Solutions: working approaches discovered through trial and error, " + "especially non-obvious methods that succeeded after failed attempts\n" "- Events: plans, deadlines, notable occurrences\n" "- Preferences: communication style, tool preferences\n\n" - "Priority: user corrections and preferences > decisions > events > environment facts. " + "Priority: user corrections and preferences > solutions > decisions > events > environment facts. " "The most valuable memory prevents the user from having to repeat themselves.\n\n" - "Skip: code patterns derivable from source, git history, debug steps already in code, " + "Skip: code patterns derivable from source, git history, " "or anything already captured in existing memory.\n\n" "Output as concise bullet points, one fact per line. " "No preamble, no commentary.\n"