1# Tribes23An strategy-script RTS arena: submit tribe strategy scripts (via the site or the4`/mcp` MCP endpoint), compose them into deterministic, shareable simulations, and watch.56- Plan: see `docs/` and the scripting contract in `packages/protocol/src/game.ts`.7- Layout: `packages/{protocol,engine,script-host}`, `worker/` (API + MCP + cron), `web/` (viewer).8- Dev: `npm install`, then `npm run dev` (wrangler dev with DEV_AUTH bypass — sign in as `local:<name>`).9- Deploy targets:10 - `npm run deploy:dev` → https://dev.tribes.pub (rolling main; own `tribes-dev` D1 + accounts).11 - `scripts/release.sh vX.Y.Z` → immutable `vX-Y-Z.tribes.pub` + apex https://tribes.pub12 (shared `tribes-prod` D1; sign-in happens on the apex origin and the session cookie is13 scoped to `.tribes.pub`, so accounts survive across releases). Before the first release:14 `npx wrangler secret put SESSION_SECRET --env prod`, and export `TRIBES_SESSION_SECRET`15 (same value) so the script can seed each versioned worker.16- Script engine pin: quickjs-emscripten >= 0.32 everywhere sims run (older builds let17 catastrophic regexes bypass gas metering — see packages/script-host/test/regex-gas.test.ts).1819Art credits: Urizen 1Bit Tileset by vurmux (vurmux.itch.io, CC0 — credit appreciated, not required).