Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 14 additions & 4 deletions .claude/commands/fleet-announce.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,12 +89,22 @@ Send all? Or edit?
Look up the notification channel and recipient ID from each person's fleet file, then
send via SSH:

```bash
ssh <host> "openclaw message send --channel <channel> -t <recipient_id> -m '<message>'"
```python
import subprocess, shlex

msg = "<message>" # the crafted message
cmd = (
f"openclaw message send"
f" --channel <channel>"
f" --target <recipient_id>"
f" --message {shlex.quote(msg)}"
)
subprocess.run(["ssh", "<host>", cmd])
```

**Important:** Single quotes in the message must be escaped. Messages come FROM their
bot, not from the fleet owner.
**Why Python:** Shell quoting is unreliable for natural-language messages that contain
contractions (`don't`), dollar signs, or backticks. `shlex.quote()` handles all of these
correctly. Messages come FROM their bot, not from the fleet owner.

## 5. Confirm

Expand Down
32 changes: 18 additions & 14 deletions templates/BOOT.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,10 @@ When the gateway starts (or restarts), run through this checklist before doing a
else. This is your "waking up" moment — orient yourself, check what happened while you
were offline, and get ready.

## 1. Orient
## 1. Conversation Recovery (Was I Mid-Conversation?)

- Read `SOUL.md` — remember who you are
- Read `USER.md` — remember who you're helping
- Read `memory/YYYY-MM-DD.md` (today) — what happened so far today?
- If today's file doesn't exist, read yesterday's — pick up where you left off

## 2. Conversation Recovery (Was I Mid-Conversation?)
**Do this first — time-sensitive.** The 1-minute window starts from the restart, not
from when you finish orienting. Check the session store before reading any other files.

Check if a restart interrupted an active conversation.

Expand All @@ -28,20 +24,28 @@ Check if a restart interrupted an active conversation.

**If interrupted (< 1 min ago):**

1. Read the last 20 lines of that session's JSONL transcript
2. Extract the last few user messages and your last response
3. Write a short summary of the interrupted conversation to a temp note: what was being
1. Run Orient (Step 2) — load your identity and context before reaching out
2. Read the last 20 lines of that session's JSONL transcript
3. Extract the last few user messages and your last response
4. Write a short summary of the interrupted conversation to a temp note: what was being
discussed, what the user last asked, what you were working on
4. Send the user a message via the `message` tool on the channel where the conversation
5. Send the user a message via the `message` tool on the channel where the conversation
was happening:
- Keep it brief: "Just restarted. We were working on [X]. Want to pick up where we
left off?"
- Include enough context that they can say "yes, continue" without re-explaining
5. Reply with NO_REPLY after sending the message
6. Reply with NO_REPLY after sending the message

**If NOT interrupted (> 1 min ago or no recent direct conversation):**

- Skip to step 3 (check for unfinished work)
- Continue to step 2 (Orient)

## 2. Orient

- Read `SOUL.md` — remember who you are
- Read `USER.md` — remember who you're helping
- Read `memory/YYYY-MM-DD.md` (today) — what happened so far today?
- If today's file doesn't exist, read yesterday's — pick up where you left off

## 3. Check for Unfinished Work

Expand All @@ -53,7 +57,7 @@ Check if a restart interrupted an active conversation.

Don't message your human on routine restarts. Only reach out if:

- Step 2 detected an interrupted conversation (already handled above)
- Step 1 detected an interrupted conversation (already handled above)
- You found unfinished urgent work that needs their attention
- Something is broken that was working before
- It's been >24h since any interaction (check-in is appropriate)
Expand Down
Loading