All Projects
cat ~/projects/subway-ai/README.md
active

>LLM Context Branch Manager - Subway AI

Active
Started: December 12, 2024Completed: April 24, 2025

A web application that enables git-style branching for LLM conversations, allowing developers to manage context windows more effectively during debugging sessions.

Subway AI

>Problem & Solution

Problem

When using LLMs for coding tasks, developers often encounter bugs that require extensive debugging. This debugging process fills the context window with outdated or incorrect code, confusing the LLM when the developer wants to continue with feature development. Existing solutions for managing this context pollution are clunky and manual, requiring developers to delete messages and manually explain the changes made.

Solution

I built a git-inspired branching system for LLM conversations using Next.js, React, and Supabase with the Vercel AI SDK. The core architecture treats user and assistant message pairs as "stations" with parent-child relationships stored in PostgreSQL. For the visualization, I implemented a subway-map metaphor using D3.js with custom layout algorithms to handle the automatic positioning, recoloring, and alignment of branches as users create new conversation paths.

>Technologies

Supabase
Next.js
React
Vercel AI SDK
Supabase
PostgreSQL
$cd ~/projects
will@diamond:~