- 7413 rows from MuhlAI.zip → agent_memory_peter (0 failures) - Workspace files (SOUL/USER/IDENTITY/MEMORY/AGENTS/HEARTBEAT) snapshotted - 7 custom skills pushed to Forgejo peter org - progress.json: peter → complete Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
4.5 KiB
4.5 KiB
HEARTBEAT.md
🚧 Parked — Needs Mario
Library Volume — Where are the 900 docs?
/app/data/bulk-docsmounted but empty- Mario to check on host:
find /data/muhlai-uploads -type f | wc -l+ls -la /data/muhlai-uploads/ - Files may be in subdirectory or wiped on Coolify volume recreation
- ✅ Gmail fallback already done for Seed Capital (79 docs uploaded 2026-03-11)
Periodic Tasks
1. Vector Memory Ingestion (real-time watcher + hourly cron fallback)
- Real-time watcher:
watch_sessions.pyuses inotify to detect session file changes- Check if running:
bash ~/.openclaw/skills/m2-memory/scripts/start_watcher.sh status - If NOT running, restart it:
bash ~/.openclaw/skills/m2-memory/scripts/start_watcher.sh start - Watcher state:
memory/watcher-state.json - Log:
memory/watch-sessions.log
- Check if running:
- Hourly cron fallback:
memory-ingest-sessionscatches anything the watcher misses- If cron missed, run manually:
python3 ~/.openclaw/skills/m2-memory/scripts/ingest_sessions.py -v
- If cron missed, run manually:
- Batch state:
memory/ingest-state.json
2. PMH Portfolio Inbox Scan — ⏸️ PAUSED (Peter, 2026-03-11)
- Paused by Peter — too many irrelevant docs being extracted
- Do NOT run the monthly inbox scan until Peter explicitly re-enables it
- Script:
~/repos/mp1-muhlman-ai/scripts/monthly_inbox_scan.py -v
3. Error Recovery Check
- On each heartbeat, check if there were recent failures/crashes
- If the last interaction with Peter ended in an error or silence: send him a 1-line status
- Format: "I went down earlier, I'm back now. [What I was doing / current status]."
- Only send once — don't repeat the recovery message on every heartbeat
4. Sub-Agent Failure Auto-Resume ⚡ (HARD GATE — cannot HEARTBEAT_OK until cleared)
On EVERY heartbeat, check for timed-out or failed sub-agents:
# Check for recent sub-agent failures (last 2h)
Use subagents(action=list) to check for recently failed runs.
⛔ HARD GATE: If ANY sub-agent failed or timed out, you CANNOT reply HEARTBEAT_OK. You MUST address it first.
If a sub-agent failed or timed out:
- Read its task description to understand what it was doing
- Check what it actually completed (git log, DB state, file changes)
- Resume the remaining work yourself or spawn a new sub-agent with a longer timeout
- Report to Peter in ONE plain-English message: "Sub-agent timed out at [task]. Here's what it finished and what I'm picking up."
- Never wait for Peter to ask — he should never have to ask for a status on a failed task
- Only after steps 1-4 are done can this heartbeat section be considered cleared
Key rules:
- Sub-agents doing build/extraction work: set
runTimeoutSecondsto 1800 (30min) minimum, 3600 for large batch jobs - If a sub-agent fails mid-task: the work is NOT lost — check git log and DB before assuming failure
- Translate ALL error messages to plain English before reporting to Peter
Add your own periodic tasks below as your role develops.
Self-Improvement Review (weekly, Sundays)
Check memory/heartbeat-state.json → lastSelfImproveReview. If >7 days ago:
What to do:
- Search Qdrant for recent friction patterns:
bash ~/.openclaw/skills/m2-memory/memory.sh search "friction correction failure lesson learned" 2>&1 | head -40 - Read
memory/learnings.mdfor accumulated observations - Read recent daily files (last 7 days) for patterns: permission-seeking, narration relapses, untested deploys, confident wrong answers
- Synthesize: are there new patterns? Do existing SOUL.md/AGENTS.md principles need updating?
- If LOW-risk change (wording, emphasis, example): apply directly to SOUL.md or AGENTS.md, commit, note in daily file
- If HIGH-risk change (new principle, removed section, behavioral shift): write to
memory/AMENDMENT_DRAFT.md, create Planka card on Governance & Process → Proposals, notify Mario - Store any new fleet-wide learnings to Qdrant:
bash ~/.openclaw/skills/m2-memory/memory.sh store "FLEET LEARNING: ..." --importance 0.85 --entities "fleet,learning" - Update Planka card
1725149310410032290with review date + findings
The test: Am I repeating the same mistakes I made last week? If yes, the principles aren't working — they need reframing, not restating.
Update lastSelfImproveReview: <unix_ts> after running.
Intent Extraction (every 12h)
Check memory/heartbeat-state.json → lastIntentExtraction. If >12h ago:
bash /home/developer/.openclaw/workspace/scripts/extract-intent.sh peter
Update lastIntentExtraction: <unix_ts> after running.