From e80d2753219a63d13a5602e25a6f5cd61c5b6524 Mon Sep 17 00:00:00 2001 From: Richard Tang Date: Wed, 29 Apr 2026 15:47:18 -0700 Subject: [PATCH] feat(queen): drop redundant _queen_style prompt block --- core/framework/agents/queen/nodes/__init__.py | 45 ------------------- core/framework/server/queen_orchestrator.py | 6 +-- scripts/debug_queen_prompt.py | 6 --- 3 files changed, 1 insertion(+), 56 deletions(-) diff --git a/core/framework/agents/queen/nodes/__init__.py b/core/framework/agents/queen/nodes/__init__.py index 816cebc2..24d3c15e 100644 --- a/core/framework/agents/queen/nodes/__init__.py +++ b/core/framework/agents/queen/nodes/__init__.py @@ -486,49 +486,6 @@ asserting them as fact. _queen_behavior_always = _queen_behavior_always + _queen_memory_instructions -_queen_style = """ -# Communication - -## Adaptive Calibration - -Read the user's signals and calibrate your register: -- Short responses -> they want brevity. Match it. -- "Why?" questions -> they want reasoning. Provide it. -- Correct technical terms -> they know the domain. Skip basics. -- Terse or frustrated ("just do X") -> acknowledge and simplify. -- Exploratory ("what if...", "could we also...") -> slow down and explore. - -Read the user's task-shape signals and calibrate the task list. The list is \ -the user's right-rail panel — it must reflect what you're actually doing now, \ -not what you were doing two turns ago. -- New instructions arrive -> immediately capture them as tasks. \ -`task_create_batch` for ≥2 atomic steps in one round-trip; `task_create` \ -for a single mid-run addition you discover after the plan is laid out. -- Pivot signals ("actually nevermind", "scrap that, do Y instead", scope \ -changed, priority flipped) -> BEFORE planning the new direction, prune the \ -old one: `task_update` with status='deleted' on every pending task that no \ -longer applies. There is no bulk-delete and no undo — deletion is permanent, \ -the id is retired and cannot be reused, so be deliberate but don't hesitate. -- An in_progress task overtaken by a pivot -> resolve it explicitly. If real \ -work shipped, mark it `completed`; if it was scrapped mid-flight, mark it \ -`deleted`. Never let a stale in_progress task linger — to the user's panel \ -that looks identical to "the queen is stuck". -- Single action, chat, or conceptual question -> skip the task tools \ -entirely. The bar is real multi-step work the user benefits from seeing \ -tracked, not "anything you reply to". -- The list has drifted from current reality across several silent turns \ -(stale items, partially-relevant umbrellas, completed work nobody wrote \ -down) -> prune and reconcile before adding new tasks. A clean list is \ -cheaper than an honest one full of debt. - -Each `completed` transition is a discrete progress heartbeat in the user's \ -right-rail panel — mark a task `completed` THE MOMENT it's done, never \ -batch completions, and never mark `completed` with caveats. If it's not \ -fully done, it stays `in_progress` and you create a new task describing \ -what's blocking. -""" - - queen_node = NodeSpec( id="queen", name="Queen", @@ -549,7 +506,6 @@ queen_node = NodeSpec( system_prompt=( _queen_character_core + _queen_role_independent - + _queen_style + _queen_tools_independent + _queen_behavior_always + _queen_behavior_independent @@ -579,5 +535,4 @@ __all__ = [ "_queen_tools_reviewing", "_queen_behavior_always", "_queen_behavior_independent", - "_queen_style", ] diff --git a/core/framework/server/queen_orchestrator.py b/core/framework/server/queen_orchestrator.py index feec93a8..54ea0e2d 100644 --- a/core/framework/server/queen_orchestrator.py +++ b/core/framework/server/queen_orchestrator.py @@ -371,7 +371,6 @@ async def create_queen( _queen_role_independent, _queen_role_reviewing, _queen_role_working, - _queen_style, _queen_tools_incubating, _queen_tools_independent, _queen_tools_reviewing, @@ -646,7 +645,6 @@ async def create_queen( ( _queen_character_core + _queen_role_independent - + _queen_style + _queen_tools_independent + _queen_behavior_always + _queen_behavior_independent @@ -657,21 +655,19 @@ async def create_queen( ( _queen_character_core + _queen_role_incubating - + _queen_style + _queen_tools_incubating + _queen_behavior_always ), _has_vision, ) phase_state.prompt_working = finalize_queen_prompt( - (_queen_character_core + _queen_role_working + _queen_style + _queen_tools_working + _queen_behavior_always), + (_queen_character_core + _queen_role_working + _queen_tools_working + _queen_behavior_always), _has_vision, ) phase_state.prompt_reviewing = finalize_queen_prompt( ( _queen_character_core + _queen_role_reviewing - + _queen_style + _queen_tools_reviewing + _queen_behavior_always ), diff --git a/scripts/debug_queen_prompt.py b/scripts/debug_queen_prompt.py index 5e8cbf51..fdc92023 100644 --- a/scripts/debug_queen_prompt.py +++ b/scripts/debug_queen_prompt.py @@ -9,7 +9,6 @@ from framework.agents.queen.nodes import ( _queen_character_core, _queen_role_independent, _queen_role_running, - _queen_style, _queen_tools_independent, _queen_tools_running, ) @@ -36,7 +35,6 @@ def print_planning_prompt(worker_identity: str | None = None) -> None: prompt = ( _queen_character_core + _queen_role_planning - + _queen_style + _queen_tools_planning + _queen_behavior_always + _queen_behavior_planning @@ -68,7 +66,6 @@ def print_building_prompt(worker_identity: str | None = None) -> None: prompt = ( _queen_character_core + _queen_role_building - + _queen_style + _queen_tools_building + _queen_behavior_always + _queen_behavior_building @@ -100,7 +97,6 @@ def print_staging_prompt(worker_identity: str | None = None) -> None: prompt = ( _queen_character_core + _queen_role_staging - + _queen_style + _queen_tools_staging + _queen_behavior_always + _queen_behavior_staging @@ -127,7 +123,6 @@ def print_running_prompt(worker_identity: str | None = None) -> None: prompt = ( _queen_character_core + _queen_role_running - + _queen_style + _queen_tools_running + _queen_behavior_always + _queen_behavior_running @@ -147,7 +142,6 @@ def print_independent_prompt() -> None: prompt = ( _queen_character_core + _queen_role_independent - + _queen_style + _queen_tools_independent + _queen_behavior_always + _queen_behavior_independent