Next Gen STEP AP242 Native-ish BREP Geometric Modeling Kernel
Accept canonical analytic primitives and legacy casing in FEA parsing
Yuechen Li610788eef56d
diff --git a/Aetheris.CLI.Tests/FirmamentCanonicalDialectTests.cs b/Aetheris.CLI.Tests/FirmamentCanonicalDialectTests.csnew file mode 100644index 00000000..d3104d33--- /dev/null+++ b/Aetheris.CLI.Tests/FirmamentCanonicalDialectTests.cs@@ -0,0 +1,56 @@+using System.Text.RegularExpressions;++namespace Aetheris.CLI.Tests;++public sealed class FirmamentCanonicalDialectTests+{+ private static readonly Regex NonCanonicalVocabulary = new(+ @"(?m)^\s*(?:model|units|solid|modify|analysis|fixed|force|pmi)\b|\b(?:size|radius|height|body|material|region|components|vector|results|lattice|target|value|tolerance|datumrefs)\s*:",+ RegexOptions.CultureInvariant);++ private static readonly Regex FirmamentFence = new(+ @"```firmament\s*\r?\n(?<source>[\s\S]*?)\r?\n```",+ RegexOptions.CultureInvariant);++ private static readonly Regex OwnedSnakeCase = new(+ @"\b(?:body_resource|datum_refs|minimum_floor_thickness|counterbore_diameter|counterbore_depth|countersink_diameter|countersink_angle|inside_radius|k_factor|surface_family)\b",+ RegexOptions.CultureInvariant | RegexOptions.IgnoreCase);++ [Fact]+ public void CanonicalFixtures_UseOnlyCanonicalOwnedVocabulary()+ {+ var root = FindRoot();+ var files = Directory.GetFiles(Path.Combine(root, "fixtures", "Canonical"), "*.firmament", SearchOption.AllDirectories);++ Assert.NotEmpty(files);+ AssertNoViolations(files.Select(path => (path, File.ReadAllText(path))));+ }++ [Fact]+ public void PublicFirmamentExamplesAndSnippets_UseOnlyCanonicalOwnedVocabulary()+ {+ var root = FindRoot();+ var examples = Directory.GetFiles(Path.Combine(root, "docs", "public"), "*.md", SearchOption.AllDirectories)+ .SelectMany(path => FirmamentFence.Matches(File.ReadAllText(path)).Select((match, index) =>+ ($"{path}#firmament-{index + 1}", match.Groups["source"].Value)));+ var snippets = Path.Combine(root, "tools", "vscode-firmament", "snippets", "firmament.json");++ AssertNoViolations(examples.Append((snippets, File.ReadAllText(snippets))));+ }++ private static void AssertNoViolations(IEnumerable<(string Path, string Source)> sources)+ {+ var failures = sources.SelectMany(item =>+ NonCanonicalVocabulary.Matches(item.Source).Select(match => $"{item.Path}: noncanonical '{match.Value.Trim()}'")+ .Concat(OwnedSnakeCase.Matches(item.Source).Select(match => $"{item.Path}: Firmament-owned snake_case '{match.Value}'")))+ .ToArray();+ Assert.True(failures.Length == 0, string.Join(Environment.NewLine, failures));+ }++ private static string FindRoot()+ {+ var directory = new DirectoryInfo(AppContext.BaseDirectory);+ while (directory is not null && !File.Exists(Path.Combine(directory.FullName, "Aetheris.slnx"))) directory = directory.Parent;+ return directory?.FullName ?? throw new DirectoryNotFoundException();+ }+}diff --git a/Aetheris.FEA.Tests/ProductionFeaX1Tests.cs b/Aetheris.FEA.Tests/ProductionFeaX1Tests.csindex 4d24bd0b..f4b9e6b7 100644--- a/Aetheris.FEA.Tests/ProductionFeaX1Tests.cs+++ b/Aetheris.FEA.Tests/ProductionFeaX1Tests.cs@@ -12,20 +12,20 @@ public sealed class ProductionFeaX1Testsprivate const string CanonicalBeam = """Model CantileverWitness {Units: mm- solid beam: Box { size: [120, 20, 20] }+ Box beam { Size: [120mm, 20mm, 20mm] }Analysis LinearElastic Cantilever {- body: beam- material: Standard.Materials.Aluminum.6061_T6+ Body: beam+ Material: Standard.Materials.Aluminum.6061_T6Fixed Root {- region: beam.face(-X)- components: [X, Y, Z]+ Region: beam.face(-X)+ Components: [X, Y, Z]}Force Tip {- region: beam.face(+X)- vector: [0N, -100N, 0N]+ Region: beam.face(+X)+ Vector: [0N, -100N, 0N]}- results: [Displacement, Strain, Stress, ReactionForce]- lattice: [12, 2, 2]+ Results: [Displacement, Strain, Stress, ReactionForce]+ Lattice: [12, 2, 2]}}""";@@ -37,7 +37,14 @@ public sealed class ProductionFeaX1Testsvar legacy = FirmamentAnalysisCompiler.Compile(CanonicalBeam.Replace("Analysis LinearElastic", "analysis LinearElastic", StringComparison.Ordinal).Replace("Fixed Root", "fixed Root", StringComparison.Ordinal)- .Replace("Force Tip", "force Tip", StringComparison.Ordinal));+ .Replace("Force Tip", "force Tip", StringComparison.Ordinal)+ .Replace("Body:", "body:", StringComparison.Ordinal)+ .Replace("Material:", "material:", StringComparison.Ordinal)+ .Replace("Region:", "region:", StringComparison.Ordinal)+ .Replace("Components:", "components:", StringComparison.Ordinal)+ .Replace("Vector:", "vector:", StringComparison.Ordinal)+ .Replace("Results:", "results:", StringComparison.Ordinal)+ .Replace("Lattice:", "lattice:", StringComparison.Ordinal));Assert.True(canonical.IsSuccess, Describe(canonical));Assert.True(legacy.IsSuccess, Describe(legacy));Assert.Equal(canonical.Analysis!.Kind, legacy.Analysis!.Kind);diff --git a/Aetheris.FEA/Firmament/FirmamentAnalysisCompiler.cs b/Aetheris.FEA/Firmament/FirmamentAnalysisCompiler.csindex f6800e2d..6a6a5687 100644--- a/Aetheris.FEA/Firmament/FirmamentAnalysisCompiler.cs+++ b/Aetheris.FEA/Firmament/FirmamentAnalysisCompiler.cs@@ -104,10 +104,16 @@ public static class FirmamentAnalysisCompilerelse{var parse=FirmamentV2Parser.Parse(stripped,sourceDirectory);- var units=Regex.Match(stripped,@"\bunits\s*:?\s*(?<u>[A-Za-z]+)",RegexOptions.CultureInvariant|RegexOptions.IgnoreCase).Groups["u"].Value;- var boxHeader=Regex.Match(stripped,$@"\bsolid\s+{Regex.Escape(bodyName)}\s*:\s*Box\s*\{{",RegexOptions.CultureInvariant|RegexOptions.IgnoreCase);- if(!boxHeader.Success){diagnostics.Add(Error("firmament-analysis-body-unsupported",$"Body '{bodyName}' is not a Firmament Box/box-with-hole solid.",sourcePath));return Done(null,diagnostics,started);}- var boxOpen=stripped.IndexOf('{',boxHeader.Index);var boxClose=MatchingBrace(stripped,boxOpen);var sizeRaw=Numbers(Scalar(stripped[(boxOpen+1)..boxClose],"size"));+ var parsedBox=parse.Document?.Solids.SingleOrDefault(item=>item.Name==bodyName)?.Box;+ var units=parse.Document?.Units??Regex.Match(stripped,@"\bunits\s*:?\s*(?<u>[A-Za-z]+)",RegexOptions.CultureInvariant|RegexOptions.IgnoreCase).Groups["u"].Value;+ double[] sizeRaw;+ if(parsedBox is not null)sizeRaw=parsedBox.Size.ToArray();+ else+ {+ var boxHeader=Regex.Match(stripped,$@"\bsolid\s+{Regex.Escape(bodyName)}\s*:\s*Box\s*\{{",RegexOptions.CultureInvariant|RegexOptions.IgnoreCase);+ if(!boxHeader.Success){diagnostics.Add(Error("firmament-analysis-body-unsupported",$"Body '{bodyName}' is not a Firmament Box/box-with-hole solid.",sourcePath));return Done(null,diagnostics,started);}+ var boxOpen=stripped.IndexOf('{',boxHeader.Index);var boxClose=MatchingBrace(stripped,boxOpen);sizeRaw=Numbers(Scalar(stripped[(boxOpen+1)..boxClose],"size"));+ }if(sizeRaw.Length!=3){diagnostics.Add(Error("firmament-analysis-body-size-invalid",$"Body '{bodyName}' requires three Box dimensions.",sourcePath));return Done(null,diagnostics,started);}var scale=UnitScale(units);if(scale is null){diagnostics.Add(Error("firmament-analysis-length-unit-unsupported",$"Analysis body length unit '{units}' is unsupported; use mm, cm, or m.",sourcePath));return Done(null,diagnostics,started);}var size=sizeRaw.Select(value=>value*scale.Value).ToArray();var bounds=new BoundingBox3D(new(0,0,0),new(size[0],size[1],size[2]));diff --git a/Aetheris.Kernel.Firmament.Tests/FirmamentV2CanonicalGrammarTests.cs b/Aetheris.Kernel.Firmament.Tests/FirmamentV2CanonicalGrammarTests.csindex 3cd4c9e6..c093d605 100644--- a/Aetheris.Kernel.Firmament.Tests/FirmamentV2CanonicalGrammarTests.cs+++ b/Aetheris.Kernel.Firmament.Tests/FirmamentV2CanonicalGrammarTests.cs@@ -19,6 +19,41 @@ public sealed class FirmamentV2CanonicalGrammarTests}}+ [Theory]+ [InlineData("Sphere Body { Radius: 7.5mm }", "solid Body: Sphere { radius: 7.5mm }")]+ [InlineData("Cone Body { BottomRadius: 6mm TopRadius: 0mm Height: 18mm }", "solid Body: Cone { bottomRadius: 6mm topRadius: 0mm height: 18mm }")]+ [InlineData("Torus Body { MajorRadius: 12mm MinorRadius: 3mm }", "solid Body: Torus { majorRadius: 12mm minorRadius: 3mm }")]+ public void CanonicalAnalyticPrimitiveAndCompatibilitySolid_LowerToTheSameRecord(string canonicalDeclaration, string compatibilityDeclaration)+ {+ var canonical = FirmamentV2Parser.Parse($"Model Analytic {{ Units: mm {canonicalDeclaration} }}");+ var compatibility = FirmamentV2Parser.Parse($"model Analytic {{ units mm {compatibilityDeclaration} }}");++ Assert.True(canonical.IsSuccess, string.Join(Environment.NewLine, canonical.Diagnostics));+ Assert.True(compatibility.IsSuccess, string.Join(Environment.NewLine, compatibility.Diagnostics));+ var canonicalSolid = Assert.Single(canonical.Document!.Solids);+ var compatibilitySolid = Assert.Single(compatibility.Document!.Solids);+ Assert.Equal(canonicalSolid.Name, compatibilitySolid.Name);+ Assert.Equal(canonicalSolid.RecordType, compatibilitySolid.RecordType);+ Assert.Equal(canonicalSolid.Primitive, compatibilitySolid.Primitive);+ var canonicalLowering = FirmamentV2BuildLowering.LowerPrimitiveBridge(canonical.Document);+ var compatibilityLowering = FirmamentV2BuildLowering.LowerPrimitiveBridge(compatibility.Document);+ Assert.True(canonicalLowering.IsSuccess);+ Assert.True(compatibilityLowering.IsSuccess);+ Assert.Equal(Assert.Single(canonicalLowering.Value.Primitives), Assert.Single(compatibilityLowering.Value.Primitives));+ }++ [Fact]+ public void CanonicalPrimitiveFields_AcceptLowercaseCompatibilityWithoutChangingTheRoute()+ {+ var canonical = FirmamentV2Parser.Parse("Model X { Units: mm Box body { Size: [10mm, 20mm, 30mm] } }");+ var mixed = FirmamentV2Parser.Parse("Model X { units: mm Box body { size: [10mm, 20mm, 30mm] } }");++ Assert.True(canonical.IsSuccess, string.Join(Environment.NewLine, canonical.Diagnostics));+ Assert.True(mixed.IsSuccess, string.Join(Environment.NewLine, mixed.Diagnostics));+ Assert.Equal(Assert.Single(canonical.Document!.Solids).Box!.Size, Assert.Single(mixed.Document!.Solids).Box!.Size);+ Assert.Contains("firmament-v2-unified-canonical-parsed", mixed.Diagnostics);+ }+[Fact]public void CanonicalFrustum_ExportsThroughTheProductionConeRoute(){diff --git a/Aetheris.Kernel.Firmament/FirmamentV2/FirmamentV2Parser.cs b/Aetheris.Kernel.Firmament/FirmamentV2/FirmamentV2Parser.csindex c29e1e2a..bc79f4bf 100644--- a/Aetheris.Kernel.Firmament/FirmamentV2/FirmamentV2Parser.cs+++ b/Aetheris.Kernel.Firmament/FirmamentV2/FirmamentV2Parser.cs@@ -280,7 +280,7 @@ public static class FirmamentV2Parserprivate static readonly Regex FillRegionHeaderRegex = new(@"\bregion\s+(?<name>[A-Za-z_][A-Za-z0-9_]*)\s*\{", RegexOptions.CultureInvariant);private static readonly Regex FillHeaderRegex = new(@"\bfill\s+(?<name>[A-Za-z_][A-Za-z0-9_]*)\s*\{", RegexOptions.CultureInvariant);private static readonly Regex CanonicalModelRegex = new(@"^\s*Model\s+(?<name>[A-Za-z_][A-Za-z0-9_]*)\s*\{", RegexOptions.CultureInvariant);- private static readonly Regex CanonicalPrimitiveHeaderRegex = new(@"\b(?<type>Box|Cylinder|RoundedBox|Frustum|StandardPart|ExactCoaxialPart)\s+(?<name>[A-Za-z_][A-Za-z0-9_]*)\s*\{", RegexOptions.CultureInvariant);+ private static readonly Regex CanonicalPrimitiveHeaderRegex = new(@"\b(?<type>Box|Cylinder|Cone|Sphere|Torus|RoundedBox|Frustum|StandardPart|ExactCoaxialPart)\s+(?<name>[A-Za-z_][A-Za-z0-9_]*)\s*\{", RegexOptions.CultureInvariant);private static readonly Regex CanonicalInlineStepHeaderRegex = new(@"\bInlineStep\s+(?<name>[A-Za-z_][A-Za-z0-9_]*)\s*\{", RegexOptions.CultureInvariant);private static readonly Regex CanonicalModifyHeaderRegex = new(@"\bModify\s+(?<target>[A-Za-z_][A-Za-z0-9_]*)\s*\{", RegexOptions.CultureInvariant);// Match the declaration-shaped header first; variant admission belongs in the@@ -901,7 +901,7 @@ public static class FirmamentV2Parservar known = new HashSet<string>(StringComparer.Ordinal){- "Box", "Cylinder", "RoundedBox", "Frustum", "StandardPart", "ExactCoaxialPart", "Concept", "Struct", "Construction", "Profile", "Compose", "Boss", "Pocket", "EdgeFinish",+ "Box", "Cylinder", "Cone", "Sphere", "Torus", "RoundedBox", "Frustum", "StandardPart", "ExactCoaxialPart", "Concept", "Struct", "Construction", "Profile", "Compose", "Boss", "Pocket", "EdgeFinish","Record", "Static", "Template", "template", "ProfileDelta", "Selection", "InlineStep", "Recognize", "Replace", "Pmi", "Modify", "Match", "Require", "Assert"};var compatibilityOnly = new HashSet<string>(StringComparer.Ordinal)@@ -949,12 +949,12 @@ public static class FirmamentV2Parserreturn CanonicalFailure(diagnostics, CanonicalDocumentMalformed);var body = source[(rootOpen + 1)..rootClose];- var units = Regex.Match(body, @"\bUnits\s*:\s*(?<value>[A-Za-z_][A-Za-z0-9_]*)\b", RegexOptions.CultureInvariant);+ var units = Regex.Match(body, @"\bUnits\s*:\s*(?<value>[A-Za-z_][A-Za-z0-9_]*)\b", RegexOptions.CultureInvariant | RegexOptions.IgnoreCase);if (!units.Success || units.Groups["value"].Value != "mm")return CanonicalFailure(diagnostics, CanonicalUnitsInvalid);if (Regex.IsMatch(body, @"\b(?!(?:InlineStep|Recognize|Replace)\b)(?:Inline[A-Za-z_][A-Za-z0-9_]*|Recogniz[A-Za-z_][A-Za-z0-9_]*|Replac[A-Za-z_][A-Za-z0-9_]*)\b", RegexOptions.CultureInvariant))return CanonicalFailure(diagnostics, CanonicalDeclarationUnrecognized);- var adapterSource = Regex.Replace(body, @"(?m)^\s*Units\s*:\s*mm\s*$", string.Empty, RegexOptions.CultureInvariant);+ var adapterSource = Regex.Replace(body, @"(?m)^\s*Units\s*:\s*mm\s*$", string.Empty, RegexOptions.CultureInvariant | RegexOptions.IgnoreCase);if (TryParseExactCoaxialTemplateDocument(adapterSource, model.Groups["name"].Value, templateInstantiations, diagnostics, out var exactDocument))return FirmamentV2ParseResult.Success(exactDocument!, diagnostics.Append("firmament-v2-exact-coaxial-template-parsed").Append("firmament-v2-parse-succeeded").Distinct(StringComparer.Ordinal).Order().ToArray());@@ -1357,7 +1357,7 @@ public static class FirmamentV2Parserreturn CanonicalFailure(diagnostics, CanonicalDocumentMalformed);var body = source[(rootOpen + 1)..rootClose];- var units = Regex.Match(body, @"\bUnits\s*:\s*(?<value>[A-Za-z_][A-Za-z0-9_]*)\b", RegexOptions.CultureInvariant);+ var units = Regex.Match(body, @"\bUnits\s*:\s*(?<value>[A-Za-z_][A-Za-z0-9_]*)\b", RegexOptions.CultureInvariant | RegexOptions.IgnoreCase);if (!units.Success || units.Groups["value"].Value != "mm")return CanonicalFailure(diagnostics, CanonicalUnitsInvalid);if (Regex.IsMatch(body, @"\b(?!(?:InlineStep|Recognize|Replace)\b)(?:Inline[A-Za-z_][A-Za-z0-9_]*|Recogniz[A-Za-z_][A-Za-z0-9_]*|Recognis[A-Za-z_][A-Za-z0-9_]*|Replac[A-Za-z_][A-Za-z0-9_]*)\b", RegexOptions.CultureInvariant))@@ -1426,14 +1426,14 @@ public static class FirmamentV2Parserprivate static FirmamentV2PrimitiveRecord? ParseCanonicalPrimitive(string type, string body, List<string> diagnostics){- double Number(string field)+ double Number(string field, bool allowZero = false){- var match = Regex.Match(body, $@"\b{field}\s*:\s*(?<value>[-+0-9.eE]+)mm\b", RegexOptions.CultureInvariant);- return match.Success && double.TryParse(match.Groups["value"].Value, NumberStyles.Float, CultureInfo.InvariantCulture, out var value) && double.IsFinite(value) && value > 0d ? value : double.NaN;+ var match = Regex.Match(body, $@"\b{field}\s*:\s*(?<value>[-+0-9.eE]+)mm\b", RegexOptions.CultureInvariant | RegexOptions.IgnoreCase);+ return match.Success && double.TryParse(match.Groups["value"].Value, NumberStyles.Float, CultureInfo.InvariantCulture, out var value) && double.IsFinite(value) && (allowZero ? value >= 0d : value > 0d) ? value : double.NaN;}IReadOnlyList<double>? Size(){- var match = Regex.Match(body, @"\bSize\s*:\s*\[(?<values>[^\]]+)\]", RegexOptions.CultureInvariant);+ var match = Regex.Match(body, @"\bSize\s*:\s*\[(?<values>[^\]]+)\]", RegexOptions.CultureInvariant | RegexOptions.IgnoreCase);if (!match.Success) return null;var values = match.Groups["values"].Value.Split(',', StringSplitOptions.TrimEntries);var parsed = values.Select(ParsePhase3Length).ToArray();@@ -1461,6 +1461,9 @@ public static class FirmamentV2Parser{"Box" when Size() is { } size => new FirmamentV2BoxRecord(size, []),"Cylinder" when Number("Radius") is var radius && Number("Height") is var height && double.IsFinite(radius) && double.IsFinite(height) => new FirmamentV2CylinderRecord(radius, height),+ "Cone" when Number("BottomRadius") is var coneBottom && Number("TopRadius", allowZero: true) is var coneTop && Number("Height") is var coneHeight && double.IsFinite(coneBottom) && double.IsFinite(coneTop) && double.IsFinite(coneHeight) => new FirmamentV2ConeRecord(coneBottom, coneTop, coneHeight),+ "Sphere" when Number("Radius") is var sphereRadius && double.IsFinite(sphereRadius) => new FirmamentV2SphereRecord(sphereRadius),+ "Torus" when Number("MajorRadius") is var majorRadius && Number("MinorRadius") is var minorRadius && double.IsFinite(majorRadius) && double.IsFinite(minorRadius) && majorRadius > minorRadius => new FirmamentV2TorusRecord(majorRadius, minorRadius),"RoundedBox" when Size() is { } roundedSize && Number("CornerRadius") is var corner && double.IsFinite(corner) && corner < double.Min(roundedSize[0], roundedSize[1]) / 2d => new FirmamentV2RoundedBoxRecord(roundedSize, corner),"Frustum" when Number("BottomRadius") is var bottom && Number("TopRadius") is var top && Number("Height") is var frustumHeight && double.IsFinite(bottom) && double.IsFinite(top) && double.IsFinite(frustumHeight) && double.Abs(bottom - top) > 1e-12d => new FirmamentV2FrustumRecord(bottom, top, frustumHeight),"StandardPart" => StandardPart(),diff --git a/docs/development/firmament-language-inconsistencies.md b/docs/development/firmament-language-inconsistencies.mdindex 62c50487..aef9212a 100644--- a/docs/development/firmament-language-inconsistencies.md+++ b/docs/development/firmament-language-inconsistencies.md@@ -1,29 +1,24 @@-# Firmament language inconsistency register+# Firmament language reconciliation register-This development-only register records dialect differences exposed while consolidating the Preview 3 documentation and fixture corpora. It does not define current syntax and A5b deliberately changes none of the forms below. The public authority is [`docs/public/firmament`](../public/firmament/overview.md).+This A5c register classifies the language seams first exposed by A5b. The public dialect is defined by [`docs/public/firmament`](../public/firmament/overview.md), especially the [language-style contract](../public/firmament/language-style.md). Parser/lowering ownership is recorded in the [active grammar inventory](firmament-v2-grammar-inventory.md).-Runtime-support labels are: `Canonical`, `AcceptedLegacyAlias`, `DomainSpecificByDesign`, `StaleDocumentationOnly`, `FixtureOnlySpeculation`, `PotentialParserInconsistency`, and `UnknownNeedsAudit`.+| Area | Final classification | Decision and evidence |+|---|---|---|+| Declaration and construct casing | ResolvedCanonical | Firmament-owned vocabulary is canonically PascalCase. Audited lowercase aliases remain only where unambiguous and select the same semantic route; no style warnings exist. |+| Legacy V1 document shape | LegacyQuarantined | `fixtures/LegacyV1/` remains untouched and is compatibility evidence, not V2 authoring authority. |+| Legacy primitive/Boolean vocabulary | LegacyQuarantined | V1 operations remain on their versioned compiler path. Public V2 uses named declarations and semantic features. |+| Direct versus `solid` primitive declarations | RetainedCompatibility | Direct `Box`/`Cylinder`/`Cone`/`Sphere`/`Torus` declarations are canonical. `solid name: Type` remains a compatibility adapter to the same primitive AST/lowering. |+| Through-hole and extent vocabulary | IntentionalDomainDifference | Model Hole `End`, Slot `Extent`, legacy Cut exit selectors, and recognition/speculative booleans have different owning types and were not merged. |+| Model versus Sheet Metal holes | IntentionalDomainDifference | Model uses `Hole<Variant>` and explicit termination. Sheet Metal uses planar-region `Hole Name` and rejects Model syntax. |+| Model targets versus Sheet Metal regions | IntentionalDomainDifference | Native axes/semantic selectors and named planar manufacturing regions remain separate target value types. |+| Native versus imported FEA faces | IntentionalDomainDifference | Native `Beam.face(-X)` and imported AP242 `body.face(#170)` retain distinct identity sources. |+| Assembly document families | RetainedCompatibility | V2 `Assembly` source is current. JSON-shaped `.firmasm` is explicitly deprecated compatibility; it is not merged into Model. |+| PMI declaration/value shapes | RetainedCompatibility | Canonical Model PMI is PascalCase. Bounded legacy spellings remain on the same semantic PMI/AP242 route; Sheet Metal manufacturing PMI stays domain-specific. |+| Edge finishing | ResolvedCanonical | Current V2 uses qualified `EdgeFinish`. V1 low-level operations are quarantined; future `.firmfixture` forms remain speculative. |+| Template / Record / `with` / Struct / Compose / Modify | ResolvedCanonical | Ownership is explicit in the grammar inventory: compile-time data/specialization, constructive body creation, and post-construction operations are distinct. |+| Boss / Pocket versus Add / Remove | RetainedCompatibility | Boss/Pocket preserve their first-class engineering contracts. Low-level Add/Remove remain bounded profile-composition compatibility, not coequal public feature design. |+| Units and literals | ResolvedCanonical | V2 uses `Units: mm` and unit-bearing engineering literals. Lowercase V2 input, external JSON, and unitless V1 arrays are separately classified compatibility forms. |+| Speculative keyword families | SpeculativeQuarantined | Future/not-implemented `.firmfixture` bodies remain untouched and do not define parser or documentation requirements. |+| External identifiers and snake_case | IntentionalDomainDifference | Standards, material designations, part numbers, namespaces, and imported identities preserve source spelling. No global identifier-style enforcement exists. |-| Area | Current forms | Where found | Public canonical form | Runtime support | Risk | Proposed later action |-| --- | --- | --- | --- | --- | --- | --- |-| Declaration and construct casing | `Model`/`Units`/`Modify`/`Hole<Shaft>` and lowercase `model`/`units`/`modify`/`hole<shaft>` | Public syntax and canonical `.firmament` files; many parser-backed `.firmfixture` entries use lowercase | PascalCase semantic/declarative constructs; camelCase ordinary slots | `AcceptedLegacyAlias` with some canonical-only routing | Medium: copied fixtures teach a second visual dialect | Audit the parser's actual case matrix and decide aliases deliberately; do not infer global case-insensitivity. |-| Legacy V1 document shape | `firmament: "0.1"`, `model:`, `ops:`, `op:`, `expect:` versus V2 `Model Name { ... }` | `fixtures/LegacyV1/` and the historical low-level authoring reference | V2 `Model` document form | `AcceptedLegacyAlias` / legacy compiler path | Low for runtime, high if mistaken for current authoring | Keep the legacy corpus labeled; later decide support lifetime without rewriting regression history. |-| Primitive/Boolean vocabulary | V1 `op: box`, `subtract`, `from`, `with` versus V2 declarations and `Modify`/`Compose` | `fixtures/LegacyV1/Corpus/`; historical authoring reference; current domain fixtures | Named V2 declarations and semantic features | `AcceptedLegacyAlias` | Medium: two complete authoring families appear executable | Publish an explicit migration note if the V1 compiler remains supported after Preview 3. |-| Through-hole extent | `End: ThroughAll`, `Extent: ThroughAll`, `through: face(-X)`, selector aliases such as `through: left`, Boolean `through: true`, and metadata prose `cut through` | Canonical geometry/profile fixtures; Region/InlineStep fixtures; speculative `.firmfixture` entries | `End: ThroughAll` for public Model `Hole`; copy domain-qualified fixtures elsewhere | `DomainSpecificByDesign` plus aliases needing audit | High: equivalent-looking “through” concepts have incompatible value types | Inventory each owning AST/domain, then reconcile names only where semantics and target types truly match. |-| Model versus Sheet Metal holes | `Modify Body { Hole<Shaft> ... End: ThroughAll }` versus Sheet Metal `Hole Name { On: Main; ... }` | Public syntax; `fixtures/SheetMetal/`; explicit wrong-domain rejection fixture | Domain-qualified forms documented separately | `DomainSpecificByDesign` | Medium: copying Model syntax into Sheet Metal is rejected | Retain the distinction; improve cross-links and diagnostics in a later language/documentation pass. |-| Model targets versus Sheet Metal regions | `face(+Z)`, named selections, and `part.region("...")` versus Sheet Metal semantic region names such as `Main` | Model, InlineStep, PMI, and Sheet Metal fixtures | Use the target form documented for the owning domain | `DomainSpecificByDesign` | Medium | Document the shared conceptual model without merging selector grammars. |-| Assembly document families | V2 `Assembly Name { <Assembly ...> }`, `.firmasm` JSON compatibility documents, and assembly material embedded in `.firmament` | `fixtures/AssemblyM*/`; `fixtures/Assembly/LegacyImports/`; architecture audit | Public Model docs do not claim assembly grammar as ordinary Model syntax | `DomainSpecificByDesign` | Medium: extension and header do not map one-to-one across historical inputs | Audit assembly CLI input profiles and publish a dedicated current reference before considering deprecation. |-| PMI declaration/value shapes | PascalCase `Pmi`/`Datum`/`Target` records and lowercase record properties such as `target: part.region(...)`; legacy top-level `pmi` metadata | Public PMI guide; InlineStep fixtures; Legacy V1 corpus | Forms shown in the public PMI guide for the owning model route | `AcceptedLegacyAlias` / domain-specific record shape | Medium | Map each accepted PMI AST shape to emitted AP242 semantics and remove only redundant undocumented aliases later. |-| Edge finishing | `EdgeFinish` with semantic `Target`, older low-level `chamfer`/`fillet` operations, and speculative single-edge/loop entries | Profile/Composite fixtures; Legacy V1 corpus; `.firmfixture` future entries | Public supported-feature and qualified-fixture form | `FixtureOnlySpeculation` plus legacy/runtime forms | Medium | Separate active canonical constructs from speculative corpus entries in a dedicated grammar audit. |-| Template and composition shapes | `Template <...>`, `Struct ... { Compose ... }`, `Modify`, derived `with`, and historical concept/template spellings | Templates, ProfileComposition, Drawing, RecordDerivation, and historical milestone fixtures | Copy a public or qualified domain fixture; no single generic form is implied | `PotentialParserInconsistency` | High: several related composition mechanisms overlap conceptually | Build an AST-to-runtime capability matrix before proposing consolidation. |-| Units and literals | `Units: mm`, `units mm`, JSON `"units": "mm"`, values with `mm`, and unitless legacy numeric arrays | Public V2 docs, current fixtures, `.firmasm`, Legacy V1 | `Units: mm` with explicit unit literals in V2 authoring | `DomainSpecificByDesign` / `AcceptedLegacyAlias` | Medium | Audit dimensional typing at each parser boundary; preserve external JSON compatibility separately. |-| Speculative keyword families | `solid`, `feature`, `cut through`, `Shell`, `Lattice`, and future surface declarations in metadata fixtures | `.firmfixture` files marked `implementation: not-implemented` or `future` | None; speculative fixtures are not public syntax | `FixtureOnlySpeculation` | Low when labeled, high if scraped as examples | Keep metadata visible to corpus tooling and exclude speculative bodies from public-example discovery. |--## Priority for a later language pass--- **High:** through/extent value families; overlapping Template/Compose/Modify/derivation mechanisms; the exact casing acceptance matrix where route selection may differ.-- **Medium:** V1 migration/support policy; PMI record aliases; EdgeFinish versus low-level operation vocabulary; unit conventions at parser boundaries.-- **Low:** historical TOON spelling and cosmetic identifier differences that remain quarantined under `LegacyV1/` or development history.-- **Intentional:** Model versus Sheet Metal targets and hole declarations; assembly-domain documents; imported identifiers and material designations that preserve external spelling.--No syntax, alias, parser behavior, lowering, or runtime semantics were changed while producing this inventory.+No rows remain `UnknownNeedsAudit` or `PotentialParserInconsistency`. Future language design proposals must be added as `DeferredDesignQuestion` rather than inferred from historical or speculative corpus text.diff --git a/docs/development/firmament-v2-grammar-inventory.md b/docs/development/firmament-v2-grammar-inventory.mdnew file mode 100644index 00000000..360fa523--- /dev/null+++ b/docs/development/firmament-v2-grammar-inventory.md@@ -0,0 +1,42 @@+# Firmament V2 active grammar inventory++This A5c inventory records parser and lowering ownership. Canonical forms use PascalCase; compatibility aliases are deliberately bounded rather than produced by global case folding.++| Construct / token | Owning parser/domain | Accepted forms | Canonical form | Compatibility policy | Lowering/runtime owner |+|---|---|---|---|---|---|+| Model, Units | `FirmamentV2Parser` | `Model`/`Units: mm`; legacy lowercase document route; lowercase field alias in a canonical root | `Model`, `Units: mm` | retain audited lowercase inputs; no warning | normalized `FirmamentV2Document` |+| Box, Cylinder, Cone, Sphere, Torus, RoundedBox, Frustum | canonical primitive binder plus legacy solid adapter | direct named declarations; legacy `solid name: Type` | direct named declaration | retain `solid` compatibility; both form the same primitive record | `FirmamentV2BuildLowering` and production primitive executor |+| Concept, Struct, Profile, Loop, Segment | canonical advanced parser with profile adapters | qualified PascalCase forms | PascalCase forms in canonical fixtures | no new aliases | Concept IR, `ProfileAuthoringParser`, profile materializers |+| Record, Static, Table, Template, Require, `with`, Pattern/Over | Template/static frontends | PascalCase constructs; lowercase `with` operator | shown qualified forms | `with` is an operator, not snake_case vocabulary | `FirmamentV2TemplateExpansion`, `CanonicalStaticAuthoring`; erased before material lowering |+| Struct, Compose, Base, Add, Remove, Boss, Pocket | prismatic composition parser | qualified Compose placements; legacy low-level Add/Remove | `Boss`/`Pocket` for their first-class contracts; Base/features inside Compose | Add/Remove remain bounded lower-level compatibility | `PrismaticProfileCompositionParser` and section-stack materializer |+| Modify, Hole family, Slot, EdgeFinish | canonical primitive or profile semantic binders | qualified top-level/body-adjacent Modify; Compose-owned holes/slots where admitted | post-construction operations in `Modify`; construction-owned operations inside active `Compose` where the host parser requires it | multiple placements are retained only where runtime ownership differs | semantic hole/edge finish lowering and profile composition |+| Pmi, Datum, HoleDiameter | Model PMI binder | PascalCase canonical records; bounded lowercase compatibility records | `Pmi`, `Datum`, `HoleDiameter`, PascalCase fields | retained aliases must bind to identical semantic PMI | Firmament semantic values and STEP AP242 exporter |+| SheetMetal, Base, Flange, Hole | `AuthoredSheetMetalCompiler` | specialized PascalCase grammar | domain form shown in Sheet Metal guide | Model `Hole<T>` is rejected, not aliased | Sheet Metal IR, flattener, manufacturing artifacts |+| Analysis, Fixed, Force | `FirmamentAnalysisCompiler` | case-insensitive audited keywords/fields; ordinary Model Box or bounded inline STEP | PascalCase vocabulary over ordinary Model geometry | lowercase forms bind the same Analysis IR | Continuum region producer and linear-elastic solver |+| inlineSTEP / InlineStep | FEA expression reader / canonical import declaration | bounded `inlineSTEP("path")`; `InlineStep Name { Path: ... }` | declaration form in a Model; expression spelling retained in FEA | domain-specific compatibility | STEP importer and recognized-region bridge |+| Assembly | `FirmamentAssemblyDocumentProfile`, `AssemblyM0Parser` | V2 `Assembly Name { ... }`; deprecated JSON-shaped `.firmasm` | V2 Assembly source profile | JSON is legacy compatibility only | Assembly compiler/executor/AP242 interop |+| Drawing | `FirmamentDrawingCompiler` | qualified Drawing declarations | PascalCase qualified fixture form | separate domain grammar | Drawing IR and SVG/PDF/PPTX writers |++## Semantic ownership matrix++| Construct | Meaning and placement | Geometry effect | Owner |+|---|---|---|---|+| Template | typed compile-time specialization over values/Records | none directly; emits ordinary admitted source | Template expansion |+| Record / Static / Table / `with` | immutable finite engineering data and derivation | none; erased after binding | static authoring and Template expansion |+| Pattern / Over | finite repetition from static data | repeats an admitted feature | static authoring into the owning material grammar |+| Struct | named construction intent or concept materialization | contains the selected construction route | concept/profile frontend |+| Compose / Base | constructive body and its initial material interval | creates the prismatic host | profile composition |+| Add / Remove | bounded low-level section-stack operations | adds/removes finite profile intervals | profile composition compatibility surface |+| Boss / Pocket | first-class connected additive / finite non-through removal contracts | adds a Boss or removes a Pocket while preserving its engineering rules | profile composition semantic features |+| Modify | post-construction operations against an existing admitted body | applies semantic holes/finishes or other qualified mutations | canonical primitive/profile binders |+| Hole / Slot | typed opening feature; placement depends on owning host | removes admitted material | semantic hole/slot lowering |+| EdgeFinish | qualified semantic finishing operation | admitted chamfer/fillet routes only | EdgeFinish binders/materializers |+| Pmi | engineering requirements over the semantic model | no geometry; emits semantic AP242 | PMI binder/exporter |++## Through and extent types++`End: ThroughAll` is the canonical Model Hole termination condition. Slot `Extent: ThroughAll` is a slot interval. Legacy `through: face(-X)` is an exit-face selector in the old Region/Cut route, while `through: true` belongs to recognition evidence or speculative/legacy inputs depending on owner. Sheet Metal openings terminate through their planar sheet region by domain semantics. These values are not unified because their AST types differ.++## Intentional domain differences++Model and Sheet Metal Hole syntax, Model faces and Sheet Metal planar regions, native and imported STEP face identity, Assembly typed relationship selectors, and external material/standard identifiers are `IntentionalDomainDifference`. V1 and JSON `.firmasm` inputs are compatibility history; future/not-implemented `.firmfixture` bodies are speculative evidence.diff --git a/docs/public/README.md b/docs/public/README.mdindex f613f08b..0e7401a0 100644--- a/docs/public/README.md+++ b/docs/public/README.md@@ -4,7 +4,7 @@ This directory is the only authoritative in-repository guide to behavior shippedStart with [Getting Started](getting-started.md), then use these guides:-- Firmament: [overview](firmament/overview.md), [syntax](firmament/syntax.md), [geometry](firmament/geometry.md), [Templates](firmament/templates.md), [materials](firmament/materials.md), [PMI](firmament/pmi.md), [Sheet Metal](firmament/sheet-metal.md), [FEA](firmament/fea.md), and [STEP import](firmament/step-import.md)+- Firmament: [overview](firmament/overview.md), [language style](firmament/language-style.md), [syntax](firmament/syntax.md), [geometry](firmament/geometry.md), [Templates](firmament/templates.md), [materials](firmament/materials.md), [PMI](firmament/pmi.md), [Sheet Metal](firmament/sheet-metal.md), [FEA](firmament/fea.md), and [STEP import](firmament/step-import.md)- Interoperability: [Forge Host Protocol v1](forge/interop.md)- Inspection: [Cadmata](cadmata/overview.md) and [Cadmata PMI](cadmata/pmi.md)- Reference: [CLI](reference/cli.md), [targets/selectors](reference/targets.md), [diagnostics](reference/diagnostics.md), [supported features](reference/supported-features.md), [known issues](reference/known-issues.md), and [release notes](reference/release-notes.md)diff --git a/docs/public/firmament/fea.md b/docs/public/firmament/fea.mdindex e1a39a81..a4ff90cb 100644--- a/docs/public/firmament/fea.md+++ b/docs/public/firmament/fea.md@@ -8,8 +8,32 @@ Run the qualified aluminum cantilever:aetheris fea fixtures/FEA/cantilever.firmament --out-dir artifacts/cantilever --json```-`Force.vector` is the total resultant distributed across the selected boundary, not a force per node. The solver uses a cut-cell/vector-lattice formulation over the occupied body; it is not a conventional user-authored finite-element mesh. The fixture's simple cantilever provides a physically interpretable sanity witness, but it does not imply general solver qualification for nonlinear, anisotropic, plastic, contact, thermal, or dynamic physics.+The complete canonical shape is:-The public-only A36 witness [`ai-fea-a36-cantilever.firmament`](../../../fixtures/PublicDogfood/ai-fea-a36-cantilever.firmament) is a 100 × 30 × 15 mm beam under a 500 N tip load. At `lattice: [16, 2, 2]`, Preview 3 reports `25.0619 µm`; Euler–Bernoulli beam theory with the catalog's 200 GPa modulus predicts about `24.7 µm`. This is a narrow sanity comparison, not a general accuracy claim.+```firmament+Model CantileverWitness {+ Units: mm+ Box Beam { Size: [120mm, 20mm, 20mm] }-Native selectors use `beam.face(-X)` and `beam.face(+X)`. Imported selectors use AP242 identity such as `body.face(#170)` after bounded inline import. [`inline-step-through-hole.firmament`](../../../fixtures/FEA/inline-step-through-hole.firmament) is the qualified imported example. Arbitrary imported containment is not promised; affected bodies fail loudly with `firmament-analysis-inline-step-containment-unsupported`.+ Analysis LinearElastic Cantilever {+ Body: Beam+ Material: Standard.Materials.Aluminum.6061_T6+ Fixed Root {+ Region: Beam.face(-X)+ Components: [X, Y, Z]+ }+ Force Tip {+ Region: Beam.face(+X)+ Vector: [0N, -100N, 0N]+ }+ Results: [Displacement, Strain, Stress, ReactionForce]+ Lattice: [12, 2, 2]+ }+}+```++`Force`'s `Vector` is the total resultant distributed across the selected boundary, not a force per node. Native FEA consumes ordinary Model geometry such as `Box Beam { Size: [...] }`; it does not require a separate `solid` declaration dialect. The solver uses a cut-cell/vector-lattice formulation over the occupied body; it is not a conventional user-authored finite-element mesh. The fixture's simple cantilever provides a physically interpretable sanity witness, but it does not imply general solver qualification for nonlinear, anisotropic, plastic, contact, thermal, or dynamic physics.++The public-only A36 witness [`ai-fea-a36-cantilever.firmament`](../../../fixtures/PublicDogfood/ai-fea-a36-cantilever.firmament) is a 100 × 30 × 15 mm beam under a 500 N tip load. At `Lattice: [16, 2, 2]`, Preview 3 reports `25.0619 µm`; Euler–Bernoulli beam theory with the catalog's 200 GPa modulus predicts about `24.7 µm`. This is a narrow sanity comparison, not a general accuracy claim.++Native selectors preserve the body identifier: the example uses `Beam.face(-X)` and `Beam.face(+X)`. Imported selectors use AP242 identity such as `body.face(#170)` after bounded inline import. [`inline-step-through-hole.firmament`](../../../fixtures/FEA/inline-step-through-hole.firmament) is the qualified imported example. Arbitrary imported containment is not promised; affected bodies fail loudly with `firmament-analysis-inline-step-containment-unsupported`.diff --git a/docs/public/firmament/geometry.md b/docs/public/firmament/geometry.mdindex b37bc7a6..14c88b3d 100644--- a/docs/public/firmament/geometry.md+++ b/docs/public/firmament/geometry.md@@ -2,7 +2,7 @@Preview 3 supports bounded production routes, not an unrestricted general-purpose CAD kernel. Public native examples cover Box, Cylinder, Frustum, RoundedBox, line/arc profile extrusion and composition, semantic shaft/counterbore/countersink holes, slots, patterns, selected chamfer/fillet routes, hollow bodies, and a bounded cubic lattice. Consult the [support matrix](../reference/supported-features.md) before relying on a combination.-The V2 compiler also qualifies parser-backed analytic single-solid source using `model` / `solid`: `Sphere`, `Cone` (including a pointed zero-radius end), and `Torus`. Those forms round-trip as analytic AP242 surfaces, but they do not imply arbitrary boolean or profile-composition support. Use the qualified [sphere](../../../fixtures/Primitive/valid/a3-sphere-step-qualified.firmament), [pointed cone](../../../fixtures/Primitive/valid/a3-pointed-cone-step-qualified.firmament), and [torus](../../../fixtures/Primitive/valid/a3-torus-step-qualified.firmament) sources as the boundary examples.+Analytic single solids use the same direct named declaration family: `Sphere Body { Radius: 7.5mm }`, `Cone Body { ... }`, and `Torus Body { ... }`. `Cone` includes a pointed zero-radius end. These forms round-trip as analytic AP242 surfaces, but they do not imply arbitrary Boolean or profile-composition support. The older `solid Body: Sphere { radius: ... }` spelling remains a compatibility input, not canonical authoring. Use the qualified [sphere](../../../fixtures/Primitive/valid/a3-sphere-step-qualified.firmament), [pointed cone](../../../fixtures/Primitive/valid/a3-pointed-cone-step-qualified.firmament), and [torus](../../../fixtures/Primitive/valid/a3-torus-step-qualified.firmament) sources as the boundary examples.Use named features and selectors, never raw internal B-rep IDs in native authoring. [`box-holes-pmi-chamfer.firmament`](../../../fixtures/Canonical/valid/box-holes-pmi-chamfer.firmament) demonstrates two holes, an outer-boundary chamfer, and PMI surviving the same AP242 build. [`profile-compose-l-bracket-counterbore-pmi.firmament`](../../../fixtures/Canonical/valid/profile-compose-l-bracket-counterbore-pmi.firmament) demonstrates a profile-composed part, pattern holes, a counterbore, a chamfer, and shaft-diameter PMI.@@ -10,7 +10,7 @@ Use named features and selectors, never raw internal B-rep IDs in native authori## Boss-`Boss` is the first-class finite profile feature for adding connected material. In Preview 3 it is declared inside the active `Compose` body, targets that body's top support (`On: Top`), consumes an already-admitted line/arc `Profile`, and extrudes outward along `+Z` by a positive `Height`:+`Boss` is the first-class finite profile feature for adding connected material. In Preview 3 it is declared inside the active profile-based `Compose` body, targets that body's top support (`On: Top`), consumes an already-admitted line/arc `Profile`, and extrudes outward along `+Z` by a positive `Height`. A `Compose` does not reopen or augment a separately declared direct `Box`; use a rectangular Base Profile when the stock is box-shaped.```firmamentCompose Body {@@ -114,7 +114,7 @@ Model PocketBlock {}```-To author a block containing both features, declare all three profiles in one `Concept Struct ... On XY`, then place both the documented `Boss` and `Pocket` declarations after the unique `Base` in the same Compose. Feature declaration order does not replace their explicit finite intervals.+To author a block containing both features, declare all three profiles in one `Concept Struct ... On XY`, then place both the documented `Boss` and `Pocket` declarations after the unique `Base` in the same Compose. Feature declaration order does not replace their explicit finite intervals. Apply post-construction `EdgeFinish` in `Modify Body`; its semantic profile target is such as `BaseProfile.Outer`, not the primitive-only `Boundary` selector.The canonical [Boss + Pocket mounting block](../../../fixtures/Canonical/valid/boss-pocket-mounting-block.firmament) combines a cylindrical boss, through shaft hole, and shallow rectangular pocket using public Firmament only. Existing lower-level `Compose Add` / `Remove` remains compatible for bounded blockout work.diff --git a/docs/public/firmament/language-style.md b/docs/public/firmament/language-style.mdnew file mode 100644index 00000000..76f92ce0--- /dev/null+++ b/docs/public/firmament/language-style.md@@ -0,0 +1,17 @@+# Firmament V2 language style++Firmament-owned vocabulary is canonically PascalCase. This includes document and declaration constructs, semantic features, built-in primitive and value names, and built-in fields. Canonical source therefore uses `Model`, `Units`, `Sphere`, `Modify`, `Analysis`, `Body`, `Region`, and `ThroughAll`.++User-defined identifiers are case-preserving and stylistically free. `beam`, `Beam`, `mainDeck`, and `MAIN_DECK` may all be names when the owning construct admits an identifier. External identifiers preserve their engineering or source spelling, including material designations, standards, imported identities, and part numbers such as `5052_H32`.++Lowercase and historical aliases may remain accepted for compatibility when unambiguous. They receive no style warning and must not select different semantics. Documentation, snippets, generated examples, and `fixtures/Canonical/` use the canonical spelling.++Casing is not a type-system distinction unless a domain explicitly says otherwise. A field uses `Name: Value`; braces delimit declarations, brackets delimit lists, and semicolons are optional where the owning grammar is unambiguous.++Different target grammars are intentional. Native Model geometry uses axis faces and semantic selectors; Sheet Metal uses named planar regions and paths; native and imported Analysis use body-qualified faces; Assembly uses typed roles, ports, interfaces, and DatumFrame references. Similar engineering ideas do not make these value types interchangeable.++Firmament V1 is compatibility history, not canonical V2 authoring. Speculative or expected-failure `.firmfixture` bodies do not define the public language.++## Preview 3 migration note++Preview 3 documents one visual dialect. Existing supported lowercase and `solid name: Primitive` inputs remain accepted where documented, without casing warnings. New source should use PascalCase Firmament vocabulary, direct named primitive declarations, and `Units: mm`.diff --git a/docs/public/firmament/materials.md b/docs/public/firmament/materials.mdindex 6663eca2..41d2668f 100644--- a/docs/public/firmament/materials.md+++ b/docs/public/firmament/materials.md@@ -3,7 +3,7 @@Firmament refers to catalog materials semantically, for example:```firmament-material: Standard.Materials.Aluminum.5052_H32+Material: Standard.Materials.Aluminum.5052_H32```Preview 3 ships four catalog entries:diff --git a/docs/public/firmament/sheet-metal.md b/docs/public/firmament/sheet-metal.mdindex 6684d020..836eab50 100644--- a/docs/public/firmament/sheet-metal.md+++ b/docs/public/firmament/sheet-metal.md@@ -2,6 +2,31 @@Authored Sheet Metal uses a specialized semantic model: a base region, named flanges and bend strips, and cuts on named planar regions. It can emit formed STEP, thickness-bearing flat STEP, and flat SVG; it also carries material, K-factor, DFM, semantic layout, and manufacturing definitions on qualified routes.+```firmament+SheetMetal MountingBracket {+ Thickness: 1.5mm;+ Material: "5052-H32 Aluminum";+ KFactor: 0.42;+ Base: Rectangle(80mm, 50mm);++ Flange Upright {+ From: Base.Rear;+ Length: 30mm;+ Angle: 90deg;+ InsideRadius: 2mm;+ Direction: Up;+ }++ Hole Mount {+ On: Base;+ Center: (40mm, 20mm);+ Diameter: 8mm;+ }+}+```++Sheet Metal does not use a Model `Units` declaration in this authored route; dimensional fields carry explicit units. `Thickness`, `Material`, `KFactor`, and `Base` belong directly in the `SheetMetal` body, alongside `Flange` and `Hole` declarations.+[`preview3-l-bracket-hole.firmament`](../../../fixtures/SheetMetal/preview3-l-bracket-hole.firmament) is the practical first example. Build the formed part and then flatten the same source:```powershelldiff --git a/docs/public/firmament/syntax.md b/docs/public/firmament/syntax.mdindex 045bc607..402fef67 100644--- a/docs/public/firmament/syntax.md+++ b/docs/public/firmament/syntax.md@@ -12,8 +12,12 @@ Model Plate {}```-Use PascalCase for semantic/declarative constructs and camelCase for ordinary data slots where the owning domain uses them. The parser is permissive where case has no semantic value. New V2 vocabulary does not use snake_case; external identifiers such as `5052_H32` preserve their source spelling.+Firmament-owned vocabulary is canonically PascalCase: declarations, semantic features, built-in values, and field names such as `Size`, `Body`, and `Region`. User-defined identifiers are case-preserving and stylistically unrestricted. External engineering identifiers such as `Standard.Materials.Aluminum.5052_H32`, standards, imported identities, and part numbers preserve their source spelling. New Firmament-owned V2 vocabulary does not use snake_case.-Punctuation is construct-specific: braces delimit declarations, lists use brackets, and field separators may be line breaks or semicolons in admitted grammar. Copy a qualified fixture when entering a specialized domain: `SheetMetal` and `Analysis` have their own target forms and property vocabulary. The [target reference](../reference/targets.md) calls out these distinctions.+Accepted lowercase or historical spellings remain compatibility inputs where they are cheap and unambiguous. They select the same semantic route and produce no style warning. Canonical documentation, snippets, and fixtures use only the preferred spelling; casing is not a type-system distinction.++Canonical fields use a colon between name and value. Braces delimit declarations, brackets delimit lists, and semicolons are optional where the owning line/block grammar is unambiguous. `Model`, `SheetMetal`, `Analysis`/import, and Assembly retain domain-appropriate target grammars; the [target reference](../reference/targets.md) records the intentional distinctions.++Firmament V1 is compatibility history rather than canonical V2 authoring. Bodies embedded in `.firmfixture` entries marked future, not implemented, or invalid are corpus evidence and do not define the public language.Use `aetheris validate file.firmament --json` before building. Diagnostics are codes intended for automation plus short corrective messages. See [diagnostics](../reference/diagnostics.md).diff --git a/docs/public/reference/supported-features.md b/docs/public/reference/supported-features.mdindex 3816f47d..2b31a41b 100644--- a/docs/public/reference/supported-features.md+++ b/docs/public/reference/supported-features.md@@ -5,7 +5,7 @@| Area | Status | Preview 3 boundary ||---|---|---|| Firmament V2 native primitives/profiles | Bounded | Named Box/Cylinder/Frustum/RoundedBox and admitted line/arc profile construction/composition |-| Firmament V2 analytic `model` / `solid` primitives | Bounded | Parser-backed single-solid Sphere, Cone (including zero-radius pointed end), and Torus routes round-trip through AP242; this is not a general boolean/composition promise |+| Firmament V2 analytic primitives | Bounded | Direct named Sphere, Cone (including zero-radius pointed end), and Torus routes round-trip through AP242; legacy `solid` declarations remain compatibility inputs, not canonical authoring || Boss | Bounded | First-class connected finite `On: Top` profile addition on an admitted Compose host; positive height; lowers through existing `Add`; no arbitrary solid union || Pocket | Bounded | First-class enclosed finite-depth `On: Top` profile removal; positive depth, non-through termination, and minimum remaining floor enforced; lowers through existing `Remove` || Lower-level profile composition | Bounded | Existing prismatic `Compose` `Add`/`Remove` remains compatible for bounded blockout authoring |diff --git a/docs/release/PREVIEW3-HARDEN-A5c.md b/docs/release/PREVIEW3-HARDEN-A5c.mdnew file mode 100644index 00000000..d0a9eec7--- /dev/null+++ b/docs/release/PREVIEW3-HARDEN-A5c.md@@ -0,0 +1,126 @@+# PREVIEW3-HARDEN-A5c — Firmament V2 language reconciliation++## Executive verdict++Yes. Firmament V2 now has one documented canonical visual dialect: Firmament-owned declarations, features, fields, and owned values use PascalCase; fields use `Name: Value`; ordinary primitives use direct named declarations; and dimensions carry explicit units. The parser remains deliberately more permissive than the public style. Bounded historical lowercase and primitive aliases continue to select the same semantics without style warnings.++This was a reconciliation pass, not Firmament V3. No CAD, Sheet Metal, FEA, PMI, Assembly, or Forge engineering capability was added.++## Grammar inventory++The active parser, AST, and lowering ownership audit is recorded in [the Firmament V2 grammar inventory](../development/firmament-v2-grammar-inventory.md). It covers Model and Units; native and analytic primitives; profiles and concepts; static data, Records, Templates, derivation, and Pattern; Struct/Compose construction; Modify and semantic features; PMI; Sheet Metal; Analysis; inline STEP; Assembly; and Drawing.++The [language inconsistency register](../development/firmament-language-inconsistencies.md) is fully reclassified. No `UnknownNeedsAudit` or `PotentialParserInconsistency` row remains.++## Canonical casing++- Firmament-owned vocabulary is canonically PascalCase.+- User-defined identifiers are case-preserving and stylistically unrestricted.+- External standards, material designations, STEP identities, part numbers, and namespaces preserve source spelling.+- `Units: mm`, `Field: Value`, braces for declarations, and brackets for lists are the canonical presentation. Semicolons remain optional where the owning grammar is unambiguous.+- Casing does not carry semantic meaning unless a domain explicitly documents otherwise.+- Compatibility aliases produce no style diagnostics.++The concise public contract is [Firmament V2 language style](../public/firmament/language-style.md).++## Primitive declaration result++`Sphere Body`, `Cone Body`, and `Torus Body` now participate in the same canonical direct named primitive family as `Box Body` and `Cylinder Body`. The canonical parser creates the existing primitive records and uses the existing lowering/runtime routes; pointed Cone remains the same Cone semantics with `TopRadius: 0mm`.++The older form `solid body: Sphere` remains a bounded compatibility adapter. Equivalence tests compare parsed primitive values and lowering results, not merely parse success, for Sphere, Cone, and Torus. The two spellings are not coequal documentation dialects: public source and current fixtures use direct declarations.++## Compose / Modify / Template semantic matrix++| Family | Verified role | Geometry effect |+| --- | --- | --- |+| `Record`, `Static`, `Table`, `with` | immutable finite engineering data and derivation | none; erased after binding |+| `Template` | typed compile-time specialization | none directly; emits admitted ordinary source |+| `Pattern` / `Over` | finite semantic repetition over static data | repeats an admitted feature |+| `Struct` | named construction intent or concept materialization | contains the selected construction route |+| `Compose` / `Base` | constructive creation and initial material interval | creates the prismatic host |+| `Boss` / `Pocket` | first-class connected addition and finite non-through removal | preserves the A3b engineering contracts |+| `Add` / `Remove` | bounded lower-level section-stack compatibility | adds or removes finite profile intervals |+| `Modify` | post-construction semantic operations on an admitted body | applies qualified holes, finishes, or other supported mutations |+| `EdgeFinish` | current qualified semantic finishing | admitted chamfer/fillet lowering only |+| `Pmi` | engineering requirements over the semantic model | no geometry; emits semantic AP242 |++Direct analytic primitive declarations are not profile-based Compose bodies and cannot be reopened as though they were one. The geometry guide now makes this placement boundary explicit instead of inviting a guess between equivalent-looking spellings.++## Through/extent audit++No unlike semantic types were merged. Native Model Hole termination is canonically `End: ThroughAll`. Slot `Extent: ThroughAll` is a slot interval. The old `through: face(-X)` form is an exit-face selector in its legacy Region/Cut owner. Boolean `through` occurrences belong to recognition evidence or legacy/speculative inputs according to their owner. Sheet Metal openings pass through their planar sheet region by Sheet Metal semantics.++These distinctions are now classified and documented rather than normalized by token resemblance.++## Intentional domain distinctions++- Model uses typed `Hole<Variant>` declarations and Model semantic targets; Sheet Metal uses specialized planar-region `Hole Name` declarations.+- Native Analysis targets such as `Beam.face(-X)` and imported AP242 identities such as `Body.face(#170)` retain different identity sources.+- Assembly uses typed roles, ports, interfaces, and DatumFrame references. V2 `Assembly` is current; JSON-shaped `.firmasm` remains deprecated compatibility and was not folded into Model.+- Canonical Model PMI remains distinct from Sheet Metal manufacturing semantics while both preserve their qualified runtime routes.+- `InlineStep` declarations and the bounded FEA `inlineSTEP(...)` expression remain domain-specific forms.+- V1 fixtures and future/not-implemented `.firmfixture` bodies remain quarantined evidence, not public V2 syntax.++## Compatibility policy++The parser retains harmless, already-supported lowercase spellings for audited Units, primitive fields, and FEA constructs/fields. Mixed input such as `Model` plus `units` and `Box` plus `size` parses through the canonical document route with zero warnings. Legacy `solid name: Primitive`, V1 input, JSON `.firmasm`, and the bounded inline-STEP expression remain explicit compatibility surfaces.++There is no global case-insensitive lexer or identifier rewrite. Aliases are local to their owning binders, so user and external identifiers keep their spelling and casing. No casing-only warning was introduced.++## Canonical corpus migration++The consolidated `fixtures/Canonical/` corpus was audited and required no dialect repair. Active analytic Sphere, pointed Cone, and Torus fixtures were migrated from the lowercase `solid` adapter to direct PascalCase declarations. The canonical FEA cantilever, inline-step analysis, and public A36 dogfood source now use ordinary Model geometry and PascalCase analysis vocabulary.++Public geometry, FEA, Sheet Metal, materials, syntax, feature-reference, and index documentation now use and explain the same dialect. The FEA and Sheet Metal guides contain complete authorable examples. VS Code grammar coverage recognizes the reconciled constructs, and snippets emit canonical Sphere, Cone, Torus, and Linear Analysis forms only. LegacyV1 and speculative `.firmfixture` inputs were not rewritten.++An executable qualification test scans current Firmament fixtures, public `firmament` code fences, and VS Code snippets for known noncanonical owned vocabulary while allowing external identifiers and user-selected names.++## Parser equivalence evidence++- Direct and legacy Sphere, Cone, and Torus sources produce equal primitive records and lowering results.+- Canonical and lowercase FEA keyword/field forms produce equivalent compiled analysis contracts.+- Canonical ordinary `Box Beam` geometry reaches the native FEA region producer; the former FEA-only geometry-regex seam is removed while its old input remains a fallback.+- Mixed supported casing selects the canonical parser route without warnings.+- The real CLI validates the canonical analytic fixtures and solves the canonical cantilever as `FirmamentNative`; the deterministic FEA evidence hash is `54A2A9E1952D3F47ECE5B371D8A9AFA62F9FBEB675BC6798F3BCA8E76A7F3D27`.++## Fresh-agent results++A fresh agent was restricted to `docs/public/` and `fixtures/Canonical/`, with no historical fixtures. Its first pass found two genuine authoring ambiguities: the public FEA and Sheet Metal pages lacked complete copyable programs, and the relationship between direct Box geometry and profile-based Compose placement for Boss/Pocket was underexplained.++After those documentation repairs, the agent independently authored all three requested cases in one visual dialect:++- an ordinary machined part using a profile Base/Compose for Boss and Pocket, followed by Hole and EdgeFinish in the admitted semantic location;+- a canonical ordinary `Box` plus `Analysis`, `Fixed`, and `Force` cantilever;+- a specialized PascalCase `SheetMetal` bracket with `Flange` and Sheet Metal `Hole`.++The second pass reported no remaining spelling or field-placement guess. The test also confirmed that intentional Model/Compose and Sheet Metal distinctions are teachable without exposing historical dialects.++## Validation++- Release solution build: pass, 0 warnings, 0 errors.+- Full active serial .NET suite (`Category!=SlowCorpus`): 3,006 passed across the test projects, 0 failed. The FrictionLab assembly had no tests matching the active filter.+- Focused reconciliation suites: canonical grammar 11/11, production FEA 8/8, CLI dialect/public qualification 15/15.+- Repository layout guard: pass, 3,579 tracked files inspected.+- VS Code extension: TSPack sync/check, typecheck, 13 tests, build, and VSIX packaging passed.+- Cadmata release gate: TSPack sync/check, typecheck, 81 tests, build, and lint passed. Existing dependency-version and blocked lifecycle-script policy notices remain acknowledged.+- Release ZIP smoke: extracted cleanly; packaged CLI help and canonical validation passed; packaged Sphere and pointed Cone produced exact STEP; packaged canonical cantilever FEA converged with equilibrium evidence; packaged NativeAOT Forge Host reported Protocol v1 and five templates.+- `git diff --check` and public-document qualification: pass.+- SHA-256 manifest: 19/19 staged entries independently recomputed and matched.++## Release artifact impact++All Preview 3 candidate artifacts were regenerated from the A5c tree. The publication directory contains the Windows x64 bundle, Firmament VSIX, CLI package, and all 16 public library packages. The complete byte counts and hashes are in the generated `artifacts/local/a5c/release/RELEASE-INVENTORY.md` and `SHA256SUMS.txt`.++| Principal artifact | Bytes | SHA-256 |+| --- | ---: | --- |+| Windows x64 ZIP | 107,782,724 | `939fe78efef094cb699e041474550911ddfabb463760b431a6a1fba9dd4e1a63` |+| Firmament VSIX | 12,327 | `830cebe18f7dfe97da8da88da862de8f85cbf5085791ed880edc685c5c47d38e` |+| CLI NuGet | 33,412,229 | `dedb7aded39914c3d624f7300c91a3baa88e5023b87d4d630dedc576451b6769` |++As with every uncommitted release-candidate assembly, publication automation must regenerate artifacts after the final commit/tag so embedded revision metadata and hashes correspond to that immutable revision.++## Feature freeze++Feature freeze remains intact. A5c adds only direct parser access to already-existing analytic primitive semantics, routes canonical ordinary geometry into the existing FEA compiler, bounds compatibility aliases, migrates current source/examples, and documents verified ownership. It does not add geometry, analyses, PMI, Sheet Metal operations, Assembly behavior, Forge templates, arbitrary Booleans, or a formatter.++The resulting policy is: one canonical dialect, permissive compatibility, intentional domain differences, and no syntax police.diff --git a/fixtures/FEA/cantilever.firmament b/fixtures/FEA/cantilever.firmamentindex 33af7488..fe40ff00 100644--- a/fixtures/FEA/cantilever.firmament+++ b/fixtures/FEA/cantilever.firmament@@ -1,22 +1,22 @@Model CantileverWitness {Units: mm- solid beam: Box { size: [120, 20, 20] }+ Box Beam { Size: [120mm, 20mm, 20mm] }Analysis LinearElastic Cantilever {- body: beam- material: Standard.Materials.Aluminum.6061_T6+ Body: Beam+ Material: Standard.Materials.Aluminum.6061_T6Fixed Root {- region: beam.face(-X)- components: [X, Y, Z]+ Region: Beam.face(-X)+ Components: [X, Y, Z]}Force Tip {- region: beam.face(+X)- vector: [0N, -100N, 0N]+ Region: Beam.face(+X)+ Vector: [0N, -100N, 0N]}- results: [Displacement, Strain, Stress, ReactionForce]- lattice: [12, 2, 2]+ Results: [Displacement, Strain, Stress, ReactionForce]+ Lattice: [12, 2, 2]}}diff --git a/fixtures/FEA/inline-step-through-hole.firmament b/fixtures/FEA/inline-step-through-hole.firmamentindex d24d630d..c5370ef1 100644--- a/fixtures/FEA/inline-step-through-hole.firmament+++ b/fixtures/FEA/inline-step-through-hole.firmament@@ -1,19 +1,19 @@Model ImportedThroughHoleWitness {Analysis LinearElastic ImportedThroughHole {- body: inlineSTEP("../InlineStep/testdata/canonical-through-hole.step")- material: Standard.Materials.Aluminum.6061_T6+ Body: inlineSTEP("../InlineStep/testdata/canonical-through-hole.step")+ Material: Standard.Materials.Aluminum.6061_T6Fixed Mount {- region: body.face(#170)- components: [X, Y, Z]+ Region: body.face(#170)+ Components: [X, Y, Z]}Force ServiceLoad {- region: body.face(#141)- vector: [0N, -500N, 0N]+ Region: body.face(#141)+ Vector: [0N, -500N, 0N]}- results: [Displacement, Strain, Stress, ReactionForce]- lattice: [6, 4, 3]+ Results: [Displacement, Strain, Stress, ReactionForce]+ Lattice: [6, 4, 3]}}diff --git a/fixtures/Primitive/valid/a3-pointed-cone-step-qualified.firmament b/fixtures/Primitive/valid/a3-pointed-cone-step-qualified.firmamentindex 79a60127..32e68197 100644--- a/fixtures/Primitive/valid/a3-pointed-cone-step-qualified.firmament+++ b/fixtures/Primitive/valid/a3-pointed-cone-step-qualified.firmament@@ -1,9 +1,9 @@-model A3PointedCone {- units mm+Model A3PointedCone {+ Units: mm- solid body: Cone {- bottomRadius: 6mm- topRadius: 0mm- height: 18mm+ Cone Body {+ BottomRadius: 6mm+ TopRadius: 0mm+ Height: 18mm}}diff --git a/fixtures/Primitive/valid/a3-sphere-step-qualified.firmament b/fixtures/Primitive/valid/a3-sphere-step-qualified.firmamentindex 177b9923..64713f8f 100644--- a/fixtures/Primitive/valid/a3-sphere-step-qualified.firmament+++ b/fixtures/Primitive/valid/a3-sphere-step-qualified.firmament@@ -1,7 +1,7 @@-model A3Sphere {- units mm+Model A3Sphere {+ Units: mm- solid body: Sphere {- radius: 7.5mm+ Sphere Body {+ Radius: 7.5mm}}diff --git a/fixtures/Primitive/valid/a3-torus-step-qualified.firmament b/fixtures/Primitive/valid/a3-torus-step-qualified.firmamentindex 324f8e9b..37d00775 100644--- a/fixtures/Primitive/valid/a3-torus-step-qualified.firmament+++ b/fixtures/Primitive/valid/a3-torus-step-qualified.firmament@@ -1,8 +1,8 @@-model A3Torus {- units mm+Model A3Torus {+ Units: mm- solid body: Torus {- majorRadius: 12mm- minorRadius: 3mm+ Torus Body {+ MajorRadius: 12mm+ MinorRadius: 3mm}}diff --git a/fixtures/PublicDogfood/ai-fea-a36-cantilever.firmament b/fixtures/PublicDogfood/ai-fea-a36-cantilever.firmamentindex 85b28327..42d978ca 100644--- a/fixtures/PublicDogfood/ai-fea-a36-cantilever.firmament+++ b/fixtures/PublicDogfood/ai-fea-a36-cantilever.firmament@@ -1,19 +1,19 @@Model SteelCantilever {Units: mm- solid beam: Box { size: [100, 30, 15] }+ Box Beam { Size: [100mm, 30mm, 15mm] }Analysis LinearElastic ServiceLoad {- body: beam- material: Standard.Materials.Steel.ASTM_A36+ Body: Beam+ Material: Standard.Materials.Steel.ASTM_A36Fixed Root {- region: beam.face(-X)- components: [X, Y, Z]+ Region: Beam.face(-X)+ Components: [X, Y, Z]}Force Tip {- region: beam.face(+X)- vector: [0N, -500N, 0N]+ Region: Beam.face(+X)+ Vector: [0N, -500N, 0N]}- results: [Displacement, Strain, Stress, ReactionForce]- lattice: [16, 2, 2]+ Results: [Displacement, Strain, Stress, ReactionForce]+ Lattice: [16, 2, 2]}}diff --git a/tools/vscode-firmament/snippets/firmament.json b/tools/vscode-firmament/snippets/firmament.jsonindex dd6e702c..fa7b65c7 100644--- a/tools/vscode-firmament/snippets/firmament.json+++ b/tools/vscode-firmament/snippets/firmament.json@@ -14,6 +14,35 @@"body": ["Cylinder ${1:Body} {", " Radius: ${2:20mm}", " Height: ${3:40mm}", "}"],"description": "Cylinder primitive"},+ "Sphere": {+ "prefix": "sphere",+ "body": ["Sphere ${1:Body} {", " Radius: ${2:20mm}", "}"],+ "description": "Canonical analytic sphere primitive"+ },+ "Cone": {+ "prefix": "cone",+ "body": ["Cone ${1:Body} {", " BottomRadius: ${2:20mm}", " TopRadius: ${3:0mm}", " Height: ${4:40mm}", "}"],+ "description": "Canonical analytic cone primitive"+ },+ "Torus": {+ "prefix": "torus",+ "body": ["Torus ${1:Body} {", " MajorRadius: ${2:20mm}", " MinorRadius: ${3:5mm}", "}"],+ "description": "Canonical analytic torus primitive"+ },+ "Linear Analysis": {+ "prefix": "analysis-linear",+ "body": [+ "Analysis LinearElastic ${1:Check} {",+ " Body: ${2:Body}",+ " Material: ${3:Standard.Materials.Aluminum.6061_T6}",+ " Fixed ${4:Root} { Region: ${2:Body}.face(-X) Components: [X, Y, Z] }",+ " Force ${5:Tip} { Region: ${2:Body}.face(+X) Vector: [0N, ${6:-100N}, 0N] }",+ " Results: [Displacement, Strain, Stress, ReactionForce]",+ " Lattice: [${7:12}, ${8:2}, ${9:2}]",+ "}"+ ],+ "description": "Canonical linear-elastic analysis on ordinary Model geometry"+ },"Concept Path": {"prefix": "concept-path","body": [diff --git a/tools/vscode-firmament/syntaxes/firmament.tmLanguage.json b/tools/vscode-firmament/syntaxes/firmament.tmLanguage.jsonindex 62811ddd..5cc8a107 100644--- a/tools/vscode-firmament/syntaxes/firmament.tmLanguage.json+++ b/tools/vscode-firmament/syntaxes/firmament.tmLanguage.json@@ -49,7 +49,7 @@},{"name": "keyword.declaration.firmament",- "match": "\\b(?:Model|Box|Cylinder|RoundedBox|Frustum|Concept|Struct|Construction|Plane|Path|Profile|Compose|Boss|Pocket|Modify|Selection|Record|Static|Table|Template|Pattern|Match|Require|Pmi|Datum|Assert|InlineStep|Recognize|Replace|EdgeFinish|Hole|Slot|Region|Segment|Loop|Base|Extrude)\\b"+ "match": "\\b(?:Model|Units|Box|Cylinder|Cone|Sphere|Torus|RoundedBox|Frustum|Concept|Struct|Construction|Plane|Path|Profile|Compose|Boss|Pocket|Modify|Selection|Record|Static|Table|Template|Pattern|Match|Require|Pmi|Datum|HoleDiameter|Assert|InlineStep|Recognize|Replace|EdgeFinish|Hole|Slot|Region|Segment|Loop|Base|Extrude|SheetMetal|Flange|Analysis|Fixed|Force|Material|Results|Lattice)\\b"},{ "name": "keyword.control.firmament", "match": "\\b(?:with|With|From|Using|On|Over|As|Current|Key)\\b" }]diff --git a/tools/vscode-firmament/tests/grammar.test.ts b/tools/vscode-firmament/tests/grammar.test.tsindex d701242f..86a4ba00 100644--- a/tools/vscode-firmament/tests/grammar.test.ts+++ b/tools/vscode-firmament/tests/grammar.test.ts@@ -31,6 +31,8 @@ async function grammar() {test("critical canonical syntax receives stable TextMate scopes", async () => {const loaded = await grammar();const source = `Model Plate {+ Sphere Ball { Radius: 5mm }+ Analysis LinearElastic Check { Body: Ball }Concept Path Outline On XY { Start: Point2(0mm, 0mm) }Profile Face From OutlineBoss MountBoss { On: Top Profile: Face Height: 8mm }@@ -55,6 +57,8 @@ test("critical canonical syntax receives stable TextMate scopes", async () => {return token.scopes;};assert.ok(scopeAt("Model").includes("keyword.declaration.firmament"));+ assert.ok(scopeAt("Sphere").includes("keyword.declaration.firmament"));+ assert.ok(scopeAt("Analysis").includes("keyword.declaration.firmament"));assert.ok(scopeAt("Boss").includes("keyword.declaration.firmament"));assert.ok(scopeAt("Pocket").includes("keyword.declaration.firmament"));assert.ok(scopeAt("Concept Path").includes("keyword.declaration.compound.firmament"));