Add iAUC (incremental area under the curve) computation to the health dashboard. iAUC measures total glucose exposure above baseline over a meal window, which is a better proxy for insulin demand than peak glucose (spike). A sharp spike that resolves quickly has a small iAUC; a moderate rise that lingers has a large one.
Ben's CGM data shows fruit causes high peak spikes but he had his lowest insulin (20) during a fruititarian + high-running period. The hypothesis is that fruit spikes are sharp but brief (low iAUC = low insulin demand), especially with GLUT4 uptime from running. The dashboard currently only shows peak-based spike metrics, which may misrepresent the metabolic impact.
1. Add an iAUC computation function. The algorithm:
(glucose - baseline) * interval_minutes2. Add MealIauc or extend MealSpikeRecord with an msrIauc :: Double field (mg/dL·min).
3. Add computeMealIaucRankings that ranks meals/categories by average iAUC (similar to computeFoodRankings but using iAUC instead of peak spike).
4. Add iAUC to DailyCgmStats — total daily iAUC across all meals would be a useful aggregate metric.
1. Add an iAUC column to the existing food rankings table and meal rankings table. 2. Optionally add a new section or integrate into the existing food rankings to show the iAUC perspective — meals ranked by iAUC vs by peak spike, so the user can see which foods are truly high-burden vs just high-peak.
No changes needed for now — scoring still uses spike thresholds. iAUC is informational.
CSV in /var/health/cgm.csv:
Date/Time,Blood Glucose (mg/dL),Meal Time,Sources
2026-02-19 22:21:00,122,,
5-minute intervals. Meals are in /var/health/meals.jsonl.
computeMealIaucRankings exists and computes iAUC per meal from CGM+meal data
Implemented iAUC end-to-end. Added msrIauc to MealSpikeRecord, dailyCgmStatsWithMeals + dcsIaucTotal, frAvgIauc in FoodRanking, computeMealIaucRankings, and wired iAUC columns into /health food + meal rankings tables. Added iAUC unit tests in Omni/Health/Analyze.hs and verified with: CODEROOT=/home/ben/omni/intent TERM=xterm-256color bild --test Omni/Health/Test.hs and bild Omni/Health/Web.hs. Commit: bf7596d4