Inspiration
Everyone I know has a 2am thought that won't stop looping. Advice rarely helps in that moment but distance does. I kept coming back to the image of Dumbledore's Pensieve: what if you could pour a racing thought out of your head and look at it from outside? Untangle is that, built as software.
What it does
You write or dictate the spiral, exactly as messy as it is. GPT-5.6 diagnoses which of four shapes it takes — replay (past × real), projection (future × imagined), rumination (past × imagined), or deliberation (present × real) — and decomposes it into fragments on a visual map. Replays land in a Basin where you sift what happened from what your mind added. Feared futures become a Cascade of probability-ranked fears you can release. Ruminations orbit a stone in the Groove; decisions balance on the Scales. Spirals that return days later are expected: pour in a follow-up and familiar thoughts come back marked "returned ×N." Your library is a shelf of memory vials — and when you want to see everything you've been carrying, you look up at a night sky where every fragment you ever set down is a star.
It's private by design: no accounts, no backend. Everything lives in IndexedDB on your device, with an optional passcode, offline PWA support, and a bring-your-own-key model where your OpenAI key never leaves your browser. A keyless demo mode keeps the full experience open to everyone, and a safety rail routes crisis language to a care screen instead of gamifying it.
How I built it
The entire implementation was authored by Codex (GPT-5.6) in one shared session — 39 commits from empty folder to deployed app, across milestones M0–M16 defined in an AGENTS.md I wrote up front. My 91 prompts contain no pasted code: they're direction, bug reports from testing the product, and acceptance decisions. Codex scaffolded the Vite + React + Dexie stack, ported my reference prototypes onto a real data layer, web-searched the Responses API docs before writing the agent harness, generated the galaxy backdrop with image gen (recovering from a failed tool call by falling back to the CLI), and ran a security review for leaked secrets before deploy.
In-app intelligence is gpt-5.6-luna via the Responses API, called directly from the browser and constrained by three markdown contracts: a diagnosis rubric, strict JSON output schemas, and a tone constitution (the agent never chats as it only returns map mutations).
Challenges I ran into
The hardest problems were about meaning, not plumbing. The model initially put its own corrections into the user's claim field, leaving nothing the user could actually release; fixing that meant tightening the schema so the user's thought stays theirs and the calm correction lives in a note. Testing the live pipeline revealed that my own sample rants for two spiral types produced empty screens, because the model was obediently refusing operations my schema hadn't defined. And the return-visit flow turned out to be gated behind a finished basin, which I only caught by using the app the way a real overthinker would.
Accomplishments that I'm proud of
- One session, whole build. 39 commits, M0 to M16, every line authored by Codex in a single shared session with an evidence page in the repo (
docs/build-session.html) that reconstructs the timeline from the session log itself. - The return visit. Most tools treat a thought as handled once processed. Untangle expects spirals to come back , familiar thoughts return marked "returned ×N," and the map shifts as reality answers. That's the feature I'd defend as the moat.
- Four spiral types, four real screens. Not one generic chat view: the Basin, Cascade, Groove, and Scales each embody how that kind of thought actually needs to be handled.
- Privacy that's structural, not promised. No backend exists to leak anything: local IndexedDB, BYOK where the key never leaves the browser, passcode, offline PWA and a keyless demo so nobody is locked out.
- A safety rail that actually triggers. Crisis language routes to a care screen instead of a gamified map and care spirals sit on the shelf as warm, still vials, held rather than processed.
- The night sky. Every fragment ever set down becomes a star in a contemplative "look up" view. It's the emotional thesis of the app in one screen.
What I learned
Directing an agent is a skill of its own: precise bug reports and small verifiable milestones beat clever prompts every time. Schemas are product decisions, where a correction lives changes what a user can emotionally do with it. And testing your own app with your real spirals is both the best QA and slightly too effective.
What's next for Untangle
- Auto-recognition of returning spirals — pouring a new thought from the home screen should offer "this sounds like your deadline spiral" instead of relying on the user to find the old vial. Deliberately deferred; it needs a confirm step so a wrong match never merges two unrelated spirals.
- Constellations — the
pattern_scanagent operation (schema already defined) will draw faint lines between related stars in the sky: "deadline spirals, four this month, none of the feared outcomes occurred." Longitudinal honesty is where the real therapeutic value compounds. - Outcome check-ins — when a projection's feared date passes, quietly ask: did it happen? Over time, users see their own forecast accuracy.
- Whisper-quality dictation across all mobile browsers, beyond Web Speech API support.
- Local encryption at rest — the passcode currently gates the UI; deriving an encryption key from it would harden the privacy story.
- A gentle export — a one-page summary of a settled spiral, shareable with a therapist on the user's terms.
Built With
- codex
- dexie/indexeddb
- gpt-5.6-luna
- gpt-5.6-terra
- openai
- react
- vite
- vite-plugin-pwa
- web-speech-api
Log in or sign up for Devpost to join the conversation.