Status: done (2026-11-19) Priority: 3 Size: S Arch: debt Phase: implement Design ref: design.md, Loans, obligations and cases (Obligations; Remedies); Households and other bodies (The alderman’s keep); backlog/VB-404.md Goal: Three of slice 5’s mechanisms take work, not grain: a debt’s remedy (VB-315), the alderman’s keep and a patron’s due. Build the days once, as an obligation kind and a basis of eligibility, so that each source only says how many days and why. Acceptance criteria:
days in sim/obligations (VB-310): debtor and creditor households, days left, the year’s end it runs to, and its source (debt, keep, patron); live ones in the due-queue (rule 4), ended ones out of the live index (rule 1).DAYS.notice (3) ahead, at most one adult of an owing household a day; a household below its floor, or with its own harvest task waiting that day, sends nobody and the day stays owed. A verb in src/sim/commands.js (callDays), so the player as holder calls by it and is told why not.owed (the table of bases), for 8 work hours; he walks there and home and carries his meal (nothing teleports). A compiled per-pawn index (pawn to the creditor he works for today) keeps a task’s check one lookup (rule 6).@state line, with invariants), written where work hours are booked: the class (VB-318) reads them. Hired hands (VB-319) book to the same pair.tests/tiny.js): a day called is worked and booked to the field as others’ hours; a household with its own harvest waiting is not called away; an uncalled keep day lapses and a debt’s does not; the worker is on the creditor’s field at noon and home at night.medium-ref, at most one a pair of households a source (some hundreds); calls on the creditor’s planning day; one index lookup a task check. daysCalled as a work counter; measured at small-y40. (Unmeasured: no source creates days yet, so no run holds any; VB-315, VB-463 or VB-464 measure at their first use.)
Notes:debtor: it is this basis, with the source debt), VB-463 (the keep) and VB-464 (a patron’s due).callDays is registered by the new module sim/days (sim/commands imports no domain); the planner calls it on a household’s ‘day’ review, one call an obligation, for today + 3. A call needs open work of at least 8 hours for each call pending. Days are owed and called within one village (crossing villages needs a journey).st.daysToday (a cache), built from the queue st.daysCalls at a day’s first step; hours worked book fractions of a day to the obligation (8 hours a day, then the hand is sent home); a call not worked stays owed. The floor and the harvest are checked at the call and again on the day.owed only (no own tasks, nor help): eligible answers that first. The meal is the household’s own pot, as before: nothing is carried to the creditor (a close call: no separate meal for the hand).hoursOwn/hoursOther is the class’s (VB-318), and hired hands (VB-319) call book; VB-315 says what follows a debt’s overdue days.