Sample patient · delayed phase · four agent regimen
The outer ring is one night of this patient's own sleep architecture, staged from a wearable. The violet needle is where their internal clock currently sits. The dashed needle is the wall clock. The angle between the two is the phase offset, and it is the reason a printed schedule and this schedule disagree.
The inner arcs are dose windows for the regimen, placed against biological anchors rather than clock times. Green is the calculated window. Red is a period the agent should not be given in. The white tick inside each arc is the target moment.
Terra streams sleep staging, heart rate variability, and movement from Oura, Apple Watch, Garmin, and Whoop. The differences between those four are reconciled before anything is stored, because Apple reports SDNN where the others report rMSSD and Whoop samples inside slow wave sleep rather than across the night.
Fourteen days of normalized data produce a circadian profile: sleep midpoint and its variability, cosinor fits for heart rate variability and skin temperature, and the standard nonparametric actigraphy measures. Nothing at this stage claims a phase position; it describes what was observed.
The profile is scored into a signed phase offset with a confidence attached. A positive offset means a delayed clock. This is the step that carries the proprietary coefficients, and a public checkout of this repository runs a transparent reference estimator instead.
Each agent in the regimen has timing windows expressed relative to biological anchors rather than clock times. Resolving those anchors against the patient's own phase produces dated windows, which is the adaptive schedule the app and the reminder queue consume.