@zenuml/core 3.46.1 → 3.46.3
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/.claude/skills/land-pr/SKILL.md +98 -0
- package/.claude/skills/ship-branch/SKILL.md +81 -0
- package/.claude/skills/submit-branch/SKILL.md +76 -0
- package/.claude/skills/validate-branch/SKILL.md +54 -0
- package/dist/stats.html +1 -1
- package/dist/zenuml.esm.mjs +1650 -1621
- package/dist/zenuml.js +518 -517
- package/docs/ship-branch-skill-plan.md +134 -0
- package/package.json +1 -1
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
# Ship Branch Skills
|
|
2
|
+
|
|
3
|
+
## Overview
|
|
4
|
+
|
|
5
|
+
5 skills that compose into a branch-to-production pipeline for `mermaid-js/zenuml-core`.
|
|
6
|
+
|
|
7
|
+
Merge to main triggers npm publish automatically — every merge is a release.
|
|
8
|
+
|
|
9
|
+
## Skills
|
|
10
|
+
|
|
11
|
+
### `/validate-branch`
|
|
12
|
+
|
|
13
|
+
**Purpose**: Check if the current branch is locally good.
|
|
14
|
+
|
|
15
|
+
**Standalone use**: "Am I good?" — developer runs this before shipping or just to check.
|
|
16
|
+
|
|
17
|
+
**Steps**:
|
|
18
|
+
1. `bun eslint` — fastest, fail first
|
|
19
|
+
2. `bun run test` — unit tests
|
|
20
|
+
3. `bun pw` — Playwright E2E (slowest)
|
|
21
|
+
|
|
22
|
+
**Output**: pass or structured failure report.
|
|
23
|
+
|
|
24
|
+
**Does NOT**: push, commit, create PRs, fix anything.
|
|
25
|
+
|
|
26
|
+
### `/submit-branch`
|
|
27
|
+
|
|
28
|
+
**Purpose**: Publish the current branch as a PR.
|
|
29
|
+
|
|
30
|
+
**Precondition**: Clean or committable worktree. Fails on mixed/unrelated changes.
|
|
31
|
+
|
|
32
|
+
**Steps**:
|
|
33
|
+
1. Inspect worktree — fail if dirty with unrelated changes
|
|
34
|
+
2. Stage and commit scoped changes if needed
|
|
35
|
+
3. Push branch
|
|
36
|
+
4. Create PR if missing, reuse if exists
|
|
37
|
+
5. Return PR number and URL
|
|
38
|
+
|
|
39
|
+
**Output**: PR created/reused with URL.
|
|
40
|
+
|
|
41
|
+
**Does NOT**: fix CI, merge, validate locally.
|
|
42
|
+
|
|
43
|
+
### `/babysit-pr` (existing)
|
|
44
|
+
|
|
45
|
+
**Purpose**: Get PR CI to green.
|
|
46
|
+
|
|
47
|
+
**Input**: PR number or current branch PR.
|
|
48
|
+
|
|
49
|
+
**Steps**:
|
|
50
|
+
1. Check CI status
|
|
51
|
+
2. Diagnose failures (snapshot mismatch, test failure, lint, build, infra)
|
|
52
|
+
3. Apply safe fixes (update snapshots, fix lint, rerun flaky)
|
|
53
|
+
4. Push and wait — up to 3 attempts
|
|
54
|
+
|
|
55
|
+
**Output**: green PR, or concrete failure report after 3 attempts.
|
|
56
|
+
|
|
57
|
+
**Does NOT**: merge, create PRs, validate locally.
|
|
58
|
+
|
|
59
|
+
### `/land-pr`
|
|
60
|
+
|
|
61
|
+
**Purpose**: Merge a green PR and verify the npm release.
|
|
62
|
+
|
|
63
|
+
**Precondition**: All CI checks green, no pending reviews.
|
|
64
|
+
|
|
65
|
+
**Steps**:
|
|
66
|
+
1. Verify all checks green + mergeable
|
|
67
|
+
2. Squash merge (hardcoded for this repo)
|
|
68
|
+
3. Watch the post-merge npm-publish GitHub Action
|
|
69
|
+
4. Verify new version appears on npm
|
|
70
|
+
|
|
71
|
+
**Output**: merged + published, or failure report.
|
|
72
|
+
|
|
73
|
+
**On publish failure**: Alert immediately. Do NOT auto-rollback.
|
|
74
|
+
|
|
75
|
+
**Does NOT**: fix CI, create PRs, validate locally.
|
|
76
|
+
|
|
77
|
+
### `/ship-branch` (orchestrator)
|
|
78
|
+
|
|
79
|
+
**Purpose**: Full happy path from local branch to npm release.
|
|
80
|
+
|
|
81
|
+
**Flow**:
|
|
82
|
+
```
|
|
83
|
+
validate-branch → FAIL → stop, report
|
|
84
|
+
↓ PASS
|
|
85
|
+
submit-branch → FAIL → stop, report
|
|
86
|
+
↓ PR created
|
|
87
|
+
babysit-pr → EXHAUSTED → stop, report "CI blocked"
|
|
88
|
+
↓ GREEN
|
|
89
|
+
land-pr → MERGE BLOCKED → stop, report
|
|
90
|
+
↓ MERGED
|
|
91
|
+
land-pr → PUBLISH FAILED → alert, stop
|
|
92
|
+
↓ PUBLISHED
|
|
93
|
+
done ✓
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
**Rules**:
|
|
97
|
+
- Each arrow is a hard boundary — no skill reaches back to retry a previous step
|
|
98
|
+
- No auto-rollback — stop and report on any failure
|
|
99
|
+
- Only `ship-branch` decides when to call `babysit-pr`
|
|
100
|
+
- Sub-skills never cross-call each other
|
|
101
|
+
|
|
102
|
+
## Design Principles
|
|
103
|
+
|
|
104
|
+
1. **Each skill owns one state transition** — not just commands
|
|
105
|
+
2. **Each skill is independently invokable** — developers use them standalone
|
|
106
|
+
3. **Stop on failure, report clearly** — no auto-rollback (rollback is more dangerous than stopping)
|
|
107
|
+
4. **Merge = release** — `land-pr` treats merge as a production deployment, not a casual action
|
|
108
|
+
5. **`babysit-pr` is the only skill that fixes CI** — other skills report failures and stop
|
|
109
|
+
|
|
110
|
+
## State Machine
|
|
111
|
+
|
|
112
|
+
```
|
|
113
|
+
┌─────────────────┐
|
|
114
|
+
│ validate-branch │──FAIL──→ STOP + report
|
|
115
|
+
└────────┬────────┘
|
|
116
|
+
│ PASS
|
|
117
|
+
┌────────▼────────┐
|
|
118
|
+
│ submit-branch │──FAIL──→ STOP + report
|
|
119
|
+
└────────┬────────┘
|
|
120
|
+
│ PR ready
|
|
121
|
+
┌────────▼────────┐
|
|
122
|
+
│ babysit-pr │──EXHAUSTED──→ STOP + "CI blocked"
|
|
123
|
+
└────────┬────────┘
|
|
124
|
+
│ GREEN
|
|
125
|
+
┌────────▼────────┐
|
|
126
|
+
│ land-pr │──BLOCKED──→ STOP + report
|
|
127
|
+
└────────┬────────┘
|
|
128
|
+
│ MERGED
|
|
129
|
+
┌────────▼────────┐
|
|
130
|
+
│ land-pr (verify) │──PUBLISH FAIL──→ ALERT + STOP
|
|
131
|
+
└────────┬────────┘
|
|
132
|
+
│ PUBLISHED
|
|
133
|
+
✓ done
|
|
134
|
+
```
|