@bugzy-ai/bugzy 1.14.1 → 1.15.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.
@@ -24,9 +24,9 @@ var TASK_SLUGS = {
24
24
  var generateTestCasesTask = {
25
25
  slug: TASK_SLUGS.GENERATE_TEST_CASES,
26
26
  name: "Generate Test Cases",
27
- description: "Generate manual test case documentation AND automated Playwright test scripts from test plan",
27
+ description: "Generate manual test case documentation AND automated test scripts from test plan",
28
28
  frontmatter: {
29
- description: "Generate manual test case documentation AND automated Playwright test scripts from test plan",
29
+ description: "Generate manual test case documentation AND automated test scripts from test plan",
30
30
  "argument-hint": "--type [exploratory|functional|regression|smoke] --focus [optional-feature]"
31
31
  },
32
32
  steps: [
@@ -34,12 +34,12 @@ var generateTestCasesTask = {
34
34
  {
35
35
  inline: true,
36
36
  title: "Generate Test Cases Overview",
37
- content: `Generate comprehensive test artifacts including BOTH manual test case documentation AND automated Playwright test scripts.
37
+ content: `Generate comprehensive test artifacts including BOTH manual test case documentation AND automated test scripts. Read \`./tests/CLAUDE.md\` for framework-specific conventions, directory structure, and commands.
38
38
 
39
39
  This command generates:
40
40
  1. **Manual Test Case Documentation** (in \`./test-cases/\`) - Human-readable test cases in markdown format
41
- 2. **Automated Playwright Tests** (in \`./tests/specs/\`) - Executable TypeScript test scripts
42
- 3. **Page Object Models** (in \`./tests/pages/\`) - Reusable page classes for automated tests
41
+ 2. **Automated Test Scripts** (in directory from \`./tests/CLAUDE.md\`) - Executable test scripts
42
+ 3. **Page Objects** (in directory from \`./tests/CLAUDE.md\`) - Reusable page classes for automated tests
43
43
  4. **Supporting Files** (fixtures, helpers, components) - As needed for test automation`
44
44
  },
45
45
  // Step 2: Security Notice (library)
@@ -74,9 +74,9 @@ Read the test plan from \`test-plan.md\` to understand:
74
74
 
75
75
  **1.2 Check Existing Test Cases and Tests**
76
76
  - List all files in \`./test-cases/\` to understand existing manual test coverage
77
- - List all files in \`./tests/specs/\` to understand existing automated tests
77
+ - List existing automated tests in the test directory (see \`./tests/CLAUDE.md\` for structure)
78
78
  - Determine next test case ID (TC-XXX format)
79
- - Identify existing Page Objects in \`./tests/pages/\`
79
+ - Identify existing page objects (see \`./tests/CLAUDE.md\` for directory)
80
80
  - Avoid creating overlapping test cases or duplicate automation`
81
81
  },
82
82
  // Step 6: Documentation Researcher (conditional library step)
@@ -185,8 +185,8 @@ Before invoking the agent, identify the test cases for the current area:
185
185
  - Test type: {type}
186
186
  - Test plan: test-plan.md
187
187
  - Manual test cases directory: ./test-cases/
188
- - Existing automated tests: ./tests/specs/
189
- - Existing Page Objects: ./tests/pages/
188
+ - Existing automated tests: [directory from ./tests/CLAUDE.md]
189
+ - Existing page objects: [directory from ./tests/CLAUDE.md]
190
190
 
191
191
  **Knowledge Base Patterns (MUST APPLY):**
192
192
  Include ALL relevant testing patterns from the knowledge base that apply to this area. For example, if the KB documents timing behaviors (animation delays, loading states), selector gotchas, or recommended assertion approaches \u2014 list them here explicitly and instruct the agent to use the specific patterns described (e.g., specific assertion methods with specific timeouts). The test-code-generator does not have access to the knowledge base, so you MUST relay the exact patterns and recommended code approaches.
@@ -197,7 +197,7 @@ Include ALL relevant testing patterns from the knowledge base that apply to this
197
197
  3. Explore the feature area to understand implementation (gather selectors, URLs, flows)
198
198
  4. Build missing Page Objects and supporting code
199
199
  5. For each test case marked \`automated: true\`:
200
- - Create automated Playwright test in ./tests/specs/
200
+ - Create automated test in the test directory (from ./tests/CLAUDE.md)
201
201
  - Update the manual test case file to reference the automated test path
202
202
  - Apply ALL knowledge base patterns listed above (timing, selectors, assertions)
203
203
  6. Run and iterate on each test until it passes or fails with a product bug
@@ -228,15 +228,7 @@ Move to the next area and repeat until all areas are complete.
228
228
  {
229
229
  inline: true,
230
230
  title: "Create Directories if Needed",
231
- content: `Ensure required directories exist:
232
- \`\`\`bash
233
- mkdir -p ./test-cases
234
- mkdir -p ./tests/specs
235
- mkdir -p ./tests/pages
236
- mkdir -p ./tests/components
237
- mkdir -p ./tests/fixtures
238
- mkdir -p ./tests/helpers
239
- \`\`\``
231
+ content: `Ensure required directories exist. Create the \`./test-cases/\` directory for manual test cases, and create the test directories specified in \`./tests/CLAUDE.md\` (test specs, page objects, components, fixtures, helpers).`
240
232
  },
241
233
  // Step 14: Extract Env Variables (library)
242
234
  "extract-env-variables",
@@ -256,7 +248,7 @@ mkdir -p ./tests/helpers
256
248
  - Features covered by automation
257
249
  - Areas kept manual-only (and why)
258
250
  3. Highlight key automated test scenarios
259
- 4. Share command to run automated tests: npx playwright test
251
+ 4. Share command to run automated tests (from \`./tests/CLAUDE.md\`)
260
252
  5. Ask for team review and validation
261
253
  6. Mention any areas needing exploration or clarification
262
254
  7. Use appropriate channel and threading for the update
@@ -301,8 +293,8 @@ The team communication should include:
301
293
  - Areas kept manual-only (and why)
302
294
 
303
295
  **Next Steps:**
304
- - Command to run automated tests: \`npx playwright test\`
305
- - Instructions to run specific test file
296
+ - Command to run automated tests (from \`./tests/CLAUDE.md\`)
297
+ - Instructions to run specific test file (from \`./tests/CLAUDE.md\`)
306
298
  - Note about copying .env.testdata to .env
307
299
  - Mention any exploration needed for edge cases
308
300
 
@@ -318,7 +310,7 @@ The team communication should include:
318
310
  - **Test Independence**: Each test must be runnable in isolation and in parallel`
319
311
  }
320
312
  ],
321
- requiredSubagents: ["test-runner", "test-code-generator"],
313
+ requiredSubagents: ["browser-automation", "test-code-generator"],
322
314
  optionalSubagents: ["documentation-researcher", "team-communicator"],
323
315
  dependentTasks: []
324
316
  };
@@ -517,7 +509,7 @@ The team communication should include:
517
509
  - Instructions for the user to fill in actual values in .env.testdata before running tests`
518
510
  }
519
511
  ],
520
- requiredSubagents: ["test-runner"],
512
+ requiredSubagents: ["browser-automation"],
521
513
  optionalSubagents: ["documentation-researcher", "team-communicator"],
522
514
  dependentTasks: []
523
515
  };
@@ -1039,7 +1031,7 @@ After queuing and notifying, the task is DONE. Do NOT:
1039
1031
  - Execute /verify-changes, /run-tests, /generate-test-cases directly
1040
1032
  - Wait for team response (messaging infrastructure handles that)
1041
1033
  - Create or modify test files
1042
- - Run Playwright tests
1034
+ - Run automated tests
1043
1035
 
1044
1036
  #### 5.6 Update Event Processor Memory
1045
1037
  If new patterns discovered, append to \`.bugzy/runtime/memory/event-processor.md\`:
@@ -1146,10 +1138,10 @@ Create files if they don't exist:
1146
1138
  var runTestsTask = {
1147
1139
  slug: TASK_SLUGS.RUN_TESTS,
1148
1140
  name: "Run Tests",
1149
- description: "Execute automated Playwright tests, analyze failures, and fix test issues automatically",
1141
+ description: "Execute automated tests, analyze failures, and fix test issues automatically",
1150
1142
  frontmatter: {
1151
- description: "Execute automated Playwright tests, analyze failures, and fix test issues automatically",
1152
- "argument-hint": '[file-pattern|tag|all] (e.g., "auth", "@smoke", "tests/specs/login.spec.ts")'
1143
+ description: "Execute automated tests, analyze failures, and fix test issues automatically",
1144
+ "argument-hint": '[file-pattern|tag|all] (e.g., "auth", "@smoke", or a specific test file path)'
1153
1145
  },
1154
1146
  steps: [
1155
1147
  // Step 1: Overview (inline)
@@ -1158,7 +1150,7 @@ var runTestsTask = {
1158
1150
  title: "Run Tests Overview",
1159
1151
  content: `# Run Tests Command
1160
1152
 
1161
- Execute automated Playwright tests, analyze failures using JSON reports, automatically fix test issues, and log product bugs.`
1153
+ Execute automated tests, analyze failures using JSON reports, automatically fix test issues, and log product bugs. Read \`./tests/CLAUDE.md\` for framework-specific conventions and commands.`
1162
1154
  },
1163
1155
  // Step 2: Security Notice (library)
1164
1156
  "security-notice",
@@ -1171,9 +1163,9 @@ Execute automated Playwright tests, analyze failures using JSON reports, automat
1171
1163
  **Parse Arguments:**
1172
1164
  Extract the following from arguments:
1173
1165
  - **selector**: Test selection criteria
1174
- - File pattern: "auth" \u2192 finds tests/specs/**/*auth*.spec.ts
1175
- - Tag: "@smoke" \u2192 runs tests with @smoke annotation
1176
- - Specific file: "tests/specs/login.spec.ts"
1166
+ - File pattern: "auth" \u2192 find matching test files (see \`./tests/CLAUDE.md\` for directory structure)
1167
+ - Tag: "@smoke" \u2192 runs tests with tag annotation
1168
+ - Specific file: path to a specific test file
1177
1169
  - All tests: "all" or "" \u2192 runs entire test suite`
1178
1170
  },
1179
1171
  // Step 4: Load Project Context (library)
@@ -1189,34 +1181,26 @@ Extract the following from arguments:
1189
1181
  inline: true,
1190
1182
  title: "Identify Automated Tests to Run",
1191
1183
  content: `#### Understand Test Selection
1184
+
1185
+ Read \`./tests/CLAUDE.md\` for the test directory structure, file patterns, and execution commands.
1186
+
1192
1187
  Parse the selector argument to determine which tests to run:
1193
1188
 
1194
1189
  **File Pattern** (e.g., "auth", "login"):
1195
- - Find matching test files: \`tests/specs/**/*[pattern]*.spec.ts\`
1190
+ - Find matching test files in the test directory specified by \`./tests/CLAUDE.md\`
1196
1191
  - Example: "auth" \u2192 finds all test files with "auth" in the name
1197
1192
 
1198
1193
  **Tag** (e.g., "@smoke", "@regression"):
1199
- - Run tests with specific Playwright tag annotation
1200
- - Use Playwright's \`--grep\` option
1194
+ - Run tests with specific tag annotation using the tag command from \`./tests/CLAUDE.md\`
1201
1195
 
1202
- **Specific File** (e.g., "tests/specs/auth/login.spec.ts"):
1203
- - Run that specific test file
1196
+ **Specific File**:
1197
+ - Run that specific test file using the single-file command from \`./tests/CLAUDE.md\`
1204
1198
 
1205
1199
  **All Tests** ("all" or no selector):
1206
- - Run entire test suite: \`tests/specs/**/*.spec.ts\`
1200
+ - Run entire test suite using the run-all command from \`./tests/CLAUDE.md\`
1207
1201
 
1208
1202
  #### Find Matching Test Files
1209
- Use glob patterns to find test files:
1210
- \`\`\`bash
1211
- # For file pattern
1212
- ls tests/specs/**/*[pattern]*.spec.ts
1213
-
1214
- # For specific file
1215
- ls tests/specs/auth/login.spec.ts
1216
-
1217
- # For all tests
1218
- ls tests/specs/**/*.spec.ts
1219
- \`\`\`
1203
+ Use glob patterns to find test files in the directory structure defined by \`./tests/CLAUDE.md\`.
1220
1204
 
1221
1205
  #### Validate Test Files Exist
1222
1206
  Check that at least one test file was found:
@@ -1230,7 +1214,7 @@ Before running tests, confirm the selection with the user if ambiguous:
1230
1214
  - **No selector** (all tests): Confirm running full suite before executing`
1231
1215
  },
1232
1216
  // Step 7-10: Test Execution (library steps)
1233
- "run-playwright-tests",
1217
+ "run-tests",
1234
1218
  "parse-test-results",
1235
1219
  "triage-failures",
1236
1220
  "fix-test-issues",
@@ -1256,8 +1240,8 @@ If no test cases match the selection criteria:
1256
1240
  2. List available test cases or suggest running \`/generate-test-cases\` first
1257
1241
  3. Provide examples of valid selection criteria
1258
1242
 
1259
- #### If Test Runner Agent Fails
1260
- If the test-runner agent encounters issues:
1243
+ #### If Browser Automation Agent Fails
1244
+ If the browser-automation agent encounters issues:
1261
1245
  1. Report the specific error
1262
1246
  2. Suggest troubleshooting steps
1263
1247
  3. Offer to run tests individually if batch execution failed
@@ -1271,18 +1255,18 @@ If selected test cases have formatting issues:
1271
1255
  ### Important Notes
1272
1256
 
1273
1257
  **Test Selection Strategy**:
1274
- - **Always read** \`.bugzy/runtime/test-execution-strategy.md\` before selecting tests
1258
+ - **Always read** \`./tests/docs/test-execution-strategy.md\` before selecting tests
1275
1259
  - Default to \`@smoke\` tests for fast validation unless user explicitly requests otherwise
1276
1260
  - Smoke tests provide 100% manual test case coverage with zero redundancy (~2-5 min)
1277
1261
  - Full regression includes intentional redundancy for diagnostic value (~10-15 min)
1278
1262
  - Use context keywords from user request to choose appropriate tier
1279
1263
 
1280
1264
  **Test Execution**:
1281
- - Automated Playwright tests are executed via bash command, not through agents
1265
+ - Automated tests are executed via bash command, not through agents
1282
1266
  - Test execution time varies by tier (see strategy document for details)
1283
1267
  - JSON reports provide structured test results for analysis
1284
- - Playwright automatically captures traces, screenshots, and videos on failures
1285
- - Test artifacts are stored in test-results/ directory
1268
+ - Test framework may capture traces, screenshots, and videos on failures (see \`./tests/CLAUDE.md\`)
1269
+ - Test artifacts are stored as defined in \`./tests/CLAUDE.md\`
1286
1270
 
1287
1271
  **Failure Handling**:
1288
1272
  - Test failures are automatically triaged (product bugs vs test issues)
@@ -1292,11 +1276,11 @@ If selected test cases have formatting issues:
1292
1276
  - Critical failures trigger immediate team notification
1293
1277
 
1294
1278
  **Related Documentation**:
1295
- - \`.bugzy/runtime/test-execution-strategy.md\` - When and why to run specific tests
1296
- - \`.bugzy/runtime/testing-best-practices.md\` - How to write tests (patterns and anti-patterns)`
1279
+ - \`./tests/docs/test-execution-strategy.md\` - When and why to run specific tests
1280
+ - \`./tests/docs/testing-best-practices.md\` - How to write tests (patterns and anti-patterns)`
1297
1281
  }
1298
1282
  ],
1299
- requiredSubagents: ["test-runner", "test-debugger-fixer"],
1283
+ requiredSubagents: ["browser-automation", "test-debugger-fixer"],
1300
1284
  optionalSubagents: ["issue-tracker", "team-communicator"],
1301
1285
  dependentTasks: []
1302
1286
  };
@@ -1320,7 +1304,7 @@ var verifyChangesTask = {
1320
1304
  ## Overview
1321
1305
 
1322
1306
  This task performs comprehensive change verification with:
1323
- - **Automated testing**: Execute Playwright tests with automatic triage and fixing
1307
+ - **Automated testing**: Execute automated tests with automatic triage and fixing
1324
1308
  - **Manual verification checklists**: Generate role-specific checklists for non-automatable scenarios
1325
1309
  - **Multi-trigger support**: Works from manual CLI, Slack messages, GitHub PRs, and CI/CD
1326
1310
  - **Smart output routing**: Results formatted and delivered to the appropriate channel`
@@ -1551,11 +1535,11 @@ Analyze the change description to identify affected feature areas:
1551
1535
 
1552
1536
  | Description Keywords | Inferred Test Scope | Example |
1553
1537
  |---------------------|-------------------|---------|
1554
- | "login", "authentication", "sign in/up" | \`tests/specs/auth/\` | "Fix login page validation" -> Auth tests |
1555
- | "checkout", "payment", "purchase" | \`tests/specs/checkout/\` | "Optimize checkout flow" -> Checkout tests |
1556
- | "cart", "shopping cart", "add to cart" | \`tests/specs/cart/\` | "Update cart calculations" -> Cart tests |
1538
+ | "login", "authentication", "sign in/up" | Auth test suite | "Fix login page validation" -> Auth tests |
1539
+ | "checkout", "payment", "purchase" | Checkout test suite | "Optimize checkout flow" -> Checkout tests |
1540
+ | "cart", "shopping cart", "add to cart" | Cart test suite | "Update cart calculations" -> Cart tests |
1557
1541
  | "API", "endpoint", "backend" | API test suites | "Add new user API endpoint" -> User API tests |
1558
- | "profile", "account", "settings" | \`tests/specs/profile/\` or \`tests/specs/settings/\` | "Profile page redesign" -> Profile tests |
1542
+ | "profile", "account", "settings" | Profile/settings test suite | "Profile page redesign" -> Profile tests |
1559
1543
 
1560
1544
  **Inference strategy:**
1561
1545
  1. **Extract feature keywords** from PR title and description
@@ -1630,13 +1614,13 @@ If the Jira issue or PR references test accounts/data (e.g., TEST_PREMIUM_USER,
1630
1614
 
1631
1615
  **CRITICAL**: Never conclude "manual verification required" or "BLOCKED" solely because test data is missing. Always create the test artifacts first.
1632
1616
 
1633
- ### Generate Playwright Specs
1617
+ ### Generate Automated Test Specs
1634
1618
 
1635
1619
  {{INVOKE_TEST_CODE_GENERATOR}} to create automated test specs:
1636
1620
  - Read the manual test cases you just created
1637
1621
  - Explore the feature in the browser to discover selectors and flows
1638
- - Create Page Objects in \`./tests/pages/\` if needed
1639
- - Create test specs in \`./tests/specs/\` matching the test cases
1622
+ - Create page objects in the directory specified by \`./tests/CLAUDE.md\`
1623
+ - Create test specs in the directory specified by \`./tests/CLAUDE.md\`
1640
1624
  - Run each new test to verify it passes
1641
1625
  - Update the manual test case with \`automated_test\` reference
1642
1626
 
@@ -1646,7 +1630,7 @@ Skip this step \u2014 proceed directly to running existing tests.`,
1646
1630
  conditionalOnSubagent: "test-code-generator"
1647
1631
  },
1648
1632
  // Step 8-11: Test Execution (library steps)
1649
- "run-playwright-tests",
1633
+ "run-tests",
1650
1634
  "parse-test-results",
1651
1635
  "triage-failures",
1652
1636
  "fix-test-issues",
@@ -1835,7 +1819,7 @@ Post PR comment if GitHub context available.`,
1835
1819
  - Recommend: Check test configuration and prerequisites
1836
1820
 
1837
1821
  **If test execution fails:**
1838
- - Report specific error (Playwright not installed, env vars missing)
1822
+ - Report specific error (test framework not installed, env vars missing)
1839
1823
  - Suggest troubleshooting steps
1840
1824
  - Don't proceed with triage if tests didn't run
1841
1825
 
@@ -1865,7 +1849,7 @@ A successful verification includes:
1865
1849
  10. Clear recommendation provided (merge / review / block)`
1866
1850
  }
1867
1851
  ],
1868
- requiredSubagents: ["test-runner", "test-debugger-fixer"],
1852
+ requiredSubagents: ["browser-automation", "test-debugger-fixer"],
1869
1853
  optionalSubagents: ["documentation-researcher", "issue-tracker", "team-communicator", "changelog-historian", "test-code-generator"],
1870
1854
  dependentTasks: []
1871
1855
  };
@@ -1914,7 +1898,7 @@ This command orchestrates the complete test coverage workflow in a single execut
1914
1898
  },
1915
1899
  // Phase 2: Exploration Protocol
1916
1900
  "exploration-protocol",
1917
- // Execute exploration via test-runner
1901
+ // Execute exploration via browser-automation
1918
1902
  "create-exploration-test-case",
1919
1903
  "run-exploration",
1920
1904
  "process-exploration-results",
@@ -1925,7 +1909,7 @@ This command orchestrates the complete test coverage workflow in a single execut
1925
1909
  "generate-test-cases",
1926
1910
  "automate-test-cases",
1927
1911
  // Phase 5: Test Execution
1928
- "run-playwright-tests",
1912
+ "run-tests",
1929
1913
  "parse-test-results",
1930
1914
  // Phase 6: Triage and Fix (NEW - was missing from full-test-coverage)
1931
1915
  "triage-failures",
@@ -1942,7 +1926,7 @@ This command orchestrates the complete test coverage workflow in a single execut
1942
1926
  },
1943
1927
  "generate-final-report"
1944
1928
  ],
1945
- requiredSubagents: ["test-runner", "test-code-generator", "test-debugger-fixer"],
1929
+ requiredSubagents: ["browser-automation", "test-code-generator", "test-debugger-fixer"],
1946
1930
  optionalSubagents: ["documentation-researcher", "team-communicator", "issue-tracker"],
1947
1931
  dependentTasks: ["run-tests", "generate-test-cases"]
1948
1932
  };
@@ -1961,7 +1945,7 @@ var exploreApplicationTask = {
1961
1945
  {
1962
1946
  inline: true,
1963
1947
  title: "Explore Application Overview",
1964
- content: `Discover actual UI elements, workflows, and behaviors using the test-runner agent. Updates test plan and project documentation with findings.`
1948
+ content: `Discover actual UI elements, workflows, and behaviors using the browser-automation agent. Updates test plan and project documentation with findings.`
1965
1949
  },
1966
1950
  // Step 2: Security Notice (from library)
1967
1951
  "security-notice",
@@ -2008,7 +1992,7 @@ var exploreApplicationTask = {
2008
1992
  "cleanup-temp-files",
2009
1993
  "update-knowledge-base"
2010
1994
  ],
2011
- requiredSubagents: ["test-runner"],
1995
+ requiredSubagents: ["browser-automation"],
2012
1996
  optionalSubagents: ["team-communicator"],
2013
1997
  dependentTasks: []
2014
1998
  };