Skip to content

Grouping Logic

See Grouping & Fan-in for the conceptual overview. This page is the contract reference.

{
"entities": [
{
"registryId": 42,
"identifier": { "name": "MyStruct" },
"_namespaces": ["myns"],
"sourceFile": "include/myns/my_struct.h",
"kind": "Struct",
"annotations": [{ "name": "RuleName", "arguments": [] }]
}
]
}

Every field available on the transformation script’s input node is also available in the entity list here.

{
"42": "generated/myns/output.cpp"
}
  • Keys are registryId values as strings.
  • Values are output file paths, relative to the --output directory.
  • Every entity in the input must have a corresponding key in the output. Missing entries cause an engine error.
PatternDescriptionExample path expression
1:1 (default)Entity ☛ file derived from source path(omit grouping.luau)
Fan-inAll entities ☛ one file"generated/all.cpp"
Namespace-basedEntity ☛ file named after its top namespaceentity._namespaces[1] .. "/registry.cpp"
Annotation-argumentEntity ☛ file named by annotation argumententity.annotations[1].arguments[1]
ConditionalInternal vs public routingif isInternal then "internal.md" else "public.md"