@bugzy-ai/bugzy 1.18.1 → 1.18.3

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.
@@ -49,6 +49,7 @@ var TASK_SLUGS = {
49
49
  RUN_TESTS: "run-tests",
50
50
  VERIFY_CHANGES: "verify-changes",
51
51
  TRIAGE_RESULTS: "triage-results",
52
+ EXPLORE_TEST_CODEBASE: "explore-test-codebase",
52
53
  /** @deprecated Use ONBOARD_TESTING instead */
53
54
  FULL_TEST_COVERAGE: "onboard-testing"
54
55
  };
@@ -1938,6 +1939,95 @@ Output this JSON as the final result of the task.`
1938
1939
  dependentTasks: []
1939
1940
  };
1940
1941
 
1942
+ // src/tasks/library/explore-test-codebase.ts
1943
+ var exploreTestCodebaseTask = {
1944
+ slug: TASK_SLUGS.EXPLORE_TEST_CODEBASE,
1945
+ name: "Explore Test Codebase",
1946
+ description: "Analyze external test repository to understand framework, coverage, and conventions",
1947
+ frontmatter: {
1948
+ description: "Analyze external test codebase for BYOT onboarding",
1949
+ "argument-hint": "--focus [area]"
1950
+ },
1951
+ steps: [
1952
+ // Step 1: Overview (inline)
1953
+ {
1954
+ inline: true,
1955
+ title: "Explore Test Codebase Overview",
1956
+ content: `Analyze the external test repository to understand the testing framework, test coverage, conventions, and codebase structure. This task is triggered during BYOT (Bring Your Own Tests) onboarding to help Bugzy understand the customer's existing test suite.`
1957
+ },
1958
+ // Step 2: Security Notice
1959
+ "security-notice",
1960
+ // Step 3: Arguments (inline)
1961
+ {
1962
+ inline: true,
1963
+ title: "Arguments",
1964
+ content: `**Arguments**: $ARGUMENTS
1965
+
1966
+ **Parse:**
1967
+ - **focus**: specific area to analyze (default: comprehensive)`
1968
+ },
1969
+ // Setup
1970
+ "load-project-context",
1971
+ "read-knowledge-base",
1972
+ // Core analysis
1973
+ "analyze-test-codebase",
1974
+ // Generate results parser for normalizing test output
1975
+ "create-results-parser",
1976
+ // Optional: explore the app itself if URL is available
1977
+ {
1978
+ inline: true,
1979
+ title: "App Exploration (Optional)",
1980
+ content: `If the project has an app URL configured (check \`.bugzy/runtime/project-context.md\` or env vars for TEST_APP_HOST), {{INVOKE_BROWSER_AUTOMATION}} to briefly explore the application:
1981
+
1982
+ 1. Navigate to the app URL
1983
+ 2. Identify main navigation and key pages
1984
+ 3. Map discovered features to test coverage from the codebase analysis
1985
+ 4. Note any features that appear untested
1986
+
1987
+ This step helps correlate what the tests cover with what the application actually contains. Skip if no app URL is available.`,
1988
+ conditionalOnSubagent: "browser-automation"
1989
+ },
1990
+ // Generate output
1991
+ {
1992
+ inline: true,
1993
+ title: "Commit Analysis Results",
1994
+ content: `Commit analysis artifacts to the **parent project repository** (the workspace root).
1995
+
1996
+ **IMPORTANT \u2014 Do NOT stage the \`tests\` submodule.** The \`tests/\` directory is an external git submodule. Any changes made inside it (e.g., \`reporters/parse-results.ts\`, \`tests/CLAUDE.md\`) will be committed and pushed to the external repo automatically by the post-execution handler. Staging the submodule in the parent would record a local-only commit SHA that doesn't exist on the remote, causing a broken reference.
1997
+
1998
+ **What to commit in the parent repo:**
1999
+ 1. \`git add .bugzy/\` \u2014 the test codebase analysis report and runtime files
2000
+ 2. Do NOT run \`git add .\` or \`git add tests\` \u2014 this would stage the submodule pointer
2001
+ 3. \`git commit -m "chore: analyze external test codebase"\`
2002
+
2003
+ These artifacts will be available to all future task executions for this project.`
2004
+ },
2005
+ // Team Communication (conditional)
2006
+ {
2007
+ inline: true,
2008
+ title: "Team Communication",
2009
+ content: `{{INVOKE_TEAM_COMMUNICATOR}} to notify the team about the test codebase analysis:
2010
+
2011
+ \`\`\`
2012
+ 1. Post a summary of the analysis findings
2013
+ 2. Include key information:
2014
+ - Test framework and runner identified
2015
+ - Number of test files and estimated test cases
2016
+ - Feature areas covered by existing tests
2017
+ - Any gaps or areas without test coverage
2018
+ 3. Ask if the analysis looks accurate
2019
+ 4. Use appropriate channel and threading
2020
+ \`\`\``,
2021
+ conditionalOnSubagent: "team-communicator"
2022
+ },
2023
+ // Maintenance
2024
+ "update-knowledge-base"
2025
+ ],
2026
+ requiredSubagents: ["browser-automation"],
2027
+ optionalSubagents: ["team-communicator"],
2028
+ dependentTasks: []
2029
+ };
2030
+
1941
2031
  // src/tasks/index.ts
1942
2032
  var TASK_TEMPLATES = {
1943
2033
  [TASK_SLUGS.GENERATE_TEST_CASES]: generateTestCasesTask,
@@ -1948,7 +2038,8 @@ var TASK_TEMPLATES = {
1948
2038
  [TASK_SLUGS.VERIFY_CHANGES]: verifyChangesTask,
1949
2039
  [TASK_SLUGS.ONBOARD_TESTING]: onboardTestingTask,
1950
2040
  [TASK_SLUGS.EXPLORE_APPLICATION]: exploreApplicationTask,
1951
- [TASK_SLUGS.TRIAGE_RESULTS]: triageResultsTask
2041
+ [TASK_SLUGS.TRIAGE_RESULTS]: triageResultsTask,
2042
+ [TASK_SLUGS.EXPLORE_TEST_CODEBASE]: exploreTestCodebaseTask
1952
2043
  };
1953
2044
  function getTaskTemplate(slug) {
1954
2045
  return TASK_TEMPLATES[slug];