AI can write your code. Can you explain it?
Live site: https://judylp.github.io/stem/?lang=en Video: https://youtu.be/mZTNTnT0S9M Code: https://github.com/JUDYLP/stem
Inspiration
AI-assisted coding can produce working code before a learner can explain its mechanisms or limitations. I hit this myself: I shipped code I could not fully explain. Unscripted is a small practice loop that asks software students to explain a concept, reason through it, and consider a boundary case, in their own words.
What it does
The prototype ships two question packs: Core Software Engineering (Java concurrency, Redis expiration, MySQL consistent reads) and a Python Starter pack (floating-point equality), four questions with three layers each: Explain, Reason, Stress-test. Each reference point is a signal light: learners write an explanation before seeing the checklist, then set a green, amber, or red light per point and confirm the level. Only an all-green level is a Pass; amber and red stay in review. The browser keeps the latest rating per question and level, plus a history that drives a heat matrix and a timeline with light changes, and the learner can export a Markdown review sheet.
With AI judging on, a model proposes a light, a short reason and a verbatim quote from the learner's answer for each reference point, plus one targeted follow-up question. The page checks that each quote really appears in the answer; a green without a valid quote is downgraded to amber. Verdicts are suggestions: nothing is recorded until the learner confirms.
There are three judging modes: offline self-review (nothing leaves the browser), Judge Demo (preset responses, always labeled Simulated), and Live AI (a free hosted model with no key, or the learner's own DeepSeek key, kept only in page memory).
How I built it
HTML, CSS, native JavaScript modules, versioned JSON question packs validated with JSON Schema (Ajv) plus semantic checks, and browser localStorage, hosted on GitHub Pages. The hosted judging mode uses a Cloudflare Worker running the open-weight GPT-OSS 120B on Workers AI; it forces the model server-side, allows only the site's origin, rate-limits each IP to 6 requests per minute and stores no answers. Node's built-in test runner (261 tests) checks the pack contract, AI verdict parsing and quote checks, the Worker's origin, rate-limit and timeout handling, light aggregation, history trimming, answer privacy, and export.
AI use and limitations
AI coding tools wrote essentially all of the code and tests: Codex (planning, most of the implementation, AI judging, the Worker, tests) and OpenCode running DeepSeek models (frontend visuals and UI). I came up with the idea, wrote the requirements for each stage, split the work between the tools, reviewed and merged the pull requests, and chose the hosted model by comparing regression results against a rule I set. The demo video's voiceover is AI-generated (Microsoft Edge text-to-speech), and the recording and edit were produced by an AI agent on my instructions; every AI verdict shown in it is real. I have not measured learning gains or validated the tool as a measure of mastery, and AI verdicts can be wrong, which is why the learner confirms every one.
Challenges I ran into
- Picking a judge model that is free, fast enough and strict enough. Qwen3.8 27B was too slow and timed out. Gemma 4 26B was fast with reasoning off, but marked 7 half-explained points as fully correct. GPT-OSS 120B met my rule (at most one false green): in a 12-level regression it gave 1 false green and 68.4% agreement with preset lights, at about 9 to 21 seconds per judgment.
- Making a keyless demo safe on a free quota: an origin allowlist, a per-IP rate limit, a 40-second deadline, and a fallback to Judge Demo when the daily quota runs out.
- Keeping several AI agents from overwriting each other, which I solved with clear file ownership and one branch and pull request per stage.
What I learned
Honestly, I learned less about writing code than about building software with AI. What I learned was how to run the project:
- Coordinating several AI tools, each with clear file ownership.
- A real development process: planning, designing the frontend and backend separately, and working in stages, with each stage on its own git branch and pull request that I checked before merging.
- Reviewing AI output instead of trusting it: I set acceptance criteria, then checked test results and regression reports before saying yes.
- Deploying a free backend on Cloudflare Workers, with an origin allowlist and rate limit so judges can use it without a key.
- Choosing a model with data, not speed.
My biggest takeaway: much of the hands-on work I would have done myself before AI can now be handed over completely. Setting up and deploying the Cloudflare Worker took me no coding at all.
Can AI tools lift you up? Of course, the same way an elevator lifts anyone who steps in. But riding an elevator does not make your legs any stronger. AI got this project to the top floor; Unscripted is meant to be the stairs. Next time I would write at least one core module myself and use Unscripted's own questions on my project before each merge.
What's next
Finish my own review of the questions, collect a few real usability observations, add more question packs, and generate a draft pack from material the learner pastes in.