@bugzy-ai/bugzy 1.2.1 → 1.3.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/index.js CHANGED
@@ -653,7 +653,9 @@ Document all findings including:
653
653
  \`\`\`
654
654
 
655
655
  #### 3.2 Launch Test Runner Agent
656
- Invoke the test-runner agent with special exploration instructions:
656
+ {{INVOKE_TEST_RUNNER}}
657
+
658
+ Execute the exploration test case with special exploration instructions:
657
659
 
658
660
  \`\`\`
659
661
  Execute the exploration test case at ./test-cases/EXPLORATION-TEMP.md with focus on discovery and documentation.
@@ -1106,10 +1108,10 @@ Before invoking the agent, identify the test cases for the current area:
1106
1108
 
1107
1109
  #### Step 2.2: Invoke test-code-generator Agent
1108
1110
 
1109
- Use the test-code-generator agent for the current area with the following context:
1111
+ {{INVOKE_TEST_CODE_GENERATOR}} for the current area with the following context:
1110
1112
 
1111
1113
  **Agent Invocation:**
1112
- "Use the test-code-generator agent to automate test cases for the [AREA_NAME] area.
1114
+ "Automate test cases for the [AREA_NAME] area.
1113
1115
 
1114
1116
  **Context:**
1115
1117
  - Area: [AREA_NAME]
@@ -1249,10 +1251,10 @@ Provide a comprehensive summary showing:
1249
1251
  role: "documentation-researcher",
1250
1252
  contentBlock: `#### 1.4 Gather Product Documentation
1251
1253
 
1252
- Use the documentation-researcher agent to gather comprehensive product documentation:
1254
+ {{INVOKE_DOCUMENTATION_RESEARCHER}} to gather comprehensive product documentation:
1253
1255
 
1254
1256
  \`\`\`
1255
- Use the documentation-researcher agent to explore all available product documentation, specifically focusing on:
1257
+ Explore all available product documentation, specifically focusing on:
1256
1258
  - UI elements and workflows
1257
1259
  - User interactions and navigation paths
1258
1260
  - Form fields and validation rules
@@ -1266,10 +1268,9 @@ Use the documentation-researcher agent to explore all available product document
1266
1268
  role: "team-communicator",
1267
1269
  contentBlock: `### Step 4.5: Team Communication
1268
1270
 
1269
- Use the team-communicator agent to notify the product team about the new test cases and automated tests:
1271
+ {{INVOKE_TEAM_COMMUNICATOR}} to notify the product team about the new test cases and automated tests:
1270
1272
 
1271
1273
  \`\`\`
1272
- Use the team-communicator agent to:
1273
1274
  1. Post an update about test case and automation creation
1274
1275
  2. Provide summary of coverage:
1275
1276
  - Number of manual test cases created
@@ -1527,10 +1528,10 @@ Provide a summary of:
1527
1528
  role: "documentation-researcher",
1528
1529
  contentBlock: `### Step 2: Gather comprehensive project documentation
1529
1530
 
1530
- Use the documentation-researcher agent to explore and gather all available project information and other documentation sources. This ensures the test plan is based on complete and current information.
1531
+ {{INVOKE_DOCUMENTATION_RESEARCHER}} to explore and gather all available project information and other documentation sources. This ensures the test plan is based on complete and current information.
1531
1532
 
1532
1533
  \`\`\`
1533
- Use the documentation-researcher agent to explore all available project documentation related to: $ARGUMENTS
1534
+ Explore all available project documentation related to: $ARGUMENTS
1534
1535
 
1535
1536
  Specifically gather:
1536
1537
  - Product specifications and requirements
@@ -1555,10 +1556,9 @@ The agent will:
1555
1556
  role: "team-communicator",
1556
1557
  contentBlock: `### Step 7.5: Team Communication
1557
1558
 
1558
- Use the team-communicator agent to notify the product team about the new test plan:
1559
+ {{INVOKE_TEAM_COMMUNICATOR}} to notify the product team about the new test plan:
1559
1560
 
1560
1561
  \`\`\`
1561
- Use the team-communicator agent to:
1562
1562
  1. Post an update about the test plan creation
1563
1563
  2. Provide a brief summary of coverage areas and key features
1564
1564
  3. Mention any areas that need exploration or clarification
@@ -1793,7 +1793,7 @@ Classify the ambiguity level to determine appropriate response:
1793
1793
  #### Clarification Approach by Severity
1794
1794
 
1795
1795
  **For CRITICAL/HIGH ambiguity:**
1796
- 1. **Use team-communicator to ask specific questions**
1796
+ 1. **{{INVOKE_TEAM_COMMUNICATOR}} to ask specific questions**
1797
1797
  2. **WAIT for response before proceeding**
1798
1798
  3. **Document the clarification request in event history**
1799
1799
 
@@ -2066,7 +2066,7 @@ ${KNOWLEDGE_BASE_UPDATE_INSTRUCTIONS}`,
2066
2066
  contentBlock: `#### 3.3 Use Documentation Researcher if Needed
2067
2067
  For events mentioning unknown features or components:
2068
2068
  \`\`\`
2069
- Use documentation-researcher agent to find information about: [component/feature]
2069
+ {{INVOKE_DOCUMENTATION_RESEARCHER}} to find information about: [component/feature]
2070
2070
  \`\`\``
2071
2071
  },
2072
2072
  {
@@ -2075,7 +2075,7 @@ Use documentation-researcher agent to find information about: [component/feature
2075
2075
 
2076
2076
  When an issue needs to be tracked (task type: report_bug or update_story):
2077
2077
  \`\`\`
2078
- Use issue-tracker agent to:
2078
+ {{INVOKE_ISSUE_TRACKER}}
2079
2079
  1. Check for duplicate issues in the tracking system
2080
2080
  2. For bugs: Create detailed bug report with:
2081
2081
  - Clear, descriptive title
@@ -2344,7 +2344,7 @@ For each failed test:
2344
2344
  For each test classified as **[TEST ISSUE]**, use the test-debugger-fixer agent to automatically fix the test:
2345
2345
 
2346
2346
  \`\`\`
2347
- Use the test-debugger-fixer agent to fix test issues:
2347
+ {{INVOKE_TEST_DEBUGGER_FIXER}}
2348
2348
 
2349
2349
  For each failed test classified as a test issue (not a product bug), provide:
2350
2350
  - Test run timestamp: [from manifest.timestamp]
@@ -2439,7 +2439,7 @@ After triage in Step 5.1, for tests classified as **[PRODUCT BUG]**, use the iss
2439
2439
  For each bug to report, use the issue-tracker agent:
2440
2440
 
2441
2441
  \`\`\`
2442
- Use issue-tracker agent to:
2442
+ {{INVOKE_ISSUE_TRACKER}}
2443
2443
  1. Check for duplicate bugs in the tracking system
2444
2444
  - The agent will automatically search for similar existing issues
2445
2445
  - It maintains memory of recently reported issues
@@ -2510,10 +2510,11 @@ After issue tracker agent completes, create a summary:
2510
2510
  role: "team-communicator",
2511
2511
  contentBlock: `### Step 6: Team Communication
2512
2512
 
2513
- Use the team-communicator agent to notify the product team about test execution:
2513
+ {{INVOKE_TEAM_COMMUNICATOR}}
2514
+
2515
+ Notify the product team about test execution:
2514
2516
 
2515
2517
  \`\`\`
2516
- Use the team-communicator agent to:
2517
2518
  1. Post test execution summary with key statistics
2518
2519
  2. Highlight critical failures that need immediate attention
2519
2520
  3. Share important learnings about product behavior
@@ -2848,7 +2849,7 @@ Read and analyze the JSON report:
2848
2849
  For each test classified as **[TEST ISSUE]**, use the test-debugger-fixer agent to automatically fix the test:
2849
2850
 
2850
2851
  \`\`\`
2851
- Use the test-debugger-fixer agent to fix test issues:
2852
+ {{INVOKE_TEST_DEBUGGER_FIXER}}
2852
2853
 
2853
2854
  For each failed test classified as a test issue (not a product bug), provide:
2854
2855
  - Test file path: [from JSON report]
@@ -2889,7 +2890,7 @@ Classification guidelines:
2889
2890
  #### 4A.4 Fix Test Issues Automatically
2890
2891
 
2891
2892
  For tests classified as [TEST ISSUE]:
2892
- - Use test-debugger-fixer agent to analyze and fix
2893
+ - {{INVOKE_TEST_DEBUGGER_FIXER}} to analyze and fix
2893
2894
  - Agent debugs with browser if needed
2894
2895
  - Applies fix (selector update, wait condition, assertion correction)
2895
2896
  - Reruns test to verify fix (10x for flaky tests)
@@ -2905,7 +2906,7 @@ Track fixed tests with:
2905
2906
  {{ISSUE_TRACKER_INSTRUCTIONS}}
2906
2907
 
2907
2908
  For tests classified as [PRODUCT BUG]:
2908
- - Use issue-tracker agent to create bug reports
2909
+ - {{INVOKE_ISSUE_TRACKER}} to create bug reports
2909
2910
  - Agent checks for duplicates automatically
2910
2911
  - Creates detailed report with:
2911
2912
  - Title, description, reproduction steps
@@ -3221,10 +3222,10 @@ Format as comprehensive markdown report for terminal display:
3221
3222
 
3222
3223
  {{TEAM_COMMUNICATOR_INSTRUCTIONS}}
3223
3224
 
3224
- Use team-communicator agent to post concise results to Slack thread:
3225
+ {{INVOKE_TEAM_COMMUNICATOR}} to post concise results to Slack thread:
3225
3226
 
3226
3227
  \`\`\`
3227
- Use the team-communicator agent to post verification results.
3228
+ Post verification results.
3228
3229
 
3229
3230
  **Channel**: [from CHANGE_CONTEXT.slackChannel]
3230
3231
  **Thread**: [from CHANGE_CONTEXT.slackThread]
@@ -3405,10 +3406,10 @@ A successful verification includes:
3405
3406
  role: "documentation-researcher",
3406
3407
  contentBlock: `#### Research Project Documentation
3407
3408
 
3408
- Use the documentation-researcher agent to gather comprehensive context about the changed features:
3409
+ {{INVOKE_DOCUMENTATION_RESEARCHER}} to gather comprehensive context about the changed features:
3409
3410
 
3410
3411
  \`\`\`
3411
- Use the documentation-researcher agent to explore project documentation related to the changes.
3412
+ Explore project documentation related to the changes.
3412
3413
 
3413
3414
  Specifically gather:
3414
3415
  - Product specifications for affected features
@@ -3440,10 +3441,9 @@ Use this information to:
3440
3441
  role: "issue-tracker",
3441
3442
  contentBlock: `#### Log Product Bugs
3442
3443
 
3443
- For tests classified as **[PRODUCT BUG]**, use the issue-tracker agent to log bugs:
3444
+ For tests classified as **[PRODUCT BUG]**, {{INVOKE_ISSUE_TRACKER}} to log bugs:
3444
3445
 
3445
3446
  \`\`\`
3446
- Use issue-tracker agent to:
3447
3447
  1. Check for duplicate bugs in the tracking system
3448
3448
  - The agent will automatically search for similar existing issues
3449
3449
  - It maintains memory of recently reported issues
@@ -3492,10 +3492,9 @@ Use issue-tracker agent to:
3492
3492
  role: "team-communicator",
3493
3493
  contentBlock: `#### Team Communication
3494
3494
 
3495
- Use the team-communicator agent to share verification results (primarily for Slack trigger, but can be used for other triggers):
3495
+ {{INVOKE_TEAM_COMMUNICATOR}} to share verification results (primarily for Slack trigger, but can be used for other triggers):
3496
3496
 
3497
3497
  \`\`\`
3498
- Use the team-communicator agent to:
3499
3498
  1. Post verification results summary
3500
3499
  2. Highlight critical failures that need immediate attention
3501
3500
  3. Share bugs logged with issue tracker links
@@ -6230,6 +6229,62 @@ function buildSubagentsConfig(subagents) {
6230
6229
  return configs;
6231
6230
  }
6232
6231
 
6232
+ // src/core/tool-strings.ts
6233
+ var TOOL_STRINGS = {
6234
+ "claude-code": {
6235
+ INVOKE_TEST_RUNNER: "Use the test-runner subagent to execute the tests",
6236
+ INVOKE_TEST_DEBUGGER_FIXER: "Use the test-debugger-fixer subagent to debug and fix the failing test",
6237
+ INVOKE_TEST_CODE_GENERATOR: "Use the test-code-generator subagent to generate automated test code",
6238
+ INVOKE_TEAM_COMMUNICATOR: "Use the team-communicator subagent to notify the team",
6239
+ INVOKE_ISSUE_TRACKER: "Use the issue-tracker subagent to create or update issues",
6240
+ INVOKE_DOCUMENTATION_RESEARCHER: "Use the documentation-researcher subagent to search and gather documentation"
6241
+ },
6242
+ "cursor": {
6243
+ INVOKE_TEST_RUNNER: 'Run the test-runner agent:\n```bash\ncursor-agent -p "$(cat .cursor/agents/test-runner.md)" --output-format text\n```',
6244
+ INVOKE_TEST_DEBUGGER_FIXER: 'Run the test-debugger-fixer agent:\n```bash\ncursor-agent -p "$(cat .cursor/agents/test-debugger-fixer.md)" --output-format text\n```',
6245
+ INVOKE_TEST_CODE_GENERATOR: 'Run the test-code-generator agent:\n```bash\ncursor-agent -p "$(cat .cursor/agents/test-code-generator.md)" --output-format text\n```',
6246
+ INVOKE_TEAM_COMMUNICATOR: 'Run the team-communicator agent:\n```bash\ncursor-agent -p "$(cat .cursor/agents/team-communicator.md)" --output-format text\n```',
6247
+ INVOKE_ISSUE_TRACKER: 'Run the issue-tracker agent:\n```bash\ncursor-agent -p "$(cat .cursor/agents/issue-tracker.md)" --output-format text\n```',
6248
+ INVOKE_DOCUMENTATION_RESEARCHER: 'Run the documentation-researcher agent:\n```bash\ncursor-agent -p "$(cat .cursor/agents/documentation-researcher.md)" --output-format text\n```'
6249
+ },
6250
+ "codex": {
6251
+ INVOKE_TEST_RUNNER: 'Run the test-runner agent:\n```bash\ncodex -p "$(cat .codex/agents/test-runner.md)"\n```',
6252
+ INVOKE_TEST_DEBUGGER_FIXER: 'Run the test-debugger-fixer agent:\n```bash\ncodex -p "$(cat .codex/agents/test-debugger-fixer.md)"\n```',
6253
+ INVOKE_TEST_CODE_GENERATOR: 'Run the test-code-generator agent:\n```bash\ncodex -p "$(cat .codex/agents/test-code-generator.md)"\n```',
6254
+ INVOKE_TEAM_COMMUNICATOR: 'Run the team-communicator agent:\n```bash\ncodex -p "$(cat .codex/agents/team-communicator.md)"\n```',
6255
+ INVOKE_ISSUE_TRACKER: 'Run the issue-tracker agent:\n```bash\ncodex -p "$(cat .codex/agents/issue-tracker.md)"\n```',
6256
+ INVOKE_DOCUMENTATION_RESEARCHER: 'Run the documentation-researcher agent:\n```bash\ncodex -p "$(cat .codex/agents/documentation-researcher.md)"\n```'
6257
+ }
6258
+ };
6259
+ function getToolString(toolId, key) {
6260
+ const toolStrings = TOOL_STRINGS[toolId];
6261
+ if (!toolStrings) {
6262
+ throw new Error(`Unknown tool: ${toolId}`);
6263
+ }
6264
+ const value = toolStrings[key];
6265
+ if (!value) {
6266
+ throw new Error(`Unknown string key: ${key} for tool: ${toolId}`);
6267
+ }
6268
+ return value;
6269
+ }
6270
+ function replaceInvocationPlaceholders(content, toolId) {
6271
+ let result = content;
6272
+ const keys = [
6273
+ "INVOKE_TEST_RUNNER",
6274
+ "INVOKE_TEST_DEBUGGER_FIXER",
6275
+ "INVOKE_TEST_CODE_GENERATOR",
6276
+ "INVOKE_TEAM_COMMUNICATOR",
6277
+ "INVOKE_ISSUE_TRACKER",
6278
+ "INVOKE_DOCUMENTATION_RESEARCHER"
6279
+ ];
6280
+ for (const key of keys) {
6281
+ const placeholder = `{{${key}}}`;
6282
+ const replacement = getToolString(toolId, key);
6283
+ result = result.replace(new RegExp(placeholder, "g"), replacement);
6284
+ }
6285
+ return result;
6286
+ }
6287
+
6233
6288
  // src/core/registry.ts
6234
6289
  async function getAgentConfiguration(taskDefinitions, projectSubAgents) {
6235
6290
  const taskSlugs = taskDefinitions.map((t) => t.slug);
@@ -6241,7 +6296,7 @@ async function getAgentConfiguration(taskDefinitions, projectSubAgents) {
6241
6296
  taskDefinitions.forEach((task) => {
6242
6297
  slashCommands[task.slug] = {
6243
6298
  frontmatter: task.frontmatter,
6244
- content: task.content
6299
+ content: replaceInvocationPlaceholders(task.content, "claude-code")
6245
6300
  };
6246
6301
  });
6247
6302
  const allRoles = /* @__PURE__ */ new Set();