Synced from the repo — do not edit here
Canonical source: docs/claude/one-source-defaults-ledger.md. This page is generated by docs/scripts/sync-handbook.mjs. Edit the source file in the repo; changes appear here on the next build.
One-source — every default decision (for review)
All defaults set during the one-source epic. VERIFIED = checked against real data / the stored
unitfield. ASSUMED = my judgment, please confirm/correct. Flag anything wrong.
Units — wearables (digest fields)
| Field | Canonical unit | Status |
|---|---|---|
| weight | kg | VERIFIED (hs unit=kg) |
| waterMl | mL | VERIFIED (hs unit=mL) |
| sleep/exercise/mindfulness/fasting/zone*Minutes | minutes | VERIFIED (hs unit=minute) — encoders wanting seconds ×60 |
| activeCalories / dietaryCalories / calories | kcal | VERIFIED |
| vo2Max | ml/kg/min | VERIFIED (hs unit) |
| rhr / maxHr | bpm · hrvSdnn/Rmssd | ms · spo2 |
| glucose (digest) | mg/dL | ASSUMED — confirm (vs mmol/L) |
| gripStrengthLeft / gripStrengthRight | lbs, two separate metrics | CONFIRMED by George |
| deadHang | seconds | CONFIRMED by George |
| bodyFatPct | % | CONFIRMED by George |
Units — labs
| Decision | Status |
|---|---|
| Canonical target = US conventional (mg/dL, mIU/L, ng/mL…) via lab_unit_conversions.json | ASSUMED — confirm this is the platform's target (esp. glucose/lipids mg/dL not mmol/L) |
| Core-panel range VALUES (46 labs) = Mayo-aligned adult ranges | ASSUMED — needs-clinical-signoff before patient-facing |
| Verdict is BINARY: in_range / out_of_range (no "optimal" tier) | ASSUMED — optimal tier is a benchmark-layer add-on (#272) |
| Verdict population default = adult; sex-specific where clinical | ASSUMED |
| Unknown-sex + sex-specific range → conservative union (widest) so never false-flag | ASSUMED (safe-by-design) |
| Unit can't be confirmed to match range → verdict unknown (never a wrong flag) | design safety |
Timezone / date
| Decision | Status |
|---|---|
localDate = YYYY-MM-DD, device-local day (from summary start + tzOffset) — the day-key everywhere | existing convention |
Lab collectedAt = noon UTC of the report date (avoids ±1-day shift for UTC-offset users) | existing (CLAUDE.md rule) — but SEE RISK below |
| Wearable HR sample timestamps parsed as UTC (they end in Z) | VERIFIED (fixed a bug where naive parse zeroed zones) |
"Latest value" = most recent localDate (date-deterministic, never highest-ever / first-seen) | design (the #394 read bug) |
Resolution recency tiebreak = updatedAt→ingestedAt→start epoch | design |
| ⚠️ RISK: if the 3 lab surfaces derive the day-key differently (manual=local date, Junction=UTC), the SAME lab can land on different graph days → split trend | FLAGGED — must standardize (below) |
Resolution / source precedence (wearables)
| Decision | Status |
|---|---|
| Strength-default per metric (Oura→rhr/hrv/sleep · Apple Watch→steps/zones/maxHr · manual→weight/BP · CGM→glucose) | DECIDED (you approved) |
| Recency breaks ties only WITHIN a tier | DECIDED |
| Vendor-collapse: Oura-via-Terra + Oura-via-AppleHealth → one; prefer Terra-direct | DECIDED |
Legacy devicePreferences NOT trusted (uncurated); strength-default is authority | DECIDED |
Gender stored as string "m"/"f" (George = "m") → male/female | VERIFIED for George; enum 1=male/2=female kept as defensive fallback (ASSUMED, may not exist) |
| maxHR = 220 − age, clamp(100,210), fallback 185 | VERIFIED (matches Dart) |
| HR zones stay app-owned (not server-computed) | DECIDED (2026-07-16) |
The ones I most want you to confirm
- Lab canonical unit = US conventional (mg/dL etc.) — right target for the platform?
- Gender enum 1=male / 2=female — correct mapping? (wrong → sex-specific ranges flip)
- Core-panel range values — need a clinician signoff before any patient sees a verdict.
- Binary verdict (no optimal tier) for now — acceptable, or is "optimal" needed at write?