Most sleep trackers fail because they treat rest as an isolated event, completely ignoring the complex physiological and pharmacological inputs—specifically neuro-stimulants like caffeine—that dictate sleep architecture. If you want to actually optimize your circadian rhythm, you need more than a generic "hours slept" number; you need a rigid audit of your "Fell Asleep" and "Woke Up" timestamps contrasted against your exact "Caffeine Total" for the day. You can't improve your morning alertness if you don't know that every time you report being "Awake" for 18 hours, you are also logging a specific milligram load of stimulants. This Memento system acts as a rigid, digital sleep lab, forcing you to map every awake period and serving of caffeine into a standardized daily audit.

The Awake and Stimulant Baseline

A productive sleep audit begins with absolute categorical clarity regarding your metabolic state. The template refuses to allow vague reporting by forcing a relational link to a dedicated "Caffeine" library.

The user must log every "Item" consumed, specifying the "Serving Size" and the exact "Caffeine" content. A background JavaScript instantly aggregates these into a "Caffeine Total" for the awake period. By anchoring this pharmacological data with a precise "Location" and the "Woke Up" timestamp, the system establishes the necessary metabolic context for your next sleep cycle, ensuring that your neuro-chemistry is documented with absolute mathematical precision.

High-Resolution Cycle Analysis

The core power of this database is its commitment to granular temporal deconstruction. It transforms subjective feelings of exhaustion into hard numerical metrics.

The system utilize a dedicated "Awake Duration" calculation script—#{fell asleep}-#{woke up}—to monitor the length of your active day. More importantly, it features an "Alarm Accuracy" module that contrasts your "Alarm Date/Time" with the actual moment you "Woke Up". By automatically calculating the "Overslept" delta in minutes, the database identifies patterns of executive dysfunction or physical exhaustion that a simple clock would miss. This granular tracking allows for the identification of the exact "sweet spot" for caffeine intake relative to your scheduled wake time.

Automated Statistical Generation

The culminating phase of the terminal manages the transition from raw daily entries to longitudinal trend analysis. It bridges the gap between a single night's rest and a lifetime of optimized sleep.

The template features a complex "Update Sleep" action script. This high-tier automation sorts your chronological data, purges stale entries, and re-populates a master "Generated Sleep Stats" library. This ensuring that your "Start" and "Stop" times are perfectly synchronized with the "Caffeine Beforehand" load for every sleep block. This transformations your record from a simple journal into a professional-grade neuro-analysis terminal, providing a complete digital twin of your sleep-wake cycles across all mobile and desktop devices.