From 7a3a2366da1d7e3562ce7431db5a2b490a4a6ca0 Mon Sep 17 00:00:00 2001 From: Abhimanyu Saharan Date: Mon, 16 Feb 2026 01:45:02 +0530 Subject: [PATCH] feat: update wakeup text to include reading BOOTSTRAP.md before AGENTS.md --- backend/app/services/openclaw/provisioning.py | 3 ++- backend/tests/test_agent_provisioning_utils.py | 8 ++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/backend/app/services/openclaw/provisioning.py b/backend/app/services/openclaw/provisioning.py index 79a13ae2..0d2534a3 100644 --- a/backend/app/services/openclaw/provisioning.py +++ b/backend/app/services/openclaw/provisioning.py @@ -1004,7 +1004,8 @@ def _should_include_bootstrap( def _wakeup_text(agent: Agent, *, verb: str) -> str: return ( f"Hello {agent.name}. Your workspace has been {verb}.\n\n" - "Start the agent, read AGENTS.md, and begin heartbeats after startup." + "Start the agent. If BOOTSTRAP.md exists, read it first, then read AGENTS.md. " + "Begin heartbeats after startup." ) diff --git a/backend/tests/test_agent_provisioning_utils.py b/backend/tests/test_agent_provisioning_utils.py index 27a88370..f5529e3b 100644 --- a/backend/tests/test_agent_provisioning_utils.py +++ b/backend/tests/test_agent_provisioning_utils.py @@ -56,6 +56,14 @@ def test_workspace_path_preserves_tilde_in_workspace_root(): assert agent_provisioning._workspace_path(agent, "~/.openclaw") == "~/.openclaw/workspace-alice" +def test_wakeup_text_includes_bootstrap_before_agents(): + agent = _AgentStub(name="Alice") + + text = agent_provisioning._wakeup_text(agent, verb="created") + + assert "If BOOTSTRAP.md exists, read it first, then read AGENTS.md." in text + + def test_agent_lifecycle_workspace_path_preserves_tilde_in_workspace_root(): assert ( AgentLifecycleService.workspace_path("Alice", "~/.openclaw")