Inspiration

More and more of my code is now written by a coding agent. I describe the change, the agent works for a few minutes, and I wait. The code still gets written, but I lose my picture of the project: I know the file names, not the shape. Which file is the front door, which parts are tangled together, where things keep breaking.

A file tree doesn't give you that. A place does. You remember a city by walking it: the big building near the square, the street that connects two neighbourhoods, the block that's always under construction. So the idea was to use those waiting minutes differently: put on the headset and visit your own repo as a city sitting on the desk you're already working at.

Code cities are an old idea (CodeCity, CodeCharta). The direct inspiration for the "city life" in ours is Claude Clan by Parth Mittal (github.com/mittal-parth/claude-clan), a desktop isometric code city. The town hall, the crane that installs a fix, buildings weathered by their git history, dots flowing between files and districts placed by how much they talk to each other all come from seeing that project. It has no licence, so we took ideas only: no code, art or text. What we added is the part a headset makes possible: the city is on your real table, you work it with your bare hands, and you can open a building to find the exact function that's failing.

What it does

Repo City turns a real repository into a miniature city on your desk, in passthrough mixed reality on Quest 3:

  • Files are buildings. Footprint grows with lines of code, height with complexity.
  • Folders are districts, each with its own tint. Imports are streets that light up between buildings when you open one, with small dots flowing along them toward the files it uses.
  • The town hall is the package's entry file. The guide shows it to you first.
  • Scaffolding marks hot spots: files that changed often in git history and are also complex.
  • A failing test is a building on fire.

The guided journey takes 2 to 4 minutes. You pinch the burning roof and lift it, and the building slides out beside the city as a stack of floors, one per function. One floor is smouldering. Touch it with a fingertip and the panel shows the real failing assertion, the error and the stack. Ask for the fix, run the tests, and a tower crane lifts the broken floor out and lowers the fixed one in. A green wave runs across the city and every check passes.

The bundled city is semver, the version library npm uses. The bug in it is real: upstream commit 2471d75 (September 2025) added one line to fix x-range build metadata, and we removed that line from our snapshot. Semver's own test suite then fails 20 assertions with TypeError: Invalid comparator: >2.x+build. The fire panel shows that error with its real stack, the fix panel shows the upstream commit, and after the crane all 8,827 assertions pass. A second city is Repo City's own source code.

Your own repo: npm run city:repo -- /path/to/repo builds a city from your code and runs your tests (Node's built-in test runner). Each real failure is traced through its stack to the building and floor where it breaks. Open the link in the headset and your failing test is the fire. For your own repo there is no crane yet: you fix it in your editor or with your agent, then rebuild the city.

Street level: poke a plaque and the city grows about 8 times past your table to a hazy horizon. Pinch and drag with one hand to move through it, pinch with two hands to scale, and "Back to the desk" brings it home.

Everything runs on the headset. There's no LLM and no network call at runtime: the guide's lines are prepared from the repo at build time and spoken with the browser's speech synthesis.

Why mixed reality and hands matter here

  • It's on the desk you work at. Passthrough keeps your laptop, coffee and room in view. The city stands on your real table (we detect it from Quest's room data, with hand placement and a virtual desk as fallbacks), and the buttons are plaques lying on the table, so your fingertip meets a real surface when you press one.
  • The interactions are physical. Lifting a roof off to look inside, touching the floor that's burning, and watching a crane replace it explain "this function in this file is failing, and this is the fix" faster than a stack trace in a terminal does. You hold the codebase rather than scroll it.
  • Hands only. Pinch, fingertip touch and two-hand pinch. The city is small enough to work seated, within arm's reach.
  • It's easy to share. When we passed the headset to a second person across the table, every panel faced the wrong way. Now the panel, plaques and opened building turn to whoever is wearing the headset, which makes it something you can show a teammate.

How we built it

  • WebXR in Quest Browser with Meta's Immersive Web SDK and three.js, immersive-ar with hand tracking, plane detection and anchors.
  • A repo to city pipeline in Node. The TypeScript compiler API parses JS and TS into functions (with line spans and a complexity measure) and an import graph. A deterministic treemap lays out districts and keeps every building big enough to pinch. A small runner executes the project's real tests and records each failing assertion. Git history (--numstat, with renames) gives commits per file, which combined with complexity produces the hotspot score.
  • Rendering for a mobile GPU. All buildings are one instanced draw with a procedural window shader. The fire is particles in two draws, the crane's cable and hook move in the vertex shader, and the flow dots are positioned entirely on the GPU. Lighting (ambient occlusion and soft shadows) is baked per city at build time into one small KTX2 texture, so no shadow pass runs on the headset.
  • Testing without a headset. We had one shared Quest, so most testing happened in Meta's IWER emulator. An end-to-end script drives the whole hands-only journey with simulated hands: placing the city, opening the fire, reading the bug, the crane, the tests, a second viewer in another seat and street level.

Results on the headset

From about 10 minutes of play on a Quest 3 (Quest Browser 156), 303 samples logged over Wi-Fi by a small dev relay we wrote:

  • a steady 72 fps, with 20 to 40 draw calls per frame;
  • hands detected immediately, and two-hand scaling worked;
  • one-off hitches of up to 0.8 s on first load (shaders compiling and textures uploading on first draw), and a dip to 66 to 69 fps during the test run. Prewarming everything while you're still choosing where to place the city cut the worst hitch from 0.8 s to under 0.2 s, measured on the headset. Redrawing the test-run panel less often wasn't enough (still 67.5 fps), so its moving parts are now on a small separate card; that one we haven't re-measured yet.
  • street level holds 72 fps.

Tests: 51 of 51 unit tests pass, and the emulator journey passes 23 of 23 checks with each hand.

Challenges

  • Making the bug believable. The first version had a bug we planted ourselves, and it felt staged on the headset. Replacing it meant digging through semver's history for a recent one-line fix with real failing tests, then mapping those failures through their stack traces to the right building and floor. The same mapping is what makes city:repo work on any repo.
  • Telling intent from movement. Hands are always near something on a small city. A hand passing over the flames must not open the building, a floor stack growing around a resting finger must not select a floor, and a plaque that appears under your finger must not fire. Each of these needed its own rule (a short dwell, seeing the finger outside first, debouncing).
  • Reading code in a headset. The panel shows 12 lines of large monospace text with the bug line highlighted, and the opened building slides out to the side so it never covers the panel.

What we are proud of

  • The fire is a real failing assertion from a real open-source project, and the fix the crane installs is the real upstream commit.
  • Pointing it at your own repo takes one command, and your real failure shows up as the fire.
  • A full hands-only journey that runs end to end in an emulator with either hand, so we could test it without queuing for the headset.
  • Measured 72 fps on a Quest 3 with the whole city, fire and UI running.

What we learned

  • Real data changes how it feels. Our planted bug and the real one look much the same on the panel, but on the headset the planted one read as staged. A real error, a real stack and a real upstream fix are what make it feel like your code.
  • Hand the headset to someone else early. The panels facing the wrong way was obvious the moment a second person put it on. Testing alone from one chair, we hadn't noticed.
  • Prewarm in XR. The first time something is drawn, the shader compile or texture upload can freeze a frame for a long time. Doing all of that during placement, while the user is still choosing a spot, took about 50 ms in the emulator, during a moment when nothing is moving yet.

What's next

Working now: the semver city and Repo City's own city, the full guided journey, street level, and city:repo for your own JS or TS repo with Node's built-in test runner (other runners can pass in a results file).

Planned:

  • Agent fix suggestions as worker characters. We planned to show your coding agent's proposed fixes as workers on the building that's on fire, and cut it tonight for time. It fits the original pitch best: you'd watch your agent's work arrive in the city.
  • Removing the last first-use hitch (about 0.15 s when the city appears) and re-measuring the test run on the headset.
  • Opening your repo from inside the headset instead of a command and a link.
  • Most important: we're not software-visualization researchers. The next step is to give it to developers on their own repos and find out whether a city on the desk actually helps them understand a codebase their agent is changing, and which parts (the fire, the hot spots, the streets) they really use.

Code

Open source (MIT): https://github.com/saurabh4269/repo-city

Built With

  • basis-universal
  • canvas-2d
  • git
  • glsl
  • hand-tracking
  • iwer
  • iwsdk
  • javascript
  • ktx2
  • meta-quest-3
  • mixed-reality
  • node-test
  • node.js
  • passthrough
  • plane-detection
  • python
  • quest-browser
  • spatial-anchors
  • three.js
  • typescript
  • typescript-compiler-api
  • vite
  • web-audio-api
  • web-speech-api
  • webxr
Share this project:

Updates

Submission history