How it's wired Tepna
← the -Dex suite · node wiring

📈HRVDex

HRVDex senses one signal at the summary level — a daily HRV reading — and tracks it longitudinally. It ingests pre-computed morning measurements and layers trend, readiness and cardiovascular-research views on top.

Signal sensed
Daily HRV summarypre-computed, one reading/day
Device
Welltory1-minute morning reading app
Input format
Welltory CSVdaily summary rows
Produces
Trends + readinesslongitudinal HRV picture
01 — WHAT IT'S FOR

A single-signal receptor

Read the suite as a reflex arc: receptors → relay → integration → insight. HRVDex is an afferent receptor — it does exactly one transduction well and reports inward. It never reaches into another node; cross-signal work happens only through the Ganglior export, consumed by the Integrator.

🧠
One signal per node. HRVDex senses daily hrv summary and nothing else. If you’re tempted to sense a second signal, that’s a second node — fusion is the Integrator’s job, never a receptor’s.
02 — THE WIRING

The file stack

HRVDex is built from external *.js files referenced by HRVDex.src.html and bundled to a standalone HRVDex.html. Dependencies point downhill only — UI → DSP → Core — and each file owns exactly one job. Edit the .js + .src.html, never the bundle; re-bundle after changes.

DSP
hrvdex-dsp.jsDSP
Shared state, Welltory CSV parsing, the derived-metric engine (computeDerived), stats helpers, row filtering and the cardiovascular research math (HTN pattern / CAMQ / MAP). No DOM.
hrvdex-profile.jsDSP
User profile in localStorage, data-driven inference, population & age norms and the ANS-age card.
Core
kernel-constants.jsCore · shared
The frozen physiology kernel — one source of truth for every cross-fleet threshold, plus a content-derived hash stamped into each export so two bundles built on different rulebooks can’t silently “agree” when fused.
ganglior-provenance.jsCore · shared
Loaded first — installs the read-hook that makes every export attributable to the exact code + inputs that produced it (the buildHash provenance stamp). 100% local.
metric-registry.jsCore · shared
The shared half of the evidence system: the badge SHAPE, depth tiering and the injected badge CSS. The per-node registry below supplies the DATA, so a Validated dot looks identical in every node.
hrvdex-registry.jsCore
Per-metric DATA map. Core HRV measures grade validated; the many composites/projections grade lower. HRVDex has no cross helper.
Render · UI
hrvdex-render.jsRender · UI
All Chart.js + DOM rendering: window/tab/mode controls, readiness hero, KPIs, alerts, every chart, distributions, the metrics table and the cardiovascular panel.
hrvdex-chartbadges.jsRender · UI
Overlays the shared evidence badges onto chart series so a validated measure and a composite never look alike on a graph.
App · glue
hrvdex-app.jsApp · glue
Loaded last: drag/drop + paste ingest, CSV/JSON exports, clear-all, progress, theme and startup profile load.
🕒
The Clock Contract. HRVDex stamps every record as floating wall-clock tMs (local civil time encoded as if UTC) and reads it back with getUTC* — so the recording reads identically in any viewer’s timezone, and two devices recording the same minute land on the same tMs. parseTimestamp is duplicated locally by design.
03 — HOW IT'S ACHIEVED

From file drop to Ganglior event

The pipeline is the same shape across the suite: ingest → parse on the canonical clock → compute in DSP → grade & render in UI → emit onto the bus. No number is computed in the render layer; it asks DSP for the value and the registry for how to show it.

Load the Welltory CSV

Drag, drop or paste the export. Each row is one day’s pre-computed HRV reading.

hrvdex-app.js → processFile()

Parse + window

Rows are stamped to floating tMs and filtered to the chosen window (e.g. 7 days). Display uses getUTC* so the same data reads identically anywhere.

hrvdex-dsp.js → row filtering

Derive metrics

computeDerived() builds the readiness composite, age-norm framing and cardiovascular research views (HTN pattern, CAMQ, MAP) from the daily series.

computeDerived()

Render trends

Charts, KPIs and the readiness hero are drawn; chartbadges overlays the evidence grade on each series.

hrvdex-render.js + chartbadges.js

Export

CSV/JSON export of the windowed series for downstream analysis or archival.

hrvdex-app.js → exporters
04 — HOW MUCH TO TRUST IT

The evidence ladder

Every metric HRVDex surfaces carries an evidence grade — a non-hue badge whose fill is the confidence ladder: solid bullseye for a raw reading, down to a dashed ring for a friendly estimate. A measurement and a projection must never look alike. Grades live in hrvdex-registry.js, the one source of truth.

Measured (none) — HRVDex ingests pre-computed summaries, not raw samples
Validated rMSSD · SDNN · LF/HF · HF n.u. · SD1 / SD2 · Baevsky SI · Toichi CVI / CSI
Emerging Readiness composite · age-norm framing
Experimental HTN pattern · CAMQ · MAP — cardiovascular research views
Heuristic ANS-age projection
05 — LIMITATIONS & CONSIDERATIONS

What it can and can't say

Honesty is architectural: a guess is never dressed as a measurement, a missing value stays null rather than fabricated, and confidence is kept separate from signal quality. The node-specific caveats:

Trusts the upstream devicelimitation

HRVDex ingests numbers Welltory already computed — it cannot re-derive HRV from raw beats. Its honesty depends on the source’s measurement quality. For raw RR, use PulseDex.

Snapshots, not overnightnote

A 1-minute morning reading is a daily snapshot, not a continuous night. Trends are the value here, not any single day.

Cardiovascular views are researchcaution

HTN-pattern, CAMQ and MAP are experimental — exploratory, not screening or diagnostic tools.

No cross helper by designby design

HRVDex is the one node without a -cross.js: its input is already a daily series, so longitudinal logic lives inline rather than in the shared multi-night helper.

06 — HOW TO USE IT

For the curious, and for the next coder

📂

Open the instrument

HRVDex is one self-contained file. Open HRVDex.html in any browser — online, offline, or from file://. Nothing installs, nothing phones home.

Open HRVDex →
📥

Drop your recording

Drag a Welltory export (welltory csv) onto the upload zone. It’s read in-browser and turned into metrics on your device alone.

🎚️

Read at your depth

Start in Core for the headline readiness and a plain-language line. Step up to Advanced for full tables and charts, or Research for composites and the full dump. Each metric’s evidence dot tells you how far to trust it.

🔀

Export onto Ganglior

Export a ganglior.node-export JSON to feed the Integrator, or to upgrade a peer node’s read. Events carry a wall-clock t; consumers reconstruct absolute time from the recording start.

HRVDex reference guide →
🛠️

If you’re changing it

Edit the hrvdex-*.js files or HRVDex.src.htmlnever the bundled HRVDex.html — then re-bundle. Run Dex-Test-Suite.html until all-green, and verify-provenance.html after re-bundling.