@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.js CHANGED
@@ -893,7 +893,29 @@ Read \`.bugzy/runtime/memory/event-history.md\` to:
893
893
  - List \`./test-cases/\` for existing tests
894
894
  - Check \`.bugzy/runtime/knowledge-base.md\` for past insights
895
895
 
896
- #### 2.4 Event-Action Reference Patterns
896
+ #### 2.4 Knowledge Base: Drafted vs Real Tests (BYOT)
897
+
898
+ When the project uses an external test repository, maintain two sections in \`.bugzy/runtime/knowledge-base.md\`:
899
+
900
+ **Drafted Tests** (Open PRs \u2014 tests not yet merged):
901
+ \`\`\`markdown
902
+ ### Drafted Tests
903
+ | PR | Branch | Tests Added | Status | Date |
904
+ |----|--------|-------------|--------|------|
905
+ | #12 | bugzy/verify-changes-a1b2c3d4 | login.spec.ts, checkout.spec.ts | Open | 2026-02-13 |
906
+ \`\`\`
907
+
908
+ **Active Tests** (Merged \u2014 tests are part of the test suite):
909
+ \`\`\`markdown
910
+ ### Active Tests
911
+ | File | What it tests | Source PR | Merged |
912
+ |------|---------------|-----------|--------|
913
+ | login.spec.ts | Login flow with valid/invalid credentials | #12 | 2026-02-13 |
914
+ \`\`\`
915
+
916
+ Move entries from Drafted \u2192 Active Tests when PRs are merged. Remove entries when PRs are closed without merge.
917
+
918
+ #### 2.5 Event-Action Reference Patterns
897
919
 
898
920
  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.
899
921
 
@@ -912,6 +934,23 @@ Use these as reference patterns for common events. The webhook routing system al
912
934
  - **QA-relevant content found**: Propose appropriate follow-up tasks (e.g., \`/generate-test-cases\`, \`/verify-changes\`)
913
935
  - **No QA content** (HR meeting, offsite planning, etc.): Skip \u2014 log to event history only
914
936
 
937
+ **External Test Repo Events** (BYOT - events from the customer's external test repository):
938
+ - **PR opened by Bugzy** (\`com.github.external_repo.pull_request\`, \`action: "opened"\`, branch starts with \`bugzy/\`):
939
+ Log to Knowledge Base under "Drafted Tests". No action task needed \u2014 just record the PR number, branch, and what tests were added.
940
+ - **PR review submitted** (\`com.github.external_repo.pull_request_review\`):
941
+ If changes were requested \u2192 queue \`/verify-changes\` with \`{"existingPrBranch": "{head.ref}", "context": "PR review feedback: {review.body}"}\`.
942
+ The execution will iterate on the existing branch, push fixes, and skip PR creation.
943
+ - **PR comment** (\`com.github.external_repo.pull_request_comment\`):
944
+ Read the comment. If it contains actionable feedback, queue \`/verify-changes\`
945
+ with \`{"existingPrBranch": "{issue.pull_request.head.ref}"}\`.
946
+ - **PR merged** (\`com.github.external_repo.pull_request\`, \`action: "closed"\`, \`merged: true\`):
947
+ Update Knowledge Base: move entries from "Drafted Tests" to "Active Tests". Notify team of new test coverage.
948
+ The submodule pointer update happens automatically via the container (\`updateSubmoduleToLatest\`).
949
+ - **PR closed without merge** (\`com.github.external_repo.pull_request\`, \`action: "closed"\`, \`merged: false\`):
950
+ Remove from Knowledge Base "Drafted Tests". Notify team that tests were rejected.
951
+ - **Direct push to main** (\`com.github.external_repo.push\`, ref is main/master):
952
+ Update Knowledge Base if test files were affected. Submodule pointer update is automatic.
953
+
915
954
  **Other Events:**
916
955
  - Analyze for QA relevance based on knowledge base and project context
917
956
  - If action needed, propose appropriate task. If not, log and skip.