Current-main reproduction
Save stateDiagram-v2\nstate "Processing request" as processing {\n[*] --> queued\nqueued --> done\n}\n. Real Mermaid12.1.0 getDiagramFromText retains named composite processing with label and child relations. The public extractor exits0 but drops that composite entirely and emits its children at depth0 without parents. The equivalent plain state processing { ... } preserves its container and depth1 memberships.
python3 skills/diagram-design/scripts/mermaid_extract.py source.mmd --json
Existing contract
The Mermaid import reference requires preserving source content and container membership for the supported stateDiagram-v2 kind. Individual state aliases and composite states are already parsed.
Narrow proposed scope
Allow the existing quoted state alias form to retain the existing composite-state body. Preserve the named container, authored label and encoded child membership. No new kinds, fields, layout rendering or directives.
The reproduction uses only owned neutral source content and native format/validator controls. No security boundary, input execution, new diagram type or manifest version change is proposed.
Codex is assisting @rudycelekli with reproduction and implementation.
Current-main reproduction
Save
stateDiagram-v2\nstate "Processing request" as processing {\n[*] --> queued\nqueued --> done\n}\n. Real Mermaid12.1.0getDiagramFromTextretains named compositeprocessingwith label and child relations. The public extractor exits0 but drops that composite entirely and emits its children at depth0 without parents. The equivalent plainstate processing { ... }preserves its container and depth1 memberships.Existing contract
The Mermaid import reference requires preserving source content and container membership for the supported stateDiagram-v2 kind. Individual state aliases and composite states are already parsed.
Narrow proposed scope
Allow the existing quoted state alias form to retain the existing composite-state body. Preserve the named container, authored label and encoded child membership. No new kinds, fields, layout rendering or directives.
The reproduction uses only owned neutral source content and native format/validator controls. No security boundary, input execution, new diagram type or manifest version change is proposed.
Codex is assisting @rudycelekli with reproduction and implementation.