ruvector/docs/sonic-ct/SPARC.md
rUv 7a79b74d13
feat(sonic_ct): acoustic digital human workbench — Rust/WASM USCT + R3F UI (#595)
* feat(sonic_ct): acoustic digital human workbench — Rust/WASM USCT + R3F UI

Add `sonic_ct`, a research-grade Ultrasound Computed Tomography (USCT)
simulator and reconstruction workbench.

Core (crates/sonic-ct, pure Rust, zero deps, 17 tests):
- procedural z-varying torso phantom (fat/muscle/organ shells, spine, ribs,
  pelvis, liver/spleen/kidneys/aorta, heart+lungs in thorax)
- circular ring acquisition with straight-ray travel-time + attenuation
- SART time-of-flight reconstruction (1 sweep == delay backprojection)
- transparent speed-band segmentation with per-cell uncertainty
- coordinate-ascent threshold training (mean Dice ~0.30 -> ~0.63)
- RuVector-style acoustic memory: NSW vector index, longitudinal drift,
  warm-start, anatomical graph-coherence checks, .rvf-style serialization
- 3-D volume sweep (truth / recon / error / confidence channels)
- mock Butterfly Embedded acquisition boundary (trait, no hardware SDK)

WASM (crates/sonic-ct-wasm): raw C-ABI cdylib (no wasm-bindgen, ~39 KB)
exposing the single-slice + progressive volume pipeline.

UI (examples/sonic-ct): React Three Fiber "Sonic Chamber" — water chamber,
transducer ring(s), holographic torso with internal organ glows and
class-tinted contour slices, live HUD (acoustic paths, phantom fidelity,
path confidence, body composition), cranio-caudal scrubber. Driven entirely
by real reconstruction data.

Docs (docs/sonic-ct): 8 ADRs, SOTA research map, market brief, SPARC.

Co-Authored-By: claude-flow <ruv@ruv.net>
Claude-Session: https://claude.ai/code/session_01Mx4vKMfvsq5KBQgPRSoxM7

* feat(sonic_ct ui): welcome modal + GLB body-model loader with procedural fallback

- WelcomeModal: Simulate/Reconstruct/Analyze/Validate intro, Get Started cards,
  "show on startup" preference, research-only disclaimer.
- BodyModel: loads a supplied GLB anatomy model (GLB_URL) and applies a ghost
  material override + per-organ tinting from organ_manifest.json; cleanly falls
  back to the procedural violet ghost (torso + internal organ glows) when no
  asset is supplied or it fails to load. GLB is a visual prior only — the Rust
  phantom stays the physics ground truth.
- Refined holographic ghost: violet volumetric glow, class-tinted contour
  slices, twin transducer rings, glowing base, internal organ volumes.
- docs/sonic-ct/BODY-MODELS.md: researched model sources (Zygote, BioDigital,
  SMPL/Meshcapade, Z-Anatomy, BodyParts3D) + GLB integration pipeline.

Co-Authored-By: claude-flow <ruv@ruv.net>
Claude-Session: https://claude.ai/code/session_01Mx4vKMfvsq5KBQgPRSoxM7

* feat(sonic_ct ui): load open-source CesiumMan GLB as the ghost body shell

- Ship CesiumMan (Khronos glTF Sample Assets, CC-BY 4.0) as public/models/human.glb,
  loaded via useGLTF, auto-fit to the chamber, and styled with the ghost-material
  override; procedural internal organ glows render inside it.
- GLB_URL now points at the bundled model; missing/broken asset still falls back
  to the procedural torso shell via the error boundary.
- Attribution recorded in organ_manifest.json and docs/sonic-ct/BODY-MODELS.md.

Co-Authored-By: claude-flow <ruv@ruv.net>
Claude-Session: https://claude.ai/code/session_01Mx4vKMfvsq5KBQgPRSoxM7

* feat(metabiohacker): organ-hypothesis detector, Darwin optimizer, rebrand

Rename the app to MetaBioHacker (Acoustic Digital Human Workbench · Sonic
Chamber) across HUD, welcome modal, and metadata.

Organ inference (ADR-0009/0010): new `crates/sonic-ct/src/organ.rs` detects
liver, spleen, kidneys, aorta, heart, and lungs from the reconstructed
volume using anatomical priors (zone, side, size, posterior adjacency,
slice-consistency) — never from speed alone. Each hypothesis carries a
confidence and an evidence bitmask. Exposed via WASM (sct_organ_*,
sct_quality_flag) and surfaced in a new HUD panel with per-organ confidence
bars + quality flags (bone shadowing / sparse coverage / boundary
uncertainty / gas). 18 Rust tests pass; clippy clean.

Harness optimization (examples/sonic-ct/optimize.mjs): uses
@metaharness/darwin ("freeze the model, evolve the harness") with
cheap->frontier tiering and Pareto selection over the frozen WASM engine to
evolve {elements, fan, iters}; lifts phantom fidelity ~0.53 -> ~0.59.
Documented in docs/sonic-ct/OPTIMIZATION.md.

Co-Authored-By: claude-flow <ruv@ruv.net>
Claude-Session: https://claude.ai/code/session_01Mx4vKMfvsq5KBQgPRSoxM7

* feat(metabiohacker): faithful Darwin harness evolution + OpenRouter write layer

- crates/sonic-ct/src/bin/serve.rs: the frozen acoustic engine as a JSON-over-
  stdio process (sonic_ct_serve) — the physics truth layer for the evolver.
- examples/sonic-ct/src/optimizer/reconstructionEvolution.ts: typed genome
  (reconstruction/routing/scoring/safety), runFrozenRustEngine (spawns the real
  binary), cheap->frontier routeReconstruction (augments engine output, never
  rewrites anatomy), multi-objective scoreCandidate, mutateGenome, and
  evolveMetaBioHarness using Darwin mapLimit + paretoFront + an archive.
- optimize.mjs: OpenRouter LLM "write layer" proposes harness mutations (cheap
  gpt-4o-mini / frontier gpt-4o), gated by routing policy, bounded budget, key
  read from env only; archive-based acceptance gate now PASSES (latency -92.8%,
  no regression). probeDarwin.mjs verifies the export surface.
- Tests (npm test, Node type-stripping): mapLimit bounds concurrency; paretoFront
  keeps accurate+cheap trade-offs and drops dominated; frontier never bypasses
  the frozen engine. docs/sonic-ct/OPTIMIZATION.md updated.

Co-Authored-By: claude-flow <ruv@ruv.net>
Claude-Session: https://claude.ai/code/session_01Mx4vKMfvsq5KBQgPRSoxM7

* docs(metabiohacker): ADRs 0009-0019 — organ inference, harness evolution, multimodal data + governance

Add 11 ADRs and an index covering the layers built and the medical-data
architecture roadmap:

Organ/inference layer (grounded in organ.rs / segmentation.rs / Hud.jsx):
- 0009 five acoustic classes canonical (no organ identity from speed alone)
- 0010 organ identity inferred from anatomical priors (evidence + confidence)
- 0011 organ function requires dynamic/multiparametric channels ("not measured")
- 0012 explainability mandatory (evidence bitmask surfaced in the UI)
- 0013 no disease labels — research mode only

Harness + data architecture:
- 0014 freeze the physics engine, evolve the reconstruction harness (Darwin)
- 0015 patient data as a graph of typed observations (MedicalObservation,
  provenance + uncertainty + consent scope)
- 0016 adopt DICOM / FHIR / LOINC / SNOMED CT / OMOP + RuVector similarity index
- 0017 typed multimodal fusion patterns (monitoring/research, not diagnosis)
- 0018 governance & SaMD boundary (FDA GMLP/PCCP, Health Canada, Ontario PHIPA)
- 0019 a medical signal operating system, not an AI doctor

Co-Authored-By: claude-flow <ruv@ruv.net>
Claude-Session: https://claude.ai/code/session_01Mx4vKMfvsq5KBQgPRSoxM7

* feat(metabiohacker): benchmark harness on real CT data + synthetic corpus

- Real-data ingestion: Grid::from_pgm (P5 parser), Phantom::from_intensity_grid
  (band a grayscale CT slice into the five acoustic classes), and
  pipeline::run_with_phantom (reconstruct a supplied phantom — engine unchanged).
- sonic_ct_serve gains a phantomPgm path: reconstruct a real anatomical slice
  instead of a procedural one and emit the same score schema.
- tools/fetchRealSlice.mjs: fetch a public-domain abdominal CT slice (Wikimedia
  Commons) and convert to a grayscale PGM (image not committed; fetched on
  demand, derived PGM gitignored).
- benchmark.mjs (npm run benchmark): baseline vs Darwin-evolved harness over 12
  reproducible synthetic phantoms + 1 real CT slice; writes docs/sonic-ct/
  BENCHMARK.md + benchmark.report.json. Representative: evolved harness ~157%
  faster at equal Dice; real CT honestly harder (Dice ~0.27).
- New integration test exercises the PGM/real-phantom reconstruction path
  (19 Rust tests pass).

Co-Authored-By: claude-flow <ruv@ruv.net>
Claude-Session: https://claude.ai/code/session_01Mx4vKMfvsq5KBQgPRSoxM7

* feat(metabiohacker): scale benchmark — 40 synthetic seeds + multiple real CT slices, 95% CI

- fetchRealSlice.mjs fetches several public-domain CT slices (abdomen, thorax,
  pelvis) resiliently, skipping unavailable ones.
- benchmark.mjs now runs N synthetic seeds (default 40) + every fetched real
  slice, reports mean ± 95% CI, and writes docs/sonic-ct/BENCHMARK.md.
  Representative: 42 samples, evolved harness ~149% faster at equal Dice
  (±0.002 CI); real CT slices honestly harder (Dice ~0.30).

Co-Authored-By: claude-flow <ruv@ruv.net>
Claude-Session: https://claude.ai/code/session_01Mx4vKMfvsq5KBQgPRSoxM7

* feat(metabiohacker): Multimodal Ingest V0 — observations, graph, fusion, ledger, ruvn evidence gate

New package packages/metabiohacker (@metabiohacker/core, TS, 14 tests pass):

- ingest/: canonical MedicalObservation + lab (CSV→LOINC), imaging (DICOM
  sidecar), and pathology adapters with provenance/uncertainty/consent.
- graph/: auditable patient state graph + rule-based contradiction detection
  (low-quality, ≥2x same-test disagreement, unflagged review modalities).
- fusion/: prior builder (data shapes priors, never forces conclusions),
  multimodal scoring (acoustic residual passed through unchanged), contradiction
  penalty, and a Darwin harness (mapLimit + paretoFront) selecting fusion policy.
- evidence/: ruvn as the evidence-intelligence layer (off the hot path) — provider
  interface, A/B-or-blocked claim gate, deterministic cached provider + optional
  @ruvnet/ruvn CLI adapter (never a hard dep). Claims ship only on grade A/B with
  citations; pathology/biopsy/Pap/HPV/cytology force human review.
- ledger/ + output/: stable-hash reconstruction run ledger (tamper-evident,
  verifiable) and the safe UI packet (uncertainty overlay, diagnosis blocked).

Benchmark: +10% stability, ~37% uncertainty drop, residual unchanged, ledger
verified, clinical-review mode forced by pathology.

Docs: ADR-0020 (canonical observation), 0021 (graph+contradictions),
0022 (run ledger), 0023 (ruvn evidence layer); ADR index updated.

Co-Authored-By: claude-flow <ruv@ruv.net>
Claude-Session: https://claude.ai/code/session_01Mx4vKMfvsq5KBQgPRSoxM7

* feat(metabiohacker): real-slice calibration, domain-gap honesty gate, evidence refresh, CI gates

Attacks the synthetic→real Dice gap honestly rather than hiding it.

- Engine: sonic_ct_serve emits per-class (region) Dice on real slices.
- calibration/: region-level Dice (diceByRegion), domain-gap scoring +
  honesty gate (classifyRealSliceResult: headline/researchOnly/exclude),
  centroid registration-error + boundary-complexity proxies. Real CT slices are
  calibration targets, not USCT.
- benchmark.mjs: 3-section report (synthetic / real region-level / governance);
  headline separates speed from real fidelity. Real slices now classify as
  exclude/researchOnly and stay out of headline metrics (abdomen~0.30).
- evidence:refresh (OpenRouter): grades modality evidence into docs/evidence/*.md
  + a candidate cache; promotion to the curated cache stays a reviewed step.
  Live run graded acoustic USCT = C (research-only), MRI = B.
- CI gates (ciGates.test.ts + .github/workflows/metabiohacker-ci.yml): residual
  invariant, pathology review forced, A/B-only claims, real-slice honesty gate.

23 metabiohacker tests + 12 Rust integration tests pass. ADR-0024 added.

Co-Authored-By: claude-flow <ruv@ruv.net>
Claude-Session: https://claude.ai/code/session_01Mx4vKMfvsq5KBQgPRSoxM7

* feat(sonic_ct): method comparison vs BP/SART/Landweber on Shepp-Logan with RMSE/PSNR/SSIM

Bench reconstruction against recognised algorithms on a recognised target:
- shepp_logan.rs: standard 10-ellipse Shepp-Logan phantom -> speed map.
- reconstruction.rs: Method enum + reconstruct_speed_with; Landweber solver
  (gradient descent on ‖As−t‖²) alongside backprojection (1 sweep) and SART.
- metrics.rs: standard image-quality metrics RMSE, PSNR (dB), SSIM.
- sonic_ct_methods bin -> docs/sonic-ct/METHOD-BENCHMARK.md (deterministic).

Measured: backprojection < SART < Landweber on every metric for both Shepp-Logan
and abdomen (abdomen RMSE 130→99→51 m/s, SSIM 0.22→0.60→0.92) at ~4/28/100 ms.
SART stays production default; Landweber is the higher-fidelity option. 2 new
tests; 14 integration tests pass; clippy clean. ADR-0025 added.

Co-Authored-By: claude-flow <ruv@ruv.net>
Claude-Session: https://claude.ai/code/session_01Mx4vKMfvsq5KBQgPRSoxM7

* feat(metabiohacker): rigid translation registration for real-slice calibration

Replace the centroid-only proxy with registerByTranslation — finds the integer
offset that maximises predicted/target body-mask overlap Dice, returning the
offset, residual misalignment (errorPx), and aligned overlap. Gives the
domain-gap honesty gate a real registration estimate (landmark refinement is the
next step). +1 test (recovers a known offset; maximises overlap). 24 tests pass.

Co-Authored-By: claude-flow <ruv@ruv.net>
Claude-Session: https://claude.ai/code/session_01Mx4vKMfvsq5KBQgPRSoxM7

* feat(sonic_ct): full-waveform inversion (FWI) — forward + adjoint-state gradient

The SOTA step beyond straight-ray TOF (ADR-0004 roadmap), as a dependency-free
2-D reference:
- fwi.rs: FDTD scalar-wave forward model (∂ₜ²p = κ∇²p + f), CFL-stable, damping
  sponge; adjoint-state gradient ∂χ/∂κ = Σ_t λ ∇²p; gradient descent with
  source/receiver-footprint muting, smoothing, and backtracking line search.
- Proven by the gold-standard adjoint-vs-finite-difference gradient check
  (cosine > 0.85) + an inversion that cuts data misfit ≥15% and recovers a
  centrally-concentrated velocity anomaly. 2 new tests; 23 Rust tests pass;
  clippy clean.
- Honest scope: single-frequency, unregularised — frequency continuation,
  regularisation, source encoding, and 3-D are the documented next steps; no
  quantitative clinical recovery claimed. ADR-0026 added.

Co-Authored-By: claude-flow <ruv@ruv.net>
Claude-Session: https://claude.ai/code/session_01Mx4vKMfvsq5KBQgPRSoxM7

* feat(sonic-ct): add FWI frequency continuation (multiscale inversion)

Add invert_multiscale + Stage to fwi.rs: chains low->high frequency FWI
stages with between-stage model smoothing to avoid cycle-skipping. Low
frequencies recover the smooth background first, keeping high-frequency
stages out of local minima.

Proven by a third FWI test: frequency continuation lowers the
inclusion-region error below single-scale FWI at matched iteration count
(deterministic). Adjoint-vs-FD gradient check and misfit-reduction tests
still pass. Updates ADR-0026.

Co-Authored-By: claude-flow <ruv@ruv.net>
Claude-Session: https://claude.ai/code/session_01Mx4vKMfvsq5KBQgPRSoxM7

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-06-22 09:54:22 -04:00

10 KiB
Raw Permalink Blame History

sonic_ct — SPARC Analysis

SPARC = Specification, Pseudocode, Architecture, Refinement, Completion. This document analyzes the sonic_ct USCT simulator against its real, implemented modules. sonic_ct is research/simulation software, makes no diagnostic claim, and the Butterfly Embedded boundary is a mock, not a hardware SDK.


S — Specification

Inputs

Input Source module Notes
Ring geometry geometry.rs (Ring::new) N elements on a circle, radius = ring_frac × half_FOV; inward normals
Tissue speed map phantom.rsGrid (types.rs, grid.rs) Speed-of-sound (m/s); procedural abdomen phantom or external map
Tissue attenuation map phantom.rsGrid Acoustic attenuation (Np/m), co-registered with speed
Ground-truth labels phantom.rsGrid Per-cell Tissue class (water/fat/muscle/organ/bone)
Source/receiver plan acquisition.rs (AcquisitionConfig) + Ring::fan_receivers Fan width, min angular separation, samples/cell, timing noise
Optional raw RF frames butterfly.rs (RawRfFrame) Data-contract shape only (channels × samples); simulator does not synthesize waveforms

Outputs

Output Module
Projection measurements (TOF, attenuation, validity, ray geometry) acquisition.rs (Acquisition, Measurement)
Speed-of-sound reconstruction (m/s) reconstruction.rs (reconstruct_speed)
Attenuation reconstruction (Np/m) reconstruction.rs (reconstruct_attenuation)
Segmentation mask + per-cell uncertainty segmentation.rs (Segmentation)
Dice (per-class + mean), MAE metrics metrics.rs (QualityReport)
Inspection images (PGM) grid.rs (to_pgm)
Acoustic-memory archive (.rvf-style, NSW index) memory.rs (AcousticMemory, to_bytes/from_bytes)

Hard Constraints

  1. No diagnostic claim. Outputs are research/quantitative, not clinical findings. Enforced as a documentation and labelling invariant (lib.rs).
  2. No fake Butterfly SDK. butterfly.rs is a mock AcquisitionBackend; it must never present as a licensed hardware integration.
  3. Preserve raw evidence. The RawRfFrame contract and the portable archive format exist so raw/intermediate data stays auditable from day one.
  4. Physics ≠ AI. Reconstruction (physics inverse problem) and segmentation (AI classification) are separate modules and must remain swappable independently. The segmenter consumes reconstructions; it never alters them.
  5. Determinism / dependency-free. Phantom and pipeline are reproducible (seeded PRNGs) and build to wasm32-unknown-unknown.

P — Pseudocode (End-to-End Pipeline)

function run(cfg, model):                      # pipeline.rs::run_with_model
    validate(cfg)                              # reject out-of-range config

    # --- Acquisition layer ---
    phantom  = Phantom.build(cfg.phantom)      # phantom.rs: seeded speed/atten/labels
    ring     = Ring.new(cfg.elements,
                        half_fov * cfg.ring_frac)   # geometry.rs

    acq = []                                    # acquisition.rs::simulate
    slowness = 1 / phantom.speed                # linear travel-time integral
    for source in ring.elements:
        for receiver in ring.fan_receivers(source, fan, min_sep):
            if receiver <= source: continue     # de-dup reciprocal pairs
            ray = Ray.between(grid, src_pos, rcv_pos)     # ray.rs (DDA cells)
            tt  = ray.integrate(slowness) + exterior_water_leg
            att = ray.integrate(attenuation)
            valid = ray spends > 50% length in tissue
            acq.append(Measurement{tt, att, ray, valid, ...})
    if acq.valid_count == 0: return error(NoMeasurements)

    # --- Physics layer (SART) ---
    speed = SART(acq, init=1/WATER_SPEED,       # reconstruction.rs
                 rhs = travel_time - exterior_water_leg)   # solves A·s = t
    speed = 1/slowness, clamped to [SPEED_MIN, SPEED_MAX]
    atten = SART(acq, init=0, rhs = attenuation)
    # 1 SART sweep == delay-backprojection baseline; more sweeps -> least squares

    # --- AI layer (segmentation, kept separate from physics) ---
    seg = segment(speed, model)                 # segmentation.rs
        for each cell c:
            label = model.classify(c)           # piecewise speed-band
            uncertainty = exp(-margin_to_boundary / margin_scale)

    # --- Clinical-workflow layer (metrics) ---
    dice      = dice_all(seg.labels, phantom.labels)       # metrics.rs
    mae_speed = mean_abs_diff(speed, phantom.speed)
    quality   = {mae_speed, dice, mean_dice, measurements}

    # --- Governance layer (memory + coherence) ---
    embedding = speed.embedding(k)              # grid.rs: k×k, mean-centred, L2
    coherence = check_coherence(seg.labels)     # memory.rs: anatomical rules
    memory.insert(ScanRecord{id, patient_id, ts, embedding, dice, mae})
    archive = memory.to_bytes()                 # .rvf-style portable container

    return Scene{phantom, ring, acq, speed, atten, seg, quality}

Offline training loop (model.rs, bin/train.rs): coordinate-ascent over the segmentation band boundaries to maximize mean Dice on a corpus of reconstruction/ground-truth pairs — produces SegModel::tuned().


A — Architecture (Five Layers → Real Modules)

Layer Responsibility Modules
1. Acquisition Geometry, ray tracing, transmission simulation, hardware boundary, raw-RF contract geometry.rs, ray.rs, acquisition.rs, butterfly.rs, phantom.rs
2. Physics Inverse problem: TOF/attenuation reconstruction (SART), grid math, types/constants reconstruction.rs, grid.rs, types.rs
3. AI Tissue segmentation, per-cell uncertainty, reproducible model training segmentation.rs, model.rs
4. Clinical Workflow Quality metrics (Dice/MAE), inspection imagery, end-to-end orchestration, UI metrics.rs, pipeline.rs, grid::to_pgm, crates/sonic-ct-wasm/ (raw C-ABI, ~31 KB), examples/sonic-ct/ (React Three Fiber)
5. Governance Acoustic memory (NSW index, longitudinal tracking, FWI warm-start), anatomical graph-coherence, portable .rvf archive, 3-D sweep scaffolding memory.rs, volume3d.rs

Boundaries that matter:

  • AcquisitionBackend (Layer 1) decouples physics from data source — a licensed hardware backend can replace MockButterflyEmbeddedBackend untouched.
  • Layer 2 (physics) emits only property maps; Layer 3 (AI) consumes them and never writes back — preserving the physics/AI separation constraint.
  • Layer 5 (governance) observes outputs (embeddings, coherence) without altering reconstructions, keeping evidence and audit trails intact.

The WASM crate is intentionally a raw C-ABI module (no wasm-bindgen), keeping the browser artifact tiny (~31 KB) and the JS glue explicit; the React Three Fiber UI in examples/sonic-ct/ is a consumer of the core and holds no reconstruction logic.


R — Refinement Roadmap

Stage Status Description
1. TOF SART Done Straight-ray travel-time + attenuation; 1 sweep = delay backprojection (reconstruction.rs)
2. Finite-difference wave propagation Planned Replace ray integral with an FD acoustic forward solver behind Layer 1/2 boundary
3. Adjoint FWI Planned Adjoint-state gradients of waveform misfit; the documented fix for bone Dice ≈ 0
4. Frequency continuation + source encoding Planned Multiscale low→high schedule (cycle-skip mitigation) + encoded sources for compute reduction
5. Learned sparse completion Planned AI measurement/image completion for sparse rings, layered on top of physics, evidence preserved
6. 3-D vertical sweep Stub (volume3d.rs) Promote SweepPlan to full stacked-slice 3-D reconstruction with inter-slice regularization
7. DICOMweb / FHIR adapters Planned Standards-based export at the clinical-workflow layer
8. QMS / validation harness Planned AI/ML-lifecycle change control, validation datasets, performance monitoring (gating any diagnostic claim)

Sequencing rationale: stages 24 raise physics fidelity (the biggest measured gap — bone Dice ≈ 0 from straight-ray blur); stages 56 raise coverage and efficiency; stages 78 raise clinical/regulatory readiness. The acoustic memory's warm_start already anticipates stage 3 by retrieving the nearest prior reconstruction as an FWI starting model to reduce cycle-skipping.


C — Completion Criteria Checklist

Implemented (current baseline):

  • Deterministic procedural phantom (speed/attenuation/labels)
  • Ring geometry + fan acquisition with reciprocal de-duplication
  • SART speed + attenuation reconstruction (clamped to physical bounds)
  • Transparent speed-band segmentation with per-cell uncertainty
  • Reproducible coordinate-ascent model training (SegModel::tuned)
  • Dice (per-class + mean) and MAE metrics
  • PGM inspection images
  • Acoustic memory: NSW index, patient timelines, longitudinal drift, warm-start
  • Anatomical graph-coherence anomaly check
  • Portable .rvf-style archive (round-trips via to_bytes/from_bytes)
  • Mock Butterfly AcquisitionBackend + RawRfFrame data contract
  • WASM raw C-ABI build (~31 KB) + React Three Fiber UI
  • No-diagnostic-claim / no-fake-SDK invariants documented in lib.rs

Measured baseline (simulator self-report, not external claims):

  • Tuned mean Dice ~0.63 (vs ~0.30 default), MAE ~2831 m/s, ~8000 measurements
  • Bone Dice > 0 — open, blocked on wave physics (straight-ray blur)

Remaining for higher fidelity / clinical readiness:

  • Finite-difference wave forward solver
  • Adjoint-state FWI with frequency continuation + source encoding
  • Learned sparse completion (physics-preserving, evidence-preserving)
  • 3-D stacked-slice reconstruction with inter-slice regularization
  • DICOMweb / FHIR export adapters
  • QMS / validation harness and AI/ML lifecycle controls
  • Wellness vs. diagnostic output separation enforced at product layer

Invariant gates (must hold at every stage): no diagnostic claim · no fake Butterfly SDK · raw evidence preserved · physics reconstruction separate from AI segmentation · deterministic, dependency-free core that builds to WASM.