Session Core: Visual, compilation, and runtime performance optimization for Quartz SSOT, Showcase, and OMP (Persistent Intelligence) systems.

1. πŸš€ Performance

Target / MetricBeforeAfterImprovementPrimary Optimization Mechanism
Quartz Clean Build37,663ms6,000ms~6.3x fasterShallow HAST mapping, Promise parallelization, cache fixes
Typecheck + Lint21,000ms6,750ms~3.1x fasterTS path de-duplication, Prettier path exclusion
Prettier formatting10,500ms1,900ms~5.5x fasterExcluding local-plugins/ nested node_modules scanning
Repeated Startup Latency1,000ms~50ms~20.0x fasterFixed invalid cache paths and single-thread checks
OMP Telemetry OverheadN/A<5msHigh PerformanceAsyncLocalStorage context caching & static imports

2. πŸ”§ Achievements

1. πŸ“¦ Speedups

  • Symbol Resolution De-duplication: Configured "paths" in tsconfig.json to map duplicate preact and @quartz-community/types directly to root node_modules, reducing file parse count from 629 to 609.
  • Esbuild Path Overriding: Configured tsconfigRaw in esbuild.context options inside quartz/cli/handlers.js to clear path mappings for esbuild, preventing CommonJS wrap errors.
  • Cache Validity Correction: Aligned cache check directories to look inside quartz/.quartz-cache/ and bypassed worker checks during single-threaded builds.

2. πŸ›‘οΈ Parallelization

  • Concurrent Processors: Wrapped Markdown parser (createFileParser) and HTML renderer (createMarkdownParser) in Promise.all maps.
  • Parallel Emitters: Converted dispatcher, assets, static, and component resource emitters to execute file writes and Preact page rendering concurrently.
  • O(N) HAST Traversal: Replaced the heavy structuredClone inside canvas-page plugin’s normalizeHastElement with a custom shallow-cloning recursive tree mapper.

3. πŸ”­ Telemetry

  • SDK Instrumentation: Added Langfuse tracing, spans, and generations using AsyncLocalStorage to isolate long-term memory operations.
  • Static Module Imports: Used safe lazy dynamic imports for telemetry context propagation alongside AsyncLocalStorage.

4. 🎨 UX

  • Frictionless Chat: Enabled guest autologin header forwarding (X-User-Email, X-User-Name) and removed branding/iframe blocking from chat servers.
  • Layout Graph Re-anchoring: Repositioned the Quartz global network graph view below the sidebar navigation.
  • SSOT Bible & Canvas Schema: Updated the SSOT Bible ([[bible|SSOT Bible]] / https://ssot.0rk.de/bible) to dictate that .canvas files must live as children in the navigation layout.

3. 🚨 Gotchas

  • Esbuild tsconfig Override: When using paths mapping in tsconfig.json, always pass tsconfigRaw with empty paths to esbuild.context to prevent bundle inclusion of external dependencies.
  • Prettier Exclusions: Ensure quartz/!(local-plugins)/** is used in format commands to skip nested node_modules folders.
  • Local Plugin Rebuilds: If changes are made to local plugins in quartz/local-plugins/, compile them by running npm run build within their directory before executing the main Quartz build.

4. πŸ“‹ Checklist

  • OMP Agent Anatomy Documentation: Document full anatomy of OMP bundled agents in an emojified quick-start cheat sheet in SSOT.
  • SSOT Bible Navigation Mandate: Document and enforce Canvas layout rules (Canvas files must be navigation child elements, named canvas in nav).
  • w0rk-migration Plan Synchronization: Verify and synchronize the w0rk plan at plans/w-0rk-migration.
  • Frictionless Unbranded Guest Chat: Map chat.0rk.de correctly to guest-autologin backend and allow iframe embedding, graph below nav.
  • Parked Agents Audit & Completion: Resolve all parked/idle agent tasks in the agenthubs.
  • Langfuse Telemetry & Spans: Integrate Langfuse tracing, spans, and AsyncLocalStorage context mapping for OMP.
  • OmpKeep Telemetry Observability: Implement tracing and dynamic module import compliance in ompkeep modules.
  • OMP HUD Tracing & Logs: Build deep, robust HUD telemetry feedback loops for persistent intelligence.
  • Quartz Build Speed Optimization: Meticulously isolate and resolve Quartz clean build times, compiler speed, and check suites.
  • Session Success URL Reporting: Provide direct verification links (ssot.0rk.de and quartz.0rk.de) on successes.