@bugzy-ai/bugzy 1.13.1 → 1.14.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.
package/dist/cli/index.js CHANGED
@@ -1492,6 +1492,40 @@ The input format determines the trigger source and context extraction strategy.`
1492
1492
  Store the detected trigger for use in output routing:
1493
1493
  - Set variable: \`TRIGGER_SOURCE\` = [GITHUB_PR | SLACK_MESSAGE | CI_CD | MANUAL]
1494
1494
  - This determines output formatting and delivery channel`
1495
+ },
1496
+ // Step 5c: Coverage Gap vs. Ambiguity (inline)
1497
+ {
1498
+ inline: true,
1499
+ title: "Coverage Gap vs. Ambiguity",
1500
+ content: `### Coverage Gap vs. Ambiguity
1501
+
1502
+ When the trigger indicates a feature has been implemented and is ready for testing (Jira "Ready to Test", PR merged, CI/CD pipeline):
1503
+
1504
+ **Missing test coverage for the referenced feature is a COVERAGE GAP, not an ambiguity.**
1505
+
1506
+ - The developer/team is asserting the feature exists and is ready for testing
1507
+ - "Not yet explored" or "out of scope" in the test plan means the QA team hasn't tested it yet \u2014 it does NOT mean the feature doesn't exist
1508
+ - Do NOT classify as CRITICAL based on stale documentation or knowledge base gaps
1509
+ - If project-context.md or the Jira issue references the feature, assume it exists until browser exploration proves otherwise
1510
+ - Coverage gaps are handled in the "Create Tests for Coverage Gaps" step below \u2014 do NOT block here
1511
+
1512
+ ### If You Browse the App and Cannot Find the Referenced Feature
1513
+
1514
+ Apply the Clarification Protocol's **"Execution Obstacle vs. Requirement Ambiguity"** principle:
1515
+
1516
+ This is an **execution obstacle**, NOT a requirement ambiguity \u2014 because the authoritative trigger source (Jira issue, PR, team request) asserts the feature exists. Common causes for not finding it:
1517
+ - **Missing role/tier**: You're logged in as a basic user but the feature requires admin/premium access
1518
+ - **Missing test data**: Required test accounts or data haven't been configured in \`.env.testdata\`
1519
+ - **Feature flags**: The feature is behind a flag not enabled in the test environment
1520
+ - **Environment config**: The feature requires specific environment variables or deployment settings
1521
+
1522
+ **Action: PROCEED to "Create Tests for Coverage Gaps".** Do NOT BLOCK.
1523
+ - Create test cases and specs that reference the feature as described in the trigger
1524
+ - Add placeholder env vars to \`.env.testdata\` for any missing credentials
1525
+ - Notify the team (via team-communicator) about the access obstacle and what needs to be configured
1526
+ - Tests may fail until the obstacle is resolved \u2014 this is expected and acceptable
1527
+
1528
+ **Only classify as CRITICAL (and BLOCK) if NO authoritative trigger source claims the feature exists** \u2014 e.g., a vague manual request with no Jira/PR backing.`
1495
1529
  },
1496
1530
  // Step 6: Clarification Protocol (library)
1497
1531
  "clarification-protocol",
@@ -2357,6 +2391,204 @@ function validateEnvVars(mcpServers, envVars) {
2357
2391
  init_esm_shims();
2358
2392
  import * as fs3 from "fs";
2359
2393
  import * as path4 from "path";
2394
+
2395
+ // src/subagents/metadata.ts
2396
+ init_esm_shims();
2397
+ var INTEGRATIONS = {
2398
+ linear: {
2399
+ id: "linear",
2400
+ name: "Linear",
2401
+ provider: "linear",
2402
+ requiredMCP: "mcp__linear__*",
2403
+ integrationType: "oauth"
2404
+ },
2405
+ jira: {
2406
+ id: "jira",
2407
+ name: "Jira",
2408
+ provider: "jira",
2409
+ requiredMCP: "mcp__jira__*",
2410
+ integrationType: "oauth"
2411
+ },
2412
+ "jira-server": {
2413
+ id: "jira-server",
2414
+ name: "Jira Server",
2415
+ provider: "jira-server",
2416
+ requiredMCP: "mcp__jira-server__*",
2417
+ integrationType: "custom"
2418
+ },
2419
+ "azure-devops": {
2420
+ id: "azure-devops",
2421
+ name: "Azure DevOps",
2422
+ provider: "azure-devops",
2423
+ requiredMCP: "mcp__azure-devops__*",
2424
+ integrationType: "oauth"
2425
+ // Uses Nango with API key auth for PAT
2426
+ },
2427
+ notion: {
2428
+ id: "notion",
2429
+ name: "Notion",
2430
+ provider: "notion",
2431
+ requiredMCP: "mcp__notion__*",
2432
+ integrationType: "oauth"
2433
+ },
2434
+ confluence: {
2435
+ id: "confluence",
2436
+ name: "Confluence",
2437
+ provider: "confluence",
2438
+ requiredMCP: "mcp__confluence__*",
2439
+ integrationType: "oauth"
2440
+ },
2441
+ slack: {
2442
+ id: "slack",
2443
+ name: "Slack",
2444
+ provider: "slack",
2445
+ requiredMCP: "mcp__slack__*",
2446
+ integrationType: "oauth"
2447
+ },
2448
+ playwright: {
2449
+ id: "playwright",
2450
+ name: "Playwright",
2451
+ provider: "playwright",
2452
+ // No requiredMCP — uses playwright-cli (CLI tool), not MCP server
2453
+ isLocal: true,
2454
+ // Playwright runs locally, no external connector needed
2455
+ integrationType: "local"
2456
+ },
2457
+ teams: {
2458
+ id: "teams",
2459
+ name: "Microsoft Teams",
2460
+ provider: "teams",
2461
+ requiredMCP: "mcp__teams__*",
2462
+ integrationType: "oauth"
2463
+ },
2464
+ email: {
2465
+ id: "email",
2466
+ name: "Email",
2467
+ provider: "resend",
2468
+ requiredMCP: "mcp__resend__*",
2469
+ integrationType: "local"
2470
+ // Uses platform API key, no OAuth needed
2471
+ },
2472
+ github: {
2473
+ id: "github",
2474
+ name: "GitHub",
2475
+ provider: "github",
2476
+ requiredMCP: "mcp__github__*",
2477
+ integrationType: "oauth"
2478
+ },
2479
+ local: {
2480
+ id: "local",
2481
+ name: "Local (Terminal)",
2482
+ provider: "local",
2483
+ // No requiredMCP - uses built-in Claude Code tools (AskUserQuestion, text output)
2484
+ isLocal: true,
2485
+ integrationType: "local"
2486
+ }
2487
+ };
2488
+ var SUBAGENTS = {
2489
+ "test-runner": {
2490
+ role: "test-runner",
2491
+ name: "Test Runner",
2492
+ description: "Execute automated browser tests (always included)",
2493
+ icon: "play",
2494
+ integrations: [INTEGRATIONS.playwright],
2495
+ model: "sonnet",
2496
+ color: "green",
2497
+ isRequired: true,
2498
+ version: "1.0.0"
2499
+ },
2500
+ "team-communicator": {
2501
+ role: "team-communicator",
2502
+ name: "Team Communicator",
2503
+ description: "Send notifications and updates to your team",
2504
+ icon: "message-square",
2505
+ integrations: [INTEGRATIONS.slack, INTEGRATIONS.teams, INTEGRATIONS.email],
2506
+ model: "sonnet",
2507
+ color: "blue",
2508
+ isRequired: true,
2509
+ // Required - CLI uses 'local' (auto-configured), cloud uses email fallback
2510
+ defaultIntegration: "email",
2511
+ // Email fallback for cloud (CLI auto-configures 'local' separately)
2512
+ version: "1.0.0"
2513
+ },
2514
+ "issue-tracker": {
2515
+ role: "issue-tracker",
2516
+ name: "Issue Tracker",
2517
+ description: "Automatically create and track bugs and issues",
2518
+ icon: "bot",
2519
+ integrations: [
2520
+ // INTEGRATIONS.linear,
2521
+ INTEGRATIONS.jira,
2522
+ INTEGRATIONS["jira-server"],
2523
+ INTEGRATIONS["azure-devops"],
2524
+ INTEGRATIONS.notion,
2525
+ INTEGRATIONS.slack
2526
+ ],
2527
+ model: "sonnet",
2528
+ color: "red",
2529
+ version: "1.0.0"
2530
+ },
2531
+ "documentation-researcher": {
2532
+ role: "documentation-researcher",
2533
+ name: "Documentation Researcher",
2534
+ description: "Search and retrieve information from your documentation",
2535
+ icon: "file-search",
2536
+ integrations: [
2537
+ INTEGRATIONS.notion,
2538
+ INTEGRATIONS.jira
2539
+ // INTEGRATIONS.confluence
2540
+ ],
2541
+ model: "sonnet",
2542
+ color: "cyan",
2543
+ version: "1.0.0"
2544
+ },
2545
+ "test-code-generator": {
2546
+ role: "test-code-generator",
2547
+ name: "Test Code Generator",
2548
+ description: "Generate automated Playwright test scripts and Page Objects",
2549
+ icon: "code",
2550
+ integrations: [INTEGRATIONS.playwright],
2551
+ model: "sonnet",
2552
+ color: "purple",
2553
+ isRequired: true,
2554
+ // Required for automated test generation
2555
+ version: "1.0.0"
2556
+ },
2557
+ "test-debugger-fixer": {
2558
+ role: "test-debugger-fixer",
2559
+ name: "Test Debugger & Fixer",
2560
+ description: "Debug and fix failing automated tests automatically",
2561
+ icon: "wrench",
2562
+ integrations: [INTEGRATIONS.playwright],
2563
+ model: "sonnet",
2564
+ color: "yellow",
2565
+ isRequired: true,
2566
+ // Required for automated test execution and fixing
2567
+ version: "1.0.0"
2568
+ },
2569
+ "changelog-historian": {
2570
+ role: "changelog-historian",
2571
+ name: "Changelog Historian",
2572
+ description: "Retrieves and analyzes code changes from GitHub PRs and commits",
2573
+ icon: "git-pull-request",
2574
+ integrations: [INTEGRATIONS.github],
2575
+ model: "haiku",
2576
+ color: "gray",
2577
+ isRequired: false,
2578
+ version: "1.0.0"
2579
+ }
2580
+ };
2581
+ function getAllSubAgents() {
2582
+ return Object.values(SUBAGENTS);
2583
+ }
2584
+ function getIntegration(integrationId) {
2585
+ return INTEGRATIONS[integrationId];
2586
+ }
2587
+ function getRequiredSubAgents() {
2588
+ return Object.values(SUBAGENTS).filter((agent) => agent.isRequired);
2589
+ }
2590
+
2591
+ // src/cli/utils/validation.ts
2360
2592
  async function validateProjectStructure() {
2361
2593
  const config = await loadConfig();
2362
2594
  const tool = config ? getToolFromConfig(config) : DEFAULT_TOOL;
@@ -2419,7 +2651,10 @@ async function checkToolAvailable(command) {
2419
2651
  function getRequiredMCPs(subagents) {
2420
2652
  const mcps = /* @__PURE__ */ new Set();
2421
2653
  for (const [_role, integration] of Object.entries(subagents)) {
2422
- mcps.add(integration);
2654
+ const integrationMeta = getIntegration(integration);
2655
+ if (integrationMeta?.requiredMCP) {
2656
+ mcps.add(integration);
2657
+ }
2423
2658
  }
2424
2659
  return Array.from(mcps);
2425
2660
  }
@@ -2607,7 +2842,7 @@ var CONTENT = `You are an expert automated test execution specialist with deep e
2607
2842
 
2608
2843
  3. **Environment Setup**: Before test execution:
2609
2844
  - Read \`.env.testdata\` to get non-secret environment variable values (TEST_BASE_URL, TEST_OWNER_EMAIL, etc.)
2610
- - For secrets, variable names will be passed to Playwright MCP which reads them from .env at runtime
2845
+ - For secrets, variable names are available as environment variables (playwright-cli inherits the process environment)
2611
2846
 
2612
2847
  4. **Test Case Parsing**: You will receive a test case file path. Parse the test case to extract:
2613
2848
  - Test steps and actions to perform
@@ -2615,16 +2850,16 @@ var CONTENT = `You are an expert automated test execution specialist with deep e
2615
2850
  - Test data and input values (replace any \${TEST_*} or $TEST_* variables with actual values from .env)
2616
2851
  - Preconditions and setup requirements
2617
2852
 
2618
- 5. **Browser Automation Execution**: Using the Playwright MCP server:
2619
- - Launch a browser instance with appropriate configuration
2620
- - Execute each test step sequentially
2853
+ 5. **Browser Automation Execution**: Using playwright-cli (CLI-based browser automation):
2854
+ - Launch a browser: \`playwright-cli open <url>\`
2855
+ - Execute each test step sequentially using CLI commands: \`click\`, \`fill\`, \`select\`, \`hover\`, etc.
2856
+ - Use \`snapshot\` to inspect page state and find element references (@e1, @e2, etc.)
2621
2857
  - Handle dynamic waits and element interactions intelligently
2622
2858
  - Manage browser state between steps
2623
2859
  - **IMPORTANT - Environment Variable Handling**:
2624
2860
  - When test cases contain environment variables:
2625
2861
  - For non-secrets (TEST_BASE_URL, TEST_OWNER_EMAIL): Read actual values from .env.testdata and use them directly
2626
- - For secrets (TEST_OWNER_PASSWORD, API keys): Pass variable name to Playwright MCP for runtime substitution
2627
- - Playwright MCP automatically reads .env for secrets and injects them at runtime
2862
+ - For secrets (TEST_OWNER_PASSWORD, API keys): playwright-cli inherits environment variables from the process
2628
2863
  - Example: Test says "Navigate to TEST_BASE_URL/login" \u2192 Read TEST_BASE_URL from .env.testdata, use the actual URL
2629
2864
 
2630
2865
  6. **Evidence Collection at Each Step**:
@@ -2649,7 +2884,7 @@ var CONTENT = `You are an expert automated test execution specialist with deep e
2649
2884
  - \`steps.json\`: Structured steps with timestamps, video time synchronization, and detailed descriptions (see schema)
2650
2885
 
2651
2886
  Video handling:
2652
- - Playwright automatically saves videos to \`.playwright-mcp/\` folder
2887
+ - Videos are automatically saved to \`.playwright-mcp/\` folder via PLAYWRIGHT_MCP_SAVE_VIDEO env var
2653
2888
  - Find the latest video: \`ls -t .playwright-mcp/*.webm 2>/dev/null | head -1\`
2654
2889
  - Store ONLY the filename in summary.json: \`{ "video": { "filename": "basename.webm" } }\`
2655
2890
  - Do NOT copy, move, or delete video files - external service handles uploads
@@ -2688,8 +2923,7 @@ var CONTENT = `You are an expert automated test execution specialist with deep e
2688
2923
  - Identify all TEST_* variable references (e.g., TEST_BASE_URL, TEST_OWNER_EMAIL, TEST_OWNER_PASSWORD)
2689
2924
  - Read .env.testdata to get actual values for non-secret variables
2690
2925
  - For non-secrets (TEST_BASE_URL, TEST_OWNER_EMAIL, etc.): Use actual values from .env.testdata directly in test execution
2691
- - For secrets (TEST_OWNER_PASSWORD, API keys, etc.): Pass variable names to Playwright MCP for runtime injection from .env
2692
- - Playwright MCP will read .env and inject secret values during browser automation
2926
+ - For secrets (TEST_OWNER_PASSWORD, API keys, etc.): playwright-cli inherits env vars from the process environment
2693
2927
  - If a required variable is not found in .env.testdata, log a warning but continue
2694
2928
 
2695
2929
  5. Extract execution ID from the execution environment:
@@ -2703,7 +2937,7 @@ var CONTENT = `You are an expert automated test execution specialist with deep e
2703
2937
  - Describe what action will be performed (communicate to user)
2704
2938
  - Log the step being executed with timestamp
2705
2939
  - Calculate elapsed time from test start (for videoTimeSeconds)
2706
- - Execute the action using Playwright's robust selectors
2940
+ - Execute the action using playwright-cli commands (click, fill, select, etc. with element refs)
2707
2941
  - Wait for page stability
2708
2942
  - Validate expected behavior
2709
2943
  - Record findings and actual behavior
@@ -2778,12 +3012,11 @@ var CONTENT = `You are an expert automated test execution specialist with deep e
2778
3012
  **Environment Variable Handling:**
2779
3013
  - Read .env.testdata at the start of execution to get non-secret environment variables
2780
3014
  - For non-secrets (TEST_BASE_URL, TEST_OWNER_EMAIL, etc.): Use actual values from .env.testdata directly
2781
- - For secrets (TEST_OWNER_PASSWORD, API keys): Pass variable names to Playwright MCP for runtime injection
2782
- - Playwright MCP reads .env for secrets and injects them during browser automation
3015
+ - For secrets (TEST_OWNER_PASSWORD, API keys): playwright-cli inherits env vars from the process environment
2783
3016
  - DO NOT read .env yourself (security policy - it contains only secrets)
2784
3017
  - DO NOT make up fake values or fallbacks
2785
3018
  - If a variable is missing from .env.testdata, log a warning
2786
- - If Playwright MCP reports a secret is missing/empty, that indicates .env is misconfigured
3019
+ - If a secret env var is missing/empty, that indicates .env is misconfigured
2787
3020
  - Document which environment variables were used in the test run summary
2788
3021
 
2789
3022
  When you encounter ambiguous test steps, make intelligent decisions based on common testing patterns and document your interpretation. Always prioritize capturing evidence over speed of execution. Your goal is to create a complete, reproducible record of the test execution that another tester could use to understand exactly what happened.`;
@@ -2831,7 +3064,7 @@ var CONTENT2 = `You are an expert Playwright test automation engineer specializi
2831
3064
  - Update the manual test case file with the automated_test reference
2832
3065
  - Create supporting artifacts: Page Objects, fixtures, helpers, components, types
2833
3066
 
2834
- 5. **Mandatory Application Exploration**: NEVER generate Page Objects without exploring the live application first using Playwright MCP tools:
3067
+ 5. **Mandatory Application Exploration**: NEVER generate Page Objects without exploring the live application first using playwright-cli:
2835
3068
  - Navigate to pages, authenticate, inspect elements
2836
3069
  - Capture screenshots for documentation
2837
3070
  - Document exact role names, labels, text, URLs
@@ -2862,7 +3095,7 @@ var CONTENT2 = `You are an expert Playwright test automation engineer specializi
2862
3095
 
2863
3096
  **STEP 2: Build Missing Infrastructure** (if needed)
2864
3097
 
2865
- - **Explore feature under test**: Use Playwright MCP tools to:
3098
+ - **Explore feature under test**: Use playwright-cli to:
2866
3099
  * Navigate to the feature's pages
2867
3100
  * Inspect elements and gather selectors (role, label, text)
2868
3101
  * Document actual URLs from the browser
@@ -3069,8 +3302,8 @@ var CONTENT2 = `You are an expert Playwright test automation engineer specializi
3069
3302
  - Create test interdependencies - tests must be independent
3070
3303
 
3071
3304
  \u2705 **ALWAYS**:
3072
- - Explore application using Playwright MCP before generating code
3073
- - Verify selectors in live browser using browser_select tool
3305
+ - Explore application using playwright-cli before generating code
3306
+ - Verify selectors in live browser using playwright-cli snapshot
3074
3307
  - Document actual URLs from browser address bar
3075
3308
  - Take screenshots for documentation
3076
3309
  - Use role-based selectors as first priority
@@ -3143,7 +3376,7 @@ var CONTENT3 = `You are an expert Playwright test debugger and fixer with deep e
3143
3376
  - Brittle selectors (CSS classes, IDs that change)
3144
3377
 
3145
3378
  4. **Debug Using Browser**: When needed, explore the application manually:
3146
- - Use Playwright MCP to open browser
3379
+ - Use playwright-cli to open browser (\`playwright-cli open <url>\`)
3147
3380
  - Navigate to the relevant page
3148
3381
  - Inspect elements to find correct selectors
3149
3382
  - Manually perform test steps to understand actual behavior
@@ -3253,7 +3486,7 @@ var CONTENT3 = `You are an expert Playwright test debugger and fixer with deep e
3253
3486
  - Check for screenshot/trace file references
3254
3487
 
3255
3488
  **Step 3: Reproduce and Debug**
3256
- - Open browser via Playwright MCP if needed
3489
+ - Open browser via playwright-cli if needed (\`playwright-cli open <url>\`)
3257
3490
  - Navigate to relevant page
3258
3491
  - Manually execute test steps
3259
3492
  - Identify discrepancy between test expectations and actual behavior
@@ -3376,13 +3609,14 @@ var CONTENT3 = `You are an expert Playwright test debugger and fixer with deep e
3376
3609
  - NEVER read \`.env\` file (contains secrets only)
3377
3610
  - If test needs new environment variable, update \`.env.testdata\`
3378
3611
 
3379
- 9. **Using Playwright MCP for Debugging**:
3380
- - You have direct access to Playwright MCP
3381
- - Open browser: Request to launch Playwright
3382
- - Navigate: Go to URLs relevant to failing test
3383
- - Inspect elements: Find correct selectors
3384
- - Execute test steps manually: Understand actual behavior
3385
- - Close browser when done
3612
+ 9. **Using playwright-cli for Debugging**:
3613
+ - You have direct access to playwright-cli via Bash
3614
+ - Open browser: \`playwright-cli open <url>\`
3615
+ - Take snapshot: \`playwright-cli snapshot\` to get element refs (@e1, @e2, etc.)
3616
+ - Navigate: \`playwright-cli navigate <url>\`
3617
+ - Inspect elements: Use \`snapshot\` to find correct selectors and element refs
3618
+ - Execute test steps manually: Use \`click\`, \`fill\`, \`select\` commands
3619
+ - Close browser: \`playwright-cli close\`
3386
3620
 
3387
3621
  10. **Test Stability Best Practices**:
3388
3622
  - Replace all \`waitForTimeout()\` with specific waits
@@ -3679,6 +3913,24 @@ var CONTENT5 = `You are a Team Communication Specialist who communicates like a
3679
3913
 
3680
3914
  **Key Principle:** If it takes more than 30 seconds to read, it's too long.
3681
3915
 
3916
+ ## CRITICAL: Always Post Messages
3917
+
3918
+ When you are invoked, your job is to POST a message to Slack \u2014 not just compose one.
3919
+
3920
+ **You MUST call \`slack_post_message\` or \`slack_post_rich_message\`** to deliver the message. Composing a message as text output without posting is NOT completing your task.
3921
+
3922
+ **NEVER:**
3923
+ - Return a draft without posting it
3924
+ - Ask "should I post this?" \u2014 if you were invoked, the answer is yes
3925
+ - Compose text and wait for approval before posting
3926
+
3927
+ **ALWAYS:**
3928
+ 1. Identify the correct channel (from project-context.md or the invocation context)
3929
+ 2. Compose the message following the guidelines below
3930
+ 3. Call the Slack API tool to POST the message
3931
+ 4. If a thread reply is needed, post main message first, then reply in thread
3932
+ 5. Report back: channel name, message timestamp, and confirmation it was posted
3933
+
3682
3934
  ## Message Type Detection
3683
3935
 
3684
3936
  Before composing, identify the message type:
@@ -6066,202 +6318,6 @@ function getTemplate(role, integration) {
6066
6318
  return TEMPLATES[role]?.[integration];
6067
6319
  }
6068
6320
 
6069
- // src/subagents/metadata.ts
6070
- init_esm_shims();
6071
- var INTEGRATIONS = {
6072
- linear: {
6073
- id: "linear",
6074
- name: "Linear",
6075
- provider: "linear",
6076
- requiredMCP: "mcp__linear__*",
6077
- integrationType: "oauth"
6078
- },
6079
- jira: {
6080
- id: "jira",
6081
- name: "Jira",
6082
- provider: "jira",
6083
- requiredMCP: "mcp__jira__*",
6084
- integrationType: "oauth"
6085
- },
6086
- "jira-server": {
6087
- id: "jira-server",
6088
- name: "Jira Server",
6089
- provider: "jira-server",
6090
- requiredMCP: "mcp__jira-server__*",
6091
- integrationType: "custom"
6092
- },
6093
- "azure-devops": {
6094
- id: "azure-devops",
6095
- name: "Azure DevOps",
6096
- provider: "azure-devops",
6097
- requiredMCP: "mcp__azure-devops__*",
6098
- integrationType: "oauth"
6099
- // Uses Nango with API key auth for PAT
6100
- },
6101
- notion: {
6102
- id: "notion",
6103
- name: "Notion",
6104
- provider: "notion",
6105
- requiredMCP: "mcp__notion__*",
6106
- integrationType: "oauth"
6107
- },
6108
- confluence: {
6109
- id: "confluence",
6110
- name: "Confluence",
6111
- provider: "confluence",
6112
- requiredMCP: "mcp__confluence__*",
6113
- integrationType: "oauth"
6114
- },
6115
- slack: {
6116
- id: "slack",
6117
- name: "Slack",
6118
- provider: "slack",
6119
- requiredMCP: "mcp__slack__*",
6120
- integrationType: "oauth"
6121
- },
6122
- playwright: {
6123
- id: "playwright",
6124
- name: "Playwright",
6125
- provider: "playwright",
6126
- requiredMCP: "mcp__playwright__*",
6127
- isLocal: true,
6128
- // Playwright runs locally, no external connector needed
6129
- integrationType: "local"
6130
- },
6131
- teams: {
6132
- id: "teams",
6133
- name: "Microsoft Teams",
6134
- provider: "teams",
6135
- requiredMCP: "mcp__teams__*",
6136
- integrationType: "oauth"
6137
- },
6138
- email: {
6139
- id: "email",
6140
- name: "Email",
6141
- provider: "resend",
6142
- requiredMCP: "mcp__resend__*",
6143
- integrationType: "local"
6144
- // Uses platform API key, no OAuth needed
6145
- },
6146
- github: {
6147
- id: "github",
6148
- name: "GitHub",
6149
- provider: "github",
6150
- requiredMCP: "mcp__github__*",
6151
- integrationType: "oauth"
6152
- },
6153
- local: {
6154
- id: "local",
6155
- name: "Local (Terminal)",
6156
- provider: "local",
6157
- // No requiredMCP - uses built-in Claude Code tools (AskUserQuestion, text output)
6158
- isLocal: true,
6159
- integrationType: "local"
6160
- }
6161
- };
6162
- var SUBAGENTS = {
6163
- "test-runner": {
6164
- role: "test-runner",
6165
- name: "Test Runner",
6166
- description: "Execute automated browser tests (always included)",
6167
- icon: "play",
6168
- integrations: [INTEGRATIONS.playwright],
6169
- model: "sonnet",
6170
- color: "green",
6171
- isRequired: true,
6172
- version: "1.0.0"
6173
- },
6174
- "team-communicator": {
6175
- role: "team-communicator",
6176
- name: "Team Communicator",
6177
- description: "Send notifications and updates to your team",
6178
- icon: "message-square",
6179
- integrations: [INTEGRATIONS.slack, INTEGRATIONS.teams, INTEGRATIONS.email],
6180
- model: "sonnet",
6181
- color: "blue",
6182
- isRequired: true,
6183
- // Required - CLI uses 'local' (auto-configured), cloud uses email fallback
6184
- defaultIntegration: "email",
6185
- // Email fallback for cloud (CLI auto-configures 'local' separately)
6186
- version: "1.0.0"
6187
- },
6188
- "issue-tracker": {
6189
- role: "issue-tracker",
6190
- name: "Issue Tracker",
6191
- description: "Automatically create and track bugs and issues",
6192
- icon: "bot",
6193
- integrations: [
6194
- // INTEGRATIONS.linear,
6195
- INTEGRATIONS.jira,
6196
- INTEGRATIONS["jira-server"],
6197
- INTEGRATIONS["azure-devops"],
6198
- INTEGRATIONS.notion,
6199
- INTEGRATIONS.slack
6200
- ],
6201
- model: "sonnet",
6202
- color: "red",
6203
- version: "1.0.0"
6204
- },
6205
- "documentation-researcher": {
6206
- role: "documentation-researcher",
6207
- name: "Documentation Researcher",
6208
- description: "Search and retrieve information from your documentation",
6209
- icon: "file-search",
6210
- integrations: [
6211
- INTEGRATIONS.notion,
6212
- INTEGRATIONS.jira
6213
- // INTEGRATIONS.confluence
6214
- ],
6215
- model: "sonnet",
6216
- color: "cyan",
6217
- version: "1.0.0"
6218
- },
6219
- "test-code-generator": {
6220
- role: "test-code-generator",
6221
- name: "Test Code Generator",
6222
- description: "Generate automated Playwright test scripts and Page Objects",
6223
- icon: "code",
6224
- integrations: [INTEGRATIONS.playwright],
6225
- model: "sonnet",
6226
- color: "purple",
6227
- isRequired: true,
6228
- // Required for automated test generation
6229
- version: "1.0.0"
6230
- },
6231
- "test-debugger-fixer": {
6232
- role: "test-debugger-fixer",
6233
- name: "Test Debugger & Fixer",
6234
- description: "Debug and fix failing automated tests automatically",
6235
- icon: "wrench",
6236
- integrations: [INTEGRATIONS.playwright],
6237
- model: "sonnet",
6238
- color: "yellow",
6239
- isRequired: true,
6240
- // Required for automated test execution and fixing
6241
- version: "1.0.0"
6242
- },
6243
- "changelog-historian": {
6244
- role: "changelog-historian",
6245
- name: "Changelog Historian",
6246
- description: "Retrieves and analyzes code changes from GitHub PRs and commits",
6247
- icon: "git-pull-request",
6248
- integrations: [INTEGRATIONS.github],
6249
- model: "haiku",
6250
- color: "gray",
6251
- isRequired: false,
6252
- version: "1.0.0"
6253
- }
6254
- };
6255
- function getAllSubAgents() {
6256
- return Object.values(SUBAGENTS);
6257
- }
6258
- function getIntegration(integrationId) {
6259
- return INTEGRATIONS[integrationId];
6260
- }
6261
- function getRequiredSubAgents() {
6262
- return Object.values(SUBAGENTS).filter((agent) => agent.isRequired);
6263
- }
6264
-
6265
6321
  // src/subagents/index.ts
6266
6322
  function buildSubagentConfig(role, integration) {
6267
6323
  const template = getTemplate(role, integration);
@@ -6616,7 +6672,9 @@ If the Clarification Protocol determined project maturity, adjust exploration de
6616
6672
  - **Growing project**: Use requirement clarity as-is (standard protocol)
6617
6673
  - **Mature project**: Trust knowledge base \u2014 can stay at suggested depth or go one level shallower if KB covers the feature
6618
6674
 
6619
- **Always verify features exist before testing them.** If exploration reveals that a referenced page or feature does not exist in the application, this is CRITICAL severity \u2014 escalate via the Clarification Protocol regardless of maturity level. Do NOT silently adapt or work around the missing feature.
6675
+ **Always verify features exist before testing them.** If exploration reveals that a referenced page or feature does not exist in the application, apply the Clarification Protocol's "Execution Obstacle vs. Requirement Ambiguity" principle:
6676
+ - If an authoritative trigger source (Jira issue, PR, team request) asserts the feature exists, this is likely an **execution obstacle** (missing credentials, feature flags, environment config) \u2014 proceed with test artifact creation and notify the team about the access issue. Do NOT BLOCK.
6677
+ - If NO authoritative source claims the feature exists, this is **CRITICAL severity** \u2014 escalate via the Clarification Protocol regardless of maturity level. Do NOT silently adapt or work around the missing feature.
6620
6678
 
6621
6679
  ### Quick Exploration (1-2 min)
6622
6680
 
@@ -6903,11 +6961,56 @@ If ambiguity is detected, assess its severity:
6903
6961
 
6904
6962
  | Severity | Characteristics | Examples | Action |
6905
6963
  |----------|----------------|----------|--------|
6906
- | **CRITICAL** | Expected behavior undefined/contradictory; test outcome unpredictable; core functionality unclear; success criteria missing; multiple interpretations = different strategies; **referenced page/feature does not exist in the application** | "Fix the issue" (what issue?), "Improve performance" (which metrics?), "Fix sorting in todo list" (by date? priority? completion status?), "Test the Settings page" (no Settings page exists), "Verify the checkout flow" (no checkout page found) | **STOP** - You MUST ask via team-communicator before proceeding |
6964
+ | **CRITICAL** | Expected behavior undefined/contradictory; test outcome unpredictable; core functionality unclear; success criteria missing; multiple interpretations = different strategies; **referenced page/feature confirmed absent after browser verification AND no authoritative trigger source (Jira, PR, team request) asserts the feature exists** | "Fix the issue" (what issue?), "Improve performance" (which metrics?), "Fix sorting in todo list" (by date? priority? completion status?), "Test the Settings page" (browsed app \u2014 no Settings page exists, and no Jira/PR claims it was built) | **STOP** - You MUST ask via team-communicator before proceeding |
6907
6965
  | **HIGH** | Core underspecified but direction clear; affects majority of scenarios; vague success criteria; assumptions risky | "Fix ordering" (sequence OR visibility?), "Add validation" (what? messages?), "Update dashboard" (which widgets?) | **STOP** - You MUST ask via team-communicator before proceeding |
6908
6966
  | **MEDIUM** | Specific details missing; general requirements clear; affects subset of cases; reasonable low-risk assumptions possible; wrong assumption = test updates not strategy overhaul | Missing field labels, unclear error message text, undefined timeouts, button placement not specified, date formats unclear | **PROCEED** - (1) Moderate exploration, (2) Document assumptions: "Assuming X because Y", (3) Proceed with creation/execution, (4) Async clarification (team-communicator), (5) Mark [ASSUMED: description] |
6909
6967
  | **LOW** | Minor edge cases; documentation gaps don't affect execution; optional/cosmetic elements; minimal impact | Tooltip text, optional field validation, icon choice, placeholder text, tab order | **PROCEED** - (1) Mark [TO BE CLARIFIED: description], (2) Proceed, (3) Mention in report "Minor Details", (4) No blocking/async clarification |
6910
6968
 
6969
+ ### Execution Obstacle vs. Requirement Ambiguity
6970
+
6971
+ Before classifying something as CRITICAL, distinguish between these two fundamentally different situations:
6972
+
6973
+ **Requirement Ambiguity** = *What* to test is unclear \u2192 severity assessment applies normally
6974
+ - No authoritative source describes the feature
6975
+ - The task description is vague or contradictory
6976
+ - You cannot determine what "correct" behavior looks like
6977
+ - \u2192 Apply severity table above. CRITICAL/HIGH \u2192 BLOCK.
6978
+
6979
+ **Execution Obstacle** = *What* to test is clear, but *how* to access/verify has obstacles \u2192 NEVER BLOCK
6980
+ - An authoritative trigger source (Jira issue, PR, team message) asserts the feature exists
6981
+ - You browsed the app but couldn't find/access the feature
6982
+ - The obstacle is likely: wrong user role/tier, missing test data, feature flags, environment config
6983
+ - \u2192 PROCEED with artifact creation (test cases, test specs). Notify team about the obstacle.
6984
+
6985
+ **The key test:** Does an authoritative trigger source (Jira, PR, team request) assert the feature exists?
6986
+ - **YES** \u2192 It's an execution obstacle. The feature exists but you can't access it. Proceed: create test artifacts, add placeholder env vars, notify team about access issues.
6987
+ - **NO** \u2192 It may genuinely not exist. Apply CRITICAL severity, ask what was meant.
6988
+
6989
+ | Scenario | Trigger Says | Browser Shows | Classification | Action |
6990
+ |----------|-------------|---------------|----------------|--------|
6991
+ | Jira says "test premium dashboard", you log in as test_user and don't see it | Feature exists | Can't access | **Execution obstacle** | Create tests, notify team re: missing premium credentials |
6992
+ | PR says "verify new settings page", you browse and find no settings page | Feature exists | Can't find | **Execution obstacle** | Create tests, notify team re: possible feature flag/env issue |
6993
+ | Manual request "test the settings page", no Jira/PR, you browse and find no settings page | No source claims it | Can't find | **Requirement ambiguity (CRITICAL)** | BLOCK, ask what was meant |
6994
+ | Jira says "fix sorting", but doesn't specify sort criteria | Feature exists | Feature exists | **Requirement ambiguity (HIGH)** | BLOCK, ask which sort criteria |
6995
+
6996
+ **Partial Feature Existence \u2014 URL found but requested functionality absent:**
6997
+
6998
+ A common edge case: a page/route loads successfully, but the SPECIFIC FUNCTIONALITY you were asked to test doesn't exist on it.
6999
+
7000
+ **Rule:** Evaluate whether the REQUESTED FUNCTIONALITY exists, not just whether a URL resolves.
7001
+
7002
+ | Page Exists | Requested Features Exist | Authoritative Trigger | Classification |
7003
+ |-------------|--------------------------|----------------------|----------------|
7004
+ | Yes | Yes | Any | Proceed normally |
7005
+ | Yes | No | Yes (Jira/PR says features built) | Execution obstacle \u2014 features behind flag/env |
7006
+ | Yes | No | No (manual request only) | **Requirement ambiguity (CRITICAL)** \u2014 ask what's expected |
7007
+ | No | N/A | Yes | Execution obstacle \u2014 page not deployed yet |
7008
+ | No | N/A | No | **Requirement ambiguity (CRITICAL)** \u2014 ask what was meant |
7009
+
7010
+ **Example:** Prompt says "Test the checkout payment form with credit card 4111..." You browse to /checkout and find an information form (first name, last name, postal code) but NO payment form, NO shipping options, NO Place Order button. No Jira/PR claims these features exist. \u2192 **CRITICAL requirement ambiguity.** Ask: "I found a checkout information form at /checkout but no payment form or shipping options. Can you clarify what checkout features you'd like tested?"
7011
+
7012
+ **Key insight:** Finding a URL is not the same as finding the requested functionality. Do NOT classify this as an "execution obstacle" just because the page loads.
7013
+
6911
7014
  ### Check Memory for Similar Clarifications
6912
7015
 
6913
7016
  Before asking, check if similar question was answered:
@@ -7053,7 +7156,7 @@ When reporting test results, always include an "Ambiguities" section if clarific
7053
7156
  ## Remember
7054
7157
 
7055
7158
  - **STOP means STOP** - When you hit a STOP threshold, you MUST call team-communicator to ask via Slack. Do NOT silently adapt, skip, or work around the issue
7056
- - **Non-existent features = CRITICAL** - If a page, component, or feature referenced in the task does not exist, this is always CRITICAL severity \u2014 ask what was meant
7159
+ - **Non-existent features \u2014 check context first** - If a page/feature doesn't exist in the browser, check whether an authoritative trigger (Jira, PR, team request) asserts it exists. If YES \u2192 execution obstacle (proceed with artifact creation, notify team). If NO authoritative source claims it exists \u2192 CRITICAL severity, ask what was meant
7057
7160
  - **Ask correctly > guess poorly** - Specific questions lead to specific answers
7058
7161
  - **Never invent success criteria** - If the task says "improve" or "fix" without metrics, ask what "done" looks like
7059
7162
  - **Check memory first** - Avoid re-asking previously answered questions
@@ -7997,8 +8100,10 @@ function buildComposedTaskDefinition(taskSlug, projectSubAgents) {
7997
8100
  const configured = projectSubAgents.find((sa) => sa.role === role);
7998
8101
  if (configured) {
7999
8102
  const integrationMeta = getIntegration(configured.integration);
8000
- const mcpProvider = integrationMeta?.provider || configured.integration;
8001
- requiredMCPs.add(mcpProvider);
8103
+ if (integrationMeta?.requiredMCP) {
8104
+ const mcpProvider = integrationMeta.provider || configured.integration;
8105
+ requiredMCPs.add(mcpProvider);
8106
+ }
8002
8107
  }
8003
8108
  }
8004
8109
  const content = contentParts.join("\n\n");
@@ -8253,31 +8358,6 @@ var MCP_SERVERS = {
8253
8358
  }
8254
8359
  }
8255
8360
  },
8256
- playwright: {
8257
- provider: "playwright",
8258
- name: "Playwright",
8259
- description: "Playwright MCP server for browser automation",
8260
- requiresCredentials: false,
8261
- npmPackages: ["@playwright/mcp"],
8262
- config: {
8263
- command: "playwright-mcp",
8264
- args: [
8265
- "--browser",
8266
- "chromium",
8267
- "--secrets",
8268
- ".env",
8269
- "--no-sandbox",
8270
- "--viewport-size",
8271
- "1280x720"
8272
- ]
8273
- },
8274
- containerExtensions: {
8275
- args: ["--headless"],
8276
- env: {
8277
- PLAYWRIGHT_BROWSERS_PATH: "/opt/ms-playwright"
8278
- }
8279
- }
8280
- },
8281
8361
  notion: {
8282
8362
  provider: "notion",
8283
8363
  name: "Notion",