> ## Documentation Index
> Fetch the complete documentation index at: https://docs.loft.build/llms.txt
> Use this file to discover all available pages before exploring further.

# loft

> A typed, declarative language for describing buildings as text that compiles to geometry and drawings.

loft is a language for describing buildings. You write typed, declarative
text; it compiles to a 3D model and to 2D drawings. Model files use the
`.loft` extension.

Think of it as TypeScript for buildings. The building is source, the drawings
are output, and nothing is ever drawn twice.

```loft theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/loft.json","/languages/loft-fragment.json"]}}
# An excerpt — a real file declares its walltypes and doortypes first.

# datums first — the framework everything else is measured from
level L1 elev 0' height 10'-0"
grid A vertical   at 0'
grid B vertical   at grid.A + 24'-0"    # the bay width, not grid B's coordinate
grid 1 horizontal at 0'

# then hosts — traveling (grid.A,grid.1) -> (grid.B,grid.1), heading east; right = south
wall EXT-1 W1 from (grid.A, grid.1) to (grid.B, grid.1) justify left

# then what they host — a typed product, placed off a datum
door 3070 D1 in wall.W1 at 4' past grid.A
```

Read the second grid line closely. It says the bay is twenty-four feet, not
that grid B sits at twenty-four feet. Widen the bay and everything downstream
follows. That distinction is the whole idea: the model stores the reasoning,
not just the result.

## Why text

A building model in a database is a file one program can open. A building
model in text is a file anyone can read, diff, review, and merge.

That buys the things construction has never had. You can see what changed
between two revisions, line by line. A subcontractor can propose a change and
the engineer of record can approve it, the way code review works. Drawings and
takeoffs compile from the model instead of being drawn beside it and kept in
sync by hand.

It also means an AI agent can read and write the model natively, because it is
text with a grammar rather than a proprietary binary.

## What it borrows, and what it does not

The element semantics come from Revit, deliberately. Location lines, hosting,
the category and type and instance ladder, cut planes. That is twenty years of
refined domain knowledge and there is no reason to reinvent it.

What changes is the container. Open, readable, versionable, and yours.

## Where to go next

The [cheat-sheet](/cheatsheet) is one screen and teaches the whole grammar. It
opens with the order to write things in, which is what most broken models get
wrong. [Placing elements](/placement) is the how-to: how to write a reference,
and how each kind of element is placed off one.

Every statement keyword has a page under [categories](/categories) describing
what it means, what it requires, and what you can measure from it.
[Errors](/errors) is the full registry of what the compiler can tell you and
why. [Taxonomy](/taxonomy) is the ontology underneath all of it.

## Where this is

v0. The language is real and the compiler runs, but the scope is deliberately
narrow: walls, openings, rooms, and plan views, on straight segments. No
curves, no roofs, no stairs, no MEP. The grammar is still moving, and it moves
when writing a real building reveals friction.

The playground at [loft.build](https://loft.build) is the fastest way to see
it work. Type on the left, watch the plan and the 3D model on the right.
