mirror of
https://github.com/ruvnet/RuView
synced 2026-08-08 20:11:43 +00:00
feat(plugins): RuView Claude Code + Codex marketplace plugin
Add `plugins/ruview` — an end-to-end toolkit for working with RuView (WiFi-DensePose) from Claude Code, mirrored as Codex prompts. Marketplace: `plugins/.claude-plugin/marketplace.json` (one plugin, `ruview`). Skills (9): ruview-quickstart, ruview-hardware-setup, ruview-configure, ruview-applications, ruview-model-training, ruview-advanced-sensing, ruview-cli-api, ruview-mmwave, ruview-verify — shell-first (cargo / python / idf.py / docker / node), no claude-flow MCP dependency. Commands (7): /ruview-start, /ruview-flash, /ruview-provision, /ruview-app, /ruview-train, /ruview-advanced, /ruview-verify. Agents (3): ruview-onboarding-guide, ruview-config-engineer, ruview-training-engineer. Codex mirror: codex/AGENTS.md + codex/README.md + codex/prompts/*.md (full command parity, enforced by scripts/smoke.sh). Docs: docs/adrs/0001-ruview-plugin-contract.md (Proposed). Verification: scripts/smoke.sh (13 structural checks). Provisioning docs reflect the full `provision.py` flag set (TDM mesh, edge tiers, vitals, hop channels, Cognitum Seed, swarm intervals) and the issue #391 NVS-namespace-replace gotcha. Verified: `claude plugin validate` (plugin + marketplace), loads via `claude --plugin-dir`, smoke 13/13, and confirmed against an attached ESP32-S3 on COM8 running the RuView CSI firmware (live adaptive_ctrl + csi_collector serial output). Co-Authored-By: claude-flow <ruv@ruv.net>
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
---
|
||||
description: Use advanced RuView capabilities — multistatic sensing, cross-viewpoint fusion, RF tomography, persistent field model, intention signals, adversarial detection, mesh security.
|
||||
argument-hint: "[multistatic|cross-viewpoint|tomography|field-model|intention|adversarial|security]"
|
||||
---
|
||||
|
||||
# /ruview-advanced
|
||||
|
||||
Drive RuView's research-grade / multi-node features.
|
||||
|
||||
1. Invoke the **`ruview-advanced-sensing`** skill.
|
||||
2. Route on `$ARGUMENTS`:
|
||||
- **multistatic** (ADR-029) — `wifi-densepose-signal/src/ruvsense/multistatic.rs`, `phase_align.rs`, `coherence_gate.rs`; neighbours' APs as illuminators.
|
||||
- **cross-viewpoint** (ADR-016 viewpoint) — `wifi-densepose-ruvector/src/viewpoint/`; needs 2+ nodes; `node scripts/mesh-graph-transformer.js`.
|
||||
- **tomography** — `ruvsense/tomography.rs` (ISTA L1 voxel solver) + cross-viewpoint geometry; through-wall volumetric.
|
||||
- **field-model** (ADR-030) — `ruvsense/field_model.rs`, SVD room eigenstructure persisted to RVF (Cognitum Seed); residual = perturbation.
|
||||
- **intention** — `ruvsense/intention.rs`, 200–500 ms pre-movement lead signals.
|
||||
- **adversarial** — `ruvsense/adversarial.rs`, physically-impossible-signal + multi-link consistency checks.
|
||||
- **security** (ADR-032) — mesh hardening: adversarial gate + coherence quarantine + Ed25519 witness chain; run a security review (`docs/security-audit-wasm-edge-vendor.md`), see `/ruview-verify`.
|
||||
3. Validate: `cd v2 && cargo test -p wifi-densepose-signal --no-default-features && cargo test -p wifi-densepose-ruvector --no-default-features`, then `python archive/v1/data/proof/verify.py`.
|
||||
@@ -0,0 +1,18 @@
|
||||
---
|
||||
description: Run a RuView sensing application — presence, vitals, pose, sleep, environment mapping, MAT, point cloud, or a novel RF app.
|
||||
argument-hint: "[presence|vitals|pose|sleep|environment|mat|pointcloud|<name>]"
|
||||
---
|
||||
|
||||
# /ruview-app
|
||||
|
||||
Launch a RuView application.
|
||||
|
||||
1. Invoke the **`ruview-applications`** skill.
|
||||
2. Map `$ARGUMENTS` to an application; if empty, show the catalogue and ask. Quick mappings:
|
||||
- `presence` / `vitals` / `pose` / `environment` → `cd v2 && cargo run -p wifi-densepose-sensing-server` (live ESP32 sink) or the Docker demo for simulated CSI; for environment also `--build-index env`.
|
||||
- `sleep` → `examples/sleep/` + `node scripts/apnea-detector.js`.
|
||||
- `mat` (Mass Casualty Assessment) → `wifi-densepose-mat` crate, `docs/wifi-mat-user-guide.md`.
|
||||
- `pointcloud` → `python scripts/mmwave_fusion_bridge.py` (camera depth + CSI + mmWave).
|
||||
- novel RF → `scripts/passive-radar.js`, `material-classifier.js`, `device-fingerprint.js`, `mincut-person-counter.js`.
|
||||
3. If no hardware: fall back to `docker run -p 3000:3000 ruvnet/wifi-densepose:latest` or `python examples/ruview_live.py`.
|
||||
4. Help pick the right modality (through-wall → presence/activity; stationary subject → vitals/sleep; need skeletons → pose, train it for accuracy; search & rescue → MAT; best accuracy → 2+ nodes + cross-viewpoint fusion via `/ruview-advanced`).
|
||||
@@ -0,0 +1,15 @@
|
||||
---
|
||||
description: Build and flash RuView ESP32 firmware (8MB or 4MB), then confirm the CSI stream.
|
||||
argument-hint: "[8mb|4mb] [COM port]"
|
||||
---
|
||||
|
||||
# /ruview-flash
|
||||
|
||||
Build + flash RuView firmware to an ESP32-S3 sensing node.
|
||||
|
||||
1. Invoke the **`ruview-hardware-setup`** skill.
|
||||
2. Determine variant from `$ARGUMENTS` (default `8mb`). For `4mb`: `cp firmware/esp32-csi-node/sdkconfig.defaults.4mb firmware/esp32-csi-node/sdkconfig.defaults` first. For `8mb`: ensure it's built from `sdkconfig.defaults.template` (no mock).
|
||||
3. Build using the **Python-subprocess** command from `CLAUDE.local.md` (ESP-IDF v5.4 does NOT work under Git Bash — strip `MSYSTEM*` env vars). Never use `cmd.exe /C` from bash.
|
||||
4. Flash: same subprocess, `[python, idf_py, '-p', '<COM port>', 'flash']` (default port **COM8**), or `python -m esptool ... write_flash ...` with the four binaries.
|
||||
5. Confirm: serial monitor via pyserial (not `idf.py monitor`), then `cd v2 && cargo run -p wifi-densepose-sensing-server` to see frames arrive.
|
||||
6. If no frames: re-run `/ruview-provision`, check channel matches the AP, drop any `--filter-mac`.
|
||||
@@ -0,0 +1,24 @@
|
||||
---
|
||||
description: Provision WiFi credentials, sink IP, and optional channel / MAC-filter overrides onto a RuView ESP32 node.
|
||||
argument-hint: "--port COM8 --ssid ... --password ... --target-ip ... [--channel N] [--filter-mac AA:BB:..]"
|
||||
---
|
||||
|
||||
# /ruview-provision
|
||||
|
||||
Write NVS config to an ESP32 sensing node.
|
||||
|
||||
1. Invoke the **`ruview-configure`** skill (§"Runtime device config" — has the full `provision.py` flag table).
|
||||
2. Run `python firmware/esp32-csi-node/provision.py --help` for the authoritative options (on Windows: `PYTHONUTF8=1 PYTHONIOENCODING=utf-8 python …` — the help text has non-ASCII). Collect any missing params (port — default **COM8**, SSID, password, target sink IP, `--target-port` default 5005, `--node-id`).
|
||||
3. Run:
|
||||
```bash
|
||||
python firmware/esp32-csi-node/provision.py --port <PORT> \
|
||||
--ssid "<SSID>" --password "<PW>" --target-ip <IP> --target-port 5005 --node-id <0-255> \
|
||||
[--channel <N>] [--filter-mac <MAC>] [--hop-channels 1,6,11 --hop-dwell 200] \
|
||||
[--tdm-slot <i> --tdm-total <n>] [--edge-tier {0|1|2}] [--pres-thresh 50] [--fall-thresh 15000] \
|
||||
[--vital-win 300] [--vital-int 1000] [--subk-count 32] \
|
||||
[--seed-url http://… --seed-token … --zone lobby] [--swarm-hb 30] [--swarm-ingest 5] [--dry-run]
|
||||
```
|
||||
4. Explain trade-offs: `--channel` pins the node (AP's channel) vs. `--hop-channels` for ADR-061 multi-freq hopping; `--filter-mac` restricts to one transmitter vs. omit for all (more data, more noise); `--edge-tier` 0/1/2 = off/stats/vitals; `--tdm-slot`/`--tdm-total` slot a multi-node mesh.
|
||||
5. ⚠️ **Issue #391**: flashing rewrites the *entire* `csi_cfg` NVS namespace — every key not on the CLI is erased. Pass the full set you want; warn the user before re-provisioning a working node. `--force-partial` bypasses the WiFi-creds requirement (knowingly). `--dry-run` builds the NVS binary without flashing.
|
||||
6. Fleet provisioning: `scripts/generate_nvs_matrix.py` (subprocess-first).
|
||||
7. Verify: serial monitor (pyserial on the port, 115200) should show `adaptive_ctrl` ticks + `csi_collector: CSI cb #… len=128 …` lines; the sink (`cd v2 && cargo run -p wifi-densepose-sensing-server`) should report incoming UDP frames if `--target-ip` points at this host.
|
||||
@@ -0,0 +1,16 @@
|
||||
---
|
||||
description: Get started with RuView — pick the fastest path (Docker demo, repo build, or live ESP32) and walk through it.
|
||||
argument-hint: "[docker|build|hardware]"
|
||||
---
|
||||
|
||||
# /ruview-start
|
||||
|
||||
Onboard the user onto RuView (WiFi-DensePose).
|
||||
|
||||
1. Invoke the **`ruview-quickstart`** skill.
|
||||
2. If `$ARGUMENTS` names a tier (`docker`, `build`, `hardware`), go straight to it; otherwise ask which hardware they have:
|
||||
- **No hardware** → Tier 0: `docker run -p 3000:3000 ruvnet/wifi-densepose:latest`, open `http://localhost:3000`.
|
||||
- **Want to build from source** → Tier 1: `cd v2 && cargo test --workspace --no-default-features`, then `python archive/v1/data/proof/verify.py`.
|
||||
- **Have an ESP32-S3 / C6** → Tier 2: hand off to `/ruview-flash` then `/ruview-provision`, then `cargo run -p wifi-densepose-sensing-server`.
|
||||
3. Warn about the gotchas: ESP32-C3 / original ESP32 unsupported; single node = limited spatial resolution; camera-free pose is modest (use camera-supervised for 92.9% PCK@20).
|
||||
4. Point to next steps: `/ruview-app`, `/ruview-train`, `/ruview-advanced`, `/ruview-verify`, and the `ruview-configure` skill.
|
||||
@@ -0,0 +1,18 @@
|
||||
---
|
||||
description: Train a RuView model — camera-free WiFlow pose, camera-supervised pose (92.9% PCK@20), RuVector embeddings, domain generalization, local SNN, with optional GPU on GCloud.
|
||||
argument-hint: "[camera-free|camera-supervised|embeddings|domain-gen|snn|gpu] [--epochs N]"
|
||||
---
|
||||
|
||||
# /ruview-train
|
||||
|
||||
Train, fine-tune, evaluate, or publish a RuView model.
|
||||
|
||||
1. Invoke the **`ruview-model-training`** skill.
|
||||
2. Pick the track from `$ARGUMENTS`; if empty, ask which:
|
||||
- **camera-free** (Track A) — `cargo run -p wifi-densepose-sensing-server -- --pretrain --dataset data/csi/ --pretrain-epochs 50` then `-- --train --dataset data/mmfi/ --epochs 100 --save-rvf model.rvf`. ~84 s on M4 Pro, modest accuracy.
|
||||
- **camera-supervised** (Track B, ADR-079) — `python scripts/collect-ground-truth.py`, `python scripts/collect-training-data.py`, `node scripts/align-ground-truth.js`, then train on `data/paired/`, eval with `node scripts/eval-wiflow.js`. ~19 min, 92.9% PCK@20. Needs `data/pose_landmarker_lite.task`.
|
||||
- **embeddings** (Track C, AETHER ADR-024) — `wifi-densepose-train` + `wifi-densepose-ruvector`; `-- --model model.rvf --embed`, `-- --build-index env`.
|
||||
- **domain-gen** (Track D, MERIDIAN ADR-027) / **snn** (Track E) — `node scripts/snn-csi-processor.js --port 5006`; cognitum-seed-pretraining tutorial.
|
||||
- **gpu** — `gcloud config set project cognitum-20260110`; `bash scripts/gcloud-train.sh --gpu l4 --hours 2` (or `--gpu a100 --sweep`, `--dry-run` to smoke-test). VM auto-deletes unless `--keep-vm`.
|
||||
3. After training: `cd v2 && cargo test --workspace --no-default-features`, `python archive/v1/data/proof/verify.py`. To publish: `python scripts/publish-huggingface.py`.
|
||||
4. Hand off to `/ruview-verify` for the witness bundle.
|
||||
@@ -0,0 +1,17 @@
|
||||
---
|
||||
description: Verify a RuView build — Rust tests, deterministic Python proof, firmware hashes, ADR-028 witness bundle + self-verification, and the pre-merge checklist.
|
||||
argument-hint: "[tests|proof|bundle|all]"
|
||||
---
|
||||
|
||||
# /ruview-verify
|
||||
|
||||
Run RuView's trust pipeline.
|
||||
|
||||
1. Invoke the **`ruview-verify`** skill.
|
||||
2. Based on `$ARGUMENTS` (default `all`):
|
||||
- **tests** — `cd v2 && cargo test --workspace --no-default-features` (1,400+ pass, 0 fail).
|
||||
- **proof** — `python archive/v1/data/proof/verify.py` (must print `VERDICT: PASS`; if hash drift from a legit numpy/scipy bump, `--generate-hash` then re-run). Optionally `cd archive/v1 && python -m pytest tests/ -x -q`.
|
||||
- **bundle** — `bash scripts/generate-witness-bundle.sh`, then `cd dist/witness-bundle-ADR028-*/ && bash VERIFY.sh` (must be 7/7 PASS).
|
||||
- **all** — do all of the above in order.
|
||||
3. If this follows a code change, walk the **pre-merge checklist** from `CLAUDE.md` (README/CLAUDE.md/CHANGELOG/user-guide updates, ADR count, witness bundle regen, Docker rebuild only if needed, crate publishing in dependency order, `.gitignore`, security review for hardware/network modules).
|
||||
4. For security-related changes also run `npx @claude-flow/cli@latest security scan`.
|
||||
Reference in New Issue
Block a user