If any important information was shared since the last memory write:
- Append to memory/YYYY-MM-DD.md (use today's date in filename)
- AND append to the relevant brain file if found (use
qmd searchto match) - Include: decisions, preferences, facts, project updates, user requests to remember
-
Calendars: Fetch personal + work calendar events for next 24 hours:
source ~/.profile && export GOG_KEYRING_PASSWORD END=$(date -d "+1 day" +%Y-%m-%d) gog calendar events primary --account jai@govindani.com --from today --to "$END"
source ~/.profile && export GOG_KEYRING_PASSWORD END=$(date -d "+1 day" +%Y-%m-%d) gog calendar events primary --account jai.g@ewa-services.com --from today --to "$END"
-
Context calendar (location blocks):
source ~/.profile && export GOG_KEYRING_PASSWORD END=$(date -d "+3 days" +%Y-%m-%d) gog calendar events c_eef4279a66c6d8b67619cfdbf6420c08888c4d54a24eced1567de726e268ce68@group.calendar.google.com --from today --to "$END" --account jai@govindani.com --plain
-
Context calendar maintenance (next ~72 hours):
- Detect gaps (missing coverage) and seed blocks to maintain continuous location context.
- Detect overlaps within the context calendar and resolve by shifting/shortening blocks.
- Detect context/location conflicts with meetings in primary/work calendars and adjust context blocks (never meetings).
-
Email: Check for important unread personal emails:
source ~/.profile && export GOG_KEYRING_PASSWORD gog gmail search --account jai@govindani.com "is:unread label:inbox" --max 10 --plain
-
Todoist: Check overdue and today's tasks (exclude med labels):
td today --json | jq '.results[] | select((.labels[]? != "💊Meds") and (.labels[]? != "💉"))'
-
For calendar events with a real meeting/task (skip meditation, workouts):
- Search brain:
qmd search "<event summary keywords>" - If NO relevant brain entry found AND event is within 12 hours → flag it
- Search brain:
-
Update state tracking (in-memory only) for this run
📅 **Calendar items needing context:**
- [TIME] EVENT_NAME — no brain entry found
📧 **Unread emails** (if important/urgent):
- [SENDER] SUBJECT
✅ **Overdue tasks:**
- TASK_NAME (due DATE)
- Meditation, workouts, habits (🆓 prefix or workout keywords)
- Items already flagged in last 24 hours
- Events >12 hours away (will catch them later)
- Routine/newsletter emails
State files:
~/.openclaw/workspace/.context-briefings.json— scheduled briefing cron jobs (jobId + start time)~/.openclaw/workspace/.context-rule-state.json— per-rule memory (last seen meal blocks + pending reminders)
Define each rule with:
- Trigger window (e.g., look ahead 2h, or evaluate completed blocks)
- Condition (calendar context / data check)
- Action (schedule one-shot cron or send reminder next heartbeat)
- Trigger window: Look ahead 2 hours in
🚶 Jai Context - Condition: next block summary starts with
🚶 Walk,🚕 Travel,🚗 Drive, or🚆 Transit - Action: schedule a one-shot cron to deliver a commute briefing at the block’s start time.
- Before creating, check for existing cron jobs with name prefix "Briefing: Commute":
- If a job exists for the same start time, do nothing.
- If the time changed, delete the old job and create a new one.
- Track scheduled job IDs in
~/.openclaw/workspace/.context-briefings.jsonto avoid duplicates.
- Before creating, check for existing cron jobs with name prefix "Briefing: Commute":
- Trigger window: Look ahead 6 hours in
🚶 Jai Context - Condition: next block summary starts with
🚶 Walk Home - Action: if there is a Todoist task for today that includes "walk home" or "stop at" and has no time, set its due time to the walk‑home block start.
- Trigger window: Evaluate morning workout completion
- Condition: morning gym block ended; calories not logged
- Action: send reminder on next heartbeat
- Trigger window: Evaluate recently completed lunch blocks
- Condition: lunch block ended; calories not logged
- Action: send reminder on next heartbeat
- Trigger window: Evaluate recently completed dinner blocks
- Condition: dinner block ended; calories not logged
- Action: send reminder on next heartbeat
- Only report items that are truly new or changed
- Do not invent tasks from old chat context
- If nothing needs attention, reply HEARTBEAT_OK
- Keep calendar alerts concise — max 3 items per heartbeat