Skip to main content

Module plan

Module plan 

Source
Expand description

The plan: what can start, the one next step, and when each task could happen. It is computed from the tasks each time, never stored, so it always starts from today (docs/tasks.md).

  • Order: a task waits for others (tasks). Kahn’s algorithm orders them (Kahn 1962, “Topological sorting of large networks”). Tasks that wait for each other in a loop are found (Tarjan 1972) and said, calmly: one of them has to go first.
  • The next step: among the tasks free to start, the one already started; else the one whose latest start comes first (its date, minus the chain of work behind it); then the more important, as you ranked it (PRIORITY); then the one that frees the most others; then the smaller (docs/design.md, “Tasks”).
  • When: each task goes into the first days with room, in that order, after what it waits for, never before today. A date that passed moves a task forward; it never makes it “late”. Room is your hours, each kind for its own tasks: work hours for work, admin hours for your admin (areas::in_view lends what has no hours of its own); leisure has no hours, so what is only for it takes no room and waits for none; less the times kept for meals, naps and sleep (needs: set first, the work planned around them), the events in them and a pause after each step. Sioul can run your work too, so the plan may fill your hours: no second budget to keep.
  • Waiting on others: a task done starts the clock of what waits for it with a gap (“the answer comes within two weeks”): the next one waits until then, and says so.
  • Optional: a task tagged joy (only if you want to, never a duty) or someday (parked: when you say so), or a step of one, is never proposed as the next step and takes no room in the plan. Nor does what gives back (energy “rest”: a walk, music): it is offered after a heavy step.
  • Heavy: a day takes so many heavy tasks (two when clear, one in haze, none in fog, today’s weather saying for today); the next one goes to a day that can take it, and in fog a heavy task is not the next step unless nothing else is ready (energy accounting: fewer demands, Raymaker et al. 2020). Heavy is the highest cost when any is rated, else the word (capacity::level_of); the days before and after a heavy event take one fewer.
  • What a day holds (capacity, docs/capacity.md): with budgets, each day is filled to 85 % of each cost’s budget and of the total, after its events; lighter around a heavy event, today by its weather; kept even if you asked. Each task is laid at its corrected length (your estimate × how long tasks like it take you), each day keeps free time for steps running long (the 85th percentile of the total of the steps laid there, fitted as the day fills, a third of its room at most) and half an hour for a gain slot; the next step keeps part of today all the same. A task with margins is never cut: laid whole on one day, or given a day of its own. A step given a time today by hand stays today.

Structs§

Cushion
The time budget until a date asked (Shovel’s “cushion”): what must be done by then, against the room the days have until then. Shown only near a date: further away it is noise (docs/tasks.md).
Graph 🔒
The ties between tasks, by index: who waits for whom, and who is a step of whom.
Layout 🔒
Where the tasks went: their first and last days, the minutes of their first, what each day holds (task index, minutes), and what it has left.
Plan
The whole plan.
Planned
One task in the plan.
Rank 🔒
How the plan ranks two tasks: smaller comes first.
Room
A day’s hours for tasks: minutes, by the kinds of hours open then (several where windows overlap: admin hours within working hours).
Settings
How much room the days have for tasks: your hours, each for what it is for.

Enums§

Column
Where a task stands, as the board shows it.

Constants§

PAUSE
A pause after each step and around each event, in minutes: switching costs (monotropism).
SHORTEST
The least a step takes in a day, in minutes: a short one gets air around it.
WHOLE
A step up to an hour is done in one go, never cut over two days or around a break.

Functions§

add_days 🔒
days later (earlier when negative); a span too long for any date (a gap or an estimate from someone else’s file) moves nothing.
cushion
The time budget until date: the tasks asked by then (optional ones aside), with what they wait for and their steps, against each day’s room until then.
day_number 🔒
A day as a number, to rank by.
event_spans
The time events hold: their margins (getting there and back, getting ready: demands), then a pause before and after; timed ones that hold time (Occurrence::holds_time: not cancelled, not transparent, not declined by you); shorter than a quarter of an hour, a quarter of an hour.
gap_days 🔒
Whole days of a gap: “P14D” waits fourteen days; less than a day, none.
is_optional
Whether a task’s own tags make it optional (words.tasks.optional, the words in use: “joy”, “someday”), or it gives back rather than takes (its word, or its costs rated light with a gain of 5 or more). A date asked makes it a duty all the same: planned, as a light step.
kahn 🔒
Kahn’s algorithm over the open tasks, the smallest key first among those free.
less
stretches outside every busy span.
loops 🔒
Strongly connected components with more than one task (Tarjan 1972): the loops.
plan
The plan for tasks, from today. spent gives the minutes already spent on each task (by UID); set_aside the tasks put off for today (“Not now”).
shaped 🔒
The part of a step worth starting in free minutes: the whole rest; for a long step, a quarter of an hour at least, leaving at least as much for later; a step done in one go (whole), all or nothing; one that needs a day of its own (alone), all of an untouched day.
stretches
The stretches of date’s hours, as (start, end, kinds open), Unix seconds, in order: where windows of several kinds overlap, one stretch open to each; with anything, every window is open to every kind.

Type Aliases§

Load 🔒
Rating × hours, per cost and in total (capacity::Load).