@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.
- package/dist/cli/zenuml.mjs +13529 -0
- package/dist/cli/zenuml.mjs.map +1 -0
- package/dist/cloud-icons-eHuugVSv.js.map +1 -0
- package/dist/zenuml.esm.mjs +2153 -2156
- package/dist/zenuml.esm.mjs.map +1 -0
- package/dist/zenuml.js +82 -82
- package/dist/zenuml.js.map +1 -0
- package/package.json +18 -5
- package/.agents/skills/babysit-pr/SKILL.md +0 -223
- package/.agents/skills/babysit-pr/agents/openai.yaml +0 -7
- package/.agents/skills/dia-scoring/SKILL.md +0 -139
- package/.agents/skills/dia-scoring/agents/openai.yaml +0 -7
- package/.agents/skills/dia-scoring/references/selectors-and-keys.md +0 -253
- package/.agents/skills/land-pr/SKILL.md +0 -120
- package/.agents/skills/propagate-core-release/SKILL.md +0 -205
- package/.agents/skills/propagate-core-release/agents/openai.yaml +0 -7
- package/.agents/skills/propagate-core-release/references/downstreams.md +0 -42
- package/.agents/skills/ship-branch/SKILL.md +0 -105
- package/.agents/skills/submit-branch/SKILL.md +0 -76
- package/.agents/skills/validate-branch/SKILL.md +0 -72
- package/.claude/commands/README.md +0 -162
- package/.claude/commands/analyze.md +0 -101
- package/.claude/commands/clarify.md +0 -158
- package/.claude/commands/code-review.md +0 -322
- package/.claude/commands/constitution.md +0 -73
- package/.claude/commands/create-docs.md +0 -309
- package/.claude/commands/full-context.md +0 -121
- package/.claude/commands/gemini-consult.md +0 -164
- package/.claude/commands/handoff.md +0 -146
- package/.claude/commands/implement.md +0 -56
- package/.claude/commands/plan.md +0 -43
- package/.claude/commands/refactor.md +0 -188
- package/.claude/commands/specify.md +0 -21
- package/.claude/commands/tasks.md +0 -62
- package/.claude/commands/update-docs.md +0 -314
- package/.claude/hooks/README.md +0 -270
- package/.claude/hooks/config/sensitive-patterns.json +0 -86
- package/.claude/hooks/gemini-context-injector.sh +0 -129
- package/.claude/hooks/mcp-security-scan.sh +0 -147
- package/.claude/hooks/notify.sh +0 -103
- package/.claude/hooks/setup/hook-setup.md +0 -96
- package/.claude/hooks/setup/settings.json.template +0 -63
- package/.claude/hooks/sounds/complete.wav +0 -0
- package/.claude/hooks/sounds/input-needed.wav +0 -0
- package/.claude/hooks/subagent-context-injector.sh +0 -65
- package/.claude/skills/babysit-pr/SKILL.md +0 -223
- package/.claude/skills/babysit-pr/agents/openai.yaml +0 -7
- package/.claude/skills/dia-scoring/SKILL.md +0 -139
- package/.claude/skills/dia-scoring/agents/openai.yaml +0 -7
- package/.claude/skills/dia-scoring/references/selectors-and-keys.md +0 -253
- package/.claude/skills/emoji-eval/SKILL.md +0 -187
- package/.claude/skills/land-pr/SKILL.md +0 -120
- package/.claude/skills/propagate-core-release/SKILL.md +0 -205
- package/.claude/skills/propagate-core-release/agents/openai.yaml +0 -7
- package/.claude/skills/propagate-core-release/references/downstreams.md +0 -42
- package/.claude/skills/ship-branch/SKILL.md +0 -105
- package/.claude/skills/submit-branch/SKILL.md +0 -76
- package/.claude/skills/validate-branch/SKILL.md +0 -72
- package/.claude/skills/zenuml-ux-research/SKILL.md +0 -183
- package/.claude/skills/zenuml-ux-research/references/assertion-catalog.md +0 -261
- package/.claude/skills/zenuml-ux-research/references/best-practices-overview.md +0 -56
- package/.claude/skills/zenuml-ux-research/references/report-template.md +0 -89
- package/.claude/skills/zenuml-ux-research/references/scenarios/edit-message-label.md +0 -37
- package/.claude/skills/zenuml-ux-research/references/scenarios/insert-message.md +0 -36
- package/.claude/skills/zenuml-ux-research/references/scenarios/insert-participant.md +0 -31
- package/.claude/skills/zenuml-ux-research/references/scenarios/rename-participant.md +0 -33
- package/.claude/skills/zenuml-ux-research/references/scenarios/undo-insert.md +0 -35
- package/.devcontainer/devcontainer.json +0 -21
- package/.dockerignore +0 -19
- package/.eslintrc.js +0 -39
- package/.git-blame-ignore-revs +0 -6
- package/.kiro/hooks/README.md +0 -38
- package/.kiro/hooks/session-sound-notification.js +0 -44
- package/.kiro/hooks/session-sound-notification.json +0 -23
- package/.mcp.json.example +0 -17
- package/.nvmrc +0 -1
- package/.prettierignore +0 -4
- package/.prettierrc +0 -1
- package/.specify/memory/constitution.md +0 -33
- package/.specify/scripts/bash/check-prerequisites.sh +0 -166
- package/.specify/scripts/bash/common.sh +0 -113
- package/.specify/scripts/bash/create-new-feature.sh +0 -97
- package/.specify/scripts/bash/setup-plan.sh +0 -60
- package/.specify/scripts/bash/update-agent-context.sh +0 -728
- package/.specify/templates/agent-file-template.md +0 -23
- package/.specify/templates/plan-template.md +0 -219
- package/.specify/templates/spec-template.md +0 -116
- package/.specify/templates/tasks-template.md +0 -127
- package/.storybook/main.ts +0 -25
- package/.storybook/preview.ts +0 -29
- package/.watchmanconfig +0 -3
- package/AGENTS.md +0 -26
- package/CLAUDE.md +0 -124
- package/DEPLOYMENT.md +0 -62
- package/Dockerfile +0 -36
- package/IMPLEMENTATION_PLAN.md +0 -163
- package/Integration/vanilla-js/index.html +0 -42
- package/MCP-ASSISTANT-RULES.md +0 -85
- package/README_CN.md +0 -15
- package/TUTORIAL.md +0 -116
- package/antlr/antlr-4.11.1-complete.jar +0 -0
- package/bun.lock +0 -1544
- package/bunfig.toml +0 -52
- package/docs/UNICODE_SUPPORT.md +0 -179
- package/docs/ai-context/deployment-infrastructure.md +0 -21
- package/docs/ai-context/docs-overview.md +0 -89
- package/docs/ai-context/handoff.md +0 -174
- package/docs/ai-context/project-structure.md +0 -160
- package/docs/ai-context/system-integration.md +0 -21
- package/docs/asciidoc/contributor.adoc +0 -54
- package/docs/asciidoc/create-my-own-theme.adoc +0 -149
- package/docs/asciidoc/images/creation-component.png +0 -0
- package/docs/asciidoc/images/creation-rtl.png +0 -0
- package/docs/asciidoc/images/message-arrow-rtl.png +0 -0
- package/docs/asciidoc/images/occurrence.png +0 -0
- package/docs/asciidoc/images/return-message-conflict.png +0 -0
- package/docs/asciidoc/images/shift-up-half-the-height.png +0 -0
- package/docs/asciidoc/images/three-layer-info-arch.png +0 -0
- package/docs/asciidoc/images/vertical-alignment.svg +0 -1
- package/docs/asciidoc/images/vertically-aligning.png +0 -0
- package/docs/asciidoc/index.adoc +0 -277
- package/docs/asciidoc/theme-debug-web-app.png +0 -0
- package/docs/asciidoc/tutorial.adoc +0 -22
- package/docs/asciidoc/user-css.png +0 -0
- package/docs/async-vs-sync-parser-rules.md +0 -81
- package/docs/divider-parser-allow-spaces.md +0 -38
- package/docs/highlighting-messages.md +0 -52
- package/docs/images/editor-sample.png +0 -0
- package/docs/inherited-vs-provided-from.md +0 -64
- package/docs/parser/Assignment.md +0 -8
- package/docs/parser/PARSER_IMPROVEMENTS_CC.md +0 -425
- package/docs/parser/grammar_review_gemini.md +0 -116
- package/docs/participants-function.md +0 -25
- package/docs/responsive-participant-margin.md +0 -52
- package/docs/starter.md +0 -9
- package/docs/superpowers/plans/2026-03-27-e2e-test-reorg.md +0 -698
- package/docs/superpowers/plans/2026-03-30-emoji-support.md +0 -1220
- package/docs/superpowers/plans/2026-03-30-self-correcting-scoring.md +0 -206
- package/docs/superpowers/plans/2026-04-15-keyboard-editing-on-diagram.md +0 -1992
- package/docs/superpowers/plans/2026-04-15-zenuml-ux-research-skill.md +0 -1452
- package/docs/ux-research/.gitkeep +0 -0
- package/docs/ux-research/2026-04-15-rename-participant.md +0 -156
- package/docs/ux-research/2026-04-18-insert-participant.md +0 -151
- package/docs/width-translate-and-offsets.md +0 -62
- package/docs/xss.md +0 -59
- package/e2e/data/compare-cases.js +0 -1090
- package/e2e/data/diff-algorithm.js +0 -199
- package/e2e/fixtures/create-message.html +0 -26
- package/e2e/fixtures/editable-label.html +0 -35
- package/e2e/fixtures/editable-span.html +0 -122
- package/e2e/fixtures/empty-diagram.html +0 -23
- package/e2e/fixtures/fixture.html +0 -31
- package/e2e/fixtures/insert-participant.html +0 -23
- package/e2e/fixtures/reorder-cross-fragment.html +0 -31
- package/e2e/fixtures/reorder-fragment.html +0 -29
- package/e2e/fixtures/reorder-message.html +0 -27
- package/e2e/fixtures/svg-test.html +0 -21
- package/e2e/fixtures/type-switch.html +0 -29
- package/e2e/tools/canonical-history.html +0 -908
- package/e2e/tools/compare-case.html +0 -371
- package/e2e/tools/compare.html +0 -35
- package/e2e/tools/native-diff-ext/background.js +0 -60
- package/e2e/tools/native-diff-ext/bridge.js +0 -26
- package/e2e/tools/native-diff-ext/content.js +0 -194
- package/e2e/tools/svg-preview.html +0 -56
- package/embed.html +0 -193
- package/eslint.config.mjs +0 -35
- package/firebase-debug.log +0 -108
- package/iframe-container-demo/diagram.html +0 -124
- package/iframe-container-demo/host.html +0 -817
- package/index.html +0 -771
- package/mermaid-zenuml-async-spa-auth.png +0 -0
- package/mermaid-zenuml-async-spa-auth.snapshot.md +0 -96
- package/newsletter/unicode-support-announcement.md +0 -134
- package/playground/creation.html +0 -53
- package/playground/message.html +0 -63
- package/playwright.config.ts +0 -40
- package/renderer.html +0 -366
- package/scripts/analyze-compare-case/collect-data.mjs +0 -1134
- package/scripts/analyze-compare-case/config.mjs +0 -102
- package/scripts/analyze-compare-case/geometry.mjs +0 -101
- package/scripts/analyze-compare-case/native-diff.mjs +0 -224
- package/scripts/analyze-compare-case/output.mjs +0 -74
- package/scripts/analyze-compare-case/panel-diff.mjs +0 -114
- package/scripts/analyze-compare-case/report.mjs +0 -162
- package/scripts/analyze-compare-case/residual-scopes.mjs +0 -347
- package/scripts/analyze-compare-case/scoring.mjs +0 -829
- package/scripts/analyze-compare-case.mjs +0 -149
- package/scripts/bump-version.js +0 -117
- package/scripts/snapshot-dual.js +0 -173
- package/scripts/update-snapshots.js +0 -70
- package/skills/dia-scoring/SKILL.md +0 -129
- package/skills/dia-scoring/agents/openai.yaml +0 -7
- package/skills/dia-scoring/references/selectors-and-keys.md +0 -253
- package/tailwind.config.js +0 -126
- package/test-compression.html +0 -274
- package/test-mermaid-zenuml.html +0 -57
- package/test-setup.ts +0 -124
- package/test-url-params.html +0 -192
- package/tsconfig.app.json +0 -31
- package/tsconfig.node.json +0 -24
- package/tsconfig.test.json +0 -9
- package/vite.config.lib.ts +0 -93
- package/vite.config.ts +0 -84
- package/wrangler.toml +0 -18
|
@@ -1,187 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: emoji-eval
|
|
3
|
-
description: Evaluate emoji rendering quality in ZenUML diagrams. Renders test cases in both DOM and SVG modes, takes screenshots, and scores emoji visibility, position, spacing, box fit, and decorator coexistence. Reports per-case scores with HTML-vs-SVG parity check. Use when testing emoji rendering, after emoji-related code changes, or when the user asks to evaluate/score emoji rendering.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Emoji Rendering Evaluator
|
|
7
|
-
|
|
8
|
-
Automatically score emoji rendering quality in ZenUML diagrams by rendering test cases in both DOM and SVG modes, taking screenshots, and evaluating what the agent sees.
|
|
9
|
-
|
|
10
|
-
## Prerequisites
|
|
11
|
-
|
|
12
|
-
- Dev server running on `http://localhost:8080` (`bun dev`)
|
|
13
|
-
- Playwright MCP available for browser automation
|
|
14
|
-
|
|
15
|
-
## Test Cases
|
|
16
|
-
|
|
17
|
-
Run ALL of these cases unless the user specifies a subset:
|
|
18
|
-
|
|
19
|
-
```javascript
|
|
20
|
-
const EMOJI_TEST_CASES = {
|
|
21
|
-
"emoji-basic": "[rocket] Production\nA->Production.deploy()",
|
|
22
|
-
"emoji-multi": "[rocket] Production\n[lock] AuthService\n[fire] Cache\nProduction->AuthService.validate()\nAuthService->Cache.get()",
|
|
23
|
-
"emoji-with-type": "@Database [fire] HotDB\n@Actor [star] Admin\nAdmin->HotDB.query()",
|
|
24
|
-
"emoji-with-stereotype": '<<service>> [lock] Auth\n<<gateway>> [globe] API\nAPI->Auth.validate()',
|
|
25
|
-
"emoji-inline": "[rocket]User->[fire]Server.request()",
|
|
26
|
-
"emoji-async-message": "A->B: [check] validated\nB->C: [warning] review needed",
|
|
27
|
-
"emoji-comment": "// [eyes] review phase\nA->B.process()",
|
|
28
|
-
"emoji-colon-override": "[:red:] Alert\nA->Alert.trigger()",
|
|
29
|
-
"emoji-css-combo": "// [rocket, red] deploy note\nA->B.deploy()",
|
|
30
|
-
"emoji-complex": "@Database [fire] HotDB\n[rocket] Production\n<<service>> [lock] Auth\nProduction->Auth.validate(token)\n Auth->HotDB.check(token)\n Auth-->Production: [check] valid",
|
|
31
|
-
};
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
## Procedure
|
|
35
|
-
|
|
36
|
-
For each test case:
|
|
37
|
-
|
|
38
|
-
### Step 1: Render in DOM mode
|
|
39
|
-
|
|
40
|
-
1. Navigate to `http://localhost:8080`
|
|
41
|
-
2. Set the code via CodeMirror:
|
|
42
|
-
```javascript
|
|
43
|
-
page.evaluate((code) => {
|
|
44
|
-
const cm = document.querySelector('.CodeMirror');
|
|
45
|
-
cm.CodeMirror.setValue(code);
|
|
46
|
-
}, testCode);
|
|
47
|
-
```
|
|
48
|
-
3. Click the "DOM" button to switch to DOM view
|
|
49
|
-
4. Wait 1 second for rendering to complete
|
|
50
|
-
5. Take a screenshot of the diagram area — save as `emoji-eval-{caseName}-dom.png`
|
|
51
|
-
|
|
52
|
-
### Step 2: Render in SVG mode
|
|
53
|
-
|
|
54
|
-
1. Click the "SVG" button to switch to SVG view
|
|
55
|
-
2. Wait 1 second for rendering to complete
|
|
56
|
-
3. Take a screenshot of the diagram area — save as `emoji-eval-{caseName}-svg.png`
|
|
57
|
-
|
|
58
|
-
### Step 3: Evaluate both screenshots
|
|
59
|
-
|
|
60
|
-
Read each screenshot and score on the criteria below. Use your understanding of sequence diagrams to judge:
|
|
61
|
-
|
|
62
|
-
- A participant header should be a box with the name inside
|
|
63
|
-
- Emoji should appear inline to the LEFT of the participant name
|
|
64
|
-
- @Type icons (actor, database) should appear ABOVE the name, in their own row
|
|
65
|
-
- Stereotypes (`<<name>>`) should appear ABOVE the name, below the icon
|
|
66
|
-
- Messages should be horizontal arrows with labels
|
|
67
|
-
- Comments should be italicized text above messages
|
|
68
|
-
|
|
69
|
-
## Scoring Criteria
|
|
70
|
-
|
|
71
|
-
Score each criterion 0-3:
|
|
72
|
-
|
|
73
|
-
### 1. Emoji Visibility (per participant with emoji)
|
|
74
|
-
- **0**: Emoji not visible, blank box, or tofu character
|
|
75
|
-
- **1**: Something visible but wrong character or garbled
|
|
76
|
-
- **2**: Correct emoji visible but poor contrast or very small
|
|
77
|
-
- **3**: Correct emoji clearly visible
|
|
78
|
-
|
|
79
|
-
### 2. Emoji Position (per participant with emoji)
|
|
80
|
-
- **0**: Emoji in wrong location (after name, outside box, overlapping other elements)
|
|
81
|
-
- **1**: Before name but overlapping the name text
|
|
82
|
-
- **2**: Correct position with minor vertical misalignment
|
|
83
|
-
- **3**: Perfectly aligned inline before the name
|
|
84
|
-
|
|
85
|
-
### 3. Spacing (per participant with emoji)
|
|
86
|
-
- **0**: Emoji and name overlap or no gap
|
|
87
|
-
- **1**: Too tight (characters touching) or too wide (looks disconnected)
|
|
88
|
-
- **2**: Acceptable gap, slightly off
|
|
89
|
-
- **3**: Natural, comfortable spacing
|
|
90
|
-
|
|
91
|
-
### 4. Box Fit (per participant with emoji)
|
|
92
|
-
- **0**: Emoji or name overflows the participant box boundary
|
|
93
|
-
- **1**: Box boundary clips the emoji or text
|
|
94
|
-
- **2**: Box fits but looks cramped
|
|
95
|
-
- **3**: Box comfortably accommodates emoji + name with padding
|
|
96
|
-
|
|
97
|
-
### 5. Decorator Coexistence (only for cases with @Type or stereotype)
|
|
98
|
-
- **0**: @Type icon or stereotype is missing or broken
|
|
99
|
-
- **1**: Both present but overlapping or misaligned
|
|
100
|
-
- **2**: Both present, minor layout issues
|
|
101
|
-
- **3**: Perfect layout — icon above, stereotype below icon, emoji inline with name
|
|
102
|
-
|
|
103
|
-
### 6. Message/Comment Emoji (only for cases with emoji in messages or comments)
|
|
104
|
-
- **0**: Emoji not visible in message/comment text
|
|
105
|
-
- **1**: Emoji visible but breaks the message layout
|
|
106
|
-
- **2**: Emoji visible, minor alignment issues
|
|
107
|
-
- **3**: Emoji renders naturally inline with message/comment text
|
|
108
|
-
|
|
109
|
-
## Parity Check
|
|
110
|
-
|
|
111
|
-
For each criterion scored in both DOM and SVG:
|
|
112
|
-
- **Match**: Both scores are equal → mark as `=`
|
|
113
|
-
- **Close**: Scores differ by 1 → mark as `~`
|
|
114
|
-
- **Divergent**: Scores differ by 2+ → mark as `!=` (flag for investigation)
|
|
115
|
-
|
|
116
|
-
## Output Format
|
|
117
|
-
|
|
118
|
-
Present results as a markdown report:
|
|
119
|
-
|
|
120
|
-
```markdown
|
|
121
|
-
# Emoji Rendering Evaluation Report
|
|
122
|
-
|
|
123
|
-
**Date:** YYYY-MM-DD
|
|
124
|
-
**Branch:** {current git branch}
|
|
125
|
-
**Total cases:** {N}
|
|
126
|
-
|
|
127
|
-
## Summary
|
|
128
|
-
|
|
129
|
-
| Case | DOM Score | SVG Score | Parity | Status |
|
|
130
|
-
|------|----------|-----------|--------|--------|
|
|
131
|
-
| emoji-basic | 12/12 | 10/12 | ~ | PASS |
|
|
132
|
-
| emoji-multi | 12/12 | 11/12 | ~ | PASS |
|
|
133
|
-
| ... | ... | ... | ... | ... |
|
|
134
|
-
|
|
135
|
-
**Overall DOM:** {total}/{max} ({percentage}%)
|
|
136
|
-
**Overall SVG:** {total}/{max} ({percentage}%)
|
|
137
|
-
**Parity divergences:** {count}
|
|
138
|
-
|
|
139
|
-
## Detailed Results
|
|
140
|
-
|
|
141
|
-
### emoji-basic
|
|
142
|
-
**DSL:**
|
|
143
|
-
\`\`\`
|
|
144
|
-
[rocket] Production
|
|
145
|
-
A->Production.deploy()
|
|
146
|
-
\`\`\`
|
|
147
|
-
|
|
148
|
-
**DOM render:**
|
|
149
|
-
[screenshot: emoji-eval-emoji-basic-dom.png]
|
|
150
|
-
|
|
151
|
-
| Criterion | Score | Notes |
|
|
152
|
-
|-----------|-------|-------|
|
|
153
|
-
| Emoji visibility | 3 | Rocket emoji clearly visible |
|
|
154
|
-
| Emoji position | 3 | Correctly before "Production" |
|
|
155
|
-
| Spacing | 3 | Natural gap |
|
|
156
|
-
| Box fit | 3 | Box fits comfortably |
|
|
157
|
-
| **Total** | **12/12** | |
|
|
158
|
-
|
|
159
|
-
**SVG render:**
|
|
160
|
-
[screenshot: emoji-eval-emoji-basic-svg.png]
|
|
161
|
-
|
|
162
|
-
| Criterion | Score | Notes |
|
|
163
|
-
|-----------|-------|-------|
|
|
164
|
-
| Emoji visibility | 3 | Rocket emoji visible |
|
|
165
|
-
| Emoji position | 2 | Slightly tighter than DOM |
|
|
166
|
-
| Spacing | 2 | Tighter spacing than DOM |
|
|
167
|
-
| Box fit | 3 | Box fits |
|
|
168
|
-
| **Total** | **10/12** | |
|
|
169
|
-
|
|
170
|
-
**Parity:** Spacing is tighter in SVG (~ close)
|
|
171
|
-
|
|
172
|
-
---
|
|
173
|
-
(repeat for each case)
|
|
174
|
-
```
|
|
175
|
-
|
|
176
|
-
## Pass/Fail Thresholds
|
|
177
|
-
|
|
178
|
-
- **PASS**: All criteria >= 2, total >= 75%
|
|
179
|
-
- **WARN**: Any criterion at 1, or total 50-75%
|
|
180
|
-
- **FAIL**: Any criterion at 0, or total < 50%
|
|
181
|
-
|
|
182
|
-
## When to use this skill
|
|
183
|
-
|
|
184
|
-
- After emoji-related code changes
|
|
185
|
-
- Before creating a PR that touches emoji rendering
|
|
186
|
-
- When the user asks to "evaluate emoji", "score emoji rendering", "check emoji quality"
|
|
187
|
-
- When debugging emoji visual issues
|
|
@@ -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.
|
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: ship-branch
|
|
3
|
-
description: Ship the current branch from local validation through to npm release. Orchestrates validate-branch, submit-branch, babysit-pr, and land-pr in sequence. Use when the user says "ship", "ship it", "ship this branch", "ship to production", "release this", "get this to npm", or wants to go from local branch to published npm package in one command. Stops at the first failure with a clear report.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Ship Branch
|
|
7
|
-
|
|
8
|
-
Orchestrate the full path from local branch to npm release. This skill composes four sub-skills in sequence, stopping at the first failure.
|
|
9
|
-
|
|
10
|
-
## Flow
|
|
11
|
-
|
|
12
|
-
```
|
|
13
|
-
rebase on origin/main → CONFLICT → stop, report
|
|
14
|
-
| CLEAN
|
|
15
|
-
validate-branch → FAIL → stop, report
|
|
16
|
-
| PASS
|
|
17
|
-
submit-branch → FAIL → stop, report
|
|
18
|
-
| PR ready
|
|
19
|
-
babysit-pr → EXHAUSTED → stop, "CI blocked"
|
|
20
|
-
| GREEN
|
|
21
|
-
land-pr → BLOCKED → stop, report
|
|
22
|
-
| MERGED
|
|
23
|
-
land-pr → PUBLISH FAIL → alert, stop
|
|
24
|
-
| PUBLISHED
|
|
25
|
-
done
|
|
26
|
-
```
|
|
27
|
-
|
|
28
|
-
## Steps
|
|
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
|
-
|
|
41
|
-
### Step 1: Validate locally
|
|
42
|
-
|
|
43
|
-
Invoke `/validate-branch`. If it reports FAIL, stop and show the failure. The developer needs to fix locally before shipping.
|
|
44
|
-
|
|
45
|
-
### Step 2: Submit as PR
|
|
46
|
-
|
|
47
|
-
Invoke `/submit-branch`. If it reports FAILED, stop and show what went wrong (dirty worktree, push conflict, etc.).
|
|
48
|
-
|
|
49
|
-
On success, note the PR number and URL.
|
|
50
|
-
|
|
51
|
-
### Step 3: Get CI green
|
|
52
|
-
|
|
53
|
-
Invoke `/babysit-pr` with the PR number from Step 2. If it exhausts all 3 retry attempts, stop and report "CI blocked" with the babysit report.
|
|
54
|
-
|
|
55
|
-
On success, the PR is green and ready to merge.
|
|
56
|
-
|
|
57
|
-
### Step 4: Land and verify release
|
|
58
|
-
|
|
59
|
-
Merging to main triggers an npm publish — this is irreversible. To prevent the orchestrator from skipping the land-pr skill's merge strategy logic (which has happened before), **spawn an Agent** for this step:
|
|
60
|
-
|
|
61
|
-
```
|
|
62
|
-
Spawn an Agent with this prompt:
|
|
63
|
-
"Use the Skill tool to invoke the land-pr skill, then follow it to land PR #<PR_NUMBER>
|
|
64
|
-
on mermaid-js/zenuml-core. Follow every step including the merge strategy evaluation.
|
|
65
|
-
Report back the merge SHA and npm version, or the reason it was blocked."
|
|
66
|
-
```
|
|
67
|
-
|
|
68
|
-
Replace `<PR_NUMBER>` with the actual PR number from Step 2.
|
|
69
|
-
|
|
70
|
-
Do NOT run `gh pr merge` directly from the main conversation — the land-pr skill contains merge strategy decision logic that must be evaluated by the Agent.
|
|
71
|
-
|
|
72
|
-
If merge succeeds but npm publish fails, alert immediately with the failure details. Do NOT auto-rollback.
|
|
73
|
-
|
|
74
|
-
On full success, report the new npm version.
|
|
75
|
-
|
|
76
|
-
## Rules
|
|
77
|
-
|
|
78
|
-
- **Each step is a hard boundary.** No step reaches back to retry a previous step.
|
|
79
|
-
- **No auto-rollback.** Stop and report on any failure. The developer decides next steps.
|
|
80
|
-
- **Only this skill calls babysit-pr.** Sub-skills never cross-call each other.
|
|
81
|
-
- **Confirm before merge.** Since merge = npm release, pause and confirm with the user before Step 4 unless they explicitly said "ship it" (indicating full automation is intended).
|
|
82
|
-
|
|
83
|
-
## Output
|
|
84
|
-
|
|
85
|
-
Final report:
|
|
86
|
-
|
|
87
|
-
```
|
|
88
|
-
## Ship Report: <branch-name>
|
|
89
|
-
- Validation: PASS
|
|
90
|
-
- PR: #<number> (<url>)
|
|
91
|
-
- CI: GREEN (attempt <N>)
|
|
92
|
-
- Merge: <SQUASHED|MERGED> into main (<sha>)
|
|
93
|
-
- npm: @zenuml/core@<version> published
|
|
94
|
-
```
|
|
95
|
-
|
|
96
|
-
Or on failure:
|
|
97
|
-
|
|
98
|
-
```
|
|
99
|
-
## Ship Report: <branch-name>
|
|
100
|
-
- Validation: PASS
|
|
101
|
-
- PR: #<number>
|
|
102
|
-
- CI: BLOCKED after 3 attempts
|
|
103
|
-
- Stopped at: babysit-pr
|
|
104
|
-
- Details: <failure summary>
|
|
105
|
-
```
|