Wave-D reconcile report at .planning/phase-D-reconcile-report.md; deferred items seeded to .planning/v1419-backlog.md; strategic v1.5 items appended to .planning/v15-backlog.md from the v1.4.18 Product-Lead review. STATE.md marks Wave D done. Prettier sweep also touched the planning markdown table widths; no content change. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
3.3 KiB
v1.4.16 ecosystem-research dispatch — summary
Date: 2026-05-09
Agent: ecosystem-research + STATE-expand
Full document: .planning/v1416-research-ai-recommendations.md
What ran
-
STATE.md elevation — replaced the single
B5 — AI hallucination- hardening v2bucket with five first-class items (B5a medical- reference grounding, B5b multi-provider redundancy, B5c per-rec explainability, B5d confidence score, B5e user-feedback loop) and added a newB8 — Extended comparison views (Vormonat / Vorjahr). ROADMAP.md mirror-updated. -
Research document — benchmarked Apple Health Trends, Withings Health Mate, and Oura Ring against four features (B5c, B5d, B5e, B8). Mapped each onto existing HealthLog architecture (
src/lib/ai/*,src/lib/insights/bucket-series.ts, the chart wrappers, theaiInsightResponseSchema). Drafted file-level implementation sketches incl. one new Prisma model (RecommendationFeedback), zod additions toaiRecommendationSchema, a deterministiccomputeConfidence()helper, acompareBaselinechart prop, and the cross-feature integration risks. 4 open questions for Marc parked at the bottom.
Top 3 findings
-
Oura's Contributors model is the gold reference for B5c. Each score expands into per-component cards with band + value + trend. HealthLog's strict schema already carries
metricSource; the incremental cost of addingrationale: { dataWindow, comparedTo, deviation }is one zod block + one prompt-version bump. The UI slot lives inside an already-planned<RecommendationCard>and the data source (bucketed daily/monthly history per metric) is already produced bybucket-series.ts. -
Confidence must be server-computed, not LLM-emitted. Calibrated probabilities are not a small-LLM strength, and the v1.4.17 feedback ratchet needs a deterministic input to fit. Proposed
computeConfidence({ n, recencyDays, deviationStdRatio })is a pure function thegenerateInsight()wrapper applies post-parse, discarding any number the model picked. Mitigates the "hallucinated high confidence on low data" failure mode that v1.4.15 C1 already defended against for citations. -
Comparison views (B8) intersect Insights — narrate, don't contradict. When the user toggles Vormonat/Vorjahr, the prompt's snapshot must include a
comparisonblock AND the per-rec rationale should prefer the matching window. The UI's<RationaleCard>shows a "(matches active comparison)" badge when aligned, with a one-tap to re-align when not — keeps the user's mental model coherent across chart, tile, and insight surface.
Phase order recommended
B5a → B5b → B5c (defines rec-card layout) → B5d (plugs into the layout) → B5e (Prisma migration; provider attribution available) → B8 (chart-and-prompt-side, lands last so the prompt is fully shaped).
If the v1.4.16 budget tightens: B5a + B5c + B5d is the smallest cohesive slice that delivers user-visible explainability + confidence.
Commits this dispatch
chore(planning): elevate B5c/d/e + B8 for v1.4.16— STATE+ROADMAP.docs(planning): v1.4.16 ecosystem research for explainability + confidence + feedback + comparison views— research doc + this summary.
Both pushed to origin/main.