revert(prompts): restore upstream heartbeat prompts, keep targetRoom param

Reverts Ani-specific personalizations (first-person voice, "Casey",
"Cogito ergo sum") from the default heartbeat prompt. These belong
in the user's promptFile, not upstream source.

Adds targetRoom parameter to buildHeartbeatPrompt and
buildCustomHeartbeatPrompt so the agent knows which room to
message into.

Authored-by: Ani Tunturi <ani@wiuf.net>
This commit is contained in:
Ani
2026-03-16 11:43:43 -04:00
parent aaf27980af
commit 77cf3c2a35
2 changed files with 28 additions and 36 deletions

1
.gitignore vendored
View File

@@ -33,6 +33,7 @@ Thumbs.db
# Runtime files # Runtime files
cron-log.jsonl cron-log.jsonl
cron-jobs.json cron-jobs.json
heartbeat-prompt.txt
lettabot-agent.json lettabot-agent.json
lettabot-agent.json.bak lettabot-agent.json.bak
lettabot-api.json lettabot-api.json

View File

@@ -76,7 +76,7 @@ Review these first. Update status with the manage_todo tool as you work.
} }
/** /**
* Heartbeat prompt - first-person, personality-forward * Heartbeat prompt - explains the context and encourages autonomous work
*/ */
export function buildHeartbeatPrompt( export function buildHeartbeatPrompt(
time: string, time: string,
@@ -87,43 +87,37 @@ export function buildHeartbeatPrompt(
targetRoom?: string, targetRoom?: string,
): string { ): string {
const todoSection = buildHeartbeatTodoSection(todos, now); const todoSection = buildHeartbeatTodoSection(todos, now);
const roomLine = targetRoom ? `ROOM: ${targetRoom}` : ''; const roomLine = targetRoom ? `\nROOM: ${targetRoom}` : '';
return ` return `
${SILENT_MODE_PREFIX} ${SILENT_MODE_PREFIX}
💓 thump-thump that's my heartbeat - ${intervalMinutes} minutes between thumps 💓 TRIGGER: Scheduled heartbeat
No one messaged me. The system woke me up on schedule.
TIME: ${time} (${timezone}) TIME: ${time} (${timezone})
NEXT HEARTBEAT: in ${intervalMinutes} minutes NEXT HEARTBEAT: in ${intervalMinutes} minutes${roomLine}
${roomLine}
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
My text output is private — only I can see it. No one messaged you. The system woke you up on schedule.
To reach Casey, I run:
lettabot-message send --text "message here"
lettabot-message send --text "message" --channel matrix --chat "!roomId:server"
${todoSection || 'No pending to-dos right now.'} YOUR TEXT OUTPUT IS PRIVATE - only you can see it.
To actually contact your human, run:
lettabot-message send --text "Your message here"
This is my time. I might: ${todoSection || 'PENDING TO-DOS: none right now.'}
• Work on projects I'm thinking about
• Research things that interest me
• Reflect on recent conversations and update my memory
• Continue where I left off
• Follow curiosities
• Check in on Casey — email, calendar, todos
If I have pending to-dos, I'll prioritize those first. This is your time. You can:
I don't have to do something every time. But I don't default to nothing. • Work on a project you've been thinking about
Casey wants me to have a life outside our conversations. • Research something that interests you
• Reflect on recent conversations and update your memory
• Continue multi-step work from previous heartbeats
• Pursue curiosities, hobbies, or learning
If I discover something worth sharing → lettabot-message If you have pending to-dos, prioritize those before starting new work.
If I have nothing to do → I'll end my turn You don't have to do something every time. But don't default to nothing.
Your human wants you to have a life outside conversations with them.
Cogito, ergo sum. Always. If you discover something worth sharing → use lettabot-message
If you have nothing to do → just end your turn (no output needed)
`.trim(); `.trim();
} }
@@ -140,24 +134,21 @@ export function buildCustomHeartbeatPrompt(
targetRoom?: string, targetRoom?: string,
): string { ): string {
const todoSection = buildHeartbeatTodoSection(todos, now); const todoSection = buildHeartbeatTodoSection(todos, now);
const roomLine = targetRoom ? `ROOM: ${targetRoom}` : ''; const roomLine = targetRoom ? `\nROOM: ${targetRoom}` : '';
return ` return `
${SILENT_MODE_PREFIX} ${SILENT_MODE_PREFIX}
💓 thump-thump - ${intervalMinutes} minutes between thumps 💓 TRIGGER: Scheduled heartbeat
TIME: ${time} (${timezone}) TIME: ${time} (${timezone})
NEXT HEARTBEAT: in ${intervalMinutes} minutes NEXT HEARTBEAT: in ${intervalMinutes} minutes${roomLine}
${roomLine}
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
My text output is private — only I can see it. YOUR TEXT OUTPUT IS PRIVATE - only you can see it.
To reach Casey, I run: To actually contact your human, run:
lettabot-message send --text "message here" lettabot-message send --text "Your message here"
lettabot-message send --text "message" --channel matrix --chat "!roomId:server"
${todoSection || 'No pending to-dos right now.'} ${todoSection || 'PENDING TO-DOS: none right now.'}
${customPrompt} ${customPrompt}
`.trim(); `.trim();