-
-
The landing page of our website with the link to download the extension, findable at https://alexanderzhao2007.github.io/calhacks/landing/.
-
tot holds Claude’s answer and asks one quick question first, so you think before you read the response.
-
The shared train: your group’s weekly miles, with a bulb that lights up for each friend who thought first today.
-
Goal reached: the train pulls into the station, every bulb lights up, and the week’s top thinker is named conductor.
AI has become the first place many college students go when they get stuck. In intro STEM and creative courses, students skate their way through assignments, skipping the thinking that builds creativity and problem solving skills. So we asked a simple question: what if the AI paused and made you think first, and your friends were working on the same habit with you? That idea became "tot", short for train of thought. Friends and classmates can see each other's progress toward a shared goal of better AI use while holding each other accountable. We want people to keep thinking, together.
tot (train of thought) helps students build better habits by getting them to think through a problem before they read the answer.
What it does
- Runs on Claude.ai. tot stays active in the student’s browser whenever they use Claude.ai.
- Classifies every prompt. When a query is sent, a classifier judges how much effort or critical thinking went into it, and whether it falls into a category where stepping in would help.
- Hides the answer and asks a question. If the intervention flag is thrown, tot blurs Claude’s original response and uses Sonnet 5.5 to ask the student a question about their original query, so they think it through before seeing the answer.
From there:
- The student answers in their own words. A second check looks at whether real thinking happened. It doesn’t grade correctness, and a wrong answer with a reason counts. If the answer is just “idk,” tot asks a smaller, easier follow-up, up to a strict cap and a 30-second window, so it never becomes a chore.
- tot turns their thinking into a message for Claude. A third step writes a follow-up in the student’s own voice (“Before reading your answer, I tried this myself…”) that asks Claude to start from where the student is, correct any misconceptions, and walk through the next step instead of repeating the finished solution.
- When tot isn’t needed, it stays out of the way. If the prompt already shows an attempt, asks for an explanation, asks for feedback on the student’s own work, or isn’t about learning, the answer appears as normal and tot shows nothing.
- Social train (opt-in). Friends can join a shared “train.” Answering tot’s question instead of skipping earns miles toward the group’s weekly goal, and a prompt that already showed your thinking earns the most. The member with the most miles that day is the conductor.
How we built it (tech stack)
- Chrome extension: WXT + TypeScript + React on Manifest V3. The popup UI is rendered inside a Shadow Root so Claude’s styles and ours never collide.
- Claude adapter: All of Claude.ai’s DOM logic lives in one adapter module with centralized selectors. It detects each new user turn, matches it to the assistant response it produces, and hides only that response.
- Turn coordinator: A per-turn state machine (covered → classifying → intervening → judging → done) keyed by turn and request IDs. Late, duplicate, or outdated responses are discarded, and every failure path reveals the answer.
- Backend: A small TypeScript API using the Anthropic SDK with Claude Sonnet 5.5, exposing three endpoints: classify, judge, and compose. Every model output is validated with Zod against a strict schema, and every call has a hard timeout that fails open.
- Social layer: SpacetimeDB on Maincloud. All tables are private and clients read only through per-user views. It stores only display names, groups, and per-day counts, never prompts, answers, or subjects.
Challenges we ran into
- Hiding a quick Claude response. We decided early never to block Send or slow down the student’s request, so tot works after the message goes out. That meant racing Claude’s streaming response: we had to detect the new turn and hide its answer before it became visible. Matching each response to the turn that produced it was the hardest engineering problem that choice created.
- Limiting friction: An over-eager classifier makes tot feel like a nanny. The hardest classifier cases were prompts like “solve this, I tried u-substitution but got stuck,” which sounds like a request for an answer but shows real thinking. We tuned the prompts toward passing anything ambiguous, and the judge rewards effort, not correctness.
- Latency vs. quality. Each model call happens while the student is waiting, so we set strict timeouts on classify, judge, and compose, with a safe fallback for each one.
Accomplishments that we’re proud of
- An end-to-end flow on the real Claude.ai: send a lazy prompt, the answer is hidden, answer one question, and a personalized “here’s what I tried” message appears in your composer, ready to send.
- tot never traps the user. Errors, timeouts, unsupported states, and Skip all lead straight back to Claude’s answer.
- Zero added delay before Claude receives the student’s original message.
- A classifier that lets a prompt through when it shows a genuine attempt, even a wrong one, and steps in on “do my homework” prompts.
- A social mechanic that rewards thinking first without ever sharing what you asked.
What we learned
- Timing in the browser is hard. “Hide it before it’s visible” sounds simple, but with a streaming response there’s a real race between the page rendering and your script reacting, and you have to build around that.
- Fail-open is a product decision, not just an engineering one. A tool meant to build good habits loses all trust the moment it gets in the way, so every failure path defaults to getting out of the way.
- Effort matters more than correctness. The learning value comes from the student committing to an attempt. Rewarding wrong-but-genuine reasoning made tot feel encouraging instead of judgmental.
What’s next for tot
- Smarter pacing. Per-conversation and time-based limits on interventions, and adapting to each student over time.
- More platforms. Bring the same adapter design to other AI chat tools once the Claude version is solid.
- Instructor and study-group tools. Let classes or study groups set up shared trains and goals, still without anyone’s prompts leaving their own browser.
Built With
- anthropic-api
- chrome
- claude
- claude-sonnet
- css
- html
- javascript
- manifest-v3
- node.js
- npm
- react
- spacetimedb
- typescript
- vitest
- wxt
- zod
Log in or sign up for Devpost to join the conversation.