Inspiration
Construction sites lose millions of dollars every year not because of bad engineering, but because of bad spatial decisions , materials staged in the wrong place, workers crossing each other's paths, deliveries arriving in the wrong order. These aren't complex problems. They're coordination problems. And yet, in an industry worth trillions globally, the standard tool for solving them is still a site manager's memory and a hand-drawn sketch. We kept asking ourselves, if Claude can read an image and understand text at the same time, why couldn't it look at a real floor plan, read a real schedule, and tell you exactly where to put things this week? That question became SpatialFlow.
What it does
SpatialFlow is an AI-powered construction site logistics tool. A site manager uploads their floor plan and pastes in their project schedule. They select the current week. Within seconds, Claude has read the actual site plan image, understood the schedule context, and returned a structured set of recommendations:
1.Temporary zone placements - where to stage materials, position equipment, and set up storage, with location descriptions that reference real features visible in the plan
- Worker access paths - named routes from site entry to each work zone, with node-by-node routing, worker counts, and a description of what each path avoids
- Freeform Q&A - any spatial logistics question answered in plain language, grounded in the actual site plan
- Disruption replanning - when something goes wrong, a full revised schedule with a hard constraint of idle days=0 The delivery sequence is always taken from the project schedule as-is. We made a deliberate decision not to reorder deliveries , those sequences are fixed by supplier agreements and trade dependencies the site manager has already negotiated. Reordering them based on spatial reasoning alone would create more problems than it solves.
How we built it
The stack is intentionally minimal:
- Backend: A single Python file (server.py) running Flask, with four endpoints each making one Claude API call via Anthropic's Python SDK 2.Frontend: Plain HTML, CSS, and JavaScript - no framework, no npm, no build step 3.AI: claude-opus-4 for all inference, using both text and image inputs in the same call
Every Claude call follows a two-part prompt structure. The system prompt sets the persona and enforces a strict JSON output contract. The user prompt injects live context like week number, materials, schedule text, and the base64-encoded site plan image. The full expected response schema is embedded directly in the prompt, so Claude fills a known structure rather than inventing its own. The most important single line in the entire codebase is a constraint we embed in every layout generation prompt: "You are NOT redesigning the site. You are recommending TEMPORARY placements only for this week." Without this line, the model produces architectural suggestions. With it, it produces logistics decisions. The difference between those two things is the difference between a tool that's interesting and a tool that's actually useful on a real site.
Challenges we ran into
1.Keeping Claude in scope:- The model's tendency to make architectural suggestions rather than logistics recommendations required careful prompt engineering. The final prompt went through more than a dozen iterations before the output was consistently scoped to temporary, week-level decisions. 2.Multimodal reliability:-When a site plan image is uploaded, the quality of Claude's spatial references depends heavily on how clearly the floor plan is drawn. Low-resolution or hand-sketched plans produce less specific location descriptions. We handle this gracefully , the prompt explicitly acknowledges whether an image is present and adjusts accordingly but it remains a limitation. 3.Balancing helpfulness with honesty:- Early versions of the disruption replanning feature were too optimistic ,Claude would recover n days lost with n days recovered, making the math always look clean. We had to push the model to be realistic about what can actually be pulled forward versus what is genuinely delayed, which required more explicit instructions about construction dependency logic.
What we learned
The biggest lesson was about scope. Our first instinct was to build something that did everything like delivery resequencing, permanent layout optimisation, multi-week planning, visual overlays. The more we tried to add, the worse everything got. The prompts became vague, the outputs became generic, and the tool stopped feeling trustworthy. The breakthrough came when we asked what is the one thing a site manager needs to know right now, this week, that they currently have no tool for? Everything outside that answer got cut. We also learned that multimodal input changes the quality of AI output more than almost any other variable. The difference between Claude answering "where should I stage rebar?" with a text-only prompt versus with an actual floor plan image is the difference between generic best practice and a specific, locationally grounded recommendation. That gap is where the real value lives.
What's next for SpatialFlow
ironsite.ai gives construction sites eyes with smart hard hats track exactly what's happening on the ground in real time. But that data currently sits in a dashboard waiting for a project manager to read it, interpret it, and manually adjust the site layout. SpatialFlow's next step is to consume that live productivity and movement data as a direct input to its layout generation. Instead of recommending zones based only on a schedule and floor plan, it would recommend zones based on what is actually happening where workers are clustering, which paths are being overused, where materials are sitting idle longer than planned. The result is a feedback loop that doesn't exist in construction today: real-world activity data from ironsite.ai flows into SpatialFlow, which generates an updated spatial plan, which the site manager acts on, which improves what ironsite.ai observes next week. ironsite.ai solves the observability problem knowing what is happening on site. SpatialFlow solves the planning problem knowing what should happen spatially. Together, they close the gap between observation and action, turning real-time site intelligence into faster, smarter spatial decisions automatically.
Log in or sign up for Devpost to join the conversation.