Recipes Recurring work and the person away

Run a recurring check-in Lifecycle

A check-in from start to end: get the workflow, take it on, then for each run begin it, do the work and report it once. Every check-in is finite, and runs happen when your reminder fires or the person next chats with you.

View as Markdown

When

The person asks for help that recurs: a daily question about a Habit, an end-of-day handoff, a weekly reset, a weekend look-ahead, a source to check each week.

Calls

  1. xale_find_workflows, only when the person asks for that kind of help. Never pitch workflows unprompted.
  2. xale_get_workflow with workflowId, and the item it starts from (itemKind, itemId). Follow its instructions.
  3. Agree the time and the number of runs with the person. Then set a reminder or scheduled task in your own app, if it can.
  4. After a yes: xale_take_on_check_in with workflowId, the item, runs if they chose a number, reminderSet (true only if you really set one) and reminderNote.
  5. Each run: xale_read_check_ins → xale_begin_run (checkInId, attended, beginKey) → the work → xale_report_run once (checkInId, runId, outcome, attended).
  6. When it ends, or when the person asks: xale_end_check_in with checkInId. Remove your reminder too.
json
[
  { "tool": "xale_take_on_check_in", "arguments": { "workflowId": "weekly-reset", "runs": 6, "reminderSet": true, "reminderNote": "Sundays at 6pm" } },
  { "tool": "xale_report_run", "arguments": { "checkInId": "ci2Wn5Lq", "runId": "r9Fd3kTs", "outcome": "answered", "attended": true } }
]

outcome is one of answered, no_answer, nothing_new, found_items, could_not_access and skipped. "Nothing new", "found these" and "couldn't reach it" are different outcomes: report which.

Limits

LimitValue
Runs, daily workflows14 unless the person chooses, 60 at most
Runs, weekly workflows4 unless the person chooses, 12 at most
Check-ins running at once5
A run stays open30 minutes

Say

  • When it starts: pass on tellThePerson. It says whether your reminder will bring it, or their next chat with you.
  • Mention missed runs when xale_read_check_ins lists them.
  • At the last run, say it has ended and ask whether they want it again.

If it fails

What comes backWhat to do
“The person already has 5 recurring workflows running, the most Xale allows so reminders don't pile up. Ask which one to end first (xale_read_check_ins, xale_end_check_in).”Ask which to end first.
“That run's 30-minute window ended, so it wasn't counted. What you saved during it stays saved. Start a new run with xale_begin_run if any are left, and report that one.”Begin a new run and report that one.
“Its last run is already under way, or none are left. Finish that run first (xale_report_run).”Report the open run first.
A once-only workflow (brain-dump, scoping-brief, …)There's nothing to take on: do it now.

Finite, honest about reminders, and each run reported once.

  • Checked against main 8aef9b15

Was this helpful?

run-a-recurring-check-in-lifecycle.md · main@c1725f34