What is the Home maintenance MVP? #61
Notifications
Due Date
No due date set.
Depends on
Reference: bobby/hapi#61
Reference in new issue
Block a user
Part of #44
Question
What does the home maintenance domain need at MVP: core entities (assets, tasks, recurrence schedules, completion history?), reminder behaviour, the first endpoints/flows, and what is explicitly deferred?
Resolution: Maintenance MVP
The domain is renamed Maintenance (
/v1/maintenance/..., Scopesmaintenance:read|write). It covers the upkeep of the Household's physical property: the home, its land, its equipment, and its vehicles. It's mainly for recurring, infrequent upkeep plus a history of the work done. Terms are inGLOSSARY.md→ Maintenance.Ownership (ADR-0001 / ADR-0005 applied)
maintenance:read|writeHousehold grants exist. No Bot ships in v1.Entities
name(required); optionallocation,make,model,serial(the VIN for a car),installed_on,warranty_until,notes;archived. An optional meter has unitdistance|durationand can be set only while the Asset has no Readings. On replacement or sale, archive the Asset (its Services stay), then re-point or archive its Tasks. Delete only if nothing references it.read_on,valueas an SI integer: m or s), optionalexternal_id,recorded_by. The latest Reading drives usage-based due dates.title, optionalasset_id, note, optionallead_days,archived,snoozed_until.FREQ,INTERVAL,BYMONTH,BYMONTHDAY,BYDAYwith ordinals,BYSETPOS; noCOUNT/UNTIL) with a start date, computed withdateutil.rrule. For exampleFREQ=MONTHLY;BYDAY=1SA.snoozed_untilwithout moving the schedule. Archive stops it coming due. Delete only while it has no Services.done_on(required), optionaltask_id(fulfilling it resets a floating schedule), optionalasset_id,title(required when there's no Task), optionaldone_by(Person; may differ fromrecorded_by), note,cost_cents(USD, no Finance link),meter_value, optionalexternal_id. One-off past work ("fixed the faucet") is a standalone Service. There are no future one-off to-dos, which keeps the domain from drifting into a to-do list.API surface (flat,
owner+recorded_byon every record)assets: CRUD, archive.assets/{id}/readings: list, create,PATCH,DELETE(hard).tasks: CRUD, archive, snooze. Each response carries computeddue_on/due_at_meterandstatus: ok|due|overdue|snoozed.GET /tasks?due_before=…&status=…is the "what's due" view. Nothing is stored, so editing or deleting a Service just changes the next read.services: list (filters: Task, Asset, date range), create,PATCH,DELETE(hard).external_id(unique per Household) returns200with the existing record.Requirement on the Scheduling/ntfy fog
Notify the Household when a Task becomes due or overdue, honouring per-Task
lead_days. The notifier must be triggered by events as well as on a schedule, because a new Reading can make a usage-based Task due. Timing, deduplication, and quiet hours belong to the shared capability.Deferred to Maintenance v2
Attachments (photos, receipts, manuals; these need object storage); linking a Service's cost to a Finance Transaction; an HA Bot posting runtime Readings (e.g. furnace hours driving filter Tasks; the
external_idand meters are ready for it); HA completing Tasks or creating Jobs from them; future one-off to-dos.Out of scope
hAPI's own infrastructure upkeep (server patching etc.), which stays with Renovate, Flux, and the
talosctlrunbook.No ADR: nothing here is hard to reverse.
Reversed by Which cluster hardening ships in v1? (ADR-0015): Maintenance now also covers the Household's digital systems. The map's out-of-scope line for 'hAPI's own infrastructure upkeep as Maintenance Tasks' is removed. A "hAPI cluster" Asset carries the monthly "Upgrade the cluster" Task and ADR-0014's "Rehearse disaster recovery" Task. It still isn't a to-do list: Tasks must recur. Patching itself still runs through Renovate and the
talosctlrunbook; the Task is only the reminder.