docs/prd/rvcsi-platform-prd.md
| Field | Value |
|---|---|
| Product name | rvCSI |
| Category | Edge RF sensing runtime and developer platform |
| Status | Proposed (v0 design) |
| Date | 2026-05-12 |
| Owner | ruv |
| Relates to | ADR-095 (rvCSI platform), ADR-012 (ESP32 mesh), ADR-013 (feature-level sensing), ADR-014 (SOTA signal processing), ADR-016 (RuVector integration), ADR-024 (AETHER embeddings), ADR-031 (RuView sensing-first RF mode), ADR-040 (WASM programmable sensing) |
| Domain model | rvCSI Domain Model |
rvCSI is a Rust-first, TypeScript-accessible, hardware-abstracted Channel State Information (CSI) platform for WiFi-based spatial sensing.
The goal is to convert CSI from fragile research data into a durable edge sensing runtime that can feed RuView, RuVector, Cognitum, and agentic systems with validated live radio-field observations.
rvCSI does not try to replace Nexmon on day one. It wraps, validates, normalizes, streams, embeds, and learns from CSI produced by Nexmon, ESP32 CSI, Intel CSI, Atheros CSI, SDR pipelines, and future RF sensor sources.
CSI is treated as a physical-world delta stream.
A room, hallway, vehicle, warehouse, machine bay, or care facility has a radio-field baseline. Human motion, breathing, door movement, equipment vibration, device movement, and environmental change perturb that baseline. rvCSI captures those perturbations, normalizes them into tensors, converts them into events, stores them as temporal memory, and exposes them to agents.
The core invariant:
| Layer | Owns |
|---|---|
| C | Fragile vendor and firmware compatibility |
| Rust | Safety, validation, signal processing, memory discipline, deterministic runtime behavior |
| TypeScript | Developer experience, orchestration, dashboards, SDKs, agent integration |
| RuVector | Memory, similarity, drift, graph relationships, coherence over time |
| Cognitum | Low-power event-driven deployment, local decision loops |
Most CSI projects today are Linux shell scripts, kernel patching, Python notebooks, PCAP dumps, and ad-hoc signal processing. A Rust + TypeScript + napi-rs architecture turns CSI into real-time sensor infrastructure: npm-installable, reproducible, typed, safe-parsed, embeddable, WebSocket-streamable, WASM-portable, MCP-exposed, agent-integrable, and edge/cloud-federated.
The right framing is structural sensing, not "magic X-ray vision". CSI is excellent for detecting change, presence, and learned patterns; it is weak for exact identity, exact pose, legal/security certainty, and highly dynamic RF spaces. rvCSI's product claims stay inside that boundary (see Non-goals, §6).
| User | Need |
|---|---|
| AI engineers building physical-world agents | A stable sensing primitive that emits typed events agents can react to |
| Researchers working with WiFi CSI and RF sensing | Reproducible ingestion, replay, and benchmark datasets |
| Smart-building and elder-care solution builders | Privacy-preserving presence/motion/breathing without cameras |
| Industrial monitoring teams | Camera-free movement/anomaly detection that runs unattended |
| Developers using RuView / RuVector / Cognitum | A drop-in source of RF observations for the broader ruvnet stack |
Problem. WiFi CSI is useful but hard to operationalize. Most CSI pipelines are built from fragile scripts, patched firmware, lab notebooks, inconsistent packet formats, unstable drivers, and device-specific assumptions. This makes CSI difficult to deploy outside research settings. The system needs a production-grade runtime that can ingest CSI from multiple sources, validate packets, normalize formats, stream typed events, support signal processing, and feed vector-based learning systems.
Hypothesis. If rvCSI provides a stable Rust core with TypeScript APIs and hardware adapters, then CSI can become a reusable sensing primitive for camera-free spatial intelligence.
rvCSI shall ingest CSI from multiple sources. Initial source types: recorded binary dump, PCAP file, Nexmon CSI live stream, ESP32 CSI serial/UDP stream, Intel CSI logs (where supported), Atheros CSI logs (where supported). Output: a normalized CsiFrame object.
rvCSI shall validate every frame before exposing it to TypeScript or RuVector:
rvCSI shall normalize all hardware output into a common schema. Required fields: frame_id, session_id, source_id, adapter_kind, timestamp_ns, channel, bandwidth_mhz, rssi_dbm, noise_floor_dbm (when available), antenna_index (when available), tx_chain (when available), rx_chain (when available), subcarrier_count, i_values, q_values, amplitude, phase, validation_status, quality_score, calibration_version.
rvCSI shall provide reusable Rust signal-processing stages: DC offset removal, phase unwrap, amplitude smoothing, Hampel/median outlier filter, short-window variance, baseline subtraction, motion energy, presence score, breathing-band estimator (where supported), confidence scoring.
rvCSI shall convert frame streams into typed events: PresenceStarted, PresenceEnded, MotionDetected, MotionSettled, BaselineChanged, SignalQualityDropped, DeviceDisconnected, BreathingCandidate, AnomalyDetected, CalibrationRequired.
rvCSI shall expose a TypeScript SDK:
import { RvCsi } from "@ruv/rvcsi";
const sensor = await RvCsi.open({
source: "nexmon",
iface: "wlan0",
channel: 6,
bandwidthMHz: 20,
});
sensor.on("frame", (frame) => {
console.log(frame.qualityScore);
});
sensor.on("presence", (event) => {
console.log(event.confidence);
});
await sensor.start();
rvcsi inspect file sample.csi
rvcsi capture start --source nexmon --iface wlan0 --channel 6
rvcsi replay sample.csi --speed 1x
rvcsi stream --format json --port 8787
rvcsi calibrate --room livingroom --duration 60
rvcsi health --source nexmon
rvcsi export ruvector --collection room_rf
rvCSI shall export temporal RF embeddings and event metadata to RuVector. Data stored: frame embeddings, window embeddings, room baseline vectors, event vectors, drift snapshots, sensor-topology graph edges, source health records.
rvCSI shall expose MCP tools for local agents: rvcsi_status, rvcsi_list_sources, rvcsi_start_capture, rvcsi_stop_capture, rvcsi_get_presence, rvcsi_get_recent_events, rvcsi_calibrate_room, rvcsi_export_window, rvcsi_query_ruvector, rvcsi_health_report. Tools default to read actions; capture start/stop, calibration, and export are write-gated.
rvCSI shall support deterministic replay of captured sessions, preserving: original timestamps, frame ordering, validation decisions, event-extraction output, calibration version, runtime configuration.
unsafe blocks shall be documented.CSI Source
↓
Adapter Layer (vendor-specific decode, C shims isolated here)
↓
Rust Validation Pipeline (bounds, finiteness, monotonicity, quarantine)
↓
Normalized CSI Frame (CsiFrame schema — the FFI-safe boundary object)
↓
Signal Processing (DC removal, phase unwrap, smoothing, motion energy …)
↓
Window Aggregator (bounded frame sequences → CsiWindow)
↓
Event Extractor (state machines → CsiEvent with confidence + evidence)
↓
TypeScript SDK · CLI · MCP · RuVector
| # | Component | Role |
|---|---|---|
| 1 | rvcsi-core | Frame types, parser traits, validation, quality scoring, shared abstractions |
| 2 | rvcsi-adapter-* | Rust/C-backed adapters: Nexmon, ESP32, Intel, Atheros, files, replay |
| 3 | rvcsi-dsp | Rust signal-processing primitives |
| 4 | rvcsi-events | Windowing, baseline modeling, event extraction, state machines |
| 5 | rvcsi-node | napi-rs bindings exposing safe APIs to Node.js |
| 6 | rvcsi-sdk | TypeScript SDK |
| 7 | rvcsi-cli | Command-line interface |
| 8 | rvcsi-daemon | Long-running capture and event service |
| 9 | rvcsi-mcp | MCP tool server |
| 10 | rvcsi-ruvector | Exporter and query bridge |
rvcsi/
crates/
rvcsi-core/
rvcsi-adapter-file/
rvcsi-adapter-nexmon/
rvcsi-adapter-esp32/
rvcsi-dsp/
rvcsi-events/
rvcsi-ruvector/
rvcsi-daemon/
rvcsi-node/
rvcsi-mcp/
packages/
sdk/
cli/
dashboard/
native/
nexmon-shim-c/
docs/
adr/
ddd/
prd/
benchmarks/
testdata/
captures/
malformed/
replay/
Within the RuView monorepo, rvCSI would be introduced as a new bounded context (see the domain model) and a small set of
v2/crates/rvcsi-*crates, reusing existingwifi-densepose-signalDSP andwifi-densepose-ruvectorintegration where they overlap rather than duplicating them.
The authoritative definitions live in the rvCSI domain model. Summary:
CsiFrame — one validated CSI observation at a timestamp (the FFI-safe object). Carries I/Q, amplitude, phase, RSSI, channel/bandwidth, optional antenna/chain metadata, validation status, quality score, calibration version.CsiWindow — a bounded sequence of frames from one source/session, with mean amplitude, phase variance, motion energy, presence score, quality score.CsiEvent — a semantic interpretation of one or more windows, with kind, confidence, evidence window IDs, and metadata.AdapterProfile — capability descriptor for a source: chip, firmware/driver versions, supported channels/bandwidths, expected subcarrier counts, capture/injection/monitor-mode support.StabilityScore is trustworthy, and how is that surfaced in the SDK/CLI?v2/crates/rvcsi-* inside RuView or as a separate rvcsi/ repo? This PRD assumes monorepo crates that reuse wifi-densepose-signal and wifi-densepose-ruvector.