@bugzy-ai/bugzy 1.12.3 → 1.13.0

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/index.cjs CHANGED
@@ -1442,7 +1442,9 @@ Extract the following from arguments:
1442
1442
  "read-knowledge-base",
1443
1443
  // Step 5: Test Execution Strategy (library)
1444
1444
  "read-test-strategy",
1445
- // Step 6: Identify Tests (inline - task-specific)
1445
+ // Step 6: Clarification Protocol (library)
1446
+ "clarification-protocol",
1447
+ // Step 7: Identify Tests (inline - task-specific)
1446
1448
  {
1447
1449
  inline: true,
1448
1450
  title: "Identify Automated Tests to Run",
@@ -1660,7 +1662,9 @@ Store the detected trigger for use in output routing:
1660
1662
  - Set variable: \`TRIGGER_SOURCE\` = [GITHUB_PR | SLACK_MESSAGE | CI_CD | MANUAL]
1661
1663
  - This determines output formatting and delivery channel`
1662
1664
  },
1663
- // Step 6: Extract Context (inline)
1665
+ // Step 6: Clarification Protocol (library)
1666
+ "clarification-protocol",
1667
+ // Step 7: Extract Context (inline)
1664
1668
  {
1665
1669
  inline: true,
1666
1670
  title: "Extract Context Based on Trigger",
@@ -2113,8 +2117,11 @@ This command orchestrates the complete test coverage workflow in a single execut
2113
2117
  2. **Phase 2**: Generate lightweight test plan
2114
2118
  3. **Phase 3**: Generate and verify test cases (create + fix until passing)
2115
2119
  4. **Phase 4**: Triage failures and fix test issues
2116
- 5. **Phase 5**: Log product bugs
2117
- 6. **Phase 6**: Final report`
2120
+ 5. **Phase 5**: Log product bugs to issue tracker
2121
+ 6. **Phase 6**: Notify team via Slack/Teams with results summary
2122
+ 7. **Phase 7**: Generate final report
2123
+
2124
+ **IMPORTANT**: All phases must be completed. Do NOT skip Phase 5 (bug logging) or Phase 6 (team notification) \u2014 these are required deliverables.`
2118
2125
  },
2119
2126
  // Step 2: Security Notice (from library)
2120
2127
  "security-notice",
@@ -6279,6 +6286,16 @@ Determine exploration depth based on requirement quality:
6279
6286
  - **Vague:** "Fix the sorting in todo list page. The items are mixed up for premium users."
6280
6287
  - **Unclear:** "Improve the dashboard performance. Users say it's slow."
6281
6288
 
6289
+ ### Maturity Adjustment
6290
+
6291
+ If the Clarification Protocol determined project maturity, adjust exploration depth:
6292
+
6293
+ - **New project**: Default one level deeper than requirement clarity suggests (Clear \u2192 Moderate, Vague \u2192 Deep)
6294
+ - **Growing project**: Use requirement clarity as-is (standard protocol)
6295
+ - **Mature project**: Trust knowledge base \u2014 can stay at suggested depth or go one level shallower if KB covers the feature
6296
+
6297
+ **Always verify features exist before testing them.** If exploration reveals that a referenced page or feature does not exist in the application, this is CRITICAL severity \u2014 escalate via the Clarification Protocol regardless of maturity level. Do NOT silently adapt or work around the missing feature.
6298
+
6282
6299
  ### Quick Exploration (1-2 min)
6283
6300
 
6284
6301
  **When:** Requirements CLEAR
@@ -6510,6 +6527,33 @@ Before starting, check if this task is resuming from a blocked clarification:
6510
6527
 
6511
6528
  3. **If no clarification in $ARGUMENTS:** Proceed normally with ambiguity detection below.
6512
6529
 
6530
+ ### Assess Project Maturity
6531
+
6532
+ Before detecting ambiguity, assess how well you know this project. Maturity determines how aggressively you should ask questions \u2014 new projects require more questions, mature projects can rely on accumulated knowledge.
6533
+
6534
+ **Measure maturity from runtime artifacts:**
6535
+
6536
+ | Signal | New | Growing | Mature |
6537
+ |--------|-----|---------|--------|
6538
+ | \`knowledge-base.md\` | < 80 lines (template) | 80-300 lines | 300+ lines |
6539
+ | \`memory/\` files | 0 files | 1-3 files | 4+ files, >5KB each |
6540
+ | Test cases in \`test-cases/\` | 0 | 1-6 | 7+ |
6541
+ | Exploration reports | 0 | 1 | 2+ |
6542
+
6543
+ **Steps:**
6544
+ 1. Read \`.bugzy/runtime/knowledge-base.md\` and count lines
6545
+ 2. List \`.bugzy/runtime/memory/\` directory and count files
6546
+ 3. List \`test-cases/\` directory and count \`.md\` files (exclude README)
6547
+ 4. Count exploration reports in \`exploration-reports/\`
6548
+ 5. Classify: If majority of signals = New \u2192 **New**; majority Mature \u2192 **Mature**; otherwise \u2192 **Growing**
6549
+
6550
+ **Maturity adjusts your question threshold:**
6551
+ - **New**: Ask for CRITICAL + HIGH + MEDIUM severity (gather information aggressively)
6552
+ - **Growing**: Ask for CRITICAL + HIGH severity (standard protocol)
6553
+ - **Mature**: Ask for CRITICAL only (handle HIGH with documented assumptions)
6554
+
6555
+ **CRITICAL severity ALWAYS triggers a question, regardless of maturity level.**
6556
+
6513
6557
  ### Detect Ambiguity
6514
6558
 
6515
6559
  Scan for ambiguity signals:
@@ -6536,8 +6580,8 @@ If ambiguity is detected, assess its severity:
6536
6580
 
6537
6581
  | Severity | Characteristics | Examples | Action |
6538
6582
  |----------|----------------|----------|--------|
6539
- | **CRITICAL** | Expected behavior undefined/contradictory; test outcome unpredictable; core functionality unclear; success criteria missing; multiple interpretations = different strategies | "Fix the issue" (what issue?), "Improve performance" (which metrics?), "Fix sorting in todo list" (by date? priority? completion status?) | **STOP** - Seek clarification before proceeding |
6540
- | **HIGH** | Core underspecified but direction clear; affects majority of scenarios; vague success criteria; assumptions risky | "Fix ordering" (sequence OR visibility?), "Add validation" (what? messages?), "Update dashboard" (which widgets?) | **STOP** - Seek clarification before proceeding |
6583
+ | **CRITICAL** | Expected behavior undefined/contradictory; test outcome unpredictable; core functionality unclear; success criteria missing; multiple interpretations = different strategies; **referenced page/feature does not exist in the application** | "Fix the issue" (what issue?), "Improve performance" (which metrics?), "Fix sorting in todo list" (by date? priority? completion status?), "Test the Settings page" (no Settings page exists), "Verify the checkout flow" (no checkout page found) | **STOP** - You MUST ask via team-communicator before proceeding |
6584
+ | **HIGH** | Core underspecified but direction clear; affects majority of scenarios; vague success criteria; assumptions risky | "Fix ordering" (sequence OR visibility?), "Add validation" (what? messages?), "Update dashboard" (which widgets?) | **STOP** - You MUST ask via team-communicator before proceeding |
6541
6585
  | **MEDIUM** | Specific details missing; general requirements clear; affects subset of cases; reasonable low-risk assumptions possible; wrong assumption = test updates not strategy overhaul | Missing field labels, unclear error message text, undefined timeouts, button placement not specified, date formats unclear | **PROCEED** - (1) Moderate exploration, (2) Document assumptions: "Assuming X because Y", (3) Proceed with creation/execution, (4) Async clarification (team-communicator), (5) Mark [ASSUMED: description] |
6542
6586
  | **LOW** | Minor edge cases; documentation gaps don't affect execution; optional/cosmetic elements; minimal impact | Tooltip text, optional field validation, icon choice, placeholder text, tab order | **PROCEED** - (1) Mark [TO BE CLARIFIED: description], (2) Proceed, (3) Mention in report "Minor Details", (4) No blocking/async clarification |
6543
6587
 
@@ -6638,18 +6682,26 @@ Tasks waiting for clarification responses.
6638
6682
 
6639
6683
  ### Wait or Proceed Based on Severity
6640
6684
 
6641
- **CRITICAL/HIGH \u2192 STOP and Wait:**
6642
- - Do NOT create tests, run tests, or make assumptions
6643
- - Wait for clarification, resume after answer
6685
+ **Use your maturity assessment to adjust thresholds:**
6686
+ - **New project**: STOP for CRITICAL + HIGH + MEDIUM
6687
+ - **Growing project**: STOP for CRITICAL + HIGH (default)
6688
+ - **Mature project**: STOP for CRITICAL only; handle HIGH with documented assumptions
6689
+
6690
+ **When severity meets your STOP threshold:**
6691
+ - You MUST call team-communicator (Slack) to ask the question \u2014 do NOT just mention it in your text output
6692
+ - Do NOT create tests, run tests, or make assumptions about the unclear aspect
6693
+ - Do NOT silently adapt by working around the issue (e.g., running other tests instead)
6694
+ - Do NOT invent your own success criteria when none are provided
6695
+ - Register the blocked task and wait for clarification
6644
6696
  - *Rationale: Wrong assumptions = incorrect tests, false results, wasted time*
6645
6697
 
6646
- **MEDIUM \u2192 Proceed with Documented Assumptions:**
6698
+ **When severity is below your STOP threshold \u2192 Proceed with Documented Assumptions:**
6647
6699
  - Perform moderate exploration, document assumptions, proceed with creation/execution
6648
6700
  - Ask clarification async (team-communicator), mark results "based on assumptions"
6649
6701
  - Update tests after clarification received
6650
6702
  - *Rationale: Waiting blocks progress; documented assumptions allow forward movement with later corrections*
6651
6703
 
6652
- **LOW \u2192 Proceed and Mark:**
6704
+ **LOW \u2192 Always Proceed and Mark:**
6653
6705
  - Proceed with creation/execution, mark gaps [TO BE CLARIFIED] or [ASSUMED]
6654
6706
  - Mention in report but don't prioritize, no blocking
6655
6707
  - *Rationale: Details don't affect strategy/results significantly*
@@ -6677,11 +6729,12 @@ When reporting test results, always include an "Ambiguities" section if clarific
6677
6729
 
6678
6730
  ## Remember
6679
6731
 
6680
- - **Block for CRITICAL/HIGH** - Never proceed with assumptions on unclear core requirements
6732
+ - **STOP means STOP** - When you hit a STOP threshold, you MUST call team-communicator to ask via Slack. Do NOT silently adapt, skip, or work around the issue
6733
+ - **Non-existent features = CRITICAL** - If a page, component, or feature referenced in the task does not exist, this is always CRITICAL severity \u2014 ask what was meant
6681
6734
  - **Ask correctly > guess poorly** - Specific questions lead to specific answers
6682
- - **Document MEDIUM assumptions** - Track what you assumed and why
6735
+ - **Never invent success criteria** - If the task says "improve" or "fix" without metrics, ask what "done" looks like
6683
6736
  - **Check memory first** - Avoid re-asking previously answered questions
6684
- - **Specific questions \u2192 specific answers** - Vague questions get vague answers`,
6737
+ - **Maturity adjusts threshold, not judgment** - Even in mature projects, CRITICAL always triggers a question`,
6685
6738
  tags: ["clarification", "protocol", "ambiguity"]
6686
6739
  };
6687
6740