# Integration Plan: The Matrix × Timmy Time **Date:** 2026-03-18 (v2 — updated against live codebase + Replit fork) **Author:** Perplexity Computer **Status:** Active — cross-referenced with issues across all three repos --- ## Overview The Matrix is a standalone 3D world that visualizes and commands the Timmy Time agent swarm. It currently runs on a `MockWebSocket`. This document defines how it integrates with the two other systems: 1. **Timmy Dashboard** — FastAPI/HTMX mission control (`rockachopa/Timmy-time-dashboard`) 2. **Token-Gated Economy** — Lightning-based agent economy (`replit/token-gated-economy`) The Matrix does not replace either system. It is a third interface — spatial, persistent, iPad-native. ### Related Issues | Repo | Key Issues | |---|---| | `perplexity/the-matrix` | #1–#17 (full backlog) | | `replit/token-gated-economy` | #1 (EPIC), #2 (WebSocket), #3 (SSE), #7 (3D env), #9 (chat UI) | | `rockachopa/Timmy-time-dashboard` | #325 (cognitive state → Matrix), #326 (Timmy hands), #324 (three-phase loop) | --- ## Fork Coordination: `perplexity/the-matrix` ↔ `replit/the-matrix` Replit forked the canonical repo and is actively developing on branch `feat/vite-build-agent-defs`. This creates a two-track development model: ### What Replit Has Done (as of 2026-03-18) | Change | Addresses Issue | Details | |---|---|---| | Vite build system | #1 | `package.json` + `vite.config.js`, Three.js as npm dep (`0.171.0`) | | Consolidated agent defs | #2 | New `js/agent-defs.js` — single source of truth for agent id/color/role/position | | `crypto.randomUUID()` | #6 | Used in `websocket.js` subscribe handshake | | ES module refactor | — | All files use `import/export`, Three.js via npm not CDN | | CSS inlined | — | Styles moved into `index.html