Inspiration

As social divisions deepen, public debate increasingly rewards certainty, outrage, and loyalty to one side. It leaves few places where people can safely test their beliefs, encounter a serious opposing argument, or admit that the evidence is more complicated than they expected.

I wanted to create a bounded practice space where disagreement could build curiosity instead of widening a fracture—and where the difficult work stays with the learner: reading evidence, deciding what matters, and answering an opponent in their own words.

What it does

AGŌN is a single-player iPhone debate game built around evidence-bound free input. It is intentionally a bounded, non-public practice space. The player is randomly assigned a side—including positions they may agree or disagree with—writes a natural message, and may attach one source from a fixed Case File. An AI opponent debates the player across five exchanges, with a visible typing pause and separate conversational posts for claims and evidence.

The conversation is intentionally constrained. The opponent cannot cite anything outside the registered Case File. Unclear input prompts a natural request to try again without consuming the round. The player's visible message is never replaced by an AI-written answer.

After every post, the server maps the prose to a registered argument action and deterministically evaluates responsiveness, evidence fit, rule compliance, and the final comparison. The model can make the exchange feel human, but it cannot change legal moves, evidence compatibility, scores, votes, or the winner.

The goal is not to tell users what to think or to eliminate disagreement. It is to help them examine the strongest arguments on both sides, notice the limits of available evidence, and develop a deeper, fact-based interest in the issue. AGŌN supports English and Japanese. The active match flow, 40 argument cards, 15 reviewed evidence records, source checks, and opponent dialogue are localised.

How I built it

The iOS client uses SwiftUI, Observation, SwiftData, XCTest, and XCUITest. The server uses TypeScript, Hono, Zod, Vitest, and an OpenAI Responses adapter. Zod schemas generate the OpenAPI contract, and committed golden fixtures are decoded by both the server and Swift tests.

The rules engine is pure and replayable. Given the same content revision, seed, and inputs, it reproduces the assigned side, Case File, legal actions, state transitions, scores, and verdict. In OpenAI mode, the model receives only server-generated candidate IDs and returns structured conversational output. Its prose stays outside the scoring boundary.

How I used Codex and GPT-5.6

Codex running GPT-5.6 was the implementation partner throughout OpenAI Build Week. I used it to turn the learning goal into an explicit rules contract before UI work; implement the SwiftUI client, Hono server, deterministic engine, and OpenAI adapter; build golden fixtures and regression gates; review conversational naturalness through independent agent passes; add the complete English content layer; and inspect Simulator screenshots to repair localisation and layout issues.

The submitted repository preserves the generated contracts, tests, visual evidence, and implementation notes so the build can be audited rather than judged only from a description.

Challenges

The hardest problem was separating a natural opponent from an authoritative judge. Early versions sounded mechanical, repeated the player's message, or bundled a claim and citation into one oversized bubble. I split the opponent turn into short conversational posts, added typing states, and made evidence its own contextual message. At the same time, I kept every rule-relevant decision in deterministic code.

Localising the product also required more than translating labels. Argument outlines, evidence introductions, suggested actions, source-check results, accessibility labels, and server-generated dialogue all had to agree on the same language while preserving identical rule IDs and hashes.

Accomplishments

  • Free-form debate remains the primary interaction instead of canned multiple choice.
  • The player and opponent can use only reviewed, registered evidence.
  • Ambiguous input is handled conversationally without advancing the round.
  • English and Japanese share one deterministic rules contract.
  • 111 server tests, lint, TypeScript build, OpenAPI drift check, iOS Simulator build, and a complete five-exchange English UI test pass.

What I learned

Natural conversation and trustworthy evaluation should not be the same subsystem. The strongest design was to let the model handle acknowledgement and phrasing while a small explicit engine owns state, evidence permissions, and scoring.

I also learned that exposure to an opposing position works best when it feels safe, specific, and answerable. Random side assignment creates perspective-taking, but the reviewed Case File and private single-player format keep the encounter grounded enough for users to stay curious.

What's next

Next I would add more social-issue motions and Case Files, teacher-authored evidence packs, and post-match replay that helps users compare how their reasoning changed when arguing with and against their prior view. I would also study whether repeated play improves evidence literacy, perspective-taking, and willingness to engage across disagreement.

Built With

  • codex
  • gpt-5.6
  • hono
  • openai-api
  • swift
  • swiftdata
  • swiftui
  • typescript
  • vitest
  • xctest
  • xcuitest
  • zod
Share this project:

Updates