Extension Guide and Ownership
Extension Guide
This section is a practical guide for changing the system without losing track of the main architectural seams.
Add a New Backend Study Field
- Add the property in
JsonFormatUtility.cs - Map it in
StudyMapper.cs - Store it in
StudyRuntimeSO.csif it is needed after fetch - Update any UI presenters that should display it
Add a New Modality
- Ensure backend exposes the new asset as a VRDF-like asset
- Ensure
StudyMappercan derive the modality code - Add the modality entry to the dropdown UI if needed
- Ensure the VRDF file naming matches
VolumeDVR.LoadVolumeByCodeAsync()expectations
Add a New Segmentation UI Behavior
- Extend
VolumeDVRlabel control methods if needed - Update
BrainMenuToggleToVolumeDVR - Optionally add richer item behavior via
XRMenuItemInteractable
Replace or Extend the AI Backend
- Update
StudyRuntimeSOor backend payloads if endpoint discovery changes - Extend
GeminiClienttransport logic - Update
GeminiVoiceInterfaceresponse parsing and history loading rules - Keep confidential-mode behavior aligned with the new backend contract
Recommended Documentation Ownership
This document should be maintained whenever one of the following changes:
- The startup pipeline changes
- The backend API or websocket contract changes
- The VRDF format changes
- The shader/material contract changes
- The voice/AI backend changes
- Build profiles or Android security settings change
Suggested future companion documents:
docs/VRDF_FORMAT.mddocs/VOICE_AND_AI.mddocs/BUILD_AND_RELEASE.mddocs/SECURITY_NOTES.md
Summary
CASSANDRA XR is a functional Unity XR application with a clear product focus:
- backend-driven study selection
- custom medical volume loading
- mobile-aware URP volume rendering
- immersive metadata and report viewing
- voice-driven AI assistance
Its current architecture is practical and product-oriented, but still prototype-shaped:
- scene-composed rather than strongly modular
- operationally effective but lightly tested
- performance-aware but not yet fully optimized
- feature-rich but not fully hardened
The most important architectural center of gravity is the path:
StudyService -> SessionDataController -> StudyRuntimeSO -> VolumeDVR -> Shader
with the voice/AI system acting as a second major vertical slice:
PorcupineWakeWordListener -> GeminiVoiceInterface -> GeminiClient -> ChatManager
Together, those two slices define the core identity of the application.