@zenuml/core 3.47.1 → 3.47.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/.agents/skills/babysit-pr/SKILL.md +223 -0
- package/.agents/skills/babysit-pr/agents/openai.yaml +7 -0
- package/.agents/skills/dia-scoring/SKILL.md +139 -0
- package/.agents/skills/dia-scoring/agents/openai.yaml +7 -0
- package/.agents/skills/dia-scoring/references/selectors-and-keys.md +253 -0
- package/.agents/skills/land-pr/SKILL.md +120 -0
- package/.agents/skills/propagate-core-release/SKILL.md +205 -0
- package/.agents/skills/propagate-core-release/agents/openai.yaml +7 -0
- package/.agents/skills/propagate-core-release/references/downstreams.md +42 -0
- package/.agents/skills/ship-branch/SKILL.md +105 -0
- package/.agents/skills/submit-branch/SKILL.md +76 -0
- package/.agents/skills/validate-branch/SKILL.md +72 -0
- package/.claude/skills/emoji-eval/SKILL.md +187 -0
- package/.claude/skills/propagate-core-release/SKILL.md +81 -76
- package/.claude/skills/propagate-core-release/agents/openai.yaml +2 -2
- package/.claude/skills/zenuml-ux-research/SKILL.md +183 -0
- package/.claude/skills/zenuml-ux-research/references/assertion-catalog.md +261 -0
- package/.claude/skills/zenuml-ux-research/references/best-practices-overview.md +56 -0
- package/.claude/skills/zenuml-ux-research/references/report-template.md +89 -0
- package/.claude/skills/zenuml-ux-research/references/scenarios/edit-message-label.md +37 -0
- package/.claude/skills/zenuml-ux-research/references/scenarios/insert-message.md +36 -0
- package/.claude/skills/zenuml-ux-research/references/scenarios/insert-participant.md +31 -0
- package/.claude/skills/zenuml-ux-research/references/scenarios/rename-participant.md +33 -0
- package/.claude/skills/zenuml-ux-research/references/scenarios/undo-insert.md +35 -0
- package/AGENTS.md +1 -1
- package/dist/stats.html +1 -1
- package/dist/zenuml.esm.mjs +22732 -20169
- package/dist/zenuml.js +590 -543
- package/docs/superpowers/plans/2026-03-30-emoji-support.md +1220 -0
- package/docs/superpowers/plans/2026-03-30-self-correcting-scoring.md +206 -0
- package/docs/superpowers/plans/2026-04-15-keyboard-editing-on-diagram.md +1992 -0
- package/docs/superpowers/plans/2026-04-15-zenuml-ux-research-skill.md +1452 -0
- package/docs/ux-research/.gitkeep +0 -0
- package/docs/ux-research/2026-04-15-rename-participant.md +156 -0
- package/docs/ux-research/2026-04-18-insert-participant.md +151 -0
- package/e2e/data/compare-cases.js +233 -0
- package/e2e/fixtures/create-message.html +26 -0
- package/e2e/fixtures/editable-label.html +1 -0
- package/e2e/fixtures/empty-diagram.html +23 -0
- package/e2e/fixtures/insert-participant.html +23 -0
- package/e2e/fixtures/reorder-cross-fragment.html +31 -0
- package/e2e/fixtures/reorder-fragment.html +29 -0
- package/e2e/fixtures/reorder-message.html +27 -0
- package/e2e/fixtures/type-switch.html +29 -0
- package/e2e/tools/compare-case.html +16 -2
- package/index.html +44 -0
- package/package.json +3 -3
- package/playwright.config.ts +1 -1
- package/scripts/analyze-compare-case/collect-data.mjs +139 -16
- package/scripts/analyze-compare-case/config.mjs +1 -1
- package/scripts/analyze-compare-case/report.mjs +3 -0
- package/scripts/analyze-compare-case/residual-scopes.mjs +23 -1
- package/scripts/analyze-compare-case/scoring.mjs +1 -0
|
@@ -0,0 +1,261 @@
|
|
|
1
|
+
# ZenUML UX Assertion Catalog
|
|
2
|
+
|
|
3
|
+
Atomic, testable best-practice rules for diagramming-tool interactions. Each rule has a stable ID that may be cited in gap reports. The catalog is a **reference library and hypothesis primer**, not a checklist — the skill does NOT grind through all rules on every run.
|
|
4
|
+
|
|
5
|
+
## Catalog structure
|
|
6
|
+
|
|
7
|
+
Each rule has:
|
|
8
|
+
|
|
9
|
+
- **ID** — stable, citable (e.g., `KBD-03`). Category prefix + two-digit number. Never renumber.
|
|
10
|
+
- **Rule** — one sentence describing the expected behavior.
|
|
11
|
+
- **Exemplars** — 2–3 tools where the rule is observed.
|
|
12
|
+
- **Rationale** — why the rule matters.
|
|
13
|
+
- **Applies when** — precondition that must hold for the rule to be meaningful.
|
|
14
|
+
- **Check** — concrete, observable outcome the skill can verify (optional for subjective rules).
|
|
15
|
+
- **Severity** — `low`, `med`, `high`.
|
|
16
|
+
|
|
17
|
+
New rules are appended; IDs are never reused.
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## SEL — Selection model
|
|
22
|
+
|
|
23
|
+
### SEL-01
|
|
24
|
+
**Rule:** Clicking an item on the canvas selects it exclusively, deselecting anything else that was selected.
|
|
25
|
+
**Exemplars:** Figma, tldraw, draw.io.
|
|
26
|
+
**Rationale:** The standard single-select model users expect from any canvas editor; anything else forces the user to explicitly clear prior selection.
|
|
27
|
+
**Applies when:** The canvas has at least one selectable item and the user clicks it with a single unmodified click.
|
|
28
|
+
**Check:** Before click: zero or more items selected. After click: only the clicked item is selected.
|
|
29
|
+
**Severity:** high
|
|
30
|
+
|
|
31
|
+
### SEL-02
|
|
32
|
+
**Rule:** Clicking empty canvas area deselects all items.
|
|
33
|
+
**Exemplars:** Figma, tldraw, Excalidraw.
|
|
34
|
+
**Rationale:** Gives the user an always-available "get out of selection" gesture that does not require keyboard.
|
|
35
|
+
**Applies when:** At least one item is selected and the user clicks an area of the canvas with no item under the cursor.
|
|
36
|
+
**Check:** After click: zero items selected.
|
|
37
|
+
**Severity:** med
|
|
38
|
+
|
|
39
|
+
### SEL-03
|
|
40
|
+
**Rule:** Selected items have a visible, persistent selection indicator (outline, highlight, or handles).
|
|
41
|
+
**Exemplars:** Figma (blue outline), tldraw (dashed outline), draw.io (handles).
|
|
42
|
+
**Rationale:** Without visual feedback, selection state is invisible and any subsequent keyboard action feels random.
|
|
43
|
+
**Applies when:** One or more items are selected.
|
|
44
|
+
**Check:** The selected item's bounding box has a visually distinct marker compared to its non-selected state.
|
|
45
|
+
**Severity:** high
|
|
46
|
+
|
|
47
|
+
### SEL-04
|
|
48
|
+
**Rule:** Selection state is exposed to assistive technologies via `aria-selected` or equivalent.
|
|
49
|
+
**Exemplars:** VS Code editor, GitHub file tree.
|
|
50
|
+
**Rationale:** Screen-reader users need programmatic access to selection. Day 1 this rule is observational (the skill notes whether the attribute is present); it is not a hard fail.
|
|
51
|
+
**Applies when:** One or more items are selected.
|
|
52
|
+
**Check:** Inspect DOM for `aria-selected="true"` on the selected element or its representative.
|
|
53
|
+
**Severity:** low
|
|
54
|
+
|
|
55
|
+
---
|
|
56
|
+
|
|
57
|
+
## KBD — Keyboard interaction
|
|
58
|
+
|
|
59
|
+
### KBD-01
|
|
60
|
+
**Rule:** Tab moves focus INTO the diagram composite widget from the surrounding page; Shift+Tab moves focus OUT.
|
|
61
|
+
**Exemplars:** VS Code tree view, GitHub file tree, Figma.
|
|
62
|
+
**Rationale:** The diagram is one Tab stop from the page's perspective; arrow keys navigate inside. This is the ARIA composite-widget convention.
|
|
63
|
+
**Applies when:** Focus is on the element immediately before or after the diagram in tab order.
|
|
64
|
+
**Check:** Press Tab; focus lands on the diagram root. Press Tab again from inside; focus leaves the diagram.
|
|
65
|
+
**Severity:** high
|
|
66
|
+
|
|
67
|
+
### KBD-02
|
|
68
|
+
**Rule:** Arrow keys navigate between items inside the diagram composite widget when it has focus.
|
|
69
|
+
**Exemplars:** Figma (arrows move selection), tldraw, Excalidraw.
|
|
70
|
+
**Rationale:** Once inside the widget, the user needs a keyboard-only way to move the cursor/selection across items.
|
|
71
|
+
**Applies when:** Focus is inside the diagram and at least one item is selectable.
|
|
72
|
+
**Check:** Press an arrow key; focus or selection visibly moves to an adjacent item.
|
|
73
|
+
**Severity:** high
|
|
74
|
+
|
|
75
|
+
### KBD-03
|
|
76
|
+
**Rule:** Enter on a selected canvas item enters edit mode with the cursor at the end of the item's label.
|
|
77
|
+
**Exemplars:** Figma (text layers), Notion (table cells), tldraw (shapes), VS Code (F2 rename).
|
|
78
|
+
**Rationale:** Keyboard-first editing; no mouse round-trip after selection. The most-expected canvas-editor keybinding after Tab/Arrow.
|
|
79
|
+
**Applies when:** A single selectable item is selected and the diagram widget has focus.
|
|
80
|
+
**Check:** After selection, send Enter. Within 300ms the item's label should become an editable input, focused, with the caret at the end of the existing text.
|
|
81
|
+
**Severity:** high
|
|
82
|
+
|
|
83
|
+
### KBD-04
|
|
84
|
+
**Rule:** Escape while an item is in edit mode cancels the edit without committing changes.
|
|
85
|
+
**Exemplars:** Figma, Notion, tldraw, VS Code rename.
|
|
86
|
+
**Rationale:** Undoing an in-flight edit should never require actually committing then undoing. Escape is the universal cancel.
|
|
87
|
+
**Applies when:** An item is currently in edit mode and the input has unsaved changes.
|
|
88
|
+
**Check:** Enter edit mode, modify text, press Escape. Label reverts to pre-edit value; item exits edit mode.
|
|
89
|
+
**Severity:** high
|
|
90
|
+
|
|
91
|
+
### KBD-05
|
|
92
|
+
**Rule:** Escape on a selected (but not editing) item either deselects or exits the widget; it should not silently do nothing.
|
|
93
|
+
**Exemplars:** Figma, tldraw.
|
|
94
|
+
**Rationale:** Escape is the "get me out" key. Silent no-op leaves the user uncertain about what's selected.
|
|
95
|
+
**Applies when:** Focus is inside the diagram and exactly one item is selected (not in edit mode).
|
|
96
|
+
**Check:** Press Escape. Selection clears OR focus leaves the diagram widget.
|
|
97
|
+
**Severity:** med
|
|
98
|
+
|
|
99
|
+
### KBD-06
|
|
100
|
+
**Rule:** Tab inside edit mode commits the current edit and spawns a new sibling in edit mode (Miro pattern).
|
|
101
|
+
**Exemplars:** Miro sticky notes, Notion database rows, Linear issue creation.
|
|
102
|
+
**Rationale:** Speed-of-flow creation for power users. Not universally expected but is the gold standard when present.
|
|
103
|
+
**Applies when:** An item is in edit mode.
|
|
104
|
+
**Check:** Type label, press Tab. Edit commits; a new sibling of the same type appears next in order, already in edit mode with focus.
|
|
105
|
+
**Severity:** med
|
|
106
|
+
|
|
107
|
+
---
|
|
108
|
+
|
|
109
|
+
## EDT — Inline editing
|
|
110
|
+
|
|
111
|
+
### EDT-01
|
|
112
|
+
**Rule:** Entering edit mode replaces the label rendering with a focused, editable input in the same visual position.
|
|
113
|
+
**Exemplars:** Figma, Notion, tldraw.
|
|
114
|
+
**Rationale:** Prevents layout shift and makes the edit feel like direct manipulation rather than a modal.
|
|
115
|
+
**Applies when:** An item is entering edit mode by any means (Enter, double-click, toolbar).
|
|
116
|
+
**Check:** The input element is visible at the label's prior position; no modal or popover opens; the input has focus.
|
|
117
|
+
**Severity:** high
|
|
118
|
+
|
|
119
|
+
### EDT-02
|
|
120
|
+
**Rule:** On edit mode entry via Enter, the caret is placed at the end of the existing text with no pre-selection.
|
|
121
|
+
**Exemplars:** Notion cell edit, Linear issue title edit.
|
|
122
|
+
**Rationale:** Appending to an existing label (the common case) should not require arrow-right; deleting the whole label should be an explicit second step.
|
|
123
|
+
**Applies when:** Edit mode was entered via Enter on a selected item with an existing, non-empty label.
|
|
124
|
+
**Check:** After entering edit mode, caret is at end-of-text; no characters are pre-selected.
|
|
125
|
+
**Severity:** med
|
|
126
|
+
|
|
127
|
+
### EDT-03
|
|
128
|
+
**Rule:** Edit mode entered on a newly inserted item places an empty input with focus, ready to accept typing.
|
|
129
|
+
**Exemplars:** Miro sticky notes, Notion new row, tldraw new shape.
|
|
130
|
+
**Rationale:** New items should not require a second click to start typing.
|
|
131
|
+
**Applies when:** A new item was just inserted and is expected to be named.
|
|
132
|
+
**Check:** Immediately after insertion, the item is in edit mode with an empty input and keyboard focus.
|
|
133
|
+
**Severity:** high
|
|
134
|
+
|
|
135
|
+
### EDT-04
|
|
136
|
+
**Rule:** Committing an edit (Enter or blur) persists the change; cancelling (Escape) discards without side-effects.
|
|
137
|
+
**Exemplars:** Figma, Notion, VS Code rename.
|
|
138
|
+
**Rationale:** The commit/cancel contract is the most-trusted UX primitive in inline editing; violating it silently loses user work.
|
|
139
|
+
**Applies when:** An item is in edit mode.
|
|
140
|
+
**Check:** Make an edit. Press Enter → change persists in the DSL and on the canvas. Separately, make an edit and press Escape → change is fully discarded.
|
|
141
|
+
**Severity:** high
|
|
142
|
+
|
|
143
|
+
---
|
|
144
|
+
|
|
145
|
+
## FOC — Focus management
|
|
146
|
+
|
|
147
|
+
### FOC-01
|
|
148
|
+
**Rule:** After inserting a new item via keyboard, focus lands on the new item in edit mode.
|
|
149
|
+
**Exemplars:** Miro stickies, tldraw new shapes, Excalidraw text boxes.
|
|
150
|
+
**Rationale:** The user's next likely action on a new item is to name it. Requiring a separate selection step is friction.
|
|
151
|
+
**Applies when:** An insertion was triggered via keyboard (shortcut, Tab-to-sibling, Enter on a "plus" affordance).
|
|
152
|
+
**Check:** Immediately after insertion, the new item is selected AND in edit mode AND has keyboard focus.
|
|
153
|
+
**Severity:** high
|
|
154
|
+
|
|
155
|
+
### FOC-02
|
|
156
|
+
**Rule:** After deleting an item, focus moves to a predictable sibling (previous if any, else next, else parent).
|
|
157
|
+
**Exemplars:** VS Code file explorer, Linear list delete, Notion row delete.
|
|
158
|
+
**Rationale:** Focus-left-hanging after delete is one of the top accessibility complaints in web apps; any sibling is better than the document root.
|
|
159
|
+
**Applies when:** An item is deleted while the diagram widget has focus.
|
|
160
|
+
**Check:** After delete, a sibling or parent element has focus (not `document.body`, not `:focus-visible` on nothing).
|
|
161
|
+
**Severity:** med
|
|
162
|
+
|
|
163
|
+
### FOC-03
|
|
164
|
+
**Rule:** Undo restores selection and focus to the pre-operation state, not just the data.
|
|
165
|
+
**Exemplars:** Figma undo, Linear undo.
|
|
166
|
+
**Rationale:** The point of undo is to undo what the user *experienced*, which includes selection and focus. Undoing data without selection is disorienting.
|
|
167
|
+
**Applies when:** Undo was triggered after an operation that changed selection or focus.
|
|
168
|
+
**Check:** Before operation: selection = X. After operation: selection = Y. After undo: selection = X.
|
|
169
|
+
**Severity:** med
|
|
170
|
+
|
|
171
|
+
### FOC-04
|
|
172
|
+
**Rule:** Focus indicator is always visible when keyboard-focused; `:focus-visible` suppression is not applied to the entire widget.
|
|
173
|
+
**Exemplars:** any WAI-ARIA-compliant widget.
|
|
174
|
+
**Rationale:** A keyboard user should always know where focus is.
|
|
175
|
+
**Applies when:** A focusable element inside the diagram is focused via keyboard navigation.
|
|
176
|
+
**Check:** Inspect the focused element; it has a visible focus outline or equivalent.
|
|
177
|
+
**Severity:** med
|
|
178
|
+
|
|
179
|
+
---
|
|
180
|
+
|
|
181
|
+
## INS — Insertion affordances
|
|
182
|
+
|
|
183
|
+
### INS-01
|
|
184
|
+
**Rule:** A new item can be inserted without opening or touching the DSL editor pane directly.
|
|
185
|
+
**Exemplars:** Mermaid Live (no, this is a known weakness; cited as a negative exemplar), tldraw (yes), Figma (yes).
|
|
186
|
+
**Rationale:** For a tool that is text-first but growing canvas editing, the canvas should be a primary creation surface. Falling back to the DSL is acceptable; being forced into it is a gap.
|
|
187
|
+
**Applies when:** A scenario's target state requires inserting a new participant, message, note, or other item.
|
|
188
|
+
**Check:** The skill must find at least one insertion path that does not require editing the DSL editor text area.
|
|
189
|
+
**Severity:** high
|
|
190
|
+
|
|
191
|
+
### INS-02
|
|
192
|
+
**Rule:** The primary insertion affordance is discoverable by a new user within ~10 seconds of looking at the canvas.
|
|
193
|
+
**Exemplars:** tldraw (visible toolbar), Figma (visible plus button).
|
|
194
|
+
**Rationale:** Discoverability is the gateway to every other interaction; hidden affordances turn new users away.
|
|
195
|
+
**Applies when:** A scenario involves inserting something.
|
|
196
|
+
**Check:** Subjective; the skill records whether the insertion affordance was obvious on first look and, if not, how long it took to find.
|
|
197
|
+
**Severity:** med
|
|
198
|
+
|
|
199
|
+
### INS-03
|
|
200
|
+
**Rule:** Insertion has at least one keyboard-only path.
|
|
201
|
+
**Exemplars:** Miro (Tab-to-sibling), Linear (Cmd+Enter on issues).
|
|
202
|
+
**Rationale:** Text-first tool users are keyboard-native; a mouse-only insertion affordance loses them.
|
|
203
|
+
**Applies when:** A scenario involves inserting something.
|
|
204
|
+
**Check:** The skill must find at least one path from "blank state" to "new item present" that uses only the keyboard.
|
|
205
|
+
**Severity:** high
|
|
206
|
+
|
|
207
|
+
---
|
|
208
|
+
|
|
209
|
+
## UND — Undo / redo
|
|
210
|
+
|
|
211
|
+
### UND-01
|
|
212
|
+
**Rule:** Ctrl/Cmd+Z undoes the last logical operation.
|
|
213
|
+
**Exemplars:** every text editor, every canvas editor.
|
|
214
|
+
**Rationale:** The universal baseline.
|
|
215
|
+
**Applies when:** At least one undoable operation has occurred.
|
|
216
|
+
**Check:** Perform operation X. Press Ctrl/Cmd+Z. State reverts to pre-X.
|
|
217
|
+
**Severity:** high
|
|
218
|
+
|
|
219
|
+
### UND-02
|
|
220
|
+
**Rule:** Undo/redo granularity matches a logical user action, not individual keystrokes during a label edit.
|
|
221
|
+
**Exemplars:** Figma undo, Notion undo, Linear undo.
|
|
222
|
+
**Rationale:** One undo should undo one perceived action. Undoing character-by-character turns Ctrl+Z into an "erase this text" macro, which is worse than useless.
|
|
223
|
+
**Applies when:** A label was edited and then undo was pressed.
|
|
224
|
+
**Check:** Edit a label from `A` to `Alice`. Press Ctrl/Cmd+Z once. The label returns to `A`, not `Alic`.
|
|
225
|
+
**Severity:** high
|
|
226
|
+
|
|
227
|
+
### UND-03
|
|
228
|
+
**Rule:** Undo restores the selection to the item that was operated on, not an arbitrary state.
|
|
229
|
+
**Exemplars:** Figma, Linear.
|
|
230
|
+
**Rationale:** Undo should put the user back where they can immediately re-try or explore, which requires selection to match.
|
|
231
|
+
**Applies when:** An operation that affected selection is being undone.
|
|
232
|
+
**Check:** Before: select X, modify X. After undo: X is selected again.
|
|
233
|
+
**Severity:** med
|
|
234
|
+
|
|
235
|
+
---
|
|
236
|
+
|
|
237
|
+
## FBK — Visual feedback
|
|
238
|
+
|
|
239
|
+
### FBK-01
|
|
240
|
+
**Rule:** Hover states are visible on interactive elements.
|
|
241
|
+
**Exemplars:** every canvas editor.
|
|
242
|
+
**Rationale:** Hover is the pre-interaction affordance; its absence forces trial-and-error clicks.
|
|
243
|
+
**Applies when:** A clickable or draggable element exists on the canvas.
|
|
244
|
+
**Check:** Hover over the element; visual state changes (cursor, outline, tint).
|
|
245
|
+
**Severity:** low
|
|
246
|
+
|
|
247
|
+
### FBK-02
|
|
248
|
+
**Rule:** Invalid actions show immediate non-blocking feedback rather than silently failing.
|
|
249
|
+
**Exemplars:** Figma toast, Linear inline errors.
|
|
250
|
+
**Rationale:** Silent failure trains users to distrust the tool; even a toast is better than nothing.
|
|
251
|
+
**Applies when:** The user attempts an operation that is not currently valid (e.g., delete with nothing selected).
|
|
252
|
+
**Check:** Trigger an invalid operation. Observe any feedback within 500ms.
|
|
253
|
+
**Severity:** med
|
|
254
|
+
|
|
255
|
+
### FBK-03
|
|
256
|
+
**Rule:** Drop targets or alignment guides are shown during drag operations where applicable.
|
|
257
|
+
**Exemplars:** Figma smart guides, tldraw snap lines.
|
|
258
|
+
**Rationale:** Without guides, drag feels imprecise.
|
|
259
|
+
**Applies when:** The scenario involves a drag operation.
|
|
260
|
+
**Check:** During an active drag, alignment guides or drop indicators appear before release.
|
|
261
|
+
**Severity:** low
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# Diagramming Tool UX — Best-Practice Overview
|
|
2
|
+
|
|
3
|
+
This document frames the interaction-design context the ZenUML UX research skill reasons about. It is **not** a checklist. Atomic, testable rules live in `assertion-catalog.md`. This file provides the *why* behind the rules.
|
|
4
|
+
|
|
5
|
+
## Two tool families
|
|
6
|
+
|
|
7
|
+
Diagramming tools split along a single axis: **what is the primary input method for the user who is actively creating diagram content?**
|
|
8
|
+
|
|
9
|
+
### Text-first (DSL-driven)
|
|
10
|
+
|
|
11
|
+
The user types structured text; the rendered diagram is a side-effect.
|
|
12
|
+
|
|
13
|
+
Examples: **Mermaid Live**, **PlantUML editors**, **D2 Playground**, **ZenUML**.
|
|
14
|
+
|
|
15
|
+
Typical strengths:
|
|
16
|
+
- Keyboard-first by construction.
|
|
17
|
+
- Versionable, diffable, pasteable content.
|
|
18
|
+
- Fast iteration for users who know the DSL.
|
|
19
|
+
|
|
20
|
+
Typical weaknesses:
|
|
21
|
+
- Discoverability for new users is poor ("what's the syntax for a loop?").
|
|
22
|
+
- Visual affordances (clicking a participant to rename it, dragging to reorder) are bolted on, not native.
|
|
23
|
+
- Round-trip between "I see a shape on the canvas" and "I edit the text that produced it" is often clunky.
|
|
24
|
+
|
|
25
|
+
### Drag-first (graphical, canvas-driven)
|
|
26
|
+
|
|
27
|
+
The user drags shapes; a model is built behind the scenes.
|
|
28
|
+
|
|
29
|
+
Examples: **Lucidchart**, **draw.io (diagrams.net)**, **Figma**, **Miro**, **tldraw**, **Excalidraw**.
|
|
30
|
+
|
|
31
|
+
Typical strengths:
|
|
32
|
+
- New-user discoverability is very high.
|
|
33
|
+
- Inline editing on the canvas is the default path.
|
|
34
|
+
- Rich direct-manipulation gestures (drag, marquee, snap).
|
|
35
|
+
|
|
36
|
+
Typical weaknesses:
|
|
37
|
+
- Power-user keyboard flows are often worse than text-first tools.
|
|
38
|
+
- Hard to version or diff the output.
|
|
39
|
+
- Harder to reuse content across diagrams.
|
|
40
|
+
|
|
41
|
+
### Hybrids
|
|
42
|
+
|
|
43
|
+
Some tools occupy the middle and are the most instructive comparisons for ZenUML, which is fundamentally text-first but is growing canvas affordances:
|
|
44
|
+
|
|
45
|
+
- **Mermaid Live** — text-first with live preview and basic canvas interactions (click-to-select in generated SVG, no canvas editing).
|
|
46
|
+
- **tldraw** / **Excalidraw** — drag-first, but with aggressive keyboard shortcuts and inline editing patterns that text-first tools can borrow.
|
|
47
|
+
- **Notion databases / Airtable** — not diagramming, but their inline edit + Tab-to-sibling patterns are the gold standard for keyboard-first editing in any grid/canvas context.
|
|
48
|
+
- **Miro sticky note flows** — the current "speed of thought" standard for inserting, renaming, and connecting items without touching a mouse.
|
|
49
|
+
|
|
50
|
+
## Why this matters for ZenUML
|
|
51
|
+
|
|
52
|
+
ZenUML is text-first but is moving toward canvas-embedded editing. That means every scenario this skill audits has at least two valid interaction paths — DSL and canvas — and the user experience should be coherent across both. The assertion catalog is structured so that each rule is testable in either path; the walkthrough tries the most discoverable new-user path first and notes alternative paths second.
|
|
53
|
+
|
|
54
|
+
## How this overview is used by the skill
|
|
55
|
+
|
|
56
|
+
During Phase B (hypothesis formation), the skill reads this overview to calibrate expectations: for a text-first tool, "you can always fall back to the DSL editor" is a valid mitigation; "this requires a mouse" is a valid finding worth recording, because ZenUML's history of DSL-first users means keyboard-only paths matter disproportionately.
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
---
|
|
2
|
+
scenario_id: {{scenario_id}}
|
|
3
|
+
scenario_title: {{scenario_title}}
|
|
4
|
+
run_date: {{run_date}}
|
|
5
|
+
zenuml_core_sha: {{zenuml_core_sha}}
|
|
6
|
+
audited_url: {{audited_url}}
|
|
7
|
+
skill_version: 0.1.0
|
|
8
|
+
gap_count: { high: {{gap_count_high}}, med: {{gap_count_med}}, low: {{gap_count_low}} }
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# UX Research — {{scenario_title}}
|
|
12
|
+
|
|
13
|
+
## Executive summary
|
|
14
|
+
|
|
15
|
+
{{executive_summary}}
|
|
16
|
+
|
|
17
|
+
## Scenario recap
|
|
18
|
+
|
|
19
|
+
**User intent:** {{user_intent}}
|
|
20
|
+
|
|
21
|
+
**Starting DSL:**
|
|
22
|
+
```
|
|
23
|
+
{{starting_dsl}}
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
**Target DSL:**
|
|
27
|
+
```
|
|
28
|
+
{{target_dsl}}
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## Observed walkthrough
|
|
32
|
+
|
|
33
|
+
{{walkthrough_numbered_steps}}
|
|
34
|
+
|
|
35
|
+
## Gaps
|
|
36
|
+
|
|
37
|
+
{{gap_blocks}}
|
|
38
|
+
|
|
39
|
+
> Each gap block uses this structure:
|
|
40
|
+
>
|
|
41
|
+
> ```
|
|
42
|
+
> ### Gap N — <short headline>
|
|
43
|
+
> **Severity:** <low|med|high>
|
|
44
|
+
> **Catalog ID:** <id or "novel — candidate for new rule">
|
|
45
|
+
> **Observed:** <verbatim>
|
|
46
|
+
> **Expected:** <from hypothesis>
|
|
47
|
+
> **Exemplars:** <tools where expected behavior is seen>
|
|
48
|
+
> **Rationale:** <why this matters>
|
|
49
|
+
> **Suggested fix:** <grep result: file:line; or "no code path found">
|
|
50
|
+
> ```
|
|
51
|
+
>
|
|
52
|
+
> (Blockquote is for documentation inside the template — the rendered report omits it.)
|
|
53
|
+
|
|
54
|
+
## Coverage
|
|
55
|
+
|
|
56
|
+
Tested hypotheses (no gap found):
|
|
57
|
+
{{coverage_tested}}
|
|
58
|
+
|
|
59
|
+
Not tested (out of scope for this scenario):
|
|
60
|
+
{{coverage_out_of_scope}}
|
|
61
|
+
|
|
62
|
+
Skipped (couldn't form a testable hypothesis):
|
|
63
|
+
{{coverage_skipped}}
|
|
64
|
+
|
|
65
|
+
## Best-practice sources
|
|
66
|
+
|
|
67
|
+
**Bundled catalog IDs referenced:**
|
|
68
|
+
{{bundled_sources}}
|
|
69
|
+
|
|
70
|
+
**Web sources fetched during this run:**
|
|
71
|
+
{{web_sources}}
|
|
72
|
+
|
|
73
|
+
## Playwright regression snippet
|
|
74
|
+
|
|
75
|
+
Paste into `zenuml-core/tests/ux/{{scenario_id}}.spec.ts` once the gap is fixed. The skill emits this snippet; it does not run it.
|
|
76
|
+
|
|
77
|
+
```typescript
|
|
78
|
+
{{playwright_snippet}}
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
---
|
|
82
|
+
|
|
83
|
+
## Zero-gap rendering
|
|
84
|
+
|
|
85
|
+
If the scenario produced zero gaps, render the report omitting the **Gaps** and **Playwright regression snippet** sections. The **Observed walkthrough** section becomes a single line:
|
|
86
|
+
|
|
87
|
+
> No gaps observed on zenuml-core @ {{zenuml_core_sha}}.
|
|
88
|
+
|
|
89
|
+
All other sections (metadata, executive summary, scenario recap, coverage, best-practice sources) still render.
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: edit-message-label
|
|
3
|
+
title: Edit an existing message label
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
## User intent
|
|
7
|
+
The user has a message `A->B: hello` on the canvas and wants to change the label to `hi`.
|
|
8
|
+
|
|
9
|
+
## Starting DSL
|
|
10
|
+
```
|
|
11
|
+
A
|
|
12
|
+
B
|
|
13
|
+
A->B: hello
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## Target DSL
|
|
17
|
+
```
|
|
18
|
+
A
|
|
19
|
+
B
|
|
20
|
+
A->B: hi
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Relevant assertion categories
|
|
24
|
+
EDT, KBD, SEL, FOC, UND
|
|
25
|
+
|
|
26
|
+
## Walkthrough hints (not prescriptive)
|
|
27
|
+
- This scenario exercises the inline-edit contract on an existing piece of DSL, not a new one.
|
|
28
|
+
- Candidate paths to try in order:
|
|
29
|
+
1. Click the message label `hello` once to select, press Enter, retype.
|
|
30
|
+
2. Double-click the message label.
|
|
31
|
+
3. Keyboard: navigate to the message via arrows, press Enter.
|
|
32
|
+
4. Fall back to editing the DSL editor directly.
|
|
33
|
+
- Watch specifically for: undo granularity when the user types `hi` then changes their mind (one undo should revert the whole label, not one character at a time).
|
|
34
|
+
|
|
35
|
+
## Known issues to watch for (optional)
|
|
36
|
+
- If undo is character-level during a label edit, that is a UND-02 violation.
|
|
37
|
+
- If clicking the message selects the wrong thing (e.g., the arrow instead of the label), that is a SEL-01 violation.
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: insert-message
|
|
3
|
+
title: Insert a synchronous message between two participants
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
## User intent
|
|
7
|
+
The user has two participants `A` and `B` on the canvas and wants to add a synchronous message from `A` to `B` with the label `hello`.
|
|
8
|
+
|
|
9
|
+
## Starting DSL
|
|
10
|
+
```
|
|
11
|
+
A
|
|
12
|
+
B
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Target DSL
|
|
16
|
+
```
|
|
17
|
+
A
|
|
18
|
+
B
|
|
19
|
+
A->B: hello
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## Relevant assertion categories
|
|
23
|
+
INS, KBD, EDT, FOC, FBK
|
|
24
|
+
|
|
25
|
+
## Walkthrough hints (not prescriptive)
|
|
26
|
+
- This is the most common creation action in any sequence diagramming tool; it is the load-bearing scenario for canvas-first editing of ZenUML.
|
|
27
|
+
- Candidate paths to try in order:
|
|
28
|
+
1. Click `A`, look for a "send message" affordance or toolbar button, draw/click toward `B`.
|
|
29
|
+
2. Hover between `A` and `B` in the lifeline area for an inline "+" affordance.
|
|
30
|
+
3. Keyboard: Tab into widget, select `A`, press a hotkey for "new message".
|
|
31
|
+
4. Fall back to typing `A->B: hello` into the DSL editor.
|
|
32
|
+
- Watch specifically for: whether a canvas-first path exists at all, whether message creation automatically enters label edit mode on the new message, whether Escape during message creation cancels cleanly.
|
|
33
|
+
|
|
34
|
+
## Known issues to watch for (optional)
|
|
35
|
+
- If the canvas has no message-creation affordance at all, that is an INS-01 violation at high severity.
|
|
36
|
+
- If the new message is not in edit mode immediately on creation, that is an EDT-03 / FOC-01 violation.
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: insert-participant
|
|
3
|
+
title: Insert a participant on a blank diagram
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
## User intent
|
|
7
|
+
The user opens ZenUML to a blank diagram and wants to add one participant named `Alice` so they can start modelling.
|
|
8
|
+
|
|
9
|
+
## Starting DSL
|
|
10
|
+
```
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Target DSL
|
|
14
|
+
```
|
|
15
|
+
Alice
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Relevant assertion categories
|
|
19
|
+
INS, FOC, EDT, KBD
|
|
20
|
+
|
|
21
|
+
## Walkthrough hints (not prescriptive)
|
|
22
|
+
- Blank canvas is the highest-stakes discoverability test — the skill should record how long it takes to find the insertion affordance.
|
|
23
|
+
- Candidate insertion paths to try in order:
|
|
24
|
+
1. Click on the canvas background.
|
|
25
|
+
2. Look for a visible "+" or "Add participant" affordance.
|
|
26
|
+
3. Keyboard: try pressing Enter or `p` on an empty canvas.
|
|
27
|
+
4. Fall back to typing directly into the DSL editor pane.
|
|
28
|
+
- The moment the user successfully names the new participant `Alice` is the scenario's end state.
|
|
29
|
+
|
|
30
|
+
## Known issues to watch for (optional)
|
|
31
|
+
- If the only path is direct DSL editing, that itself is a finding (violates INS-01).
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: rename-participant
|
|
3
|
+
title: Rename a participant via keyboard
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
## User intent
|
|
7
|
+
The user has a participant `A` on the canvas and wants to rename it to `Alice` without leaving the keyboard.
|
|
8
|
+
|
|
9
|
+
## Starting DSL
|
|
10
|
+
```
|
|
11
|
+
A
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## Target DSL
|
|
15
|
+
```
|
|
16
|
+
Alice
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Relevant assertion categories
|
|
20
|
+
KBD, EDT, SEL, FOC
|
|
21
|
+
|
|
22
|
+
## Walkthrough hints (not prescriptive)
|
|
23
|
+
- This scenario is the canonical test of KBD-03 (Enter enters edit mode) and EDT-02 (caret at end of text).
|
|
24
|
+
- Candidate paths to try in order:
|
|
25
|
+
1. Tab into the diagram widget, arrow-key to select `A`, press Enter, type `lice`, press Enter.
|
|
26
|
+
2. Click `A` to select, press Enter, retype.
|
|
27
|
+
3. Double-click `A` to enter edit mode.
|
|
28
|
+
4. Fall back to editing the DSL editor directly.
|
|
29
|
+
- Watch specifically for: whether Enter does anything on the selected participant; whether the caret is placed at the end or the whole label is pre-selected; whether Escape cancels cleanly.
|
|
30
|
+
|
|
31
|
+
## Known issues to watch for (optional)
|
|
32
|
+
- If Enter does nothing on a selected participant, that is a KBD-03 violation at high severity.
|
|
33
|
+
- If only mouse double-click works, that is a KBD-only violation (no mouse-free path).
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: undo-insert
|
|
3
|
+
title: Undo a just-inserted message
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
## User intent
|
|
7
|
+
The user has two participants `A` and `B`, inserts a message `A->B: hello`, then immediately presses Ctrl/Cmd+Z to undo. The expected result is that the message is removed and the state is back to just the two participants.
|
|
8
|
+
|
|
9
|
+
## Starting DSL
|
|
10
|
+
```
|
|
11
|
+
A
|
|
12
|
+
B
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Target DSL
|
|
16
|
+
```
|
|
17
|
+
A
|
|
18
|
+
B
|
|
19
|
+
```
|
|
20
|
+
(after: insert `A->B: hello`, then undo)
|
|
21
|
+
|
|
22
|
+
## Relevant assertion categories
|
|
23
|
+
UND, FOC, SEL, KBD
|
|
24
|
+
|
|
25
|
+
## Walkthrough hints (not prescriptive)
|
|
26
|
+
- This scenario exercises the full insertion-then-undo round trip.
|
|
27
|
+
- Steps:
|
|
28
|
+
1. Follow the `insert-message` scenario's walkthrough to get to the post-insert state.
|
|
29
|
+
2. Press Ctrl+Z (or Cmd+Z on macOS).
|
|
30
|
+
3. Observe: is the message removed? Is the DSL editor reverted? Is selection/focus restored to whatever it was before the insert?
|
|
31
|
+
- Watch specifically for: undo granularity (one Ctrl+Z should undo the whole insert, not the individual keystrokes of the label edit) and focus restoration (FOC-03).
|
|
32
|
+
|
|
33
|
+
## Known issues to watch for (optional)
|
|
34
|
+
- If the undo leaves the label partially typed, UND-02 is violated.
|
|
35
|
+
- If focus ends up on the document body after undo, FOC-03 is violated.
|
package/AGENTS.md
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
## Build, Test, and Development Commands
|
|
7
7
|
- `bun install` – install dependencies (Bun 1.x, Node ≥20).
|
|
8
|
-
- `bun run dev` – Vite dev server on `http://localhost:
|
|
8
|
+
- `bun run dev` – Vite dev server on `http://localhost:4000`.
|
|
9
9
|
- `bun run build` – library bundle via `vite.config.lib.ts`.
|
|
10
10
|
- `bun run build:site` / `bun run build:gh-pages` – demo/docs build (standard vs GitHub Pages).
|
|
11
11
|
- `bun run test` – Bun unit tests covering `src` and `test/unit`.
|