Inspiration

Teachers have used drama to teach for decades: hot seating, Forum Theatre, putting a student inside a problem so they have to reason their way out. That's what I wanted from AI in education, and it's not what AI tools do. They generate summaries, flashcards, tutors that answer questions. I wanted the passage itself to become a situation you have to think through. So Counterpoint compiles a lesson passage into a small game where using the ideas is the only way to reach the end.

What it does

A teacher pastes a lesson passage. An agent compiles it into a playable point-and-click mission: characters who speak, evidence to collect, a decision with consequences, an ending.

The teacher can then revise the mission by describing the change in plain English. "Give the player a safer alternative." "Make it harder, require one more source." The agent regenerates the blueprint and the same validators check it again before it can be applied. No code involved.

Students play the finished mission exactly as the teacher approved it. The AI's work ends before class starts — there's no chatbot in the loop, so nothing unscripted ever reaches a student.

The flagship mission, The King Street Proof, is the deep example. Boston, 1770. Five men are dead on King Street and you're the printer's apprentice setting tomorrow's broadside. You question two witnesses who disagree, look at Paul Revere's engraving (persuasive, and misleading), and set each finding in type. The dramatic headline blames the captain. The evidence won't support it. The game lets you print the wrong thing, shows you why it was wrong, and makes you earn the honest headline. It ends with the broadside you actually chose to print.

How Codex and GPT-5.6 built this

The app is React + Three.js for the 2.5D scenes, with a small Express server. Blueprint generation runs on GPT-5.6 through the OpenAI Responses API, or through the authenticated Codex CLI (gpt-5.6-sol). Both sit behind the same provider file.

The core piece is the blueprint agent. It has to output an entire game as JSON against a strict schema: nodes, dialogue, entities, endings. I don't trust that output directly. A validator checks it first: can you actually reach the ending, does every choice lead somewhere, are the character counts sane, is the text at a Grade-8 reading level. When validation fails, the errors go back to the model and it repairs its own JSON. Teacher revision works the same way — you type "make it harder," the agent regenerates the blueprint, and the same validators run again before it can be applied.

For scene art I used gpt-5.6-sol with images (codex exec --image). It looks at each background once and decides where characters can stand, how tall they should look, and where their feet touch the floor. That gets saved as a static manifest, so every mission on that background inherits correct placement without another vision call.

Codex built most of this with me. It wrote the flagship Boston Massacre mission over four versions against a 100-point rubric, plus the validators, the self-repair loop, the tests, and the Playwright harnesses that click through each mission pixel by pixel. The calls I made myself: which lesson to teach, the historical guardrails, the rubric thresholds, and pulling version 3 after it passed our simulator but broke in a real browser.

Challenges we ran into

The hardest one was trusting generated content enough to put it in front of a teacher. Early scenes looked like sprite collages: tiny people standing next to giant furniture, props floating above the floor. Fixing placement by hand didn't scale, so I ended up doing one vision pass per background with gpt-5.6-sol and saving the result as a manifest every mission reuses.

Version 3 of the Boston mission was the other lesson. It passed all five of our simulated playtests, so I marked it ready. Then I clicked through it in a real browser and it was broken: no setup, an invisible dialogue response, bad composition. I pulled the release and rebuilt it. Since then real-browser playthroughs are part of the gate, not just the simulator.

Also, running a coding agent's output as a live game is unforgiving. A blueprint can be valid JSON and still be a bad game, which is why the validators grew from schema checks into things like reachability and reading level.

Accomplishments that we're proud of

The compile loop works across subjects, not just the flagship: five different passages (science, history, civics, geography, current events) each produced a valid, playable mission. Teachers can revise missions in plain English. Students play with no model in the loop at all. The demo is deployed and needs no account or API key to try. The flagship mission passed WCAG AA text checks, 63 unit tests, and Playwright runs that complete the whole mission by clicking real pixels. And the version ledger is honest: it includes the version we revoked.

Potential Impact

Only 13% of U.S. eighth-graders scored proficient in U.S. history on the 2022 NAEP. Reading and weighing conflicting sources is a core standard, and it's exactly the skill this game forces you to practice. But the pattern isn't history-specific: every subject has passages students read and never use. Counterpoint turns a passage into decisions with consequences, in a browser, free, no accounts.

I think the teacher gate is what makes this adoptable. The most common teacher objection to AI content is lack of control. Here the teacher sees the whole mission before students do, edits it in plain English, and nothing generated reaches a student without their approval.

Quality of the Idea

Most education AI is either a chat tutor or a content generator. This is neither. The agent's output isn't prose — it's an executable game blueprint that has to pass validators before a teacher can ship it, and the teacher can reshape it in plain English. Students never interact with a model at all. The short version I keep coming back to: agents author, validators check, teachers gate, students think.

What's next for Counterpoint

A real classroom pilot first — our playtest cohorts so far are simulations, and we label them as such. Then per-passage generated art instead of the three launch world kits, more mission mechanics (sequencing, diagnosis), and LMS export. There's also a working scene-geometry benchmark in the repo (with an interactive lab at ?sceneBenchmark=1): a blind GPT-5.6 anchor selector places a character within 6.1% mean height error of our accepted contracts across three scene scales, where naive depth-only methods land at 74–119%. That's the path to characters that move through a scene instead of standing in it.

Built With

Share this project:

Updates