Skip to content

Designs that compile.A declarative language for floor plans.

Floor plans as code. Your AI writes ArchLang; the compiler draws a precise, dimensioned plan and tells it what's wrong.

Use it in ChatGPTArchLang app in ChatGPT · no installOpen ↗
Copy the prompt for your agent
1. Run: npx -y skills add ChanMeng666/archlang --yes
2. Run: npx -y @chanmeng666/archlang spec   (read it before writing anything)
3. Write my floor plan as plan.arch from this brief: <describe rooms, areas, adjacencies>
4. Run: npx -y @chanmeng666/archlang compile plan.arch -o plan.svg --json
   then describe plan.arch --json, validate plan.arch --strict --json (same prefix); fix, recompile
5. Run: npx -y @chanmeng666/archlang finish plan.arch, then compile again to export.
Starting from a photo or PDF? Read https://archlang.uk/from-an-image. To change one room without moving the others, use `impact --lock` (https://archlang.uk/edit-one-room).

35 example plans, every one compiled and checked in CI · SVG · PDF · DXF · PNG · MIT

The brief, as given to Claude Fable
Design a studio flat of about 35 m² for one person. It needs one main living/sleeping room, a separate bathroom, and a small entrance hall with the front door. Put a kitchenette along one wall of the main room. The main room needs at least one window.
studio.arch · written by Claude Fablecompiled
plan "Studio 35" {
  units mm
  grid 50
  paper A3 landscape
  scale 1:50
  north up
  dims auto overall
  schedule rooms
  legend

  # Rooms (centreline dimensions): 25 + 4 + 6 = 35 m²
  room id=r_main at (0,0)       size 5000x5000 label "Living / Sleeping" uses living bedroom kitchen
  room id=r_hall at (5000,0)    size 2000x2000 label "Hall"              uses hall entry
  room id=r_bath at (5000,2000) size 2000x3000 label "Bath"              uses bath

  # Exterior shell as four named straight walls, plus two partitions.
  wall id=w_north exterior  thickness 200 { (0,0) (7000,0) }
  wall id=w_east  exterior  thickness 200 { (7000,0) (7000,5000) }
  wall id=w_south exterior  thickness 200 { (0,5000) (7000,5000) }
  wall id=w_west  exterior  thickness 200 { (0,0) (0,5000) }
  wall id=w_part  partition thickness 100 { (5000,0) (5000,5000) }
  wall id=w_hb    partition thickness 100 { (5000,2000) (7000,2000) }

  # Front door into the hall; hall -> main room; hall -> bath.
  door id=d_front on w_north at 6000 width 900 hinge near end swing into r_hall
  door id=d_main  on w_part  at 1000 width 900 hinge near start swing into r_main
  door id=d_bath  on w_hb    at 1000 width 800 hinge near end swing into r_bath

  # Windows: two for the main room, one for the bath.
  window id=win_w on w_west  at 50%  width 1500
  window id=win_s on w_south at 2500 width 1500
  window id=win_b on w_east  at 4400 width 600

  # Kitchenette along the north wall of the main room: sink, counter, stove, fridge.
  # (`offset` is the piece's centre along the wall.)
  furniture kitchen_sink against wall w_north offset 600  size 800x600 in r_main
  furniture counter      against wall w_north offset 1300 size 600x600 in r_main
  furniture stove        against wall w_north offset 1900 size 600x600 in r_main
  furniture fridge       against wall w_north offset 2600 size 700x650 in r_main

  # Living / sleeping furniture, clear of the door swing from the hall.
  furniture bed      in r_main anchor bottom-left  inset 300 size 1500x2000 label "Bed"
  furniture sofa     in r_main anchor bottom-right inset 300 size 2000x900  label "Sofa"
  furniture wardrobe in r_main anchor right        inset 300 size 600x1800  label "Wardrobe"

  # Bathroom: basin and WC on the east wall, shower in the south-west corner,
  # leaving the strip inside the door clear.
  furniture basin  against wall w_east offset 2500 size 600x450 in r_bath
  furniture wc     against wall w_east offset 3300 size 400x700 in r_bath
  furniture shower in r_bath anchor bottom-left flush size 900x900

  title {
    project "Studio flat, 35 m²"
    drawn_by "ArchLang"
    date "2026-10-09"
  }
}
Studio 353 rooms35 m²
Living / Sleeping 25.0 m² Hall 4.0 m² Bath 6.0 m² 7200 5200 ROOM SCHEDULE NO. NAME AREA (CENTRELINE, m²) NET AREA (m²) 01 Living / Sleeping 25.00 23.28 02 Hall 4.00 3.42 03 Bath 6.00 5.27 TOTAL 35.00 31.97 LEGEND poche wc basin shower kitchen_sink counter stove fridge bed wardrobe sofa N 01 m PROJECTStudio flat, 35 m²DRAWN BYArchLangDATE2026-10-09SCALE1:50

Same source, plan and 3D preview

The 3D preview is extruded from the same .arch file by the separate archlang-3d package, and checked against the plan: every 3D element comes from the plan's elements, and every solid is closed.

The plan: furnished-flat.arch, compiled to SVG.
The plan · furnished-flat.arch
The 3D preview of furnished-flat.arch, from the same source as the plan.
The 3D preview · its drafting-order replay

3D preview: walls, openings, floors, stairs, furniture, outdoor surfaces and fences in flat colours; the ground is a backdrop the viewer draws, not part of the building and not in the file; no pitched roofs or balcony railings yet, and no sections, elevations or BIM.

Why use it

Exact.

Areas and reachability are computed, not estimated; the same text gives the same drawing, byte for byte.

Laneway House, compiled with its dimensions
describe() on laneway-house.arch
RoomAreaNetReachable
Living / Kitchen27.3 m²25.52 m²yes
Bath8.25 m²7.4 m²yes
Bedroom13.2 m²12.13 m²yes

Change one line, see what moved.

Edit a number and only what depends on it moves; impact --lock proves the rest didn't.

knob-flat.arch with BEDROOM = 3300BEDROOM = 3300
knob-flat.arch with BEDROOM = 3900BEDROOM = 3900
impact: 8 elements moved, 8 held. --lock r_live,r_hall,d_front: nothing locked moved.

It checks itself.

An unreachable room or an opening off its wall comes back as a message with a code and a fix your AI can apply; checks other than reachability and area are advisory.

The checks → · Error codes →

knob-flat.arch without its line window on r_bed.top: the compiler raises W_BEDROOM_NO_WINDOW, and the site highlights the room it namesraised
knob-flat.arch as it is: W_BEDROOM_NO_WINDOW is not raisedcleared
W_BEDROOM_NO_WINDOW Bedroom "Bedroom" has no window.
Fix: Add a window on an exterior wall of the room.

What writing it as a language gives you

Rooms, walls, doors and windows have names, so the compiler can measure each room and check how the rooms connect. Some mistakes — an unreachable room, an opening off its wall — come back as a message with a code that points at the exact place in the text, often with a fix your AI can apply; other checks are advisory. The same text gives the same bytes every time, and impact shows which parts of the drawing a change moved.

How it works

  1. Ask your AI

    Describe the plan in a sentence or a paragraph: the rooms, their sizes, what opens onto what.

  2. It writes ArchLang and checks it

    Your AI writes a short text file, compiles it, reads the areas and messages the compiler returns, and fixes what they point at.

  3. SVG, PDF, DXF or PNG

    A dimensioned drawing in SVG, PDF or DXF, or PNG with one optional download; the same text gives the same file every time.

Ask ChatGPT. Add the ArchLang app in ChatGPT, then describe the plan you want. ChatGPT writes ArchLang, the compiler draws the plan and reports what is wrong, and ChatGPT can fix it from that message. Nothing to install; you need a ChatGPT account.

ArchLang app in ChatGPT ↗no install

Then ask, for example:

Draw a two-bedroom flat of about 75 m² as an ArchLang plan, and check it.

What comes back: the compiled plan, each room labelled with its area, and any problems the compiler found.

Every way in, one screen each: Get a floor plan from your AI.

ArchLang, from plan to 3D — a floor plan that checks itself, then stands up · watch on YouTube ↗ · the player loads from YouTube when you press play.

What it is, and what it isn't

What it isWhat it isn't
A text language for floor plans: rooms, walls, doors, windows and furniture in millimetres, in a file you can diff.Not CAD software: the compiler draws plans, and the 3D preview is a separate package's flat-colour preview. Heights draw nothing in the plan; there are no sections or elevations.
A 3D preview from the same source (the separate archlang-3d package): walls, openings, floors, stairs, furniture, outdoor surfaces and fences in flat colours.Not a renderer, not BIM: no pitched roofs or balcony railings yet, no sections or elevations.
A compiler from that text to SVG, PDF and DXF offline; PNG with one optional download. The same text gives the same bytes.Not a CAD interchange tool: DXF is a one-way export. There is no DXF or DWG import.
A checker: describe reports areas and reachability, and lint returns messages, each with a code and, where there is one, a fix.Not a permit or compliance product: every check other than reachability and area is advisory.
The format an agent emits when it needs a floor plan: a CLI with JSON output, an MCP server and a skill.Not an image reader: your AI reads a photo or a PDF and writes ArchLang from it.
Open: MIT licensed, zero runtime dependencies, and it runs in Node, in the browser and in CI.Not BIM: there is no IFC import or export.
Explicit about edits: finish fills what a plan left empty, and runs when you ask it to.Not a layout solver: the compiler draws what the source says. No optimiser, no auto-layout.

Limits. Plan drawings only (no 3D in the core, no BIM/IFC, not permit drawings); it does not read images (your AI can: /from-an-image); clearances are advisory.

describe() & lint

Reads its own plans

A plan compiles to a drawing and to facts: describe() returns rooms, areas, adjacency and an access graph, and lint() says what is wrong. An agent reads them without an image.

GARDEN LOFT · A-201 · SCALE 1:50
Living / Kitchen 21.0 m² Bedroom 9.0 m² Bath 5.0 m² 2850 900 1050 600 1800 4200 2800 7200 3000 1400 800 3200 1800 5200 1600 1800 2100 1200 500 4200 2800 7200 100 200 N 02 m PROJECTGarden LoftDRAWN BYArchLangDATE2026-08-16SCALE1:50
garden-loft.archOpen in Playground ↗
Room schedule← describe()
RoomUseAreaAdj.
Living / Kitchenliving, kitchen21 m²2
Bedroombedroom8.96 m²2
Bathbath5.04 m²2
Total3 rooms35 m²7

3 doors · 4 windows · an entrance · every room reachable

// built for agents

An interface, not just an image.

Every archlang command takes --json and returns a deterministic exit code; archlang context prints the language, the workflow and the error catalog as one bundle for a system prompt (llms-full.txt); and SKILL.md is the write → compile → describe → repair loop an agent follows.