From 9372684a4136bcae811e9c0c4c0728929eb31d44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Bombeck?= Date: Sat, 9 May 2026 23:19:52 +0200 Subject: [PATCH] chore(planning): elevate B5c/d/e + B8 for v1.4.16 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Split former bullet-under-B5 items into first-class Wave-B work items: B5a — Medical-reference grounding (AHA / ESC / ESH / WHO) B5b — Multi-provider redundancy B5c — Per-recommendation explainability (WHY / WINDOW / CITATIONS) B5d — Confidence score per recommendation (0-100) B5e — User-feedback loop (thumbs up/down → prompt tuning) Add new B8 — Extended comparison views (Vormonat / Vorjahr) across charts, tiles, and the insights surface. ROADMAP.md updated to mirror the expanded bucket. Co-Authored-By: Claude Opus 4.7 (1M context) --- .planning/ROADMAP.md | 9 +++++++-- .planning/STATE.md | 45 ++++++++++++++++++++++++++++++++++++++------ 2 files changed, 46 insertions(+), 8 deletions(-) diff --git a/.planning/ROADMAP.md b/.planning/ROADMAP.md index 49ffe0472..818a14b31 100644 --- a/.planning/ROADMAP.md +++ b/.planning/ROADMAP.md @@ -18,9 +18,14 @@ Latest tag at start: v1.4.15 (live in prod, image digest `sha256:ace7d441f47b… | B2 | AI provider settings UX cleanup — single pulldown-driven form, no top/bottom split | pending | | B3 | Admin System-Status host-load chart — CPU/memory/disk-io graph last 2h | pending | | B4 | Admin logs visibility deepening — filterable audit log + structured wide-event tail | pending | -| B5 | AI hallucination-hardening v2 — medical-reference grounding + multi-provider + explainability | pending | +| B5a | Medical-reference grounding — AHA / ESC / ESH / WHO target ranges as system context + UI citations | pending | +| B5b | Multi-provider redundancy — try-each-on-hard-failure, configurable fallback order | pending | +| B5c | Per-recommendation explainability — WHY / WINDOW / CITATIONS card with mini-chart | pending | +| B5d | Confidence score per recommendation — 0-100 from sufficiency / recency / signal strength | pending | +| B5e | User-feedback loop — thumbs up/down persisted to RecommendationFeedback, fed into prompt tuning | pending | | B6 | Settings naming-audit — stringency, consistency, no double naming | pending | | B7 | Settings → Export menu (Arztbrief consolidated) — new `/settings/export` route | pending | +| B8 | Extended comparison views — Vormonat / Vorjahr overlay across charts + tiles + insights | pending | | C | Catch-up — 8 deferred HIGH + 5 mobile MED + Coolify image-digest trigger + docker-publish hang | pending | | D | Multi-agent QA + Product-Lead — code-review, security, design (Apple-Health lens), senior, simplify, product-lead | pending | | E | Release v1.4.16 — bump, CHANGELOG, tag, GHCR, deploy, /api/version=1.4.16, smoke, docs+landing sync | pending | @@ -30,7 +35,7 @@ or budget short of polish — write status doc, do not auto-rollback. Time-runs-short minimum to ship v1.4.16: Wave A (any subset) + Wave D -- Phase E. Wave B (B1-B7) and Wave C catch-up are deferrable to v1.4.17 +- Phase E. Wave B (B1-B8) and Wave C catch-up are deferrable to v1.4.17 if context budget tightens. Phase 0 spec for this marathon: orchestrator user message in this diff --git a/.planning/STATE.md b/.planning/STATE.md index ee08105a9..085e71110 100644 --- a/.planning/STATE.md +++ b/.planning/STATE.md @@ -98,13 +98,38 @@ Last update: 2026-05-09T23:12:52+02:00 - [ ] App-log preview: tail of structured wide-events for last 1h, filterable by trace_id - Detailed report: `.planning/phase-B4-report.md` -### B5 — AI hallucination-hardening v2 (medical grounding + multi-provider) +### B5a — Medical-reference grounding -- [ ] Medical-reference grounding: AHA/ESH/WHO target-range citations in system context -- [ ] Multi-provider redundancy: try-each-on-hard-failure -- [ ] Per-recommendation explainability + confidence score -- [ ] User-feedback loop ("was this helpful?" → prompt-tuning over time) -- Detailed report: `.planning/phase-B5-report.md` +- [ ] AHA / ESC / ESH / WHO target ranges as system context +- [ ] Citations link to source guideline in UI +- Detailed report: `.planning/phase-B5a-report.md` + +### B5b — Multi-provider redundancy + +- [ ] try-each-on-hard-failure across configured providers +- [ ] Fallback ordering configurable per user +- Detailed report: `.planning/phase-B5b-report.md` + +### B5c — Per-Recommendation Explainability + +- [ ] Each rec carries: WHY (what user-data triggered it), WINDOW (which time range was analyzed), CITATIONS (which medical guideline + which user metric) +- [ ] UI: expand-arrow on each rec → reveals the explainability card with mini-chart of the data window +- [ ] Schema enforces presence (extends v1.4.15 C1's strict schema) +- Detailed report: `.planning/phase-B5c-report.md` + +### B5d — Confidence Score per Recommendation + +- [ ] Each rec carries a 0-100 confidence score derived from: data sufficiency (n samples), recency, signal strength +- [ ] UI: visual confidence indicator (e.g., color-coded ring or 5-bar meter) per rec +- [ ] Below-threshold recs are tagged "Low confidence — based on limited data" rather than hidden +- Detailed report: `.planning/phase-B5d-report.md` + +### B5e — User-Feedback Loop + +- [ ] "War das hilfreich?" thumbs-up/down on each rec, persisted as RecommendationFeedback (new table) +- [ ] Aggregated feedback feeds into prompt-tuning: low-helpful patterns get a system-prompt addendum next generation +- [ ] Privacy: feedback is per-user; no cross-user training (offline only, opt-in for any aggregation) +- Detailed report: `.planning/phase-B5e-report.md` ### B6 — Settings naming-audit @@ -120,6 +145,14 @@ Last update: 2026-05-09T23:12:52+02:00 - [ ] Rename current doctor-report entry-point to live under /settings/export - Detailed report: `.planning/phase-B7-report.md` +### B8 — Extended Comparison Views (Vormonat / Vorjahr) + +- [ ] Each chart + tile + insight gets toggleable comparison overlay: "vs. last month" / "vs. last year" +- [ ] Visual treatment: dimmed historical line beneath current; delta callout (Δ +5%, etc.) +- [ ] Insights surface narrates the comparison ("Your average BP improved by 4 mmHg vs. last month") +- [ ] Mobile-friendly comparison toggle (not a fragile hover-only interaction) +- Detailed report: `.planning/phase-B8-report.md` + ## Wave C — Catch-up (deferred from v1.4.15) - [ ] 8 deferred HIGH-Findings from v1.4.15 Wave-D (see `v1416-backlog.md`)