sequant 2.7.0 → 2.8.0

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 (59) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/.claude-plugin/plugin.json +1 -1
  3. package/README.md +9 -1
  4. package/dist/bin/cli.d.ts +1 -1
  5. package/dist/bin/cli.js +10 -1
  6. package/dist/bin/preflight.d.ts +21 -0
  7. package/dist/bin/preflight.js +45 -0
  8. package/dist/marketplace/external_plugins/sequant/.claude-plugin/plugin.json +1 -1
  9. package/dist/marketplace/external_plugins/sequant/skills/_shared/references/force-push.md +34 -0
  10. package/dist/marketplace/external_plugins/sequant/skills/assess/SKILL.md +24 -7
  11. package/dist/marketplace/external_plugins/sequant/skills/exec/SKILL.md +29 -0
  12. package/dist/marketplace/external_plugins/sequant/skills/loop/SKILL.md +100 -2
  13. package/dist/marketplace/external_plugins/sequant/skills/qa/SKILL.md +24 -0
  14. package/dist/marketplace/external_plugins/sequant/skills/qa/references/anti-pattern-detection.md +285 -0
  15. package/dist/marketplace/external_plugins/sequant/skills/qa/references/call-site-review.md +202 -0
  16. package/dist/marketplace/external_plugins/sequant/skills/qa/references/quality-gates.md +287 -0
  17. package/dist/marketplace/external_plugins/sequant/skills/qa/references/test-quality-checklist.md +272 -0
  18. package/dist/marketplace/external_plugins/sequant/skills/qa/references/testing-requirements.md +40 -0
  19. package/dist/marketplace/external_plugins/sequant/skills/qa/scripts/quality-checks.sh +95 -11
  20. package/dist/marketplace/external_plugins/sequant/skills/references/shared/framework-gotchas.md +186 -0
  21. package/dist/marketplace/external_plugins/sequant/skills/release/SKILL.md +661 -0
  22. package/dist/marketplace/external_plugins/sequant/skills/test/references/browser-testing-patterns.md +423 -0
  23. package/dist/marketplace/external_plugins/sequant/skills/upstream/SKILL.md +419 -0
  24. package/dist/src/lib/errors.d.ts +85 -0
  25. package/dist/src/lib/errors.js +111 -0
  26. package/dist/src/lib/version-check.d.ts +19 -0
  27. package/dist/src/lib/version-check.js +44 -0
  28. package/dist/src/lib/workflow/batch-executor.js +61 -6
  29. package/dist/src/lib/workflow/drivers/agent-driver.d.ts +17 -0
  30. package/dist/src/lib/workflow/drivers/claude-code.d.ts +22 -0
  31. package/dist/src/lib/workflow/drivers/claude-code.js +111 -7
  32. package/dist/src/lib/workflow/log-writer.d.ts +1 -1
  33. package/dist/src/lib/workflow/phase-executor.d.ts +18 -0
  34. package/dist/src/lib/workflow/phase-executor.js +76 -14
  35. package/dist/src/lib/workflow/run-log-schema.d.ts +3 -0
  36. package/dist/src/lib/workflow/run-log-schema.js +7 -0
  37. package/dist/src/lib/workflow/state-manager.d.ts +1 -0
  38. package/dist/src/lib/workflow/state-manager.js +6 -0
  39. package/dist/src/lib/workflow/state-schema.d.ts +3 -0
  40. package/dist/src/lib/workflow/state-schema.js +7 -0
  41. package/dist/src/lib/workflow/types.d.ts +17 -0
  42. package/dist/src/ui/tui/theme.d.ts +18 -4
  43. package/dist/src/ui/tui/theme.js +18 -4
  44. package/package.json +4 -3
  45. package/templates/skills/_shared/references/force-push.md +34 -0
  46. package/templates/skills/assess/SKILL.md +24 -7
  47. package/templates/skills/exec/SKILL.md +29 -0
  48. package/templates/skills/loop/SKILL.md +100 -2
  49. package/templates/skills/qa/SKILL.md +24 -0
  50. package/templates/skills/qa/references/anti-pattern-detection.md +285 -0
  51. package/templates/skills/qa/references/call-site-review.md +202 -0
  52. package/templates/skills/qa/references/quality-gates.md +287 -0
  53. package/templates/skills/qa/references/test-quality-checklist.md +272 -0
  54. package/templates/skills/qa/references/testing-requirements.md +40 -0
  55. package/templates/skills/qa/scripts/quality-checks.sh +95 -11
  56. package/templates/skills/references/shared/framework-gotchas.md +186 -0
  57. package/templates/skills/release/SKILL.md +661 -0
  58. package/templates/skills/test/references/browser-testing-patterns.md +423 -0
  59. package/templates/skills/upstream/SKILL.md +419 -0
@@ -0,0 +1,423 @@
1
+ # Browser Testing Patterns
2
+
3
+ Common patterns for Chrome DevTools MCP browser automation.
4
+
5
+ ## Quick Reference
6
+
7
+ | Task | Pattern |
8
+ |------|---------|
9
+ | Find element UIDs | `take_snapshot()` |
10
+ | Visual documentation | `take_screenshot()` |
11
+ | Wait for content | `wait_for({text: "..."})` |
12
+ | Fill input field | `fill({uid: "...", value: "..."})` |
13
+ | Click element | `click({uid: "..."})` |
14
+ | Double-click | `click({uid: "...", dblClick: true})` |
15
+ | Keyboard input | `press_key({key: "Enter"})` |
16
+ | Handle dialog | `handle_dialog({action: "accept"})` |
17
+
18
+ ## Form Testing
19
+
20
+ Standard pattern for testing forms (login, search, data entry):
21
+
22
+ ```javascript
23
+ // Step 1: Navigate and identify form fields
24
+ navigate_page({url: "{{DEV_URL}}/login"})
25
+ take_snapshot() // Find UIDs for form elements
26
+
27
+ // Step 2: Fill form fields
28
+ fill({uid: "email-input", value: "test@example.com"})
29
+ fill({uid: "password-input", value: "secure123"})
30
+
31
+ // Step 3: Submit form
32
+ click({uid: "submit-button"})
33
+
34
+ // Step 4: Verify result
35
+ wait_for({text: "Welcome"}) // or error message
36
+ take_snapshot() // Confirm expected state
37
+ ```
38
+
39
+ **Variations:**
40
+
41
+ ```javascript
42
+ // Multi-step form
43
+ click({uid: "next-button"})
44
+ take_snapshot() // Get next step fields
45
+ fill({uid: "step2-field", value: "..."})
46
+
47
+ // Form with select/dropdown
48
+ click({uid: "category-select"})
49
+ take_snapshot() // See dropdown options
50
+ click({uid: "option-technology"})
51
+
52
+ // Form with checkboxes
53
+ click({uid: "terms-checkbox"})
54
+ click({uid: "newsletter-checkbox"})
55
+ ```
56
+
57
+ ## Modal Testing
58
+
59
+ Pattern for modal dialogs (confirmations, forms, alerts):
60
+
61
+ ```javascript
62
+ // Step 1: Open modal
63
+ click({uid: "open-modal-button"})
64
+
65
+ // Step 2: Verify modal appeared
66
+ take_snapshot() // Modal content should be in tree
67
+
68
+ // Step 3: Interact with modal content
69
+ fill({uid: "modal-input", value: "test data"})
70
+
71
+ // Step 4: Confirm or cancel
72
+ click({uid: "confirm-button"}) // or cancel-button
73
+
74
+ // Step 5: Verify modal closed
75
+ take_snapshot() // Modal should not be in tree
76
+ ```
77
+
78
+ **Nested modal handling:**
79
+
80
+ ```javascript
81
+ // First modal opens second modal
82
+ click({uid: "open-first-modal"})
83
+ take_snapshot()
84
+
85
+ click({uid: "open-nested-modal"})
86
+ take_snapshot() // Verify nested modal
87
+
88
+ click({uid: "nested-confirm"})
89
+ take_snapshot() // Back to first modal
90
+
91
+ click({uid: "first-confirm"})
92
+ take_snapshot() // All modals closed
93
+ ```
94
+
95
+ **Escape key to close:**
96
+
97
+ ```javascript
98
+ click({uid: "open-modal"})
99
+ take_snapshot() // Modal open
100
+
101
+ press_key({key: "Escape"})
102
+ take_snapshot() // Modal should close
103
+ ```
104
+
105
+ ## Grid/Table Testing
106
+
107
+ Pattern for data grids (AG Grid, TanStack Table, custom tables):
108
+
109
+ ```javascript
110
+ // Step 1: Navigate to grid view
111
+ navigate_page({url: "{{DEV_URL}}/admin/data"})
112
+ take_snapshot() // Identify cell UIDs
113
+
114
+ // Step 2: Enter edit mode
115
+ click({uid: "cell-row1-col2", dblClick: true})
116
+
117
+ // Step 3: Edit cell value
118
+ fill({uid: "cell-input", value: "new value"})
119
+
120
+ // Step 4: Confirm edit
121
+ press_key({key: "Enter"})
122
+
123
+ // Step 5: Verify change
124
+ take_snapshot() // Cell should show new value
125
+ ```
126
+
127
+ **Row selection:**
128
+
129
+ ```javascript
130
+ // Single row select
131
+ click({uid: "row-1"})
132
+ take_snapshot() // Verify selection styling
133
+
134
+ // Multi-row select (shift+click)
135
+ // Note: MCP may not support modifier keys, use checkboxes instead
136
+ click({uid: "row-1-checkbox"})
137
+ click({uid: "row-3-checkbox"})
138
+ ```
139
+
140
+ **Column sorting:**
141
+
142
+ ```javascript
143
+ click({uid: "header-name"})
144
+ take_snapshot() // Ascending order
145
+
146
+ click({uid: "header-name"})
147
+ take_snapshot() // Descending order
148
+ ```
149
+
150
+ **Pagination:**
151
+
152
+ ```javascript
153
+ click({uid: "page-2-button"})
154
+ wait_for({text: "Page 2"}) // or wait for different content
155
+ take_snapshot()
156
+ ```
157
+
158
+ ## Multi-Select Testing
159
+
160
+ Pattern for testing bulk selection and actions:
161
+
162
+ ```javascript
163
+ // Step 1: Get initial state
164
+ take_snapshot() // Note initial selection count
165
+
166
+ // Step 2: Select multiple items
167
+ click({uid: "item-1-checkbox"})
168
+ take_snapshot() // Verify "1 selected"
169
+
170
+ click({uid: "item-3-checkbox"})
171
+ take_snapshot() // Verify "2 selected"
172
+
173
+ click({uid: "item-5-checkbox"})
174
+ take_snapshot() // Verify "3 selected"
175
+
176
+ // Step 3: Perform bulk action
177
+ click({uid: "bulk-delete-button"})
178
+
179
+ // Step 4: Confirm action (if modal appears)
180
+ take_snapshot() // Verify confirmation modal
181
+ click({uid: "confirm-delete"})
182
+
183
+ // Step 5: Verify result
184
+ take_snapshot() // Items should be removed
185
+ ```
186
+
187
+ **Select all / deselect all:**
188
+
189
+ ```javascript
190
+ // Select all
191
+ click({uid: "select-all-checkbox"})
192
+ take_snapshot() // All items checked
193
+
194
+ // Deselect all
195
+ click({uid: "select-all-checkbox"})
196
+ take_snapshot() // All items unchecked
197
+ ```
198
+
199
+ ## Async Content
200
+
201
+ Pattern for content that loads asynchronously:
202
+
203
+ ```javascript
204
+ // Step 1: Trigger async load
205
+ click({uid: "load-data-button"})
206
+
207
+ // Step 2: Wait for loading indicator (optional)
208
+ wait_for({text: "Loading..."})
209
+
210
+ // Step 3: Wait for content to appear
211
+ wait_for({text: "Expected content"})
212
+
213
+ // Step 4: Verify final state
214
+ take_snapshot()
215
+ ```
216
+
217
+ **Search with debounce:**
218
+
219
+ ```javascript
220
+ fill({uid: "search-input", value: "query"})
221
+
222
+ // Wait for debounced search
223
+ wait_for({text: "Search results"})
224
+ take_snapshot()
225
+ ```
226
+
227
+ **Infinite scroll:**
228
+
229
+ ```javascript
230
+ // Scroll is not directly supported, use page down or click "load more"
231
+ click({uid: "load-more-button"})
232
+ wait_for({text: "Item 21"}) // Wait for new items
233
+ take_snapshot()
234
+ ```
235
+
236
+ **Polling data:**
237
+
238
+ ```javascript
239
+ // For auto-refreshing data, wait for updated content
240
+ wait_for({text: "Updated 5 seconds ago"})
241
+ take_snapshot()
242
+ ```
243
+
244
+ ## Screenshots vs Snapshots
245
+
246
+ | Feature | `take_snapshot()` | `take_screenshot()` |
247
+ |---------|-------------------|---------------------|
248
+ | Output | Text-based accessibility tree | Visual image |
249
+ | Speed | Faster | Slower |
250
+ | Element UIDs | Yes | No |
251
+ | Layout verification | No | Yes |
252
+ | Color/styling | No | Yes |
253
+ | Use before interactions | **Required** | Optional |
254
+ | Documentation/evidence | Limited | **Preferred** |
255
+
256
+ **When to use each:**
257
+
258
+ ```javascript
259
+ // Finding elements to interact with
260
+ take_snapshot() // REQUIRED - gives you UIDs
261
+
262
+ // Documenting visual state for test report
263
+ take_screenshot() // Shows actual appearance
264
+
265
+ // Verifying element exists/text present
266
+ take_snapshot() // Sufficient for text checks
267
+
268
+ // Verifying CSS, colors, layout
269
+ take_screenshot() // Required for visual checks
270
+
271
+ // Before/after comparison
272
+ take_snapshot() // For state comparison
273
+ take_screenshot() // For visual comparison
274
+ ```
275
+
276
+ **Combined usage:**
277
+
278
+ ```javascript
279
+ // Standard test flow
280
+ take_snapshot() // 1. Find elements
281
+ click({uid: "button"}) // 2. Interact
282
+ take_snapshot() // 3. Verify state change
283
+ take_screenshot() // 4. Document visual result
284
+ ```
285
+
286
+ ## Troubleshooting
287
+
288
+ ### Element Not Found
289
+
290
+ **Symptom:** Click/fill fails with "element not found"
291
+
292
+ **Solutions:**
293
+
294
+ ```javascript
295
+ // 1. Take a fresh snapshot to see current state
296
+ take_snapshot()
297
+
298
+ // 2. Element might be hidden/not rendered yet
299
+ wait_for({text: "expected text nearby"})
300
+ take_snapshot()
301
+
302
+ // 3. Check if element is in a modal/iframe
303
+ // Take snapshot with modal open
304
+ click({uid: "open-modal"})
305
+ take_snapshot() // Now modal elements visible
306
+
307
+ // 4. Element may have dynamic UID
308
+ // Look for patterns in the UID name
309
+ ```
310
+
311
+ ### Timeout Errors
312
+
313
+ **Symptom:** `wait_for` times out
314
+
315
+ **Solutions:**
316
+
317
+ ```javascript
318
+ // 1. Verify content actually loads
319
+ take_snapshot() // Check current state
320
+
321
+ // 2. Content might have different text
322
+ wait_for({text: "partial match"}) // Use substring
323
+
324
+ // 3. Content might be in different element
325
+ // Check if it's in an iframe or shadow DOM
326
+
327
+ // 4. Server might be slow
328
+ // Ensure dev server is running: lsof -ti:<PORT>
329
+ // (extract port from DEV_URL in config.json)
330
+ ```
331
+
332
+ ### Dialog Handling
333
+
334
+ **Symptom:** Unexpected browser dialog blocks execution
335
+
336
+ **Solutions:**
337
+
338
+ ```javascript
339
+ // Handle alert/confirm dialogs
340
+ handle_dialog({action: "accept"}) // Click OK
341
+ handle_dialog({action: "dismiss"}) // Click Cancel
342
+
343
+ // Handle before triggering action that shows dialog
344
+ // Some dialogs appear immediately after action
345
+ click({uid: "delete-button"})
346
+ handle_dialog({action: "accept"})
347
+ ```
348
+
349
+ ### Form Submission Issues
350
+
351
+ **Symptom:** Form doesn't submit or shows validation errors
352
+
353
+ **Solutions:**
354
+
355
+ ```javascript
356
+ // 1. Check for validation errors
357
+ take_snapshot() // Look for error messages
358
+
359
+ // 2. Ensure required fields are filled
360
+ fill({uid: "required-field", value: "value"})
361
+
362
+ // 3. Try alternative submit methods
363
+ click({uid: "submit-button"}) // Button click
364
+ // OR
365
+ press_key({key: "Enter"}) // Keyboard submit
366
+
367
+ // 4. Wait for form to be ready
368
+ wait_for({text: "Form loaded"})
369
+ take_snapshot()
370
+ ```
371
+
372
+ ### State Not Updating
373
+
374
+ **Symptom:** UI doesn't reflect expected changes
375
+
376
+ **Solutions:**
377
+
378
+ ```javascript
379
+ // 1. Wait for state to propagate
380
+ wait_for({text: "expected new text"})
381
+
382
+ // 2. Trigger a re-render
383
+ click({uid: "refresh-button"}) // If available
384
+
385
+ // 3. Navigate away and back
386
+ navigate_page({url: "other-page"})
387
+ navigate_page({url: "original-page"})
388
+ take_snapshot()
389
+
390
+ // 4. Check network tab for failed requests
391
+ // (Manual inspection may be needed)
392
+ ```
393
+
394
+ ### Multiple Elements with Same Text
395
+
396
+ **Symptom:** Clicking wrong element
397
+
398
+ **Solutions:**
399
+
400
+ ```javascript
401
+ // 1. Use more specific UID
402
+ // UIDs are unique - find the exact one from snapshot
403
+
404
+ // 2. Look at parent context in snapshot tree
405
+ // Elements are nested - find the right level
406
+
407
+ // 3. Take screenshot to visually identify
408
+ take_screenshot()
409
+ ```
410
+
411
+ ## Common MCP Functions Reference
412
+
413
+ | Function | Purpose | Example |
414
+ |----------|---------|---------|
415
+ | `navigate_page` | Go to URL | `{url: "http://..."}` |
416
+ | `take_snapshot` | Get accessibility tree | No params needed |
417
+ | `take_screenshot` | Capture visual image | No params needed |
418
+ | `click` | Click element | `{uid: "button-1"}` |
419
+ | `fill` | Enter text | `{uid: "input", value: "text"}` |
420
+ | `press_key` | Keyboard input | `{key: "Enter"}` or `{key: "Escape"}` |
421
+ | `wait_for` | Wait for content | `{text: "Loading..."}` |
422
+ | `handle_dialog` | Browser dialog | `{action: "accept"}` or `{action: "dismiss"}` |
423
+ | `scroll_page` | Scroll viewport | `{direction: "down"}` |