@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.
- package/dist/cli/index.cjs +186 -1
- package/dist/cli/index.cjs.map +1 -1
- package/dist/cli/index.js +186 -1
- package/dist/cli/index.js.map +1 -1
- package/dist/index.cjs +176 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +176 -1
- package/dist/index.js.map +1 -1
- package/dist/tasks/index.cjs +92 -1
- package/dist/tasks/index.cjs.map +1 -1
- package/dist/tasks/index.d.cts +1 -0
- package/dist/tasks/index.d.ts +1 -0
- package/dist/tasks/index.js +92 -1
- package/dist/tasks/index.js.map +1 -1
- package/package.json +1 -1
package/dist/tasks/index.js
CHANGED
|
@@ -17,6 +17,7 @@ var TASK_SLUGS = {
|
|
|
17
17
|
RUN_TESTS: "run-tests",
|
|
18
18
|
VERIFY_CHANGES: "verify-changes",
|
|
19
19
|
TRIAGE_RESULTS: "triage-results",
|
|
20
|
+
EXPLORE_TEST_CODEBASE: "explore-test-codebase",
|
|
20
21
|
/** @deprecated Use ONBOARD_TESTING instead */
|
|
21
22
|
FULL_TEST_COVERAGE: "onboard-testing"
|
|
22
23
|
};
|
|
@@ -1906,6 +1907,95 @@ Output this JSON as the final result of the task.`
|
|
|
1906
1907
|
dependentTasks: []
|
|
1907
1908
|
};
|
|
1908
1909
|
|
|
1910
|
+
// src/tasks/library/explore-test-codebase.ts
|
|
1911
|
+
var exploreTestCodebaseTask = {
|
|
1912
|
+
slug: TASK_SLUGS.EXPLORE_TEST_CODEBASE,
|
|
1913
|
+
name: "Explore Test Codebase",
|
|
1914
|
+
description: "Analyze external test repository to understand framework, coverage, and conventions",
|
|
1915
|
+
frontmatter: {
|
|
1916
|
+
description: "Analyze external test codebase for BYOT onboarding",
|
|
1917
|
+
"argument-hint": "--focus [area]"
|
|
1918
|
+
},
|
|
1919
|
+
steps: [
|
|
1920
|
+
// Step 1: Overview (inline)
|
|
1921
|
+
{
|
|
1922
|
+
inline: true,
|
|
1923
|
+
title: "Explore Test Codebase Overview",
|
|
1924
|
+
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.`
|
|
1925
|
+
},
|
|
1926
|
+
// Step 2: Security Notice
|
|
1927
|
+
"security-notice",
|
|
1928
|
+
// Step 3: Arguments (inline)
|
|
1929
|
+
{
|
|
1930
|
+
inline: true,
|
|
1931
|
+
title: "Arguments",
|
|
1932
|
+
content: `**Arguments**: $ARGUMENTS
|
|
1933
|
+
|
|
1934
|
+
**Parse:**
|
|
1935
|
+
- **focus**: specific area to analyze (default: comprehensive)`
|
|
1936
|
+
},
|
|
1937
|
+
// Setup
|
|
1938
|
+
"load-project-context",
|
|
1939
|
+
"read-knowledge-base",
|
|
1940
|
+
// Core analysis
|
|
1941
|
+
"analyze-test-codebase",
|
|
1942
|
+
// Generate results parser for normalizing test output
|
|
1943
|
+
"create-results-parser",
|
|
1944
|
+
// Optional: explore the app itself if URL is available
|
|
1945
|
+
{
|
|
1946
|
+
inline: true,
|
|
1947
|
+
title: "App Exploration (Optional)",
|
|
1948
|
+
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:
|
|
1949
|
+
|
|
1950
|
+
1. Navigate to the app URL
|
|
1951
|
+
2. Identify main navigation and key pages
|
|
1952
|
+
3. Map discovered features to test coverage from the codebase analysis
|
|
1953
|
+
4. Note any features that appear untested
|
|
1954
|
+
|
|
1955
|
+
This step helps correlate what the tests cover with what the application actually contains. Skip if no app URL is available.`,
|
|
1956
|
+
conditionalOnSubagent: "browser-automation"
|
|
1957
|
+
},
|
|
1958
|
+
// Generate output
|
|
1959
|
+
{
|
|
1960
|
+
inline: true,
|
|
1961
|
+
title: "Commit Analysis Results",
|
|
1962
|
+
content: `Commit analysis artifacts to the **parent project repository** (the workspace root).
|
|
1963
|
+
|
|
1964
|
+
**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.
|
|
1965
|
+
|
|
1966
|
+
**What to commit in the parent repo:**
|
|
1967
|
+
1. \`git add .bugzy/\` \u2014 the test codebase analysis report and runtime files
|
|
1968
|
+
2. Do NOT run \`git add .\` or \`git add tests\` \u2014 this would stage the submodule pointer
|
|
1969
|
+
3. \`git commit -m "chore: analyze external test codebase"\`
|
|
1970
|
+
|
|
1971
|
+
These artifacts will be available to all future task executions for this project.`
|
|
1972
|
+
},
|
|
1973
|
+
// Team Communication (conditional)
|
|
1974
|
+
{
|
|
1975
|
+
inline: true,
|
|
1976
|
+
title: "Team Communication",
|
|
1977
|
+
content: `{{INVOKE_TEAM_COMMUNICATOR}} to notify the team about the test codebase analysis:
|
|
1978
|
+
|
|
1979
|
+
\`\`\`
|
|
1980
|
+
1. Post a summary of the analysis findings
|
|
1981
|
+
2. Include key information:
|
|
1982
|
+
- Test framework and runner identified
|
|
1983
|
+
- Number of test files and estimated test cases
|
|
1984
|
+
- Feature areas covered by existing tests
|
|
1985
|
+
- Any gaps or areas without test coverage
|
|
1986
|
+
3. Ask if the analysis looks accurate
|
|
1987
|
+
4. Use appropriate channel and threading
|
|
1988
|
+
\`\`\``,
|
|
1989
|
+
conditionalOnSubagent: "team-communicator"
|
|
1990
|
+
},
|
|
1991
|
+
// Maintenance
|
|
1992
|
+
"update-knowledge-base"
|
|
1993
|
+
],
|
|
1994
|
+
requiredSubagents: ["browser-automation"],
|
|
1995
|
+
optionalSubagents: ["team-communicator"],
|
|
1996
|
+
dependentTasks: []
|
|
1997
|
+
};
|
|
1998
|
+
|
|
1909
1999
|
// src/tasks/index.ts
|
|
1910
2000
|
var TASK_TEMPLATES = {
|
|
1911
2001
|
[TASK_SLUGS.GENERATE_TEST_CASES]: generateTestCasesTask,
|
|
@@ -1916,7 +2006,8 @@ var TASK_TEMPLATES = {
|
|
|
1916
2006
|
[TASK_SLUGS.VERIFY_CHANGES]: verifyChangesTask,
|
|
1917
2007
|
[TASK_SLUGS.ONBOARD_TESTING]: onboardTestingTask,
|
|
1918
2008
|
[TASK_SLUGS.EXPLORE_APPLICATION]: exploreApplicationTask,
|
|
1919
|
-
[TASK_SLUGS.TRIAGE_RESULTS]: triageResultsTask
|
|
2009
|
+
[TASK_SLUGS.TRIAGE_RESULTS]: triageResultsTask,
|
|
2010
|
+
[TASK_SLUGS.EXPLORE_TEST_CODEBASE]: exploreTestCodebaseTask
|
|
1920
2011
|
};
|
|
1921
2012
|
function getTaskTemplate(slug) {
|
|
1922
2013
|
return TASK_TEMPLATES[slug];
|