2 Commits

Author SHA1 Message Date
chahinebrini
90f63eb21e feat(diga): Regulatory-Doku-Agent + Technische-Akte-Start (Zweckbestimmung)
DiGA/MDR-Vorbereitung als eigener Workstream:
- Neuer Agent 'diga-regulatory' (Dr. Marlene Brandt) — owns docs/specs/diga/,
  draftet die Technische Akte (Zweckbestimmung, MDR-Klassifizierung, ISO 13485/14971,
  IEC 62304, klinische Bewertung, Labeling, PMS, QMS-Templates). Ergänzt hans-mueller
  (Datenschutz) + rebreak-strategist (Business); validiert nicht selbst (Profi-Grenze).
- docs/specs/diga/00-dossier-plan.md — Plan + Arbeitsteilung (Claude draftet, Gründer
  entscheidet, Profi validiert) + 10-Dokumente-Landkarte mit Status.
- docs/specs/diga/01-zweckbestimmung-v0.md — Keystone-Entwurf (Intended Use, Indikation
  F63.0, 3-Ebenen-Wirkmechanismus, Abgrenzung kein Therapieersatz, Klassifizierungs-Hinweis).

Naechste Aufgaben fuer den Agent (aus dem Code, ohne Gruender-Input): 03 Requirements,
04 Risiko-Erstliste, 05 SOUP + Architektur.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-07 06:39:13 +02:00
chahinebrini
d31e45e2a8 feat(streak): protection-coverage metric (DiGA core) replacing broken streak
The old streak was non-functional: streaks.current_days was always 0 (never
computed/incremented), and the profile page read me.streak (0) + account
created_at as the "since" date — showing "0 days protected since <signup>"
for everyone. This is the DiGA key metric, so it had to be rebuilt.

New model: optimistic protection-coverage based on actual VPN/MDM protection
state, never resets to 0.
- backend: append-only protection_state_log + migration; POST /api/protection/event
  (ingestion, deduped) + GET /api/protection/coverage (read-time compute, no cron);
  server-side cooldown_disable event on cooldown resolve. Generous >6h-off/day rule.
- frontend: report protection on/off transitions (initial + flips, deduped) from
  useProtectionState; rewrote profile StreakSection → half-donut (protected vs
  unprotected) + progress bar (current streak → personal record) + empty state.
- coverage starts fresh from deploy (no historical backfill — clean data for DiGA).
- spec: docs/specs/protection-coverage-streak.md (shared contract).
- old streaks/streak_events/profiles.streak left intact (coach/scores consumers).

Also adds go-to-market one-pagers under docs/marketing/.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-06 10:54:55 +02:00