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.
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
xale_, only when the person asks for that kind of help. Never pitch workflows unprompted.find_ workflows xale_withget_ workflow workflowId, and the item it starts from (itemKind,itemId). Follow itsinstructions.- 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.
- After a yes:
xale_withtake_ on_ check_ in workflowId, the item,runsif they chose a number,reminderSet(true only if you really set one) andreminderNote. - Each run:
xale_→read_ check_ ins xale_(begin_ run checkInId,attended,beginKey) → the work →xale_once (report_ run checkInId,runId,outcome,attended). - When it ends, or when the person asks:
xale_withend_ check_ in 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_, nothing_, found_, could_ and skipped. "Nothing new", "found these" and "couldn't reach it" are different outcomes: report which.
Limits
| Limit | Value |
|---|---|
| Runs, daily workflows | 14 unless the person chooses, 60 at most |
| Runs, weekly workflows | 4 unless the person chooses, 12 at most |
| Check-ins running at once | 5 |
| A run stays open | 30 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_lists them.read_ check_ ins - At the last run, say it has ended and ask whether they want it again.
If it fails
| What comes back | What 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.
Tools
- Checked against main
8aef9b15