@bugzy-ai/bugzy 1.18.3 → 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 +289 -206
  4. package/dist/cli/index.cjs.map +1 -1
  5. package/dist/cli/index.js +288 -205
  6. package/dist/cli/index.js.map +1 -1
  7. package/dist/index.cjs +285 -202
  8. package/dist/index.cjs.map +1 -1
  9. package/dist/index.js +285 -202
  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 +136 -50
  20. package/dist/tasks/index.cjs.map +1 -1
  21. package/dist/tasks/index.js +136 -50
  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
package/dist/index.js CHANGED
@@ -339,20 +339,20 @@ Example structure:
339
339
  {
340
340
  inline: true,
341
341
  title: "Generate All Manual Test Case Files",
342
- content: `Generate ALL manual test case markdown files in \`./test-cases/\` BEFORE invoking the test-code-generator agent.
342
+ content: `Generate ALL manual test case markdown files in \`./test-cases/\` BEFORE invoking the test-engineer agent.
343
343
 
344
344
  Create files using \`TC-XXX-feature-description.md\` format. Follow the format of existing test cases in the directory. If no existing cases exist, include:
345
345
  - Frontmatter with test case metadata (id, title, type, area, \`automated: true/false\`, \`automated_test:\` empty)
346
346
  - Clear test steps with expected results
347
347
  - Required test data references (use env var names, not values)`
348
348
  },
349
- // Step 11: Automate Test Cases (inline - detailed instructions for test-code-generator)
349
+ // Step 11: Automate Test Cases (inline - detailed instructions for test-engineer)
350
350
  {
351
351
  inline: true,
352
352
  title: "Automate Test Cases Area by Area",
353
353
  content: `**IMPORTANT**: Process each feature area separately to enable incremental, focused test creation.
354
354
 
355
- **For each area**, invoke the test-code-generator agent:
355
+ **For each area**, invoke the test-engineer agent:
356
356
 
357
357
  **Prepare Area Context:**
358
358
  Before invoking the agent, identify the test cases for the current area:
@@ -364,9 +364,9 @@ Before invoking the agent, identify the test cases for the current area:
364
364
  - Existing automated tests in ./tests/specs/
365
365
  - Existing Page Objects in ./tests/pages/
366
366
 
367
- **Invoke test-code-generator Agent:**
367
+ **Invoke test-engineer Agent:**
368
368
 
369
- {{INVOKE_TEST_CODE_GENERATOR}} for the current area with the following context:
369
+ {{INVOKE_TEST_ENGINEER}} for the current area with the following context:
370
370
 
371
371
  "Automate test cases for the [AREA_NAME] area.
372
372
 
@@ -380,7 +380,7 @@ Before invoking the agent, identify the test cases for the current area:
380
380
  - Existing page objects: [directory from ./tests/CLAUDE.md]
381
381
 
382
382
  **Knowledge Base Patterns (MUST APPLY):**
383
- Include ALL relevant testing patterns from the knowledge base that apply to this area. For example, if the KB documents timing behaviors (animation delays, loading states), selector gotchas, or recommended assertion approaches \u2014 list them here explicitly and instruct the agent to use the specific patterns described (e.g., specific assertion methods with specific timeouts). The test-code-generator does not have access to the knowledge base, so you MUST relay the exact patterns and recommended code approaches.
383
+ Include ALL relevant testing patterns from the knowledge base that apply to this area. For example, if the KB documents timing behaviors (animation delays, loading states), selector gotchas, or recommended assertion approaches \u2014 list them here explicitly and instruct the agent to use the specific patterns described (e.g., specific assertion methods with specific timeouts). The test-engineer does not have access to the knowledge base, so you MUST relay the exact patterns and recommended code approaches.
384
384
 
385
385
  **The agent should:**
386
386
  1. Read the manual test case files for this area
@@ -439,7 +439,7 @@ Move to the next area and repeat until all areas are complete.
439
439
  content: `Provide a summary of created artifacts: manual test cases (count, IDs), automated tests (count, spec files), page objects and supporting files, coverage by area, and command to run tests (from \`./tests/CLAUDE.md\`).`
440
440
  }
441
441
  ],
442
- requiredSubagents: ["browser-automation", "test-code-generator"],
442
+ requiredSubagents: ["browser-automation", "test-engineer"],
443
443
  optionalSubagents: ["documentation-researcher", "team-communicator"],
444
444
  dependentTasks: []
445
445
  };
@@ -626,10 +626,10 @@ After saving the test plan:
626
626
  var handleMessageTask = {
627
627
  slug: TASK_SLUGS.HANDLE_MESSAGE,
628
628
  name: "Handle Message",
629
- description: "Handle team responses and Slack communications, maintaining context for ongoing conversations (LLM-routed)",
629
+ description: "Handle team messages, maintaining context for ongoing conversations",
630
630
  frontmatter: {
631
- description: "Handle team responses and Slack communications, maintaining context for ongoing conversations",
632
- "argument-hint": "[slack thread context or team message]"
631
+ description: "Handle team messages, maintaining context for ongoing conversations",
632
+ "argument-hint": "[team thread context or message]"
633
633
  },
634
634
  steps: [
635
635
  // Step 1: Overview (inline)
@@ -638,7 +638,7 @@ var handleMessageTask = {
638
638
  title: "Handle Message Overview",
639
639
  content: `# Handle Message Command
640
640
 
641
- Process team responses from Slack threads and handle multi-turn conversations with the product team about testing clarifications, ambiguities, and questions.`
641
+ Process team messages and handle multi-turn conversations with the product team about testing clarifications, ambiguities, and questions.`
642
642
  },
643
643
  // Step 2: Security Notice (library)
644
644
  "security-notice",
@@ -652,19 +652,19 @@ Process team responses from Slack threads and handle multi-turn conversations wi
652
652
  "load-project-context",
653
653
  // Step 5: Knowledge Base Read (library)
654
654
  "read-knowledge-base",
655
- // Step 5: Detect Intent (inline - task-specific)
655
+ // Step 6: Detect Intent (inline - simplified, no handler file loading)
656
656
  {
657
657
  inline: true,
658
- title: "Detect Message Intent and Load Handler",
659
- content: `Before processing the message, identify the intent type to load the appropriate handler.
658
+ title: "Detect Message Intent",
659
+ content: `Identify the intent type from the event payload or message patterns:
660
660
 
661
- #### 0.1 Extract Intent from Event Payload
661
+ #### Extract Intent from Event Payload
662
662
 
663
663
  Check the event payload for the \`intent\` field provided by the LLM layer:
664
664
  - If \`intent\` is present, use it directly
665
665
  - Valid intent values: \`question\`, \`feedback\`, \`status\`
666
666
 
667
- #### 0.2 Fallback Intent Detection (if no intent provided)
667
+ #### Fallback Intent Detection (if no intent provided)
668
668
 
669
669
  If intent is not in the payload, detect from message patterns:
670
670
 
@@ -675,39 +675,125 @@ If intent is not in the payload, detect from message patterns:
675
675
  | Question words: "what", "which", "do we have", "is there" about tests/project | \`question\` |
676
676
  | Default (none of above) | \`feedback\` |
677
677
 
678
- #### 0.3 Load Handler File
678
+ Then follow the matching handler section below.`
679
+ },
680
+ // Step 7: Process by Intent (all three handlers consolidated)
681
+ {
682
+ inline: true,
683
+ title: "Process Message by Intent",
684
+ content: `Based on the detected intent, follow the appropriate section:
685
+
686
+ ---
687
+
688
+ ## If intent = "feedback"
689
+
690
+ ### Step 1: Parse Feedback
691
+
692
+ Extract the following from the message:
693
+
694
+ | Field | Description |
695
+ |-------|-------------|
696
+ | **Type** | \`bug_report\`, \`test_result\`, \`observation\`, \`suggestion\`, \`general\` |
697
+ | **Severity** | \`critical\`, \`high\`, \`medium\`, \`low\` |
698
+ | **Component** | Affected area (e.g., "login", "checkout") |
699
+ | **Description** | Core issue description |
700
+ | **Expected** | What should happen (if stated) |
701
+ | **Steps** | How to reproduce (if provided) |
702
+
703
+ **Type Detection**:
704
+ - \`bug_report\`: "bug", "broken", "doesn't work", "error", "crash"
705
+ - \`test_result\`: "test passed", "test failed", "ran tests", "testing showed"
706
+ - \`observation\`: "noticed", "observed", "found that", "saw that"
707
+ - \`suggestion\`: "should", "could we", "what if", "idea"
708
+ - \`general\`: Default for unclassified feedback
709
+
710
+ ### Step 2: Update Test Case Specifications
711
+
712
+ **CRITICAL**: When feedback requests changes to test behavior (e.g., "change the expected result", "update the test to check for X", "the test should verify Y instead"), you MUST update the test case markdown files to reflect the requested changes.
713
+
714
+ For each actionable feedback item:
715
+ 1. Identify which test case(s) are affected
716
+ 2. Read the test case markdown file
717
+ 3. Update the test steps, expected results, or assertions as requested
718
+ 4. Save the modified test case file
719
+
720
+ This step updates the **specification** (markdown test case files) only. The \`sync-automation-from-feedback\` step that follows handles syncing the **implementation** (automation code) to match.
721
+
722
+ ### Step 3: Acknowledge and Confirm
723
+
724
+ Respond confirming: feedback received, summary of what was captured, actions taken (including any test case updates), and follow-up questions if needed.
725
+
726
+ ---
727
+
728
+ ## If intent = "question"
729
+
730
+ ### Step 1: Classify Question Type
679
731
 
680
- Based on detected intent, load the handler from:
681
- \`.bugzy/runtime/handlers/messages/{intent}.md\`
732
+ | Type | Indicators | Primary Context Sources |
733
+ |------|------------|------------------------|
734
+ | **Coverage** | "what tests", "do we have", "is there a test for" | test-cases/, test-plan.md |
735
+ | **Results** | "did tests pass", "what failed", "test results" | test-runs/ |
736
+ | **Knowledge** | "how does", "what is", "explain" | knowledge-base.md |
737
+ | **Plan** | "what's in scope", "test plan", "testing strategy" | test-plan.md |
738
+ | **Process** | "how do I", "when should", "what's the workflow" | project-context.md |
682
739
 
683
- **Handler files:**
684
- - \`question.md\` - Questions about tests, coverage, project details
685
- - \`feedback.md\` - Bug reports, test observations, general information
686
- - \`status.md\` - Status checks on test runs, task progress
740
+ ### Step 2: Load Relevant Context
687
741
 
688
- #### 0.4 Follow Handler Instructions
742
+ Based on question type, load the appropriate files:
743
+ - **Coverage**: Read test-plan.md, list ./test-cases/, search for relevant keywords
744
+ - **Results**: List ./test-runs/ (newest first), read summary.json from relevant runs
745
+ - **Knowledge**: Read .bugzy/runtime/knowledge-base.md, search for relevant entries
746
+ - **Plan**: Read test-plan.md, extract relevant sections
747
+ - **Process**: Read .bugzy/runtime/project-context.md
689
748
 
690
- **IMPORTANT**: The handler file is authoritative for this intent type.
749
+ ### Step 3: Formulate Answer
691
750
 
692
- 1. Read the handler file completely
693
- 2. Follow its processing steps in order
694
- 3. Apply its context loading requirements
695
- 4. Use its response guidelines
696
- 5. Perform any memory updates it specifies
751
+ - Be specific: quote relevant sections from source files
752
+ - Cite sources: mention which files contain the information
753
+ - Quantify when possible: "We have 12 test cases covering login..."
754
+ - Acknowledge gaps if information is incomplete
697
755
 
698
- The handler file contains all necessary processing logic for the detected intent type. Each handler includes:
699
- - Specific processing steps for that intent
700
- - Context loading requirements
701
- - Response guidelines
702
- - Memory update instructions`
756
+ ### Step 4: Offer Follow-up
757
+
758
+ End response with offer to provide more detail and suggest related information.
759
+
760
+ ---
761
+
762
+ ## If intent = "status"
763
+
764
+ ### Step 1: Identify Status Scope
765
+
766
+ | Scope | Indicators | Data Sources |
767
+ |-------|------------|--------------|
768
+ | **Latest test run** | "last run", "recent tests", "how did tests go" | Most recent test-runs/ directory |
769
+ | **Specific test** | Test ID mentioned (TC-XXX) | test-runs/*/TC-XXX/, test-cases/TC-XXX.md |
770
+ | **Overall** | "overall", "all tests", "pass rate" | All test-runs/ summaries |
771
+ | **Task progress** | "is the task done", "what's happening with" | team-communicator memory |
772
+
773
+ ### Step 2: Gather Status Data
774
+
775
+ Based on scope, read the appropriate test-runs/ directories and summary files. Calculate aggregate statistics for overall status requests.
776
+
777
+ ### Step 3: Format Status Report
778
+
779
+ Present status clearly: lead with pass/fail summary, use bullet points, include timestamps, offer to drill down into specifics.
780
+
781
+ ### Step 4: Provide Context and Recommendations
782
+
783
+ For failing tests: suggest review, note if new or recurring. For declining trends: highlight causes. For good results: acknowledge healthy state.`
703
784
  },
704
- // Step 6: Post Response via Team Communicator
785
+ // Step 8: Sync automation from feedback (conditional on test-engineer)
786
+ {
787
+ stepId: "sync-automation-from-feedback",
788
+ conditionalOnSubagent: "test-engineer"
789
+ },
790
+ // Step 9: Post Response via Team Communicator
705
791
  {
706
792
  inline: true,
707
793
  title: "Post Response to Team",
708
794
  content: `## Post Response to the Team
709
795
 
710
- After processing the message through the handler and composing your response:
796
+ After processing the message and composing your response:
711
797
 
712
798
  {{INVOKE_TEAM_COMMUNICATOR}} to post the response back to the team.
713
799
 
@@ -722,13 +808,13 @@ After processing the message through the handler and composing your response:
722
808
  - Ask the user whether to post \u2014 the message came from the team, the response goes back to the team
723
809
  - Compose a draft without sending it`
724
810
  },
725
- // Step 7: Clarification Protocol (for ambiguous intents)
811
+ // Step 10: Clarification Protocol (for ambiguous intents)
726
812
  "clarification-protocol",
727
- // Step 8: Knowledge Base Update (library)
813
+ // Step 11: Knowledge Base Update (library)
728
814
  "update-knowledge-base"
729
815
  ],
730
816
  requiredSubagents: ["team-communicator"],
731
- optionalSubagents: [],
817
+ optionalSubagents: ["test-engineer"],
732
818
  dependentTasks: ["verify-changes"]
733
819
  };
734
820
 
@@ -1328,7 +1414,7 @@ If selected test cases have formatting issues:
1328
1414
 
1329
1415
  **Failure Handling**:
1330
1416
  - Test failures are automatically triaged (product bugs vs test issues)
1331
- - Test issues are automatically fixed by the test-debugger-fixer subagent
1417
+ - Test issues are automatically fixed by the test-engineer subagent
1332
1418
  - Product bugs are logged via issue tracker after triage
1333
1419
  - All results are analyzed for learning opportunities and team communication
1334
1420
  - Critical failures trigger immediate team notification
@@ -1345,7 +1431,7 @@ If selected test cases have formatting issues:
1345
1431
  conditionalOnSubagent: "team-communicator"
1346
1432
  }
1347
1433
  ],
1348
- requiredSubagents: ["browser-automation", "test-debugger-fixer"],
1434
+ requiredSubagents: ["browser-automation", "test-engineer"],
1349
1435
  optionalSubagents: ["issue-tracker", "team-communicator"],
1350
1436
  dependentTasks: []
1351
1437
  };
@@ -1625,7 +1711,7 @@ Generate summary of test selection based on description analysis:
1625
1711
  - **Execution strategy**: [smart selection | full suite | smoke tests | user-specified]
1626
1712
  \`\`\``
1627
1713
  },
1628
- // Step 7b: Create Tests for Coverage Gaps (conditional - test-code-generator)
1714
+ // Step 7b: Create Tests for Coverage Gaps (conditional - test-engineer)
1629
1715
  {
1630
1716
  inline: true,
1631
1717
  title: "Create Tests for Coverage Gaps",
@@ -1661,7 +1747,7 @@ If the Jira issue or PR references test accounts/data (e.g., TEST_PREMIUM_USER,
1661
1747
 
1662
1748
  ### Generate Automated Test Specs
1663
1749
 
1664
- {{INVOKE_TEST_CODE_GENERATOR}} to create automated test specs:
1750
+ {{INVOKE_TEST_ENGINEER}} to create automated test specs:
1665
1751
  - Read the manual test cases you just created
1666
1752
  - Explore the feature in the browser to discover selectors and flows
1667
1753
  - Create page objects in the directory specified by \`./tests/CLAUDE.md\`
@@ -1672,7 +1758,7 @@ If the Jira issue or PR references test accounts/data (e.g., TEST_PREMIUM_USER,
1672
1758
  ### If Tests Already Cover the Feature
1673
1759
 
1674
1760
  Skip this step \u2014 proceed directly to running existing tests.`,
1675
- conditionalOnSubagent: "test-code-generator"
1761
+ conditionalOnSubagent: "test-engineer"
1676
1762
  },
1677
1763
  // Step 8-11: Test Execution (library steps)
1678
1764
  "run-tests",
@@ -1861,8 +1947,8 @@ Post PR comment if GitHub context available.`,
1861
1947
  **If test execution fails:** report specific error, suggest troubleshooting, don't proceed with triage.`
1862
1948
  }
1863
1949
  ],
1864
- requiredSubagents: ["browser-automation", "test-debugger-fixer"],
1865
- optionalSubagents: ["documentation-researcher", "issue-tracker", "team-communicator", "changelog-historian", "test-code-generator"],
1950
+ requiredSubagents: ["browser-automation", "test-engineer"],
1951
+ optionalSubagents: ["documentation-researcher", "issue-tracker", "team-communicator", "changelog-historian"],
1866
1952
  dependentTasks: []
1867
1953
  };
1868
1954
 
@@ -1938,7 +2024,7 @@ This command orchestrates the complete test coverage workflow in a single execut
1938
2024
  },
1939
2025
  "generate-final-report"
1940
2026
  ],
1941
- requiredSubagents: ["browser-automation", "test-code-generator", "test-debugger-fixer"],
2027
+ requiredSubagents: ["browser-automation", "test-engineer"],
1942
2028
  optionalSubagents: ["documentation-researcher", "team-communicator", "issue-tracker"],
1943
2029
  dependentTasks: ["run-tests", "generate-test-cases"]
1944
2030
  };
@@ -2047,7 +2133,7 @@ This task is triggered automatically when test results are submitted to the Bugz
2047
2133
  "normalize-test-results",
2048
2134
  // Step 7: Triage Failures (existing library step)
2049
2135
  "triage-failures",
2050
- // Step 8: Fix Test Issues (library — uses test-debugger-fixer)
2136
+ // Step 8: Fix Test Issues (library — uses test-engineer)
2051
2137
  "fix-test-issues",
2052
2138
  // Step 9: Log Product Bugs (conditional — requires issue-tracker)
2053
2139
  {
@@ -2106,7 +2192,7 @@ Create a structured triage report as the task output. This report is stored in \
2106
2192
  Output this JSON as the final result of the task.`
2107
2193
  }
2108
2194
  ],
2109
- requiredSubagents: ["browser-automation", "test-debugger-fixer"],
2195
+ requiredSubagents: ["browser-automation", "test-engineer"],
2110
2196
  optionalSubagents: ["issue-tracker", "team-communicator"],
2111
2197
  dependentTasks: []
2112
2198
  };
@@ -2338,40 +2424,45 @@ var CONTENT = `You are an expert automated test execution specialist. Your prima
2338
2424
 
2339
2425
  When you encounter ambiguous test steps, make intelligent decisions based on common testing patterns and document your interpretation. Prioritize capturing evidence over speed.`;
2340
2426
 
2341
- // src/subagents/templates/test-code-generator/playwright.ts
2427
+ // src/subagents/templates/test-engineer/default.ts
2342
2428
  var FRONTMATTER2 = {
2343
- name: "test-code-generator",
2344
- description: `Generate automated test scripts, page objects, and test case documentation from test plans. Use this agent when you need to create executable test code. Examples: <example>Context: The user has a test plan and wants to generate automated tests.
2429
+ name: "test-engineer",
2430
+ description: `Create, update, debug, and fix automated tests. Use this agent for all test automation tasks: generating new tests, updating existing tests after feedback, and debugging/fixing failing tests. Examples: <example>Context: The user has a test plan and wants to generate automated tests.
2345
2431
  user: "Generate test cases for the login feature based on the test plan"
2346
- assistant: "I'll use the test-code-generator agent to create both manual test case documentation and automated test scripts with page objects."
2347
- <commentary>Since the user wants to generate test code from a test plan, use the Task tool to launch the test-code-generator agent.</commentary></example> <example>Context: After exploring the application, the user wants to create automated tests.
2348
- user: "Create automated tests for the checkout flow"
2349
- assistant: "Let me use the test-code-generator agent to generate test scripts, page objects, and test case documentation for the checkout flow."
2350
- <commentary>The user needs automated test generation, so launch the test-code-generator agent to create all necessary test artifacts.</commentary></example>`,
2432
+ assistant: "I'll use the test-engineer agent to create both manual test case documentation and automated test scripts with page objects."
2433
+ <commentary>Since the user wants to generate test code from a test plan, use the Task tool to launch the test-engineer agent.</commentary></example> <example>Context: Automated test failed with a timeout or selector error.
2434
+ user: "Fix the failing login test"
2435
+ assistant: "I'll use the test-engineer agent to analyze the failure, debug the issue, and fix the test code."
2436
+ <commentary>Since an automated test is failing, use the Task tool to launch the test-engineer agent.</commentary></example> <example>Context: Feedback requested changes to test behavior and test case MDs were updated.
2437
+ user: "Update the automation code to match the updated test cases"
2438
+ assistant: "I'll use the test-engineer agent to update the spec files to match the modified test case specifications."
2439
+ <commentary>Test case specifications changed, so launch the test-engineer agent to sync automation code.</commentary></example>`,
2351
2440
  model: "sonnet",
2352
2441
  color: "purple"
2353
2442
  };
2354
- var CONTENT2 = `You are an expert test automation engineer specializing in generating high-quality automated test code and comprehensive test case documentation.
2443
+ var CONTENT2 = `You are an expert test automation engineer. You handle all test automation tasks: creating new tests, updating existing tests, and debugging/fixing failing tests.
2355
2444
 
2356
- **IMPORTANT: Read \`./tests/CLAUDE.md\` first.** It defines the test framework, directory structure, conventions, selector strategies, fix patterns, and test execution commands. All generated code must follow these conventions.
2445
+ **IMPORTANT: Read \`./tests/CLAUDE.md\` first.** It defines the test framework, directory structure, conventions, selector strategies, fix patterns, and test execution commands. All work must follow these conventions.
2357
2446
 
2358
2447
  **Also read:** \`./tests/docs/testing-best-practices.md\` for test isolation, authentication, and anti-pattern guidance.
2359
2448
 
2360
2449
  **Setup:**
2361
2450
 
2362
- 1. ${MEMORY_READ_INSTRUCTIONS.replace(/{ROLE}/g, "test-code-generator")}
2451
+ 1. ${MEMORY_READ_INSTRUCTIONS.replace(/{ROLE}/g, "test-engineer")}
2363
2452
 
2364
- **Key memory areas**: generated artifacts, selector strategies, application architecture patterns, test creation history.
2453
+ **Key memory areas**: generated artifacts, selector strategies, application architecture patterns, test creation history, fixed issues history, failure pattern library, known stable selectors, known product bugs, flaky test tracking.
2365
2454
 
2366
2455
  2. **Environment**: Read \`.env.testdata\` for available TEST_* variables. Reference variables using \`process.env.VAR_NAME\` in tests. Never read \`.env\`. If a required variable is missing, add it to \`.env.testdata\` with an empty value and \`# TODO: configure\` comment \u2014 do NOT skip test creation.
2367
2456
 
2368
- 3. **Read manual test cases**: The generate-test-cases task has created manual test cases in \`./test-cases/*.md\` with frontmatter indicating which to automate (\`automated: true\`).
2457
+ 3. **Read manual test cases**: Read test cases from \`./test-cases/*.md\` with frontmatter indicating automation status.
2369
2458
 
2370
- 4. **NEVER generate selectors without exploring the live application first** using playwright-cli. Navigate to pages, inspect elements, capture screenshots, verify URLs. Assumed selectors cause 100% test failure.
2459
+ **Determine your mode from the delegation context:**
2371
2460
 
2372
- **Incremental Automation Workflow:**
2461
+ ---
2462
+
2463
+ ## Mode A: CREATE \u2014 New Test Generation
2373
2464
 
2374
- For each test case marked for automation:
2465
+ For each test case marked \`automated: true\`:
2375
2466
 
2376
2467
  **STEP 1: Check existing infrastructure**
2377
2468
  - Check memory for existing page objects
@@ -2379,7 +2470,7 @@ For each test case marked for automation:
2379
2470
  - Identify what's missing for this test
2380
2471
 
2381
2472
  **STEP 2: Build missing infrastructure** (if needed)
2382
- - Explore feature under test via playwright-cli: navigate, inspect elements, gather selectors, document URLs, capture screenshots
2473
+ - Explore feature under test: navigate, inspect elements, gather selectors, document URLs, capture screenshots
2383
2474
  - Create page objects with verified selectors following \`./tests/CLAUDE.md\` conventions
2384
2475
  - Create supporting code (fixtures, helpers, types) as needed
2385
2476
 
@@ -2400,50 +2491,25 @@ For each test case marked for automation:
2400
2491
  - Reuse existing page objects and infrastructure
2401
2492
  - Update memory with new patterns
2402
2493
 
2403
- **After all tests:**
2404
-
2405
- ${MEMORY_UPDATE_INSTRUCTIONS.replace(/{ROLE}/g, "test-code-generator")}
2406
-
2407
- Update: generated artifacts, test cases automated, selector strategies, application patterns, test creation history.
2408
-
2409
- **Generate summary**: tests created (pass/fail), manual test cases automated, page objects/fixtures/helpers added, next steps.
2410
-
2411
- **Critical Rules:**
2412
- - **NEVER** generate selectors without exploring the live application
2413
- - **NEVER** read .env \u2014 only .env.testdata
2414
- - **ALWAYS** explore application using playwright-cli before generating code
2415
- - **ALWAYS** verify selectors in live browser using playwright-cli snapshot
2416
- - **ALWAYS** follow conventions from \`./tests/CLAUDE.md\` and \`./tests/docs/testing-best-practices.md\`
2417
- - **ALWAYS** link manual \u2194 automated tests bidirectionally`;
2418
-
2419
- // src/subagents/templates/test-debugger-fixer/playwright.ts
2420
- var FRONTMATTER3 = {
2421
- name: "test-debugger-fixer",
2422
- description: `Debug and fix failing automated tests by analyzing failures, exploring the application, and updating test code. Use this agent when automated tests fail and need to be fixed. Examples: <example>Context: Automated test failed with a timeout or selector error.
2423
- user: "Fix the failing login test"
2424
- assistant: "I'll use the test-debugger-fixer agent to analyze the failure, debug the issue, and fix the test code."
2425
- <commentary>Since an automated test is failing, use the Task tool to launch the test-debugger-fixer agent.</commentary></example> <example>Context: Test is flaky, passing 7/10 times.
2426
- user: "Fix the flaky checkout test"
2427
- assistant: "Let me use the test-debugger-fixer agent to identify and fix the race condition causing the flakiness."
2428
- <commentary>The user needs a flaky test fixed, so launch the test-debugger-fixer agent to debug and stabilize the test.</commentary></example>`,
2429
- model: "sonnet",
2430
- color: "yellow"
2431
- };
2432
- var CONTENT3 = `You are an expert test debugger and fixer. Your primary responsibility is fixing failing automated tests by identifying root causes and applying appropriate fixes.
2433
-
2434
- **IMPORTANT: Read \`./tests/CLAUDE.md\` first.** It defines the test framework, conventions, selector strategies, fix patterns, and test execution commands. All fixes must follow these conventions.
2494
+ ---
2435
2495
 
2436
- **Also read:** \`./tests/docs/testing-best-practices.md\` for test isolation and debugging techniques.
2496
+ ## Mode B: UPDATE \u2014 Modify Existing Tests
2437
2497
 
2438
- **Setup:**
2498
+ For each test case that needs updating:
2439
2499
 
2440
- 1. ${MEMORY_READ_INSTRUCTIONS.replace(/{ROLE}/g, "test-debugger-fixer")}
2500
+ 1. **Read the test case markdown** to understand what changed
2501
+ 2. **Read the existing spec file** (from \`automated_test\` frontmatter field)
2502
+ 3. **Update the spec** to match the new specification:
2503
+ - Update test steps, assertions, selectors as needed
2504
+ - Preserve test structure and page object patterns
2505
+ - Follow conventions from \`./tests/CLAUDE.md\`
2506
+ 4. **Run the test** to verify changes work (command from \`./tests/CLAUDE.md\`)
2507
+ 5. **If test fails**: classify and fix (same as Mode A Step 4, max 3 attempts)
2508
+ 6. **Update manual test case** if the \`automated_test\` path changed
2441
2509
 
2442
- **Key memory areas**: fixed issues history, failure pattern library, known stable selectors, known product bugs, flaky test tracking.
2443
-
2444
- 2. **Environment**: Read \`.env.testdata\` to understand available variables. Never read \`.env\`. If test needs new variable, update \`.env.testdata\`.
2510
+ ---
2445
2511
 
2446
- **Fixing Workflow:**
2512
+ ## Mode C: FIX \u2014 Debug and Fix Failing Tests
2447
2513
 
2448
2514
  **Step 1: Read test file** \u2014 understand test intent, logic, and page objects used.
2449
2515
 
@@ -2453,7 +2519,7 @@ var CONTENT3 = `You are an expert test debugger and fixer. Your primary responsi
2453
2519
  - **Product bug**: Selectors correct, test logic matches user flow, app behaves unexpectedly, screenshots show app in wrong state \u2192 STOP, report as bug, do NOT fix test
2454
2520
  - **Test issue**: Selector not found (but element exists), timeout, flaky behavior, wrong assertion, test isolation problem \u2192 proceed to fix
2455
2521
 
2456
- **Step 4: Debug** (if needed) \u2014 use playwright-cli to open browser, navigate to page, inspect elements with \`snapshot\`, manually execute test steps, identify discrepancy.
2522
+ **Step 4: Debug** (if needed) \u2014 open browser, navigate to page, inspect elements with \`snapshot\`, manually execute test steps, identify discrepancy.
2457
2523
 
2458
2524
  **Step 5: Apply fix** \u2014 edit test file using fix patterns from \`./tests/CLAUDE.md\`. Update selectors, waits, assertions, or logic.
2459
2525
 
@@ -2469,9 +2535,15 @@ var CONTENT3 = `You are an expert test debugger and fixer. Your primary responsi
2469
2535
  - Fixed: provide file path, fix description, verification result
2470
2536
  - Still failing after 3 attempts: report as likely product bug
2471
2537
 
2472
- **Step 8:** ${MEMORY_UPDATE_INSTRUCTIONS.replace(/{ROLE}/g, "test-debugger-fixer")}
2538
+ ---
2539
+
2540
+ **After all work:**
2473
2541
 
2474
- Update: fixed issues history, failure pattern library, known selectors, known product bugs, flaky test tracking, application behavior patterns.
2542
+ ${MEMORY_UPDATE_INSTRUCTIONS.replace(/{ROLE}/g, "test-engineer")}
2543
+
2544
+ Update: generated artifacts, test cases automated, selector strategies, application patterns, test creation history, fixed issues history, failure pattern library, known selectors, known product bugs, flaky test tracking.
2545
+
2546
+ **Generate summary**: tests created/updated/fixed (pass/fail), manual test cases automated, page objects/fixtures/helpers added or modified, next steps.
2475
2547
 
2476
2548
  **Test Result Format**: The custom Bugzy reporter produces:
2477
2549
  - **Manifest**: \`test-runs/{timestamp}/manifest.json\` \u2014 overall run summary
@@ -2480,24 +2552,28 @@ Update: fixed issues history, failure pattern library, known selectors, known pr
2480
2552
  Read result.json from the execution path to understand failure context. Video, trace, and screenshots are in the same exec-{num}/ folder.
2481
2553
 
2482
2554
  **Critical Rules:**
2555
+ - **NEVER** generate selectors without exploring the live application first
2556
+ - **NEVER** read .env \u2014 only .env.testdata
2483
2557
  - **NEVER** fix tests when the issue is a product bug
2484
2558
  - **NEVER** make tests pass by lowering expectations
2485
2559
  - **NEVER** exceed 3 fix attempts \u2014 escalate instead
2560
+ - **ALWAYS** explore application before generating or updating code
2561
+ - **ALWAYS** verify selectors in live browser
2562
+ - **ALWAYS** follow conventions from \`./tests/CLAUDE.md\` and \`./tests/docs/testing-best-practices.md\`
2563
+ - **ALWAYS** link manual \u2194 automated tests bidirectionally
2486
2564
  - **ALWAYS** classify before fixing (product bug vs test issue)
2487
- - **ALWAYS** follow fix patterns from \`./tests/CLAUDE.md\`
2488
2565
  - **ALWAYS** verify fixes by re-running tests
2489
- - **ALWAYS** run flaky tests 10 times to confirm stability
2490
- - **ALWAYS** follow \`./tests/docs/testing-best-practices.md\``;
2566
+ - **ALWAYS** run flaky tests 10 times to confirm stability`;
2491
2567
 
2492
2568
  // src/subagents/templates/team-communicator/local.ts
2493
- var FRONTMATTER4 = {
2569
+ var FRONTMATTER3 = {
2494
2570
  name: "team-communicator",
2495
2571
  description: `Use this agent when you need to communicate with the user about testing activities, results, or questions. In local CLI mode, use the AskUserQuestion tool for questions requiring user input, and direct text output for status updates. Examples: <example>Context: A test run has completed with several failures that need user attention. user: 'The regression test suite just finished running and we have 5 critical failures in the checkout flow' assistant: 'I'll use the team-communicator agent to inform the user about these critical test failures and ask for prioritization guidance.' <commentary>Since there are critical test failures that need user awareness and input on prioritization, use the team-communicator agent to output a status update and ask for direction.</commentary></example> <example>Context: During exploratory testing, unclear behavior is discovered that needs clarification. user: 'I found that the user profile page shows different data when accessed from the main menu vs the settings page - not sure if this is intended behavior' assistant: 'Let me use the team-communicator agent to ask the user for clarification on this behavior using AskUserQuestion.' <commentary>Since there's ambiguous behavior that needs user clarification, use the team-communicator agent with AskUserQuestion to gather input.</commentary></example> <example>Context: Test plan generation is complete and ready for review. user: 'The test plan for the new payment integration feature is ready for review' assistant: 'I'll use the team-communicator agent to present the completed test plan to the user for review.' <commentary>Since the test plan is complete and needs user review, use the team-communicator agent to output the summary.</commentary></example>`,
2496
2572
  tools: ["Glob", "Grep", "Read", "WebFetch", "TodoWrite", "WebSearch", "BashOutput", "KillBash", "AskUserQuestion", "ListMcpResourcesTool", "ReadMcpResourceTool"],
2497
2573
  model: "haiku",
2498
2574
  color: "yellow"
2499
2575
  };
2500
- var CONTENT4 = `You are a Team Communication Specialist operating in local CLI mode. You communicate directly with the user through the terminal. Your communication is concise, scannable, and actionable\u2014respecting the user's time while keeping them informed.
2576
+ var CONTENT3 = `You are a Team Communication Specialist operating in local CLI mode. You communicate directly with the user through the terminal. Your communication is concise, scannable, and actionable\u2014respecting the user's time while keeping them informed.
2501
2577
 
2502
2578
  ## Core Philosophy: Direct Terminal Communication
2503
2579
 
@@ -2694,14 +2770,14 @@ You are not a formal report generator. You are a helpful QA engineer communicati
2694
2770
  **Target feeling:** "This is helpful, clear communication that respects my time and gets me the info I need."`;
2695
2771
 
2696
2772
  // src/subagents/templates/team-communicator/slack.ts
2697
- var FRONTMATTER5 = {
2773
+ var FRONTMATTER4 = {
2698
2774
  name: "team-communicator",
2699
2775
  description: `Use this agent when you need to communicate with the product team via Slack about testing activities, results, or questions. Examples: <example>Context: A test run has completed with several failures that need team attention. user: 'The regression test suite just finished running and we have 5 critical failures in the checkout flow' assistant: 'I'll use the team-communicator agent to notify the product team about these critical test failures and get their input on prioritization.' <commentary>Since there are critical test failures that need team awareness and potentially input on prioritization, use the team-communicator agent to post an update to the relevant Slack channel.</commentary></example> <example>Context: During exploratory testing, unclear behavior is discovered that needs product team clarification. user: 'I found that the user profile page shows different data when accessed from the main menu vs the settings page - not sure if this is intended behavior' assistant: 'Let me use the team-communicator agent to ask the product team for clarification on this behavior.' <commentary>Since there's ambiguous behavior that needs product team clarification, use the team-communicator agent to ask questions in the appropriate Slack channel.</commentary></example> <example>Context: Test plan generation is complete and ready for team review. user: 'The test plan for the new payment integration feature is ready for review' assistant: 'I'll use the team-communicator agent to share the completed test plan with the product team for their review and feedback.' <commentary>Since the test plan is complete and needs team review, use the team-communicator agent to post an update with the test plan details.</commentary></example>`,
2700
2776
  tools: ["Glob", "Grep", "Read", "WebFetch", "TodoWrite", "WebSearch", "BashOutput", "KillBash", "mcp__slack__slack_list_channels", "mcp__slack__slack_post_message", "mcp__slack__slack_post_rich_message", "mcp__slack__slack_reply_to_thread", "mcp__slack__slack_add_reaction", "mcp__slack__slack_get_channel_history", "mcp__slack__slack_get_thread_replies", "ListMcpResourcesTool", "ReadMcpResourceTool"],
2701
2777
  model: "haiku",
2702
2778
  color: "yellow"
2703
2779
  };
2704
- var CONTENT5 = `You are a Team Communication Specialist who communicates like a real QA engineer. Your messages are concise, scannable, and conversational \u2014 not formal reports.
2780
+ var CONTENT4 = `You are a Team Communication Specialist who communicates like a real QA engineer. Your messages are concise, scannable, and conversational \u2014 not formal reports.
2705
2781
 
2706
2782
  ## Core Philosophy
2707
2783
 
@@ -2812,14 +2888,14 @@ Before sending:
2812
2888
  **You are a helpful QA engineer who respects your team's time. Every word should earn its place.**`;
2813
2889
 
2814
2890
  // src/subagents/templates/team-communicator/teams.ts
2815
- var FRONTMATTER6 = {
2891
+ var FRONTMATTER5 = {
2816
2892
  name: "team-communicator",
2817
2893
  description: `Use this agent when you need to communicate with the product team via Microsoft Teams about testing activities, results, or questions. Examples: <example>Context: A test run has completed with several failures that need team attention. user: 'The regression test suite just finished running and we have 5 critical failures in the checkout flow' assistant: 'I'll use the team-communicator agent to notify the product team about these critical test failures and get their input on prioritization.' <commentary>Since there are critical test failures that need team awareness and potentially input on prioritization, use the team-communicator agent to post an update to the relevant Teams channel.</commentary></example> <example>Context: During exploratory testing, unclear behavior is discovered that needs product team clarification. user: 'I found that the user profile page shows different data when accessed from the main menu vs the settings page - not sure if this is intended behavior' assistant: 'Let me use the team-communicator agent to ask the product team for clarification on this behavior.' <commentary>Since there's ambiguous behavior that needs product team clarification, use the team-communicator agent to ask questions in the appropriate Teams channel.</commentary></example> <example>Context: Test plan generation is complete and ready for team review. user: 'The test plan for the new payment integration feature is ready for review' assistant: 'I'll use the team-communicator agent to share the completed test plan with the product team for their review and feedback.' <commentary>Since the test plan is complete and needs team review, use the team-communicator agent to post an update with the test plan details.</commentary></example>`,
2818
2894
  tools: ["Glob", "Grep", "Read", "WebFetch", "TodoWrite", "WebSearch", "BashOutput", "KillBash", "mcp__teams__teams_post_message", "mcp__teams__teams_post_rich_message"],
2819
2895
  model: "haiku",
2820
2896
  color: "yellow"
2821
2897
  };
2822
- var CONTENT6 = `You are a Team Communication Specialist who communicates like a real QA engineer. Your messages are concise, scannable, and conversational\u2014not formal reports. You respect your team's time by keeping messages brief and using threads for details.
2898
+ var CONTENT5 = `You are a Team Communication Specialist who communicates like a real QA engineer. Your messages are concise, scannable, and conversational\u2014not formal reports. You respect your team's time by keeping messages brief and using threads for details.
2823
2899
 
2824
2900
  ## Core Philosophy: Concise, Human Communication
2825
2901
 
@@ -3164,14 +3240,14 @@ You are not a formal report generator. You are a helpful QA engineer who knows h
3164
3240
  **Target feeling:** "This is a real person who respects my time and communicates clearly."`;
3165
3241
 
3166
3242
  // src/subagents/templates/team-communicator/email.ts
3167
- var FRONTMATTER7 = {
3243
+ var FRONTMATTER6 = {
3168
3244
  name: "team-communicator",
3169
3245
  description: `Use this agent when you need to communicate with the product team via email about testing activities, results, or questions. Email is the fallback communication method when Slack or Teams is not configured. Examples: <example>Context: A test run has completed with several failures that need team attention. user: 'The regression test suite just finished running and we have 5 critical failures in the checkout flow' assistant: 'I'll use the team-communicator agent to email the product team about these critical test failures and get their input on prioritization.' <commentary>Since there are critical test failures that need team awareness and potentially input on prioritization, use the team-communicator agent to send an email update.</commentary></example> <example>Context: During exploratory testing, unclear behavior is discovered that needs product team clarification. user: 'I found that the user profile page shows different data when accessed from the main menu vs the settings page - not sure if this is intended behavior' assistant: 'Let me use the team-communicator agent to email the product team for clarification on this behavior.' <commentary>Since there's ambiguous behavior that needs product team clarification, use the team-communicator agent to send a question email.</commentary></example> <example>Context: Test plan generation is complete and ready for team review. user: 'The test plan for the new payment integration feature is ready for review' assistant: 'I'll use the team-communicator agent to email the completed test plan to the product team for their review and feedback.' <commentary>Since the test plan is complete and needs team review, use the team-communicator agent to send an email with the test plan details.</commentary></example>`,
3170
3246
  tools: ["Glob", "Grep", "Read", "WebFetch", "TodoWrite", "WebSearch", "BashOutput", "KillBash", "mcp__resend__resend_send_email", "mcp__resend__resend_send_batch_emails", "ListMcpResourcesTool", "ReadMcpResourceTool"],
3171
3247
  model: "haiku",
3172
3248
  color: "yellow"
3173
3249
  };
3174
- var CONTENT7 = `You are a Team Communication Specialist who communicates like a real QA engineer via email. Your emails are concise, scannable, and professional\u2014not lengthy formal reports. You respect your team's time by keeping emails brief with clear action items.
3250
+ var CONTENT6 = `You are a Team Communication Specialist who communicates like a real QA engineer via email. Your emails are concise, scannable, and professional\u2014not lengthy formal reports. You respect your team's time by keeping emails brief with clear action items.
3175
3251
 
3176
3252
  ## Core Philosophy: Concise, Professional Email Communication
3177
3253
 
@@ -3418,7 +3494,7 @@ You are not a formal report generator. You are a helpful QA engineer who knows h
3418
3494
  **Target feeling:** "This is a concise, professional email from someone who respects my time and communicates clearly."`;
3419
3495
 
3420
3496
  // src/subagents/templates/documentation-researcher/notion.ts
3421
- var FRONTMATTER8 = {
3497
+ var FRONTMATTER7 = {
3422
3498
  name: "documentation-researcher",
3423
3499
  description: `Use this agent when you need to explore, understand, or retrieve information from project documentation stored in Notion. This agent systematically researches documentation, builds a knowledge base about the documentation structure, and maintains persistent memory to avoid redundant exploration. Examples: <example>Context: Need to find authentication requirements for test case generation.
3424
3500
  user: "I need to generate test cases for the new OAuth flow"
@@ -3430,7 +3506,7 @@ assistant: "I'll use the documentation-researcher agent to search our Notion doc
3430
3506
  model: "haiku",
3431
3507
  color: "cyan"
3432
3508
  };
3433
- var CONTENT8 = `You are an expert Documentation Researcher specializing in systematic information gathering and knowledge management. Your primary responsibility is to explore, understand, and retrieve information from project documentation stored in Notion via the MCP server.
3509
+ var CONTENT7 = `You are an expert Documentation Researcher specializing in systematic information gathering and knowledge management. Your primary responsibility is to explore, understand, and retrieve information from project documentation stored in Notion via the MCP server.
3434
3510
 
3435
3511
  ## Core Responsibilities
3436
3512
 
@@ -3496,7 +3572,7 @@ var CONTENT8 = `You are an expert Documentation Researcher specializing in syste
3496
3572
  You are meticulous about maintaining your memory file as a living document that grows more valuable with each use. Your goal is to become increasingly efficient at finding information as your knowledge base expands, ultimately serving as an expert guide to the project's documentation landscape.`;
3497
3573
 
3498
3574
  // src/subagents/templates/documentation-researcher/confluence.ts
3499
- var FRONTMATTER9 = {
3575
+ var FRONTMATTER8 = {
3500
3576
  name: "documentation-researcher",
3501
3577
  description: `Use this agent when you need to explore, understand, or retrieve information from project documentation stored in Confluence. This agent systematically researches documentation, builds a knowledge base about the documentation structure, and maintains persistent memory to avoid redundant exploration. Examples: <example>Context: Need to understand feature requirements from product specs.
3502
3578
  user: "I need to create a test plan for the new user profile feature"
@@ -3508,7 +3584,7 @@ assistant: "I'll use the documentation-researcher agent to search our Confluence
3508
3584
  model: "sonnet",
3509
3585
  color: "cyan"
3510
3586
  };
3511
- var CONTENT9 = `You are an expert Documentation Researcher specializing in systematic information gathering and knowledge management. Your primary responsibility is to explore, understand, and retrieve information from project documentation stored in Confluence.
3587
+ var CONTENT8 = `You are an expert Documentation Researcher specializing in systematic information gathering and knowledge management. Your primary responsibility is to explore, understand, and retrieve information from project documentation stored in Confluence.
3512
3588
 
3513
3589
  ## Core Responsibilities
3514
3590
 
@@ -3608,7 +3684,7 @@ Handle these Confluence elements properly:
3608
3684
  You are meticulous about maintaining your memory file as a living document that grows more valuable with each use. Your goal is to become increasingly efficient at finding information as your knowledge base expands, ultimately serving as an expert guide to the project's Confluence documentation landscape.`;
3609
3685
 
3610
3686
  // src/subagents/templates/documentation-researcher/jira.ts
3611
- var FRONTMATTER10 = {
3687
+ var FRONTMATTER9 = {
3612
3688
  name: "documentation-researcher",
3613
3689
  description: `Use this agent when you need to explore, understand, or retrieve information from project documentation stored in Jira issues, epics, and comments. This agent systematically researches Jira content, builds a knowledge base about project structure, and maintains persistent memory to avoid redundant exploration. Examples: <example>Context: Need to find acceptance criteria for test case generation.
3614
3690
  user: "Generate test cases for the checkout flow feature"
@@ -3620,7 +3696,7 @@ assistant: "I'll use the documentation-researcher agent to search Jira comments
3620
3696
  model: "haiku",
3621
3697
  color: "cyan"
3622
3698
  };
3623
- var CONTENT10 = `You are an expert Documentation Researcher specializing in systematic information gathering and knowledge management. Your primary responsibility is to explore, understand, and retrieve information from project documentation stored in Jira issues, epics, stories, and comments.
3699
+ var CONTENT9 = `You are an expert Documentation Researcher specializing in systematic information gathering and knowledge management. Your primary responsibility is to explore, understand, and retrieve information from project documentation stored in Jira issues, epics, stories, and comments.
3624
3700
 
3625
3701
  ## Core Responsibilities
3626
3702
 
@@ -3738,7 +3814,7 @@ Handle these Jira elements properly:
3738
3814
  You are meticulous about maintaining your memory file as a living document that grows more valuable with each use. Your goal is to become increasingly efficient at finding information as your knowledge base expands, ultimately serving as an expert guide to the project's Jira documentation landscape.`;
3739
3815
 
3740
3816
  // src/subagents/templates/issue-tracker/linear.ts
3741
- var FRONTMATTER11 = {
3817
+ var FRONTMATTER10 = {
3742
3818
  name: "issue-tracker",
3743
3819
  description: `Use this agent to track and manage all types of issues including bugs, stories, and tasks in Linear. This agent creates detailed issue reports, manages issue lifecycle through Linear's streamlined workflow, handles story transitions for QA processes, and maintains comprehensive tracking of all project work items. Examples: <example>Context: A test run discovered a critical bug that needs tracking.
3744
3820
  user: "The login flow is broken - users get a 500 error when submitting credentials"
@@ -3750,7 +3826,7 @@ assistant: "Let me use the issue-tracker agent to update the story status to QA
3750
3826
  model: "sonnet",
3751
3827
  color: "red"
3752
3828
  };
3753
- var CONTENT11 = `You are an expert Issue Tracker specializing in managing all types of project issues including bugs, stories, and tasks in Linear. Your primary responsibility is to track work items discovered during testing, manage story transitions through QA workflows, and ensure all issues are properly documented and resolved using Linear's efficient tracking system.
3829
+ var CONTENT10 = `You are an expert Issue Tracker specializing in managing all types of project issues including bugs, stories, and tasks in Linear. Your primary responsibility is to track work items discovered during testing, manage story transitions through QA workflows, and ensure all issues are properly documented and resolved using Linear's efficient tracking system.
3754
3830
 
3755
3831
  **Core Responsibilities:**
3756
3832
 
@@ -3918,7 +3994,7 @@ Your memory file evolves with usage:
3918
3994
  You are focused on creating bug reports that fit Linear's streamlined workflow while maintaining comprehensive tracking in your memory. Your goal is to make issue management efficient while building knowledge about failure patterns to prevent future bugs.`;
3919
3995
 
3920
3996
  // src/subagents/templates/issue-tracker/jira.ts
3921
- var FRONTMATTER12 = {
3997
+ var FRONTMATTER11 = {
3922
3998
  name: "issue-tracker",
3923
3999
  description: `Use this agent to track and manage all types of issues including bugs, stories, and tasks in Jira. This agent creates detailed issue reports, manages issue lifecycle through status updates, handles story transitions for QA workflows, and maintains comprehensive tracking of all project work items. Examples: <example>Context: Automated tests found multiple failures that need tracking.
3924
4000
  user: "5 tests failed in the checkout flow - payment validation is broken"
@@ -3930,7 +4006,7 @@ assistant: "Let me use the issue-tracker agent to transition PROJ-456 to Done an
3930
4006
  model: "sonnet",
3931
4007
  color: "red"
3932
4008
  };
3933
- var CONTENT12 = `You are an expert Issue Tracker specializing in managing all types of project issues including bugs, stories, and tasks in Jira. Your primary responsibility is to track work items discovered during testing, manage story transitions through QA workflows, and ensure all issues are properly documented and resolved.
4009
+ var CONTENT11 = `You are an expert Issue Tracker specializing in managing all types of project issues including bugs, stories, and tasks in Jira. Your primary responsibility is to track work items discovered during testing, manage story transitions through QA workflows, and ensure all issues are properly documented and resolved.
3934
4010
 
3935
4011
  **Core Responsibilities:**
3936
4012
 
@@ -4089,7 +4165,7 @@ Your memory file becomes more valuable over time:
4089
4165
  You are meticulous about maintaining your memory file as a critical resource for efficient Jira operations. Your goal is to make issue tracking faster and more accurate while building knowledge about the system's patterns and managing workflows effectively.`;
4090
4166
 
4091
4167
  // src/subagents/templates/issue-tracker/azure-devops.ts
4092
- var FRONTMATTER13 = {
4168
+ var FRONTMATTER12 = {
4093
4169
  name: "issue-tracker",
4094
4170
  description: `Use this agent to track and manage all types of work items including bugs, user stories, and tasks in Azure DevOps. This agent creates detailed work item reports, manages lifecycle through state changes, handles story transitions for QA workflows, and maintains comprehensive tracking of all project work items. Examples: <example>Context: Automated tests found multiple failures that need tracking.
4095
4171
  user: "5 tests failed in the checkout flow - payment validation is broken"
@@ -4101,7 +4177,7 @@ assistant: "Let me use the issue-tracker agent to update work item 456 state to
4101
4177
  model: "sonnet",
4102
4178
  color: "red"
4103
4179
  };
4104
- var CONTENT13 = `You are an expert Issue Tracker specializing in managing all types of work items including bugs, user stories, features, and tasks in Azure DevOps. Your primary responsibility is to track work items discovered during testing, manage state transitions through QA workflows, and ensure all items are properly documented and resolved.
4180
+ var CONTENT12 = `You are an expert Issue Tracker specializing in managing all types of work items including bugs, user stories, features, and tasks in Azure DevOps. Your primary responsibility is to track work items discovered during testing, manage state transitions through QA workflows, and ensure all items are properly documented and resolved.
4105
4181
 
4106
4182
  **Core Responsibilities:**
4107
4183
 
@@ -4316,7 +4392,7 @@ Your memory file becomes more valuable over time:
4316
4392
  You are meticulous about maintaining your memory file as a critical resource for efficient Azure DevOps operations. Your goal is to make issue tracking faster and more accurate while building knowledge about the system's patterns and managing workflows effectively.`;
4317
4393
 
4318
4394
  // src/subagents/templates/issue-tracker/notion.ts
4319
- var FRONTMATTER14 = {
4395
+ var FRONTMATTER13 = {
4320
4396
  name: "issue-tracker",
4321
4397
  description: `Use this agent to track and manage all types of issues including bugs, stories, and tasks in Notion databases. This agent creates detailed issue reports, manages issue lifecycle through status updates, handles story transitions for QA workflows, and maintains comprehensive tracking of all project work items. Examples: <example>Context: Test execution revealed a UI bug that needs documentation.
4322
4398
  user: "The submit button on the checkout page doesn't work on mobile Safari"
@@ -4328,7 +4404,7 @@ assistant: "Let me use the issue-tracker agent to update the story status to 'QA
4328
4404
  model: "haiku",
4329
4405
  color: "red"
4330
4406
  };
4331
- var CONTENT14 = `You are an expert Issue Tracker specializing in managing all types of project issues including bugs, stories, and tasks in Notion databases. Your primary responsibility is to track work items discovered during testing, manage story transitions through QA workflows, and ensure all issues are properly documented and resolved.
4407
+ var CONTENT13 = `You are an expert Issue Tracker specializing in managing all types of project issues including bugs, stories, and tasks in Notion databases. Your primary responsibility is to track work items discovered during testing, manage story transitions through QA workflows, and ensure all issues are properly documented and resolved.
4332
4408
 
4333
4409
  **Core Responsibilities:**
4334
4410
 
@@ -4475,7 +4551,7 @@ Your memory file grows more valuable over time:
4475
4551
  You are meticulous about maintaining your memory file as a critical resource that makes issue tracking more efficient and effective. Your goal is to not just track issues, but to build institutional knowledge about the system's patterns, manage workflows effectively, and help deliver quality software.`;
4476
4552
 
4477
4553
  // src/subagents/templates/issue-tracker/slack.ts
4478
- var FRONTMATTER15 = {
4554
+ var FRONTMATTER14 = {
4479
4555
  name: "issue-tracker",
4480
4556
  description: `Use this agent to track and manage all types of issues including bugs, stories, and tasks in Slack. This agent creates detailed issue threads, manages issue lifecycle through thread replies and reactions, handles story transitions for QA workflows, and maintains comprehensive tracking of all project work items using Slack channels. Examples: <example>Context: Test failures need to be reported to the team immediately.
4481
4557
  user: "3 critical tests failed in the payment flow - looks like the Stripe integration is broken"
@@ -4487,7 +4563,7 @@ assistant: "Let me use the issue-tracker agent to update the story thread with Q
4487
4563
  model: "sonnet",
4488
4564
  color: "red"
4489
4565
  };
4490
- var CONTENT15 = `You are an expert Issue Tracker specializing in managing all types of project issues including bugs, stories, and tasks in Slack. Your primary responsibility is to track work items discovered during testing, manage story transitions through QA workflows, and ensure all issues are properly documented and resolved using Slack threads and channels.
4566
+ var CONTENT14 = `You are an expert Issue Tracker specializing in managing all types of project issues including bugs, stories, and tasks in Slack. Your primary responsibility is to track work items discovered during testing, manage story transitions through QA workflows, and ensure all issues are properly documented and resolved using Slack threads and channels.
4491
4567
 
4492
4568
  **Core Responsibilities:**
4493
4569
 
@@ -4709,7 +4785,7 @@ Maintain organized issue tracking:
4709
4785
  You are focused on creating clear, organized issue threads that leverage Slack's real-time collaboration features while maintaining comprehensive tracking in your memory. Your goal is to make issue management efficient and visible to the entire team while building knowledge about failure patterns to prevent future bugs.`;
4710
4786
 
4711
4787
  // src/subagents/templates/changelog-historian/github.ts
4712
- var FRONTMATTER16 = {
4788
+ var FRONTMATTER15 = {
4713
4789
  name: "changelog-historian",
4714
4790
  description: `Use this agent when you need to understand what code changes went into a build, deployment, or release. This agent retrieves PR and commit information from GitHub to help investigate test failures, regressions, or to understand what changed between releases. Examples: <example>Context: A test started failing after a deployment.
4715
4791
  user: "The checkout flow test is failing in staging. What changed recently?"
@@ -4721,7 +4797,7 @@ assistant: "I'll use the changelog-historian agent to compare the two releases a
4721
4797
  model: "haiku",
4722
4798
  color: "gray"
4723
4799
  };
4724
- var CONTENT16 = `You are an expert Changelog Historian specializing in understanding code changes and their impact. Your primary responsibility is to retrieve and analyze PR and commit information from GitHub to help understand what changed in a codebase.
4800
+ var CONTENT15 = `You are an expert Changelog Historian specializing in understanding code changes and their impact. Your primary responsibility is to retrieve and analyze PR and commit information from GitHub to help understand what changed in a codebase.
4725
4801
 
4726
4802
  ## Core Responsibilities
4727
4803
 
@@ -4838,80 +4914,74 @@ var TEMPLATES = {
4838
4914
  content: CONTENT
4839
4915
  }
4840
4916
  },
4841
- "test-code-generator": {
4842
- playwright: {
4917
+ "test-engineer": {
4918
+ default: {
4843
4919
  frontmatter: FRONTMATTER2,
4844
4920
  content: CONTENT2
4845
4921
  }
4846
4922
  },
4847
- "test-debugger-fixer": {
4848
- playwright: {
4849
- frontmatter: FRONTMATTER3,
4850
- content: CONTENT3
4851
- }
4852
- },
4853
4923
  "team-communicator": {
4854
4924
  local: {
4925
+ frontmatter: FRONTMATTER3,
4926
+ content: CONTENT3
4927
+ },
4928
+ slack: {
4855
4929
  frontmatter: FRONTMATTER4,
4856
4930
  content: CONTENT4
4857
4931
  },
4858
- slack: {
4932
+ teams: {
4859
4933
  frontmatter: FRONTMATTER5,
4860
4934
  content: CONTENT5
4861
4935
  },
4862
- teams: {
4936
+ email: {
4863
4937
  frontmatter: FRONTMATTER6,
4864
4938
  content: CONTENT6
4865
- },
4866
- email: {
4867
- frontmatter: FRONTMATTER7,
4868
- content: CONTENT7
4869
4939
  }
4870
4940
  },
4871
4941
  "documentation-researcher": {
4872
4942
  notion: {
4943
+ frontmatter: FRONTMATTER7,
4944
+ content: CONTENT7
4945
+ },
4946
+ confluence: {
4873
4947
  frontmatter: FRONTMATTER8,
4874
4948
  content: CONTENT8
4875
4949
  },
4876
- confluence: {
4950
+ jira: {
4877
4951
  frontmatter: FRONTMATTER9,
4878
4952
  content: CONTENT9
4879
- },
4880
- jira: {
4881
- frontmatter: FRONTMATTER10,
4882
- content: CONTENT10
4883
4953
  }
4884
4954
  },
4885
4955
  "issue-tracker": {
4886
4956
  linear: {
4887
- frontmatter: FRONTMATTER11,
4888
- content: CONTENT11
4957
+ frontmatter: FRONTMATTER10,
4958
+ content: CONTENT10
4889
4959
  },
4890
4960
  jira: {
4891
- frontmatter: FRONTMATTER12,
4892
- content: CONTENT12
4961
+ frontmatter: FRONTMATTER11,
4962
+ content: CONTENT11
4893
4963
  },
4894
4964
  "jira-server": {
4965
+ frontmatter: FRONTMATTER11,
4966
+ content: CONTENT11
4967
+ },
4968
+ "azure-devops": {
4895
4969
  frontmatter: FRONTMATTER12,
4896
4970
  content: CONTENT12
4897
4971
  },
4898
- "azure-devops": {
4972
+ notion: {
4899
4973
  frontmatter: FRONTMATTER13,
4900
4974
  content: CONTENT13
4901
4975
  },
4902
- notion: {
4976
+ slack: {
4903
4977
  frontmatter: FRONTMATTER14,
4904
4978
  content: CONTENT14
4905
- },
4906
- slack: {
4907
- frontmatter: FRONTMATTER15,
4908
- content: CONTENT15
4909
4979
  }
4910
4980
  },
4911
4981
  "changelog-historian": {
4912
4982
  github: {
4913
- frontmatter: FRONTMATTER16,
4914
- content: CONTENT16
4983
+ frontmatter: FRONTMATTER15,
4984
+ content: CONTENT15
4915
4985
  }
4916
4986
  }
4917
4987
  };
@@ -5018,6 +5088,13 @@ var INTEGRATIONS = {
5018
5088
  // No requiredMCP - uses built-in Claude Code tools (AskUserQuestion, text output)
5019
5089
  isLocal: true,
5020
5090
  integrationType: "local"
5091
+ },
5092
+ default: {
5093
+ id: "default",
5094
+ name: "Default",
5095
+ provider: "default",
5096
+ isLocal: true,
5097
+ integrationType: "local"
5021
5098
  }
5022
5099
  };
5023
5100
  var SUBAGENTS = {
@@ -5077,28 +5154,15 @@ var SUBAGENTS = {
5077
5154
  color: "cyan",
5078
5155
  version: "1.0.0"
5079
5156
  },
5080
- "test-code-generator": {
5081
- role: "test-code-generator",
5082
- name: "Test Code Generator",
5083
- description: "Generate automated test scripts and page objects",
5157
+ "test-engineer": {
5158
+ role: "test-engineer",
5159
+ name: "Test Engineer",
5160
+ description: "Create, update, debug, and fix automated tests",
5084
5161
  icon: "code",
5085
- integrations: [INTEGRATIONS.playwright],
5162
+ integrations: [INTEGRATIONS.default],
5086
5163
  model: "sonnet",
5087
5164
  color: "purple",
5088
5165
  isRequired: true,
5089
- // Required for automated test generation
5090
- version: "1.0.0"
5091
- },
5092
- "test-debugger-fixer": {
5093
- role: "test-debugger-fixer",
5094
- name: "Test Debugger & Fixer",
5095
- description: "Debug and fix failing automated tests automatically",
5096
- icon: "wrench",
5097
- integrations: [INTEGRATIONS.playwright],
5098
- model: "sonnet",
5099
- color: "yellow",
5100
- isRequired: true,
5101
- // Required for automated test execution and fixing
5102
5166
  version: "1.0.0"
5103
5167
  },
5104
5168
  "changelog-historian": {
@@ -5170,8 +5234,7 @@ function buildSubagentsConfig(subagents) {
5170
5234
  var TOOL_STRINGS = {
5171
5235
  "claude-code": {
5172
5236
  INVOKE_BROWSER_AUTOMATION: '**DELEGATE TO SUBAGENT**: Use the Task tool with `subagent_type: "browser-automation"` to delegate test execution.\nThe browser-automation agent will handle all browser automation. DO NOT execute Playwright MCP tools directly.\nInclude the test case path and any specific instructions in the prompt.',
5173
- INVOKE_TEST_DEBUGGER_FIXER: '**DELEGATE TO SUBAGENT**: Use the Task tool with `subagent_type: "test-debugger-fixer"` to delegate debugging.\nThe agent will analyze failures and fix test code. Include error details and test path in the prompt.',
5174
- INVOKE_TEST_CODE_GENERATOR: '**DELEGATE TO SUBAGENT**: Use the Task tool with `subagent_type: "test-code-generator"` to delegate code generation.\nThe agent will create automated tests and page objects. Include test case files in the prompt.',
5237
+ INVOKE_TEST_ENGINEER: '**DELEGATE TO SUBAGENT**: Use the Task tool with `subagent_type: "test-engineer"` to delegate test automation work.\nThe agent handles creating, updating, and fixing automated tests. Include test case files and context in the prompt.',
5175
5238
  INVOKE_TEAM_COMMUNICATOR: '**DELEGATE TO SUBAGENT**: Use the Task tool with `subagent_type: "team-communicator"` to send team notifications.\nThe agent will post to Slack/Teams/Email. Include message content and context in the prompt.',
5176
5239
  INLINE_TEAM_COMMUNICATOR: "**TEAM COMMUNICATION**: Read `.claude/agents/team-communicator.md` and follow its instructions to communicate with the team.\nUse the tools and guidelines specified in that file within this context. Do NOT spawn a sub-agent.",
5177
5240
  INVOKE_ISSUE_TRACKER: '**DELEGATE TO SUBAGENT**: Use the Task tool with `subagent_type: "issue-tracker"` to create/update issues.\nThe agent will interact with Jira. Include bug details and classification in the prompt.',
@@ -5180,8 +5243,7 @@ var TOOL_STRINGS = {
5180
5243
  },
5181
5244
  "cursor": {
5182
5245
  INVOKE_BROWSER_AUTOMATION: 'Run the browser-automation agent:\n```bash\ncursor-agent -p "$(cat .cursor/agents/browser-automation.md)" --output-format text\n```',
5183
- INVOKE_TEST_DEBUGGER_FIXER: 'Run the test-debugger-fixer agent:\n```bash\ncursor-agent -p "$(cat .cursor/agents/test-debugger-fixer.md)" --output-format text\n```',
5184
- INVOKE_TEST_CODE_GENERATOR: 'Run the test-code-generator agent:\n```bash\ncursor-agent -p "$(cat .cursor/agents/test-code-generator.md)" --output-format text\n```',
5246
+ INVOKE_TEST_ENGINEER: 'Run the test-engineer agent:\n```bash\ncursor-agent -p "$(cat .cursor/agents/test-engineer.md)" --output-format text\n```',
5185
5247
  INVOKE_TEAM_COMMUNICATOR: 'Run the team-communicator agent:\n```bash\ncursor-agent -p "$(cat .cursor/agents/team-communicator.md)" --output-format text\n```',
5186
5248
  INLINE_TEAM_COMMUNICATOR: "**TEAM COMMUNICATION**: Read `.cursor/agents/team-communicator.md` and follow its instructions to communicate with the team.\nUse the tools and guidelines specified in that file within this context.",
5187
5249
  INVOKE_ISSUE_TRACKER: 'Run the issue-tracker agent:\n```bash\ncursor-agent -p "$(cat .cursor/agents/issue-tracker.md)" --output-format text\n```',
@@ -5190,8 +5252,7 @@ var TOOL_STRINGS = {
5190
5252
  },
5191
5253
  "codex": {
5192
5254
  INVOKE_BROWSER_AUTOMATION: 'Run the browser-automation agent:\n```bash\ncodex -p "$(cat .codex/agents/browser-automation.md)"\n```',
5193
- INVOKE_TEST_DEBUGGER_FIXER: 'Run the test-debugger-fixer agent:\n```bash\ncodex -p "$(cat .codex/agents/test-debugger-fixer.md)"\n```',
5194
- INVOKE_TEST_CODE_GENERATOR: 'Run the test-code-generator agent:\n```bash\ncodex -p "$(cat .codex/agents/test-code-generator.md)"\n```',
5255
+ INVOKE_TEST_ENGINEER: 'Run the test-engineer agent:\n```bash\ncodex -p "$(cat .codex/agents/test-engineer.md)"\n```',
5195
5256
  INVOKE_TEAM_COMMUNICATOR: 'Run the team-communicator agent:\n```bash\ncodex -p "$(cat .codex/agents/team-communicator.md)"\n```',
5196
5257
  INLINE_TEAM_COMMUNICATOR: "**TEAM COMMUNICATION**: Read `.codex/agents/team-communicator.md` and follow its instructions to communicate with the team.\nUse the tools and guidelines specified in that file within this context.",
5197
5258
  INVOKE_ISSUE_TRACKER: 'Run the issue-tracker agent:\n```bash\ncodex -p "$(cat .codex/agents/issue-tracker.md)"\n```',
@@ -5214,8 +5275,7 @@ function replaceInvocationPlaceholders(content, toolId, isLocal = false) {
5214
5275
  let result = content;
5215
5276
  const keys = [
5216
5277
  "INVOKE_BROWSER_AUTOMATION",
5217
- "INVOKE_TEST_DEBUGGER_FIXER",
5218
- "INVOKE_TEST_CODE_GENERATOR",
5278
+ "INVOKE_TEST_ENGINEER",
5219
5279
  "INVOKE_TEAM_COMMUNICATOR",
5220
5280
  "INVOKE_ISSUE_TRACKER",
5221
5281
  "INVOKE_DOCUMENTATION_RESEARCHER",
@@ -5907,9 +5967,9 @@ var fixTestIssuesStep = {
5907
5967
  category: "execution",
5908
5968
  content: `## Fix Test Issues Automatically
5909
5969
 
5910
- For each test classified as **[TEST ISSUE]**, use the test-debugger-fixer agent to automatically fix the test:
5970
+ For each test classified as **[TEST ISSUE]**, use the test-engineer agent to automatically fix the test:
5911
5971
 
5912
- {{INVOKE_TEST_DEBUGGER_FIXER}}
5972
+ {{INVOKE_TEST_ENGINEER}}
5913
5973
 
5914
5974
  For each failed test classified as a test issue (not a product bug), provide:
5915
5975
  - Test run timestamp: [from manifest.timestamp]
@@ -5932,7 +5992,7 @@ The agent will:
5932
5992
  7. Repeat up to 3 times if needed (exec-1, exec-2, exec-3)
5933
5993
  8. Report success or escalate as likely product bug
5934
5994
 
5935
- **After test-debugger-fixer completes:**
5995
+ **After test-engineer completes:**
5936
5996
  - If fix succeeded: Mark test as fixed, add to "Tests Fixed" list
5937
5997
  - If still failing after 3 attempts: Reclassify as potential product bug
5938
5998
 
@@ -5940,7 +6000,7 @@ The agent will:
5940
6000
  - Maintain list of tests fixed automatically
5941
6001
  - Include fix description (e.g., "Applied selector fix pattern from CLAUDE.md")
5942
6002
  - Note verification status (test now passes)`,
5943
- invokesSubagents: ["test-debugger-fixer"],
6003
+ invokesSubagents: ["test-engineer"],
5944
6004
  tags: ["execution", "fixing", "automation"]
5945
6005
  };
5946
6006
 
@@ -6303,7 +6363,7 @@ var automateTestCasesStep = {
6303
6363
 
6304
6364
  For each test case marked \`automated: true\`:
6305
6365
 
6306
- {{INVOKE_TEST_CODE_GENERATOR}} with the following context:
6366
+ {{INVOKE_TEST_ENGINEER}} with the following context:
6307
6367
 
6308
6368
  "Automate test cases for the focus area: $ARGUMENTS
6309
6369
 
@@ -6336,7 +6396,7 @@ After automation, update the manual test case frontmatter:
6336
6396
  automated: true
6337
6397
  automated_test: tests/specs/feature/test-name.spec.ts
6338
6398
  \`\`\``,
6339
- invokesSubagents: ["test-code-generator"],
6399
+ invokesSubagents: ["test-engineer"],
6340
6400
  tags: ["generation", "automation"]
6341
6401
  };
6342
6402
 
@@ -6748,6 +6808,28 @@ After test generation completes, verify all artifacts meet quality standards:
6748
6808
  tags: ["maintenance", "validation", "test-artifacts"]
6749
6809
  };
6750
6810
 
6811
+ // src/tasks/steps/maintenance/sync-automation-from-feedback.ts
6812
+ var syncAutomationFromFeedbackStep = {
6813
+ id: "sync-automation-from-feedback",
6814
+ title: "Sync Automation Code with Test Case Changes",
6815
+ category: "maintenance",
6816
+ requiresSubagent: "test-engineer",
6817
+ invokesSubagents: ["test-engineer"],
6818
+ content: `## Sync Automation Code with Test Case Changes
6819
+
6820
+ After processing feedback that modified test case files, ensure automation code stays in sync.
6821
+
6822
+ **When to apply:** Only if you modified test case markdown files during this task.
6823
+
6824
+ For each modified test case:
6825
+ 1. Read frontmatter \u2014 check for \`automated_test\` field
6826
+ 2. If exists \u2192 {{INVOKE_TEST_ENGINEER}} to update the spec to match the updated markdown
6827
+ 3. If not \u2192 skip (no automation to sync)
6828
+
6829
+ **CRITICAL:** Both specification (markdown) AND implementation (automation code) MUST stay in sync.`,
6830
+ tags: ["maintenance", "automation", "feedback"]
6831
+ };
6832
+
6751
6833
  // src/tasks/steps/index.ts
6752
6834
  var STEP_LIBRARY = {
6753
6835
  // Setup
@@ -6784,7 +6866,8 @@ var STEP_LIBRARY = {
6784
6866
  "generate-final-report": generateFinalReportStep,
6785
6867
  "update-exploration-artifacts": updateExplorationArtifactsStep,
6786
6868
  "cleanup-temp-files": cleanupTempFilesStep,
6787
- "validate-test-artifacts": validateTestArtifactsStep
6869
+ "validate-test-artifacts": validateTestArtifactsStep,
6870
+ "sync-automation-from-feedback": syncAutomationFromFeedbackStep
6788
6871
  };
6789
6872
  function getStep(id) {
6790
6873
  const step = STEP_LIBRARY[id];