Socratic Duck A developer built Socratic Duck, a rubber-duck debugging companion powered by Google's Gemma 4 that answers developer questions only with Socratic prompts, never the fix. The tool runs every model reply through a two-stage guard harness — a rule-based regex check for code fences and giveaway phrases, followed by a second Gemma call that judges whether the reply leaked the answer — discarding and regenerating flagged responses up to two retries before falling back to a canned safe question. The developer found the second judge was necessary after the model leaked a fix in plain prose that the rule check missed, and noted an early benchmark reporting 0% leaks was meaningless because it graded replies with the guard's own detector. This is a submission for the Hacktoberfest Open-Source AI Challenge Week 4: Ghost in the Machine https://dev.to/challenges/hacktoberfest-week4-2026-10-26 You know the rubber duck trick. You explain your bug out loud to a toy on your desk, and somewhere in the middle of the sentence you hear yourself and the problem just falls out. The duck never says a word. That's the whole trick. AI tools quietly broke that. Now I paste the error, get a fix, and move on without learning why it broke. I did this for months before I noticed I was getting faster and not any better. So I built the opposite. Socratic Duck reads your code or a screenshot of your error and asks you questions. Only questions. There's a four step hint ladder, and it starts at "what did you expect to happen?" and slowly gets pointier,It never reaches the fix. Beg for the answer and the patience meter drops. The duck gets grumpier. When my guard catches a reply that was about to give the game away, a rubber stamp slams down on screen: DUCK ALMOST BLABBED. When you finally work it out yourself, you hit Solved it and get a little case file with the root cause in plain words and one flashcard. Séance Mode is where the theme comes in. Flip the switch and the duck turns into the ghost of a dead language. COBOL, Fortran, Pascal, BASIC or ALGOL, your pick. The scene goes dark, the patience meter becomes a candle, the stamp becomes a wax seal. The spirit haunts your code and refuses to tell you what's wrong, same as the duck. Only the voice changes, the rules don't. Solve the bug and the case file turns into an ofrenda card, because a bug you actually understand gets laid to rest. https://socratic-duck.vercel.app/ https://socratic-duck.vercel.app/ A rubber duck debugging companion engineered to interrogate developers about their bugs using Socratic dialogue, strictly built to never give the fix. Powered by Gemma 4 with an active two-stage guard harness that intercepts and neutralizes answer leaks before they reach the user. Wrapped in a tactile bathroom aesthetic—floating soap-bubble chat, an animated tiled bathtub, dynamic patience meter, and a slamming rubber stamp. flowchart TD subgraph Client "Frontend: web/ Vite + React " UI "Bathroom Workspace styles.css " Tub "Bathtub with Animated Water & SVG Duck 4 Moods " Chat "Soap-Bubble Dialogue Thread" Meter "Yellow Water-Level Patience Gauge 0-100 " Stamp "Rubber Stamp: DUCK ALMOST BLABBED" Case "Case File Post-Mortem & PDF Print Modal" end subgraph Server "Backend: server/ Node.js Express ESM " API "POST /api/chat & POST /api/report" subgraph ExecutionFlow "Response Generation & Guard Flow" ModelGen "1. Model Inference generateFn