# 🔨 Self-Describing Requirements (SDRs)
**Self-Describing Requirements (SDRs)** are semantic, compact, and machine-checkable specifications defined using the Universal Hex (UHX) framework.
SDRs express what a system component **must be**, **must do**, or **must relate to**, using:
- **UHT**: Required or prohibited traits
- **UHR**: Required or constrained relationships
- **UHS** (optional): Expected behavior over time
- **Quantitative parameters** (optional): Bounded performance or condition values
---
## 🤖 SDR Components
### 1. **Basic Structure**
```yaml
id: SDR-001
name: "Autonomous Sensor"
description: "Sensor that outputs data and operates without human input."
must_have_traits: [10, 15] # Emits output, Autonomous
must_not_have_traits: [13] # No human interaction
```
### 2. **Required Relationships**
```yaml
required_links:
- relation: "Feeds →"
uhr: "C1"
target_must_have: [11] # Must feed into logic processor
```
### 3. **Optional Parameters**
```yaml
parameters:
output_frequency_hz:
min: 50
max: 200
latency_ms:
max: 20
```
### 4. **Behavioral Constraints (UHS)**
```yaml
states:
- name: "Idle"
uht: "42F00000"
- name: "Active"
uht: "42FA3FDF"
transitions:
- from: "Idle"
to: "Active"
trigger: "Input detected"
via: "C1"
delta_must_add: [10]
```
---
## 🌐 External References
SDRs can link to ICDs, drawings, or legacy requirements:
```yaml
references:
- type: "ICD"
uri: "docs/ICD-SENSOR-V2.pdf"
description: "Electrical pinout and protocol timing"
- type: "Drawing"
uri: "cad/SensorPort-A.dwg"
```
---
## 🔍 Example: SDR Library Entry
```yaml
id: SDR-004
name: "Behavior-Guiding Controller"
description: "Processes logic and guides system behavior."
must_have_traits: [11, 12, 21]
required_links:
- relation: "Feeds →"
uhr: "C1"
target_must_have: [10] # Must emit output
parameters:
control_latency_ms:
max: 25
```
---
## ⚖️ Benefits of SDRs
- **Semantic:** Use clear trait logic instead of ambiguous prose
- **Machine-checkable:** Auto-validate against system graphs
- **Reusable:** Modular, copyable across components or domains
- **Linkable:** Attach to ICDs, models, or test scripts
---
## ✅ Summary
|Aspect|Encoded As|
|---|---|
|Identity Spec|`must_have_traits`|
|Interface Spec|`required_links` + UHR codes|
|Behavioral Spec|`states`, `transitions`, `delta`|
|Quantitative Bound|`parameters` with min/max|
|External Linkage|`references` to documents|
**SDRs** turn requirements into **semantic contracts** that are explainable, portable, and verifiable.
---