@zenuml/core 3.47.9 → 3.48.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (205) hide show
  1. package/dist/cli/zenuml.mjs +13529 -0
  2. package/dist/cli/zenuml.mjs.map +1 -0
  3. package/dist/cloud-icons-eHuugVSv.js.map +1 -0
  4. package/dist/zenuml.esm.mjs +2153 -2156
  5. package/dist/zenuml.esm.mjs.map +1 -0
  6. package/dist/zenuml.js +82 -82
  7. package/dist/zenuml.js.map +1 -0
  8. package/package.json +18 -5
  9. package/.agents/skills/babysit-pr/SKILL.md +0 -223
  10. package/.agents/skills/babysit-pr/agents/openai.yaml +0 -7
  11. package/.agents/skills/dia-scoring/SKILL.md +0 -139
  12. package/.agents/skills/dia-scoring/agents/openai.yaml +0 -7
  13. package/.agents/skills/dia-scoring/references/selectors-and-keys.md +0 -253
  14. package/.agents/skills/land-pr/SKILL.md +0 -120
  15. package/.agents/skills/propagate-core-release/SKILL.md +0 -205
  16. package/.agents/skills/propagate-core-release/agents/openai.yaml +0 -7
  17. package/.agents/skills/propagate-core-release/references/downstreams.md +0 -42
  18. package/.agents/skills/ship-branch/SKILL.md +0 -105
  19. package/.agents/skills/submit-branch/SKILL.md +0 -76
  20. package/.agents/skills/validate-branch/SKILL.md +0 -72
  21. package/.claude/commands/README.md +0 -162
  22. package/.claude/commands/analyze.md +0 -101
  23. package/.claude/commands/clarify.md +0 -158
  24. package/.claude/commands/code-review.md +0 -322
  25. package/.claude/commands/constitution.md +0 -73
  26. package/.claude/commands/create-docs.md +0 -309
  27. package/.claude/commands/full-context.md +0 -121
  28. package/.claude/commands/gemini-consult.md +0 -164
  29. package/.claude/commands/handoff.md +0 -146
  30. package/.claude/commands/implement.md +0 -56
  31. package/.claude/commands/plan.md +0 -43
  32. package/.claude/commands/refactor.md +0 -188
  33. package/.claude/commands/specify.md +0 -21
  34. package/.claude/commands/tasks.md +0 -62
  35. package/.claude/commands/update-docs.md +0 -314
  36. package/.claude/hooks/README.md +0 -270
  37. package/.claude/hooks/config/sensitive-patterns.json +0 -86
  38. package/.claude/hooks/gemini-context-injector.sh +0 -129
  39. package/.claude/hooks/mcp-security-scan.sh +0 -147
  40. package/.claude/hooks/notify.sh +0 -103
  41. package/.claude/hooks/setup/hook-setup.md +0 -96
  42. package/.claude/hooks/setup/settings.json.template +0 -63
  43. package/.claude/hooks/sounds/complete.wav +0 -0
  44. package/.claude/hooks/sounds/input-needed.wav +0 -0
  45. package/.claude/hooks/subagent-context-injector.sh +0 -65
  46. package/.claude/skills/babysit-pr/SKILL.md +0 -223
  47. package/.claude/skills/babysit-pr/agents/openai.yaml +0 -7
  48. package/.claude/skills/dia-scoring/SKILL.md +0 -139
  49. package/.claude/skills/dia-scoring/agents/openai.yaml +0 -7
  50. package/.claude/skills/dia-scoring/references/selectors-and-keys.md +0 -253
  51. package/.claude/skills/emoji-eval/SKILL.md +0 -187
  52. package/.claude/skills/land-pr/SKILL.md +0 -120
  53. package/.claude/skills/propagate-core-release/SKILL.md +0 -205
  54. package/.claude/skills/propagate-core-release/agents/openai.yaml +0 -7
  55. package/.claude/skills/propagate-core-release/references/downstreams.md +0 -42
  56. package/.claude/skills/ship-branch/SKILL.md +0 -105
  57. package/.claude/skills/submit-branch/SKILL.md +0 -76
  58. package/.claude/skills/validate-branch/SKILL.md +0 -72
  59. package/.claude/skills/zenuml-ux-research/SKILL.md +0 -183
  60. package/.claude/skills/zenuml-ux-research/references/assertion-catalog.md +0 -261
  61. package/.claude/skills/zenuml-ux-research/references/best-practices-overview.md +0 -56
  62. package/.claude/skills/zenuml-ux-research/references/report-template.md +0 -89
  63. package/.claude/skills/zenuml-ux-research/references/scenarios/edit-message-label.md +0 -37
  64. package/.claude/skills/zenuml-ux-research/references/scenarios/insert-message.md +0 -36
  65. package/.claude/skills/zenuml-ux-research/references/scenarios/insert-participant.md +0 -31
  66. package/.claude/skills/zenuml-ux-research/references/scenarios/rename-participant.md +0 -33
  67. package/.claude/skills/zenuml-ux-research/references/scenarios/undo-insert.md +0 -35
  68. package/.devcontainer/devcontainer.json +0 -21
  69. package/.dockerignore +0 -19
  70. package/.eslintrc.js +0 -39
  71. package/.git-blame-ignore-revs +0 -6
  72. package/.kiro/hooks/README.md +0 -38
  73. package/.kiro/hooks/session-sound-notification.js +0 -44
  74. package/.kiro/hooks/session-sound-notification.json +0 -23
  75. package/.mcp.json.example +0 -17
  76. package/.nvmrc +0 -1
  77. package/.prettierignore +0 -4
  78. package/.prettierrc +0 -1
  79. package/.specify/memory/constitution.md +0 -33
  80. package/.specify/scripts/bash/check-prerequisites.sh +0 -166
  81. package/.specify/scripts/bash/common.sh +0 -113
  82. package/.specify/scripts/bash/create-new-feature.sh +0 -97
  83. package/.specify/scripts/bash/setup-plan.sh +0 -60
  84. package/.specify/scripts/bash/update-agent-context.sh +0 -728
  85. package/.specify/templates/agent-file-template.md +0 -23
  86. package/.specify/templates/plan-template.md +0 -219
  87. package/.specify/templates/spec-template.md +0 -116
  88. package/.specify/templates/tasks-template.md +0 -127
  89. package/.storybook/main.ts +0 -25
  90. package/.storybook/preview.ts +0 -29
  91. package/.watchmanconfig +0 -3
  92. package/AGENTS.md +0 -26
  93. package/CLAUDE.md +0 -124
  94. package/DEPLOYMENT.md +0 -62
  95. package/Dockerfile +0 -36
  96. package/IMPLEMENTATION_PLAN.md +0 -163
  97. package/Integration/vanilla-js/index.html +0 -42
  98. package/MCP-ASSISTANT-RULES.md +0 -85
  99. package/README_CN.md +0 -15
  100. package/TUTORIAL.md +0 -116
  101. package/antlr/antlr-4.11.1-complete.jar +0 -0
  102. package/bun.lock +0 -1544
  103. package/bunfig.toml +0 -52
  104. package/docs/UNICODE_SUPPORT.md +0 -179
  105. package/docs/ai-context/deployment-infrastructure.md +0 -21
  106. package/docs/ai-context/docs-overview.md +0 -89
  107. package/docs/ai-context/handoff.md +0 -174
  108. package/docs/ai-context/project-structure.md +0 -160
  109. package/docs/ai-context/system-integration.md +0 -21
  110. package/docs/asciidoc/contributor.adoc +0 -54
  111. package/docs/asciidoc/create-my-own-theme.adoc +0 -149
  112. package/docs/asciidoc/images/creation-component.png +0 -0
  113. package/docs/asciidoc/images/creation-rtl.png +0 -0
  114. package/docs/asciidoc/images/message-arrow-rtl.png +0 -0
  115. package/docs/asciidoc/images/occurrence.png +0 -0
  116. package/docs/asciidoc/images/return-message-conflict.png +0 -0
  117. package/docs/asciidoc/images/shift-up-half-the-height.png +0 -0
  118. package/docs/asciidoc/images/three-layer-info-arch.png +0 -0
  119. package/docs/asciidoc/images/vertical-alignment.svg +0 -1
  120. package/docs/asciidoc/images/vertically-aligning.png +0 -0
  121. package/docs/asciidoc/index.adoc +0 -277
  122. package/docs/asciidoc/theme-debug-web-app.png +0 -0
  123. package/docs/asciidoc/tutorial.adoc +0 -22
  124. package/docs/asciidoc/user-css.png +0 -0
  125. package/docs/async-vs-sync-parser-rules.md +0 -81
  126. package/docs/divider-parser-allow-spaces.md +0 -38
  127. package/docs/highlighting-messages.md +0 -52
  128. package/docs/images/editor-sample.png +0 -0
  129. package/docs/inherited-vs-provided-from.md +0 -64
  130. package/docs/parser/Assignment.md +0 -8
  131. package/docs/parser/PARSER_IMPROVEMENTS_CC.md +0 -425
  132. package/docs/parser/grammar_review_gemini.md +0 -116
  133. package/docs/participants-function.md +0 -25
  134. package/docs/responsive-participant-margin.md +0 -52
  135. package/docs/starter.md +0 -9
  136. package/docs/superpowers/plans/2026-03-27-e2e-test-reorg.md +0 -698
  137. package/docs/superpowers/plans/2026-03-30-emoji-support.md +0 -1220
  138. package/docs/superpowers/plans/2026-03-30-self-correcting-scoring.md +0 -206
  139. package/docs/superpowers/plans/2026-04-15-keyboard-editing-on-diagram.md +0 -1992
  140. package/docs/superpowers/plans/2026-04-15-zenuml-ux-research-skill.md +0 -1452
  141. package/docs/ux-research/.gitkeep +0 -0
  142. package/docs/ux-research/2026-04-15-rename-participant.md +0 -156
  143. package/docs/ux-research/2026-04-18-insert-participant.md +0 -151
  144. package/docs/width-translate-and-offsets.md +0 -62
  145. package/docs/xss.md +0 -59
  146. package/e2e/data/compare-cases.js +0 -1090
  147. package/e2e/data/diff-algorithm.js +0 -199
  148. package/e2e/fixtures/create-message.html +0 -26
  149. package/e2e/fixtures/editable-label.html +0 -35
  150. package/e2e/fixtures/editable-span.html +0 -122
  151. package/e2e/fixtures/empty-diagram.html +0 -23
  152. package/e2e/fixtures/fixture.html +0 -31
  153. package/e2e/fixtures/insert-participant.html +0 -23
  154. package/e2e/fixtures/reorder-cross-fragment.html +0 -31
  155. package/e2e/fixtures/reorder-fragment.html +0 -29
  156. package/e2e/fixtures/reorder-message.html +0 -27
  157. package/e2e/fixtures/svg-test.html +0 -21
  158. package/e2e/fixtures/type-switch.html +0 -29
  159. package/e2e/tools/canonical-history.html +0 -908
  160. package/e2e/tools/compare-case.html +0 -371
  161. package/e2e/tools/compare.html +0 -35
  162. package/e2e/tools/native-diff-ext/background.js +0 -60
  163. package/e2e/tools/native-diff-ext/bridge.js +0 -26
  164. package/e2e/tools/native-diff-ext/content.js +0 -194
  165. package/e2e/tools/svg-preview.html +0 -56
  166. package/embed.html +0 -193
  167. package/eslint.config.mjs +0 -35
  168. package/firebase-debug.log +0 -108
  169. package/iframe-container-demo/diagram.html +0 -124
  170. package/iframe-container-demo/host.html +0 -817
  171. package/index.html +0 -771
  172. package/mermaid-zenuml-async-spa-auth.png +0 -0
  173. package/mermaid-zenuml-async-spa-auth.snapshot.md +0 -96
  174. package/newsletter/unicode-support-announcement.md +0 -134
  175. package/playground/creation.html +0 -53
  176. package/playground/message.html +0 -63
  177. package/playwright.config.ts +0 -40
  178. package/renderer.html +0 -366
  179. package/scripts/analyze-compare-case/collect-data.mjs +0 -1134
  180. package/scripts/analyze-compare-case/config.mjs +0 -102
  181. package/scripts/analyze-compare-case/geometry.mjs +0 -101
  182. package/scripts/analyze-compare-case/native-diff.mjs +0 -224
  183. package/scripts/analyze-compare-case/output.mjs +0 -74
  184. package/scripts/analyze-compare-case/panel-diff.mjs +0 -114
  185. package/scripts/analyze-compare-case/report.mjs +0 -162
  186. package/scripts/analyze-compare-case/residual-scopes.mjs +0 -347
  187. package/scripts/analyze-compare-case/scoring.mjs +0 -829
  188. package/scripts/analyze-compare-case.mjs +0 -149
  189. package/scripts/bump-version.js +0 -117
  190. package/scripts/snapshot-dual.js +0 -173
  191. package/scripts/update-snapshots.js +0 -70
  192. package/skills/dia-scoring/SKILL.md +0 -129
  193. package/skills/dia-scoring/agents/openai.yaml +0 -7
  194. package/skills/dia-scoring/references/selectors-and-keys.md +0 -253
  195. package/tailwind.config.js +0 -126
  196. package/test-compression.html +0 -274
  197. package/test-mermaid-zenuml.html +0 -57
  198. package/test-setup.ts +0 -124
  199. package/test-url-params.html +0 -192
  200. package/tsconfig.app.json +0 -31
  201. package/tsconfig.node.json +0 -24
  202. package/tsconfig.test.json +0 -9
  203. package/vite.config.lib.ts +0 -93
  204. package/vite.config.ts +0 -84
  205. package/wrangler.toml +0 -18
@@ -1,253 +0,0 @@
1
- # Selectors And Keys
2
-
3
- The analyzer uses these roots:
4
-
5
- - HTML root: `#html-output .frame`, fallback `#html-output .sequence-diagram`
6
- - SVG root: `#svg-output > svg`
7
-
8
- Offset anchor:
9
-
10
- - All reported offsets use the outermost frame root's top-left corner
11
- - HTML side: `#html-output .frame`, fallback `#html-output .sequence-diagram`
12
- - SVG side: `#svg-output > svg`
13
- - Do not emit final `dx` / `dy` values from participant-local or other nested-container anchors
14
-
15
- HTML label extraction:
16
-
17
- - Normal messages: iterate `.interaction`, skip `.return`, `.creation`, and self interactions, then read `.message .editable-span-base`
18
- - Self messages: `.self-invocation .label .editable-span-base`
19
- - Returns: `.interaction.return .message .editable-span-base`, fallback `.interaction.return .name`
20
- - Fragment conditions: `.fragment .segment > .text-skin-fragment:not(.finally)`, using only visible child spans when conditional branches are stacked
21
- - Fragment sections:
22
- - `.fragment.fragment-tcf .segment > .header.inline-block.bg-skin-frame.opacity-65`
23
- - `.fragment.fragment-tcf .segment > .header.finally`
24
-
25
- SVG label extraction:
26
-
27
- - Normal messages: `g.message:not(.self-call) > text.message-label`
28
- - Self messages: `g.message.self-call > text.message-label`
29
- - Returns: `g.return > text.return-label`
30
- - Fragment conditions: `g.fragment > text.fragment-condition`
31
- - Fragment condition / section groups: `g.fragment > g` containing `text.fragment-section-label`
32
- - texts starting with `[` are treated as `fragment-condition`
33
- - other texts are treated as `fragment-section`
34
-
35
- Pairing key:
36
-
37
- - Semantic grouping is by `kind + text`
38
- - Duplicate labels are paired by top-to-bottom order within that group
39
- - Output key is:
40
- - `kind`
41
- - `text`
42
- - `y_order`
43
- - Fragment labels also include `owner=<fragment header>` in the human-readable summary when available
44
-
45
- Per-letter scoring:
46
-
47
- - Grapheme segmentation uses `Intl.Segmenter`, fallback `Array.from`
48
- - Glyph boxes come from browser layout ranges, not whole-word centroids
49
- - Numeric `dx` and `dy` are only emitted when direct layout evidence and diff-image evidence agree
50
-
51
- Arrow extraction:
52
-
53
- - HTML normal/return messages:
54
- - line: direct child `svg` line strip inside `.message`
55
- - head: direct child arrowhead `svg` inside `.message`
56
- - HTML self messages:
57
- - loop: painted geometry inside `svg.arrow`
58
- - parts: outer loop path plus nested arrowhead path
59
- - SVG normal messages:
60
- - line: `line.message-line`
61
- - head: `svg.arrow-head`
62
- - SVG returns:
63
- - line: `line.return-line`
64
- - head: `polyline.return-arrow`
65
- - SVG self messages:
66
- - loop: painted geometry inside the outer `svg` under `g.message.self-call`
67
- - parts: outer loop path plus nested arrowhead path
68
-
69
- Arrow scoring:
70
-
71
- - Arrows are keyed by sequence number when numbering is available, for example `arrow:1.2.3`
72
- - Normal and return arrows are measured as one combined geometry item:
73
- - line + arrow head together
74
- - Self arrows are measured as one loop geometry item
75
- - Self arrows use the union of the painted loop path and arrowhead path, not the outer viewport box
76
- - Arrow output is endpoint-based, not box-centroid-based
77
- - For normal and return arrows, report:
78
- - `left_dx`
79
- - `right_dx`
80
- - `width_dx`
81
- - For self arrows, also report:
82
- - `top_dy`
83
- - `bottom_dy`
84
- - `height_dy`
85
- - Do not report `dy` for horizontal message arrows
86
-
87
- HTML sequence number extraction:
88
-
89
- - Normal messages: `.interaction:not(.return):not(.creation):not(.self-invocation):not(.self) > .message > .absolute.text-xs`
90
- - Self messages: `.interaction.self-invocation > .message .absolute.text-xs`
91
- - Returns: `.interaction.return > .message > .absolute.text-xs`
92
- - Fragments: `.fragment > .header > .absolute.text-xs`
93
-
94
- SVG sequence number extraction:
95
-
96
- - Normal messages: `g.message:not(.self-call) > text.seq-number`
97
- - Self messages: `g.message.self-call > text.seq-number`
98
- - Returns: `g.return > text.seq-number`
99
- - Fragments: `g.fragment > text.seq-number`
100
-
101
- ## Participant Icon Extraction
102
-
103
- ## Participant Header Extraction
104
-
105
- HTML participant header extraction:
106
-
107
- - Participant root: `.participant[data-participant-id]`
108
- - Participant box: outer border box from the participant root element
109
- - Participant stereotype: `label.interface`, when present
110
- - Participant label: last `.name` descendant, measured by glyph boxes
111
-
112
- SVG participant header extraction:
113
-
114
- - Participant root: `g.participant[data-participant]`
115
- - Skip `g.participant-bottom`
116
- - Participant box element: `:scope > rect.participant-box`
117
- - Participant box measurement must use the painted outer bounds of the stroked rect, not the inset rect geometry
118
- - Participant stereotype:
119
- - prefer `:scope > text.stereotype-label`
120
- - fallback: top-most direct `text` child above `text.participant-label`
121
- - Participant label: `:scope > text.participant-label`
122
-
123
- Participant stereotype pairing and scoring:
124
-
125
- - Pair by participant name
126
- - Validate text equality, for example `«BFF»`
127
- - Measure stereotype offset by per-letter glyph boxes relative to the outermost frame root, not by participant-local anchors or whole-word box centroids
128
- - Report:
129
- - `letter_deltas`
130
- - concise aggregate only when the per-letter evidence agrees
131
- - Do not mark the stereotype clean from glyph boxes alone
132
- - Also check the live `#diff-panel canvas` over the union of the HTML and SVG stereotype glyph boxes
133
- - If localized red or blue pixels persist in that stereotype region while glyph-box deltas are `0/0`, classify it as `ambiguous` or `paint-level residual`
134
-
135
- Participant box pairing and scoring:
136
-
137
- - Pair by participant name
138
- - Report `html_box` and `svg_box` with `x`, `y`, `w`, `h`
139
- - Box `x` / `y` values are frame-anchor-relative
140
- - Report box deltas:
141
- - `dx`
142
- - `dy`
143
- - `dw`
144
- - `dh`
145
-
146
- HTML icon extraction:
147
-
148
- - Participant root: `.participant[data-participant-id]`
149
- - Top-row participant only: keep the top-most entry for each participant id
150
- - Icon host: first child inside the centered participant row when it is an async icon host
151
- - `[aria-description]`
152
- - or contains `svg`
153
- - or has `h-6` sizing class from `AsyncIcon`
154
- - Icon box: union of painted SVG shapes when available, fallback to the host box
155
- - Participant label: last `.name` descendant, measured by glyph boxes
156
-
157
- SVG icon extraction:
158
-
159
- - Participant root: `g.participant[data-participant]`
160
- - Skip `g.participant-bottom`
161
- - Icon element: `:scope > g[transform]`
162
- - Icon box: union of painted shapes within that transformed group
163
- - Participant label: `:scope > text.participant-label`
164
-
165
- Icon pairing:
166
-
167
- - Pair by participant name
168
- - Only report participant icon rows for participants where at least one side has an icon
169
- - Participant labels for icon-bearing participants are paired by participant name, not raw label text
170
-
171
- Icon scoring:
172
-
173
- - Absolute icon drift:
174
- - `icon_dx`
175
- - `icon_dy`
176
- - Absolute icon drift is measured from the outermost frame anchor
177
- - Relative icon drift against the participant label anchor:
178
- - `relative_dx`
179
- - `relative_dy`
180
- - If there is no participant label on one side, use the participant box center as the anchor
181
- - Report presence mismatch if one renderer has an icon and the other does not
182
- - Diff confirmation is taken from `#diff-panel canvas`, scoped to the union of the HTML and SVG icon boxes
183
-
184
- ## Residual Scope Attribution
185
-
186
- Residual scope extraction:
187
-
188
- - Build connected clusters from the live `#diff-panel canvas` colors:
189
- - red = `html-only`
190
- - blue = `svg-only`
191
- - Ignore green `match` and magenta `color diff` pixels for positional scoping
192
- - Each cluster reports:
193
- - `size`
194
- - `bbox`
195
- - `centroid`
196
- - These panel-derived clusters are the source of truth for residual hotspots.
197
-
198
- Residual scope candidates:
199
-
200
- - HTML side:
201
- - labels
202
- - numbers
203
- - arrows
204
- - participant stereotypes
205
- - participant labels
206
- - participant icons
207
- - participant boxes
208
- - diagram root fallback
209
- - SVG side:
210
- - labels
211
- - numbers
212
- - arrows
213
- - participant stereotypes
214
- - participant labels
215
- - participant icons
216
- - participant boxes
217
- - `rect.frame-border-inner`, fallback `rect.frame-border` / `rect.frame-box`
218
- - diagram root fallback
219
-
220
- Residual scope attribution:
221
-
222
- - Pick the closest candidate to the cluster centroid on each side
223
- - Prefer targets that contain the centroid
224
- - Prefer more specific categories over large containers:
225
- - `participant-icon`
226
- - `participant-stereotype`
227
- - `label`, `number`, `participant-label`
228
- - `arrow`
229
- - `participant-box`
230
- - `frame-border`
231
- - `diagram-root`
232
- - Use cluster/target overlap and centroid distance as tie-breakers
233
-
234
- Residual scope output:
235
-
236
- - `residual_scopes`: all attributed clusters
237
- - `residual_scope_summary`: top 20 concise lines for terminal use
238
- - `residual_scope_html_only_top`: top 10 `html-only` clusters
239
- - `residual_scope_svg_only_top`: top 10 `svg-only` clusters
240
- - When answering from the live panel, also report:
241
- - the largest red clusters from `#diff-panel canvas`
242
- - the largest blue clusters from `#diff-panel canvas`
243
- - approximate diagram-space positions or bounding boxes
244
- - attributed HTML and SVG targets for those clusters
245
- - a short grouped summary of where the red and blue pixels are concentrated
246
-
247
- Live panel validation:
248
-
249
- - Source of truth for residual hotspots is `#diff-panel canvas`
250
- - Confirm the hotspot by reading the panel's actual red and blue pixels at that area
251
- - If the panel shows no red or blue pixels there, do not report that hotspot as a real residual diff
252
- - If the panel shows non-zero red or blue totals, do not stop at the totals alone; locate the dominant clusters and report them
253
- - Do not build or rely on a separate screenshot-to-screenshot diff for pixel comparison when `#diff-panel canvas` is available on the page
@@ -1,120 +0,0 @@
1
- ---
2
- name: land-pr
3
- description: Merge a green PR and verify the npm release succeeds. Use when the user says "merge", "land", "land PR", "merge this", "ship to npm", "merge and release", or when a PR has passed CI and is ready to merge. This is a high-stakes action — merging to main triggers an automatic npm publish, so this skill verifies everything before and after merge.
4
- ---
5
-
6
- # Land PR
7
-
8
- Merge a green PR to `main` and verify the npm release. In this repo, **merge = release** — every merge to main triggers automatic npm publish via GitHub Actions. Treat this as a production deployment, not a casual merge.
9
-
10
- ## Preconditions
11
-
12
- Before merging, verify ALL of these:
13
-
14
- 1. **All CI checks green** — no pending or failed checks
15
- 2. **No pending reviews** — no requested changes outstanding
16
- 3. **Branch is up to date** — no merge conflicts with main
17
- 4. **PR is the right one** — confirm PR number with the user if ambiguous
18
-
19
- ```bash
20
- gh pr view <PR_NUMBER> --json state,mergeable,statusCheckRollup,reviewDecision
21
- ```
22
-
23
- If any precondition fails, report which one and stop. Do not attempt to fix — that's `babysit-pr`'s job.
24
-
25
- ## Steps
26
-
27
- ### 1. Verify readiness
28
-
29
- Run the precondition checks above. If anything is not green, stop and report.
30
-
31
- ### 2. Decide merge strategy
32
-
33
- Inspect the branch's commit history to decide between squash and merge:
34
-
35
- ```bash
36
- git log main..HEAD --oneline
37
- ```
38
-
39
- **Auto-squash if ANY of these are true:**
40
- - Only 1 commit on the branch
41
- - Commit messages contain noise patterns: "wip", "fixup", "temp", "oops", "try again", "fix lint", "fix test", duplicate messages
42
- - More than half the commits have the same or very similar messages
43
-
44
- **Merge (preserve commits) if ALL of these are true:**
45
- - 2+ commits with distinct, meaningful messages
46
- - Each commit describes a self-contained step (not just iterations on the same change)
47
- - Commits follow a logical progression (e.g., "add X" → "refactor Y" → "delete Z")
48
-
49
- Announce the decision and why: "Squashing — 3 of 5 commits are fixups" or "Merging — 8 clean commits with distinct steps".
50
-
51
- ### 3. Execute merge
52
-
53
- ```bash
54
- # If squash:
55
- gh pr merge <PR_NUMBER> --squash --auto
56
-
57
- # If merge:
58
- gh pr merge <PR_NUMBER> --merge --auto
59
- ```
60
-
61
- Using `--auto` arms auto-merge so GitHub merges when all checks pass. If checks are already green, it merges immediately.
62
-
63
- ### 4. Wait for merge
64
-
65
- If auto-merge was armed, wait for it:
66
-
67
- ```bash
68
- gh pr view <PR_NUMBER> --json state
69
- ```
70
-
71
- Poll until state is `MERGED`. Timeout after 5 minutes — if not merged by then, report and stop.
72
-
73
- ### 5. Monitor npm publish
74
-
75
- After merge, the `Build, Test, npm Publish, and Deploy` workflow runs on `main`. Watch it:
76
-
77
- ```bash
78
- gh run list --repo mermaid-js/zenuml-core --branch main --limit 1 --json databaseId,status,conclusion
79
- ```
80
-
81
- Wait for the run to complete:
82
-
83
- ```bash
84
- gh run watch <RUN_ID> --repo mermaid-js/zenuml-core
85
- ```
86
-
87
- ### 6. Verify npm publish
88
-
89
- Check that the new version appeared on npm:
90
-
91
- ```bash
92
- npm view @zenuml/core version
93
- ```
94
-
95
- Compare with the version before merge. If it didn't bump, check the `npm-publish` job logs for errors.
96
-
97
- ## Output
98
-
99
- Report one of:
100
-
101
- - **LANDED** — merged, published to npm as `@zenuml/core@<version>`
102
- - **MERGE BLOCKED** — which precondition failed
103
- - **PUBLISH FAILED** — merged but npm publish failed, with error details
104
-
105
- ## On publish failure
106
-
107
- **Do NOT auto-rollback.** A failed npm publish after merge is a serious situation that needs human judgment. Report:
108
-
109
- 1. The merge commit SHA
110
- 2. The failing workflow run URL
111
- 3. The npm-publish job error output
112
- 4. Whether the version was partially published
113
-
114
- The user decides whether to hotfix, revert, or investigate.
115
-
116
- ## Does NOT
117
-
118
- - Fix CI (use `/babysit-pr`)
119
- - Create PRs (use `/submit-branch`)
120
- - Run local tests (use `/validate-branch`)
@@ -1,205 +0,0 @@
1
- ---
2
- name: propagate-core-release
3
- description: Propagate a published `@zenuml/core` release by opening or reusing per-repo downstream issues with explicit rollout instructions. Use when the user says "push core to downstreams", "update downstream projects", "propagate release", "open downstream issues", "file rollout issues", or wants the newly published zenuml/core version handed off across mermaid, mermaid live editor, web-sequence, the IntelliJ plugin, confluence-plugin-cloud, and diagramly.ai.
4
- ---
5
-
6
- # Propagate Core Release
7
-
8
- Coordinate downstream consumers after `@zenuml/core` has already been published. This skill creates or reuses per-repo GitHub issues with clear implementation instructions for each downstream team. It does not edit downstream repos or open PRs on their behalf.
9
-
10
- ## Scope
11
-
12
- This skill is for the post-publish propagation step only.
13
-
14
- It should:
15
-
16
- 1. identify the published `@zenuml/core` version to roll out
17
- 2. inspect each downstream repo's update conventions from [references/downstreams.md](references/downstreams.md)
18
- 3. create or reuse one downstream issue per repo for that version
19
- 4. include explicit repo-specific instructions in each issue body
20
- 5. summarize which repos succeeded, failed, or were skipped
21
-
22
- It should not:
23
-
24
- - publish `@zenuml/core`
25
- - update downstream code directly
26
- - create downstream branches or PRs
27
- - auto-fix unrelated downstream test failures or implementation details
28
-
29
- Renderer integration rule:
30
-
31
- - Only `mermaid-js/mermaid` and `mermaid-js/mermaid-live-editor` should be treated as SVG-renderer integration work for `@zenuml/core` API changes.
32
- - All other downstreams remain HTML-renderer consumers. Do not migrate them to `renderToSvg` or other SVG-renderer APIs during propagation.
33
-
34
- ## Downstream Repos
35
-
36
- Read [references/downstreams.md](references/downstreams.md) before starting. It contains the canonical downstream repo list, repo slug assumptions, and repo-specific update commands that must be copied into the issue instructions.
37
-
38
- ## Preconditions
39
-
40
- Before starting:
41
-
42
- - confirm the target `@zenuml/core` version is already published
43
- - confirm `gh auth status` is healthy for all target orgs and repos where issues will be filed
44
- - if the user did not specify the target version, discover the latest published one first
45
-
46
- If the published version is ambiguous, stop and ask.
47
-
48
- ## Batch Strategy
49
-
50
- Treat each downstream repo as an independent unit of work.
51
-
52
- - Continue processing the remaining repos if one repo fails.
53
- - Keep a per-repo status ledger as you go: `issue-opened`, `issue-reused`, `already-tracked`, `blocked`, `failed`.
54
- - Prefer deterministic, reusable issue text.
55
- - Check for same-version issues before creating anything new.
56
- - Reuse an existing open issue when it already targets the same core version.
57
- - If the same version already has a closed issue, treat it as `already-tracked` and report it instead of opening a duplicate unless the user explicitly asks to reopen or replace it.
58
-
59
- ## Issue Rules
60
-
61
- Each downstream repo should get at most one open issue per core version.
62
-
63
- Before creating a new issue, search that repo for issues matching the target version in the title or body. Prefer exact matches on `@zenuml/core v<version>`.
64
-
65
- Use a consistent title pattern:
66
-
67
- ```text
68
- chore: roll out @zenuml/core v<version>
69
- ```
70
-
71
- Use a clear body with actionable instructions:
72
-
73
- ```markdown
74
- ## Summary
75
- - `@zenuml/core` `v<version>` has been published
76
- - this repo needs to adopt that release
77
-
78
- ## Required Work
79
- 1. Run: `<update-command>`
80
- 2. Run: `<lockfile-refresh-command>` and include the lockfile in the PR when applicable
81
- 3. Run: `<verify-command>` when applicable
82
- 4. Keep the diff scoped to the core upgrade and any required integration fix
83
- 5. Open a downstream PR that links back to this issue
84
-
85
- ## Repo-Specific Notes
86
- - <repo-specific note 1>
87
- - <repo-specific note 2>
88
-
89
- ## Acceptance Criteria
90
- - repo is updated to `@zenuml/core` `v<version>` or the equivalent vendored build output
91
- - lockfile is refreshed when the repo uses one
92
- - verification command passes locally, or failure details are documented in the PR
93
- - no unrelated dependency or renderer migrations are mixed into the change
94
- ```
95
-
96
- If an issue already exists for the same target version, do not create a duplicate. Reuse the open one, or report the closed one as already tracked.
97
-
98
- ## Workflow
99
-
100
- ### Step 1: Resolve target version
101
-
102
- Determine the `@zenuml/core` version to propagate.
103
-
104
- - If the user supplied a version, use it.
105
- - Otherwise, query npm or the release source of truth and resolve the latest published version.
106
-
107
- Record:
108
-
109
- - target version
110
- - source used to resolve it
111
-
112
- ### Step 2: Process each downstream repo
113
-
114
- For each repo in [references/downstreams.md](references/downstreams.md):
115
-
116
- 1. Read the repo row carefully and extract the update command, verification command, and notes.
117
- 2. Search for existing issues in that repo for the same core version, checking both open and closed issues.
118
- 3. If an open match exists, reuse it and record the URL.
119
- 4. If only a closed match exists, record it as `already-tracked` and do not create a duplicate unless the user explicitly asked for that.
120
- 5. Otherwise create a new issue using the standard title and a repo-specific body.
121
- 6. Make sure the issue body includes:
122
- - the target core version
123
- - the exact update command from the table
124
- - the lockfile refresh command when the repo uses pnpm or yarn
125
- - the exact verify command when one is defined
126
- - the renderer and API caveats from the repo notes
127
- - an explicit instruction to open a PR linked to the issue after the work is complete
128
- - a version marker that makes future deduplication easy, such as `Core version: v<version>`
129
-
130
- ### Step 3: Handle repo-specific blockers
131
-
132
- If a repo fails, capture exactly why:
133
-
134
- - missing issue creation permissions
135
- - existing issue search is ambiguous
136
- - existing closed issue should be reopened but the policy is unclear
137
- - dependency location unclear
138
- - package manager or package filter is unclear
139
- - repo notes are insufficient to write a safe instruction
140
- - issue creation failed
141
-
142
- Do not let one repo failure stop the rest of the batch.
143
-
144
- ### Step 4: Summarize the rollout
145
-
146
- At the end, produce a per-repo summary with:
147
-
148
- - repo
149
- - issue URL or matched prior issue URL
150
- - final status
151
- - blocker if any
152
-
153
- ## Repo Issue Guidance
154
-
155
- Each downstream has specific update and verification commands documented in [references/downstreams.md](references/downstreams.md). Follow the table exactly when drafting instructions. Do not guess package managers, package filters, or update commands.
156
-
157
- For each repo:
158
-
159
- 1. Include the **Update Command** from the table verbatim
160
- 2. Include the lockfile refresh step:
161
- - `pnpm install` for pnpm repos
162
- - `yarn install` for yarn repos
163
- 3. Include the **Verify Command** from the table verbatim when one exists
164
- 4. Tell the downstream team to keep the change scoped to the core upgrade and any required integration fix
165
- 5. Tell the downstream team to open a PR after verification and link it back to the issue
166
-
167
- Special handling for renderer API changes:
168
-
169
- - `mermaid-js/mermaid` is the direct `@zenuml/core` SVG-renderer integration. When core export APIs change, it may require code updates in `packages/mermaid-zenuml`, not just a dependency bump.
170
- - `mermaid-js/mermaid-live-editor` is an indirect SVG-renderer consumer through `@mermaid-js/mermaid-zenuml`. Do not add `@zenuml/core` directly there just to follow a core release.
171
- - `web-sequence`, `confluence-plugin-cloud`, `diagramly.ai`, and similar downstreams stay on the HTML-renderer path unless the user explicitly asks for a renderer migration.
172
-
173
- Prefer the smallest downstream task description that updates the repo safely:
174
-
175
- - package dependency bumps
176
- - lockfile refreshes
177
- - vendored asset refreshes only when the repo actually vendors core output, such as `jetbrains-zenuml`
178
-
179
- Do not ask downstream teams to opportunistically clean up unrelated code while doing the upgrade.
180
-
181
- If a downstream repo needs custom update logic that is not obvious from the table or its notes, stop on that repo and report the ambiguity instead of inventing instructions.
182
-
183
- ## Safety
184
-
185
- - Never update downstream repos directly from this skill.
186
- - Never merge downstream PRs from this skill.
187
- - Never batch all downstream repos into one issue.
188
- - Never file duplicate issues for the same repo and core version.
189
- - Never hide per-repo failures behind a single "batch failed" message.
190
- - Never ask downstream teams to update unrelated dependencies in the same PR.
191
-
192
- ## Output
193
-
194
- Final report format:
195
-
196
- ```markdown
197
- ## Downstream Propagation Report
198
- - Core version: `v<version>`
199
- - Overall: <N> succeeded, <N> reused, <N> skipped, <N> failed
200
-
201
- ### Repo Results
202
- - `<repo>`: issue opened | issue reused | already tracked | failed
203
- issue: <url or none>
204
- notes: <short reason or blocker>
205
- ```
@@ -1,7 +0,0 @@
1
- interface:
2
- display_name: "Propagate Core Release"
3
- short_description: "Open downstream rollout issues for a published core version"
4
- default_prompt: "Use $propagate-core-release after @zenuml/core has been published to open or reuse per-repo downstream issues with explicit rollout instructions. Do not update downstream repos directly and do not open PRs on their behalf."
5
-
6
- policy:
7
- allow_implicit_invocation: true
@@ -1,42 +0,0 @@
1
- # Downstream Repos
2
-
3
- Canonical downstream targets for filing rollout issues after a published `@zenuml/core` release.
4
-
5
- ## Repo Table
6
-
7
- | Repo | Local Path | Pkg Manager | Update Command | Verify Command | Notes |
8
- |------|-----------|-------------|----------------|----------------|-------|
9
- | `mermaid-js/mermaid` | `~/workspaces/zenuml/native-svg-renderer/mermaid` | pnpm | `pnpm --filter @mermaid-js/mermaid-zenuml update @zenuml/core` | `pnpm build` | Direct SVG-renderer integration. Only touch `packages/mermaid-zenuml`; export API changes may require source edits in addition to the version bump. |
10
- | `mermaid-js/mermaid-live-editor` | clone if missing | pnpm | `pnpm update @mermaid-js/mermaid-zenuml` | `pnpm build` | Indirect SVG-renderer consumer via `@mermaid-js/mermaid-zenuml`. Do not add `@zenuml/core` directly here. |
11
- | `ZenUml/web-sequence` | `~/workspaces/zenuml/web-sequence` | yarn | `yarn upgrade @zenuml/core` | `yarn build` | HTML-renderer consumer. Do not migrate to SVG-renderer APIs during routine propagation. |
12
- | `ZenUml/confluence-plugin-cloud` | `~/workspaces/zenuml/confluence-plugin-cloud` | pnpm | `pnpm update @zenuml/core` | `pnpm build:full` | HTML-renderer consumer. Do not migrate to SVG-renderer APIs during routine propagation. |
13
- | `ZenUml/diagramly.ai` | `~/workspaces/diagramly/diagramly.ai` | pnpm | `pnpm update @zenuml/core --filter <pkg>` | `pnpm build` | HTML-renderer consumer. Do not migrate to SVG-renderer APIs during routine propagation. |
14
- | `ZenUml/codemirror-extensions` | `~/workspaces/zenuml/codemirror-extensions` | pnpm | `pnpm update @zenuml/core` | `pnpm build` | CodeMirror language extensions for ZenUML DSL. HTML-renderer consumer. |
15
- | `ZenUml/jetbrains-zenuml` | `~/workspaces/zenuml/jetbrains-zenuml` | — | See notes | — | **Not an npm consumer.** Vendors a built JS bundle. Update by copying the new `dist/` output from core's build. Skip if unsure and report. |
16
-
17
- ## Issue Authoring Guidance
18
-
19
- When writing a downstream issue for an npm consumer, explicitly include the lockfile refresh step:
20
-
21
- - **pnpm**: `pnpm install` (updates `pnpm-lock.yaml`)
22
- - **yarn**: `yarn install` (updates `yarn.lock`)
23
-
24
- Tell the downstream team to include the updated lockfile in the PR. A PR without an updated lockfile will usually fail CI.
25
-
26
- ## Local Checkout Usage
27
-
28
- Local checkouts are optional for this skill. Use them only if you need extra context to clarify the issue body safely. Do not clone repos just to file the issue.
29
-
30
- If you do need a checkout and the local path does not exist:
31
-
32
- ```bash
33
- gh repo clone <repo-slug> <local-path>
34
- ```
35
-
36
- ## General Rules
37
-
38
- - Each repo gets its own rollout issue.
39
- - Reuse an existing open issue when it already targets the same core version.
40
- - `mermaid-js/mermaid` and `mermaid-js/mermaid-live-editor` are under the `mermaid-js` GitHub org (not `ZenUml`).
41
- - Only `mermaid-js/mermaid` and `mermaid-js/mermaid-live-editor` should receive SVG-renderer integration changes tied to core API/export changes.
42
- - Treat all other downstreams as HTML-renderer consumers unless the user explicitly asks for a renderer migration.