Calendar Sync Workflow

Sync Google Calendar events into daily files under raw/calendar/ for temporal context in the wiki.

The calendar-sync automation runs weekly (local and cloud). Source: automations/calendar-sync.md, 2026-05-31

Command

npx tsx scripts/sync-calendar.ts

Google OAuth required (--auth on first run). Shared state: ~/.kevin-wiki/integrations.pglite. Source: recipes/calendar-to-brain.md

Runbook

  1. Read automations/calendar-sync.md.
  2. Run npx tsx scripts/sync-calendar.ts.
  3. Inspect the newest raw/calendar/ daily files.
  4. Extract repeated attendees, recurring meetings, travel/event constraints, and project timeline anchors.
  5. Search existing person/project pages before creating anything.
  6. Write outputs/<YYYY-MM-DD>/calendar-sync/codex.md when run as an automation.
  7. Update state.json automations.calendar-sync after scheduled completion; the sync script updates syncs.calendar after successful collection.
  8. Append wiki/log.md.
  9. If wiki pages changed, run npx tsx scripts/build-index.ts and qmd update && qmd embed.

Trigger And Inputs

Run weekly through the scheduler, after a calendar-auth repair, or manually before time-sensitive event planning. Required inputs are Google Calendar OAuth, scripts/sync-calendar.ts, automations/calendar-sync.md, and access to existing person/project/place pages for enrichment.

Use cases

  • Anchor timeline entries on person and project pages
  • Feed active project and event-planning pages with upcoming events
  • Cross-reference Meeting Sync Workflow when Circleback captures overlap

Raw calendar files stay immutable; compiled summaries live in wiki pages above the --- separator.

Promotion Rules

Calendar signal Durable action
Attendee appears 3+ times and already has context Update person page with meeting cadence or timeline entry.
Event changes project timeline, travel, or offsite planning Update project/place/planning page.
Routine class, travel hold, or duplicate invite Keep raw only unless it explains a later decision.
Missing OAuth or empty sync Write blocker/no-op output; do not update syncs.calendar unless collection succeeded.

Validation

npx tsx scripts/check-freshness.ts

Freshness should show Google Calendar current only after the script successfully collected events.

The output is incomplete if it advances syncs.calendar without a collection result or if it updates person/project pages without source dates from the calendar files.

Run Contract

This workflow follows Workflow Run Contract: name the sources, write output or no-op proof, promote only durable facts, update state only when the run really completed, refresh generated surfaces when durable pages or skills change, and log user-visible work.


Timeline