Skip to content

feat: design system + adaptive app shell, vault-sealing ingest CLI, localhost companion & guided onboarding (ADRs 050–057)#4

Closed
stuinfla wants to merge 5 commits into
ruvnet:mainfrom
stuinfla:feat/design-onboarding-companion
Closed

feat: design system + adaptive app shell, vault-sealing ingest CLI, localhost companion & guided onboarding (ADRs 050–057)#4
stuinfla wants to merge 5 commits into
ruvnet:mainfrom
stuinfla:feat/design-onboarding-companion

Conversation

@stuinfla

@stuinfla stuinfla commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

What this adds

This PR builds on the already-merged vault + demo-persona foundation (PRs #1#3) and delivers the design system, guided onboarding, localhost companion, and adaptive ingest layer. It is five focused commits on top of current main.

1. Architecture — ADRs 050–057 + reconciliation (docs/adr, docs/design)

Eight new Architecture Decision Records, plus reconciliation notes threaded into ADR-015 and ADR-021 and a refreshed index (045–057 all listed):

  • ADR-050 — Design System & Visual Language: the shared visual grammar (tokens, type, color, motion) all surfaces draw from.
  • ADR-051 — Adaptive Application Shell: one WASM core rendered as a Tauri v2 desktop app and a PWA on mobile.
  • ADR-052 — Proof / Reasoning-Trace UX: every answer can expand into its reasoning trace (anti-hallucination surface).
  • ADR-053 — Witness-Chained Answer Provenance: answers carry a witness chain back to source evidence.
  • ADR-054 — Real-Time WebGL Digital Twin: live-bound, adaptive-LOD twin that supersedes the render behavior of ADR-015 (015 stays proposed/intact with a superseded-in-part note).
  • ADR-055 — External Medical-Literature Verifier: live citation grounding against external literature.
  • ADR-056 — Cognitum Seed as Offline Knowledge Substrate: personal, offline knowledge base.
  • ADR-057 — Privacy-Tiered Model Routing: routes between connected vs. sealed models by privacy tier.

Plus four UI direction mockups (docs/design/mockups): A — Clinical Aurora, B — Bio-Instrument, C — Living Twin, and the chosen Final Hybrid that the shipping UI is built from.

2. Vault-sealing ingest CLI (crates/helix-ingest)

A native CLI that parses input, then seals it into the encrypted disk-backed vault (Argon2 + ChaCha20-Poly1305 via helix-vault). Round-trips parse → seal → reopen, emits a re-parseable dossier, and rejects wrong passphrases. Ciphertext-at-rest verified (payload keys absent from disk).

3. Hybrid UI wired to live WASM (ui/)

The Final Hybrid mockup turned into a working surface: wired to the live WASM core with per-concept grounded answers.

4. Localhost companion server + adaptive multi-format ingest + CSRF hardening (crates/helix-ingest/src/serve)

  • A loopback-only companion HTTP server exposing unlock / import / health-ingest / connector endpoints.
  • Adaptive multi-format import that auto-routes FHIR, the consolidated envelope (CLAW), and Apple Health exports — and fails loud on unknown formats rather than guessing. Unparseable items are queued, never silently dropped.
  • CSRF / DNS-rebinding hardening: Origin/Host header guard blocks cross-origin and rebinding attacks; path traversal blocked; binds loopback only.

5. Guided onboarding wizard + filterable clinical panels + score-over-time (ui/)

  • A guided onboarding wizard (ui/onboarding.js).
  • Filterable clinical panels and a score-over-time trajectory view.

Safety & quality

  • No PHI anywhere — synthetic demo data / test fixtures only.
  • Tests green: cargo test -p helix-ingest --features persist21 passed, 0 failed (unit + ingest + serve integration suites).
  • Build green: cargo build --workspace finishes clean.
  • Clippy clean: cargo clippy -p helix-ingest --features persist --all-targets -- -D warnings → 0 warnings.
  • Feature-gated: the new work is additive and gated so default and WASM builds are unaffected.

Notes for reviewers

All five commits cherry-picked cleanly onto current main (the earlier vault/ADR/persona work is already merged via PRs #1#3; this branch adds only the new work). The ADR index lists 045–057, and the root Cargo.toml keeps all existing members plus crates/helix-ingest.

🤖 Generated with Claude Code

stuinfla added 5 commits July 1, 2026 14:42
- ADR-050 design system, 051 adaptive shell, 052 proof-trace UX,
  053 witness-chained provenance, 054 realtime WebGL twin (supersedes 015 render),
  055 external literature verifier (extends 006/008), 056 Cognitum Seed KB,
  057 privacy-tiered model routing (Connected vs Sealed, local-only egress gate)
- README index now covers 045-049 + 050-057; documents the 037-044 gap
- 4 UI direction mockups + chosen hybrid + design README
Parses FHIR/Apple via tested importers -> seals ProvRecords into the
encrypted PersistentVaultStore -> proves ciphertext-at-rest -> emits a
gitignored dossier.json for the UI. Passphrase via env/prompt only.
5/5 tests pass under --features persist; clippy -D warnings clean.
- hybrid.html/js/css driven by compose_score_json/bioage_json/timeline_json/
  focus_json/analyze_json over a dossier (synthetic default; ./private or ?dossier= for real)
- new per-concept loop: enumerate codes -> resolve range (own -> NHANES fallback -> abstain)
  -> analyze_json, rendering grounded proof-trail cards over an arbitrary panel
- Sealed/private banner + on-device marker; gitignore ui/private/
… CSRF hardening

- helix-ingest serve: loopback-only companion (static UI + vault/import/connector API)
- adaptive ingest auto-detects FHIR / CLAW-envelope / Apple; unknown fails loudly (422)
- CLAW-envelope adapter reaches into nested fhirData, unique wrapper-derived ids
- id-collision fix in helix-connect (unique fallback id: code+measured_at)
- CSRF / DNS-rebinding guard: Host must be loopback + Origin must be local, pre-routing
- Apple Health local-push connector (POST /health/ingest, HAE subset)
- tests green under --features persist; clippy -D warnings clean
…re-over-time

- 3-stage onboarding wizard (Alex demo -> make-it-mine -> load-now / keep-fresh)
- per-concept results grouped into filterable clinical panels; in-range collapses to a dense table
- score-over-time trajectory chart (composite 0-100; per-domain history honestly omitted)
- private/on-device banner shown when a real dossier is present
@stuinfla stuinfla closed this Jul 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant