@bugzy-ai/bugzy 1.18.0 → 1.18.1

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.
Files changed (57) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +273 -273
  3. package/dist/cli/index.cjs +43 -4
  4. package/dist/cli/index.cjs.map +1 -1
  5. package/dist/cli/index.js +42 -3
  6. package/dist/cli/index.js.map +1 -1
  7. package/dist/index.cjs +40 -1
  8. package/dist/index.cjs.map +1 -1
  9. package/dist/index.js +40 -1
  10. package/dist/index.js.map +1 -1
  11. package/dist/subagents/index.cjs.map +1 -1
  12. package/dist/subagents/index.js.map +1 -1
  13. package/dist/subagents/metadata.cjs.map +1 -1
  14. package/dist/subagents/metadata.js.map +1 -1
  15. package/dist/tasks/index.cjs +40 -1
  16. package/dist/tasks/index.cjs.map +1 -1
  17. package/dist/tasks/index.js +40 -1
  18. package/dist/tasks/index.js.map +1 -1
  19. package/package.json +95 -95
  20. package/templates/init/.bugzy/runtime/handlers/messages/feedback.md +178 -178
  21. package/templates/init/.bugzy/runtime/handlers/messages/question.md +122 -122
  22. package/templates/init/.bugzy/runtime/handlers/messages/status.md +146 -146
  23. package/templates/init/.bugzy/runtime/knowledge-base.md +61 -61
  24. package/templates/init/.bugzy/runtime/knowledge-maintenance-guide.md +97 -97
  25. package/templates/init/.bugzy/runtime/project-context.md +35 -35
  26. package/templates/init/.bugzy/runtime/subagent-memory-guide.md +87 -87
  27. package/templates/init/.bugzy/runtime/templates/event-examples.md +194 -194
  28. package/templates/init/.bugzy/runtime/templates/test-plan-template.md +50 -50
  29. package/templates/init/.bugzy/runtime/templates/test-result-schema.md +498 -498
  30. package/templates/init/.claude/settings.json +28 -28
  31. package/templates/init/.env.testdata +18 -18
  32. package/templates/init/.gitignore-template +24 -24
  33. package/templates/init/AGENTS.md +155 -155
  34. package/templates/init/CLAUDE.md +157 -157
  35. package/templates/init/test-runs/README.md +45 -45
  36. package/templates/init/tests/CLAUDE.md +193 -193
  37. package/templates/init/tests/docs/test-execution-strategy.md +535 -535
  38. package/templates/init/tests/docs/testing-best-practices.md +724 -724
  39. package/templates/playwright/BasePage.template.ts +190 -190
  40. package/templates/playwright/auth.setup.template.ts +89 -89
  41. package/templates/playwright/dataGenerators.helper.template.ts +148 -148
  42. package/templates/playwright/dateUtils.helper.template.ts +96 -96
  43. package/templates/playwright/pages.fixture.template.ts +50 -50
  44. package/templates/playwright/playwright.config.template.ts +97 -97
  45. package/templates/playwright/reporters/__tests__/bugzy-reporter-failure-classification.test.ts +299 -299
  46. package/templates/playwright/reporters/__tests__/bugzy-reporter-manifest-merge.test.ts +329 -329
  47. package/templates/playwright/reporters/__tests__/playwright.config.ts +5 -5
  48. package/templates/playwright/reporters/bugzy-reporter.ts +784 -784
  49. package/dist/templates/init/.bugzy/runtime/knowledge-base.md +0 -61
  50. package/dist/templates/init/.bugzy/runtime/knowledge-maintenance-guide.md +0 -97
  51. package/dist/templates/init/.bugzy/runtime/project-context.md +0 -35
  52. package/dist/templates/init/.bugzy/runtime/subagent-memory-guide.md +0 -87
  53. package/dist/templates/init/.bugzy/runtime/templates/test-plan-template.md +0 -50
  54. package/dist/templates/init/.bugzy/runtime/templates/test-result-schema.md +0 -498
  55. package/dist/templates/init/.bugzy/runtime/test-execution-strategy.md +0 -535
  56. package/dist/templates/init/.bugzy/runtime/testing-best-practices.md +0 -632
  57. package/dist/templates/init/.gitignore-template +0 -25
package/dist/cli/index.js CHANGED
@@ -20,12 +20,12 @@ var __copyProps = (to, from, except, desc) => {
20
20
  };
21
21
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
22
22
 
23
- // node_modules/.pnpm/tsup@8.5.0_postcss@8.5.6_typescript@5.9.3/node_modules/tsup/assets/esm_shims.js
23
+ // node_modules/.pnpm/tsup@8.5.1_postcss@8.5.6_typescript@5.9.3/node_modules/tsup/assets/esm_shims.js
24
24
  import path from "path";
25
25
  import { fileURLToPath } from "url";
26
26
  var getFilename, getDirname, __dirname;
27
27
  var init_esm_shims = __esm({
28
- "node_modules/.pnpm/tsup@8.5.0_postcss@8.5.6_typescript@5.9.3/node_modules/tsup/assets/esm_shims.js"() {
28
+ "node_modules/.pnpm/tsup@8.5.1_postcss@8.5.6_typescript@5.9.3/node_modules/tsup/assets/esm_shims.js"() {
29
29
  "use strict";
30
30
  getFilename = () => fileURLToPath(import.meta.url);
31
31
  getDirname = () => path.dirname(getFilename());
@@ -785,7 +785,29 @@ Read \`.bugzy/runtime/memory/event-history.md\` to:
785
785
  - List \`./test-cases/\` for existing tests
786
786
  - Check \`.bugzy/runtime/knowledge-base.md\` for past insights
787
787
 
788
- #### 2.4 Event-Action Reference Patterns
788
+ #### 2.4 Knowledge Base: Drafted vs Real Tests (BYOT)
789
+
790
+ When the project uses an external test repository, maintain two sections in \`.bugzy/runtime/knowledge-base.md\`:
791
+
792
+ **Drafted Tests** (Open PRs \u2014 tests not yet merged):
793
+ \`\`\`markdown
794
+ ### Drafted Tests
795
+ | PR | Branch | Tests Added | Status | Date |
796
+ |----|--------|-------------|--------|------|
797
+ | #12 | bugzy/verify-changes-a1b2c3d4 | login.spec.ts, checkout.spec.ts | Open | 2026-02-13 |
798
+ \`\`\`
799
+
800
+ **Active Tests** (Merged \u2014 tests are part of the test suite):
801
+ \`\`\`markdown
802
+ ### Active Tests
803
+ | File | What it tests | Source PR | Merged |
804
+ |------|---------------|-----------|--------|
805
+ | login.spec.ts | Login flow with valid/invalid credentials | #12 | 2026-02-13 |
806
+ \`\`\`
807
+
808
+ Move entries from Drafted \u2192 Active Tests when PRs are merged. Remove entries when PRs are closed without merge.
809
+
810
+ #### 2.5 Event-Action Reference Patterns
789
811
 
790
812
  Use these as reference patterns for common events. The webhook routing system already handles events with specific default tasks (e.g., deployment_status \u2192 /run-tests). Process-event receives events that need analysis.
791
813
 
@@ -804,6 +826,23 @@ Use these as reference patterns for common events. The webhook routing system al
804
826
  - **QA-relevant content found**: Propose appropriate follow-up tasks (e.g., \`/generate-test-cases\`, \`/verify-changes\`)
805
827
  - **No QA content** (HR meeting, offsite planning, etc.): Skip \u2014 log to event history only
806
828
 
829
+ **External Test Repo Events** (BYOT - events from the customer's external test repository):
830
+ - **PR opened by Bugzy** (\`com.github.external_repo.pull_request\`, \`action: "opened"\`, branch starts with \`bugzy/\`):
831
+ Log to Knowledge Base under "Drafted Tests". No action task needed \u2014 just record the PR number, branch, and what tests were added.
832
+ - **PR review submitted** (\`com.github.external_repo.pull_request_review\`):
833
+ If changes were requested \u2192 queue \`/verify-changes\` with \`{"existingPrBranch": "{head.ref}", "context": "PR review feedback: {review.body}"}\`.
834
+ The execution will iterate on the existing branch, push fixes, and skip PR creation.
835
+ - **PR comment** (\`com.github.external_repo.pull_request_comment\`):
836
+ Read the comment. If it contains actionable feedback, queue \`/verify-changes\`
837
+ with \`{"existingPrBranch": "{issue.pull_request.head.ref}"}\`.
838
+ - **PR merged** (\`com.github.external_repo.pull_request\`, \`action: "closed"\`, \`merged: true\`):
839
+ Update Knowledge Base: move entries from "Drafted Tests" to "Active Tests". Notify team of new test coverage.
840
+ The submodule pointer update happens automatically via the container (\`updateSubmoduleToLatest\`).
841
+ - **PR closed without merge** (\`com.github.external_repo.pull_request\`, \`action: "closed"\`, \`merged: false\`):
842
+ Remove from Knowledge Base "Drafted Tests". Notify team that tests were rejected.
843
+ - **Direct push to main** (\`com.github.external_repo.push\`, ref is main/master):
844
+ Update Knowledge Base if test files were affected. Submodule pointer update is automatic.
845
+
807
846
  **Other Events:**
808
847
  - Analyze for QA relevance based on knowledge base and project context
809
848
  - If action needed, propose appropriate task. If not, log and skip.