@bugzy-ai/bugzy 1.18.4 → 1.19.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.cjs CHANGED
@@ -317,10 +317,6 @@ Extract the following from arguments:
317
317
  - **type**: Test type (exploratory, functional, regression, smoke) - defaults to functional
318
318
  - **focus**: Optional specific feature or section to focus on`
319
319
  },
320
- // Step 4: Load Project Context (library)
321
- "load-project-context",
322
- // Step 5: Knowledge Base Read (library)
323
- "read-knowledge-base",
324
320
  // Step 5: Gather Context (inline)
325
321
  {
326
322
  inline: true,
@@ -524,11 +520,7 @@ var generateTestPlanTask = {
524
520
  title: "Arguments",
525
521
  content: `Product description: $ARGUMENTS`
526
522
  },
527
- // Step 4: Load Project Context (library)
528
- "load-project-context",
529
- // Step 5: Knowledge Base Read (library)
530
- "read-knowledge-base",
531
- // Step 6: Process Description (inline)
523
+ // Step 5: Process Description (inline)
532
524
  {
533
525
  inline: true,
534
526
  title: "Process the Product Description",
@@ -704,10 +696,6 @@ Process team messages and handle multi-turn conversations with the product team
704
696
  title: "Arguments",
705
697
  content: `Team message/thread context: $ARGUMENTS`
706
698
  },
707
- // Step 4: Load Project Context (library)
708
- "load-project-context",
709
- // Step 5: Knowledge Base Read (library)
710
- "read-knowledge-base",
711
699
  // Step 6: Detect Intent (inline - simplified, no handler file loading)
712
700
  {
713
701
  inline: true,
@@ -902,10 +890,6 @@ Process webhook events from integrated systems by analyzing event content, deter
902
890
  title: "Arguments",
903
891
  content: `Arguments: $ARGUMENTS`
904
892
  },
905
- // Step 4: Load Project Context (library)
906
- "load-project-context",
907
- // Step 5: Knowledge Base Read (library)
908
- "read-knowledge-base",
909
893
  // Step 5: Understand Event Context (inline)
910
894
  {
911
895
  inline: true,
@@ -1374,10 +1358,6 @@ Extract the following from arguments:
1374
1358
  - Specific file: path to a specific test file
1375
1359
  - All tests: "all" or "" \u2192 runs entire test suite`
1376
1360
  },
1377
- // Step 4: Load Project Context (library)
1378
- "load-project-context",
1379
- // Step 5: Knowledge Base Read (library)
1380
- "read-knowledge-base",
1381
1361
  // Step 5: Test Execution Strategy (library)
1382
1362
  "read-test-strategy",
1383
1363
  // Step 6: Clarification Protocol (library)
@@ -1526,10 +1506,6 @@ This task performs comprehensive change verification with:
1526
1506
 
1527
1507
  The input format determines the trigger source and context extraction strategy.`
1528
1508
  },
1529
- // Step 4: Load Project Context (library)
1530
- "load-project-context",
1531
- // Step 5: Knowledge Base Read (library)
1532
- "read-knowledge-base",
1533
1509
  // Step 5: Detect Trigger Source (inline)
1534
1510
  {
1535
1511
  inline: true,
@@ -1939,7 +1915,9 @@ Include in the message:
1939
1915
  - Any blocking issues or critical findings`,
1940
1916
  conditionalOnSubagent: "team-communicator"
1941
1917
  },
1942
- // Step 15: Documentation Research (conditional library step)
1918
+ // Step 15: Knowledge Base Update (library)
1919
+ "update-knowledge-base",
1920
+ // Step 16: Documentation Research (conditional library step)
1943
1921
  {
1944
1922
  stepId: "gather-documentation",
1945
1923
  conditionalOnSubagent: "documentation-researcher"
@@ -1990,9 +1968,7 @@ Output to CI build log (print detailed results to stdout) and exit with appropri
1990
1968
  Post PR comment if GitHub context available.`,
1991
1969
  conditionalOnSubagent: "team-communicator"
1992
1970
  },
1993
- // Step 17: Knowledge Base Update (library)
1994
- "update-knowledge-base",
1995
- // Step 18: Handle Special Cases (inline)
1971
+ // Step 17: Handle Special Cases (inline)
1996
1972
  {
1997
1973
  inline: true,
1998
1974
  title: "Handle Special Cases",
@@ -2044,8 +2020,6 @@ This command orchestrates the complete test coverage workflow in a single execut
2044
2020
  content: `Focus area: $ARGUMENTS`
2045
2021
  },
2046
2022
  // Phase 1: Setup
2047
- "load-project-context",
2048
- "read-knowledge-base",
2049
2023
  {
2050
2024
  stepId: "gather-documentation",
2051
2025
  conditionalOnSubagent: "documentation-researcher"
@@ -2114,9 +2088,6 @@ var exploreApplicationTask = {
2114
2088
  - **depth**: shallow (15-20 min) or deep (45-60 min, default)
2115
2089
  - **system**: target system (optional for multi-system setups)`
2116
2090
  },
2117
- // Setup
2118
- "load-project-context",
2119
- "read-knowledge-base",
2120
2091
  // Exploration Protocol (adaptive depth)
2121
2092
  "exploration-protocol",
2122
2093
  // Execute
@@ -2181,11 +2152,7 @@ This task is triggered automatically when test results are submitted to the Bugz
2181
2152
  title: "Arguments",
2182
2153
  content: `Arguments: $ARGUMENTS`
2183
2154
  },
2184
- // Step 4: Load Project Context (library)
2185
- "load-project-context",
2186
- // Step 5: Knowledge Base Read (library)
2187
- "read-knowledge-base",
2188
- // Step 6: Normalize Test Results (library — handles URL/inline results + manifest creation)
2155
+ // Step 5: Normalize Test Results (library — handles URL/inline results + manifest creation)
2189
2156
  "normalize-test-results",
2190
2157
  // Step 7: Triage Failures (existing library step)
2191
2158
  "triage-failures",
@@ -2196,57 +2163,13 @@ This task is triggered automatically when test results are submitted to the Bugz
2196
2163
  stepId: "log-product-bugs",
2197
2164
  conditionalOnSubagent: "issue-tracker"
2198
2165
  },
2199
- // Step 10: Update Knowledge Base (library)
2200
- "update-knowledge-base",
2201
- // Step 11: Notify Team (conditional — requires team-communicator)
2166
+ // Step 10: Notify Team (conditional — requires team-communicator)
2202
2167
  {
2203
2168
  stepId: "notify-team",
2204
2169
  conditionalOnSubagent: "team-communicator"
2205
2170
  },
2206
- // Step 12: Generate Triage Report (inline)
2207
- {
2208
- inline: true,
2209
- title: "Generate Triage Report",
2210
- content: `## Generate Triage Report
2211
-
2212
- Create a structured triage report as the task output. This report is stored in \`task_executions.result\` and displayed in the Bugzy dashboard.
2213
-
2214
- **Report Structure:**
2215
- \`\`\`json
2216
- {
2217
- "summary": {
2218
- "total": <number>,
2219
- "passed": <number>,
2220
- "failed": <number>,
2221
- "skipped": <number>,
2222
- "duration_ms": <number or null>
2223
- },
2224
- "ci_metadata": {
2225
- "pipeline_url": "<from event payload>",
2226
- "commit_sha": "<from event payload>",
2227
- "branch": "<from event payload>"
2228
- },
2229
- "triage": {
2230
- "product_bugs": [
2231
- {
2232
- "test_name": "<name>",
2233
- "error": "<brief error>",
2234
- "reason": "<why this is a product bug>"
2235
- }
2236
- ],
2237
- "test_issues": [
2238
- {
2239
- "test_name": "<name>",
2240
- "error": "<brief error>",
2241
- "reason": "<why this is a test issue>"
2242
- }
2243
- ]
2244
- }
2245
- }
2246
- \`\`\`
2247
-
2248
- Output this JSON as the final result of the task.`
2249
- }
2171
+ // Step 11: Knowledge Base Update (library)
2172
+ "update-knowledge-base"
2250
2173
  ],
2251
2174
  requiredSubagents: ["browser-automation", "test-engineer"],
2252
2175
  optionalSubagents: ["issue-tracker", "team-communicator"],
@@ -2280,9 +2203,6 @@ var exploreTestCodebaseTask = {
2280
2203
  **Parse:**
2281
2204
  - **focus**: specific area to analyze (default: comprehensive)`
2282
2205
  },
2283
- // Setup
2284
- "load-project-context",
2285
- "read-knowledge-base",
2286
2206
  // Core analysis
2287
2207
  "analyze-test-codebase",
2288
2208
  // Generate results parser for normalizing test output
@@ -5378,38 +5298,6 @@ async function getAgentConfiguration(taskDefinitions, projectSubAgents) {
5378
5298
  };
5379
5299
  }
5380
5300
 
5381
- // src/tasks/steps/setup/read-knowledge-base.ts
5382
- var readKnowledgeBaseStep = {
5383
- id: "read-knowledge-base",
5384
- title: "Read Knowledge Base",
5385
- category: "setup",
5386
- content: `## Knowledge Base Context
5387
-
5388
- Before proceeding, read the curated knowledge base to inform your work:
5389
-
5390
- **Location:** \`.bugzy/runtime/knowledge-base.md\`
5391
-
5392
- **Purpose:** The knowledge base is a living collection of factual knowledge - what we currently know and believe to be true about this project, its patterns, and its context. This is NOT a historical log, but a curated snapshot that evolves as understanding improves.
5393
-
5394
- **How to Use:**
5395
- 1. Read the knowledge base to understand:
5396
- - Project-specific patterns and conventions
5397
- - Known behaviors and system characteristics
5398
- - Relevant context from past work
5399
- - Documented decisions and approaches
5400
-
5401
- 2. Apply this knowledge to:
5402
- - Make informed decisions aligned with project patterns
5403
- - Avoid repeating past mistakes
5404
- - Build on existing understanding
5405
- - Maintain consistency with established practices
5406
-
5407
- 3. **Relay to subagents**: Subagents do NOT read the knowledge base directly. When delegating work, you MUST include relevant KB patterns in your delegation message \u2014 especially testing patterns (timing, selectors, assertion approaches) that affect test reliability.
5408
-
5409
- **Note:** The knowledge base may not exist yet or may be empty. If it doesn't exist or is empty, proceed without this context and help build it as you work.`,
5410
- tags: ["setup", "context"]
5411
- };
5412
-
5413
5301
  // src/tasks/steps/setup/read-test-strategy.ts
5414
5302
  var readTestStrategyStep = {
5415
5303
  id: "read-test-strategy",
@@ -5431,38 +5319,6 @@ Apply the strategy guidance when determining which tests to run.
5431
5319
  tags: ["setup", "test-execution", "strategy"]
5432
5320
  };
5433
5321
 
5434
- // src/tasks/steps/setup/load-project-context.ts
5435
- var loadProjectContextStep = {
5436
- id: "load-project-context",
5437
- title: "Load Project Context",
5438
- category: "setup",
5439
- content: `## Load Project Context
5440
-
5441
- Check for existing project context to inform your work:
5442
-
5443
- **1. Check Project Context**
5444
- - Read \`.bugzy/runtime/project-context.md\` if it exists
5445
- - Check if it contains information relevant to: $ARGUMENTS
5446
- - This file contains:
5447
- - Application overview and architecture
5448
- - Key user flows and features
5449
- - Technical patterns discovered
5450
- - Environment details
5451
-
5452
- **2. Check Test Execution Strategy**
5453
- - Read \`./tests/docs/test-execution-strategy.md\` if it exists
5454
- - Understand available test tiers and when to use them
5455
- - Note default behaviors and time/coverage trade-offs
5456
-
5457
- **3. Document Findings**
5458
- Note what context is available:
5459
- \`\`\`
5460
- Project Context: [exists/missing] - [relevant to focus area: yes/no/partial]
5461
- Test Strategy: [exists/missing]
5462
- \`\`\``,
5463
- tags: ["setup", "context"]
5464
- };
5465
-
5466
5322
  // src/tasks/steps/setup/security-notice.ts
5467
5323
  var securityNoticeStep = {
5468
5324
  id: "security-notice",
@@ -6681,40 +6537,6 @@ Notify the team about progress and results:
6681
6537
  tags: ["communication", "optional"]
6682
6538
  };
6683
6539
 
6684
- // src/tasks/steps/maintenance/update-knowledge-base.ts
6685
- var updateKnowledgeBaseStep = {
6686
- id: "update-knowledge-base",
6687
- title: "Update Knowledge Base",
6688
- category: "maintenance",
6689
- content: `## Knowledge Base Maintenance
6690
-
6691
- After completing your work, update the knowledge base with new insights.
6692
-
6693
- **Location:** \`.bugzy/runtime/knowledge-base.md\`
6694
-
6695
- **Process:**
6696
-
6697
- 1. **Read the maintenance guide** at \`.bugzy/runtime/knowledge-maintenance-guide.md\` to understand when to ADD, UPDATE, or REMOVE entries and how to maintain a curated knowledge base (not an append-only log)
6698
-
6699
- 2. **Review the current knowledge base** to check for overlaps, contradictions, or opportunities to consolidate existing knowledge
6700
-
6701
- 3. **Update the knowledge base** following the maintenance guide principles:
6702
- - Favor consolidation over addition
6703
- - Update rather than append
6704
- - Resolve contradictions immediately
6705
- - Focus on quality over completeness
6706
-
6707
- **What to Add:**
6708
- - New patterns discovered about the application
6709
- - Behaviors that differ from expectations
6710
- - Technical constraints or requirements
6711
- - Useful selectors or navigation patterns
6712
- - Error handling patterns
6713
-
6714
- **Remember:** Every entry should answer "Will this help someone working on this project in 6 months?"`,
6715
- tags: ["maintenance", "knowledge"]
6716
- };
6717
-
6718
6540
  // src/tasks/steps/maintenance/generate-final-report.ts
6719
6541
  var generateFinalReportStep = {
6720
6542
  id: "generate-final-report",
@@ -6886,13 +6708,45 @@ For each modified test case:
6886
6708
  tags: ["maintenance", "automation", "feedback"]
6887
6709
  };
6888
6710
 
6711
+ // src/tasks/steps/maintenance/update-knowledge-base.ts
6712
+ var updateKnowledgeBaseStep = {
6713
+ id: "update-knowledge-base",
6714
+ title: "Update Knowledge Base",
6715
+ category: "maintenance",
6716
+ content: `## Knowledge Base Maintenance
6717
+
6718
+ After completing your work, update the knowledge base with new insights.
6719
+
6720
+ **Location:** \`.bugzy/runtime/knowledge-base.md\`
6721
+
6722
+ **Process:**
6723
+
6724
+ 1. **Read the maintenance guide** at \`.bugzy/runtime/knowledge-maintenance-guide.md\` to understand when to ADD, UPDATE, or REMOVE entries and how to maintain a curated knowledge base (not an append-only log)
6725
+
6726
+ 2. **Review the current knowledge base** to check for overlaps, contradictions, or opportunities to consolidate existing knowledge
6727
+
6728
+ 3. **Update the knowledge base** following the maintenance guide principles:
6729
+ - Favor consolidation over addition
6730
+ - Update rather than append
6731
+ - Resolve contradictions immediately
6732
+ - Focus on quality over completeness
6733
+
6734
+ **What to Add:**
6735
+ - New patterns discovered about the application
6736
+ - Behaviors that differ from expectations
6737
+ - Technical constraints or requirements
6738
+ - Useful selectors or navigation patterns
6739
+ - Error handling patterns
6740
+
6741
+ **Remember:** Every entry should answer "Will this help someone working on this project in 6 months?"`,
6742
+ tags: ["maintenance", "knowledge"]
6743
+ };
6744
+
6889
6745
  // src/tasks/steps/index.ts
6890
6746
  var STEP_LIBRARY = {
6891
6747
  // Setup
6892
6748
  "security-notice": securityNoticeStep,
6893
- "read-knowledge-base": readKnowledgeBaseStep,
6894
6749
  "read-test-strategy": readTestStrategyStep,
6895
- "load-project-context": loadProjectContextStep,
6896
6750
  "gather-documentation": gatherDocumentationStep,
6897
6751
  // Exploration
6898
6752
  "exploration-protocol": explorationProtocolStep,
@@ -6918,12 +6772,12 @@ var STEP_LIBRARY = {
6918
6772
  // Communication
6919
6773
  "notify-team": notifyTeamStep,
6920
6774
  // Maintenance
6921
- "update-knowledge-base": updateKnowledgeBaseStep,
6922
6775
  "generate-final-report": generateFinalReportStep,
6923
6776
  "update-exploration-artifacts": updateExplorationArtifactsStep,
6924
6777
  "cleanup-temp-files": cleanupTempFilesStep,
6925
6778
  "validate-test-artifacts": validateTestArtifactsStep,
6926
- "sync-automation-from-feedback": syncAutomationFromFeedbackStep
6779
+ "sync-automation-from-feedback": syncAutomationFromFeedbackStep,
6780
+ "update-knowledge-base": updateKnowledgeBaseStep
6927
6781
  };
6928
6782
  function getStep(id) {
6929
6783
  const step = STEP_LIBRARY[id];