WebXR is utilized to provide immersive spatial inspection of assurance bounds. The implementation requires a secure context (HTTPS) to expose the navigator.xr interface8. When initialized, the workbench UI wraps around the user as a cylindrical dashboard, while the 3D scenario plays out on a central holographic table. The fallback plan is absolute: API presence is not treated as physical XR acceptance. If navigator.xr is undefined, or if a session request is rejected because no physical headset is connected, the UI gracefully hides all XR entry buttons. XR is treated as a specialized, optional viewing modality, never a required path for proof inspection.
Accessibility Task Matrix (WCAG 2.2 AA)
Evulgare must remain navigable by all users, explicitly avoiding the exclusionary trap of rendering complex simulations as opaque <canvas> blobs. Automated checks are utilized during CI/CD but are never presented as substitutes for manual human review.
| Modality | Implementation Specification |
|---|---|
| Keyboard Navigation | Strict logical DOM ordering mirroring the visual layout. Custom focus management using the :focus-visible pseudo-class with a high-contrast 2px solid border (--ev-color-accent). Spacebar/Enter globally toggles timeline playback. |
| Screen Readers (NVDA, JAWS, VoiceOver, TalkBack) | The 3D WebGPU/WebGL canvas is marked aria-hidden="true". The synchronized Event Timeline and Table layers use aria-live="polite" to announce critical state changes (e.g., "Event 17: Forward Collision Constraint Failed"). |
| Zoom & Reflow | CSS Grid and Flexbox layouts utilizing rem units ensure the UI reflows into a single column at 400% zoom without horizontal scrolling, satisfying WCAG 1.4.10. |
| Forced Colors / High Contrast | System-level forced colors are supported by relying on SVG iconography shapes rather than background colors to convey meaning. |
| Switch Control & Voice Control | All interactive elements are native <button>, <a>, or <input> tags. Click targets exceed the 44x44 CSS pixel minimum. |
| Non-Color Status | PASS/FAIL states never rely solely on color. They use distinct SVG iconography (a checkmark vs. a strict geometric cross) alongside explicit text labels. |
| Table Navigation & Chart Alternatives | All WebGL/Canvas metrics charts are backed by visually hidden HTML <table> elements containing the raw, structured data, fully navigable via standard screen reader table commands. |
| Non-XR Task Equivalence | Every task achievable in WebXR must have an exact equivalent in the standard 2D desktop/mobile interface. |
Performance Budgets and Progressive Delivery
Delivering massive, deterministic .uai data payloads requires strict budgeting and advanced network chunking strategies to prevent browser thread locking.
Concrete Performance Budgets
- Initial HTML/JSON: < 50 KB (Gzipped) combined. Flask serves the shell and metadata instantly.
- JavaScript (Vanilla ES Modules): < 150 KB. The strict "no framework" constraint ensures this is achievable.
- CSS (Handcrafted): < 30 KB.
- Preview Media: < 500 KB (WebP/AVIF or highly optimized looping WebM).
- First 3D Frame (WebGPU init): < 1.0s.
- Largest Contentful Paint (LCP): < 1.5s (Targeting the Hero image/video on the Explorer).
- Interaction to Next Paint (INP): < 100ms. Crucial for timeline scrubber responsiveness.
- Cumulative Layout Shift (CLS): 0.0. Enforced via strictly pre-allocated CSS DOM container dimensions.
- API Latency (Variant Run): Dependent on Python compute complexity, but TTFB (Time to First Byte) of the SSE stream must be < 500ms.
- FPS (Graphics): 60 FPS baseline on desktop power; degrading to 30 FPS on mobile battery constraints.
- Long Tasks: The main thread is never blocked for > 50ms during JSON parsing.
- Export Time: Evidence package generation < 2.0s.
Progressive-Delivery Architecture
A typical deterministic run can exceed 10,000 events. The Python backend slices the .uai JSON payload into 500-event chunks. These chunks are streamed to the browser using Content-Encoding: br (Brotli) compression for massive bandwidth reduction.
Crucially, JSON parsing, timeline delta calculations, and cryptographic digest verification occur exclusively inside a dedicated Web Worker. Each chunk includes a SHA-256 hash; the worker verifies this hash to ensure the cryptographic fidelity of the evidence package. If the hash fails, a retry is triggered. Once verified, the worker passes the parsed, ready-to-use array buffer to the main thread via zero-copy transferable objects, keeping the UI perfectly responsive.
Design Language and Tokens
Evulgare’s aesthetic is strictly institutional, rejecting SaaS playfulness and unexplained cyberpunk tropes. The design reflects serious scientific discipline.
Design-Token Guidance (Handcrafted CSS Variables)
CSS
:root {
/* Surfaces */
--ev-surface-base: #0A0C10; /* Near-black blue, never pure #000000 */
--ev-surface-panel: #13161D;
--ev-border-tech: #2D3342; /* Square technical borders */
/* Typography */
--ev-font-sans: 'Inter', system-ui, sans-serif;
--ev-font-mono: 'JetBrains Mono', 'Fira Code', monospace;
--ev-text-primary: #E2E8F0;
--ev-text-muted: #94A3B8;
/* Semantics */
--ev-color-pass: #4ADE80; /* Muted green for supported-within-bounds */
--ev-color-fail: #F87171; /* Genuine invalidation red only */
--ev-color-qual: #FBBF24; /* Amber for qualification */
--ev-color-accent: #2DD4BF; /* Restrained teal/cyan for focus */
/* Layout */
--ev-grid-fine: 1px solid rgba(255, 255, 255, 0.05); /* Fine grids */
}
Visual-Language Rules
Borders utilize a strict 0px border-radius; generic rounded SaaS cards are prohibited. Monospace typography is mandated for all IDs, hashes, timestamps, API versions, and graph labels to project precision. Decorative gradients are minimized, and weapons glamour imagery is strictly forbidden. Depth is achieved via pure color contrast and 1px fine grids, simulating a flat technical schematic.
Analytics and Privacy Recommendation
In keeping with the institutional security posture of the platform, third-party analytics (e.g., Google Analytics, Mixpanel) and external runtime CDNs are explicitly prohibited. The application will utilize a first-party, self-hosted analytics endpoint built directly into the Flask 3 backend. The vanilla JS client will use the native navigator.sendBeacon() API to transmit anonymized usage data (e.g., route transitions, WebGPU capability support, simulation completion rates) without capturing PII or utilizing tracking cookies.
Ten Detailed User Journeys
- The Auditor (Guided Mode): A safety auditor lands on the Explorer, filters by "Guided" mode, and selects the "L3 AD Degradation" scenario6. The UI launches a three-minute tour. The viewport automatically pauses at event 45, where the Proof Inspector highlights a failure (stopping distance > perception limit6). The auditor clicks export, downloading a reproducible PDF evidence package.
- The Analyst (Variant Comparison): A systems analyst opens a baseline run. In the left panel, they modify the bounded input perception_range_m from 30 to 20. They click "Run Variant." The Python backend computes the new .uai and streams it. The UI splits the screen, and the analyst scrubs the timeline to find the exact millisecond the state vectors diverge.
- The Regulator (Authority Trace): A regulator selects an autonomous braking event. They open the Proof Inspector and click "Research Basis," which opens the linked ISO standard and the specific YAML harness rule driving that exact behavior.
- The Developer (Raw Evidence Inspection): A developer encounters an UNKNOWN state. They click the { } raw-evidence action. The UI overlays the raw JSON .uai.evid payload16 for that event index, which the developer copies for local debugging.
- The XR Inspector: A user connects a VR headset and navigates to Evulgare on a secure HTTPS context8. They click "Enter XR" and physically explore the 3D translucent bounding boxes of an assurance scenario hovering over the holographic table.
- The Mobile Executive: An executive opens a shared link on an iPhone running iOS 26. The UI dynamically shifts to the stacked mobile view. WebGPU renders the scene smoothly on the Apple Silicon12, while the executive reads the text output synchronized with the graphics.
- The Accessibility User (Screen Reader): A user navigates entirely via keyboard (Tab/Space). The screen reader polite-announces state changes as the user scrubs the timeline. The user successfully understands the constraint failure and exports the evidence package without ever interacting with the WebGPU canvas.
- The Offline Analyst: A user loses internet connection mid-simulation. The browser's Service Worker serves the cached UI shell. The user can still scrub back and forth through the fully downloaded .uai event index without interruption.
- The Counterfactual Researcher: A researcher creates a non-canonical branch, heavily tweaking physical inputs. They run the simulation, and the resulting paradox (irreconcilable constraints) immediately halts the system7. The researcher saves this branch to the tree as a teaching example.
- The Slow-Network User: A user loads the site on a constrained 3G connection. The initial semantic HTML loads instantly. The Web Worker downloads the first 500-event chunk. The UI displays progressive rendering, allowing the user to begin inspecting the first 100 events while the remaining chunks stream in the background.
Phased Product Roadmap, Migration, and Rollback
Migration Strategy: The Strangler Fig
Evulgare will implement the strangler fig pattern. The existing Flask architecture will be maintained, but the current UI will be migrated route-by-route to the new Vanilla JS/Native ES Module structure, eliminating any legacy framework dependencies gradually.
Phased Roadmap
- Phase 1: Architectural Foundation (Months 1-2): Establish the strict EventIndex global state manager. Implement the capability-aware graphics pipeline (WebGPU -> WebGL2 -> HTML) in isolation.
- Phase 2: The Proof Inspector & UAI Integration (Months 3-4): Connect the deterministic Python backend's UAI YAML harnesses7 directly to the new frontend. Deliver the Proof Inspector panel, Causal Path DAG, and the 8 strict status enumerations.
- Phase 3: Workbench Unification & Branching (Months 5-6): Implement state comparison and counterfactual branching. Deliver side-by-side synchronized viewports, entity highlighting, timeline divergence markers, and WebXR integration testing on secure contexts.
- Phase 4: Explorer, Content, & Polish (Months 7-8): Build the top-of-funnel Simulation Explorer. Deliver the 7 Learning Paths, URL filters, and execute the final WCAG 2.2 AA manual human review.
Rollback Strategy
If critical blocking bugs are detected in the leading-edge WebGPU implementation on specific hardware combinations, the vanilla JS feature flag router will automatically fall back to serving the WebGL2 rendering pipeline for those specific User-Agents until the driver issues are resolved.
Acceptance Criteria (Definition of Done)
The "Definition of Done" strictly requires passing automated CI/CD tests, human accessibility audits, and unyielding adherence to the zero-framework Vanilla JS mandate.