Skip to content

Mermaid state import drops named composite states and ownership #311

Description

@rudycelekli

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions