Files
diagram-design/.codex-plugin
4a769fe3eb fix(mermaid): parse quoted participants, create, and the full sequence arrow vocabulary (#54)
* fix(mermaid): parse quoted participants, create, and the full sequence arrow vocabulary

The shipped sequenceDiagram extractor silently dropped or rejected
Mermaid-valid constructs:

- `participant "Alice Smith"` (quoted name, no alias) vanished from the
  IR because the participant regex only accepted bare [\w.:-]+ ids.
- `participant "Alice Smith" as A` and `actor "Bob Builder" as B`
  lost their quoted display names and aliases.
- `create participant B` directives were ignored.
- Bidirectional messages `A<<->>B` / `A<<-->>B` (Mermaid v11.0+)
  hard-failed with "malformed edge".
- `->` / `-->` (open arrows with no arrowhead per the Mermaid docs)
  were misclassified as filled arrows.
- A message touching a declared `actor` overwrote its shape with
  "lifeline" because endpoints were force-added as lifelines.

The fix expands the participant regex to quoted names (with or without
an `as` alias) plus the `create` prefix, teaches the message regex the
bidirectional and open arrow forms, preserves declared actor shapes, and
classifies open arrows as undirected with no arrowhead. Multi-word
endpoints introduced by quoted declarations resolve correctly while
compact forms like `A-->>B` keep their ids. All forms were verified
against the real Mermaid v11.16.1 parser.

Adds a verification gate covering every form and updates the import
reference to document the supported sequence grammar.

* chore: bump plugin version to 2.4.2

---------

Co-authored-by: Cathryn Lavery <50469282+cathrynlavery@users.noreply.github.com>
Co-authored-by: Cathryn Lavery <cathryn@bestself.co>
2026-08-17 15:00:41 -07:00
..