feat(junction): add structure and standards contract

This commit is contained in:
que01 committed 2026-09-07 14:11:44 +08:00
1 parent 8d6f531377
commit 61cf276745
13 files changed
+843 -1

No files matched your search

+17
View File
@@ -272,3 +272,20 @@ readLayer('layers/intersection_surface.geojson')
// Correct: project compiler-owned properties from their published layer.
readLayer('layers/road_surface.geojson')
```
## 14. Junction structure and standards profile
Stage-0 JunctionTools structure is compiler-owned and versioned independently
of the direct-edit document. `buildJunctionStructure(input)` must return
`junction-structure/v1` with unique stable object keys, readable labels, and
explicit arm/corner/facility references; it must reject duplicate keys,
unknown references, and an effective arm count that differs from the supplied
arms. It must not infer missing arms from an internal `2x1`/`2x2` layout.
`CN_URBAN_DEFAULT_PROFILE` is the immutable `cn-urban-default` profile. Use
`cloneProfile()` before applying project-specific changes and
`validateStandardsProfile()` at the boundary. Rules distinguish recommended,
warning, and blocking/invariant fields; a profile is metadata and rule
configuration, not a client-side save decision. Keep the compiler as the sole
producer of structure and diagnostics so the client cannot reclassify a
junction from node counts.