# 22 — Activity log ## Goal Generic activity feed every module writes to and the dashboard reads from. ## Depends on - 10, 11, 12 ## Scope - Schema: `activity_log` (`id`, `household_id`, `entity_type`, `entity_id`, `actor_id`, `action`, `payload` jsonb, `created_at`). Index on `(household_id, created_at desc)`. - `_core` exports `logActivity({ entityType, entityId, action, payload })`. Reads `householdId` and `actorId` from current session. - Calendar/lists/notes modules call it on create/update/delete. - Dashboard widget `core.activity` shows last 20 entries with human-readable rendering. Each entity type's manifest provides a `renderActivity(entry)` function. ## Out of scope - Per-user activity filters. - Retention / pruning (no growth concerns at two-user scale). ## Acceptance criteria - [ ] Every CRUD across the three core modules writes a row. - [ ] Widget renders entries via the registry — no `if (entityType === ...)` branches in the widget itself.