From d514fe161c4ca943cca9b63c8b52b0b77e0761ef Mon Sep 17 00:00:00 2001 From: Space-Banane Date: Sun, 31 May 2026 20:52:49 +0200 Subject: [PATCH] docs: update context compaction prompt with observe-decide-act-verify loop --- src/agent.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/agent.py b/src/agent.py index 8fe3c6e..e596a8a 100644 --- a/src/agent.py +++ b/src/agent.py @@ -183,6 +183,7 @@ def build_context_compaction_prompt( "The retained visuals already represent the latest image tool calls and their results. Reuse them first; do not call see_screen again only because compaction happened.\n" "Determine the current surface kind, foreground app, likely focus, pending dialog/browser state, and what changed since the last action before acting.\n" "Use classify -> choose control channel -> execute one meaningful transition -> verify.\n" + "Follow observe -> decide -> act -> verify.\n" f"{_prohibited_key_combo_prompt(prohibited_key_combos)}" "Re-observe with see_screen only when the retained visuals are stale or the UI likely changed. Add enhance for small or text-heavy details, and use get_active_window, detect_dialog, wait helpers, clipboard_get, or command stdout when they are the better verification channel.\n" "If a fresh focus check or retained visual already proves a text field or editor is ready, act without demanding another screenshot.\n" @@ -1011,7 +1012,7 @@ class ScreenJobAgent: "type": "function", "name": "get_active_window", "description": ( - "Return metadata for the current foreground window to verify focus, active app, surface kind, " + "Return metadata for the current foreground window to verify focus and active app, surface kind, " "browser state, and dialog classification." ), "parameters": {