@zenuml/core 3.46.3 → 3.46.5

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 (85) hide show
  1. package/.claude/skills/babysit-pr/SKILL.md +203 -0
  2. package/.claude/skills/babysit-pr/agents/openai.yaml +7 -0
  3. package/.claude/skills/dia-scoring/SKILL.md +1 -1
  4. package/.claude/skills/land-pr/SKILL.md +27 -5
  5. package/.claude/skills/propagate-core-release/SKILL.md +200 -0
  6. package/.claude/skills/propagate-core-release/agents/openai.yaml +7 -0
  7. package/.claude/skills/propagate-core-release/references/downstreams.md +41 -0
  8. package/.claude/skills/ship-branch/SKILL.md +13 -0
  9. package/dist/stats.html +1 -1
  10. package/dist/zenuml.esm.mjs +3688 -3693
  11. package/dist/zenuml.js +69 -69
  12. package/docs/superpowers/plans/2026-03-27-e2e-test-reorg.md +698 -0
  13. package/{cy → e2e/data}/compare-cases.js +70 -37
  14. package/{cy/smoke-editable-label.html → e2e/fixtures/editable-label.html} +1 -1
  15. package/{cy/editable-span-test.html → e2e/fixtures/editable-span.html} +1 -1
  16. package/e2e/fixtures/fixture.html +31 -0
  17. package/{cy → e2e/tools}/canonical-history.html +1 -1
  18. package/{cy → e2e/tools}/compare-case.html +3 -3
  19. package/{cy → e2e/tools}/compare.html +2 -2
  20. package/{cy → e2e/tools}/native-diff-ext/content.js +2 -2
  21. package/firebase-debug.log +108 -0
  22. package/index.html +2 -2
  23. package/mermaid-zenuml-async-spa-auth.png +0 -0
  24. package/mermaid-zenuml-async-spa-auth.snapshot.md +96 -0
  25. package/package.json +1 -1
  26. package/scripts/analyze-compare-case/collect-data.mjs +1 -1
  27. package/scripts/analyze-compare-case.mjs +1 -1
  28. package/skills/dia-scoring/SKILL.md +1 -1
  29. package/vite.config.ts +5 -5
  30. package/cy/async-message-1.html +0 -32
  31. package/cy/async-message-2.html +0 -46
  32. package/cy/async-message-3.html +0 -41
  33. package/cy/creation-rtl.html +0 -28
  34. package/cy/defect-406-alt-under-creation.html +0 -40
  35. package/cy/demo1.html +0 -28
  36. package/cy/demo3.html +0 -28
  37. package/cy/demo4.html +0 -28
  38. package/cy/element-report.html +0 -705
  39. package/cy/fragments-with-return.html +0 -35
  40. package/cy/icons-test.html +0 -29
  41. package/cy/if-fragment.html +0 -28
  42. package/cy/legacy-vs-html.html +0 -291
  43. package/cy/named-parameters.html +0 -30
  44. package/cy/nested-interaction-with-fragment.html +0 -34
  45. package/cy/nested-interaction-with-outbound.html +0 -34
  46. package/cy/parity-test.html +0 -122
  47. package/cy/return-in-nested-if.html +0 -29
  48. package/cy/return.html +0 -38
  49. package/cy/self-sync-message-at-root.html +0 -28
  50. package/cy/smoke-creation.html +0 -26
  51. package/cy/smoke-fragment-issue.html +0 -36
  52. package/cy/smoke-fragment.html +0 -42
  53. package/cy/smoke-interaction.html +0 -34
  54. package/cy/smoke.html +0 -40
  55. package/cy/theme-default-test.html +0 -28
  56. package/cy/vertical-1.html +0 -25
  57. package/cy/vertical-10.html +0 -33
  58. package/cy/vertical-11.html +0 -29
  59. package/cy/vertical-2.html +0 -23
  60. package/cy/vertical-3.html +0 -37
  61. package/cy/vertical-4.html +0 -42
  62. package/cy/vertical-5.html +0 -40
  63. package/cy/vertical-6.html +0 -29
  64. package/cy/vertical-7.html +0 -27
  65. package/cy/vertical-8.html +0 -32
  66. package/cy/vertical-9.html +0 -25
  67. package/cy/xss.html +0 -21
  68. package/docs/CONTEXT-tier2-component.md +0 -96
  69. package/docs/CONTEXT-tier3-feature.md +0 -162
  70. package/docs/README.md +0 -207
  71. package/docs/handling-starter.png +0 -0
  72. package/docs/module-vs-main-in-package-json.md +0 -17
  73. package/docs/open-issues/example-api-performance-issue.md +0 -79
  74. package/docs/osx-unsupported-arm64-node12.md +0 -13
  75. package/docs/running-cypress-tests-locally.md +0 -76
  76. package/docs/ship-branch-skill-plan.md +0 -134
  77. package/docs/superpowers/plans/2026-03-23-svg-parity-features.md +0 -283
  78. package/docs/testing-minified-lib.md +0 -27
  79. package/docs/watch.md +0 -1
  80. package/docs/why-we-publish-embed-view-to-github-pages.md +0 -16
  81. /package/{cy → e2e/data}/diff-algorithm.js +0 -0
  82. /package/{cy → e2e/fixtures}/svg-test.html +0 -0
  83. /package/{cy → e2e/tools}/native-diff-ext/background.js +0 -0
  84. /package/{cy → e2e/tools}/native-diff-ext/bridge.js +0 -0
  85. /package/{cy → e2e/tools}/svg-preview.html +0 -0
@@ -0,0 +1,203 @@
1
+ ---
2
+ name: babysit-pr
3
+ description: Monitor and fix failing GitHub Actions CI checks on PRs for mermaid-js/zenuml-core. Use when the user says "babysit PR", "check PR status", "fix CI", "PR is failing", "watch this PR", "why is CI red", or when used with /loop to continuously monitor a PR. Also use when Playwright snapshot failures occur in CI, lint/format issues block merging, or unit tests fail on a PR. Triggers on any PR monitoring, CI failure diagnosis, or automated fix-and-retry workflow.
4
+ ---
5
+
6
+ # Babysit PR
7
+
8
+ Monitor a GitHub Actions PR, diagnose failures, attempt fixes, and retry — up to 3 times total.
9
+
10
+ ## Scope
11
+
12
+ This skill targets **mermaid-js/zenuml-core** only. All commands run from the zenuml-core directory.
13
+
14
+ ## Step 1: Find the PR
15
+
16
+ Resolve which PR to babysit, in this priority order:
17
+
18
+ 1. **Explicit PR number** — if the user provided one (e.g., `#341`), use it
19
+ 2. **Current branch PR** — run `gh pr view --json number,title,headRefName,state,statusCheckRollup` from the zenuml-core directory
20
+ 3. **Recently failed PR** — if no PR on current branch, find the most recent failed PR in the last 10 minutes:
21
+ ```bash
22
+ gh run list --repo mermaid-js/zenuml-core --status failure --limit 5 --json databaseId,headBranch,event,createdAt,conclusion,name
23
+ ```
24
+ Filter to runs created within the last 10 minutes. If multiple, pick the most recent.
25
+
26
+ If no PR is found, tell the user and stop.
27
+
28
+ ## Step 2: Check CI Status
29
+
30
+ ```bash
31
+ gh pr checks <PR_NUMBER> --repo mermaid-js/zenuml-core
32
+ ```
33
+
34
+ **If all checks pass**: Report success and stop. Nothing to babysit.
35
+
36
+ **If checks are still running**: Report status and wait. Use `gh run watch <RUN_ID> --repo mermaid-js/zenuml-core` to wait for completion (with a 10-minute timeout). Then re-evaluate.
37
+
38
+ **If checks failed**: Proceed to Step 3.
39
+
40
+ ## Step 3: Diagnose Failures
41
+
42
+ For each failed check, pull the logs:
43
+
44
+ ```bash
45
+ gh run view <RUN_ID> --repo mermaid-js/zenuml-core --log-failed
46
+ ```
47
+
48
+ Categorize the failure:
49
+
50
+ | Category | Indicators |
51
+ |----------|-----------|
52
+ | **Playwright snapshot mismatch** | `Error: A]snapshot.*doesn't match`, `Screenshot comparison failed`, pixel diff errors, `-linux.png` referenced |
53
+ | **Playwright test logic failure** | Assertion errors, timeouts, element not found — but NOT snapshot diffs |
54
+ | **Unit test failure** | Failures in `bun run test`, vitest output |
55
+ | **Lint/format failure** | ESLint errors, Prettier diffs |
56
+ | **Build failure** | Vite build errors, TypeScript compilation errors |
57
+ | **Merge conflict** | `CONFLICT`, `merge conflict`, cannot rebase cleanly |
58
+ | **Infra/flaky** | Network timeouts, runner issues, cache failures |
59
+
60
+ ## Step 4: Attempt Fix
61
+
62
+ **Important**: Before fixing, make sure the local branch is up to date with the PR branch:
63
+ ```bash
64
+ git fetch origin && git checkout <PR_BRANCH> && git pull origin <PR_BRANCH>
65
+ ```
66
+
67
+ ### Fix by Category
68
+
69
+ #### Playwright Snapshot Mismatch (Linux)
70
+
71
+ This is the most common CI-only failure because snapshots are platform-specific.
72
+
73
+ 1. **Verify it's a snapshot diff** (not a logic error) by reading the failure log
74
+ 2. **Check if the change is intentional** — look at recent commits on the branch. If they modified rendering code, SVG output, or CSS, snapshot updates are expected
75
+ 3. **Trigger the Linux snapshot update workflow**:
76
+ ```bash
77
+ gh workflow run update-snapshots.yml --repo mermaid-js/zenuml-core --ref <PR_BRANCH>
78
+ ```
79
+ 4. **Wait for the workflow to complete**:
80
+ ```bash
81
+ # Find the run ID (most recent on that branch)
82
+ gh run list --repo mermaid-js/zenuml-core --workflow update-snapshots.yml --branch <PR_BRANCH> --limit 1 --json databaseId,status
83
+ # Watch it
84
+ gh run watch <RUN_ID> --repo mermaid-js/zenuml-core
85
+ ```
86
+ 5. **Pull the auto-committed snapshots** locally:
87
+ ```bash
88
+ git pull origin <PR_BRANCH>
89
+ ```
90
+ 6. The update-snapshots workflow commits and verifies automatically. If it passes, CI should go green on next run.
91
+
92
+ #### Playwright Test Logic Failure
93
+
94
+ 1. **Reproduce locally first**:
95
+ ```bash
96
+ bun pw --grep "<test name pattern>"
97
+ ```
98
+ 2. **Read the failing test** to understand what it expects
99
+ 3. **Fix the code** (not the test, unless the test expectation is wrong)
100
+ 4. **Verify locally**: `bun pw --grep "<test name pattern>"`
101
+ 5. **Commit and push**
102
+
103
+ #### Unit Test Failure
104
+
105
+ 1. **Reproduce locally**:
106
+ ```bash
107
+ bun run test --run
108
+ ```
109
+ 2. **Fix the code or test**
110
+ 3. **Verify**: `bun run test --run`
111
+ 4. **Commit and push**
112
+
113
+ #### Lint/Format Failure
114
+
115
+ 1. **Auto-fix**:
116
+ ```bash
117
+ bun eslint
118
+ bun prettier
119
+ ```
120
+ 2. **Verify no remaining issues**:
121
+ ```bash
122
+ bun eslint 2>&1 | tail -5
123
+ ```
124
+ 3. **Commit and push** the formatting fixes
125
+
126
+ #### Build Failure
127
+
128
+ 1. **Reproduce locally**:
129
+ ```bash
130
+ bun build
131
+ ```
132
+ 2. **Read the error** — usually TypeScript errors or missing imports
133
+ 3. **Fix, verify locally, commit and push**
134
+
135
+ #### Merge Conflict
136
+
137
+ 1. **Report to user** — do NOT auto-resolve merge conflicts. Show what's conflicting and ask for guidance.
138
+
139
+ #### Infra/Flaky
140
+
141
+ 1. **Re-run the failed job**:
142
+ ```bash
143
+ gh run rerun <RUN_ID> --repo mermaid-js/zenuml-core --failed
144
+ ```
145
+ 2. If it fails again with the same infra error, report to user.
146
+
147
+ ## Step 5: Push and Monitor
148
+
149
+ After applying a fix:
150
+
151
+ 1. **Run the full local test suite** before pushing (when the failure category allows local reproduction):
152
+ ```bash
153
+ bun run test --run # unit tests
154
+ bun pw # playwright (local, macOS — won't catch Linux snapshot diffs)
155
+ bun eslint # lint
156
+ ```
157
+ 2. **Commit with a clear message**:
158
+ ```bash
159
+ git add <specific files>
160
+ git commit -m "fix: <what was fixed> to pass CI"
161
+ ```
162
+ 3. **Push**:
163
+ ```bash
164
+ git push origin <PR_BRANCH>
165
+ ```
166
+ 4. **Wait for CI** — use `gh run watch` on the new run
167
+ 5. **Evaluate result** — go back to Step 2
168
+
169
+ ## Step 6: Retry Budget
170
+
171
+ Track attempts. Each "attempt" is one push-and-wait cycle (or one workflow trigger-and-wait for snapshot updates).
172
+
173
+ - **Maximum 3 attempts total**
174
+ - After each failed attempt, re-diagnose from scratch (Step 3) — the failure mode may have changed
175
+ - **If a test passes on retry without code changes**, flag it as potentially flaky:
176
+ > "Test `<name>` passed on retry without changes — likely flaky. Consider investigating stability."
177
+ - **After 3 failed attempts**, stop and report:
178
+ - What was tried
179
+ - What the current failure is
180
+ - Your best theory for root cause
181
+ - Suggested next steps for the user
182
+
183
+ ## Step 7: Summary Report
184
+
185
+ After babysitting completes (success or exhausted retries), produce a brief report:
186
+
187
+ ```
188
+ ## PR #<number> Babysit Report
189
+ - **Status**: [PASSED | FAILED after N attempts]
190
+ - **Failures found**: <list of categories>
191
+ - **Fixes applied**: <list of commits pushed>
192
+ - **Flaky tests**: <any tests that passed on retry without changes>
193
+ - **Manual attention needed**: <anything unresolved>
194
+ ```
195
+
196
+ ## Safety Rules
197
+
198
+ - **Never force-push** — always regular `git push`
199
+ - **Never resolve merge conflicts automatically** — report and ask
200
+ - **Never push while CI is still running** from a previous attempt — wait for it to finish first
201
+ - **Never modify the snapshot update workflow itself** — only trigger it
202
+ - **Always verify fixes locally** before pushing (except Linux snapshot updates which can only be verified in CI)
203
+ - **Check for in-progress CI** before pushing — avoid wasting CI minutes on runs that will be superseded
@@ -0,0 +1,7 @@
1
+ interface:
2
+ display_name: "Babysit PR"
3
+ short_description: "Monitor and fix failing PR CI checks"
4
+ default_prompt: "Use $babysit-pr to diagnose failing GitHub Actions checks on a zenuml-core PR, fix what is actionable, push updates, and watch CI until it is green."
5
+
6
+ policy:
7
+ allow_implicit_invocation: true
@@ -20,7 +20,7 @@ The workflow:
20
20
 
21
21
  1. Run `node scripts/analyze-compare-case.mjs --case <name> --json` for structured data.
22
22
  2. Use `--output-dir <dir>` when you need saved `html.png`, `svg.png`, `diff.png`, and `report.json`.
23
- 3. For live browser inspection, navigate to `http://localhost:8080/cy/compare-case.html?case=<name>` and use the extension's `#diff-panel canvas`.
23
+ 3. For live browser inspection, navigate to `http://localhost:8080/e2e/tools/compare-case.html?case=<name>` and use the extension's `#diff-panel canvas`.
24
24
  4. Use Playwright page inspection for semantic attribution (element positions, font metrics, DOM structure).
25
25
 
26
26
  ## Offset Anchor
@@ -28,17 +28,39 @@ If any precondition fails, report which one and stop. Do not attempt to fix —
28
28
 
29
29
  Run the precondition checks above. If anything is not green, stop and report.
30
30
 
31
- ### 2. Squash merge
31
+ ### 2. Decide merge strategy
32
32
 
33
- This repo uses squash merges. The merge commit message should summarize the PR.
33
+ Inspect the branch's commit history to decide between squash and merge:
34
34
 
35
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:
36
55
  gh pr merge <PR_NUMBER> --squash --auto
56
+
57
+ # If merge:
58
+ gh pr merge <PR_NUMBER> --merge --auto
37
59
  ```
38
60
 
39
61
  Using `--auto` arms auto-merge so GitHub merges when all checks pass. If checks are already green, it merges immediately.
40
62
 
41
- ### 3. Wait for merge
63
+ ### 4. Wait for merge
42
64
 
43
65
  If auto-merge was armed, wait for it:
44
66
 
@@ -48,7 +70,7 @@ gh pr view <PR_NUMBER> --json state
48
70
 
49
71
  Poll until state is `MERGED`. Timeout after 5 minutes — if not merged by then, report and stop.
50
72
 
51
- ### 4. Monitor npm publish
73
+ ### 5. Monitor npm publish
52
74
 
53
75
  After merge, the `Build, Test, npm Publish, and Deploy` workflow runs on `main`. Watch it:
54
76
 
@@ -62,7 +84,7 @@ Wait for the run to complete:
62
84
  gh run watch <RUN_ID> --repo mermaid-js/zenuml-core
63
85
  ```
64
86
 
65
- ### 5. Verify npm publish
87
+ ### 6. Verify npm publish
66
88
 
67
89
  Check that the new version appeared on npm:
68
90
 
@@ -0,0 +1,200 @@
1
+ ---
2
+ name: propagate-core-release
3
+ description: Propagate a published `@zenuml/core` release to downstream projects by updating each consumer on its own branch and opening or reusing draft PRs. Use when the user says "push core to downstreams", "update downstream projects", "propagate release", "open downstream PRs", "submit downstream drafts", or wants the newly published zenuml/core version rolled out across mermaid, mermaid live editor, web-sequence, the IntelliJ plugin, confluence-plugin-cloud, and diagramly.ai.
4
+ ---
5
+
6
+ # Propagate Core Release
7
+
8
+ Update downstream consumers after `@zenuml/core` has already been published. This skill creates or reuses per-repo update branches and draft PRs, but does not merge anything.
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. update each downstream repo to that version
18
+ 3. create or reuse a branch in each downstream repo
19
+ 4. push the branch
20
+ 5. create or reuse a **draft** PR
21
+ 6. summarize which repos succeeded, failed, or were skipped
22
+
23
+ It should not:
24
+
25
+ - publish `@zenuml/core`
26
+ - merge downstream PRs
27
+ - auto-fix unrelated downstream test failures beyond straightforward dependency-update fallout
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 and repo slug assumptions.
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
44
+ - confirm you have local checkout strategy for each downstream repo
45
+ - if the user did not specify the target version, discover the latest published one first
46
+
47
+ If the published version is ambiguous, stop and ask.
48
+
49
+ ## Batch Strategy
50
+
51
+ Treat each downstream repo as an independent unit of work.
52
+
53
+ - Continue processing the remaining repos if one repo fails.
54
+ - Keep a per-repo status ledger as you go: `updated`, `already-updated`, `draft-pr-open`, `blocked`, `failed`.
55
+ - Prefer deterministic updates and small diffs.
56
+ - Reuse existing update branches or draft PRs when they already target the same core version.
57
+
58
+ ## Branch Naming
59
+
60
+ Use a consistent branch name across downstream repos:
61
+
62
+ ```text
63
+ chore/zenuml-core-v<version>
64
+ ```
65
+
66
+ Example:
67
+
68
+ ```text
69
+ chore/zenuml-core-v1.2.3
70
+ ```
71
+
72
+ ## Draft PR Rules
73
+
74
+ All PRs created by this skill must be draft PRs.
75
+
76
+ Use a consistent title pattern:
77
+
78
+ ```text
79
+ chore: update @zenuml/core to v<version>
80
+ ```
81
+
82
+ Use a concise body:
83
+
84
+ ```markdown
85
+ ## Summary
86
+ - update `@zenuml/core` to `v<version>`
87
+
88
+ ## Notes
89
+ - automated downstream propagation after core publish
90
+ - draft PR for repo-specific verification
91
+ ```
92
+
93
+ If a draft PR already exists for the same branch or same target version, reuse it and report it instead of creating a duplicate.
94
+
95
+ ## Workflow
96
+
97
+ ### Step 1: Resolve target version
98
+
99
+ Determine the `@zenuml/core` version to propagate.
100
+
101
+ - If the user supplied a version, use it.
102
+ - Otherwise, query npm or the release source of truth and resolve the latest published version.
103
+
104
+ Record:
105
+
106
+ - target version
107
+ - source used to resolve it
108
+
109
+ ### Step 2: Process each downstream repo
110
+
111
+ For each repo in [references/downstreams.md](references/downstreams.md):
112
+
113
+ 1. Ensure you have a local checkout or clone target.
114
+ 2. Fetch latest default branch state.
115
+ 3. Create or reuse `chore/zenuml-core-v<version>`.
116
+ 4. Update the dependency or bundled artifact according to the repo's conventions.
117
+ 5. Inspect the diff and keep it scoped to the propagation work.
118
+ 6. Run lightweight repo-appropriate verification if it is cheap and obvious.
119
+ 7. Commit with:
120
+
121
+ ```text
122
+ chore: update @zenuml/core to v<version>
123
+ ```
124
+
125
+ 8. Push the branch.
126
+ 9. Create or reuse a **draft** PR.
127
+
128
+ ### Step 3: Handle repo-specific blockers
129
+
130
+ If a repo fails, capture exactly why:
131
+
132
+ - dependency location unclear
133
+ - package manager / lockfile conflict
134
+ - update compiles locally but tests fail
135
+ - missing permissions
136
+ - repo missing locally and clone failed
137
+ - PR creation failed
138
+
139
+ Do not let one repo failure stop the rest of the batch.
140
+
141
+ ### Step 4: Summarize the rollout
142
+
143
+ At the end, produce a per-repo summary with:
144
+
145
+ - repo
146
+ - branch
147
+ - PR URL or reused PR URL
148
+ - final status
149
+ - blocker if any
150
+
151
+ ## Repo Update Guidance
152
+
153
+ Each downstream has specific update and verification commands documented in [references/downstreams.md](references/downstreams.md). Follow the table exactly — do not guess package managers or update commands.
154
+
155
+ For each repo:
156
+
157
+ 1. Run the **Update Command** from the table
158
+ 2. Run the **lockfile refresh** (`pnpm install` or `yarn install`) — always commit the updated lockfile
159
+ 3. Run the **Verify Command** from the table — if it fails, report the failure and move on
160
+ 4. Commit only the dependency change + lockfile — nothing else
161
+
162
+ Special handling for renderer API changes:
163
+
164
+ - `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.
165
+ - `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.
166
+ - `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.
167
+
168
+ Prefer the smallest change that updates the downstream safely:
169
+
170
+ - package dependency bumps
171
+ - lockfile refreshes
172
+ - vendored asset refreshes only when the repo actually vendors core output (e.g., `jetbrains-zenuml`)
173
+
174
+ Do not opportunistically clean up unrelated code while touching the downstream repo.
175
+
176
+ If a downstream repo needs custom update logic that is not obvious from the table or its files, stop on that repo and report the ambiguity.
177
+
178
+ ## Safety
179
+
180
+ - Never merge downstream PRs from this skill.
181
+ - Never force-push unless the user explicitly asks.
182
+ - Never batch all downstream repos into one branch or one PR.
183
+ - Never hide per-repo failures behind a single "batch failed" message.
184
+ - Never update unrelated dependencies in the same PR.
185
+
186
+ ## Output
187
+
188
+ Final report format:
189
+
190
+ ```markdown
191
+ ## Downstream Propagation Report
192
+ - Core version: v<version>
193
+ - Overall: <N> succeeded, <N> reused, <N> skipped, <N> failed
194
+
195
+ ### Repo Results
196
+ - `<repo>`: draft PR opened | draft PR reused | already updated | failed
197
+ branch: `<branch-name>`
198
+ pr: <url or none>
199
+ notes: <short reason or blocker>
200
+ ```
@@ -0,0 +1,7 @@
1
+ interface:
2
+ display_name: "Propagate Core Release"
3
+ short_description: "Open downstream draft PRs for a published core version"
4
+ default_prompt: "Use $propagate-core-release after @zenuml/core has been published to update the configured downstream repos on per-repo branches and open or reuse draft PRs. Do not merge the downstream PRs."
5
+
6
+ policy:
7
+ allow_implicit_invocation: true
@@ -0,0 +1,41 @@
1
+ # Downstream Repos
2
+
3
+ Canonical downstream targets for propagating 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/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. |
15
+
16
+ ## Lockfile Handling
17
+
18
+ After every dependency update, regenerate the lockfile:
19
+
20
+ - **pnpm**: `pnpm install` (updates `pnpm-lock.yaml`)
21
+ - **yarn**: `yarn install` (updates `yarn.lock`)
22
+
23
+ Always commit the lockfile alongside the `package.json` change. A PR without an updated lockfile will fail CI.
24
+
25
+ ## Clone Strategy
26
+
27
+ If a local path does not exist:
28
+
29
+ ```bash
30
+ gh repo clone <repo-slug> <local-path>
31
+ ```
32
+
33
+ Then proceed with fetch + branch creation as usual.
34
+
35
+ ## General Rules
36
+
37
+ - Each repo gets its own update branch and its own draft PR.
38
+ - Reuse existing propagation branches or draft PRs when they already target the same core version.
39
+ - `mermaid-js/mermaid` and `mermaid-js/mermaid-live-editor` are under the `mermaid-js` GitHub org (not `ZenUml`).
40
+ - Only `mermaid-js/mermaid` and `mermaid-js/mermaid-live-editor` should receive SVG-renderer integration changes tied to core API/export changes.
41
+ - Treat all other downstreams as HTML-renderer consumers unless the user explicitly asks for a renderer migration.
@@ -10,6 +10,8 @@ Orchestrate the full path from local branch to npm release. This skill composes
10
10
  ## Flow
11
11
 
12
12
  ```
13
+ rebase on origin/main → CONFLICT → stop, report
14
+ | CLEAN
13
15
  validate-branch → FAIL → stop, report
14
16
  | PASS
15
17
  submit-branch → FAIL → stop, report
@@ -25,6 +27,17 @@ land-pr → PUBLISH FAIL → alert, stop
25
27
 
26
28
  ## Steps
27
29
 
30
+ ### Step 0: Rebase on remote main
31
+
32
+ Fetch and rebase onto `origin/main` to ensure the branch is up to date before validating.
33
+
34
+ ```bash
35
+ git fetch origin main
36
+ git rebase origin/main
37
+ ```
38
+
39
+ If the rebase has conflicts, stop immediately and report. The developer must resolve conflicts manually before shipping.
40
+
28
41
  ### Step 1: Validate locally
29
42
 
30
43
  Invoke `/validate-branch`. If it reports FAIL, stop and show the failure. The developer needs to fix locally before shipping.