Planning and the schedule
How the auto-planner places tasks, what at risk means, and how to plan a week or move work.
Use this when the user asks about their week, whether something fits, or to plan or move work.
How the planner works
- It places open tasks into free time inside the user's work hours, around their calendar events, up to three months ahead.
- Order: priority first (
urgent,high,medium,low), then due date. A hard deadline goes ahead of softer work at the same priority. - A task's length is its
estimated_minutes; without one it is planned at 30 minutes. - Large tasks are split into blocks of at least 30 minutes (a task can set a shorter minimum in the app), spread over the days before the due date.
- A task blocked by another (
blocked_byon create_task/update_task) is planned after its blocker. A project's phases run in order: a task in a later phase is planned after the open tasks of the earlier ones. Nothing is placed before a task's start date. - Only
todoandin_progresstasks are planned. For work waiting on other tasks, setblocked_byand keep ittodo; statusblockedtakes a task off the schedule entirely. - At risk: the plan puts a task's last block after its due date, finds no slot before it, or the task is overdue.
list_at_risk_tasksreturns these from the current plan without changing it. - Pinned: a block with
isAutoScheduled: falsewas placed or moved by the user. Replans plan around it and never move it. - Replan: runs in the background, hourly on the server and while the app is open. If a calendar cannot be read, the replan is skipped rather than planning over unseen meetings.
replan_scheduleruns it now, like the Plan week button, and returns what it placed, what does not fit and what is at risk.
Read the week
list_scheduled_blockswithstarts_afterandstarts_before.list_calendar_eventsfor the same range (it is slow: a week at most). Readwarnings: a calendar that failed adds no events, so never call a slot free while warnings is non-empty.list_work_hoursto tell an evening from free working time.list_at_risk_tasksfor what will miss its due date.
Change the plan
Change tasks with update_task; the next replan applies it.
- Sooner: raise
priority, or set an earlierdue_date. - Make room: lower other work's priority, cut an estimate, or move a due date out.
- At risk: offer the fixes Resolve offers in the app: extend the due date, make it urgent, or cut the estimate. Let the user pick.
- Not before a time: set a timed
start_date. - An exact slot:
move_scheduled_blockmoves a block and pins it, like a drag in the app;create_scheduled_blockadds a pinned block for a task. When the target time is taken by auto-placed blocks, move it anyway and then callreplan_schedule: unpinned blocks make room. Only ask when the slot is taken by a meeting or another pinned block. - "Plan my week": call
replan_schedule, then report the week from its result.
Pitfalls
- After
update_task, blocks show the old plan until a replan: callreplan_scheduleor say the plan updates within the hour.