@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.js CHANGED
@@ -1386,7 +1386,9 @@ Extract the following from arguments:
1386
1386
  "read-knowledge-base",
1387
1387
  // Step 5: Test Execution Strategy (library)
1388
1388
  "read-test-strategy",
1389
- // Step 6: Identify Tests (inline - task-specific)
1389
+ // Step 6: Clarification Protocol (library)
1390
+ "clarification-protocol",
1391
+ // Step 7: Identify Tests (inline - task-specific)
1390
1392
  {
1391
1393
  inline: true,
1392
1394
  title: "Identify Automated Tests to Run",
@@ -1604,7 +1606,9 @@ Store the detected trigger for use in output routing:
1604
1606
  - Set variable: \`TRIGGER_SOURCE\` = [GITHUB_PR | SLACK_MESSAGE | CI_CD | MANUAL]
1605
1607
  - This determines output formatting and delivery channel`
1606
1608
  },
1607
- // Step 6: Extract Context (inline)
1609
+ // Step 6: Clarification Protocol (library)
1610
+ "clarification-protocol",
1611
+ // Step 7: Extract Context (inline)
1608
1612
  {
1609
1613
  inline: true,
1610
1614
  title: "Extract Context Based on Trigger",
@@ -2057,8 +2061,11 @@ This command orchestrates the complete test coverage workflow in a single execut
2057
2061
  2. **Phase 2**: Generate lightweight test plan
2058
2062
  3. **Phase 3**: Generate and verify test cases (create + fix until passing)
2059
2063
  4. **Phase 4**: Triage failures and fix test issues
2060
- 5. **Phase 5**: Log product bugs
2061
- 6. **Phase 6**: Final report`
2064
+ 5. **Phase 5**: Log product bugs to issue tracker
2065
+ 6. **Phase 6**: Notify team via Slack/Teams with results summary
2066
+ 7. **Phase 7**: Generate final report
2067
+
2068
+ **IMPORTANT**: All phases must be completed. Do NOT skip Phase 5 (bug logging) or Phase 6 (team notification) \u2014 these are required deliverables.`
2062
2069
  },
2063
2070
  // Step 2: Security Notice (from library)
2064
2071
  "security-notice",
@@ -6223,6 +6230,16 @@ Determine exploration depth based on requirement quality:
6223
6230
  - **Vague:** "Fix the sorting in todo list page. The items are mixed up for premium users."
6224
6231
  - **Unclear:** "Improve the dashboard performance. Users say it's slow."
6225
6232
 
6233
+ ### Maturity Adjustment
6234
+
6235
+ If the Clarification Protocol determined project maturity, adjust exploration depth:
6236
+
6237
+ - **New project**: Default one level deeper than requirement clarity suggests (Clear \u2192 Moderate, Vague \u2192 Deep)
6238
+ - **Growing project**: Use requirement clarity as-is (standard protocol)
6239
+ - **Mature project**: Trust knowledge base \u2014 can stay at suggested depth or go one level shallower if KB covers the feature
6240
+
6241
+ **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.
6242
+
6226
6243
  ### Quick Exploration (1-2 min)
6227
6244
 
6228
6245
  **When:** Requirements CLEAR
@@ -6454,6 +6471,33 @@ Before starting, check if this task is resuming from a blocked clarification:
6454
6471
 
6455
6472
  3. **If no clarification in $ARGUMENTS:** Proceed normally with ambiguity detection below.
6456
6473
 
6474
+ ### Assess Project Maturity
6475
+
6476
+ 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.
6477
+
6478
+ **Measure maturity from runtime artifacts:**
6479
+
6480
+ | Signal | New | Growing | Mature |
6481
+ |--------|-----|---------|--------|
6482
+ | \`knowledge-base.md\` | < 80 lines (template) | 80-300 lines | 300+ lines |
6483
+ | \`memory/\` files | 0 files | 1-3 files | 4+ files, >5KB each |
6484
+ | Test cases in \`test-cases/\` | 0 | 1-6 | 7+ |
6485
+ | Exploration reports | 0 | 1 | 2+ |
6486
+
6487
+ **Steps:**
6488
+ 1. Read \`.bugzy/runtime/knowledge-base.md\` and count lines
6489
+ 2. List \`.bugzy/runtime/memory/\` directory and count files
6490
+ 3. List \`test-cases/\` directory and count \`.md\` files (exclude README)
6491
+ 4. Count exploration reports in \`exploration-reports/\`
6492
+ 5. Classify: If majority of signals = New \u2192 **New**; majority Mature \u2192 **Mature**; otherwise \u2192 **Growing**
6493
+
6494
+ **Maturity adjusts your question threshold:**
6495
+ - **New**: Ask for CRITICAL + HIGH + MEDIUM severity (gather information aggressively)
6496
+ - **Growing**: Ask for CRITICAL + HIGH severity (standard protocol)
6497
+ - **Mature**: Ask for CRITICAL only (handle HIGH with documented assumptions)
6498
+
6499
+ **CRITICAL severity ALWAYS triggers a question, regardless of maturity level.**
6500
+
6457
6501
  ### Detect Ambiguity
6458
6502
 
6459
6503
  Scan for ambiguity signals:
@@ -6480,8 +6524,8 @@ If ambiguity is detected, assess its severity:
6480
6524
 
6481
6525
  | Severity | Characteristics | Examples | Action |
6482
6526
  |----------|----------------|----------|--------|
6483
- | **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 |
6484
- | **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 |
6527
+ | **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 |
6528
+ | **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 |
6485
6529
  | **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] |
6486
6530
  | **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 |
6487
6531
 
@@ -6582,18 +6626,26 @@ Tasks waiting for clarification responses.
6582
6626
 
6583
6627
  ### Wait or Proceed Based on Severity
6584
6628
 
6585
- **CRITICAL/HIGH \u2192 STOP and Wait:**
6586
- - Do NOT create tests, run tests, or make assumptions
6587
- - Wait for clarification, resume after answer
6629
+ **Use your maturity assessment to adjust thresholds:**
6630
+ - **New project**: STOP for CRITICAL + HIGH + MEDIUM
6631
+ - **Growing project**: STOP for CRITICAL + HIGH (default)
6632
+ - **Mature project**: STOP for CRITICAL only; handle HIGH with documented assumptions
6633
+
6634
+ **When severity meets your STOP threshold:**
6635
+ - You MUST call team-communicator (Slack) to ask the question \u2014 do NOT just mention it in your text output
6636
+ - Do NOT create tests, run tests, or make assumptions about the unclear aspect
6637
+ - Do NOT silently adapt by working around the issue (e.g., running other tests instead)
6638
+ - Do NOT invent your own success criteria when none are provided
6639
+ - Register the blocked task and wait for clarification
6588
6640
  - *Rationale: Wrong assumptions = incorrect tests, false results, wasted time*
6589
6641
 
6590
- **MEDIUM \u2192 Proceed with Documented Assumptions:**
6642
+ **When severity is below your STOP threshold \u2192 Proceed with Documented Assumptions:**
6591
6643
  - Perform moderate exploration, document assumptions, proceed with creation/execution
6592
6644
  - Ask clarification async (team-communicator), mark results "based on assumptions"
6593
6645
  - Update tests after clarification received
6594
6646
  - *Rationale: Waiting blocks progress; documented assumptions allow forward movement with later corrections*
6595
6647
 
6596
- **LOW \u2192 Proceed and Mark:**
6648
+ **LOW \u2192 Always Proceed and Mark:**
6597
6649
  - Proceed with creation/execution, mark gaps [TO BE CLARIFIED] or [ASSUMED]
6598
6650
  - Mention in report but don't prioritize, no blocking
6599
6651
  - *Rationale: Details don't affect strategy/results significantly*
@@ -6621,11 +6673,12 @@ When reporting test results, always include an "Ambiguities" section if clarific
6621
6673
 
6622
6674
  ## Remember
6623
6675
 
6624
- - **Block for CRITICAL/HIGH** - Never proceed with assumptions on unclear core requirements
6676
+ - **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
6677
+ - **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
6625
6678
  - **Ask correctly > guess poorly** - Specific questions lead to specific answers
6626
- - **Document MEDIUM assumptions** - Track what you assumed and why
6679
+ - **Never invent success criteria** - If the task says "improve" or "fix" without metrics, ask what "done" looks like
6627
6680
  - **Check memory first** - Avoid re-asking previously answered questions
6628
- - **Specific questions \u2192 specific answers** - Vague questions get vague answers`,
6681
+ - **Maturity adjusts threshold, not judgment** - Even in mature projects, CRITICAL always triggers a question`,
6629
6682
  tags: ["clarification", "protocol", "ambiguity"]
6630
6683
  };
6631
6684