From 1750a0d921d193824e6fb61f9629aaa75e655bff Mon Sep 17 00:00:00 2001 From: Yanxin Lu Date: Sun, 22 Mar 2026 14:39:59 -0700 Subject: [PATCH] calendar: add migration guide from reminder_check.py to VTODO --- skills/calendar/MIGRATION.md | 76 ++++++++++++++++++++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 skills/calendar/MIGRATION.md diff --git a/skills/calendar/MIGRATION.md b/skills/calendar/MIGRATION.md new file mode 100644 index 0000000..cefbcd9 --- /dev/null +++ b/skills/calendar/MIGRATION.md @@ -0,0 +1,76 @@ +# Migration: reminder_check.py → calendar todo + +## What's changing + +| Before | After | +|--------|-------| +| `scripts/reminder_check.py` | `skills/calendar/scripts/calendar.sh todo` | +| `reminders/active.md` (markdown table) | `calendars/tasks/*.ics` (RFC 5545 VTODO) | +| Local only, no sync | CalDAV sync to all devices via vdirsyncer | +| No native reminders | VALARM triggers on phone/desktop | +| Cron reads markdown | Cron reads .ics files | + +## Prerequisites + +- [ ] `calendar.sh todo add --dry-run` works (tested in current session) +- [ ] `~/.openclaw/workspace/calendars/tasks/` directory exists (auto-created by `todo add`) +- [ ] vdirsyncer has a `cal/tasks` pair configured +- [ ] Live tests 8-12 from `TESTING.md` pass on the Linux machine + +## Step 1: Migrate pending reminders + +Two items are pending in `reminders/active.md`: + +```bash +SKILL_DIR=~/.openclaw/workspace/skills/calendar + +$SKILL_DIR/scripts/calendar.sh todo add \ + --summary "跟进iui保险报销" \ + --due "2026-03-25" \ + --priority medium \ + --description "确认iui(人工授精)费用保险报销进度,避免过期" + +$SKILL_DIR/scripts/calendar.sh todo add \ + --summary "打电话给progyny问iui报销" \ + --due "2026-04-04" \ + --priority medium \ + --description "询问iui报销相关事宜" +``` + +Verify: +```bash +$SKILL_DIR/scripts/calendar.sh todo list +``` + +## Step 2: Set up cron + +Ask the agent to set up a daily cron job via `openclaw cron`: + +> Set up a daily cron at 8:00 AM PST that runs: +> `~/.openclaw/workspace/skills/calendar/scripts/calendar.sh todo check` +> and emails the output to mail@luyx.org with subject "📋 今日待办清单" + +The old `reminder_check.py` cron in `crontab.txt` should be removed by the agent at the same time. + +## Step 3: Verify + +- [ ] `todo list` shows both migrated items +- [ ] `vdirsyncer sync` completes without errors +- [ ] Todos appear on phone/CalDAV client +- [ ] Next morning's cron email arrives with the new format + +## Step 4: Clean up (optional, after confidence period) + +After a few days of successful operation: + +- `reminders/active.md` — can be archived or deleted +- `scripts/reminder_check.py` — can be removed +- `reminders/` directory — can be removed +- Old cron entry in `crontab.txt` — should already be gone + +## Rollback + +If something goes wrong, the old system is still intact: +- `reminders/active.md` is unchanged +- `scripts/reminder_check.py` still works +- Re-add the old cron entry to restore the previous behavior