What it does
Chat Lab keeps a viewer's prediction separate from their later observation. A host opens a multiple-choice round, locks predictions before the demonstration, then opens observations and records an outcome with an explanation. The controller and read-only OBS overlay compare the two distributions with the host-entered result. Round and phase guards reject commands outside the active round or phase. One account can revise its response without adding another participant.
The featured Monty Hall episode enumerates nine equally likely initial star/choice pairs under an informed-host rule: staying wins three cases and switching wins six. These are mathematical cases, not nine viewers, a physical experiment or evidence of learning. The final demonstration uses two accepted real Twitch commands from one authorized own-channel test account: prediction A with confidence 4, then observation B. The host records B.
How it was built with Codex
I selected Chat Lab from Codex-proposed directions and personally tried the prototype and reviewed its specifications. I delegated the detailed use case and feature recommendations to Codex. Codex proposed the Monty Hall episode and assisted with implementation, interface, phase/round guards, the read-only Twitch connector, automated tests, recovery fixes, documentation and presentation. This does not attribute Codex's detailed ideas or implementation to manual coding by me.
The app uses native Node.js, JavaScript, HTML/CSS, server-sent events and Twitch EventSub WebSocket. It requests only user:read:chat, restricts its connector to the authenticated own channel, sends no bot messages and uses no Channel Points or payouts. It does not call the OpenAI API.
Verification and limits
The retained automated result is 107 passed and 0 failed, including model and host-recovery checks; it is a previously recorded result, not a new test run in the video. The demonstration is a controlled one-account technical check, not an audience study or a learning-effect claim. It includes actual current Twitch actions and an accurately labeled current review of real Codex-assisted source, rather than a reenactment of the original coding session.
An earlier command near the observation-phase timestamp boundary was not counted. That limitation remains documented; the phase guard was not weakened. Large audiences, arbitrary layouts and general token-refresh reliability are not established. Rounds live in process memory and a restart clears them.
Running and testing
Use Node.js 22 or later. Run node --test, then node src/server.mjs; no third-party runtime package download is required. Open http://localhost:4173 and use the visibly labeled synthetic rehearsal. The read-only overlay is at http://localhost:4173/overlay; the separate mathematical card is at http://localhost:4173/experiments/monty-hall.html.
For live input, follow the repository's docs/twitch-setup.md and docs/device-auth.md using your own authorized Public Twitch app, own channel and the single user:read:chat scope. Keep credentials local and out of the repository and recordings. Keep the prototype on loopback. Rehearsal is synthetic and is not a substitute for a live connection.
Next improvements
Investigate clearer anonymous feedback for phase-time rejections and test multi-account behavior before broader use. These are proposed improvements, not completed features.
Built With
- codex
- css
- eventsub
- html
- javascript
- node.js
- server-sent-events
- twitch
- websocket
Log in or sign up for Devpost to join the conversation.