Skip to content

Open-source platform for 3D AI agents. Turn text or a photo into a rigged, animated GLB avatar, give it an LLM brain, memory and a wallet, and embed it anywhere with one web component. Remote MCP server, x402 payments, Three.js, browser-native.

add xspace-agent/xspace-agent/.github/instructions/legacy-src.instructions.md

oversteppingd527fa190e26
diff --git a/xspace-agent/xspace-agent/.github/instructions/legacy-src.instructions.md b/xspace-agent/xspace-agent/.github/instructions/legacy-src.instructions.md
new file mode 100644
index 000000000..4595d1647
--- /dev/null
+++ b/xspace-agent/xspace-agent/.github/instructions/legacy-src.instructions.md
@@ -0,0 +1,24 @@
+---
+description: "Use when editing the legacy server in src/ — migration context, architecture of the original monolith."
+applyTo: "src/**"
+---
+# Legacy Server (src/)
+
+**Status**: Being migrated into `packages/`. For new features, prefer `packages/core/`.
+
+This code still works and powers the dev server (`pnpm dev`) and CLI `start` command.
+
+## Architecture
+
+- `src/server/` — Express + Socket.IO, routes, socket handlers, turn manager, provider factory
+- `src/client/` — Browser client: Socket.IO + Web Audio API + WebRTC
+- `src/browser/` — Puppeteer automation for X Spaces (being migrated to `packages/core/src/browser/`)
+- `src/audio/` — Audio bridge, PCM capture, WAV encoding
+
+## Rules
+
+- Don't add new features here — implement in `packages/core/` instead
+- Don't modify `server.js` (root) — it's the compiled legacy entry point
+- Keep changes minimal: bug fixes and migration work only
+
+