Files
nanobot-runtime/skills/remind/SKILL.md
2026-06-10 08:50:16 +02:00

92 lines
3.2 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
name: remind
description: >
Create, list, edit, enable, disable, and remove recurring or one-time reminders.
Triggers on: "/remind", "remind me", "set a reminder".
---
# /remind
Reminders are stored in SQLite (`db/reminders.sqlite`) and delivered by the nanobot
user crontab, directly to Telegram, outside the agent. Reply to the user in their own language.
## Commands
### Create
```
/remind <text> every day at 9:00
/remind <text> every weekday at 9:30
/remind <text> at 2026-06-15T18:00
/remind <text> randomly 2 times between 08:00 and 20:00
/remind <text> once daily at random time between 8:00 and 21:00
```
Parse natural language, then call `remind_edit.py add` with flags:
- `--text "..."`
- `--cron "0 9 * * *"` (repeatable)
- `--at "2026-06-15T18:00:00"` (repeatable)
- `--random-times-per-day N --random-window HH:MM-HH:MM [--random-days DOW] [--random-from YYYY-MM-DD] [--random-until YYYY-MM-DD]`
### List
```
/remind list
```
Call `remind_edit.py list`. Returns a readable text listing — each reminder is prefixed with
`#<id>` (that id is what `--id` selects), followed by indented schedule lines:
```
#3 drink water [enabled]
cron: 0 9 * * *
#7 take meds [disabled]
at: 2026-06-15T18:00:00
random: 2× daily 09:0021:00 (1-5) from 2026-06-01
```
An empty store prints `(no active reminders)`.
### Edit
```
/remind edit <keyword> --text "new text"
/remind edit <keyword> --replace-schedules --cron "0 10 * * *"
```
Call `remind_edit.py edit --keyword <keyword>`. Keyword matches case-insensitively against reminder text. `--replace-schedules` requires at least one new `--cron`/`--at`/`--random-*`.
### Enable / Disable
```
/remind disable <keyword>
/remind enable <keyword>
```
### Remove
```
/remind remove <keyword>
```
Soft delete. Hard delete only via direct DB access.
### Selecting by keyword or id
`edit`, `remove`, `enable`, `disable` accept either `--keyword` (case-insensitive substring) or `--id` (exact). A keyword matching two or more reminders returns `ambiguous` with each id — retry with `--id <n>` to disambiguate duplicate texts. Run `list` to see ids.
### Delivered (history)
```
/remind delivered
/remind delivered --since 2026-06-01
```
Answers "what reminders arrived today / since when?". Calls `remind_edit.py delivered`, which reads the `reminder_fires` table (delivered rows only, Prague local time). The agent never sees deliveries happen, so this is the only window into them.
## Scripts
| Action | Command |
|--------|---------|
| list | `uv run skills/remind/scripts/remind_edit.py list` |
| add | `uv run skills/remind/scripts/remind_edit.py add --text "..." ...` |
| edit | `uv run skills/remind/scripts/remind_edit.py edit --keyword <kw> ...` |
| remove | `uv run skills/remind/scripts/remind_edit.py remove --keyword <kw>` |
| enable | `uv run skills/remind/scripts/remind_edit.py enable --keyword <kw>` |
| disable | `uv run skills/remind/scripts/remind_edit.py disable --keyword <kw>` |
| delivered | `uv run skills/remind/scripts/remind_edit.py delivered [--since YYYY-MM-DD]` |
Sender runs every minute from crontab: `uv run skills/remind/scripts/remind_send.py`
## Environment
- `REMIND_DB` — override SQLite path (used in tests).
- Scripts run via `uv run` (PEP 723 headers declare their dependencies).