Skip to content

Next Gen STEP AP242 Native-ish BREP Geometric Modeling Kernel

Update firmament-author-rules.md

Yuechen Li0e13392e487e
diff --git a/docs/firmament-author-rules.md b/docs/firmament-author-rules.md
index 839f520c..998f898a 100644
--- a/docs/firmament-author-rules.md
+++ b/docs/firmament-author-rules.md
@@ -10,15 +10,13 @@ The goal is to maintain **stable canonical examples** of the Firmament DSL.
`.firmament` files must not contain JSON object literals.
-### Forbidden
-
-```json
+Forbidden example:
+```
{
"firmament": { "version": "1" },
"ops": []
}
-````
-
+```
Always use canonical indentation syntax.
---
@@ -26,7 +24,6 @@ Always use canonical indentation syntax.
# Rule 2 — Follow canonical section order
Top-level sections must appear in this order:
-
```
firmament
model
@@ -34,7 +31,6 @@ schema (optional)
ops
pmi (optional)
```
-
Do not reorder sections.
---
@@ -44,25 +40,22 @@ Do not reorder sections.
Arrays must include their length.
### Correct
-
```
ops[0]:
```
-
```
size[3]:
1
2
3
```
-
### Incorrect
-
```
ops: []
+```
+```
size: [1,2,3]
```
-
---
# Rule 4 — Operation entries must use object blocks
@@ -70,22 +63,18 @@ size: [1,2,3]
Each operation must appear as a block under `ops[n]`.
### Correct
-
```
ops[1]:
-
op: box
id: base
```
-
### Incorrect
-
```
ops:
box:
id: base
```
-
---
# Rule 5 — Always use `op:` field
@@ -93,27 +82,23 @@ ops:
Operations must explicitly declare the operation type.
### Correct
-
```
op: box
```
-
### Incorrect
-
```
box:
```
-
---
# Rule 6 — Do not invent new syntax
LLM authors must not introduce:
-* new keywords
-* alternate field names
-* shorthand operation syntax
-* JSON literals
+- new keywords
+- alternate field names
+- shorthand operation syntax
+- JSON literals
Use only documented shapes.
@@ -123,17 +108,15 @@ Use only documented shapes.
Files in:
-```
-testdata/firmament/fixtures/
-```
+`testdata/firmament/fixtures/`
serve as language examples.
When editing them:
-* maintain canonical formatting
-* keep them minimal and readable
-* avoid stylistic variation
+- maintain canonical formatting
+- keep them minimal and readable
+- avoid stylistic variation
---
@@ -151,11 +134,12 @@ When generating new examples:
`.firmament` files must not include:
-* C#
-* JSON
-* YAML comments
-* scripting code
-* host-language constructs
+- C#
+- JSON
+- scripting code
+- host-language constructs
+
+Comments are not currently supported in `.firmament` files.
---
@@ -163,10 +147,6 @@ When generating new examples:
Before generating or modifying `.firmament` source, read:
-```
-docs/firmament-language-shape.md
-```
+`docs/firmament-language-shape.md`
That document defines the canonical syntax.
-
-```