182 points chanmeng 3 days ago 57 comments
chanmeng 3 days ago | parent
You write plain-text `.arch` source describing walls, rooms, doors, windows and furniture, and it compiles — deterministically — to SVG, DXF and PDF. Same source in, byte-identical bytes out. It isn't a renderer that draws a nice picture: it's a compiler with a linter and a geometric validator, and `compile()` never throws. Errors come back as data, each with a byte span and, where the fix is mechanical, the edit that fixes it. This is what the library's `compile()` returns:
{
"code": "E_ATTACH_POS_RANGE",
"severity": "error",
"message": "Door \"d1\" attachment position 30000 mm is outside the wall run (0…18000)",
"fixes": [{
"title": "clamp the attachment position to 18000",
"applicability": "machine-applicable",
"edits": [{ "span": { "start": 170, "end": 184 }, "newText": "on w1 at 18000" }]
}]
}
That's what `arch fix` applies, and it's why a model can correct its own source without a human in the loop.The other half is that you can interrogate a plan without looking at it. `arch describe --json` gives rooms, exact areas, adjacency and an access graph; `arch lint --json` gives soundness warnings like `W_ROOM_DISCONNECTED` — "Room "Kitchen" has no door or opening — it can't be entered." A text-only model can check its own work.
The same source also gives a 3D preview. A separate package, archlang-3d, extrudes the compiled plan (walls, openings, floors, stairs, furniture, outdoor surfaces and fences in flat colours), checks it against the plan, and you can download it as a GLB from the playground or the CLI (the CLI validates it). It's a preview of the plan, not a renderer: stairs are built from the plan's own geometry, there are no pitched roofs or balcony railings yet, and no sections, elevations or BIM. It's in the playground, and there's a page with a few plans beside their 3D previews: https://archlang.uk/3d
Why a DSL, and why I think it matters right now. The thing that pushed me to build this is the way image-generating AI "design" tools output a picture you have to take on faith. When Adam launched its text-to-CAD tool here (https://news.ycombinator.com/item?id=48572553), the sharpest criticism was that the demo models looked like the thing but weren't manufacturable, and that natural language is a poor way to specify tolerances and constraints. A DSL is my answer to that. When a model writes ArchLang, its output isn't a hallucinated picture — it's source you can read, diff, version-control, and correct, and the compiler mechanically checks it. (I want to be honest: whether that auditability is worth paying for is a hypothesis I'm testing, not a settled fact.)
If the comparison helps: it's the Typst-and-LaTeX bargain applied to a drawing. The source is the thing you keep; the drawing is what the compiler makes of it.
Honest limitations, up front:
- The language draws a plan, and only a plan. Heights, sills and heads exist in the language, but they draw nothing — a floor plan is a horizontal cut. No sections, no elevations: a plan-level `section` mark draws only the cut line and the look direction, not a section drawing. The 3D preview is a separate package that extrudes the compiled plan: flat colours, stairs from the plan's own geometry, no pitched roofs or balcony railings yet, and you do not edit it.
- No BIM, no IFC, no round-trip. DXF export is one-way, for a draftsperson to open. Importing a building model back isn't something it does today.
- No structural, no MEP, no code compliance — and that last one is a deliberate refusal, not a gap. Asserting standards compliance is a liability claim I won't make.
- Three things are measured; the rest is advisory, and the code says so. Reachability (a real modeled access graph), areas (shoelace arithmetic), and byte-identical determinism are facts. Clear widths and walk distances are computed on a coarse grid and are explicitly advisory — the ADR calls them that. I'd rather tell you which numbers to trust than let you assume all of them.
- This is a concept/schematic tool, not a permit set. The output is dimensioned, internally consistent and exports to real CAD, but it is not stamped construction documents and you can't pull a permit from it. Anyone claiming their AI tool produces permit-ready drawings is overselling.
- Solo maintainer, MIT-licensed, 97 GitHub stars. Bus factor of one, and I'd rather say so than have you find out. The license is chosen precisely so the format outlives me if it's worth keeping.
Touch it here (no signup, no waitlist):
- Playground (compiles in your browser, nothing sent to a server): https://playground.archlang.uk
- Docs: https://archlang.uk
- Source (MIT): https://github.com/ChanMeng666/archlang
- `npx @chanmeng666/archlang compile plan.arch` — no required runtime dependencies (PNG and PDF use optional ones). There's also a VS Code extension and an MCP server (`npx -y @chanmeng666/archlang-mcp`, or hosted at `https://mcp.archlang.uk/mcp` with no sign-in; the hosted one returns SVG, text and Plan JSON, while DXF and PDF come from the CLI) so an agent can compile and lint against it directly.
I also built a commercial product on top of this (an AI tool that writes ArchLang for people planning a build) — happy to talk about it if asked, but ArchLang itself is the thing I'm showing today, and it stands alone. Ask me anything, especially the hard questions about what it can't do.
speps 8 hours ago | parent
bklyn11201 8 hours ago | parent
What needs to be done to make this USA friendly (e.g., measurements and code compliance)? Are you looking for PRs or issues?
What is your take on other recent projects in the space like MutinyBIM or OpenTakeoff?
jgord 4 hours ago | parent
RonanSoleste 4 hours ago | parent
brudgers 1 day ago | parent
jstanley 10 hours ago | parent
jiggunjer 10 hours ago | parent
arendtio 10 hours ago | parent
larodi 10 hours ago | parent
Hasz 10 hours ago | parent
A couple thoughts:
- 3d render seems borked, windows/doors show as flat void floating in space.
- I am personally much more interested in the mechanicals and structural design than things like rugs. US standards are going to be quite different than the UK, eg cavity walls frammed 24-16" OC vs whatever the UK uses.
- units :)
- it would be cool to have your integrated ide highlight the render, eg if I click on
``` furniture sofa in r_live anchor bottom-left flush inset 250 size 900x2000 label "Sofa" ```
I see that object highlighted.
- electrical, plumbing, hvac penetrations planning is imo quite important, along with a DRC system to check you comply with xyz code.
- multiple floors would be cool
Anyways, 2c driveby comments, cool project.
hard_times 10 hours ago | parent
bttf 10 hours ago | parent
sondr3 9 hours ago | parent
zdc1 9 hours ago | parent
Code__Block 9 hours ago | parent
CyLith 9 hours ago | parent
I have been trying to vibe code a proof of concept house-to-cad system where you feed it measurements and it uses a SLAM-like process to reconcile your measurements into a coherent house model. If anyone knows of something, let me know. Or please make it!
taylorfinley 9 hours ago | parent
davedigerati 4 hours ago | parent
taylorfinley 3 hours ago | parent
It's designed with full human/agent parity, so every tool has a human UI and an agent UI that can be driven over MCP.
It's also user extensible, we have a bunch of tool types supported. You can link your agent to your tool's user manual and your agent will create a tool definition for your particular model's specifications/constraints, and you'll never be shown a cut you can't actually make.
You can also submit a tool definition for a tool type we don't yet support and I'll get it modeled and rigged and build the ui and animations for it (my target SLA is 48h from me getting the "unsupported tool type definition submitted" page to "tool is live in app"). This is how I discovered people wanted planers and jointers and belt sanders.
roel_v 8 hours ago | parent
bloopernova 7 hours ago | parent
roel_v 7 hours ago | parent
If you want you can email me and I'll send you the Blender file and you can have a look. It did things like program parts of the Blender user interface so that I could have predefined views, and checkboxes or dropdowns (so that I can turn off the front wall or the side wall, so that I could have cutaways through my house, that sort of stuff).
I wish I could say that I thought of it myself to have it program this sort of stuff into Blender but it actually came up with that itself so I can't even take credit for that.
One thing that I did do is tell it, "Hey, some of the furniture that you found in these videos is from IKEA. If you recognize those, look on the IKEA website and you can use the dimensions for reference for measurements of the other things." It actually worked quite well even. Amazing.
veverkap 6 hours ago | parent
roel_v 6 hours ago | parent
In fact what I did was even more low-effort. I just took a video with my phone. I have Dropbox on my phone. It automatically uploads and synchronizes with my desktop so I just told Codex, "Look on my camera uploads on my local Dropbox and analyze the latest video I took 10 minutes ago." I use that workflow often nowadays, with photis and videos.
bloopernova 6 hours ago | parent
maxdo 3 hours ago | parent
sneak 4 hours ago | parent
roel_v 3 hours ago | parent
davedigerati 4 hours ago | parent
roel_v 3 hours ago | parent
sobellian 1 hour ago | parent
My employer does prefab steel wall framing. We take laser scans of the as-built to ensure proper fit among other things.
sterlinm 5 hours ago | parent
I've got blueprints and 3d models from the original design of the house, but there are many discrepancies and I want a system for reconciling things using some sort of probabilistic framework.
Two semi-relevant projects that caught my eye when researching this:
https://github.com/pascalorg/editor/tree/main https://arxiv.org/html/2611.34932v1
origini 9 hours ago | parent
I will check it out for my current project:
Personal digital twin.
Designing and building a virtual twin of my flat and my future house i want to be able to plan my dream farm before i can afford it and it will allow me to priotize things like a greenhouse over a forge etc.
And depending if i will ever have the money or have to rebuild something: it should be possible to autogenerate random layouts of a perfect house. Like if your test case is waking up, dressing then going outside and coming in dirty for lunch, all of them have pathes and costs etc. and depending on how often you do, you might be able to plan and get a bauhaus style idea out of it.
gwt4life 9 hours ago | parent
pwarner 9 hours ago | parent
darccio 9 hours ago | parent
I think it's a really cool execution.
asibahi 8 hours ago | parent
I expected some sort of solver where you list the rooms and their sizes and their requirements (window/no window) and it would give you a floor plan.
This is just good old drawing by text.
js8 8 hours ago | parent
DrNosferatu 8 hours ago | parent
hk1337 8 hours ago | parent
anentropic 8 hours ago | parent
and the other week here there was a vibecoded open clone of SketchUp
this looks worth a try
tomaytotomato 8 hours ago | parent
sheepscreek 8 hours ago | parent
I might hack away at it - add drag drop items on the 2D chart (such as from Nvidia's vast 3D items collection on Hugging Face[1]), or just have LLM write it in code, then adding a 3D walkthrough becomes trivial. You've already done 95% of the work for it!
owenpalmer 2 hours ago | parent
[1]: https://huggingface.co/datasets/nvidia/simready-assets/blob/...
exabrial 7 hours ago | parent
Can we please not do infinite scroll in all dimensions anymore? Apple can't even make it not suck. It was terrible then, and it was even worse when we all endured Figma.
Normal books have pages. If you print, you'll have pages. Pages are great!
cauterize 5 hours ago | parent
Multicomp 5 hours ago | parent
0fflineuser 5 hours ago | parent
I used sweethome3d to design the plan of my house. I used blender to add the lights and to generate the renders for each light when on/off and gimp to add buttons that I can click once the floor plan is imported in home assistant.
Each of these has app have mcp that are available, blender is a first party one but not the other 2 but they still work great and it did speed up the process quite a bit.
I guess this could have been a good alternative to sweethome3d even though sweethome3d really is very very simple to use.
rpastuszak 4 hours ago | parent
And it looks really well: exact shape/dimensions, materials, light, raytraced rendering for screenshots. You can walk around (FPP), control the environment incl. the lights, and even grab a beer from the fridge (and you have to put it in a recycling bin). It's honestly quite impressive given that he doesn't code. (He is a designer, however, and he used SH3D before.)
Personally, I would lean towards keeping the plans in dsl because it's easier for me to tweak, but I don't think he's regretting his technical choice. And I think I overcomplicate things.
Regarding rendering: I also noticed that Opus is quite decent at reconstructing plans from a screenshots and then cleaning them up, turning into whatever presentation later.
Btw, did you try using image generation to control lighting instead of Blender? I noticed that the new nano banana does a really good job at this (i.e. in my case, the generated lighting was weirdly realistic).
owenpalmer 1 hour ago | parent
1. Verify regulatory compliance based on the parcel where the house is intended to be built.
2. Generate the plan down to the materials, where each piece of wood goes, where each nail goes.
3. Generate plans for electrical, pluming, HVAC, etc.
Could we get to the point where you input your floor plan, heck -- outputs from your diffusion model, and get a book of LEGO-like instructions for how to DIY build your dream cabin?
Let me dream a little. Will engineering and design become a game of seamlessly traversing across your preferred level of abstraction to specify your intended result? We seem to be almost there, the "seamlessly" part is what appears to be missing.