ex:Lamp
The root tag is the type.
BlockML is a language for ideas. You write them as Blocks in .bml files — readable by people, writable by LLMs, precise enough for machines.
<ex:Lamp xmlns="http://blockml.org/bml"
xmlns:core="org.blockml.bml.core"
xmlns:ex="com.example.bml">
<baseType>
core:Block
</baseType>
<is>
A lamp with a brightness
</is>
<properties>
<brightness type="Integer">
<value>80</value>
</brightness>
</properties>
</ex:Lamp>
The snippet above is a complete Block, not a sketch of one. The root tag is the type. Then come baseType, is, and the members that belong to it.
ex:Lamp
The root tag is the type.
baseType
What it extends.
is
One sentence of meaning.
properties
The values that belong to it.
A Lamp is not a bag of fields. It is made of other Blocks — a shade, a bulb — in the same language.
<ex:Lamp xmlns="http://blockml.org/bml"
xmlns:core="org.blockml.bml.core"
xmlns:ex="com.example.bml">
<baseType>
core:Block
</baseType>
<is>
A lamp made of nested parts
</is>
<aggregations>
<parts type="ex:Part">
<composition>
<ex:Shade />
<ex:Bulb />
</composition>
</parts>
</aggregations>
</ex:Lamp>
Worlds add domain types. They do not invent a new language.
<mb:Brick2x4 xmlns="http://blockml.org/bml"
xmlns:core="org.blockml.bml.core"
xmlns:mb="com.machineblocks.bml">
<baseType>
core:Block
</baseType>
<is>
A 2×4 building brick
</is>
<properties>
<color type="Text">
<value>Red</value>
</color>
</properties>
</mb:Brick2x4>
<app:HomeScreen xmlns="http://blockml.org/bml"
xmlns:core="org.blockml.bml.core"
xmlns:app="com.metaphone.bml">
<baseType>
core:Block
</baseType>
<is>
The app home screen
</is>
<properties>
<title type="Text">
<value>Inbox</value>
</title>
</properties>
</app:HomeScreen>
The Idea stays one Block. HTML, STL or firmware is an implementation detail.
Run npx @blockml/cli init with a package FQN, then install and validate. Open the folder in Cursor or Claude Code.