Skip to content

docs(spec): design routines - #15

Closed
httpsphl wants to merge 1 commit into
mainfrom
docs/routines
Closed

httpsphl wants to merge 1 commit into
mainfrom
docs/routines

Conversation

@httpsphl

Copy link
Copy Markdown
Owner

Design only, no code: spec section 20. Implementation starts after the reboot test closes M5, as milestones R1 (daemon) and R2 (app).

The idea

A routine makes a bot work on its own at set times. When the time comes, the daemon writes the owner's request as a message into the bot's conversation, and the courier delivers it like any other message. That keeps it durable and retried, in the same session and memory as the bot's normal chat. Nothing runs in parallel with the bot.

Main decisions

  • Schedules: stored as structured JSON: weekly (days + time), interval (5 min to 1 week) or cron (advanced). Each routine has its own time zone, the system's by default. The app phrases schedules in plain words and keeps cron behind "Advanced".
  • Spacing: a routine can run at most every 5 minutes, cron included, so it can't quietly burn through the Claude plan.
  • A run ends when the turn its message started ends (the result after the replay of its uuid). It is done, failed or skipped.
  • Overlap: by default, a new time is skipped while the previous run is still open. Optionally, one run can wait in line.
  • Paused bot or crew: the run is skipped.
  • Missed times (PC off or asleep): by default the routine runs once when the PC is back, not once per missed time. The PC is not woken up to run a routine.
  • What the bot receives: the owner's request in an English envelope ([botloft] routine "…" · scheduled …), so it knows the request is automatic and nobody is watching live.
  • Out of scope for now: bots creating their own routines, signals between bots, Windows notifications, waking the PC.

Routines are the first item after the MVP: a bot works on its own on a
weekly schedule, an interval or a cron expression, in the routine's own
time zone. Each run is a message the owner wrote, delivered into the
bot's one conversation through the courier like any other, so it is
durable and needs no second session. A run ends with the turn its
message started; overlapping runs are skipped (or one waits), paused bots
skip, and missed times run once when the computer is back.

The schedule is stored as structured JSON so the app can show and edit
it in plain words; cron stays behind "Advanced". Milestones R1 (daemon)
and R2 (app) start once M5 is closed.
@httpsphl

Copy link
Copy Markdown
Owner Author

Closing without merge: the routines design will ship together with the R1 implementation, in one complete PR.

@httpsphl httpsphl closed this Sep 29, 2026
@httpsphl
httpsphl deleted the docs/routines branch September 29, 2026 01:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant