@bugzy-ai/bugzy 1.15.0 → 1.16.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.
@@ -48,6 +48,7 @@ var TASK_SLUGS = {
48
48
  PROCESS_EVENT: "process-event",
49
49
  RUN_TESTS: "run-tests",
50
50
  VERIFY_CHANGES: "verify-changes",
51
+ TRIAGE_RESULTS: "triage-results",
51
52
  /** @deprecated Use ONBOARD_TESTING instead */
52
53
  FULL_TEST_COVERAGE: "onboard-testing"
53
54
  };
@@ -1247,6 +1248,7 @@ Before running tests, confirm the selection with the user if ambiguous:
1247
1248
  },
1248
1249
  // Step 7-10: Test Execution (library steps)
1249
1250
  "run-tests",
1251
+ "normalize-test-results",
1250
1252
  "parse-test-results",
1251
1253
  "triage-failures",
1252
1254
  "fix-test-issues",
@@ -1255,14 +1257,7 @@ Before running tests, confirm the selection with the user if ambiguous:
1255
1257
  stepId: "log-product-bugs",
1256
1258
  conditionalOnSubagent: "issue-tracker"
1257
1259
  },
1258
- // Step 12: Knowledge Base Update (library)
1259
- "update-knowledge-base",
1260
- // Step 13: Team Communication (conditional - library step)
1261
- {
1262
- stepId: "notify-team",
1263
- conditionalOnSubagent: "team-communicator"
1264
- },
1265
- // Step 14: Handle Special Cases (inline - task-specific)
1260
+ // Step 12: Handle Special Cases (inline - reference material, positioned before final action steps)
1266
1261
  {
1267
1262
  inline: true,
1268
1263
  title: "Handle Special Cases",
@@ -1310,6 +1305,13 @@ If selected test cases have formatting issues:
1310
1305
  **Related Documentation**:
1311
1306
  - \`./tests/docs/test-execution-strategy.md\` - When and why to run specific tests
1312
1307
  - \`./tests/docs/testing-best-practices.md\` - How to write tests (patterns and anti-patterns)`
1308
+ },
1309
+ // Step 13: Knowledge Base Update (library)
1310
+ "update-knowledge-base",
1311
+ // Step 14: Team Communication (conditional - library step, LAST actionable step)
1312
+ {
1313
+ stepId: "notify-team",
1314
+ conditionalOnSubagent: "team-communicator"
1313
1315
  }
1314
1316
  ],
1315
1317
  requiredSubagents: ["browser-automation", "test-debugger-fixer"],
@@ -2029,6 +2031,108 @@ var exploreApplicationTask = {
2029
2031
  dependentTasks: []
2030
2032
  };
2031
2033
 
2034
+ // src/tasks/library/triage-results.ts
2035
+ var triageResultsTask = {
2036
+ slug: TASK_SLUGS.TRIAGE_RESULTS,
2037
+ name: "Triage Results",
2038
+ description: "Analyze externally-submitted test results and triage failures as product bugs or test issues",
2039
+ frontmatter: {
2040
+ description: "Analyze externally-submitted test results and triage failures as product bugs or test issues",
2041
+ "argument-hint": "[event payload with test results]"
2042
+ },
2043
+ steps: [
2044
+ // Step 1: Overview (inline)
2045
+ {
2046
+ inline: true,
2047
+ title: "Triage Results Overview",
2048
+ content: `# Triage External Test Results
2049
+
2050
+ Analyze test results submitted from an external CI pipeline. The results were sent via webhook and are available in the event payload \u2014 either as inline data or a URL to download.
2051
+
2052
+ **Goal**: Normalize the results into the standard manifest format, classify each failure as a PRODUCT BUG or TEST ISSUE, and generate a triage report.
2053
+
2054
+ This task is triggered automatically when test results are submitted to the Bugzy webhook from a CI system (GitHub Actions, GitLab CI, etc.).`
2055
+ },
2056
+ // Step 2: Security Notice (library)
2057
+ "security-notice",
2058
+ // Step 3: Arguments (inline)
2059
+ {
2060
+ inline: true,
2061
+ title: "Arguments",
2062
+ content: `Arguments: $ARGUMENTS`
2063
+ },
2064
+ // Step 4: Load Project Context (library)
2065
+ "load-project-context",
2066
+ // Step 5: Knowledge Base Read (library)
2067
+ "read-knowledge-base",
2068
+ // Step 6: Normalize Test Results (library — handles URL/inline results + manifest creation)
2069
+ "normalize-test-results",
2070
+ // Step 7: Triage Failures (existing library step)
2071
+ "triage-failures",
2072
+ // Step 8: Fix Test Issues (library — uses test-debugger-fixer)
2073
+ "fix-test-issues",
2074
+ // Step 9: Log Product Bugs (conditional — requires issue-tracker)
2075
+ {
2076
+ stepId: "log-product-bugs",
2077
+ conditionalOnSubagent: "issue-tracker"
2078
+ },
2079
+ // Step 10: Update Knowledge Base (library)
2080
+ "update-knowledge-base",
2081
+ // Step 11: Notify Team (conditional — requires team-communicator)
2082
+ {
2083
+ stepId: "notify-team",
2084
+ conditionalOnSubagent: "team-communicator"
2085
+ },
2086
+ // Step 12: Generate Triage Report (inline)
2087
+ {
2088
+ inline: true,
2089
+ title: "Generate Triage Report",
2090
+ content: `## Generate Triage Report
2091
+
2092
+ Create a structured triage report as the task output. This report is stored in \`task_executions.result\` and displayed in the Bugzy dashboard.
2093
+
2094
+ **Report Structure:**
2095
+ \`\`\`json
2096
+ {
2097
+ "summary": {
2098
+ "total": <number>,
2099
+ "passed": <number>,
2100
+ "failed": <number>,
2101
+ "skipped": <number>,
2102
+ "duration_ms": <number or null>
2103
+ },
2104
+ "ci_metadata": {
2105
+ "pipeline_url": "<from event payload>",
2106
+ "commit_sha": "<from event payload>",
2107
+ "branch": "<from event payload>"
2108
+ },
2109
+ "triage": {
2110
+ "product_bugs": [
2111
+ {
2112
+ "test_name": "<name>",
2113
+ "error": "<brief error>",
2114
+ "reason": "<why this is a product bug>"
2115
+ }
2116
+ ],
2117
+ "test_issues": [
2118
+ {
2119
+ "test_name": "<name>",
2120
+ "error": "<brief error>",
2121
+ "reason": "<why this is a test issue>"
2122
+ }
2123
+ ]
2124
+ }
2125
+ }
2126
+ \`\`\`
2127
+
2128
+ Output this JSON as the final result of the task.`
2129
+ }
2130
+ ],
2131
+ requiredSubagents: ["browser-automation", "test-debugger-fixer"],
2132
+ optionalSubagents: ["issue-tracker", "team-communicator"],
2133
+ dependentTasks: []
2134
+ };
2135
+
2032
2136
  // src/tasks/index.ts
2033
2137
  var TASK_TEMPLATES = {
2034
2138
  [TASK_SLUGS.GENERATE_TEST_CASES]: generateTestCasesTask,
@@ -2038,7 +2142,8 @@ var TASK_TEMPLATES = {
2038
2142
  [TASK_SLUGS.RUN_TESTS]: runTestsTask,
2039
2143
  [TASK_SLUGS.VERIFY_CHANGES]: verifyChangesTask,
2040
2144
  [TASK_SLUGS.ONBOARD_TESTING]: onboardTestingTask,
2041
- [TASK_SLUGS.EXPLORE_APPLICATION]: exploreApplicationTask
2145
+ [TASK_SLUGS.EXPLORE_APPLICATION]: exploreApplicationTask,
2146
+ [TASK_SLUGS.TRIAGE_RESULTS]: triageResultsTask
2042
2147
  };
2043
2148
  function getTaskTemplate(slug) {
2044
2149
  return TASK_TEMPLATES[slug];