mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-08 20:42:43 +00:00
Operator-side kill matrix for every LLM-driven surface. Master flag `assistantEnabled` plus five sub-flags carve the seven surfaces: Coach + chat, Daily Briefing + advisor, per-metric status cards, correlation narration, Health-Score delta explainer. Defaults are `true` so existing installs upgrade without losing affordances. New `src/lib/feature-flags/` module exposes `getAssistantFlags()`, `resolveAssistantFlags()` and the `AssistantDisabledError` typed error route handlers throw to surface the 403 + `errorCode: "assistant.disabled.<surface>"` envelope. The resolver forces every sub-flag false when the master is off so callers never have to compose `master && sub`. Locks per `.planning/RESPONSE-TO-IOS-TEAM-2026-05-16.md` §3 R5: the same matrix gates server-routed AND iOS on-device surfaces. Migration 0065 is additive only; `app_settings` gains six boolean columns, all default `true`, idempotent under `IF NOT EXISTS`.