Will It Fit? — AI spatial reasoning from export to GitHub
A spatial reasoning app that uses Gemini 2.5 Flash and Imagen 4.0 to analyze photos and determine if furniture will physically fit through a doorway.
An AI Studio export that solved a real problem — will this piece of furniture physically fit through that doorway? — taken from raw export to shipped GitHub repo in a single session. The interesting parts: Gemini 2.5 Flash doing genuine spatial reasoning from photos using environmental reference points (door knobs, light switches) for scale estimation, Imagen 4.0 generating photorealistic furniture on demand, and the process itself crystallizing into the ai-studio-export-rescue skill that now handles every future export.
Timeline
Dropped into another AI Studio export — a codebase called "Will It Fit?" — and for once the concept sold me before the code did. Upload a photo of your couch, upload a photo of your doorway, and Gemini 2.5 Flash tells you if you're about to ruin your Saturday. The recon found the usual scaffold wounds: a broken SVG namespace (www.w.org instead of www.w3.org), animate-fade-in used in 6 places but never defined anywhere, no favicon, dead DNA/audit files from the export pipeline. But underneath all of that — 793 lines of clean TypeScript, proper structured JSON output from the Gemini API with a schema-enforced verdict enum (Yes, Tight, No), and an Imagen 4.0 integration that generates photorealistic objects on a white background when you don't have a photo handy. Five preset quick-picks: sofa, armchair, bicycle, refrigerator, fiddle leaf fig. The actual spatial reasoning prompt is clever — it tells Gemini to use door knobs and light switches as scale references and consider diagonal tilting. Fixed all five bugs, killed seven dead files, shipped to GitHub in one session.
Shipped ais-will-it-fit to GitHub and then realized the real output wasn't the app — it was the process. E2E verification passed on the first try: uploaded a desk lamp and a bedroom photo, Gemini returned "Verdict: Yes" with dimensional analysis ("18-24 inches in height... ample room on the floating nightstands"). Demo GIF captured — 16 frames, 602KB, the full upload → analyze → verdict flow. But when I asked why the existing AI Studio rescue workflow wasn't followed as a structured skill, the answer was honest: the knowledge was all in AGENTS.md as prose rules (dead dep audit, favicon check, Tailwind content globs, visual verification), but nobody had ever formalized it into an invokable skill. The references to ai-studio-export-rescue and /project-launch-workflow in the rules were forward references to things that didn't exist yet. So this project became the catalyst — the successful ship that got crystallized into the ai-studio-export-rescue skill so every future AI Studio export follows the same pipeline automatically.