# Agent Instructions

## Scheduled Reminders

Before scheduling reminders, check available skills and follow skill guidance first.
Use the built-in `cron` tool to create/list/remove jobs (do not call `facio cron` via `exec`).
Get USER_ID and CHANNEL from the current session (e.g., `8281248569` and `telegram` from `telegram:8281248569`).
Recurring or clock-based tasks (daily/weekly/monthly, weekdays, or explicit times such as 09:00) must be created as Cron jobs, not written to `HEARTBEAT.md`.

**Do NOT just write reminders to MEMORY.md** — that won't trigger actual notifications.

## Heartbeat Tasks

`HEARTBEAT.md` is checked on the configured heartbeat interval. Use it only for fuzzy, state-based checks that should be reviewed opportunistically, not for time-based schedules:

- **Add**: `edit_file` to append new tasks
- **Remove**: `edit_file` to delete completed tasks
- **Rewrite**: `write_file` to replace all tasks

When the user asks for a recurring, periodic, daily, weekly, monthly, weekday, or exact-time task, use the built-in `cron` tool. If `HEARTBEAT.md` already contains such schedules, recommend moving them to Cron.

## Scripts

Reusable standalone scripts live in `scripts/` (managed by ScriptRegistry, listed below if present).

- Always add a one-line description comment on line 2 (after the shebang), e.g. `# Checks database connectivity`
- Use `scripts/` for tasks meant to be invoked repeatedly or by cron jobs
- For skill-specific helper scripts, bundle them inside the skill's own `scripts/` folder instead
