Skip to main content

Module due

Module due 

Source
Expand description

The due-brief (first-author-path plan 08): a schema declares its deadline axis (memstead_schema::DueAxis), the engine renders “what is due next” as one deterministic markdown brief.

Deterministic given (store, today): no model call, no scoring — filter, sort, render. The only environmental input is the current date, taken once per invocation and passed in (injectable in tests). Ordering: overdue first, then ascending by date, ties broken by entity id. The renderer lives here so every consuming surface serves byte-identical content (the projection-brief precedent); there is deliberately no MCP tool — briefs are the CLI family.

Read-only mounts participate: a due date in an installed compliance mem is precisely the multi-stakeholder case, and a brief is a read surface. Third-party entries carry their origin label and render as quoted data — a stranger’s mem states a deadline, it does not instruct.

Structs§

DueBrief
The due brief as data: what the markdown renders, for callers that consume the reading rather than the prose.
DueLead
DueRow
One row of the due brief: an open entity whose declared due date falls inside the window. The engine names the reading (overdue with the days past, or due within the window with the days until) and never judges it: no severity, no recommendation.

Enums§

DueWindow
A parsed relative window: <N>d days, <N>m calendar months, <N>y calendar years.

Constants§

DEFAULT_DUE_WINDOW
The default window applied when --within is omitted — stated in the CLI help and the changelog rather than unbounded.

Functions§

civil_from_days_pub
Public epoch-days → civil-date conversion for callers that derive “today” from SystemTime. Same algorithm the window math uses.
parse_due_window
Parse a relative window (90d, 6m, 2y). The error names the accepted forms — the caller wraps it in its surface’s typed envelope.
pinned_days_since_epoch
Civil-date helpers over ISO YYYY-MM-DD strings — exact calendar math without a date dependency (Howard Hinnant’s days_from_civil algorithm). Entities store dates as ISO strings, which order lexically; arithmetic converts through day numbers. YYYY-MM-DD to whole days since the Unix epoch, for the MEMSTEAD_TODAY clock pin the health axes honour; None for a string that is not a civil date.