About this work

Purpose
Capture a structured sleep profile and produce a graded report — the PSQI Global Score, its sleep-quality category, a component breakdown, and flagged issues — to support sleep clinic review.
Specification
Spec-driven: the living domain spec defines the data model, the PSQI grading engine, and the flag rules. The same engine grades both the form and the dashboard.
Documentation
Uses the Pittsburgh Sleep Quality Index (PSQI): seven components each scored 0–3 for a 0–21 global score.