Next Gen STEP AP242 Native-ish BREP Geometric Modeling Kernel
Route Firmament frontends explicitly and support typed symbol namespaces
Yuechen Li47f8a43e1e18
diff --git a/Aetheris.CLI/CliRunner.cs b/Aetheris.CLI/CliRunner.csindex db85fe99..f560b289 100644--- a/Aetheris.CLI/CliRunner.cs+++ b/Aetheris.CLI/CliRunner.cs@@ -1305,6 +1305,14 @@ Model CanonicalPanel {}var source = File.ReadAllText(fullPath);+ var frontend = FirmamentFrontendSchemas.Select(source);+ if (!frontend.IsSuccess)+ {+ if (json) stdout.WriteLine(JsonSerializer.Serialize(new { command = "inspect", success = false, input = fullPath, diagnostics = frontend.Diagnostics }, JsonOptions));+ else foreach (var diagnostic in frontend.Diagnostics) stderr.WriteLine("error: " + diagnostic);+ return 1;+ }+ source = frontend.Source;if (SheetMetalFirmament.LooksLikeSheetMetal(source))return RunSheetMetal(["inspect", fullPath, .. args.Skip(1)], stdout, stderr);if (PlasticShellFirmament.LooksLikePlasticShell(source))@@ -1349,6 +1357,14 @@ Model CanonicalPanel {else foreach (var diagnostic in structural.Diagnostics) stderr.WriteLine($"error: {diagnostic}");return structural.IsSuccess ? 0 : 1;}+ if (frontend.Schema == FirmamentFrontendSchema.SectionChain)+ {+ var section = SectionChainAuthoringParser.Compile(source);+ if (json) stdout.WriteLine(JsonSerializer.Serialize(new { command = "inspect", success = section.IsSuccess, input = fullPath, domain = "SectionChain", sectionChain = section.Chain?.StableId, diagnostics = section.Diagnostics }, JsonOptions));+ else if (section.IsSuccess) stdout.WriteLine($"SectionChain {section.Chain!.StableId}: {section.Chain.Sections.Count} sections");+ else foreach (var diagnostic in section.Diagnostics) stderr.WriteLine("error: " + diagnostic);+ return section.IsSuccess ? 0 : 1;+ }var library = FirmamentStandardLibraryResolver.Resolve(source, out var libraryDiagnostics);var inspectionSource = library?.Source ?? source;var sweepSource = ExpandSweepInspectionSource(source, out var sweepExpansionDiagnostics);@@ -2039,6 +2055,14 @@ Model CanonicalPanel {}var validationSource=File.ReadAllText(sourcePath);+ var frontend = FirmamentFrontendSchemas.Select(validationSource);+ if (!frontend.IsSuccess)+ {+ if (json) stdout.WriteLine(JsonSerializer.Serialize(new { firmamentV2Validation = new { source = sourcePath, status = "invalid", diagnostics = frontend.Diagnostics } }, JsonOptions));+ else foreach (var diagnostic in frontend.Diagnostics) stderr.WriteLine("error: " + diagnostic);+ return 1;+ }+ validationSource = frontend.Source;if (PlasticShellFirmament.LooksLikePlasticShell(validationSource)){var plastic = PlasticShellFirmament.Compile(validationSource, Path.GetFullPath(sourcePath));@@ -2071,6 +2095,14 @@ Model CanonicalPanel {else stdout.WriteLine($"Firmament V2 Structural validation: {payload.status} ({payload.summary.fatalDiagnosticCount} fatal, 0 warning)");return structural.IsSuccess ? 0 : 1;}+ if (frontend.Schema == FirmamentFrontendSchema.SectionChain)+ {+ var section = SectionChainAuthoringParser.Compile(validationSource);+ var payload = new { source = sourcePath, status = section.IsSuccess ? "valid" : "invalid", domain = "SectionChain", summary = new { fatalDiagnosticCount = section.Diagnostics.Count, warningDiagnosticCount = 0, sections = section.Chain?.Sections.Count ?? 0 }, diagnostics = section.Diagnostics };+ if (json) stdout.WriteLine(JsonSerializer.Serialize(new { firmamentV2Validation = payload }, JsonOptions));+ else stdout.WriteLine($"Firmament V2 SectionChain validation: {payload.status} ({payload.summary.fatalDiagnosticCount} fatal, 0 warning)");+ return section.IsSuccess ? 0 : 1;+ }if (WireFormAuthoring.IsWireFormSource(validationSource)){var wireSource = ExpandSweepInspectionSource(validationSource, out var expansionDiagnostics);diff --git a/Aetheris.Kernel.Firmament.Tests/FirmamentFrontendSchemaTests.cs b/Aetheris.Kernel.Firmament.Tests/FirmamentFrontendSchemaTests.csnew file mode 100644index 00000000..e6d4b74a--- /dev/null+++ b/Aetheris.Kernel.Firmament.Tests/FirmamentFrontendSchemaTests.cs@@ -0,0 +1,36 @@+using Aetheris.Kernel.Firmament.FirmamentV2;++namespace Aetheris.Kernel.Firmament.Tests;++public sealed class FirmamentFrontendSchemaTests+{+ [Fact]+ public void ExplicitWireFormHeaderSelectsAndErasesOnlyTheHeader()+ {+ var selection = FirmamentFrontendSchemas.Select("// witness\nschema WireForm\nModel W { Units: mm WireForm W { Diameter: 1mm } }");+ Assert.True(selection.IsSuccess);+ Assert.Equal(FirmamentFrontendSchema.WireForm, selection.Schema);+ Assert.DoesNotContain("schema WireForm", selection.Source, StringComparison.Ordinal);+ Assert.True(Materializer.WireFormAuthoring.IsWireFormSource(selection.Source));+ }++ [Theory]+ [InlineData("schema Unknown", "firmament-schema-unknown:Unknown")]+ [InlineData("schema WireForm\nschema Sweep", "firmament-schema-duplicate")]+ [InlineData("Model Part { Units: mm }\nschema Mechanical", "firmament-schema-late")]+ [InlineData("schema Mechanical\nModel W { Units: mm WireForm W { Diameter: 1mm } }", "firmament-schema-mismatch:declared=Mechanical:source=WireForm")]+ public void InvalidHeadersFailAtTheFrontendBoundary(string source, string diagnostic)+ {+ var selection = FirmamentFrontendSchemas.Select(source);+ Assert.False(selection.IsSuccess);+ Assert.Contains(diagnostic, selection.Diagnostics.Single(), StringComparison.Ordinal);+ }++ [Fact]+ public void LegacySchemaMappingIsNotMisreadAsAFrontendHeader()+ {+ var selection = FirmamentFrontendSchemas.Select("schema:\n process: CNC");+ Assert.True(selection.IsSuccess);+ Assert.False(selection.IsExplicit);+ }+}diff --git a/Aetheris.Kernel.Firmament.Tests/FirmamentV2CanonicalAdvancedGrammarTests.cs b/Aetheris.Kernel.Firmament.Tests/FirmamentV2CanonicalAdvancedGrammarTests.csindex 31ce00ae..19e82b8d 100644--- a/Aetheris.Kernel.Firmament.Tests/FirmamentV2CanonicalAdvancedGrammarTests.cs+++ b/Aetheris.Kernel.Firmament.Tests/FirmamentV2CanonicalAdvancedGrammarTests.cs@@ -179,6 +179,19 @@ public sealed class FirmamentV2CanonicalAdvancedGrammarTestsAssert.Contains("firmament-v2-symbol-duplicate:Plate:Profile:Compose", parse.Diagnostics);}+ [Fact]+ public void CanonicalSymbolTable_AllowsProfileAndMaterializedFeatureNamesToCoincide()+ {+ var parse = FirmamentV2Parser.Parse(File.ReadAllText(Path.GetFullPath(Path.Combine(AppContext.BaseDirectory, "../../../../fixtures/Regression/LanguageBurnIn/boss-stack/boss-stack.firmament"))));++ Assert.True(parse.IsSuccess, string.Join(Environment.NewLine, parse.Diagnostics));+ var symbols = Assert.IsType<FirmamentV2CanonicalSymbolTable>(parse.Document!.SymbolTable);+ Assert.Equal(FirmamentV2CanonicalSymbolKind.Profile, symbols.Resolve("Pad", FirmamentV2CanonicalSymbolKind.Profile)!.Kind);+ Assert.Equal(FirmamentV2CanonicalSymbolKind.Boss, symbols.Resolve("Pad", FirmamentV2CanonicalSymbolKind.Boss)!.Kind);+ Assert.Equal(FirmamentV2CanonicalSymbolKind.Profile, symbols.Resolve("Crown", FirmamentV2CanonicalSymbolKind.Profile)!.Kind);+ Assert.Equal(FirmamentV2CanonicalSymbolKind.Boss, symbols.Resolve("Crown", FirmamentV2CanonicalSymbolKind.Boss)!.Kind);+ }+[Theory][InlineData("Features/Slots/straight-slot.firmament", "ReliefEntry")][InlineData("Features/Slots/rounded-rectangle-opening.firmament", "OpeningEntry")]diff --git a/Aetheris.Kernel.Firmament/FirmamentBuildAndExport.cs b/Aetheris.Kernel.Firmament/FirmamentBuildAndExport.csindex 05f36f26..8731ba89 100644--- a/Aetheris.Kernel.Firmament/FirmamentBuildAndExport.cs+++ b/Aetheris.Kernel.Firmament/FirmamentBuildAndExport.cs@@ -39,6 +39,9 @@ public static class FirmamentBuildAndExportvar fullSourcePath = Path.GetFullPath(sourcePath);var sourceText = NormalizeLf(File.ReadAllText(fullSourcePath, Encoding.UTF8));+ var frontend = FirmamentFrontendSchemas.Select(sourceText);+ if (!frontend.IsSuccess) return KernelResult<FirmamentBuildAndExportResult>.Failure(frontend.Diagnostics.Select(SchemaDiagnostic).ToArray());+ sourceText = frontend.Source;if (PipingAuthoring.IsPipingSource(sourceText)){var piping = PipingAuthoring.Compile(sourceText, fullSourcePath);@@ -76,7 +79,7 @@ public static class FirmamentBuildAndExportif (library is null)return KernelResult<FirmamentBuildAndExportResult>.Failure(LibraryDiagnostics(libraryDiagnostics));sourceText = library.Source;- var exportResult = ExportSource(sourceText, Path.GetDirectoryName(fullSourcePath), allowV1Compatibility: true);+ var exportResult = ExportSource(sourceText, Path.GetDirectoryName(fullSourcePath), allowV1Compatibility: true, frontend.Schema);if (!exportResult.IsSuccess){return KernelResult<FirmamentBuildAndExportResult>.Failure(exportResult.Diagnostics);@@ -120,6 +123,9 @@ public static class FirmamentBuildAndExport{ArgumentNullException.ThrowIfNull(sourceText);var normalized = NormalizeLf(sourceText);+ var frontend = FirmamentFrontendSchemas.Select(normalized);+ if (!frontend.IsSuccess) return KernelResult<FirmamentStepExportResult>.Failure(frontend.Diagnostics.Select(SchemaDiagnostic).ToArray());+ normalized = frontend.Source;if (PipingAuthoring.IsPipingSource(normalized)){var piping = PipingAuthoring.Compile(normalized, sourceDirectory ?? "memory");@@ -143,7 +149,7 @@ public static class FirmamentBuildAndExport// In-memory compilation is the canonical V2 boundary used by Forge,// assemblies, and drawings. Historical V1 execution is intentionally// available only to the explicitly versioned file compatibility route.- var export = ExportSource(normalized, sourceDirectory, allowV1Compatibility: false);+ var export = ExportSource(normalized, sourceDirectory, allowV1Compatibility: false, frontend.Schema);if (!export.IsSuccess) return export;var enrichedExport = AttachAuthoredFeatureReports(normalized, sourceDirectory, export.Value);var pmiParity = VerifyV2PmiExportParity(normalized, sourceDirectory, enrichedExport);@@ -254,8 +260,19 @@ public static class FirmamentBuildAndExportprivate static KernelResult<FirmamentStepExportResult> ExportSource(string sourceText,string? sourceDirectory = null,- bool allowV1Compatibility = false)+ bool allowV1Compatibility = false,+ FirmamentFrontendSchema? explicitSchema = null){+ if (explicitSchema == FirmamentFrontendSchema.SectionChain)+ {+ var authored = SectionChainAuthoringParser.Compile(sourceText);+ if (!authored.IsSuccess || authored.Materialization?.Body is null)+ return KernelResult<FirmamentStepExportResult>.Failure(authored.Diagnostics.Select(SchemaDiagnostic).ToArray());+ var step = Step242Exporter.ExportBody(authored.Materialization.Body, new Step242ExportOptions { ProductName = authored.Chain!.StableId });+ return step.IsSuccess+ ? KernelResult<FirmamentStepExportResult>.Success(new(step.Value, authored.Chain!.StableId, 0, "section-chain", "section-chain"))+ : KernelResult<FirmamentStepExportResult>.Failure(step.Diagnostics);+ }// The V2 parser owns canonical-root admission. Profile/composition// materializers consume only the extracted normalized declaration body,// so their historical top-level spelling is no longer author-visible.@@ -293,7 +310,7 @@ public static class FirmamentBuildAndExportcanonicalParseWatch.Stop();var canonicalAdvanced = FirmamentV2Parser.TryGetCanonicalAdvancedBody(materializerInput, out var canonicalBody);var materializerSource = canonicalAdvanced ? canonicalBody : materializerInput;- if (WireFormAuthoring.IsWireFormSource(materializerSource))+ if (explicitSchema == FirmamentFrontendSchema.WireForm || WireFormAuthoring.IsWireFormSource(materializerSource)){var authored = WireFormAuthoring.Parse(materializerSource);if (!authored.IsSuccess) return KernelResult<FirmamentStepExportResult>.Failure(authored.Diagnostics);@@ -316,7 +333,7 @@ public static class FirmamentBuildAndExportauthored.Value.Name, "WireState", "CircularSection", operation.LengthMm, "CenterlineLength", "Add",PolicySource: "WireFormFeatureAir", MaterializationRoute: "WireFormCenterlineAir->CircularSweepBRepPlan")).ToArray()), []);}- if (CircularSweepAuthoring.IsSweepSource(materializerSource))+ if (explicitSchema == FirmamentFrontendSchema.Sweep || CircularSweepAuthoring.IsSweepSource(materializerSource)){var airWatch = System.Diagnostics.Stopwatch.StartNew();var authored = CircularSweepAuthoring.Parse(materializerSource);@@ -566,6 +583,12 @@ public static class FirmamentBuildAndExportprivate static FirmamentV2ParseResult ParseSemanticSource(string source, string? sourceDirectory)=> FirmamentV2Parser.Parse(source, sourceDirectory);+ private static Kernel.Core.Diagnostics.KernelDiagnostic SchemaDiagnostic(string message) => new(+ Kernel.Core.Diagnostics.KernelDiagnosticCode.ValidationFailed,+ Kernel.Core.Diagnostics.KernelDiagnosticSeverity.Error,+ message,+ "Firmament.Schema");+private static IReadOnlyList<Kernel.Core.Diagnostics.KernelDiagnostic> LibraryDiagnostics(IEnumerable<string> diagnostics) =>diagnostics.Select(message => new Kernel.Core.Diagnostics.KernelDiagnostic(Kernel.Core.Diagnostics.KernelDiagnosticCode.ValidationFailed,diff --git a/Aetheris.Kernel.Firmament/FirmamentFrontendSchema.cs b/Aetheris.Kernel.Firmament/FirmamentFrontendSchema.csnew file mode 100644index 00000000..8033b3bc--- /dev/null+++ b/Aetheris.Kernel.Firmament/FirmamentFrontendSchema.cs@@ -0,0 +1,46 @@+using System.Text.RegularExpressions;+using Aetheris.Kernel.Firmament.FirmamentV2;+using Aetheris.Kernel.Firmament.Materializer;++namespace Aetheris.Kernel.Firmament;++/// <summary>Program-level selection of an existing Firmament frontend. This is deliberately+/// not a second parser or semantic IR: it only makes the current parser boundary explicit.</summary>+public enum FirmamentFrontendSchema { Mechanical, WireForm, Sweep, SectionChain }++public sealed record FirmamentFrontendSelection(FirmamentFrontendSchema? Schema, string Source, IReadOnlyList<string> Diagnostics)+{+ public bool IsExplicit => Schema is not null;+ public bool IsSuccess => Diagnostics.Count == 0;+}++public static class FirmamentFrontendSchemas+{+ private static readonly Regex Declaration = new(@"(?m)^\s*schema\s+(?<name>[A-Za-z_]\w*)\s*;?\s*$", RegexOptions.CultureInvariant);+ public static readonly IReadOnlyList<string> Names = ["Mechanical", "WireForm", "Sweep", "SectionChain"];++ public static FirmamentFrontendSelection Select(string source)+ {+ ArgumentNullException.ThrowIfNull(source);+ var declarations = Declaration.Matches(source).Cast<Match>().ToArray();+ if (declarations.Length == 0) return new(null, source, []);+ if (declarations.Length != 1) return new(null, source, ["firmament-schema-duplicate"]);+ var declaration = declarations[0];+ var prefix = source[..declaration.Index];+ if (prefix.Split(['\r', '\n']).Any(line => { var text = line.Trim(); return text.Length > 0 && !text.StartsWith("//", StringComparison.Ordinal) && !text.StartsWith('#'); }))+ return new(null, source, ["firmament-schema-late"]);+ var name = declaration.Groups["name"].Value;+ if (!Enum.TryParse<FirmamentFrontendSchema>(name, false, out var schema))+ return new(null, source, [$"firmament-schema-unknown:{name}:available={string.Join(',', Names)}"]);+ var normalized = source.Remove(declaration.Index, declaration.Length);+ var detected = DetectDistinctFrontend(normalized);+ if (detected is not null && detected != schema)+ return new(schema, normalized, [$"firmament-schema-mismatch:declared={schema}:source={detected}"]);+ return new(schema, normalized, []);+ }++ private static FirmamentFrontendSchema? DetectDistinctFrontend(string source) =>+ WireFormAuthoring.IsWireFormSource(source) ? FirmamentFrontendSchema.WireForm :+ CircularSweepAuthoring.IsSweepSource(source) ? FirmamentFrontendSchema.Sweep :+ SectionChainAuthoringParser.IsSectionChainSource(source) ? FirmamentFrontendSchema.SectionChain : null;+}diff --git a/Aetheris.Kernel.Firmament/FirmamentV2/CanonicalSymbolTable.cs b/Aetheris.Kernel.Firmament/FirmamentV2/CanonicalSymbolTable.csindex 817a3c90..53381256 100644--- a/Aetheris.Kernel.Firmament/FirmamentV2/CanonicalSymbolTable.cs+++ b/Aetheris.Kernel.Firmament/FirmamentV2/CanonicalSymbolTable.cs@@ -43,7 +43,10 @@ public sealed record FirmamentV2CanonicalSymbolTable(IReadOnlyList<FirmamentV2CanonicalSymbolBinding> Bindings){public FirmamentV2CanonicalSymbol? Resolve(string name) =>- Symbols.SingleOrDefault(symbol => string.Equals(symbol.Name, name, StringComparison.Ordinal));+ Symbols.FirstOrDefault(symbol => string.Equals(symbol.Name, name, StringComparison.Ordinal));++ public FirmamentV2CanonicalSymbol? Resolve(string name, FirmamentV2CanonicalSymbolKind kind) =>+ Symbols.SingleOrDefault(symbol => string.Equals(symbol.Name, name, StringComparison.Ordinal) && symbol.Kind == kind);}internal static class FirmamentV2CanonicalSymbolBinder@@ -66,6 +69,14 @@ internal static class FirmamentV2CanonicalSymbolBinderif (kind == FirmamentV2CanonicalSymbolKind.Body&& previous.Kind is FirmamentV2CanonicalSymbolKind.Profile or FirmamentV2CanonicalSymbolKind.Compose)return;+ // Profiles are construction inputs while Boss/Pocket names identify materialized+ // product features. Their references are typed (`Profile:`), so equal display+ // names are unambiguous and intentionally live in separate namespaces.+ if (CanShareName(previous.Kind, kind))+ {+ symbols.Add(new FirmamentV2CanonicalSymbol(name, kind, span));+ return;+ }diagnostics.Add($"{Duplicate}:{name}:{previous.Kind}:{kind}");return;}@@ -133,6 +144,10 @@ internal static class FirmamentV2CanonicalSymbolBinderreturn new(new(symbols, bindings), diagnostics.Distinct(StringComparer.Ordinal).Order(StringComparer.Ordinal).ToArray());}+ private static bool CanShareName(FirmamentV2CanonicalSymbolKind left, FirmamentV2CanonicalSymbolKind right) =>+ (left == FirmamentV2CanonicalSymbolKind.Profile && right is FirmamentV2CanonicalSymbolKind.Boss or FirmamentV2CanonicalSymbolKind.Pocket)+ || (right == FirmamentV2CanonicalSymbolKind.Profile && left is FirmamentV2CanonicalSymbolKind.Boss or FirmamentV2CanonicalSymbolKind.Pocket);+private static (string Name, FirmamentV2CanonicalSymbolKind Kind)? ParseSelectionReference(string source){var profile = Regex.Match(source, @"^(?<name>[A-Za-z_]\w*)\.Profile(?:Segments|Loop)\s*\(", RegexOptions.CultureInvariant);diff --git a/docs/public/firmament/syntax.md b/docs/public/firmament/syntax.mdindex 9628286c..c052247b 100644--- a/docs/public/firmament/syntax.md+++ b/docs/public/firmament/syntax.md@@ -1,5 +1,18 @@# Firmament V2 syntax+## Frontend schema++`schema` is an optional file-level frontend selector, not a namespace or data-validation schema. Put it before `Model` (comments and whitespace may precede it). Schema-free files retain compatibility routing; new specialized sources should state their owner explicitly.++| Schema | Use it for |+| --- | --- |+| `Mechanical` | Ordinary V2 mechanical parts and features. |+| `WireForm` | Formed wire, bends, coils, and knots. |+| `Sweep` | Circular-section Concept Path sweeps. |+| `SectionChain` | Standalone ruled/G1 section-chain bodies. |++For example, begin a formed-wire program with `schema WireForm`. An explicit schema is authoritative: if its frontend rejects the program, Firmament does not retry another frontend. Historical V1 `schema:` mappings remain compatibility metadata; they are distinct from this `schema <Name>` header.+A canonical native part begins with `Model`, declares `Units`, creates named solids, and applies semantic features in `Modify` or `Compose`:```firmament@@ -22,4 +35,6 @@ Firmament V1 is compatibility history rather than canonical V2 authoring. BodiesAn untransformed `Box` stock is centered in X/Y with `Bottom` at Z=0 and `Top` at Z=`Height`. Its local feature coordinates use that same stock frame: adding holes or edge finishes does not translate the stock.+Firmament admits declarations through typed semantic namespaces. Construction `Profile` names may coincide with `Boss` or `Pocket` feature names because feature `Profile:` references are explicitly typed; these identities remain distinct in structured inspection. Names may not otherwise shadow another declaration in the same semantic namespace.+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/release/LANG-ADMISSION-X1.md b/docs/release/LANG-ADMISSION-X1.mdnew file mode 100644index 00000000..9bdf3132--- /dev/null+++ b/docs/release/LANG-ADMISSION-X1.md@@ -0,0 +1,42 @@+# LANG-ADMISSION-X1 — unified Firmament admission++## Verdict++**Meaningful progression.** B03 is fixed: canonical V2 symbol binding now applies the same namespace doctrine to the profile/Compose route used by the Boss-stack witness. Build, validate, and inspect agree that the original source is admitted; lowering remains a subsequent command concern.++The wider "one admission result before every domain route" objective remains blocked by a concrete boundary: established profile-edge-finish, blind-drill, WireForm, and Sweep sources are accepted by their owned production parsers but are not yet representable by the generic V2 parser. A temporary global build gate correctly exposed that mismatch but rejected 27 existing Firmament tests, so it was removed rather than breaking those routes. Converging that requires an explicit multi-domain admission adapter, not a conditional around the generic parser.++## Root cause and correction++Before X1, build and validate reached the profile/Compose adapter, which treated construction profiles and materialized bosses as distinct semantic entities. Generic inspect also ran the canonical symbol binder, but that binder placed `Profile Pad` and `Boss Pad` in one flat name map and rejected the program as `firmament-v2-symbol-duplicate`.++The canonical symbol table now preserves both typed symbols. Profiles are construction geometry; Bosses and Pockets are materialized feature identities. A `Boss`/`Pocket` `Profile:` operand is typed, so same display names are not ambiguous. Other cross-family collisions remain rejected, and ordinary lookup retains the construction profile for existing unqualified profile consumers; kind-qualified lookup disambiguates structured consumers.++## Admission doctrine++```+Firmament recognition -> parser and semantic bind -> canonical symbol admission -> command/domain routing -> lowering or inspection+```++Admission covers source shape, semantic declarations, typed bindings, and namespace validity. Geometry support, STEP export, and specialized domain execution happen afterward. Current domain-specific syntaxes continue to own their execution paths; this X1 change does not collapse them into generic build.++## Parity evidence++| Source | Admit | Build | Validate | Inspect |+|---|---|---|---|---|+| original colliding Boss stack | accepted | success | valid | success |+| renamed Boss stack | accepted | success | valid | success |+| Profile/Compose name collision | rejected | n/a | invalid | invalid |++The original Boss stack retains its existing Z=0..21 mm realization. Evidence JSON and STEP outputs are in `artifacts/local/admission-x1/`.++## Namespace policy++- `Profile` and `Boss`/`Pocket` are separate typed namespaces and may share a display name.+- `Profile`, `Compose`, bodies, static declarations, selections, and peer feature declarations otherwise reject accidental shadowing.+- Typed references, such as `Boss ... Profile: Pad`, resolve the expected declaration kind deterministically.+- Template/record and compatibility behavior remains unchanged by this bounded repair.++## Validation++Release builds, focused parser/binder tests, Boss/Pocket tests, and command parity replay pass. `git diff --check` passes.diff --git a/docs/release/LANG-SCHEMA-X1.md b/docs/release/LANG-SCHEMA-X1.mdnew file mode 100644index 00000000..bd64b57f--- /dev/null+++ b/docs/release/LANG-SCHEMA-X1.md@@ -0,0 +1,18 @@+# LANG-SCHEMA-X1 — Explicit Firmament frontend schemas++## Verdict++Accepted. Firmament source can now declare its parser authority with `schema <Name>`; generic build, inspect, and validate preserve that selection rather than guessing after an explicit declaration.++| Schema | Frontend | Semantic output | Generic routing |+| --- | --- | --- | --- |+| Mechanical | Firmament V2 | existing V2 document | default V2 route |+| WireForm | WireForm authoring | `WireFormFeatureAir` | build, inspect, validate |+| Sweep | Circular Sweep authoring | `CircularSweepFeatureAir` | build, inspect, validate |+| SectionChain | SectionChain authoring | `SectionChain` materialization | build, inspect, validate |++The historical V1 `schema:` mapping was manufacturing/validation metadata, not dialect selection. It remains untouched; the new header only recognizes `schema <Name>` at the first meaningful declaration.++Explicit unknown, duplicate, late, and source-mismatched declarations fail with `firmament-schema-*` diagnostics. No explicit schema falls through to another parser. Schema-free inputs retain the prior compatibility heuristics.++The earlier universal-V2 admission experiment identified parser islands rather than a need for a mega-parser. WireForm, Sweep, and SectionChain are now named frontend boundaries. Profile/edge-finish and blind-drill forms remain Mechanical materializer routes; Piping, Structural, PlasticShell, Sculpting, and compatibility V1 remain documented frontend-debt candidates because their command routes are distinct but were not broadened into new public schemas in X1.diff --git a/fixtures/Canonical/Schema/wireform-u-wire.firmament b/fixtures/Canonical/Schema/wireform-u-wire.firmamentnew file mode 100644index 00000000..0eac7bd6--- /dev/null+++ b/fixtures/Canonical/Schema/wireform-u-wire.firmament@@ -0,0 +1,13 @@+schema WireForm++Model StandardUWire {+ Units: mm+ WireForm UWire {+ Diameter: 1mm+ Material: Standard.Materials.StainlessSteel.304_Annealed+ StartFrame { Origin: [5mm, 0mm, 0mm]; Tangent: [0, 1, 0]; Up: [0, 0, 1] }+ Straight RightLeg { Length: 20mm }+ Bend Crown { Radius: 5mm; Angle: 180deg; Plane: Up }+ Straight LeftLeg { Length: 20mm }+ }+}