Riposte

Riposte

A spoken debate trainer built for OpenAI Build Week 2026. Learners pick a motion, a side, and an opponent persona, then argue by voice through a strict six-speech format (openings, rebuttals, closings) against an opponent whose vigour adapts to how well they're arguing. A separate referee evaluates every turn for engagement, fallacies, and warranted concessions, and an impartial judge produces a structured, transcript-quoted verdict at the end.

// CASE_STUDY

01 / Problem

Debate feedback is usually delayed, generic, or only available inside a classroom. Practising the hardest part, responding out loud to a serious opponent and then understanding exactly where the case succeeded or broke down, is difficult to rehearse alone.

02 / Approach

Each match runs three separated AI roles rather than one chatbot playing every part: a debater that speaks in a persona's style, a referee that silently scores each turn for relevance, fallacies, and damaged claims, and a judge that reads the full transcript once at the end to produce a structured verdict. The debater never sees the referee's scores or concession logic, so an agreeable model can't quietly hand the learner free concessions.

Difficulty is controlled by a single rolling vigour value that the referee adjusts turn to turn, independent of which of the six personas (Counsel, Socrates, Einstein, Cleopatra, Shakespeare, Santa Claus) is speaking, so persona changes rhetorical style without changing how hard the opponent pushes back.

03 / Challenges

Voice added two real-time constraints beyond a text chatbot: the opponent's speech is generated and streamed as phrase-aligned 24kHz PCM, with its transcript revealed only as each phrase actually plays, and the referee has to complete its evaluation without adding a full extra model round-trip to the response path, since its result only needs to be ready before the following opponent turn. A separate PCM framing bug (odd-byte reads shifting sample boundaries) caused an audible scratch, fixed with a one-byte server carry and a monotonic playback cursor, and verified with a committed fault-injection script rather than just listening for it to sound right.

04 / Result

Built solo with Codex and GPT-5.6 for OpenAI Build Week 2026's Education track, deployed with a Vercel-hosted SPA in front of a stateful Fastify API on Railway. Guest matches work with no account at all; signing in via Supabase adds saved match history behind row-level security. Covered by a debate-engine test suite and a Playwright UI suite that runs against mocked API responses in CI.

// TECH_STACK
01 / Frontend
ReactTypeScriptViteTailwind CSS
02 / Backend
FastifyPrismaOpenAI API
03 / Database
PostgreSQLSupabase
04 / Testing
Playwright