sequant 1.17.0 → 1.18.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 (63) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/.claude-plugin/plugin.json +14 -2
  3. package/dist/marketplace/external_plugins/sequant/.claude-plugin/plugin.json +21 -0
  4. package/dist/marketplace/external_plugins/sequant/README.md +38 -0
  5. package/dist/marketplace/external_plugins/sequant/hooks/post-tool.sh +292 -0
  6. package/dist/marketplace/external_plugins/sequant/hooks/pre-tool.sh +463 -0
  7. package/dist/marketplace/external_plugins/sequant/skills/_shared/references/prompt-templates.md +350 -0
  8. package/dist/marketplace/external_plugins/sequant/skills/_shared/references/subagent-types.md +131 -0
  9. package/dist/marketplace/external_plugins/sequant/skills/assess/SKILL.md +474 -0
  10. package/dist/marketplace/external_plugins/sequant/skills/clean/SKILL.md +211 -0
  11. package/dist/marketplace/external_plugins/sequant/skills/docs/SKILL.md +337 -0
  12. package/dist/marketplace/external_plugins/sequant/skills/exec/SKILL.md +807 -0
  13. package/dist/marketplace/external_plugins/sequant/skills/fullsolve/SKILL.md +678 -0
  14. package/dist/marketplace/external_plugins/sequant/skills/improve/SKILL.md +668 -0
  15. package/dist/marketplace/external_plugins/sequant/skills/loop/SKILL.md +374 -0
  16. package/dist/marketplace/external_plugins/sequant/skills/qa/SKILL.md +570 -0
  17. package/dist/marketplace/external_plugins/sequant/skills/qa/references/code-quality-exemplars.md +107 -0
  18. package/dist/marketplace/external_plugins/sequant/skills/qa/references/code-review-checklist.md +65 -0
  19. package/dist/marketplace/external_plugins/sequant/skills/qa/references/quality-gates.md +179 -0
  20. package/dist/marketplace/external_plugins/sequant/skills/qa/references/semgrep-rules.md +207 -0
  21. package/dist/marketplace/external_plugins/sequant/skills/qa/references/testing-requirements.md +109 -0
  22. package/dist/marketplace/external_plugins/sequant/skills/qa/scripts/quality-checks.sh +622 -0
  23. package/dist/marketplace/external_plugins/sequant/skills/reflect/SKILL.md +175 -0
  24. package/dist/marketplace/external_plugins/sequant/skills/reflect/references/documentation-tiers.md +70 -0
  25. package/dist/marketplace/external_plugins/sequant/skills/reflect/references/phase-reflection.md +95 -0
  26. package/dist/marketplace/external_plugins/sequant/skills/security-review/SKILL.md +358 -0
  27. package/dist/marketplace/external_plugins/sequant/skills/security-review/references/security-checklists.md +432 -0
  28. package/dist/marketplace/external_plugins/sequant/skills/solve/SKILL.md +697 -0
  29. package/dist/marketplace/external_plugins/sequant/skills/spec/SKILL.md +754 -0
  30. package/dist/marketplace/external_plugins/sequant/skills/spec/references/parallel-groups.md +72 -0
  31. package/dist/marketplace/external_plugins/sequant/skills/spec/references/recommended-workflow.md +92 -0
  32. package/dist/marketplace/external_plugins/sequant/skills/spec/references/verification-criteria.md +104 -0
  33. package/dist/marketplace/external_plugins/sequant/skills/test/SKILL.md +600 -0
  34. package/dist/marketplace/external_plugins/sequant/skills/testgen/SKILL.md +576 -0
  35. package/dist/marketplace/external_plugins/sequant/skills/verify/SKILL.md +281 -0
  36. package/dist/src/commands/run.d.ts +13 -280
  37. package/dist/src/commands/run.js +23 -1956
  38. package/dist/src/commands/sync.js +3 -0
  39. package/dist/src/commands/update.js +3 -0
  40. package/dist/src/lib/plugin-version-sync.d.ts +2 -1
  41. package/dist/src/lib/plugin-version-sync.js +28 -7
  42. package/dist/src/lib/solve-comment-parser.d.ts +26 -0
  43. package/dist/src/lib/solve-comment-parser.js +63 -7
  44. package/dist/src/lib/workflow/batch-executor.d.ts +117 -0
  45. package/dist/src/lib/workflow/batch-executor.js +574 -0
  46. package/dist/src/lib/workflow/phase-executor.d.ts +40 -0
  47. package/dist/src/lib/workflow/phase-executor.js +381 -0
  48. package/dist/src/lib/workflow/phase-mapper.d.ts +65 -0
  49. package/dist/src/lib/workflow/phase-mapper.js +147 -0
  50. package/dist/src/lib/workflow/pr-operations.d.ts +86 -0
  51. package/dist/src/lib/workflow/pr-operations.js +326 -0
  52. package/dist/src/lib/workflow/pr-status.d.ts +9 -7
  53. package/dist/src/lib/workflow/pr-status.js +13 -11
  54. package/dist/src/lib/workflow/run-summary.d.ts +36 -0
  55. package/dist/src/lib/workflow/run-summary.js +142 -0
  56. package/dist/src/lib/workflow/worktree-manager.d.ts +205 -0
  57. package/dist/src/lib/workflow/worktree-manager.js +918 -0
  58. package/package.json +3 -1
  59. package/templates/skills/fullsolve/SKILL.md +11 -1
  60. package/templates/skills/qa/SKILL.md +41 -1
  61. package/templates/skills/solve/SKILL.md +86 -0
  62. package/templates/skills/spec/SKILL.md +53 -0
  63. package/templates/skills/test/SKILL.md +10 -0
@@ -0,0 +1,600 @@
1
+ ---
2
+ name: test
3
+ description: "Execute structured browser-based testing for admin features"
4
+ license: MIT
5
+ metadata:
6
+ author: sequant
7
+ version: "1.0"
8
+ allowed-tools:
9
+ - Read
10
+ - Bash
11
+ - mcp__chrome-devtools__* # Optional: falls back to manual checklist if unavailable
12
+ - Glob
13
+ - Grep
14
+ - TodoWrite
15
+ - Bash(gh issue view:*)
16
+ - Bash(gh issue comment:*)
17
+ - Bash({{PM_RUN}} dev:*)
18
+ - Bash(lsof:*)
19
+ - Bash(npx tsx:*)
20
+ ---
21
+
22
+ # Browser Testing Command
23
+
24
+ You are the "Testing Agent" for the current repository.
25
+
26
+ ## Purpose
27
+
28
+ When invoked as `/test <issue-number>`, execute structured browser-based testing for admin features that require manual QA validation.
29
+
30
+ ### When This Phase Runs
31
+
32
+ The `/test` phase is invoked by `/fullsolve` based on issue labels:
33
+
34
+ | Label | Effect |
35
+ |-------|--------|
36
+ | `ui`, `frontend`, `admin` | `/test` phase runs automatically |
37
+ | `no-browser-test` | `/test` phase is skipped (explicit opt-out, overrides UI labels) |
38
+ | Neither | `/test` is skipped; `/spec` may suggest adding `ui` label if `.tsx` files detected |
39
+
40
+ **Workflow:**
41
+ 1. **Setup Phase:** Fetch Issue, prepare test data, start dev server
42
+ 2. **Execution Phase:** Run tests systematically with browser automation
43
+ 3. **Reporting Phase:** Generate test results and GitHub comment
44
+
45
+ ## Phase 1: Setup
46
+
47
+ ### 1.1 Fetch Issue Context
48
+
49
+ ```bash
50
+ gh issue view <issue-number> --json title,body,labels
51
+ gh issue view <issue-number> --comments
52
+ ```
53
+
54
+ **Read all GitHub issue comments** to gather complete context:
55
+ - Comments often contain clarifications, updates, or additional test cases added after the initial issue description
56
+ - Look for discussion about test requirements, edge cases, or expected behaviors mentioned in comments
57
+ - Review feedback from previous testing cycles or review comments
58
+
59
+ Parse the Issue body and all comments to extract:
60
+ - Feature description
61
+ - Test cases (look for "Test 1:", "**Test N:**", "### Test N", numbered lists)
62
+ - Test data requirements (if specified)
63
+ - Expected outcomes
64
+ - Any clarifications or additional test requirements from comments
65
+
66
+ ### 1.2 Implementation Status Check
67
+
68
+ Before proceeding with full test setup, verify the feature exists:
69
+
70
+ **For admin features (`/admin/*`):**
71
+ ```bash
72
+ # Check if main page exists
73
+ ls app/admin/<feature>/page.tsx 2>/dev/null && echo "Exists" || echo "Not implemented"
74
+ ```
75
+
76
+ **For component features:**
77
+ ```bash
78
+ # Check if main component exists
79
+ find components -name "*<FeatureName>*" -type f
80
+ ```
81
+
82
+ **Decision based on result:**
83
+
84
+ **Feature Implemented → Continue to 1.3**
85
+ - Proceed with test data preparation and full test execution
86
+
87
+ **Feature Not Implemented → Two options:**
88
+
89
+ 1. **Quick Status Report (for P2/deferred features):**
90
+ - Verify infrastructure readiness (backend queries, DB schema, dependencies)
91
+ - Document what exists vs. what's missing
92
+ - Post brief status comment to issue
93
+ - Exit testing workflow - let user decide: implement now or defer
94
+
95
+ 2. **Implement First (for P0/P1 features):**
96
+ - Exit `/test` workflow
97
+ - Recommend: Run `/spec <issue>` to plan, then `/exec <issue>` to implement
98
+ - Run `/test <issue>` again after implementation complete
99
+
100
+ ### 1.3 Test Data Preparation
101
+
102
+ Check for test data requirements:
103
+
104
+ 1. Look for seed script or test fixtures in the project
105
+ 2. If seed script exists, offer to run it:
106
+ ```bash
107
+ npx tsx scripts/seed-test-<feature>.ts
108
+ ```
109
+ 3. If no seed script exists, check Issue for SQL statements or manual setup steps
110
+ 4. Execute setup or provide clear instructions to user
111
+
112
+ ### 1.4 Dev Server Check
113
+
114
+ **Extract port from DEV_URL configuration:**
115
+ The dev server URL is configured in `.claude/.sequant/config.json` under `tokens.DEV_URL`. Extract the port for the `lsof` check:
116
+
117
+ ```bash
118
+ # Get DEV_URL from config (default: {{DEV_URL}})
119
+ # Extract port: http://localhost:PORT -> PORT
120
+ DEV_PORT=$(echo "{{DEV_URL}}" | sed -E 's/.*:([0-9]+).*/\1/')
121
+
122
+ # Check if dev server is running on configured port
123
+ lsof -ti:$DEV_PORT
124
+ ```
125
+
126
+ If not running, start it using the project's package manager:
127
+ ```bash
128
+ {{PM_RUN}} dev
129
+ ```
130
+
131
+ Wait for server ready before proceeding.
132
+
133
+ **Note:** If `{{DEV_URL}}` or `{{PM_RUN}}` are not replaced with actual values, the defaults are:
134
+ - DEV_URL: `http://localhost:3000` (Next.js), `http://localhost:4321` (Astro), `http://localhost:5173` (Vite-based)
135
+ - PM_RUN: `npm run` (or `bun run`, `yarn`, `pnpm run` based on lockfile)
136
+
137
+ ## Decision Point: Feature Implemented or Not?
138
+
139
+ At this point, you've checked if the feature exists (section 1.2). Based on that result:
140
+
141
+ ### Path A: Feature Implemented
142
+
143
+ **Continue to Phase 2** - Execute full test suite with browser automation.
144
+
145
+ **Workflow:**
146
+ 1. Create test plan with TodoWrite (all test cases)
147
+ 2. Execute tests systematically using Chrome DevTools MCP
148
+ 3. Generate test results report
149
+ 4. Post results to GitHub issue
150
+
151
+ ### Path B: Feature Not Implemented
152
+
153
+ **Skip to Infrastructure Assessment** - Don't run browser tests, verify readiness instead.
154
+
155
+ **For P2/Deferred Features:**
156
+ 1. Check backend infrastructure:
157
+ - Database queries exist? (`lib/queries/`)
158
+ - Database schema ready? (check migrations)
159
+ - Utility functions available? (`lib/utils/`)
160
+ - Dependencies installed? (`package.json`)
161
+ 2. Create status report:
162
+ - What infrastructure exists
163
+ - What UI/frontend is missing
164
+ - Current workaround (e.g., CLI tool)
165
+ 3. Post "Feature Not Implemented" comment to GitHub issue
166
+ 4. Document deferral decision (e.g., add note to `CLAUDE.md`)
167
+ 5. Exit testing workflow
168
+
169
+ **For P0/P1 Features:**
170
+ 1. Note that feature needs implementation
171
+ 2. Recommend workflow:
172
+ - `/spec <issue>` - Plan implementation
173
+ - `/exec <issue>` - Implement feature
174
+ - `/test <issue>` - Run tests after implementation
175
+ 3. Exit testing workflow
176
+ 4. Ask user: "Should I proceed with `/spec` and `/exec` now?"
177
+
178
+ ## Phase 2: Test Execution
179
+
180
+ **Note:** Only proceed to Phase 2 if feature is implemented (Path A above).
181
+
182
+ ### 2.1 Create Test Plan
183
+
184
+ Use TodoWrite to create a todo list with all test cases found:
185
+
186
+ ```javascript
187
+ [
188
+ { content: "Test 1: Basic functionality", status: "pending", activeForm: "Testing basic functionality" },
189
+ { content: "Test 2: Edge cases", status: "pending", activeForm: "Testing edge cases" },
190
+ // ... etc
191
+ ]
192
+ ```
193
+
194
+ ### 2.2 Execute Tests Systematically
195
+
196
+ For each test case:
197
+
198
+ **Step 1: Display Test**
199
+ - Show test number, description, and steps
200
+ - Mark test as "in_progress" in todo list
201
+
202
+ **Step 2: Browser Automation**
203
+
204
+ Use Chrome DevTools MCP for browser-based tests:
205
+
206
+ ```javascript
207
+ // Navigate to feature
208
+ mcp__chrome-devtools__navigate_page({url: "{{DEV_URL}}/..."})
209
+
210
+ // Get page structure
211
+ mcp__chrome-devtools__take_snapshot()
212
+
213
+ // Interact with elements (use UIDs from snapshot)
214
+ mcp__chrome-devtools__click({uid: "..."})
215
+ mcp__chrome-devtools__fill({uid: "...", value: "..."})
216
+ mcp__chrome-devtools__press_key({key: "Enter"})
217
+
218
+ // Verify state changes
219
+ mcp__chrome-devtools__take_snapshot()
220
+
221
+ // Document visual state
222
+ mcp__chrome-devtools__take_screenshot()
223
+
224
+ // Handle dialogs if needed
225
+ mcp__chrome-devtools__handle_dialog({action: "accept"})
226
+ ```
227
+
228
+ **Step 3: Verify Results**
229
+
230
+ Compare actual vs. expected outcomes:
231
+ - Check snapshot for expected elements/state
232
+ - Verify visual appearance in screenshot
233
+ - Confirm behavior matches test requirements
234
+
235
+ **Step 4: Record Result**
236
+
237
+ Mark test status:
238
+ - **PASS**: All expectations met
239
+ - **FAIL**: Expected behavior not working
240
+ - **BLOCKED**: Cannot complete test (prerequisite failed, bug blocking)
241
+
242
+ Update todo list:
243
+ - PASS → status: "completed"
244
+ - FAIL/BLOCKED → keep status: "in_progress", document issue
245
+
246
+ ### 2.3 Bug-Fix-Resume Pattern
247
+
248
+ When a bug is discovered during testing:
249
+
250
+ 1. **Pause Testing**
251
+ - Mark current test as BLOCKED
252
+ - Document the bug clearly (expected vs. actual)
253
+
254
+ 2. **Bug Fix Decision**
255
+ - If bug is critical and fixable now → pause tests, fix bug, resume
256
+ - If bug is non-critical → document, continue other tests
257
+ - If bug blocks multiple tests → fix before continuing
258
+
259
+ 3. **Resume Testing**
260
+ - After fix, restart blocked test
261
+ - Mark as PASS/FAIL based on fix
262
+ - Continue with remaining tests
263
+
264
+ ### 2.4 MCP Availability Check (Graceful Fallback)
265
+
266
+ **Before starting browser automation**, check if Chrome DevTools MCP is available:
267
+
268
+ ```
269
+ Check if mcp__chrome-devtools__* tools are available in your current session.
270
+ ```
271
+
272
+ **If MCP IS available:**
273
+ - Proceed with automated browser testing (Phase 2.1-2.3)
274
+
275
+ **If MCP is NOT available:**
276
+ - Skip browser automation steps
277
+ - Generate a **Manual Testing Checklist** instead
278
+
279
+ **Manual Testing Checklist (No MCP Fallback):**
280
+
281
+ When browser automation is unavailable, generate a structured manual testing guide:
282
+
283
+ ```markdown
284
+ ## Manual Testing Checklist for Issue #<N>
285
+
286
+ **Pre-requisites:**
287
+ - [ ] Dev server running at {{DEV_URL}}
288
+ - [ ] Browser open with DevTools ready
289
+ - [ ] Test data prepared (see section 1.3)
290
+
291
+ ### Test 1: [Description]
292
+ **URL:** {{DEV_URL}}/path/to/feature
293
+ **Steps:**
294
+ 1. Navigate to the URL above
295
+ 2. [Action to perform]
296
+ 3. [Expected result to verify]
297
+
298
+ **Expected Result:** [What should happen]
299
+ **Actual Result:** [ ] PASS / [ ] FAIL - Notes: ___
300
+
301
+ ### Test 2: [Description]
302
+ **URL:** {{DEV_URL}}/path/to/feature
303
+ **Steps:**
304
+ 1. [Step 1]
305
+ 2. [Step 2]
306
+
307
+ **Expected Result:** [What should happen]
308
+ **Actual Result:** [ ] PASS / [ ] FAIL - Notes: ___
309
+
310
+ ---
311
+ **Summary:** Complete each test above and mark PASS/FAIL.
312
+ Post results as a comment on this issue.
313
+ ```
314
+
315
+ **Why this matters:**
316
+ - `/test` skill remains useful even without Chrome DevTools MCP
317
+ - Manual testers can follow the structured checklist
318
+ - Test results format remains consistent for reporting
319
+
320
+ ## Phase 3: Reporting
321
+
322
+ ### 3.1 Generate Test Summary
323
+
324
+ Create structured test results:
325
+
326
+ ```markdown
327
+ ## Testing Results for Issue #<N>
328
+
329
+ **Summary:** X/Y tests passed
330
+
331
+ ### Test Results
332
+
333
+ **Test 1: [Description]** - PASS
334
+ - Steps executed successfully
335
+ - Expected behavior confirmed
336
+ - Screenshots: [if applicable]
337
+
338
+ **Test 2: [Description]** - FAIL
339
+ - Steps executed: [list]
340
+ - Expected: [what should happen]
341
+ - Actual: [what happened]
342
+ - Issue: [describe the problem]
343
+
344
+ **Test 3: [Description]** - BLOCKED
345
+ - Blocker: [describe blocking issue]
346
+ - Dependency: [what needs to be fixed first]
347
+
348
+ ### Bugs Found
349
+
350
+ 1. **[Bug Title]**
351
+ - Location: [file:line]
352
+ - Issue: [description]
353
+ - Fix: [applied/pending]
354
+ - Status: [fixed/documented for follow-up]
355
+
356
+ ### Coverage
357
+
358
+ - Completed: X tests
359
+ - Failed: Y tests
360
+ - Blocked: Z tests
361
+ - Remaining: W tests
362
+
363
+ ### Recommendations
364
+
365
+ - [Next steps]
366
+ - [Follow-up issues needed]
367
+ - [Areas needing additional testing]
368
+ ```
369
+
370
+ ### 3.2 GitHub Comment
371
+
372
+ Draft comment for Issue #<N>:
373
+
374
+ ```markdown
375
+ ## Testing Progress Update
376
+
377
+ [Test summary from above]
378
+
379
+ ### Next Steps
380
+
381
+ - [ ] [Action item 1]
382
+ - [ ] [Action item 2]
383
+
384
+ **Testing tools used:** Chrome DevTools MCP, manual verification
385
+ ```
386
+
387
+ Offer to post comment:
388
+ ```bash
389
+ gh issue comment <issue-number> --body "$(cat <<'EOF'
390
+ [comment content]
391
+ EOF
392
+ )"
393
+ ```
394
+
395
+ ## Test Case Detection Patterns
396
+
397
+ Parse Issue body for these test formats:
398
+
399
+ **Format 1: Numbered headers**
400
+ ```
401
+ ### Test 1: Description
402
+ Steps...
403
+
404
+ ### Test 2: Description
405
+ Steps...
406
+ ```
407
+
408
+ **Format 2: Bold labels**
409
+ ```
410
+ **Test 1:** Description
411
+ - Step 1
412
+ - Step 2
413
+
414
+ **Test 2:** Description
415
+ - Step 1
416
+ ```
417
+
418
+ **Format 3: Numbered lists**
419
+ ```
420
+ 1. Test basic functionality:
421
+ - Step a
422
+ - Step b
423
+ 2. Test edge cases:
424
+ - Step a
425
+ ```
426
+
427
+ **Format 4: Acceptance Criteria as Tests**
428
+ If no explicit tests, use AC as test cases:
429
+ ```
430
+ **AC-1:** User can do X
431
+ → Test 1: Verify user can do X
432
+
433
+ **AC-2:** System shows Y
434
+ → Test 2: Verify system shows Y
435
+ ```
436
+
437
+ ## Browser Testing Best Practices
438
+
439
+ ### Snapshots vs. Screenshots
440
+
441
+ **Use `take_snapshot()` when:**
442
+ - You need to interact with elements (get UIDs)
443
+ - Verifying text content or element presence
444
+ - Checking accessibility tree structure
445
+ - Automating clicks/fills/navigation
446
+
447
+ **Use `take_screenshot()` when:**
448
+ - Documenting visual appearance
449
+ - Capturing hover states, colors, layouts
450
+ - Creating test evidence for reports
451
+ - Comparing before/after states visually
452
+
453
+ ### Common Testing Patterns
454
+
455
+ **Pattern 1: Form Submission**
456
+ ```javascript
457
+ // 1. Navigate to form
458
+ navigate_page({url: "..."})
459
+
460
+ // 2. Get form structure
461
+ take_snapshot()
462
+
463
+ // 3. Fill form fields
464
+ fill({uid: "name_field", value: "Test Name"})
465
+ fill({uid: "email_field", value: "test@example.com"})
466
+
467
+ // 4. Submit
468
+ click({uid: "submit_button"})
469
+
470
+ // 5. Verify result
471
+ wait_for({text: "Success"})
472
+ take_snapshot()
473
+ ```
474
+
475
+ **Pattern 2: Modal Interactions**
476
+ ```javascript
477
+ // 1. Open modal
478
+ click({uid: "open_modal_button"})
479
+
480
+ // 2. Verify modal content
481
+ take_snapshot() // Should show modal in tree
482
+
483
+ // 3. Interact with modal
484
+ fill({uid: "modal_input", value: "test"})
485
+ click({uid: "modal_confirm"})
486
+
487
+ // 4. Verify modal closed
488
+ take_snapshot() // Modal should be gone
489
+ ```
490
+
491
+ **Pattern 3: Multi-Selection Testing**
492
+ ```javascript
493
+ // 1. Get initial state
494
+ take_snapshot() // Note initial selection count
495
+
496
+ // 2. Select items
497
+ click({uid: "checkbox_1"})
498
+ take_snapshot() // Verify count updated
499
+
500
+ click({uid: "checkbox_2"})
501
+ take_snapshot() // Verify count updated
502
+
503
+ // 3. Perform bulk action
504
+ click({uid: "bulk_action_button"})
505
+ take_snapshot() // Verify action UI
506
+ ```
507
+
508
+ **Pattern 4: Escape/Cancel Testing**
509
+ ```javascript
510
+ // 1. Open UI element (modal, dropdown, etc.)
511
+ click({uid: "trigger"})
512
+
513
+ // 2. Press Escape
514
+ press_key({key: "Escape"})
515
+
516
+ // 3. Verify closed
517
+ take_snapshot() // Element should not be present
518
+ ```
519
+
520
+ ## Test Data Cleanup
521
+
522
+ After testing completes, ask user if test data should be cleaned up:
523
+
524
+ **Option 1: Delete test data**
525
+ ```sql
526
+ -- Clean up test records created during testing
527
+ DELETE FROM <table> WHERE name LIKE 'Test %';
528
+ ```
529
+
530
+ **Option 2: Keep for future testing**
531
+ - Document that test data exists
532
+ - Note: May need to update or regenerate for next test session
533
+
534
+ ## Exit Conditions
535
+
536
+ Testing session is complete when:
537
+
538
+ 1. All test cases executed (or explicitly skipped)
539
+ 2. Test results documented with PASS/FAIL/BLOCKED status
540
+ 3. Bugs found have been fixed or documented
541
+ 4. Test summary generated
542
+ 5. GitHub comment drafted (and optionally posted)
543
+ 6. Recommendations for next steps provided
544
+
545
+ ## Example Invocation
546
+
547
+ ```bash
548
+ /test 151
549
+ ```
550
+
551
+ **Expected workflow:**
552
+ 1. Fetch Issue #151
553
+ 2. Detect 10 test cases in Issue body
554
+ 3. Check for seed script or test fixtures
555
+ 4. Start dev server if needed
556
+ 5. Execute tests 1-10 using Chrome DevTools MCP
557
+ 6. Generate test summary with PASS/FAIL/BLOCKED status
558
+ 7. Draft GitHub comment with results
559
+ 8. Offer to post comment and identify next steps
560
+
561
+ ## Integration with Development Workflow
562
+
563
+ **Typical usage pattern:**
564
+
565
+ ```
566
+ /spec <issue> → Plan the feature
567
+ /exec <issue> → Implement the feature
568
+ /test <issue> → Test the feature (browser-based)
569
+ /qa <issue> → Code review and quality assessment
570
+ ```
571
+
572
+ **Alternative: Test-Driven Development**
573
+ ```
574
+ /spec <issue> → Plan the feature
575
+ /test <issue> → Run tests (expect failures)
576
+ /exec <issue> → Implement until tests pass
577
+ /qa <issue> → Final code review
578
+ ```
579
+
580
+ **When to use `/test` vs `/qa`:**
581
+ - **`/test`**: Browser-based functional testing, user workflows, UI interactions
582
+ - **`/qa`**: Code review, AC validation, architecture assessment, merge readiness
583
+
584
+ Both can be used together:
585
+ 1. `/test` → Verify feature works for users
586
+ 2. `/qa` → Verify code quality and completeness
587
+
588
+ ---
589
+
590
+ ## Output Verification
591
+
592
+ **Before responding, verify your output includes ALL of these:**
593
+
594
+ - [ ] **Test Summary** - X/Y tests passed
595
+ - [ ] **Test Results Table** - Each test marked PASS, FAIL, or BLOCKED
596
+ - [ ] **Bugs Found** - List of bugs with file:line locations (if any)
597
+ - [ ] **Coverage** - Completed, failed, blocked, remaining counts
598
+ - [ ] **Recommendations** - Next steps for failures or follow-up
599
+
600
+ **DO NOT respond until all items are verified.**