@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/index.cjs CHANGED
@@ -949,7 +949,29 @@ Read \`.bugzy/runtime/memory/event-history.md\` to:
949
949
  - List \`./test-cases/\` for existing tests
950
950
  - Check \`.bugzy/runtime/knowledge-base.md\` for past insights
951
951
 
952
- #### 2.4 Event-Action Reference Patterns
952
+ #### 2.4 Knowledge Base: Drafted vs Real Tests (BYOT)
953
+
954
+ When the project uses an external test repository, maintain two sections in \`.bugzy/runtime/knowledge-base.md\`:
955
+
956
+ **Drafted Tests** (Open PRs \u2014 tests not yet merged):
957
+ \`\`\`markdown
958
+ ### Drafted Tests
959
+ | PR | Branch | Tests Added | Status | Date |
960
+ |----|--------|-------------|--------|------|
961
+ | #12 | bugzy/verify-changes-a1b2c3d4 | login.spec.ts, checkout.spec.ts | Open | 2026-02-13 |
962
+ \`\`\`
963
+
964
+ **Active Tests** (Merged \u2014 tests are part of the test suite):
965
+ \`\`\`markdown
966
+ ### Active Tests
967
+ | File | What it tests | Source PR | Merged |
968
+ |------|---------------|-----------|--------|
969
+ | login.spec.ts | Login flow with valid/invalid credentials | #12 | 2026-02-13 |
970
+ \`\`\`
971
+
972
+ Move entries from Drafted \u2192 Active Tests when PRs are merged. Remove entries when PRs are closed without merge.
973
+
974
+ #### 2.5 Event-Action Reference Patterns
953
975
 
954
976
  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.
955
977
 
@@ -968,6 +990,23 @@ Use these as reference patterns for common events. The webhook routing system al
968
990
  - **QA-relevant content found**: Propose appropriate follow-up tasks (e.g., \`/generate-test-cases\`, \`/verify-changes\`)
969
991
  - **No QA content** (HR meeting, offsite planning, etc.): Skip \u2014 log to event history only
970
992
 
993
+ **External Test Repo Events** (BYOT - events from the customer's external test repository):
994
+ - **PR opened by Bugzy** (\`com.github.external_repo.pull_request\`, \`action: "opened"\`, branch starts with \`bugzy/\`):
995
+ Log to Knowledge Base under "Drafted Tests". No action task needed \u2014 just record the PR number, branch, and what tests were added.
996
+ - **PR review submitted** (\`com.github.external_repo.pull_request_review\`):
997
+ If changes were requested \u2192 queue \`/verify-changes\` with \`{"existingPrBranch": "{head.ref}", "context": "PR review feedback: {review.body}"}\`.
998
+ The execution will iterate on the existing branch, push fixes, and skip PR creation.
999
+ - **PR comment** (\`com.github.external_repo.pull_request_comment\`):
1000
+ Read the comment. If it contains actionable feedback, queue \`/verify-changes\`
1001
+ with \`{"existingPrBranch": "{issue.pull_request.head.ref}"}\`.
1002
+ - **PR merged** (\`com.github.external_repo.pull_request\`, \`action: "closed"\`, \`merged: true\`):
1003
+ Update Knowledge Base: move entries from "Drafted Tests" to "Active Tests". Notify team of new test coverage.
1004
+ The submodule pointer update happens automatically via the container (\`updateSubmoduleToLatest\`).
1005
+ - **PR closed without merge** (\`com.github.external_repo.pull_request\`, \`action: "closed"\`, \`merged: false\`):
1006
+ Remove from Knowledge Base "Drafted Tests". Notify team that tests were rejected.
1007
+ - **Direct push to main** (\`com.github.external_repo.push\`, ref is main/master):
1008
+ Update Knowledge Base if test files were affected. Submodule pointer update is automatic.
1009
+
971
1010
  **Other Events:**
972
1011
  - Analyze for QA relevance based on knowledge base and project context
973
1012
  - If action needed, propose appropriate task. If not, log and skip.