Aerial Perspective for the Clinical Ocean β Living Medical Intelligence Engine
https://pocketgull.app β Deployed on Google Cloud Run with Google Gemini 3 GA (gemini-3.5-flash & gemini-3.6-flash).
"To provide practitioners with the 'Gull's Eye View'βthe ability to rise above the turbulent sea of medical data and see the clear, actionable patterns beneath."
Pocket Gull is an active, living medical Care Plan Strategy and Live AI Consult engine powered by Google Gemini. Designed for clinicians, nurses, researchers, and caregivers, it synthesizes multimodal inputs (3D spatial anatomical mapping, bi-directional voice dictation, and biometric telemetry) into structured, evidence-grounded clinical strategies across Western, Eastern TCM, and Ayurvedic paradigms.
- Pathways MoE Dynamic Sparse Sub-Network Router (
ClinicalMoERouterService): Jeff Dean Pathways architecture dynamically activating specialized expert clusters (gulliver-core,acoustic-sidecar,sibi-bridge,dicom-spatial-shader) with real-time FLOP efficiency savings (+36%) rendered in the UI telemetry HUD. - ONNX FP16 Sidecar Engine & Async Thread Pool (
OnnxFp16InferenceEngine): Hardware-optimized FP16 model inference inpocketgull_apioffloaded toasyncio.to_threadworker threads keeping sidecar response latency under < 2ms. - Google Agent Development Kit (
@google/adk): SpecializedLlmAgentexperts execute inside anInMemoryRunnerenvironment maintaining context-aware memory of active patient nodes. - Vertex AI Enterprise Engine: Regional Google Cloud Vertex AI integration with automatic Application Default Credentials (ADC) token resolution and custom safety thresholds.
- Bi-Directional Voice Consult & Barge-In Interruption: Full-duplex audio streaming powered by the Web Speech API and Express
/ws/gemini-liveWebSocket proxy. Features instant local client-sideonspeechstartbarge-in speech cancellation. - PubMed Evidence-Grounded Reasoning: Automatic real-time grounding against NIH PubMed E-utilities and Google Programmable Search to anchor every recommendation in verified medical literature.
- Three.js Procedural Skeletal & Organ Viewer: Detailed 3D skeletal geometry and surface mesh rendering with severity-mapped dynamic particle systems.
- Anatomical Search & Camera Tracking (
focusOnPart): Instant fuzzy anatomical search bar (Head/Neuro, Organs, Limbs/Spine) that smoothly interpolates WebGL camera targets onto targeted organs. - Interactive 3D Raycast Tooltips & Data Cards: Hovering over 3D anatomical nodes displays part icons, active paradigm badges, and pain scores. Clicking opens a quick data entry overlay card with pain sliders (0β10) and symptom notes.
- Method of Loci Memory Palace: Anchors clinical consult nodes directly to 3D spatial anatomical coordinates for visual recall of patient history.
- π©Ί Western Allopathic Lens: Evidence-grounded ICD-10/SNOMED coding, Comprehensive Metabolic Panels (CMP: Troponin, ALT/AST, eGFR, Fasting Glucose), lab workups, and monitoring protocols.
- πΏ Eastern TCM Lens: Zang-Fu Qi constriction patterns, tongue/pulse diagnostic matrix, Ba Gang (Yin, Yang, Qi, Blood, Cold, Heat) classification, and 3D Acupoint Jing-Luo meridians (
GV-20 Baihui,CV-17 Danzhong,ST-36 Zusanli). - π§ Ayurvedic Medicine Lens: Tridosha (Vata, Pitta, Kapha) balance, Agni metabolic fire types (Samagni, Vishamagni, Mandagni, Tikshnagni), and 3D Sushumna Lotus Chakras (
Sahasrara,Ajna,Anahata,Manipura). - π§ͺ Orthomolecular Profiling: Automatic extraction and visualization of biochemical markers (Magnesium, Vit D3, B12, Zinc) into a glassmorphic nutrient matrix.
Pocket Gull features 10 built-in standardized assessment instruments integrated directly into the patient state:
| Assessment Instrument | Standard Code / System | Metric Range | Clinical Utility & Scope |
|---|---|---|---|
| π§ PHQ-9 (Depression) | LOINC 44261-6 |
0 β 27 |
Patient Health Questionnaire for depression severity. |
| β‘ GAD-7 (Anxiety) | LOINC 69725-0 |
0 β 21 |
Generalized Anxiety Disorder scale paired with 0.1 Hz vagal breathing biofeedback. |
| π ISI (Insomnia) | LOINC 86095-7 |
0 β 28 |
Insomnia Severity Index with CBT-I sleep restriction directives. |
| π‘οΈ C-SSRS (Safety) | LOINC 84411-8 |
0 β 16 |
Columbia Suicide Screener with automatic Sentinel Safety Alerts & 988 Lifeline routing. |
| π©Ί ROS-14 (Review of Systems) | LOINC 69742-5 |
14 Systems | Comprehensive organ-system symptom intake inventory. |
| π« PHQ-15 (Somatic) | LOINC 81675-1 |
0 β 30 |
Somatic Symptom Scale evaluating physical distress & autonomic dysregulation. |
| π€ PRAPARE (SDOH) | LOINC 93304-4 |
5 Vectors | Social Determinants of Health protocol exporting ICD-10 Z-codes (Z59.8, Z59.41, Z59.6). |
| π§ AYURVEDA (Tridosha) | Samskrita | 6 Vectors | Tridosha Inventory calculating Vata/Pitta/Kapha balance & Agni metabolic fire type. |
| πΏ TCM (Shi Wen) | Ten Questions | 6 Vectors | Traditional Chinese Medicine 6-vector inventory calculating Ba Gang Qi/Yin/Yang patterns. |
| π± GROW_THYSELF | Epigenetic | 0 β 10 |
Life Sovereignty inventory assessing Purpose/Ikigai, Somatic Sovereignty, & Epigenetic Vitality. |
Pocket Gull adheres strictly to Dieter Rams Functional Design Principles (Weniger, aber besser) paired with 100 / 100 WCAG 2.1 AA/AAA Accessibility:
- No Pill Navigation Bloat: Replaced rounded pill buttons with crisp, structural, rectangular navigation tabs (
rounded-md, clean 1px borders, activeborder-b-2 border-emerald-500accents). - Braun Instrument Panel Telemetry Grid: Top patient ground truth header renders as a high-contrast instrument panel with monospace metric readouts.
- Dieter Rams Theme Studio: Includes 13+ curated themes (Rice Paper Washi, Raw Hemp, Carrara Marble, Dark Obsidian, Madame Curie Lab) rendered as real-color dual-swatch preview boxes with 44px+ touch targets.
| Level | Gesture / Action | Clinical Utility & Result |
|---|---|---|
| Level 1 | Default Idle View | High-contrast summary card displaying category badge, icon, and personalized directive. |
| Level 2 | Single Click / Tap | Opens animated Drill-Down Inspector Drawer with usage protocols and patient care tips. |
| Level 3 | Double Click / Double Tap | Fast-cycles the Prescription State Machine (unassigned β prescribed β hidden) with visual/haptic feedback. |
| Level 4 | Right-Click / Long-Press | Opens floating Dieter Rams Context Menu (π Export FHIR R4, π§ Gemini AI Consult, π Pin Telemetry, βοΈ Attach Note). |
Users can toggle between 5 distinct writing personas to suit different cognitive styles:
- π¬ Clinical Allopathic: Formal ICD-10, SNOMED, physiological telemetry, and PubMed trial citations.
- π³ Arborist Redwood: Translates body systems into dendrochronology, tree ring growth, and sap velocity (
120/80 hPa). - ποΈ Garage Mechanic: Translates body systems into V8 engine chassis logs, fluid line PSI, and OBD-II DTC diagnostic codes (
DTC P0128). - π© Extraordinary Gentleman: Victorian Steampunk expedition memoirs with central brass chronometer governors and etheric purity gauges.
- β¨ Inspirational Muse: Health history expressed as a 3-movement epic symphony with 528 Hz Solfeggio frequencies.
- π Classic Literary Reader: Serif typography with drop-cap chapter headers and warm parchment styling.
- β‘ Bionic Speed Reader: Highlighting initial letterforms of clinical terms for accelerated visual cognitive processing.
- π§© Dyslexic Accessible: OpenDyslexic weighted font styling with increased line height (
leading-loose) and letter spacing (tracking-wide). - π§ Audiobook Narrator: Web Speech API speech synthesis paired with 528 Hz / 432 Hz Solfeggio soundscape background tones.
- NN/g Heuristic Alignment:
- System Status Visibility (#1): Centralized
APP_VERSION(v1.9.1) badge, explicit AI Generated Evidence warnings, and real-time streaming status badges. - Progressive Disclosure: Bistable Card Flips (
dblclick π) allow clinicians to view summary diagnostics first, double-clicking to reveal deep cellular/TCM details on demand. - Error Recovery & Reversibility (#3 & #5): Emergency bypass controls on the splash screen, clear cache buttons, and static fallback buoys if GPS is denied.
- System Status Visibility (#1): Centralized
- Forrester Research Trust Benchmarks:
- Overcoming the Trust Gap: UKRIO-compliant scientific reference formatting and direct hyperlinking to PubMed/PMC citations build immediate clinical credibility.
- Multimodal Efficiency: Hands-free AVS voice assistant combined with Wacom pressure-sensitive stylus drawing reduces EHR documentation overhead.
- Health Literacy Equity: Built-in Dyslexia-Friendly OpenDyslexic mode, Grade 4 Child-Friendly summaries, and instant multi-language translation matrices meet healthcare equity standards.
- Good Samaritan Emergency Mode: Offline override mode featuring a 110 BPM chest-compression metronome, BLS safety-gated local Gemini Nano routing, local FHIR-compliant EMT QR code serialization (
lean-qr), and global telemetry suppression. - Geo-Sentinel Outbreak Viewpoint Deck: 3 international public health surveillance modes (Global π WHO, Regional π PAHO, Domestic πΊπΈ CDC/NHI) with real-time AI containment directives.
- Urgency Priority Sorting: Automatically sorts patient rosters by Triage Urgency Score so Level 1 Emergency Resuscitation and Level 2 Emergent cases appear at the top.
- Sentinel Security & Egress Guard (
sentinel_security_guard.mjs): Native Node.js security script inspecting source code for unauthorized egress endpoints (enforcing a clinical domain whitelist:generativelanguage.googleapis.com,fhir.org,cloudrun.app). - Shannon Entropy Secret Scanner: Scans for high-entropy random strings (potential API keys, JWTs, or session tokens) before commit.
- CodeQL 100% Remediation: Fully hardened against SSRF (
normalizeAndValidateModel), path traversal (express.static), prototype pollution (__proto__,constructor,prototype), command injection (execFile), ReDoS, and insecure randomness. - Google Tink AEAD Cryptography: Encrypts local patient records with Quantum-Safe Cryptography (Kyber/Dilithium) transport fallbacks.
Pocket Gull utilizes a hybrid client-server-edge architecture designed for low-latency live consults, privacy-first offline operation, and continuous multi-lens clinical reasoning.
graph TB
classDef doorway fill:#18181b,stroke:#a855f7,stroke-width:3px,color:#fafafa;
classDef leftWing fill:#0f172a,stroke:#38bdf8,stroke-width:2px,color:#f8fafc;
classDef rightWing fill:#0f172a,stroke:#10b981,stroke-width:2px,color:#f8fafc;
classDef cloudCeiling fill:#0f172a,stroke:#6366f1,stroke-width:2px,color:#f8fafc;
classDef foundation fill:#0f172a,stroke:#f59e0b,stroke-width:2px,color:#f8fafc;
subgraph CloudCeiling ["β‘ CLOUD CEILING & BACKEND RUNTIME"]
CloudRun["Google Cloud Run Serverless Service"]
ExpressProxy["Express.js SSR & Single-Hop Proxy"]
FastAPISidecar["Python FastAPI Sidecar (ML Risk Scoring)"]
VertexAI["Vertex AI Enterprise (Gemini 2.5 Flash)"]
end
subgraph LeftWing ["π± LEFT WING β INGESTION & PORTALS"]
Body3D["Three.js 3D Body Surface & Skeleton Viewer"]
VoiceSTT["Bi-Directional Voice Assistant & Web Speech API"]
URLHandoff["Expanded URL State Handoff (?share=...&mode=...)"]
IntakeForm["Demographics & Vitals Diagnostic Intake"]
end
subgraph DoorwayHub ["πͺ THE DOORWAY HUB β CENTRAL STATE & AI ORCHESTRATION"]
PatientState["PatientStateService Signal Store\n(Central Source of Truth)"]
ADKRunner["@google/adk InMemoryRunner\n(Multi-Agent Orchestrator)"]
WebMCPCatalog["WebMCP Polyfill & JSON-LD Tool Catalog"]
CognitiveShield["Cognitive Localization & Shield Filter"]
end
subgraph RightWing ["π©Ί RIGHT WING β MULTI-PARADIGM LENSES"]
WesternLens["Western Allopathic Lens"]
TCMLens["Eastern TCM Lens"]
AyurvedicLens["Ayurvedic Lens"]
OrthoLens["Orthomolecular Lens"]
YBOCsLens["Y-BOCs Diagnostic Screener"]
CDCSentinel["CDC Sentinel Triage (Levels 1β5)"]
end
subgraph Foundation ["πΎ FOUNDATION β STANDARDS & ARCHIVING"]
FHIRBundles["FHIR R4 / R5 / R6 / FHIR 7 Bundles"]
IndexedDBCache["Encrypted Offline Browser Cache"]
PubmedGrounding["NCBI PubMed & Evidence Grounding"]
end
CloudRun --> ExpressProxy
ExpressProxy <--> FastAPISidecar
ExpressProxy <--> VertexAI
Body3D -->|Spatio-Anatomical Signals| PatientState
VoiceSTT -->|Audio Stream & Transcripts| ADKRunner
URLHandoff -->|Base64 Payload Restore| PatientState
IntakeForm -->|Vitals & Symptoms| PatientState
ExpressProxy <-->|WebSocket & REST| DoorwayHub
PatientState <--> ADKRunner
ADKRunner <--> WebMCPCatalog
PatientState <--> CognitiveShield
DoorwayHub <--> WesternLens
DoorwayHub <--> TCMLens
DoorwayHub <--> AyurvedicLens
DoorwayHub <--> OrthoLens
DoorwayHub <--> YBOCsLens
DoorwayHub <--> CDCSentinel
PatientState --> FHIRBundles
PatientState --> IndexedDBCache
ADKRunner --> PubmedGrounding
class PatientState,ADKRunner,WebMCPCatalog,CognitiveShield doorway;
class Body3D,VoiceSTT,URLHandoff,IntakeForm leftWing;
class WesternLens,TCMLens,AyurvedicLens,OrthoLens,YBOCsLens,CDCSentinel rightWing;
class CloudRun,ExpressProxy,FastAPISidecar,VertexAI cloudCeiling;
class FHIRBundles,IndexedDBCache,PubmedGrounding foundation;
A living record of major system evolutions (Full details in docs/study/src/pages/changelog.mdx):
- v1.9.1 (2026-08-04): OpenSSF Scorecard 10/10 Hardening, CodeQL Log Injection Remediation, Centralized SEMVER (
src/version.ts), Wacom Digitizer Pressure Telemetry (e.pressure), Adobe Firefly 3D Surface Bump Maps, GGSC Happiness Calendar Daily Quotes, NN/g Usability & Forrester Clinical Trust Architecture, and Automated FHIR R4 Bundle Benchmark Suite. - v1.4.0 (2026-07-31): Google Gemini 3 GA Model Migration (
gemini-3.5-flash&gemini-3.6-flash), PubGemma 27B & MedGemma 3 27B upgrades, Thought Signature Circulation, Platinum Tier Competition Hub, Wachter/Brookings AI Governance suite, and CMS RPM Billing Audit Dashboard. - v1.3.0 (2026-07-24): Sentinel Security & Egress Guard (
sentinel_security_guard.mjs), Step-Security Harden-Runner v2.16.0, Node.js 24 migration, CodeQL 100% remediation. - v1.2.0 (2026-07-22): 10 Standardized Clinical & Life Sovereignty Assessments, Dynamic 3D Paradigm Synchronization (Western Organs, Eastern Meridians, Ayurvedic Chakras), Rice Papercraft Theme.
- v1.1.0-rc3 (2026-07-21): 60fps 3D Patient Slide-in Transition, Triage Urgency Priority Sorting, Geo-Sentinel Surveillance Deck, FHIR R4 1-Click Export.
- v1.1.0-rc2 (2026-07-21): Patient Health Trajectory Storybook, 4 Adaptive Cognitive Reading Modes (Classic, Bionic, Dyslexic, Audiobook), Mind-State Synthesizer.
- v1.1.0-rc1 (2026-07-21): 3-Act Clinical Narrative Arc, Pixel 9 Pro Touch Snap Carousel, Instant Patient Action Suite.
- v1.0.0-rc12 (2026-07-21): 7-Day Chrono Weekly Meal Planner, Geolocational Micro-Climate Relocation Engine, KSS Acronym Expander.
- v1.0.0-rc10 (2026-07-21): PhysioNet 2026 Waveform Lens (QRS, ST-segment, QTc, HRV LF/HF), Origami Unfolding Splash Animation.
- v1.0.0-rc9 (2026-07-21): 3D Anatomical Search & Camera Tracking (
focusOnPart), Viewport-Contextual CMP Lab Panels, Global Multilingual Exchange (Spanish, German, French, Japanese, Hindi).
A strategic breakdown of active and upcoming development milestones (Targeting GitHub Milestones):
- OpenSSF CII Best Practices Badge Registration (#13644)
- CodeQL 100% Remediation (Zero log injection or path traversal vulnerabilities)
- Centralized SEMVER Synchronization (
src/version.ts) - Adobe Firefly PBR 3D Surface Bump Maps & Service Worker Pre-fetching
- Automated FHIR R4 Bundle Validation Benchmark (
gcp-healthcare.service.spec.ts)
- Bidirectional FHIR R4 Subscription webhooks (
DiagnosticReport&Observation) - SMART on FHIR OAuth 2.0 Identity Provider Bridge (
fhir-integration.service.ts) - Automated CMS CPT 99453/99454/99457 RPM Billing Export Ledger (
rpm-audit.service.ts) - Native Epic MyChart Patient Brief Export Portal (
mychart-brief-modal.component.ts)
- WebGPU On-Device MedGemma / PubGemma Edge Inference (
webllm.provider.ts) - Full-Duplex Multimodal Gemini Live WebSockets with Low-Latency Binaural Spatial Audio (
server.ts) - Biometric Wacom Signature Pressure Verification (
e.pressuredigitizer support) - PhysioNet 2026 Real-Time Electrocardiogram (ECG) & PPG Waveform De-noising (
physionet.service.ts)
| Resource / Layer | Minimum Requirement | Recommended Specification |
|---|---|---|
| Node.js Runtime | v24.x (Strict .nvmrc requirement) |
v24.x LTS |
| Package Manager | npm v10.x |
npm v10.x+ |
| Python Sidecar / ML | Python 3.10+ |
Python 3.10 (scikit-learn, xgboost, edfio) |
| Memory (RAM) | 4 GB (Client UI) / 8 GB (Docker container) |
8 GB+ (Client) / 16 GB (Parallel ML batch grid) |
| Graphics (3D Anatomy) | WebGL 2.0 compatible GPU / Integrated Graphics | Hardware-Accelerated WebGL (60 fps rendering) |
| Browser Compatibility | Chrome v120+, Edge, Safari 17+, Firefox | Chrome / Chromium (Web Speech & WebGL 2.0 optimized) |
π Financial Pro Forma & Software Valuation: Detailed 3-year SaaS projections, unit economics, and COCOMO II software replacement valuation ($2.35M USD) are available in
PROFORMA.md. π€ Typeface COCOMO II Valuation: Standalone COCOMO II valuation ($242,000 USD) for the PocketGull Typeface & Iconography Suite is available indocs/COCOMO_II_TYPEFACE_VALUATION.md. π Enterprise Go-To-Market & Pitch Deck: Strategic B2B SaaS growth plan and 10-slide investor pitch deck are available inGTM_PITCH_DECK.md. π€ Google Fonts Submission Package: Complete submission guide and OFL metadata package for onboarding thePocketGulltypeface to Google Fonts are available indocs/GOOGLE_FONTS_SUBMISSION.md. ποΈ Recommended Hardware & Digitizer Partners: Recommended Wacom digitizers, pressure-sensitive styluses, and affiliate links are detailed inHARDWARE.md.
- Node.js:
v24.x(Strict requirement specified in.nvmrcandpackage.json) - npm:
v10.xor higher
# 1. Clone the repository
git clone https://github.com/philgear/pocketgull.git
cd pocketgull
# 2. Install dependencies
npm install
# 3. Start local development server (Angular UI + Express SSR Proxy)
npm run dev
# 4. Run shift-left security & egress audit
npm run sentinel:audit
# 5. Run Vitest unit test suite
npm testnpm run build
npm run preview- Human-in-the-Loop (HITL): Clinicians must review and validate AI-generated treatment options before archiving care plans.
- Automated Red-Teaming: Vitest safety suite (
tests/safety.spec.ts) continuously tests Google Gemini safety thresholds against adversarial prompts. - Privacy Core: Zero unencrypted PII persistence. All patient state is transient or encrypted locally using Google Tink AEAD.
- Professional Standards Alignment: Engineered in accordance with the ACM Code of Ethics and IEEE Code of Ethics.
Full documentation is available in the docs/study/ directory:
- System Architecture β System design, data flow, and tech stack
- Changelog & Release Notes β Complete release history and technical diffs
- Clinical Paradigms β Western, TCM, and Ayurvedic frameworks
- Design System & Avian Personas β Dieter Rams aesthetics and agent persona specs
- Data & Privacy Model β Storage model, DOMPurify, and FHIR portability
- Responsible AI Guidelines β Ethical principles and safety red-teaming
- Contributing Guidelines β Coding standards and PR guidelines
- REST API Reference β OpenAPI 3.0 specification
Phil Gear β Lead Systems Architect & Creator of Pocket-Gull
"Engineering with Kaizen β continuous refinement for clinical excellence, deterministic safety, and open medical intelligence."
Specializing in real-time multimodal AI streaming (Google Gemini), high-performance Angular 22 standalone architectures, Three.js 3D spatial biophysical modeling, and FHIR R4 interoperability for clinical decision support.
If you reference or use Pocket Gull in clinical research, medical informatics studies, or AI health publications, please cite our official Zenodo archive record:
- Zenodo Release Record (v0.10.0):
β
10.5281/zenodo.20647514 - Zenodo Concept DOI (All Versions):
β
10.5281/zenodo.20647513 - ORCID iD:
@software{gear_phil_2026_20647514,
author = {Gear, Phil},
title = {Pocket-Gull: Living Medical Intelligence Engine},
month = jul,
year = 2026,
publisher = {Zenodo},
version = {v0.10.0},
doi = {10.5281/zenodo.20647514},
url = {https://doi.org/10.5281/zenodo.20647514}
}Β© 2026 Pocket Gull. Licensed under the MIT License.


