Ruview/docs/adr
rUv 66e2fa0835
feat: ADR-063/064 mmWave sensor fusion + multimodal ambient intelligence (#269)
* docs: ADR-063 mmWave sensor fusion with WiFi CSI

60 GHz mmWave radar (Seeed MR60BHA2, HLK-LD2410/LD2450) fusion
with WiFi CSI for dual-confirm fall detection, clinical-grade
vitals, and self-calibrating CSI pipeline.

Covers auto-detection, 6 supported sensors, Kalman fusion,
extended 48-byte vitals packet, RuVector/RuvSense integration
points, and 6-phase implementation plan.

Based on live hardware capture from ESP32-C6 + MR60BHA2 on COM4.

Co-Authored-By: claude-flow <ruv@ruv.net>

* feat(firmware): ADR-063 mmWave sensor fusion — full implementation

Phase 1-2 of ADR-063:

mmwave_sensor.c/h:
- MR60BHA2 UART parser (60 GHz: HR, BR, presence, distance)
- LD2410 UART parser (24 GHz: presence, distance)
- Auto-detection: probes UART for known frame headers at boot
- Mock generator for QEMU testing (synthetic HR 72±2, BR 16±1)
- Capability flag registration per sensor type

edge_processing.c/h:
- 48-byte fused vitals packet (magic 0xC5110004)
- Kalman-style fusion: mmWave 80% + CSI 20% when both available
- Automatic fallback to CSI-only 32-byte packet when no mmWave
- Dual presence flag (Bit3 = mmwave_present)

main.c:
- mmwave_sensor_init() called at boot with auto-detect
- Status logged in startup banner

Fuzz stubs updated for mmwave_sensor API.
Build verified: QEMU mock build passes.

Co-Authored-By: claude-flow <ruv@ruv.net>

* fix(firmware): correct MR60BHA2 + LD2410 UART protocols (ADR-063)

MR60BHA2: SOF=0x01 (not 0x5359), XOR+NOT checksums on header and
data, frame types 0x0A14 (BR), 0x0A15 (HR), 0x0A16 (distance),
0x0F09 (presence). Based on Seeed Arduino library research.

LD2410: 256000 baud (not 115200), 0xAA report head marker,
target state byte at offset 2 (after data_type + head_marker).

Auto-detect: probes MR60 at 115200 first, then LD2410 at 256000.
Sets final baud rate after detection.

Co-Authored-By: claude-flow <ruv@ruv.net>

* feat: ADR-063 Phase 6 server-side mmWave + CSI fusion bridge

Python script reads both serial ports simultaneously:
- COM4 (ESP32-C6 + MR60BHA2): parses ESPHome debug output for HR, BR, presence, distance
- COM7 (ESP32-S3): reads CSI edge processing frames

Kalman-style fusion: mmWave 80% + CSI 20% for vitals, OR gate for presence.

Verified on real hardware: mmWave HR=75bpm, BR=25/min at 52cm range,
CSI frames flowing concurrently. Both sensors live for 30 seconds.

Co-Authored-By: claude-flow <ruv@ruv.net>

* docs: ADR-064 multimodal ambient intelligence roadmap

25+ applications across 4 tiers from practical to exotic:
- Tier 1 (build now): zero-FP fall detection, sleep monitoring,
  occupancy HVAC, baby breathing, bathroom safety
- Tier 2 (research): gait analysis, stress detection, gesture
  control, respiratory screening, multi-room activity
- Tier 3 (frontier): cardiac arrhythmia, RF tomography, sign
  language, cognitive load, swarm sensing
- Tier 4 (exotic): emotion contagion, lucid dreaming, plant
  monitoring, pet behavior

Priority matrix with effort estimates. All P0-P1 items work with
existing hardware (ESP32-S3 + MR60BHA2 + BH1750).

Co-Authored-By: claude-flow <ruv@ruv.net>

* fix(ci): add ESP_ERR_NOT_FOUND to fuzz stubs

mmwave_sensor stub returns ESP_ERR_NOT_FOUND which wasn't
defined in the minimal esp_stubs.h for host-based fuzz testing.

Co-Authored-By: claude-flow <ruv@ruv.net>
2026-03-15 16:10:10 -04:00
..
.issue-177-body.md ruv-neural: publish 11 crates to crates.io — full implementation, no stubs 2026-03-09 10:52:24 -04:00
ADR-001-wifi-mat-disaster-detection.md feat: Add wifi-densepose-mat disaster detection module 2026-01-13 17:24:50 +00:00
ADR-002-ruvector-rvf-integration-strategy.md docs: update README, CHANGELOG, and associated ADRs for MERIDIAN 2026-03-01 12:06:09 -05:00
ADR-003-rvf-cognitive-containers-csi.md feat: Add 12 ADRs for RuVector RVF integration and proof-of-reality 2026-02-28 06:13:04 +00:00
ADR-004-hnsw-vector-search-fingerprinting.md docs: update README, CHANGELOG, and associated ADRs for MERIDIAN 2026-03-01 12:06:09 -05:00
ADR-005-sona-self-learning-pose-estimation.md docs: update README, CHANGELOG, and associated ADRs for MERIDIAN 2026-03-01 12:06:09 -05:00
ADR-006-gnn-enhanced-csi-pattern-recognition.md docs: update README, CHANGELOG, and associated ADRs for MERIDIAN 2026-03-01 12:06:09 -05:00
ADR-007-post-quantum-cryptography-secure-sensing.md feat: Add 12 ADRs for RuVector RVF integration and proof-of-reality 2026-02-28 06:13:04 +00:00
ADR-008-distributed-consensus-multi-ap.md feat: Add 12 ADRs for RuVector RVF integration and proof-of-reality 2026-02-28 06:13:04 +00:00
ADR-009-rvf-wasm-runtime-edge-deployment.md feat: Add 12 ADRs for RuVector RVF integration and proof-of-reality 2026-02-28 06:13:04 +00:00
ADR-010-witness-chains-audit-trail-integrity.md feat: Add 12 ADRs for RuVector RVF integration and proof-of-reality 2026-02-28 06:13:04 +00:00
ADR-011-python-proof-of-reality-mock-elimination.md feat: Add 12 ADRs for RuVector RVF integration and proof-of-reality 2026-02-28 06:13:04 +00:00
ADR-012-esp32-csi-sensor-mesh.md docs(adr-012): Update ESP32 CSI sensor mesh ADR to reflect implementation 2026-02-28 13:48:06 -05:00
ADR-013-feature-level-sensing-commodity-gear.md feat: Sensing-only UI mode with Gaussian splat visualization and Rust migration ADR 2026-02-28 14:37:29 -05:00
ADR-014-sota-signal-processing.md feat: Implement ADR-014 SOTA signal processing (6 algorithms, 83 tests) 2026-02-28 14:34:16 +00:00
ADR-015-public-dataset-training-strategy.md docs: Update ADR-015 with verified dataset specs from research 2026-02-28 15:14:50 +00:00
ADR-016-ruvector-integration.md docs(adr): Mark ADR-016 as Accepted — all 5 integrations complete 2026-02-28 15:46:44 +00:00
ADR-017-ruvector-signal-mat-integration.md fix: Complete ADR-011 mock elimination and fix all test stubs 2026-02-28 16:59:34 +00:00
ADR-018-esp32-dev-implementation.md docs: update ADRs with ENOMEM crash fix proof (Issue #127) 2026-03-03 16:14:54 -05:00
ADR-019-sensing-only-ui-mode.md feat: Sensing-only UI mode with Gaussian splat visualization and Rust migration ADR 2026-02-28 14:37:29 -05:00
ADR-020-rust-ruvector-ai-model-migration.md feat: Sensing-only UI mode with Gaussian splat visualization and Rust migration ADR 2026-02-28 14:37:29 -05:00
ADR-021-vital-sign-detection-rvdna-pipeline.md feat: Training mode, ADR docs, vitals and wifiscan crates 2026-02-28 23:50:20 -05:00
ADR-022-windows-wifi-enhanced-fidelity-ruvector.md feat: Training mode, ADR docs, vitals and wifiscan crates 2026-02-28 23:50:20 -05:00
ADR-023-trained-densepose-model-ruvector-pipeline.md feat: Training mode, ADR docs, vitals and wifiscan crates 2026-02-28 23:50:20 -05:00
ADR-024-contrastive-csi-embedding-model.md feat: ADR-024 Contrastive CSI Embedding Model — all 7 phases (#52) 2026-03-01 01:44:38 -05:00
ADR-025-macos-corewlan-wifi-sensing.md feat: Add macOS CoreWLAN WiFi sensing adapter and user guide 2026-03-01 02:15:44 -05:00
ADR-026-survivor-track-lifecycle.md feat(mat): add ADR-026 + survivor track lifecycle module (WIP) 2026-03-01 07:53:28 +00:00
ADR-027-cross-environment-domain-generalization.md docs: add gap closure mapping for all proposed ADRs (002-011) to ADR-027 2026-03-01 11:51:32 -05:00
ADR-028-esp32-capability-audit.md feat: 100% validated witness bundle with proof hash + generator script 2026-03-01 15:51:38 -05:00
ADR-029-ruvsense-multistatic-sensing-mode.md docs: update ADRs with ENOMEM crash fix proof (Issue #127) 2026-03-03 16:14:54 -05:00
ADR-030-ruvsense-persistent-field-model.md docs: add RuvSense persistent field model, exotic tiers, and appliance categories 2026-03-02 01:59:21 +00:00
ADR-031-ruview-sensing-first-rf-mode.md feat: combine ADR-029/030/031 + DDD domain model into implementation branch 2026-03-01 21:25:14 -05:00
ADR-032-multistatic-mesh-security-hardening.md feat: ADR-032a midstreamer QUIC transport + secure TDM + temporal gesture + attractor drift 2026-03-01 22:22:19 -05:00
ADR-033-crv-signal-line-sensing-integration.md feat: ADR-033 CRV signal-line integration + ruvector-crv 6-stage pipeline 2026-03-01 22:21:59 -05:00
ADR-034-expo-mobile-app.md feat: Implement RSSI service for iOS and Web platforms 2026-03-02 10:30:33 -05:00
ADR-035-live-sensing-ui-accuracy.md docs: update ADR-035 with dark mode, render modes, pose_source fix 2026-03-02 11:08:13 -05:00
ADR-036-rvf-training-pipeline-ui.md fix: WebSocket race condition, data source indicators, auto-start pose detection (#96) 2026-03-02 13:47:49 -05:00
ADR-037-multi-person-pose-detection.md docs: ADR-037 multi-person pose detection from single ESP32 CSI stream 2026-03-02 13:49:38 -05:00
ADR-038-sublinear-goal-oriented-action-planning.md docs: ADR-038 Sublinear Goal-Oriented Action Planning (GOAP) 2026-03-02 14:39:15 -05:00
ADR-039-esp32-edge-intelligence.md docs: update ADRs with ENOMEM crash fix proof (Issue #127) 2026-03-03 16:14:54 -05:00
ADR-040-wasm-programmable-sensing.md feat: complete vendor repos, add edge intelligence and WASM modules 2026-03-02 23:53:25 -05:00
ADR-041-wasm-module-collection.md feat: expand ADR-041 WASM module catalog from 37 to 60 modules 2026-03-03 00:06:39 -05:00
ADR-042-coherent-human-channel-imaging.md feat: add ADR-042 CHCI protocol, 24 new edge modules, README restructure 2026-03-03 11:35:57 -05:00
ADR-043-sensing-server-ui-api-completion.md fix: complete sensing server API, WebSocket connectivity, and mobile tests (#125) 2026-03-03 13:27:03 -05:00
ADR-044-provisioning-tool-enhancements.md docs: ADR-044 provisioning tool enhancements 2026-03-03 15:57:34 -05:00
ADR-045-amoled-display-support.md docs: update README with ADR-045–048, Observatory, adaptive classifier, AMOLED display 2026-03-05 10:20:48 -05:00
ADR-046-android-tv-box-armbian-deployment.md docs: update README with ADR-045–048, Observatory, adaptive classifier, AMOLED display 2026-03-05 10:20:48 -05:00
ADR-047-psychohistory-observatory-visualization.md docs: update README with ADR-045–048, Observatory, adaptive classifier, AMOLED display 2026-03-05 10:20:48 -05:00
ADR-048-adaptive-csi-classifier.md feat: adaptive CSI classifier with signal smoothing pipeline (ADR-048) (#144) 2026-03-05 10:15:18 -05:00
ADR-049-cross-platform-wifi-interface-detection.md feat: cross-platform WiFi collector factory with graceful degradation (ADR-049) 2026-03-06 15:09:32 -05:00
ADR-050-quality-engineering-security-hardening.md fix: security hardening — replace fake HMAC, add path traversal protection, OTA auth (ADR-050) 2026-03-06 13:11:04 -05:00
ADR-052-ddd-bounded-contexts.md feat: complete Tauri desktop frontend with all pages and enhanced design (#198) 2026-03-08 23:31:18 -04:00
ADR-052-tauri-desktop-frontend.md feat: complete Tauri desktop frontend with all pages and enhanced design (#198) 2026-03-08 23:31:18 -04:00
ADR-053-ui-design-system.md feat: complete Tauri desktop frontend with all pages and enhanced design (#198) 2026-03-08 23:31:18 -04:00
ADR-054-desktop-full-implementation.md feat(desktop): RuView Desktop v0.4.0 - Full ADR-054 Implementation (#212) 2026-03-09 21:58:06 -04:00
ADR-055-integrated-sensing-server.md feat(desktop): v0.4.2 - Integrated sensing server with real WebSocket data 2026-03-10 00:08:31 -04:00
ADR-056-ruview-desktop-capabilities.md feat(desktop): v0.4.2 - Integrated sensing server with real WebSocket data 2026-03-10 00:08:31 -04:00
ADR-057-firmware-csi-build-guard.md fix(firmware): enable CSI in sdkconfig and add build guard (ADR-057) 2026-03-12 13:49:20 -04:00
ADR-058-ruvector-wasm-browser-pose-example.md feat(demo): wire all 6 RuVector WASM attention mechanisms into pose fusion 2026-03-12 20:59:57 -04:00
ADR-059-live-esp32-csi-pipeline.md feat(demo): wire all 6 RuVector WASM attention mechanisms into pose fusion 2026-03-12 20:59:57 -04:00
ADR-060-provision-channel-mac-filter.md feat(firmware): --channel and --filter-mac provisioning (ADR-060) 2026-03-13 08:27:08 -04:00
ADR-061-qemu-esp32s3-firmware-testing.md feat: QEMU ESP32-S3 testing platform + swarm configurator (ADR-061/062) (#260) 2026-03-14 13:39:51 -04:00
ADR-062-qemu-swarm-configurator.md feat: QEMU ESP32-S3 testing platform + swarm configurator (ADR-061/062) (#260) 2026-03-14 13:39:51 -04:00
ADR-063-mmwave-sensor-fusion.md feat: ADR-063/064 mmWave sensor fusion + multimodal ambient intelligence (#269) 2026-03-15 16:10:10 -04:00
ADR-064-multimodal-ambient-intelligence.md feat: ADR-063/064 mmWave sensor fusion + multimodal ambient intelligence (#269) 2026-03-15 16:10:10 -04:00
README.md docs: add ADR index with intro on ADRs for AI-assisted development 2026-03-03 16:35:17 -05:00

Architecture Decision Records

This folder contains 44 Architecture Decision Records (ADRs) that document every significant technical choice in the RuView / WiFi-DensePose project.

Why ADRs?

Building a system that turns WiFi signals into human pose estimation involves hundreds of non-obvious decisions: which signal processing algorithms to use, how to bridge ESP32 firmware to a Rust pipeline, whether to run inference on-device or on a server, how to handle multi-person separation with limited subcarriers.

ADRs capture the context, options considered, decision made, and consequences for each of these choices. They serve three purposes:

  1. Institutional memory — Six months from now, anyone (human or AI) can read why we chose IIR bandpass filters over FIR for vital sign extraction, not just see the code.

  2. AI-assisted development — When an AI agent works on this codebase, ADRs give it the constraints and rationale it needs to make changes that align with the existing architecture. Without them, AI-generated code tends to drift — reinventing patterns that already exist, contradicting earlier decisions, or optimizing for the wrong tradeoffs.

  3. Review checkpoints — Each ADR is a reviewable artifact. When a proposed change touches the architecture, the ADR forces the author to articulate tradeoffs before writing code, not after.

ADRs and Domain-Driven Design

The project uses Domain-Driven Design (DDD) to organize code into bounded contexts — each with its own language, types, and responsibilities. ADRs and DDD work together:

  • ADRs define boundaries: ADR-029 (RuvSense) established multistatic sensing as a separate bounded context from single-node CSI. ADR-042 (CHCI) defined a new aggregate root for coherent channel imaging.
  • DDD models define the language: The RuvSense domain model defines terms like "coherence gate", "dwell time", and "TDM slot" that ADRs reference precisely.
  • Together they prevent drift: An AI agent reading ADR-039 knows that edge processing tiers are configured via NVS keys, not compile-time flags — because the ADR says so. The DDD model tells it which aggregate owns that configuration.

How ADRs are structured

Each ADR follows a consistent format:

  • Context — What problem or gap prompted this decision
  • Decision — What we chose to do and how
  • Consequences — What improved, what got harder, and what risks remain
  • References — Related ADRs, papers, and code paths

Statuses: Proposed (under discussion), Accepted (approved and/or implemented), Superseded (replaced by a later ADR).


ADR Index

Hardware and firmware

ADR Title Status
ADR-012 ESP32 CSI Sensor Mesh for Distributed Sensing Accepted (partial)
ADR-018 ESP32 Development Implementation Path Proposed
ADR-028 ESP32 Capability Audit and Witness Record Accepted
ADR-029 RuvSense Multistatic Sensing Mode (TDM, channel hopping) Proposed
ADR-032 Multistatic Mesh Security Hardening Accepted
ADR-039 ESP32-S3 Edge Intelligence Pipeline (on-device vitals) Accepted (hardware-validated)
ADR-040 WASM Programmable Sensing (Tier 3) Accepted
ADR-041 WASM Module Collection (65 edge modules) Accepted (hardware-validated)
ADR-044 Provisioning Tool Enhancements Proposed

Signal processing and sensing

ADR Title Status
ADR-013 Feature-Level Sensing on Commodity Gear Accepted
ADR-014 SOTA Signal Processing Algorithms Accepted
ADR-021 Vital Sign Detection (breathing, heart rate) Partial
ADR-030 Persistent Field Model and Drift Detection Proposed
ADR-033 CRV Signal Line Sensing Integration Proposed
ADR-037 Multi-Person Pose Detection from Single ESP32 Proposed
ADR-042 Coherent Human Channel Imaging (beyond CSI) Proposed

Machine learning and training

ADR Title Status
ADR-005 SONA Self-Learning for Pose Estimation Partial
ADR-006 GNN-Enhanced CSI Pattern Recognition Partial
ADR-015 Public Dataset Strategy (MM-Fi, Wi-Pose) Accepted
ADR-016 RuVector Training Pipeline Integration Accepted
ADR-017 RuVector Signal + MAT Integration Proposed
ADR-020 Migrate AI Inference to Rust (ONNX Runtime) Accepted
ADR-023 Trained DensePose Model with RuVector Pipeline Proposed
ADR-024 Project AETHER: Contrastive CSI Embeddings Required
ADR-027 Project MERIDIAN: Cross-Environment Generalization Proposed

Platform and UI

ADR Title Status
ADR-019 Sensing-Only UI with Gaussian Splats Accepted
ADR-022 Windows WiFi Enhanced Fidelity (multi-BSSID) Partial
ADR-025 macOS CoreWLAN WiFi Sensing Proposed
ADR-031 RuView Sensing-First RF Mode Proposed
ADR-034 Expo React Native Mobile App Accepted
ADR-035 Live Sensing UI Accuracy and Data Transparency Accepted
ADR-036 Training Pipeline UI Integration Proposed
ADR-043 Sensing Server UI API Completion (14 endpoints) Accepted

Architecture and infrastructure

ADR Title Status
ADR-001 WiFi-Mat Disaster Detection Architecture Accepted
ADR-002 RuVector RVF Integration Strategy Superseded
ADR-003 RVF Cognitive Containers for CSI Proposed
ADR-004 HNSW Vector Search for Fingerprinting Partial
ADR-007 Post-Quantum Cryptography for Sensing Proposed
ADR-008 Distributed Consensus for Multi-AP Proposed
ADR-009 RVF WASM Runtime for Edge Deployment Proposed
ADR-010 Witness Chains for Audit Trail Integrity Proposed
ADR-011 Proof-of-Reality and Mock Elimination Proposed
ADR-026 Survivor Track Lifecycle (MAT crate) Accepted
ADR-038 Sublinear GOAP for Roadmap Optimization Proposed

  • DDD Domain Models — Bounded context definitions, aggregate roots, and ubiquitous language
  • User Guide — Setup, API reference, and hardware instructions
  • Build Guide — Building from source