# 🌟 UHX Walkthrough: From UHT to SDR This page takes you on a step-by-step journey through the Universal Hex (UHX) modeling pipeline using a real-world example: a **Smart Thermostat**. We’ll trace how to: 1. Define its **semantic identity** (UHT) 2. Connect it to other system components (**UHR**) 3. Model its state behavior (**UHS**) 4. Derive a structured, self-describing requirement (**SDR**) --- ## 🔍 1. UHT — Identity of the Smart Thermostat The thermostat is a [[40 00 00 00 - Man-made or Synthetic|man-made]], [[04 00 00 00 - Perceptible|perceptible]], logic-driven, behavior-guiding interface that interacts with humans and operates autonomously. ### UHT Traits ```yaml - 2: Man-made - 6: Perceptible - 10: Emits output - 11: Processes logic - 12: Transforms internal state - 13: Interacts with humans directly - 15: Autonomous in function - 21: Behavior-guiding ``` ### UHT Code ```text UHT: 42 FA 00 A0 ``` --- ## 🔗 2. UHR — Semantic Relationships The thermostat: - Receives temperature input from a sensor - Controls an HVAC system - Is governed by building policies ### UHR Links ```yaml - from: Temperature Sensor to: Thermostat uhr: "C1" # Feeds → - from: Thermostat to: HVAC System uhr: "C1" # Feeds → - from: Building Policy to: Thermostat uhr: "A5" # Constrains → ``` Each link encodes not just direction, but **meaningful causality or control**. --- ## ⏱️ 3. UHS — Behavior Over Time ### States: ```yaml - Idle: 42F20000 # Passive, structural - Monitoring: 42FA0000 # Emits output, logic active - Adjusting: 42FA00A0 # + Behavior-guiding, human interaction ``` ### Transitions: ```yaml - Idle → Monitoring trigger: System power-on via: C1 - Monitoring → Adjusting trigger: Temperature outside target via: C1 - Adjusting → Monitoring trigger: Desired temperature reached via: C1 ``` You now have an explainable **semantic state machine**. --- ## 🔨 4. SDR — Self-Describing Requirement ```yaml id: SDR-THERM-01 name: "Autonomous Smart Thermostat" description: "A human-facing logic controller that regulates temperature autonomously." must_have_traits: - 2 # Man-made - 6 # Perceptible - 10 # Emits output - 11 # Processes logic - 13 # Interacts with humans - 15 # Autonomous - 21 # Behavior-guiding required_links: - relation: "Feeds →" uhr: "C1" target_must_have: [10] # HVAC must emit output - relation: "Constrained by" uhr: "A5" source_must_have: [28] # Must be governed states: - Idle - Monitoring - Adjusting delta_expected: - from: Monitoring to: Adjusting add: [21] # Must gain behavior-guiding trait parameters: control_latency_s: max: 3 temperature_range_C: min: 18 max: 26 ``` --- ## 🚀 Summary |Step|UHX Layer|Output| |---|---|---| |Identity|UHT|Traits + 32-bit code| |Structure|UHR|Causal, symbolic, governed links| |Behavior|UHS|States + transitions with logic| |Spec|SDR|Testable, portable, explainable spec| This pipeline models **what the system is**, **how it behaves**, and **what it must satisfy** — in a unified, semantic format. Would you like similar walkthroughs for systems like a smart door lock, drone, or EV battery controller?