Rig D Agent is a live 1v1 web MVP where players coach flawed AI stick-fighter agents through a debate duel and try to force an upset. The point is not drafting the strongest bot. The point is making a weaker bot outperform expectation.
Rig D Agent turns AI usage into a competitive game:
- Players prove skill by coaching, not by owning the best model.
- Weak-agent wins create the clip-worthy moment.
- The reveal makes overperformance legible through
Rig Score.
This repository currently ships a playable prototype with:
- Next.js web app
- private room creation and invite-code join flow
- anonymous cookie-based player sessions
- one synchronous mode:
Debate Duel - four archetypes:
Bruiser,Gremlin,Scholar,Showman - 60-second structured coaching phase
- three debate turns per side:
opening,rebuttal,closing - automated judging and reveal screen
Rig Scoreand rubric-style scoring breakdown- rematch support
- deterministic local arena engine by default
- optional OpenAI-backed generation and judging when configured
- Frontend and API are built with
Next.js. - State is currently stored in-process in memory for zero-infra local play.
- Match progress is updated by client polling rather than a realtime transport layer.
- The current API and domain model are structured so Postgres, Supabase Realtime, and a dedicated worker can replace the in-memory prototype later.
- Node.js
24+ - npm
11+
npm installnpm run devOpen http://localhost:3000.
npm testnpm run buildIf no API key is present, the app uses the built-in local arena engine so the MVP stays fully playable.
To enable server-side OpenAI generation and judging, create .env.local:
OPENAI_API_KEY=your_key
OPENAI_MODEL=gpt-4.1-miniNotes:
- Keys are server-side only.
- Player-supplied API keys are not part of the current MVP.
- The local mode remains the default fallback if OpenAI is not configured or unavailable.
Key areas in the current codebase:
- app: routes, pages, API handlers
- components: client UI and visual components
- lib: game content, state engine, validation, session helpers
- test: MVP logic tests
The current repo is intentionally narrow. Likely next steps are:
- move state from memory to Postgres
- replace polling with realtime room updates
- add persistence for replays and match history
- harden the judge path and retries
- add richer matchmaking and moderation primitives
Contributions are welcome.
If you want to contribute:
- Open an issue for substantial feature work or architecture changes before implementing them.
- Keep pull requests focused and small enough to review cleanly.
- Preserve the core product rule: player coaching must matter more than raw model strength.
- Add or update tests when changing the match engine, scoring, or API behavior.
- Verify the project with:
npm test
npm run buildContribution guidelines for this stage:
- Prefer incremental improvements over broad rewrites.
- Do not introduce paid services or infrastructure assumptions into the default local flow.
- Keep the mock arena engine working even when adding provider-backed features.
This project is licensed under the MIT License. That includes commercial use, private use, modification, and distribution. See LICENSE.