Predict before the machine answers
TwinSleuth is an AI tutor over a deterministic diagnostic simulation. It gives technical learners a safe, fictional practice bench where they must turn a hunch into a testable explanation before they can see evidence.
Each episode presents a fault, four plausible causes, and a simulated time budget. The learner predicts what a selected probe would show for every cause, commits that forecast, observes the result, and defends a diagnosis with checked evidence. The goal is to practice diagnostic reasoning, not to guess quickly.
The learning loop
- Inspect a fictional case, its symptoms, candidate causes, and 30-minute test budget.
- Choose a probe and forecast its result for every candidate cause.
- Commit the forecast before the observation exists.
- Use the deterministic Skeptic when the forecast cannot separate causes; revise or run the test anyway.
- Compare the observation with the forecast, narrow the candidates, cite evidence, and defend a diagnosis.
- Receive a deterministic debrief with checked claims and score breakdown.
AI that teaches without taking control
After a deterministic reasoning signal, learners can open an optional Gemini Tutor. It gives a short general lesson and an unscored reflection prompt, such as how to design a test that distinguishes two causes. The tutor receives only a server-selected skill tag. It never receives the case, symptoms, hypotheses, probes, observations, forecasts, budget, score, diagnosis, or learner text.
The model cannot choose a probe, change an observation, update a score, or decide a diagnosis. If inference is unavailable, TwinSleuth immediately shows a clearly labeled curated lesson so the practice path remains uninterrupted.
Why the simulation is trustworthy
The browser never owns the answer. A Fastify service keeps the hidden fault and unrun forecasts private, and deterministic code remains the sole authority for probe outcomes, evidence validity, candidate set, budget, diagnosis, and scoring. Every episode action is persisted in an event ledger, so replaying an episode reconstructs the same public state.
What the demo shows
The 4-minute-50-second walkthrough follows a seeded, provider-free PIN-9 investigation: an uninformative P1 forecast triggers the Skeptic; the learner revises to P3, compares P3 and P4 observations, submits evidence claims, and receives a deterministic debrief. It also shows Conveyor Index Drift, mobile and keyboard use, the server-owned rules and event ledger, and measured checks. The local Tutor example uses the clearly labelled curated fallback; a separate deployed-page capture is identified on screen.
Built with
React, TypeScript, Vite, Fastify, Gemini API, Neon Postgres, SQLite for local development, and Playwright. The production app is hosted on Vercel.
Try it
Open the hosted practice bench — no account or API key needed for the deterministic learner loop.
Screenshots




Scope
All cases and readings are fictional. TwinSleuth does not connect to or control real equipment, provide repair guidance, or claim validated learning outcomes.
Built With
- fastify
- gemini-api
- langgraph
- playwright
- postgresql
- react
- sqlite
- typescript
- vite
Log in or sign up for Devpost to join the conversation.