Dodaios is an open-source agent OS for your desktop: it runs your coding agents, browser and apps by voice or chat, on your own machine. Formerly Personal Jarvis.
Python agent-orchestrationai-agentai-coding-assistantclaude-codecoding-agentcomputer-usedesktop-applocal-firstmcppersonal-jarvisvoice-assistantvoice-coding
feat(brain): TurnOverride.system_extra appends a per-turn system-prompt addendum
rubenluetke10-beep342b35f7a474
diff --git a/jarvis/brain/manager.py b/jarvis/brain/manager.pyindex 83c786a260..96ca3da933 100644--- a/jarvis/brain/manager.py+++ b/jarvis/brain/manager.py@@ -4187,6 +4187,12 @@ class BrainManager:if self._system_prompt_extra:parts.append(self._system_prompt_extra)+ # Per-turn addendum (TurnOverride.system_extra): a surface's own+ # briefing for THIS turn only; empty on every other turn.+ _turn_override = _TURN_OVERRIDE.get()+ if _turn_override is not None and _turn_override.system_extra:+ parts.append(_turn_override.system_extra)+# Structural-only base block (2026-06-29 consolidation): the editable# persona above now OWNS voice / tone / length / anti-filler /# screen-context rules. They used to be duplicated AND contradicted herediff --git a/jarvis/brain/turn_override.py b/jarvis/brain/turn_override.pyindex c8cac4c163..ca281de54d 100644--- a/jarvis/brain/turn_override.py+++ b/jarvis/brain/turn_override.py@@ -100,6 +100,11 @@ class TurnOverride:Whether the deterministic force-spawn heuristic may hand the turn toa background worker. A chat that IS the worker in its folder says no;an explicit "spawn an agent for this" still spawns either way.+ ``system_extra``+ A per-turn addendum to the system prompt, appended after the+ manager's own ``_system_prompt_extra``. Empty leaves the prompt+ byte-identical; a surface with its own briefing (the local-models+ setup assistant) sets it for its turns only."""provider: str@@ -111,6 +116,7 @@ class TurnOverride:credential_scope: str = "agent"max_turns: int | None = Noneallow_force_spawn: bool = False+ system_extra: str = ""receipt: TurnReceipt = field(default_factory=TurnReceipt)diff --git a/tests/unit/brain/test_turn_override.py b/tests/unit/brain/test_turn_override.pyindex c94fb16949..89cc502244 100644--- a/tests/unit/brain/test_turn_override.py+++ b/tests/unit/brain/test_turn_override.py@@ -262,3 +262,50 @@ def test_receipt_usage_is_the_agent_chat_shape() -> None:finish_reason="ok",)assert receipt.usage() == {"input_tokens": 10, "output_tokens": 3, "cost_usd": 0.5}+++# ------------------------------------------------------------ system_extra+++def _prompt_manager() -> BrainManager:+ """A manager with ``__init__`` bypassed — only what ``_build_system_prompt`` reads."""+ from jarvis.core.config import load_config++ m = BrainManager.__new__(BrainManager)+ m._soul = None+ m._user_profile = None+ m._people = None+ m._core_memory = None+ m._awareness_manager = None+ m._system_prompt_extra = "ROUTER DISCIPLINE BLOCK"+ m._wiki_context_suffix = ""+ m._reply_language = "auto"+ m._active_turn_identity = None+ cfg = load_config()+ cfg.performance.cache_optimized_prompt = False+ m._config = cfg+ return m+++def test_system_prompt_is_byte_identical_without_system_extra() -> None:+ m = _prompt_manager()+ baseline = m._build_system_prompt()+ token = _TURN_OVERRIDE.set(TurnOverride(provider=PICK))+ try:+ with_override = m._build_system_prompt()+ finally:+ _TURN_OVERRIDE.reset(token)+ assert with_override == baseline+++def test_system_prompt_carries_system_extra_after_the_manager_extra() -> None:+ m = _prompt_manager()+ addendum = "LOCAL MODELS ASSISTANT BRIEFING 7f3a"+ token = _TURN_OVERRIDE.set(TurnOverride(provider=PICK, system_extra=addendum))+ try:+ prompt = m._build_system_prompt()+ finally:+ _TURN_OVERRIDE.reset(token)+ assert addendum in prompt+ assert prompt.index("ROUTER DISCIPLINE BLOCK") < prompt.index(addendum)+ assert addendum not in m._build_system_prompt(), "the addendum lives for one turn only"