Inspiration

Every architect has a version of this story. A door moves a metre on a revision, the drawings go out, and the first time someone opens it on site it slams into the furniture. The clearance check is easy once you know to do it. What gets missed is that a "small" move changed the answer, and that three other drawings now disagree with the plan.

We wanted a rehearsal step between "I moved it" and "it's issued".

What it does

PLANRIFT is a revision consequence studio for simplified room geometry. You propose a change, the engine computes what it breaks, you see which drawings need a person, compare alternatives, and record the decision.

In the fictional Aster House Hotel sample, door D-101 (850 mm leaf) opens toward console F-07:

  • Exact swing clearance. Approved plan, hinge at 1,700 mm: 1,083.7 mm clear. Revision A, hinge at 3,000 mm: the leaf strikes the console after 15.7° and would push 188.7 mm into it. Revision B, 2,400 mm: full 90° swing, 391.5 mm clear.
  • Hinge map. A strip along the wall shows the result at every position the door could take.
  • One model, two views. The SVG plan and the WebGL study model are rendered from the same scene and the same analysis, so they cannot disagree. You can drag the door in either.
  • Drawings to reissue. The sheets linked to D-101 (floor plan A-101, elevation A-401, door schedule D-01) are flagged Review required. PLANRIFT never edits them, and the sheet for room 513 stays unflagged.
  • Compare, decide, keep a receipt. Branch scenarios from the approved revision, compare them side by side, submit for review, acknowledge the flagged sheets and accept. The decision becomes a receipt (JSON or printable HTML) with fingerprints of the scene before and after.
  • Honest limits. Rotated furniture, sliding doors and swings other than 90° are reported as Unsupported, never Pass. PLANRIFT does not claim code compliance, construction approval or CAD/BIM import.

Why Frankenstein: it stitches together parts that normally live in separate tools: a CAD-style plan editor, a computational-geometry engine, a live 3D room, revision control, a document ledger and an audit trail. They share one scene and one analysis, so a single edit flows through all of them at once.

How we built it

  • Engine (src/domain, pure TypeScript, no React): a zod schema in integer millimetres, a signed-separation solver between the door's swept quarter-disc and rectangles, status rules, revision diff, impact ledger, scenarios, receipts and SHA-256 scene fingerprints. Every status is decided by an exact integer predicate, for example 437,300 < 849² = 720,801 ⇒ conflict. Floats are used only for display.
  • Render models (src/render): the plan and the 3D scene both derive from (scene, analyzeScene(scene)), and tests check that they agree.
  • Interface: Next.js 16 App Router, React 19 and zustand; the plan is plain SVG; the study model is React Three Fiber with soft shadows; the landing page scroll story uses GSAP and Lenis. A default-src 'self' CSP and no analytics, remote fonts or CDNs.
  • Verification: 83 Vitest unit and property tests (fast-check, independent oracles, metamorphic checks, cases at the tolerance edges), 13 Playwright checks on desktop and phone, and axe accessibility checks on both pages.
  • Built with Kiro from an empty folder: five specs, nine steering files, seven custom agents and six hooks (details in the technology section below).
  • The demo video was recorded frame by frame from the deployed app with Playwright and edited in Remotion. Its opening animation is drawn from the engine's real output.

Challenges we ran into

  • Making "exact" mean exact. A status must not flip at a boundary because of floating-point noise, so every decision became an integer predicate and the tests probe the tolerance edges.
  • Keeping the 2D plan and the 3D model in agreement without duplicating geometry in components.
  • Our first interface passed every test and still looked like a generic dashboard. We rebuilt it around a white architectural study model, with motion that explains the result.
  • Recording smooth WebGL footage on a laptop with no GPU. We froze the page clock and captured one frame at a time.

Accomplishments that we're proud of

  • The production engine matches a hand-computed oracle table, and no test special-cases the demo coordinates.
  • A door you can drag in 3D whose result updates live, on desktop and on a phone.
  • A complete loop from proposal to receipt, with no sign-in.

What we learned

Honest scope is a feature. Unsupported beats a confident wrong answer, and flagging a drawing for a person beats pretending to update it. We also learned how much hooks change agent work: once tests gate every task, review shifts from catching slips to judging ideas.

What's next for PLANRIFT

More door types and swing angles, rotated furniture, multi-room scenes, and importing plans from common formats, each behind the same exact-geometry contract.

Built With

Share this project:

Updates

Submission history