feat: update wakeup text to include reading BOOTSTRAP.md before AGENTS.md

This commit is contained in:
Abhimanyu Saharan
2026-02-16 01:45:02 +05:30
parent 5912048b85
commit 7a3a2366da
2 changed files with 10 additions and 1 deletions

View File

@@ -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."
)

View File

@@ -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")