RYVENZA · Developer handoff · v1.3

One sleep time.
Every connection.

This single-file control memo defines how profile, dated shifts, the phone clock, recent sleep, caffeine, hydration, meals, sport and history connect to one achievable sleep time and the actions that help the user reach it.

00 · Read this first

What can be built from this file

ONE INDEX.HTML
FUNCTIONALLY COMPLETE

Logic and behaviour

Central sleep calculation, all input relationships, dated shift constraints, adjustments, scores, recommendations, API, storage and acceptance cases.

PRODUCTION INPUTS REQUIRED

Commercial release

Final Figma assets, store accounts, AWS/Firebase/Stripe credentials, production legal text and privacy policy remain separate deliverables.

OUTSIDE CURRENT MVP

Excluded by design

No fitness-for-work score, no employer access to individual logs, no active wearable ingestion and no medical interpretation.

Source governance

Official sources support recommendations and general principles. Exact points, thresholds, score caps, hydration buffers, 12/14/16-hour recovery budgets and 3/4/6-hour sensitivity mapping are versioned RYVENZA product parameters. They must never be presented as values published by SUVA.

01 · Global view

The complete influence network

PRIMARY OUTPUT08:30ACHIEVABLE SLEEP TIME

Planning creates the feasible window. Recent sleep and the profile select a preference inside that window. Every later action changes consequences and advice, but does not silently invent a new physiological fact.

02 · Interactive control

Change any input and inspect every consequence

This tester is a deterministic reference implementation. It uses full dated local timestamps in Europe/Zurich and recalculates immediately.

Profile and recent sleep

Dated work schedule

Daily logs

CENTRAL ACHIEVABLE SLEEP TIME
08:30
AS SOON AS POSSIBLE
LATEST TARGET WAKE16:157 h 45 available

What this changes

Priority recommendations

    Sleep preparation timeline

    Calculation trace — click “Why?”

    03 · Rules

    Official advice versus product calculation

    Important example

    Do not write “50 mg of caffeine removes 22 minutes of sleep according to SUVA.” No verified SUVA source provides that linear conversion. The engine may estimate remaining caffeine with a simplified five-hour half-life, but it must label this as a RYVENZA estimate and show the assumption.

    IDConditionEngine resultOwner

    04 · Implementation contract A–Z

    No missing layer and no hidden decision

    API contract

    MethodRouteCommandReturns

    Deterministic recalculation pipeline

    StepActionRequired behaviour

    05 · Every adaptation

    When reality breaks the ideal plan

    IDSituationRequired adaptationMust never do

    06 · Parameter register

    Every number has an owner and a version

    All values below are RYVENZA product parameters, even when an official recommendation inspired the surrounding advice. Store them in a versioned parameter set; never hide them in Flutter widgets or API controllers.

    IDValueOwnerEvidence boundary

    07 · Acceptance

    Developer test matrix

    TestInput situationExpected result

    08 · Copy/paste blocks

    Shared contracts for mobile, API and tests

    09 · Verified sources

    Each official claim stays checkable

    Final product boundary

    RYVENZA provides contextual wellbeing recommendations. It must not provide medical advice, an emergency response, a legal schedule approval, a fitness-for-work decision or a fitness-to-drive decision. Persistent fatigue, sleep disorders or safety concerns should be directed to an appropriate professional or employer process.