You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Gemini flagged that the flatten RFC key tables omit include and ref (on merged #594@109 and closed #596@117). Investigated the actual semantics in the engine so the tables can be filled correctly:
include — scene-file inclusion (TOP-LEVEL key)
Shape: "include": ["path/a.jsonc", "path/b.jsonc"] — top-level array of scene-file paths.
Behavior: scene_loader.loadSceneFile recursively loads each + merges its entities; guarded by MAX_DEPTH (error.IncludeDepthExceeded). Scene composition. (labelle-engine/src/jsonc/scene_loader.zig:502-533, game.zig:243,1380.)
Nuance: top-level "include" is live; meta.include is reserved by the RFC but currently unused (scene_loader.zig:358). Document both states.
"ref": "<name>" — a structural key on an entity (and on a prefab's root object, where it sits at top level) that registers a referenceable name. Real example: prefabs/storage/eos_with_water.jsonc — "ref": "storage" on the root, "ref": "item" on a child.
"@<name>" — consumer side: a component-field VALUE prefixed @ pointing at a named entity (e.g. WithItem { item_id: "@item" }).
Resolution: two-pass (src/jsonc/ref_resolver.zig) — pass 1 registers names + records deferred @ref fields; pass 2 patches each with the resolved entity id (walks the RefContext parent chain). ref_arrays handle arrays of refs (children).
Gemini flagged that the flatten RFC key tables omit
includeandref(on merged #594 @109 and closed #596 @117). Investigated the actual semantics in the engine so the tables can be filled correctly:include— scene-file inclusion (TOP-LEVEL key)"include": ["path/a.jsonc", "path/b.jsonc"]— top-level array of scene-file paths.scene_loader.loadSceneFilerecursively loads each + merges its entities; guarded byMAX_DEPTH(error.IncludeDepthExceeded). Scene composition. (labelle-engine/src/jsonc/scene_loader.zig:502-533,game.zig:243,1380.)"include"is live;meta.includeis reserved by the RFC but currently unused (scene_loader.zig:358). Document both states.RFC-FLATTEN-ROOT.mdtable).ref— entity references (two-pass@ref, #495)"ref": "<name>"— a structural key on an entity (and on a prefab's root object, where it sits at top level) that registers a referenceable name. Real example:prefabs/storage/eos_with_water.jsonc—"ref": "storage"on the root,"ref": "item"on a child."@<name>"— consumer side: a component-field VALUE prefixed@pointing at a named entity (e.g.WithItem { item_id: "@item" }).src/jsonc/ref_resolver.zig) — pass 1 registers names + records deferred@reffields; pass 2 patches each with the resolved entity id (walks theRefContextparent chain).ref_arrayshandle arrays of refs (children).refonly appears top-level in prefab files because a prefab's root IS an entity.) This belongs in the parked RFC: flatten unified-format wrappers + bundle shape (v2.0 phase 3) #596 revision.Action
RFC-FLATTEN-ROOT.md(RFC: flatten the root: wrapper out of unified-format files (engine#592 phase 2) #594): addincludeto the top-level key table (with themeta.include-reserved note).RFC-FLATTEN-WRAPPERS-AND-BUNDLES.md, parked for the Step-3/4 + bundle-meta contradictions): addrefto the entities/structural-keys table.Refs: #594 (merged), #596 (closed, branch
rfc/flatten-wrappers-and-bundleskept).