Files
ruvnet--RuView/v2/crates/ruview-gamma/Cargo.toml
T
Claude 3408883f79 feat(ruview-gamma): implement ADR-250 Adaptive Gamma Entrainment crate
Governed, deterministic, safety-constrained personalization of 40 Hz-prior
light+sound stimulation (RuView sensing + RuVector response modeling + RuFlo
audit). 40 Hz is the starting prior, not the hard-coded answer.

11 modules: stimulus/SafetyEnvelope, safety (exclusion screen + latched
monitor), response (20-field PersonResponseVector + optional EEG), objective
(safe-entrainment score, safety as hard gate), simulator (deterministic
ChaCha20 frequency_response_curve), optimizer (calibration sweep + GP/EI +
closed-loop), bandit (LinUCB), session (reproducible SHA-256 witness), ruflo
(consent/exclusion/envelope/audit/trial-sham/clinician-export/claim-discipline),
proof (deterministic bundle witness), math.

Safety invariant asserted in tests: no emitted stimulus can ever leave the
SafetyEnvelope; non-finite inputs clamp to the conservative floor. Claim
discipline: only 'personalized entrainment optimization', never Alzheimer's
treatment (ADR-250 §19). Standalone leaf, publish=false pending safety sign-off.

Validation: 64 unit/integration + 1 doctest pass; full workspace gate green
(2,862 passed, 0 failed); deterministic witness pinned; criterion benches
(safety-stop tick ~9.3 ns vs the ADR §17 500 ms bound).

Adds ADR-250 doc, registers the crate, updates CLAUDE.md crate table and
CHANGELOG.

https://claude.ai/code/session_01MjBucx95K4BuUxZi8NWwRH
2026-06-10 03:30:28 +00:00

50 lines
2.1 KiB
TOML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
[package]
name = "ruview-gamma"
version.workspace = true
edition.workspace = true
authors.workspace = true
license.workspace = true
description = "Adaptive Gamma Entrainment (ADR-250) — governed, deterministic, safety-constrained personalization of 40 Hz-prior sensory stimulation (RuView sensing + RuVector response modeling + RuFlo audit). Research platform, not a medical device."
repository.workspace = true
keywords = ["gamma", "entrainment", "neuromodulation", "bayesian-optimization", "research"]
categories = ["science", "simulation"]
readme = "README.md"
# Research platform. Publishing intentionally disabled: this crate touches a
# safety-critical, clinical-adjacent domain (ADR-250 §12). Flip to true only
# after safety + claim-discipline sign-off.
publish = false
[lib]
# rlib for native workspace linking; cdylib so the deterministic core can be
# wrapped for a browser/edge dashboard later (same posture as nvsim).
crate-type = ["cdylib", "rlib"]
# `ruview-gamma` is a standalone leaf crate with NO internal RuView deps — the
# governed software core (optimizer, safety envelope, RuVector update logic,
# session witness) must be testable and replayable bit-exactly before any
# hardware actuation or human exposure. Hardware/RF/EEG adapters land behind
# feature flags after the core ships (ADR-250 §21, Milestones 24).
[dependencies]
serde = { workspace = true }
serde_json = { workspace = true }
thiserror = { workspace = true }
# Deterministic ChaCha20 PRNG: same (person, state, stimulus, seed) yields
# byte-identical synthetic responses across runs and machines — the
# reproducibility commitment in ADR-250 §11. default-features off drops the
# getrandom OS-entropy path; all seeds are caller-supplied u64.
rand = { version = "0.8", default-features = false }
rand_chacha = { version = "0.3", default-features = false }
# SHA-256 session witness: hash(protocol, model, device, stimulus, sensors,
# response, safety) — the RuFlo reproducibility trail (ADR-250 §11).
sha2 = { workspace = true }
[dev-dependencies]
approx = "0.5"
criterion = { workspace = true }
[[bench]]
name = "optimizer_bench"
harness = false