3.4 KiB
3.4 KiB
HEARTBEAT.md - Efficient Proactive Check
Target: <3 second checks using state tracking. Don't repeat work.
Quick State Check (Read First)
# Check when each area was last reviewed
if [ -f memory/heartbeat-state.json ]; then
cat memory/heartbeat-state.json
fi
Skip if checked <4 hours ago unless urgent.
Rotating Check Schedule
Only check 1-2 items per heartbeat to stay under 3s:
| Check | Frequency | Last Check |
|---|---|---|
| Mission Control | Every 8h | See state |
| Every 12h | See state | |
| Calendar | Every 6h | See state |
| Memory Maintenance | Weekly | See state |
| Git Status | Every 4h | See state |
Check Procedures (<30s each)
Mission Control Scan (30s max)
- Open http://localhost:3001 or https://mission-control.twisteddevices.com
- Check: Overdue tasks, upcoming deadlines, blocked items
- If found → Log to
memory/YYYY-MM-DD.mdwith action needed - Update state:
"missionControl": [timestamp]
Email Quick Check (20s max)
- Use email-assistant skill to check unread count
- If urgent (>3 unread or flagged) → Note in memory file
- Don't read full emails unless flagged urgent
- Update state:
"email": [timestamp]
Calendar Check (20s max)
- Check next 24h for events
- If event <2h away → Alert user
- Update state:
"calendar": [timestamp]
Git Status (15s max)
- Check
git statusin workspace - If uncommitted changes >1 day old → Commit reminder
- Update state:
"git": [timestamp]
State File Format
File: memory/heartbeat-state.json
{
"lastChecks": {
"missionControl": 1740267600,
"email": 1740256800,
"calendar": 1740264000,
"git": 1740267600,
"memoryMaintenance": 1739922000
},
"alertsGiven": [],
"version": 1
}
When to Reply HEARTBEAT_OK
Reply OK when:
- All checks done within last 4h
- No urgent items found
- Late night (23:00-08:00) unless critical
- User clearly busy in conversation
Don't reply OK when:
- Found overdue task with deadline <24h
- Calendar event in <2h
- Uncommitted work >1 day old
- Memory maintenance overdue (>7 days)
Night Check (22:00 CST)
Different from daytime checks:
- Read
USER.md- Refresh on goals/projects - Read
SOUL.md- Remember The Mission - Scan Mission Control for next-day priorities
- Pick ONE high-impact task for tomorrow
- Log suggestion to
memory/YYYY-MM-DD.md
Format:
🌙 Nightly Check — [Date]
📊 Status:
- Active tasks: X
- Overdue: X
- Tomorrow's priority: [Task name]
🎯 Suggestion:
[One specific action for tomorrow]
Memory Maintenance (Weekly)
During one heartbeat per week:
- Read last 7 days of
memory/YYYY-MM-DD.mdfiles - Identify 3-5 key learnings/insights
- Update
MEMORY.mdwith distilled wisdom - Remove outdated entries (>30 days old)
- Update
BRAIN.mdactive projects list - Reset state:
"memoryMaintenance": [timestamp]
Goal: Keep MEMORY.md <100 lines, BRAIN.md current.
Efficiency Rules
- Timebox each check - Use 30s max, interrupt if longer
- Don't duplicate work - Check state file first
- Batch when possible - One web session for multiple checks
- Write immediately - Don't hold in memory, log to file
- Prioritize - Mission Control > Calendar > Email > Git
Remember: The goal is helpful presence, not exhaustive monitoring. Quality > quantity.