projecta-rrr 1.16.3 → 1.16.4

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/CHANGELOG.md CHANGED
@@ -4,6 +4,43 @@ All notable changes to RRR will be documented in this file.
4
4
 
5
5
  Format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
6
6
 
7
+ ## [1.16.4] - 2026-01-27
8
+
9
+ ### Fixed
10
+ - **Playwright MCP Detection** - Enhanced detection logic now checks multiple locations:
11
+ - `~/.claude/mcp.json` (primary)
12
+ - `~/.claude/settings.json` (alternate)
13
+ - `playwright-mcp` command availability
14
+ - Running processes via `ps`
15
+ - **QA Engineer Mode Auto-Detection** - UAT now auto-detects test type from SUMMARY.md:
16
+ - Web UI tests → Recommend AI QA Engineer (Playwright + MiniMax)
17
+ - API/Backend tests → Recommend Zeroshot
18
+ - Mixed tests → Offer both options with clear recommendations
19
+
20
+ ### Added
21
+ - **Intuitive Mode Selection** - Testing mode selection now shows:
22
+ - Auto-detected test type (e.g., "Web UI tests")
23
+ - Clear explanation of each mode's strengths
24
+ - Recommended option highlighted
25
+ - Cost estimates for AI-powered modes
26
+
27
+ - **run_qa_engineer_batch Step** - New workflow step for AI QA Engineer mode:
28
+ - Combines Playwright MCP (browser control) + MiniMax (visual AI)
29
+ - Tests edge cases automatically
30
+ - Explores navigation paths beyond happy path
31
+ - ~$0.001 per test (MiniMax vision is 50-100x cheaper than Anthropic API)
32
+
33
+ - **run_playwright_batch Step** - New workflow step for Playwright-only mode:
34
+ - Browser automation without visual AI validation
35
+ - Fallback when MiniMax API key not available
36
+
37
+ ### Changed
38
+ - **Improved Mode Routing** - create_uat_file step now routes to 4 modes:
39
+ - `qa-engineer` → run_qa_engineer_batch
40
+ - `zeroshot` → run_zeroshot_batch
41
+ - `playwright` → run_playwright_batch
42
+ - `manual` → present_test
43
+
7
44
  ## [1.16.3] - 2026-01-27
8
45
 
9
46
  ### Changed
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "projecta-rrr",
3
- "version": "1.16.3",
3
+ "version": "1.16.4",
4
4
  "description": "A meta-prompting, context engineering and spec-driven development system for Claude Code by Projecta.ai",
5
5
  "bin": {
6
6
  "projecta-rrr": "bin/install.js"
@@ -179,31 +179,122 @@ Check if zeroshot validation is available:
179
179
 
180
180
  **If ZEROSHOT_AVAILABLE and MODULE_EXISTS:**
181
181
 
182
- Check for Playwright MCP availability:
182
+ Check for Playwright MCP availability (multiple detection methods):
183
+
184
+ ```bash
185
+ # Enhanced Playwright MCP detection - checks multiple locations
186
+ PLAYWRIGHT_STATUS="NO_PLAYWRIGHT_MCP"
187
+
188
+ # Method 1: Check ~/.claude/mcp.json
189
+ if [ -f "$HOME/.claude/mcp.json" ]; then
190
+ if grep -qi "playwright" "$HOME/.claude/mcp.json" 2>/dev/null; then
191
+ PLAYWRIGHT_STATUS="PLAYWRIGHT_MCP_AVAILABLE"
192
+ fi
193
+ fi
194
+
195
+ # Method 2: Check ~/.claude/settings.json (alternate location)
196
+ if [ "$PLAYWRIGHT_STATUS" = "NO_PLAYWRIGHT_MCP" ] && [ -f "$HOME/.claude/settings.json" ]; then
197
+ if grep -qi "playwright" "$HOME/.claude/settings.json" 2>/dev/null; then
198
+ PLAYWRIGHT_STATUS="PLAYWRIGHT_MCP_AVAILABLE"
199
+ fi
200
+ fi
201
+
202
+ # Method 3: Check if playwright-mcp command exists
203
+ if [ "$PLAYWRIGHT_STATUS" = "NO_PLAYWRIGHT_MCP" ]; then
204
+ if command -v playwright-mcp >/dev/null 2>&1; then
205
+ PLAYWRIGHT_STATUS="PLAYWRIGHT_MCP_AVAILABLE"
206
+ fi
207
+ fi
208
+
209
+ # Method 4: Check MCP servers via ps or other running processes
210
+ if [ "$PLAYWRIGHT_STATUS" = "NO_PLAYWRIGHT_MCP" ]; then
211
+ if ps aux 2>/dev/null | grep -qi "[p]laywright-mcp"; then
212
+ PLAYWRIGHT_STATUS="PLAYWRIGHT_MCP_AVAILABLE"
213
+ fi
214
+ fi
215
+
216
+ echo "$PLAYWRIGHT_STATUS"
217
+ ```
218
+
219
+ Check for MiniMax API key (enables AI visual validation):
220
+
221
+ ```bash
222
+ [ -n "$MINIMAX_API_KEY" ] && echo "MINIMAX_AVAILABLE" || echo "NO_MINIMAX"
223
+ ```
224
+
225
+ **Determine Recommended Mode:**
226
+
227
+ Based on what's available, calculate the recommended mode:
228
+
229
+ | Available | Recommended Mode | Why |
230
+ |-----------|-----------------|-----|
231
+ | Playwright MCP + MiniMax | AI QA Engineer | Best for web UI - browser control + visual validation |
232
+ | MiniMax only | Zeroshot (Screenshot) | Fast, cheap visual validation |
233
+ | Anthropic API only | Zeroshot (Screenshot) | Uses Claude vision |
234
+ | No API keys | Manual | User testing required |
235
+
236
+ **Auto-detect test type from SUMMARY.md:**
237
+
183
238
  ```bash
184
- # Check if Playwright MCP is configured
185
- [ -f "$HOME/.claude/mcp.json" ] && grep -q "playwright" "$HOME/.claude/mcp.json" && echo "PLAYWRIGHT_MCP_AVAILABLE" || echo "NO_PLAYWRIGHT_MCP"
239
+ # Check SUMMARY.md content to determine test type
240
+ SUMMARY_CONTENT=$(cat .planning/phases/*/phases/*-SUMMARY.md 2>/dev/null | head -100)
241
+
242
+ if echo "$SUMMARY_CONTENT" | grep -qiE "(ui|page|screen|button|form|input|click|navigation|redirect|layout|visual|interface)"; then
243
+ TEST_TYPE="WEB_UI"
244
+ elif echo "$SUMMARY_CONTENT" | grep -qiE "(api|endpoint|database|backend|voice|sip|telephony|audio|websocket)"; then
245
+ TEST_TYPE="API_BACKEND"
246
+ else
247
+ TEST_TYPE="MIXED"
248
+ fi
249
+ echo "$TEST_TYPE"
250
+ ```
251
+
252
+ **Mode Selection UX:**
253
+
254
+ ```
255
+ ╔══════════════════════════════════════════════════════════════════════╗
256
+ ║ UAT Testing Mode (auto-detected: Web UI tests) ║
257
+ ╠══════════════════════════════════════════════════════════════════════╣
258
+ ║ ║
259
+ ║ Recommended: ║
260
+ ║ ──────────────────── ║
261
+ ║ ⭐ AI QA Engineer (Recommended for web UI) ║
262
+ ║ • Browser automation + visual AI validation ║
263
+ ║ • Explores edge cases, tests like a real user ║
264
+ ║ • Cost: ~$0.001/test (MiniMax vision) ║
265
+ ║ ║
266
+ ║ Alternative: ║
267
+ ║ ──────────── ║
268
+ ║ • Zeroshot (Screenshot) — Fast, fully automated ║
269
+ ║ • Manual — You test each feature and report results ║
270
+ ║ ║
271
+ ╚══════════════════════════════════════════════════════════════════════╝
186
272
  ```
187
273
 
188
274
  Use AskUserQuestion:
189
275
  - header: "Testing Mode"
190
- - question: "How would you like to run UAT?"
276
+ - question: "How would you like to run UAT? (Recommended: AI QA Engineer for web UI)"
191
277
  - options:
192
- {If PLAYWRIGHT_MCP_AVAILABLE:}
193
- - "AI QA Engineer (Recommended)" — Claude acts as a QA engineer, controlling the browser interactively. Explores like a real user, tests edge cases.
278
+ {If PLAYWRIGHT_MCP_AVAILABLE and MINIMAX_AVAILABLE:}
279
+ - "AI QA Engineer (Recommended)" — Claude acts as a QA engineer, controlling the browser interactively with visual validation. Tests edge cases automatically. Best for web UI.
194
280
  - "Zeroshot (Screenshot)" — Claude validates UI using screenshots. Faster, less thorough.
195
281
  - "Manual" — You'll test each feature and report results. More control, slower.
196
- {Else:}
282
+ {ElseIf PLAYWRIGHT_MCP_AVAILABLE and TEST_TYPE = "WEB_UI":}
283
+ - "Playwright MCP (Interactive)" — Use browser automation for testing. No visual AI validation.
284
+ - "Manual" — You'll test each feature and report results.
285
+ {ElseIf MINIMAX_AVAILABLE or ANTHROPIC_API_KEY:}
197
286
  - "Zeroshot (Automated) (Recommended)" — Claude validates UI autonomously using screenshots. Faster, no input needed per test.
198
287
  - "Manual" — You'll test each feature and report results. More control, slower.
288
+ {Else:}
289
+ - "Manual" — You'll test each feature and report results.
199
290
 
200
- Store result in `TESTING_MODE` (qa-engineer, zeroshot, or manual).
291
+ Store result in `TESTING_MODE` (qa-engineer, zeroshot, playwright, or manual).
201
292
 
202
293
  **If MANUAL_ONLY or MODULE_MISSING:**
203
294
 
204
295
  ```
205
296
  UAT will run in manual mode.
206
- (Set ANTHROPIC_API_KEY to enable automated zeroshot testing)
297
+ (Set ANTHROPIC_API_KEY to enable automated testing)
207
298
  ```
208
299
 
209
300
  Set `TESTING_MODE=manual`.
@@ -353,7 +444,9 @@ skipped: 0
353
444
  Write to `{phase_dir}/{phase}-UAT.md` (where phase_dir is from get_phase_dir)
354
445
 
355
446
  **Route based on testing mode:**
447
+ - If `TESTING_MODE=qa-engineer` → Go to `run_qa_engineer_batch`
356
448
  - If `TESTING_MODE=zeroshot` → Go to `run_zeroshot_batch`
449
+ - If `TESTING_MODE=playwright` → Go to `run_playwright_batch`
357
450
  - If `TESTING_MODE=manual` → Go to `present_test`
358
451
  </step>
359
452
 
@@ -444,6 +537,128 @@ Falling back to manual mode for remaining tests.
444
537
  Set `TESTING_MODE=manual` and continue from current test.
445
538
  </step>
446
539
 
540
+ <step name="run_qa_engineer_batch">
541
+ **Run AI QA Engineer mode for all tests:**
542
+
543
+ This mode combines Playwright MCP (browser control) with MiniMax (visual AI) for comprehensive exploratory testing.
544
+
545
+ ```
546
+ ╔══════════════════════════════════════════════════════════════╗
547
+ ║ AI QA ENGINEER: Autonomous Testing ║
548
+ ╚══════════════════════════════════════════════════════════════╝
549
+
550
+ Running {N} tests with browser automation + AI visual validation...
551
+ ```
552
+
553
+ **For each test in the UAT file:**
554
+
555
+ 1. Extract test name and expected behavior
556
+ 2. Determine the URL to test
557
+ 3. Run QA Engineer validation:
558
+ ```javascript
559
+ const { zeroshotValidate } = require('~/.claude/rrr/lib/uat/zeroshot-validator.js');
560
+
561
+ const result = await zeroshotValidate({
562
+ url: testUrl,
563
+ task: `Verify: ${expectedBehavior}`,
564
+ mode: 'qa-engineer', // QA engineer persona
565
+ interactive: true, // Use Playwright MCP for browser control
566
+ timeout: 60000 // Longer timeout for exploratory testing
567
+ });
568
+ ```
569
+
570
+ 4. Process result:
571
+ - If `result.passed === true`:
572
+ - Update test result to "pass"
573
+ - Log: `✓ Test {N}: {name}`
574
+ - If `result.passed === false`:
575
+ - Update test result to "issue"
576
+ - Capture observations and reasoning
577
+ - Add to Gaps section
578
+ - Log: `✗ Test {N}: {name} - {brief reason}`
579
+
580
+ 5. Update UAT.md after each test (checkpoint)
581
+
582
+ 6. Display progress:
583
+ ```
584
+ Progress: [████████░░] 8/10 tests complete
585
+ ✓ Test 1: Login page loads with form fields
586
+ ✓ Test 2: Form validation on submit
587
+ ✗ Test 3: Password reset email not sent (edge case found)
588
+ ...
589
+ ```
590
+
591
+ **QA Engineer specific behaviors:**
592
+ - Tests edge cases automatically (empty fields, long inputs, special chars)
593
+ - Explores navigation paths beyond the happy path
594
+ - Screenshots any issues found
595
+ - Validates visual correctness with MiniMax vision
596
+
597
+ **After all tests complete:**
598
+
599
+ Update frontmatter status to "complete".
600
+
601
+ **Display summary:**
602
+
603
+ ```
604
+ ╔══════════════════════════════════════════════════════════════╗
605
+ ║ AI QA ENGINEER: Complete ║
606
+ ╚══════════════════════════════════════════════════════════════╝
607
+
608
+ Results:
609
+ ✓ Passed: {N}
610
+ ✗ Issues: {N}
611
+ ⏭ Skipped: {N}
612
+
613
+ Exploratory Testing Notes:
614
+ - {N} edge cases tested automatically
615
+ - {N} navigation paths explored
616
+
617
+ {If issues > 0:}
618
+ Issues Found:
619
+ 1. Test 3: Password reset - Edge case: special chars in email cause error
620
+ 2. Test 7: Form submission - Visual: error message clipped on mobile
621
+ ```
622
+
623
+ Go to `complete_session`.
624
+
625
+ **On error (Playwright MCP not available, timeout):**
626
+
627
+ ```
628
+ ⚠ QA Engineer mode error: {error}
629
+ Falling back to Zeroshot mode...
630
+ ```
631
+
632
+ Set `TESTING_MODE=zeroshot` and continue to `run_zeroshot_batch`.
633
+ </step>
634
+
635
+ <step name="run_playwright_batch">
636
+ **Run Playwright-only mode (no visual AI):**
637
+
638
+ Use Playwright MCP for browser automation without visual AI validation.
639
+
640
+ ```
641
+ ╔══════════════════════════════════════════════════════════════╗
642
+ ║ PLAYWRIGHT UAT: Browser Automation ║
643
+ ╚══════════════════════════════════════════════════════════════╝
644
+
645
+ Running {N} tests with Playwright browser automation...
646
+ ```
647
+
648
+ **For each test:**
649
+
650
+ 1. Navigate to URL using Playwright MCP
651
+ 2. Perform interactions described in test
652
+ 3. Take screenshot at key points
653
+ 4. Report findings (manual AI analysis not used)
654
+
655
+ **After all tests:**
656
+
657
+ Display summary and prompt for manual verification of screenshots.
658
+
659
+ Go to `complete_session`.
660
+ </step>
661
+
447
662
  <step name="present_test">
448
663
  **Present current test to user (Manual Mode):**
449
664