@bugzy-ai/bugzy 1.2.0 → 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/README.md +49 -27
- package/dist/cli/index.cjs +492 -144
- package/dist/cli/index.cjs.map +1 -1
- package/dist/cli/index.js +495 -147
- package/dist/cli/index.js.map +1 -1
- package/dist/index.cjs +85 -30
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +85 -30
- package/dist/index.js.map +1 -1
- package/dist/tasks/index.cjs +28 -29
- package/dist/tasks/index.cjs.map +1 -1
- package/dist/tasks/index.js +28 -29
- package/dist/tasks/index.js.map +1 -1
- package/package.json +1 -1
- package/templates/init/AGENTS.md +155 -0
package/dist/index.cjs
CHANGED
|
@@ -708,7 +708,9 @@ Document all findings including:
|
|
|
708
708
|
\`\`\`
|
|
709
709
|
|
|
710
710
|
#### 3.2 Launch Test Runner Agent
|
|
711
|
-
|
|
711
|
+
{{INVOKE_TEST_RUNNER}}
|
|
712
|
+
|
|
713
|
+
Execute the exploration test case with special exploration instructions:
|
|
712
714
|
|
|
713
715
|
\`\`\`
|
|
714
716
|
Execute the exploration test case at ./test-cases/EXPLORATION-TEMP.md with focus on discovery and documentation.
|
|
@@ -1161,10 +1163,10 @@ Before invoking the agent, identify the test cases for the current area:
|
|
|
1161
1163
|
|
|
1162
1164
|
#### Step 2.2: Invoke test-code-generator Agent
|
|
1163
1165
|
|
|
1164
|
-
|
|
1166
|
+
{{INVOKE_TEST_CODE_GENERATOR}} for the current area with the following context:
|
|
1165
1167
|
|
|
1166
1168
|
**Agent Invocation:**
|
|
1167
|
-
"
|
|
1169
|
+
"Automate test cases for the [AREA_NAME] area.
|
|
1168
1170
|
|
|
1169
1171
|
**Context:**
|
|
1170
1172
|
- Area: [AREA_NAME]
|
|
@@ -1304,10 +1306,10 @@ Provide a comprehensive summary showing:
|
|
|
1304
1306
|
role: "documentation-researcher",
|
|
1305
1307
|
contentBlock: `#### 1.4 Gather Product Documentation
|
|
1306
1308
|
|
|
1307
|
-
|
|
1309
|
+
{{INVOKE_DOCUMENTATION_RESEARCHER}} to gather comprehensive product documentation:
|
|
1308
1310
|
|
|
1309
1311
|
\`\`\`
|
|
1310
|
-
|
|
1312
|
+
Explore all available product documentation, specifically focusing on:
|
|
1311
1313
|
- UI elements and workflows
|
|
1312
1314
|
- User interactions and navigation paths
|
|
1313
1315
|
- Form fields and validation rules
|
|
@@ -1321,10 +1323,9 @@ Use the documentation-researcher agent to explore all available product document
|
|
|
1321
1323
|
role: "team-communicator",
|
|
1322
1324
|
contentBlock: `### Step 4.5: Team Communication
|
|
1323
1325
|
|
|
1324
|
-
|
|
1326
|
+
{{INVOKE_TEAM_COMMUNICATOR}} to notify the product team about the new test cases and automated tests:
|
|
1325
1327
|
|
|
1326
1328
|
\`\`\`
|
|
1327
|
-
Use the team-communicator agent to:
|
|
1328
1329
|
1. Post an update about test case and automation creation
|
|
1329
1330
|
2. Provide summary of coverage:
|
|
1330
1331
|
- Number of manual test cases created
|
|
@@ -1582,10 +1583,10 @@ Provide a summary of:
|
|
|
1582
1583
|
role: "documentation-researcher",
|
|
1583
1584
|
contentBlock: `### Step 2: Gather comprehensive project documentation
|
|
1584
1585
|
|
|
1585
|
-
|
|
1586
|
+
{{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.
|
|
1586
1587
|
|
|
1587
1588
|
\`\`\`
|
|
1588
|
-
|
|
1589
|
+
Explore all available project documentation related to: $ARGUMENTS
|
|
1589
1590
|
|
|
1590
1591
|
Specifically gather:
|
|
1591
1592
|
- Product specifications and requirements
|
|
@@ -1610,10 +1611,9 @@ The agent will:
|
|
|
1610
1611
|
role: "team-communicator",
|
|
1611
1612
|
contentBlock: `### Step 7.5: Team Communication
|
|
1612
1613
|
|
|
1613
|
-
|
|
1614
|
+
{{INVOKE_TEAM_COMMUNICATOR}} to notify the product team about the new test plan:
|
|
1614
1615
|
|
|
1615
1616
|
\`\`\`
|
|
1616
|
-
Use the team-communicator agent to:
|
|
1617
1617
|
1. Post an update about the test plan creation
|
|
1618
1618
|
2. Provide a brief summary of coverage areas and key features
|
|
1619
1619
|
3. Mention any areas that need exploration or clarification
|
|
@@ -1848,7 +1848,7 @@ Classify the ambiguity level to determine appropriate response:
|
|
|
1848
1848
|
#### Clarification Approach by Severity
|
|
1849
1849
|
|
|
1850
1850
|
**For CRITICAL/HIGH ambiguity:**
|
|
1851
|
-
1. **
|
|
1851
|
+
1. **{{INVOKE_TEAM_COMMUNICATOR}} to ask specific questions**
|
|
1852
1852
|
2. **WAIT for response before proceeding**
|
|
1853
1853
|
3. **Document the clarification request in event history**
|
|
1854
1854
|
|
|
@@ -2121,7 +2121,7 @@ ${KNOWLEDGE_BASE_UPDATE_INSTRUCTIONS}`,
|
|
|
2121
2121
|
contentBlock: `#### 3.3 Use Documentation Researcher if Needed
|
|
2122
2122
|
For events mentioning unknown features or components:
|
|
2123
2123
|
\`\`\`
|
|
2124
|
-
|
|
2124
|
+
{{INVOKE_DOCUMENTATION_RESEARCHER}} to find information about: [component/feature]
|
|
2125
2125
|
\`\`\``
|
|
2126
2126
|
},
|
|
2127
2127
|
{
|
|
@@ -2130,7 +2130,7 @@ Use documentation-researcher agent to find information about: [component/feature
|
|
|
2130
2130
|
|
|
2131
2131
|
When an issue needs to be tracked (task type: report_bug or update_story):
|
|
2132
2132
|
\`\`\`
|
|
2133
|
-
|
|
2133
|
+
{{INVOKE_ISSUE_TRACKER}}
|
|
2134
2134
|
1. Check for duplicate issues in the tracking system
|
|
2135
2135
|
2. For bugs: Create detailed bug report with:
|
|
2136
2136
|
- Clear, descriptive title
|
|
@@ -2399,7 +2399,7 @@ For each failed test:
|
|
|
2399
2399
|
For each test classified as **[TEST ISSUE]**, use the test-debugger-fixer agent to automatically fix the test:
|
|
2400
2400
|
|
|
2401
2401
|
\`\`\`
|
|
2402
|
-
|
|
2402
|
+
{{INVOKE_TEST_DEBUGGER_FIXER}}
|
|
2403
2403
|
|
|
2404
2404
|
For each failed test classified as a test issue (not a product bug), provide:
|
|
2405
2405
|
- Test run timestamp: [from manifest.timestamp]
|
|
@@ -2494,7 +2494,7 @@ After triage in Step 5.1, for tests classified as **[PRODUCT BUG]**, use the iss
|
|
|
2494
2494
|
For each bug to report, use the issue-tracker agent:
|
|
2495
2495
|
|
|
2496
2496
|
\`\`\`
|
|
2497
|
-
|
|
2497
|
+
{{INVOKE_ISSUE_TRACKER}}
|
|
2498
2498
|
1. Check for duplicate bugs in the tracking system
|
|
2499
2499
|
- The agent will automatically search for similar existing issues
|
|
2500
2500
|
- It maintains memory of recently reported issues
|
|
@@ -2565,10 +2565,11 @@ After issue tracker agent completes, create a summary:
|
|
|
2565
2565
|
role: "team-communicator",
|
|
2566
2566
|
contentBlock: `### Step 6: Team Communication
|
|
2567
2567
|
|
|
2568
|
-
|
|
2568
|
+
{{INVOKE_TEAM_COMMUNICATOR}}
|
|
2569
|
+
|
|
2570
|
+
Notify the product team about test execution:
|
|
2569
2571
|
|
|
2570
2572
|
\`\`\`
|
|
2571
|
-
Use the team-communicator agent to:
|
|
2572
2573
|
1. Post test execution summary with key statistics
|
|
2573
2574
|
2. Highlight critical failures that need immediate attention
|
|
2574
2575
|
3. Share important learnings about product behavior
|
|
@@ -2903,7 +2904,7 @@ Read and analyze the JSON report:
|
|
|
2903
2904
|
For each test classified as **[TEST ISSUE]**, use the test-debugger-fixer agent to automatically fix the test:
|
|
2904
2905
|
|
|
2905
2906
|
\`\`\`
|
|
2906
|
-
|
|
2907
|
+
{{INVOKE_TEST_DEBUGGER_FIXER}}
|
|
2907
2908
|
|
|
2908
2909
|
For each failed test classified as a test issue (not a product bug), provide:
|
|
2909
2910
|
- Test file path: [from JSON report]
|
|
@@ -2944,7 +2945,7 @@ Classification guidelines:
|
|
|
2944
2945
|
#### 4A.4 Fix Test Issues Automatically
|
|
2945
2946
|
|
|
2946
2947
|
For tests classified as [TEST ISSUE]:
|
|
2947
|
-
-
|
|
2948
|
+
- {{INVOKE_TEST_DEBUGGER_FIXER}} to analyze and fix
|
|
2948
2949
|
- Agent debugs with browser if needed
|
|
2949
2950
|
- Applies fix (selector update, wait condition, assertion correction)
|
|
2950
2951
|
- Reruns test to verify fix (10x for flaky tests)
|
|
@@ -2960,7 +2961,7 @@ Track fixed tests with:
|
|
|
2960
2961
|
{{ISSUE_TRACKER_INSTRUCTIONS}}
|
|
2961
2962
|
|
|
2962
2963
|
For tests classified as [PRODUCT BUG]:
|
|
2963
|
-
-
|
|
2964
|
+
- {{INVOKE_ISSUE_TRACKER}} to create bug reports
|
|
2964
2965
|
- Agent checks for duplicates automatically
|
|
2965
2966
|
- Creates detailed report with:
|
|
2966
2967
|
- Title, description, reproduction steps
|
|
@@ -3276,10 +3277,10 @@ Format as comprehensive markdown report for terminal display:
|
|
|
3276
3277
|
|
|
3277
3278
|
{{TEAM_COMMUNICATOR_INSTRUCTIONS}}
|
|
3278
3279
|
|
|
3279
|
-
|
|
3280
|
+
{{INVOKE_TEAM_COMMUNICATOR}} to post concise results to Slack thread:
|
|
3280
3281
|
|
|
3281
3282
|
\`\`\`
|
|
3282
|
-
|
|
3283
|
+
Post verification results.
|
|
3283
3284
|
|
|
3284
3285
|
**Channel**: [from CHANGE_CONTEXT.slackChannel]
|
|
3285
3286
|
**Thread**: [from CHANGE_CONTEXT.slackThread]
|
|
@@ -3460,10 +3461,10 @@ A successful verification includes:
|
|
|
3460
3461
|
role: "documentation-researcher",
|
|
3461
3462
|
contentBlock: `#### Research Project Documentation
|
|
3462
3463
|
|
|
3463
|
-
|
|
3464
|
+
{{INVOKE_DOCUMENTATION_RESEARCHER}} to gather comprehensive context about the changed features:
|
|
3464
3465
|
|
|
3465
3466
|
\`\`\`
|
|
3466
|
-
|
|
3467
|
+
Explore project documentation related to the changes.
|
|
3467
3468
|
|
|
3468
3469
|
Specifically gather:
|
|
3469
3470
|
- Product specifications for affected features
|
|
@@ -3495,10 +3496,9 @@ Use this information to:
|
|
|
3495
3496
|
role: "issue-tracker",
|
|
3496
3497
|
contentBlock: `#### Log Product Bugs
|
|
3497
3498
|
|
|
3498
|
-
For tests classified as **[PRODUCT BUG]**,
|
|
3499
|
+
For tests classified as **[PRODUCT BUG]**, {{INVOKE_ISSUE_TRACKER}} to log bugs:
|
|
3499
3500
|
|
|
3500
3501
|
\`\`\`
|
|
3501
|
-
Use issue-tracker agent to:
|
|
3502
3502
|
1. Check for duplicate bugs in the tracking system
|
|
3503
3503
|
- The agent will automatically search for similar existing issues
|
|
3504
3504
|
- It maintains memory of recently reported issues
|
|
@@ -3547,10 +3547,9 @@ Use issue-tracker agent to:
|
|
|
3547
3547
|
role: "team-communicator",
|
|
3548
3548
|
contentBlock: `#### Team Communication
|
|
3549
3549
|
|
|
3550
|
-
|
|
3550
|
+
{{INVOKE_TEAM_COMMUNICATOR}} to share verification results (primarily for Slack trigger, but can be used for other triggers):
|
|
3551
3551
|
|
|
3552
3552
|
\`\`\`
|
|
3553
|
-
Use the team-communicator agent to:
|
|
3554
3553
|
1. Post verification results summary
|
|
3555
3554
|
2. Highlight critical failures that need immediate attention
|
|
3556
3555
|
3. Share bugs logged with issue tracker links
|
|
@@ -6285,6 +6284,62 @@ function buildSubagentsConfig(subagents) {
|
|
|
6285
6284
|
return configs;
|
|
6286
6285
|
}
|
|
6287
6286
|
|
|
6287
|
+
// src/core/tool-strings.ts
|
|
6288
|
+
var TOOL_STRINGS = {
|
|
6289
|
+
"claude-code": {
|
|
6290
|
+
INVOKE_TEST_RUNNER: "Use the test-runner subagent to execute the tests",
|
|
6291
|
+
INVOKE_TEST_DEBUGGER_FIXER: "Use the test-debugger-fixer subagent to debug and fix the failing test",
|
|
6292
|
+
INVOKE_TEST_CODE_GENERATOR: "Use the test-code-generator subagent to generate automated test code",
|
|
6293
|
+
INVOKE_TEAM_COMMUNICATOR: "Use the team-communicator subagent to notify the team",
|
|
6294
|
+
INVOKE_ISSUE_TRACKER: "Use the issue-tracker subagent to create or update issues",
|
|
6295
|
+
INVOKE_DOCUMENTATION_RESEARCHER: "Use the documentation-researcher subagent to search and gather documentation"
|
|
6296
|
+
},
|
|
6297
|
+
"cursor": {
|
|
6298
|
+
INVOKE_TEST_RUNNER: 'Run the test-runner agent:\n```bash\ncursor-agent -p "$(cat .cursor/agents/test-runner.md)" --output-format text\n```',
|
|
6299
|
+
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```',
|
|
6300
|
+
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```',
|
|
6301
|
+
INVOKE_TEAM_COMMUNICATOR: 'Run the team-communicator agent:\n```bash\ncursor-agent -p "$(cat .cursor/agents/team-communicator.md)" --output-format text\n```',
|
|
6302
|
+
INVOKE_ISSUE_TRACKER: 'Run the issue-tracker agent:\n```bash\ncursor-agent -p "$(cat .cursor/agents/issue-tracker.md)" --output-format text\n```',
|
|
6303
|
+
INVOKE_DOCUMENTATION_RESEARCHER: 'Run the documentation-researcher agent:\n```bash\ncursor-agent -p "$(cat .cursor/agents/documentation-researcher.md)" --output-format text\n```'
|
|
6304
|
+
},
|
|
6305
|
+
"codex": {
|
|
6306
|
+
INVOKE_TEST_RUNNER: 'Run the test-runner agent:\n```bash\ncodex -p "$(cat .codex/agents/test-runner.md)"\n```',
|
|
6307
|
+
INVOKE_TEST_DEBUGGER_FIXER: 'Run the test-debugger-fixer agent:\n```bash\ncodex -p "$(cat .codex/agents/test-debugger-fixer.md)"\n```',
|
|
6308
|
+
INVOKE_TEST_CODE_GENERATOR: 'Run the test-code-generator agent:\n```bash\ncodex -p "$(cat .codex/agents/test-code-generator.md)"\n```',
|
|
6309
|
+
INVOKE_TEAM_COMMUNICATOR: 'Run the team-communicator agent:\n```bash\ncodex -p "$(cat .codex/agents/team-communicator.md)"\n```',
|
|
6310
|
+
INVOKE_ISSUE_TRACKER: 'Run the issue-tracker agent:\n```bash\ncodex -p "$(cat .codex/agents/issue-tracker.md)"\n```',
|
|
6311
|
+
INVOKE_DOCUMENTATION_RESEARCHER: 'Run the documentation-researcher agent:\n```bash\ncodex -p "$(cat .codex/agents/documentation-researcher.md)"\n```'
|
|
6312
|
+
}
|
|
6313
|
+
};
|
|
6314
|
+
function getToolString(toolId, key) {
|
|
6315
|
+
const toolStrings = TOOL_STRINGS[toolId];
|
|
6316
|
+
if (!toolStrings) {
|
|
6317
|
+
throw new Error(`Unknown tool: ${toolId}`);
|
|
6318
|
+
}
|
|
6319
|
+
const value = toolStrings[key];
|
|
6320
|
+
if (!value) {
|
|
6321
|
+
throw new Error(`Unknown string key: ${key} for tool: ${toolId}`);
|
|
6322
|
+
}
|
|
6323
|
+
return value;
|
|
6324
|
+
}
|
|
6325
|
+
function replaceInvocationPlaceholders(content, toolId) {
|
|
6326
|
+
let result = content;
|
|
6327
|
+
const keys = [
|
|
6328
|
+
"INVOKE_TEST_RUNNER",
|
|
6329
|
+
"INVOKE_TEST_DEBUGGER_FIXER",
|
|
6330
|
+
"INVOKE_TEST_CODE_GENERATOR",
|
|
6331
|
+
"INVOKE_TEAM_COMMUNICATOR",
|
|
6332
|
+
"INVOKE_ISSUE_TRACKER",
|
|
6333
|
+
"INVOKE_DOCUMENTATION_RESEARCHER"
|
|
6334
|
+
];
|
|
6335
|
+
for (const key of keys) {
|
|
6336
|
+
const placeholder = `{{${key}}}`;
|
|
6337
|
+
const replacement = getToolString(toolId, key);
|
|
6338
|
+
result = result.replace(new RegExp(placeholder, "g"), replacement);
|
|
6339
|
+
}
|
|
6340
|
+
return result;
|
|
6341
|
+
}
|
|
6342
|
+
|
|
6288
6343
|
// src/core/registry.ts
|
|
6289
6344
|
async function getAgentConfiguration(taskDefinitions, projectSubAgents) {
|
|
6290
6345
|
const taskSlugs = taskDefinitions.map((t) => t.slug);
|
|
@@ -6296,7 +6351,7 @@ async function getAgentConfiguration(taskDefinitions, projectSubAgents) {
|
|
|
6296
6351
|
taskDefinitions.forEach((task) => {
|
|
6297
6352
|
slashCommands[task.slug] = {
|
|
6298
6353
|
frontmatter: task.frontmatter,
|
|
6299
|
-
content: task.content
|
|
6354
|
+
content: replaceInvocationPlaceholders(task.content, "claude-code")
|
|
6300
6355
|
};
|
|
6301
6356
|
});
|
|
6302
6357
|
const allRoles = /* @__PURE__ */ new Set();
|