@bugzy-ai/bugzy 1.18.2 → 1.18.4

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 (61) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +273 -273
  3. package/dist/cli/index.cjs +295 -210
  4. package/dist/cli/index.cjs.map +1 -1
  5. package/dist/cli/index.js +294 -209
  6. package/dist/cli/index.js.map +1 -1
  7. package/dist/index.cjs +291 -206
  8. package/dist/index.cjs.map +1 -1
  9. package/dist/index.js +291 -206
  10. package/dist/index.js.map +1 -1
  11. package/dist/subagents/index.cjs +115 -137
  12. package/dist/subagents/index.cjs.map +1 -1
  13. package/dist/subagents/index.js +115 -137
  14. package/dist/subagents/index.js.map +1 -1
  15. package/dist/subagents/metadata.cjs +12 -18
  16. package/dist/subagents/metadata.cjs.map +1 -1
  17. package/dist/subagents/metadata.js +12 -18
  18. package/dist/subagents/metadata.js.map +1 -1
  19. package/dist/tasks/index.cjs +142 -54
  20. package/dist/tasks/index.cjs.map +1 -1
  21. package/dist/tasks/index.js +142 -54
  22. package/dist/tasks/index.js.map +1 -1
  23. package/dist/templates/init/.bugzy/runtime/knowledge-base.md +61 -0
  24. package/dist/templates/init/.bugzy/runtime/knowledge-maintenance-guide.md +97 -0
  25. package/dist/templates/init/.bugzy/runtime/project-context.md +35 -0
  26. package/dist/templates/init/.bugzy/runtime/subagent-memory-guide.md +87 -0
  27. package/dist/templates/init/.bugzy/runtime/templates/test-plan-template.md +50 -0
  28. package/dist/templates/init/.bugzy/runtime/templates/test-result-schema.md +498 -0
  29. package/dist/templates/init/.bugzy/runtime/test-execution-strategy.md +535 -0
  30. package/dist/templates/init/.bugzy/runtime/testing-best-practices.md +632 -0
  31. package/dist/templates/init/.gitignore-template +25 -0
  32. package/package.json +95 -95
  33. package/templates/init/.bugzy/runtime/knowledge-base.md +61 -61
  34. package/templates/init/.bugzy/runtime/knowledge-maintenance-guide.md +97 -97
  35. package/templates/init/.bugzy/runtime/project-context.md +35 -35
  36. package/templates/init/.bugzy/runtime/subagent-memory-guide.md +87 -87
  37. package/templates/init/.bugzy/runtime/templates/event-examples.md +194 -194
  38. package/templates/init/.bugzy/runtime/templates/test-plan-template.md +50 -50
  39. package/templates/init/.bugzy/runtime/templates/test-result-schema.md +498 -498
  40. package/templates/init/.claude/settings.json +28 -28
  41. package/templates/init/.env.testdata +18 -18
  42. package/templates/init/.gitignore-template +24 -24
  43. package/templates/init/AGENTS.md +155 -155
  44. package/templates/init/CLAUDE.md +157 -157
  45. package/templates/init/test-runs/README.md +45 -45
  46. package/templates/init/tests/CLAUDE.md +193 -193
  47. package/templates/init/tests/docs/test-execution-strategy.md +535 -535
  48. package/templates/init/tests/docs/testing-best-practices.md +724 -724
  49. package/templates/playwright/BasePage.template.ts +190 -190
  50. package/templates/playwright/auth.setup.template.ts +89 -89
  51. package/templates/playwright/dataGenerators.helper.template.ts +148 -148
  52. package/templates/playwright/dateUtils.helper.template.ts +96 -96
  53. package/templates/playwright/pages.fixture.template.ts +50 -50
  54. package/templates/playwright/playwright.config.template.ts +97 -97
  55. package/templates/playwright/reporters/__tests__/bugzy-reporter-failure-classification.test.ts +299 -299
  56. package/templates/playwright/reporters/__tests__/bugzy-reporter-manifest-merge.test.ts +329 -329
  57. package/templates/playwright/reporters/__tests__/playwright.config.ts +5 -5
  58. package/templates/playwright/reporters/bugzy-reporter.ts +784 -784
  59. package/templates/init/.bugzy/runtime/handlers/messages/feedback.md +0 -178
  60. package/templates/init/.bugzy/runtime/handlers/messages/question.md +0 -122
  61. package/templates/init/.bugzy/runtime/handlers/messages/status.md +0 -146
@@ -1,178 +0,0 @@
1
- # Feedback Message Handler
2
-
3
- Instructions for processing bug reports, test observations, and user feedback.
4
-
5
- ## Detection Criteria
6
-
7
- This handler applies when:
8
- - User reports an issue, bug, or unexpected behavior
9
- - User shares test results or observations
10
- - User provides information (not asking a question or requesting action)
11
- - Keywords present: "found", "issue", "bug", "doesn't work", "broken", "observed", "noticed", "failed", "error"
12
- - Intent field from LLM layer is `feedback`
13
- - Re-routed from clarification handler (thread reply with no blocked task)
14
-
15
- ## Processing Steps
16
-
17
- ### Step 1: Parse Feedback
18
-
19
- Extract the following from the message:
20
-
21
- | Field | Description | Examples |
22
- |-------|-------------|----------|
23
- | **Type** | Category of feedback | `bug_report`, `test_result`, `observation`, `suggestion`, `general` |
24
- | **Severity** | Impact level | `critical`, `high`, `medium`, `low` |
25
- | **Component** | Affected area | "login", "checkout", "search", etc. |
26
- | **Description** | Core issue description | What happened |
27
- | **Expected** | What should happen (if stated) | Expected behavior |
28
- | **Steps** | How to reproduce (if provided) | Reproduction steps |
29
-
30
- **Type Detection**:
31
- - `bug_report`: "bug", "broken", "doesn't work", "error", "crash"
32
- - `test_result`: "test passed", "test failed", "ran tests", "testing showed"
33
- - `observation`: "noticed", "observed", "found that", "saw that"
34
- - `suggestion`: "should", "could we", "what if", "idea"
35
- - `general`: Default for unclassified feedback
36
-
37
- ### Step 2: Check for Duplicates
38
-
39
- Search the knowledge base for similar entries:
40
-
41
- 1. Read `.bugzy/runtime/knowledge-base.md`
42
- 2. Search for:
43
- - Same component + similar symptoms
44
- - Matching keywords from the description
45
- - Recent entries (last 30 days) with similar patterns
46
- 3. If duplicate found:
47
- - Reference the existing entry
48
- - Note any new information provided
49
- - Update existing entry if new details are valuable
50
-
51
- ### Step 3: Update Knowledge Base
52
-
53
- Add or update entry in `.bugzy/runtime/knowledge-base.md`:
54
-
55
- **For Bug Reports**:
56
- ```markdown
57
- ### Bug Report: [Brief Description]
58
- **Reported**: [ISO date]
59
- **Source**: Slack - [username if available]
60
- **Component**: [component]
61
- **Severity**: [severity]
62
- **Status**: Under investigation
63
-
64
- **Description**: [full description]
65
-
66
- **Expected Behavior**: [if provided]
67
-
68
- **Steps to Reproduce**: [if provided]
69
- 1. Step one
70
- 2. Step two
71
-
72
- **Related**: [links to related issues/test cases if any]
73
- ```
74
-
75
- **For Observations**:
76
- ```markdown
77
- ### Observation: [Brief Description]
78
- **Reported**: [ISO date]
79
- **Source**: Slack - [username if available]
80
- **Component**: [component]
81
- **Context**: [what was being done when observed]
82
-
83
- **Details**: [full observation]
84
-
85
- **Impact**: [potential impact on testing]
86
- ```
87
-
88
- **For Test Results**:
89
- ```markdown
90
- ### Manual Test Result: [Test/Feature Name]
91
- **Reported**: [ISO date]
92
- **Source**: Slack - [username if available]
93
- **Result**: [passed/failed]
94
- **Component**: [component]
95
-
96
- **Details**: [what was tested, outcome]
97
-
98
- **Notes**: [any additional observations]
99
- ```
100
-
101
- ### Step 4: Determine Follow-up Actions
102
-
103
- Based on feedback type, consider additional actions:
104
-
105
- | Type | Potential Actions |
106
- |------|-------------------|
107
- | **bug_report (critical/high)** | Consider creating issue via issue-tracker if configured |
108
- | **bug_report (medium/low)** | Log in knowledge base, may inform future test cases |
109
- | **test_result** | Update relevant test case status if identifiable |
110
- | **observation** | May inform test plan updates |
111
- | **suggestion** | Log for future consideration |
112
-
113
- **Issue Tracker Integration** (if configured):
114
- - For critical/high severity bugs, check if issue-tracker agent is available
115
- - If so, create or link to an issue in the configured system
116
- - Reference the issue in the knowledge base entry
117
-
118
- ### Step 5: Acknowledge and Confirm
119
-
120
- Respond to the user confirming:
121
- 1. Feedback was received and understood
122
- 2. Summary of what was captured
123
- 3. What actions will be taken
124
- 4. Any follow-up questions if needed
125
-
126
- ## Response Guidelines
127
-
128
- **Structure**:
129
- ```
130
- Thanks for reporting this. Here's what I've captured:
131
-
132
- [Summary of the feedback]
133
-
134
- I've logged this in the knowledge base under [category].
135
- [Any follow-up actions being taken]
136
-
137
- [Optional: Follow-up questions if clarification needed]
138
- ```
139
-
140
- **Examples**:
141
-
142
- For bug report:
143
- ```
144
- Thanks for reporting this. I've logged the following:
145
-
146
- Bug: Checkout fails when cart has more than 10 items
147
- - Severity: High
148
- - Component: Checkout
149
- - Status: Under investigation
150
-
151
- I've added this to the knowledge base. This may affect our checkout test coverage - I'll review TC-045 through TC-048 for related scenarios.
152
-
153
- Can you confirm which browser this occurred in?
154
- ```
155
-
156
- For observation:
157
- ```
158
- Good catch - I've noted this observation:
159
-
160
- The loading spinner on the dashboard takes longer than expected after the recent update.
161
-
162
- I've added this to the knowledge base under performance observations. This might be worth adding to our performance test suite.
163
- ```
164
-
165
- ## Context Loading Requirements
166
-
167
- Required:
168
- - [x] Knowledge base (`.bugzy/runtime/knowledge-base.md`) - for duplicate check and updates
169
-
170
- Conditional:
171
- - [ ] Test cases (`./test-cases/`) - if feedback relates to specific test
172
- - [ ] Test runs (`./test-runs/`) - if feedback relates to recent results
173
-
174
- ## Memory Updates
175
-
176
- Required updates:
177
- - Knowledge base (`.bugzy/runtime/knowledge-base.md`) - add new entry or update existing
178
- - Optionally team communicator memory if tracking feedback sources
@@ -1,122 +0,0 @@
1
- # Question Message Handler
2
-
3
- Instructions for processing questions about the project, tests, coverage, or testing status.
4
-
5
- ## Detection Criteria
6
-
7
- This handler applies when:
8
- - Message contains question words (what, how, which, where, why, when, do, does, is, are, can)
9
- - Question relates to tests, test plan, coverage, test results, or project artifacts
10
- - User is seeking information, NOT requesting an action
11
- - Intent field from LLM layer is `question`
12
-
13
- ## Processing Steps
14
-
15
- ### Step 1: Classify Question Type
16
-
17
- Analyze the question to determine the primary type:
18
-
19
- | Type | Indicators | Primary Context Sources |
20
- |------|------------|------------------------|
21
- | **Coverage** | "what tests", "do we have", "is there a test for", "covered" | test-cases/, test-plan.md |
22
- | **Results** | "did tests pass", "what failed", "test results", "how many" | test-runs/ |
23
- | **Knowledge** | "how does", "what is", "explain", feature/component questions | knowledge-base.md |
24
- | **Plan** | "what's in scope", "test plan", "testing strategy", "priorities" | test-plan.md |
25
- | **Process** | "how do I", "when should", "what's the workflow" | project-context.md |
26
-
27
- ### Step 2: Load Relevant Context
28
-
29
- Based on question type, load the appropriate files:
30
-
31
- **For Coverage questions**:
32
- 1. Read `test-plan.md` for overall test strategy
33
- 2. List files in `./test-cases/` directory
34
- 3. Search test case files for relevant keywords
35
-
36
- **For Results questions**:
37
- 1. List directories in `./test-runs/` (sorted by date, newest first)
38
- 2. Read `summary.json` from relevant test run directories
39
- 3. Extract pass/fail counts, failure reasons
40
-
41
- **For Knowledge questions**:
42
- 1. Read `.bugzy/runtime/knowledge-base.md`
43
- 2. Search for relevant entries
44
- 3. Also check test-plan.md for feature descriptions
45
-
46
- **For Plan questions**:
47
- 1. Read `test-plan.md`
48
- 2. Extract relevant sections (scope, priorities, features)
49
-
50
- **For Process questions**:
51
- 1. Read `.bugzy/runtime/project-context.md`
52
- 2. Check for workflow documentation
53
-
54
- ### Step 3: Formulate Answer
55
-
56
- Compose the answer following these guidelines:
57
-
58
- 1. **Be specific**: Quote relevant sections from source files
59
- 2. **Cite sources**: Mention which files contain the information
60
- 3. **Structure clearly**: Use bullet points for multiple items
61
- 4. **Quantify when possible**: "We have 12 test cases covering login..."
62
- 5. **Acknowledge gaps**: If information is incomplete, say so
63
-
64
- ### Step 4: Offer Follow-up
65
-
66
- End responses with:
67
- - Offer to provide more detail if needed
68
- - Suggest related information that might be helpful
69
- - For coverage gaps, offer to create test cases
70
-
71
- ## Response Guidelines
72
-
73
- **Structure**:
74
- ```
75
- [Direct answer to the question]
76
-
77
- [Supporting details/evidence with file references]
78
-
79
- [Optional: Related information or follow-up offer]
80
- ```
81
-
82
- **Examples**:
83
-
84
- For "Do we have tests for login?":
85
- ```
86
- Yes, we have 4 test cases covering the login feature:
87
- - TC-001: Successful login with valid credentials
88
- - TC-002: Login failure with invalid password
89
- - TC-003: Login with remember me option
90
- - TC-004: Password reset flow
91
-
92
- These are documented in ./test-cases/TC-001.md through TC-004.md.
93
- Would you like details on any specific test case?
94
- ```
95
-
96
- For "How many tests passed in the last run?":
97
- ```
98
- The most recent test run (2024-01-15 14:30) results:
99
- - Total: 24 tests
100
- - Passed: 21 (87.5%)
101
- - Failed: 3
102
-
103
- Failed tests:
104
- - TC-012: Checkout timeout (performance issue)
105
- - TC-015: Image upload failed (file size validation)
106
- - TC-018: Search pagination broken
107
-
108
- Results are in ./test-runs/20240115-143000/summary.json
109
- ```
110
-
111
- ## Context Loading Requirements
112
-
113
- Required (based on question type):
114
- - [ ] Test plan (`test-plan.md`) - for coverage, plan, knowledge questions
115
- - [ ] Test cases (`./test-cases/`) - for coverage questions
116
- - [ ] Test runs (`./test-runs/`) - for results questions
117
- - [ ] Knowledge base (`.bugzy/runtime/knowledge-base.md`) - for knowledge questions
118
- - [ ] Project context (`.bugzy/runtime/project-context.md`) - for process questions
119
-
120
- ## Memory Updates
121
-
122
- None required - questions are read-only operations. No state changes needed.
@@ -1,146 +0,0 @@
1
- # Status Message Handler
2
-
3
- Instructions for processing status requests about tests, tasks, or executions.
4
-
5
- ## Detection Criteria
6
-
7
- This handler applies when:
8
- - User asks about progress or status
9
- - Keywords present: "status", "progress", "how is", "what happened", "results", "how did", "update on"
10
- - Questions about test runs, task completion, or execution state
11
- - Intent field from LLM layer is `status`
12
-
13
- ## Processing Steps
14
-
15
- ### Step 1: Identify Status Scope
16
-
17
- Determine what the user is asking about:
18
-
19
- | Scope | Indicators | Data Sources |
20
- |-------|------------|--------------|
21
- | **Latest test run** | "last run", "recent tests", "how did tests go" | Most recent test-runs/ directory |
22
- | **Specific test** | Test ID mentioned (TC-XXX), specific feature name | test-runs/*/TC-XXX/, test-cases/TC-XXX.md |
23
- | **All tests / Overall** | "overall", "all tests", "test coverage", "pass rate" | All test-runs/ summaries |
24
- | **Specific feature** | Feature name mentioned | Filter test-runs by feature |
25
- | **Task progress** | "is the task done", "what's happening with" | team-communicator memory |
26
-
27
- ### Step 2: Gather Status Data
28
-
29
- **For Latest Test Run**:
30
- 1. List directories in `./test-runs/` sorted by name (newest first)
31
- 2. Read `summary.json` from the most recent directory
32
- 3. Extract: total tests, passed, failed, skipped, execution time
33
- 4. For failures, extract brief failure reasons
34
-
35
- **For Specific Test**:
36
- 1. Find test case file in `./test-cases/TC-XXX.md`
37
- 2. Search test-runs for directories containing this test ID
38
- 3. Get most recent result for this specific test
39
- 4. Include: last run date, result, failure reason if failed
40
-
41
- **For Overall Status**:
42
- 1. Read all `summary.json` files in test-runs/
43
- 2. Calculate aggregate statistics:
44
- - Total runs in period (last 7 days, 30 days, etc.)
45
- - Overall pass rate
46
- - Most commonly failing tests
47
- - Trend (improving/declining)
48
-
49
- **For Task Progress**:
50
- 1. Read `.bugzy/runtime/memory/team-communicator.md`
51
- 2. Check for active tasks, blocked tasks, recently completed tasks
52
- 3. Extract relevant task status
53
-
54
- ### Step 3: Format Status Report
55
-
56
- Present status clearly and concisely:
57
-
58
- **For Latest Test Run**:
59
- ```
60
- Test Run: [YYYYMMDD-HHMMSS]
61
- Status: [Completed/In Progress]
62
-
63
- Results:
64
- - Total: [N] tests
65
- - Passed: [N] ([%])
66
- - Failed: [N] ([%])
67
- - Skipped: [N]
68
-
69
- [If failures exist:]
70
- Failed Tests:
71
- - [TC-XXX]: [Brief failure reason]
72
- - [TC-YYY]: [Brief failure reason]
73
-
74
- Duration: [X minutes]
75
- ```
76
-
77
- **For Specific Test**:
78
- ```
79
- Test: [TC-XXX] - [Test Name]
80
-
81
- Latest Result: [Passed/Failed]
82
- Run Date: [Date/Time]
83
-
84
- [If failed:]
85
- Failure Reason: [reason]
86
- Last Successful: [date if known]
87
-
88
- [If passed:]
89
- Consecutive Passes: [N] (since [date])
90
- ```
91
-
92
- **For Overall Status**:
93
- ```
94
- Test Suite Overview (Last [N] Days)
95
-
96
- Total Test Runs: [N]
97
- Average Pass Rate: [%]
98
-
99
- Trend: [Improving/Stable/Declining]
100
-
101
- Most Reliable Tests:
102
- - [TC-XXX]: [100%] pass rate
103
- - [TC-YYY]: [100%] pass rate
104
-
105
- Flaky/Failing Tests:
106
- - [TC-ZZZ]: [40%] pass rate - [common failure reason]
107
- - [TC-AAA]: [60%] pass rate - [common failure reason]
108
-
109
- Last Run: [date/time] - [X/Y passed]
110
- ```
111
-
112
- ### Step 4: Provide Context and Recommendations
113
-
114
- Based on the status:
115
-
116
- **For failing tests**:
117
- - Suggest reviewing the test case
118
- - Mention if this is a new failure or recurring
119
- - Link to relevant knowledge base entries if they exist
120
-
121
- **For overall declining trends**:
122
- - Highlight which tests are causing the decline
123
- - Suggest investigation areas
124
-
125
- **For good results**:
126
- - Acknowledge the healthy state
127
- - Mention any tests that were previously failing and are now passing
128
-
129
- ## Response Guidelines
130
-
131
- - Lead with the most important information (pass/fail summary)
132
- - Use clear formatting (bullet points, percentages)
133
- - Include timestamps so users know data freshness
134
- - Offer to drill down into specifics if summary was given
135
- - Keep responses scannable - use structure over paragraphs
136
-
137
- ## Context Loading Requirements
138
-
139
- Required (based on scope):
140
- - [ ] Test runs (`./test-runs/`) - for any test status
141
- - [ ] Test cases (`./test-cases/`) - for specific test details
142
- - [ ] Team communicator memory (`.bugzy/runtime/memory/team-communicator.md`) - for task status
143
-
144
- ## Memory Updates
145
-
146
- None required - status checks are read-only operations. No state changes needed.