@bugzy-ai/bugzy 1.18.2 → 1.18.3
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/cli/index.cjs +6 -4
- package/dist/cli/index.cjs.map +1 -1
- package/dist/cli/index.js +6 -4
- package/dist/cli/index.js.map +1 -1
- package/dist/index.cjs +6 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +6 -4
- package/dist/index.js.map +1 -1
- package/dist/tasks/index.cjs +6 -4
- package/dist/tasks/index.cjs.map +1 -1
- package/dist/tasks/index.js +6 -4
- package/dist/tasks/index.js.map +1 -1
- package/package.json +1 -1
package/dist/tasks/index.cjs
CHANGED
|
@@ -1991,12 +1991,14 @@ This step helps correlate what the tests cover with what the application actuall
|
|
|
1991
1991
|
{
|
|
1992
1992
|
inline: true,
|
|
1993
1993
|
title: "Commit Analysis Results",
|
|
1994
|
-
content: `Commit
|
|
1994
|
+
content: `Commit analysis artifacts to the **parent project repository** (the workspace root).
|
|
1995
1995
|
|
|
1996
|
-
|
|
1997
|
-
2. Any generated CLAUDE.md draft (if the external repo was missing one)
|
|
1996
|
+
**IMPORTANT \u2014 Do NOT stage the \`tests\` submodule.** The \`tests/\` directory is an external git submodule. Any changes made inside it (e.g., \`reporters/parse-results.ts\`, \`tests/CLAUDE.md\`) will be committed and pushed to the external repo automatically by the post-execution handler. Staging the submodule in the parent would record a local-only commit SHA that doesn't exist on the remote, causing a broken reference.
|
|
1998
1997
|
|
|
1999
|
-
|
|
1998
|
+
**What to commit in the parent repo:**
|
|
1999
|
+
1. \`git add .bugzy/\` \u2014 the test codebase analysis report and runtime files
|
|
2000
|
+
2. Do NOT run \`git add .\` or \`git add tests\` \u2014 this would stage the submodule pointer
|
|
2001
|
+
3. \`git commit -m "chore: analyze external test codebase"\`
|
|
2000
2002
|
|
|
2001
2003
|
These artifacts will be available to all future task executions for this project.`
|
|
2002
2004
|
},
|
package/dist/tasks/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/tasks/index.ts","../../src/tasks/steps/types.ts","../../src/tasks/constants.ts","../../src/tasks/library/generate-test-cases.ts","../../src/tasks/library/generate-test-plan.ts","../../src/tasks/library/handle-message.ts","../../src/tasks/library/process-event.ts","../../src/tasks/library/run-tests.ts","../../src/tasks/library/verify-changes.ts","../../src/tasks/library/onboard-testing.ts","../../src/tasks/library/explore-application.ts","../../src/tasks/library/triage-results.ts","../../src/tasks/library/explore-test-codebase.ts"],"sourcesContent":["/**\r\n * Tasks Module\r\n * Central registry and utilities for all task templates\r\n */\r\n\r\n// Export types and constants\r\nexport * from './types';\r\nexport * from './constants';\r\n\r\n// Import task templates\r\nimport { generateTestCasesTask } from './library/generate-test-cases';\r\nimport { generateTestPlanTask } from './library/generate-test-plan';\r\nimport { handleMessageTask } from './library/handle-message';\r\nimport { processEventTask } from './library/process-event';\r\nimport { runTestsTask } from './library/run-tests';\r\nimport { verifyChangesTask } from './library/verify-changes';\r\nimport { onboardTestingTask } from './library/onboard-testing';\r\nimport { exploreApplicationTask } from './library/explore-application';\r\nimport { triageResultsTask } from './library/triage-results';\r\nimport { exploreTestCodebaseTask } from './library/explore-test-codebase';\r\n\r\nimport type { ComposedTaskTemplate } from './types';\r\nimport { TASK_SLUGS } from './constants';\r\n\r\n/**\r\n * Task Templates Registry\r\n * All tasks use the step-based composition format\r\n */\r\nexport const TASK_TEMPLATES: Record<string, ComposedTaskTemplate> = {\r\n [TASK_SLUGS.GENERATE_TEST_CASES]: generateTestCasesTask,\r\n [TASK_SLUGS.GENERATE_TEST_PLAN]: generateTestPlanTask,\r\n [TASK_SLUGS.HANDLE_MESSAGE]: handleMessageTask,\r\n [TASK_SLUGS.PROCESS_EVENT]: processEventTask,\r\n [TASK_SLUGS.RUN_TESTS]: runTestsTask,\r\n [TASK_SLUGS.VERIFY_CHANGES]: verifyChangesTask,\r\n [TASK_SLUGS.ONBOARD_TESTING]: onboardTestingTask,\r\n [TASK_SLUGS.EXPLORE_APPLICATION]: exploreApplicationTask,\r\n [TASK_SLUGS.TRIAGE_RESULTS]: triageResultsTask,\r\n [TASK_SLUGS.EXPLORE_TEST_CODEBASE]: exploreTestCodebaseTask,\r\n};\r\n\r\n/**\r\n * Get task template by slug\r\n */\r\nexport function getTaskTemplate(slug: string): ComposedTaskTemplate | undefined {\r\n return TASK_TEMPLATES[slug];\r\n}\r\n\r\n/**\r\n * Get all registered task slugs\r\n */\r\nexport function getAllTaskSlugs(): string[] {\r\n return Object.keys(TASK_TEMPLATES);\r\n}\r\n\r\n/**\r\n * Check if a task slug is registered\r\n */\r\nexport function isTaskRegistered(slug: string): boolean {\r\n return TASK_TEMPLATES[slug] !== undefined;\r\n}\r\n\r\n/**\r\n * Slash Command Configuration for Cloud Run\r\n * Format expected by cloudrun-claude-code API\r\n */\r\nexport interface SlashCommandConfig {\r\n frontmatter: Record<string, any>;\r\n content: string;\r\n}\r\n\r\n","/**\r\n * Step Module Types\r\n * Type definitions for atomic, composable task steps\r\n */\r\n\r\nimport type { TaskFrontmatter } from '../types';\r\n\r\n/**\r\n * Step category for organization and filtering\r\n */\r\nexport type StepCategory =\r\n | 'security' // Security notices and warnings\r\n | 'setup' // Loading context, reading artifacts\r\n | 'exploration' // Exploring the application\r\n | 'clarification' // Handling ambiguity and questions\r\n | 'execution' // Running tests, parsing results\r\n | 'generation' // Creating test plans, cases, code\r\n | 'communication' // Team notifications\r\n | 'maintenance'; // Knowledge base updates, cleanup\r\n\r\n/**\r\n * TaskStep - Atomic, reusable unit of work within a task\r\n *\r\n * Steps are the building blocks of composed tasks. Each step represents\r\n * a discrete piece of work with clear instructions.\r\n */\r\nexport interface TaskStep {\r\n /**\r\n * Unique identifier for the step (kebab-case)\r\n * Examples: 'read-knowledge-base', 'triage-failures', 'run-tests'\r\n */\r\n id: string;\r\n\r\n /**\r\n * Human-readable step title (used in generated markdown headers)\r\n * Examples: 'Read Knowledge Base', 'Triage Failed Tests'\r\n */\r\n title: string;\r\n\r\n /**\r\n * Step category for organization\r\n */\r\n category: StepCategory;\r\n\r\n /**\r\n * Step content - the actual instructions as markdown string.\r\n *\r\n * Supported placeholders:\r\n * - {{STEP_NUMBER}} - Auto-replaced with computed step number during assembly\r\n * - {{INVOKE_*}} - Subagent invocation placeholders (e.g., {{INVOKE_TEST_DEBUGGER_FIXER}})\r\n * - $ARGUMENTS - Task arguments from user input\r\n */\r\n content: string;\r\n\r\n /**\r\n * Optional subagent role this step requires to be included.\r\n * If specified, step is only included when this subagent is configured.\r\n *\r\n * Use for steps that make no sense without the subagent.\r\n * Example: 'log-product-bugs' step requires 'issue-tracker' subagent\r\n */\r\n requiresSubagent?: string;\r\n\r\n /**\r\n * Subagent roles that this step invokes (for MCP derivation).\r\n * Different from requiresSubagent - this lists subagents the step calls\r\n * via {{INVOKE_*}} placeholders, not what makes the step available.\r\n */\r\n invokesSubagents?: string[];\r\n\r\n /**\r\n * Tags for categorization, filtering, and step discovery.\r\n * Examples: ['setup', 'execution', 'optional', 'triage']\r\n */\r\n tags?: string[];\r\n}\r\n\r\n/**\r\n * StepReferenceObject - Reference to a step in STEP_LIBRARY with per-usage configuration\r\n */\r\nexport interface StepReferenceObject {\r\n /**\r\n * The step ID to include from STEP_LIBRARY\r\n */\r\n stepId: string;\r\n\r\n /**\r\n * Override the step title for this specific usage\r\n */\r\n title?: string;\r\n\r\n /**\r\n * Additional content to append after the step\r\n */\r\n appendContent?: string;\r\n\r\n /**\r\n * Make this step conditional on a subagent being configured.\r\n * Different from step's requiresSubagent - this is per-task configuration.\r\n */\r\n conditionalOnSubagent?: string;\r\n}\r\n\r\n/**\r\n * InlineStep - Step with body defined directly in the task definition\r\n * Use for task-specific content like headers, arguments, or unique steps\r\n */\r\nexport interface InlineStep {\r\n /**\r\n * Discriminator to identify inline steps\r\n */\r\n inline: true;\r\n\r\n /**\r\n * Step title (becomes ### Step N: {title})\r\n */\r\n title: string;\r\n\r\n /**\r\n * Step body content (markdown)\r\n */\r\n content: string;\r\n\r\n /**\r\n * Optional category for metadata/filtering\r\n */\r\n category?: StepCategory;\r\n\r\n /**\r\n * Make this step conditional on a subagent being configured\r\n */\r\n conditionalOnSubagent?: string;\r\n}\r\n\r\n/**\r\n * StepReference - How tasks reference steps in their composition\r\n *\r\n * Can be:\r\n * - Simple string (step ID from STEP_LIBRARY)\r\n * - StepReferenceObject (reference with overrides)\r\n * - InlineStep (step with body defined inline)\r\n */\r\nexport type StepReference = string | StepReferenceObject | InlineStep;\r\n\r\n\r\n/**\r\n * ComposedTaskTemplate - Task built from step composition\r\n *\r\n * This is the new task format that replaces monolithic baseContent strings\r\n * with an array of step references.\r\n */\r\nexport interface ComposedTaskTemplate {\r\n /**\r\n * Unique task identifier (kebab-case)\r\n */\r\n slug: string;\r\n\r\n /**\r\n * Human-readable task name\r\n */\r\n name: string;\r\n\r\n /**\r\n * Brief task description\r\n */\r\n description: string;\r\n\r\n /**\r\n * Frontmatter for slash command generation\r\n */\r\n frontmatter: TaskFrontmatter;\r\n\r\n /**\r\n * Ordered list of step references that compose this task.\r\n * Steps are assembled in order with auto-generated step numbers.\r\n */\r\n steps: StepReference[];\r\n\r\n /**\r\n * Required subagents - task fails to build without these.\r\n * Instructions for required subagents should be embedded in step content.\r\n */\r\n requiredSubagents: string[];\r\n\r\n /**\r\n * Optional subagents - enhance task when configured.\r\n * Steps using these are conditionally included.\r\n */\r\n optionalSubagents?: string[];\r\n\r\n /**\r\n * Task slugs that can be invoked during execution.\r\n */\r\n dependentTasks?: string[];\r\n}\r\n\r\n/**\r\n * Normalized step reference (internal use for library steps)\r\n */\r\nexport interface NormalizedStepReference {\r\n stepId: string;\r\n title?: string;\r\n appendContent?: string;\r\n conditionalOnSubagent?: string;\r\n}\r\n\r\n/**\r\n * Type guard to check if a StepReference is an InlineStep\r\n */\r\nexport function isInlineStep(ref: StepReference): ref is InlineStep {\r\n return typeof ref === 'object' && 'inline' in ref && ref.inline === true;\r\n}\r\n\r\n/**\r\n * Type guard to check if a StepReference is a StepReferenceObject\r\n */\r\nexport function isStepReferenceObject(ref: StepReference): ref is StepReferenceObject {\r\n return typeof ref === 'object' && 'stepId' in ref;\r\n}\r\n\r\n/**\r\n * Normalize a step reference to its full object form (for library steps only)\r\n * Returns null for inline steps - use isInlineStep to check first\r\n */\r\nexport function normalizeStepReference(ref: StepReference): NormalizedStepReference | null {\r\n if (isInlineStep(ref)) {\r\n return null; // Inline steps don't normalize to NormalizedStepReference\r\n }\r\n if (typeof ref === 'string') {\r\n return { stepId: ref };\r\n }\r\n return ref as StepReferenceObject;\r\n}\r\n","/**\r\n * Task Slug Constants\r\n * Single source of truth for all task identifiers\r\n *\r\n * These constants should be used throughout the codebase instead of hardcoded strings\r\n * to ensure type safety and prevent typos.\r\n */\r\nexport const TASK_SLUGS = {\r\n EXPLORE_APPLICATION: 'explore-application',\r\n ONBOARD_TESTING: 'onboard-testing',\r\n GENERATE_TEST_CASES: 'generate-test-cases',\r\n GENERATE_TEST_PLAN: 'generate-test-plan',\r\n HANDLE_MESSAGE: 'handle-message',\r\n PROCESS_EVENT: 'process-event',\r\n RUN_TESTS: 'run-tests',\r\n VERIFY_CHANGES: 'verify-changes',\r\n TRIAGE_RESULTS: 'triage-results',\r\n EXPLORE_TEST_CODEBASE: 'explore-test-codebase',\r\n /** @deprecated Use ONBOARD_TESTING instead */\r\n FULL_TEST_COVERAGE: 'onboard-testing',\r\n} as const;\r\n\r\n/**\r\n * Type for task slugs\r\n * Ensures only valid task slugs can be used\r\n */\r\nexport type TaskSlug = typeof TASK_SLUGS[keyof typeof TASK_SLUGS];\r\n","/**\r\n * Generate Test Cases Task (Composed)\r\n * Generate both manual test case documentation AND automated test scripts\r\n */\r\n\r\nimport type { ComposedTaskTemplate } from '../steps/types';\r\nimport { TASK_SLUGS } from '../constants';\r\n\r\nexport const generateTestCasesTask: ComposedTaskTemplate = {\r\n slug: TASK_SLUGS.GENERATE_TEST_CASES,\r\n name: 'Generate Test Cases',\r\n description: 'Generate manual test case documentation AND automated test scripts from test plan',\r\n\r\n frontmatter: {\r\n description: 'Generate manual test case documentation AND automated test scripts from test plan',\r\n 'argument-hint': '--type [exploratory|functional|regression|smoke] --focus [optional-feature]',\r\n },\r\n\r\n steps: [\r\n // Step 1: Overview (inline)\r\n {\r\n inline: true,\r\n title: 'Generate Test Cases Overview',\r\n content: `Generate comprehensive test artifacts including BOTH manual test case documentation AND automated test scripts. Read \\`./tests/CLAUDE.md\\` for framework-specific conventions, directory structure, and commands.\r\n\r\nThis command generates:\r\n1. **Manual Test Case Documentation** (in \\`./test-cases/\\`) - Human-readable test cases in markdown format\r\n2. **Automated Test Scripts** (in directory from \\`./tests/CLAUDE.md\\`) - Executable test scripts\r\n3. **Page Objects** (in directory from \\`./tests/CLAUDE.md\\`) - Reusable page classes for automated tests\r\n4. **Supporting Files** (fixtures, helpers, components) - As needed for test automation`,\r\n },\r\n // Step 2: Security Notice (library)\r\n 'security-notice',\r\n // Step 3: Arguments (inline)\r\n {\r\n inline: true,\r\n title: 'Arguments',\r\n content: `Arguments: $ARGUMENTS\r\n\r\n**Parse Arguments:**\r\nExtract the following from arguments:\r\n- **type**: Test type (exploratory, functional, regression, smoke) - defaults to functional\r\n- **focus**: Optional specific feature or section to focus on`,\r\n },\r\n // Step 4: Load Project Context (library)\r\n 'load-project-context',\r\n // Step 5: Knowledge Base Read (library)\r\n 'read-knowledge-base',\r\n // Step 5: Gather Context (inline)\r\n {\r\n inline: true,\r\n title: 'Gather Context',\r\n content: `**1.1 Read Test Plan**\r\nRead the test plan from \\`test-plan.md\\` to understand:\r\n- Test items and features\r\n- Testing approach and automation strategy\r\n- Test Automation Strategy section (automated vs exploratory)\r\n- Pass/fail criteria\r\n- Test environment and data requirements\r\n- Automation decision criteria\r\n\r\n**1.2 Check Existing Test Cases and Tests**\r\n- List all files in \\`./test-cases/\\` to understand existing manual test coverage\r\n- List existing automated tests in the test directory (see \\`./tests/CLAUDE.md\\` for structure)\r\n- Determine next test case ID (TC-XXX format)\r\n- Identify existing page objects (see \\`./tests/CLAUDE.md\\` for directory)\r\n- Avoid creating overlapping test cases or duplicate automation`,\r\n },\r\n // Step 6: Documentation Researcher (conditional library step)\r\n {\r\n stepId: 'gather-documentation',\r\n conditionalOnSubagent: 'documentation-researcher',\r\n },\r\n // Step 7: Exploration Protocol (from library)\r\n 'exploration-protocol',\r\n // Step 8: Clarification Protocol (from library)\r\n 'clarification-protocol',\r\n // Step 9: Organize Test Scenarios (inline - task-specific)\r\n {\r\n inline: true,\r\n title: 'Organize Test Scenarios by Area',\r\n content: `Based on exploration and documentation, organize test scenarios by feature area/component:\r\n\r\n**Group scenarios into areas** (e.g., Authentication, Dashboard, Checkout, Profile Management):\r\n- Each area should be a logical feature grouping\r\n- Areas should be relatively independent for parallel test execution\r\n- Consider the application's navigation structure and user flows\r\n\r\n**For each area, identify scenarios**:\r\n\r\n1. **Critical User Paths** (must automate as smoke tests):\r\n - Login/authentication flows\r\n - Core feature workflows\r\n - Data creation/modification flows\r\n - Critical business transactions\r\n\r\n2. **Happy Path Scenarios** (automate for regression):\r\n - Standard user workflows\r\n - Common use cases\r\n - Typical data entry patterns\r\n\r\n3. **Error Handling Scenarios** (evaluate automation ROI):\r\n - Validation error messages\r\n - Network error handling\r\n - Permission/authorization errors\r\n\r\n4. **Edge Cases** (consider manual testing):\r\n - Rare scenarios (<1% occurrence)\r\n - Complex exploratory scenarios\r\n - Visual/UX validation requiring judgment\r\n - Features in heavy flux\r\n\r\n**Output**: Test scenarios organized by area with automation decisions for each\r\n\r\nExample structure:\r\n- **Authentication**: TC-001 Valid login (smoke, automate), TC-002 Invalid password (automate), TC-003 Password reset (automate)\r\n- **Dashboard**: TC-004 View dashboard widgets (smoke, automate), TC-005 Filter data by date (automate), TC-006 Export data (manual - rare use)`,\r\n },\r\n // Step 10: Generate Manual Test Cases (inline)\r\n {\r\n inline: true,\r\n title: 'Generate All Manual Test Case Files',\r\n content: `Generate ALL manual test case markdown files in \\`./test-cases/\\` BEFORE invoking the test-code-generator agent.\r\n\r\nCreate files using \\`TC-XXX-feature-description.md\\` format. Follow the format of existing test cases in the directory. If no existing cases exist, include:\r\n- Frontmatter with test case metadata (id, title, type, area, \\`automated: true/false\\`, \\`automated_test:\\` empty)\r\n- Clear test steps with expected results\r\n- Required test data references (use env var names, not values)`,\r\n },\r\n // Step 11: Automate Test Cases (inline - detailed instructions for test-code-generator)\r\n {\r\n inline: true,\r\n title: 'Automate Test Cases Area by Area',\r\n content: `**IMPORTANT**: Process each feature area separately to enable incremental, focused test creation.\r\n\r\n**For each area**, invoke the test-code-generator agent:\r\n\r\n**Prepare Area Context:**\r\nBefore invoking the agent, identify the test cases for the current area:\r\n- Current area name\r\n- Test case files for this area (e.g., TC-001-valid-login.md, TC-002-invalid-password.md)\r\n- Which test cases are marked for automation (automated: true)\r\n- Test type from arguments\r\n- Test plan reference: test-plan.md\r\n- Existing automated tests in ./tests/specs/\r\n- Existing Page Objects in ./tests/pages/\r\n\r\n**Invoke test-code-generator Agent:**\r\n\r\n{{INVOKE_TEST_CODE_GENERATOR}} for the current area with the following context:\r\n\r\n\"Automate test cases for the [AREA_NAME] area.\r\n\r\n**Context:**\r\n- Area: [AREA_NAME]\r\n- Manual test case files to automate: [list TC-XXX files marked with automated: true]\r\n- Test type: {type}\r\n- Test plan: test-plan.md\r\n- Manual test cases directory: ./test-cases/\r\n- Existing automated tests: [directory from ./tests/CLAUDE.md]\r\n- Existing page objects: [directory from ./tests/CLAUDE.md]\r\n\r\n**Knowledge Base Patterns (MUST APPLY):**\r\nInclude 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 — 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.\r\n\r\n**The agent should:**\r\n1. Read the manual test case files for this area\r\n2. Check existing Page Object infrastructure for this area\r\n3. Explore the feature area to understand implementation (gather selectors, URLs, flows)\r\n4. Build missing Page Objects and supporting code\r\n5. For each test case marked \\`automated: true\\`:\r\n - Create automated test in the test directory (from ./tests/CLAUDE.md)\r\n - Update the manual test case file to reference the automated test path\r\n - Apply ALL knowledge base patterns listed above (timing, selectors, assertions)\r\n6. Run and iterate on each test until it passes or fails with a product bug\r\n7. Update .env.testdata with any new variables\r\n\r\n**Focus only on the [AREA_NAME] area** - do not automate tests for other areas yet.\"\r\n\r\n**Verify Area Completion:**\r\nAfter the agent completes the area, verify:\r\n- Manual test case files updated with automated_test references\r\n- Automated tests created for all test cases marked automated: true\r\n- Tests are passing (or failing with documented product bugs)\r\n- Page Objects created/updated for the area\r\n\r\n**Repeat for Next Area:**\r\nMove to the next area and repeat until all areas are complete.\r\n\r\n**Benefits of area-by-area approach**:\r\n- Agent focuses on one feature at a time\r\n- POMs built incrementally as needed\r\n- Tests verified before moving to next area\r\n- Easier to manage and track progress\r\n- Can pause/resume between areas if needed`,\r\n },\r\n // Step 12: Validate Artifacts (library)\r\n 'validate-test-artifacts',\r\n // Step 13: Create Directories (inline)\r\n {\r\n inline: true,\r\n title: 'Create Directories if Needed',\r\n content: `Ensure required directories exist. Create the \\`./test-cases/\\` directory for manual test cases, and create the test directories specified in \\`./tests/CLAUDE.md\\` (test specs, page objects, components, fixtures, helpers).`,\r\n },\r\n // Step 14: Extract Env Variables (library)\r\n 'extract-env-variables',\r\n // Step 15: Knowledge Base Update (library)\r\n 'update-knowledge-base',\r\n // Step 16: Team Communication (conditional inline)\r\n {\r\n inline: true,\r\n title: 'Team Communication',\r\n content: `{{INVOKE_TEAM_COMMUNICATOR}} to share test case and automation results with the team, highlighting coverage areas, automation vs manual-only decisions, and any unresolved clarifications. Ask for team review.`,\r\n conditionalOnSubagent: 'team-communicator',\r\n },\r\n // Step 17: Final Summary (inline)\r\n {\r\n inline: true,\r\n title: 'Final Summary',\r\n 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\\`).`,\r\n },\r\n ],\r\n\r\n requiredSubagents: ['browser-automation', 'test-code-generator'],\r\n optionalSubagents: ['documentation-researcher', 'team-communicator'],\r\n dependentTasks: [],\r\n};\r\n","/**\r\n * Generate Test Plan Task (Composed)\r\n * Generate a comprehensive test plan from product description\r\n */\r\n\r\nimport type { ComposedTaskTemplate } from '../steps/types';\r\nimport { TASK_SLUGS } from '../constants';\r\n\r\nexport const generateTestPlanTask: ComposedTaskTemplate = {\r\n slug: TASK_SLUGS.GENERATE_TEST_PLAN,\r\n name: 'Generate Test Plan',\r\n description: 'Generate a concise feature checklist test plan from product description',\r\n\r\n frontmatter: {\r\n description: 'Generate a concise feature checklist test plan (~50-100 lines)',\r\n 'argument-hint': '<product-description>',\r\n },\r\n\r\n steps: [\r\n // Step 1: Overview (inline)\r\n {\r\n inline: true,\r\n title: 'Generate Test Plan Overview',\r\n content: `Generate a comprehensive test plan from product description following the Brain Module specifications.`,\r\n },\r\n // Step 2: Security Notice (library)\r\n 'security-notice',\r\n // Step 3: Arguments (inline)\r\n {\r\n inline: true,\r\n title: 'Arguments',\r\n content: `Product description: $ARGUMENTS`,\r\n },\r\n // Step 4: Load Project Context (library)\r\n 'load-project-context',\r\n // Step 5: Knowledge Base Read (library)\r\n 'read-knowledge-base',\r\n // Step 6: Process Description (inline)\r\n {\r\n inline: true,\r\n title: 'Process the Product Description',\r\n content: `Use the product description provided directly in the arguments, enriched with project context understanding.`,\r\n },\r\n // Step 7: Initialize Env Tracking (inline)\r\n {\r\n inline: true,\r\n title: 'Initialize Environment Variables Tracking',\r\n content: `Create a list to track all TEST_ prefixed environment variables discovered throughout the process.`,\r\n },\r\n // Step 8: Documentation Researcher (conditional library step)\r\n {\r\n stepId: 'gather-documentation',\r\n conditionalOnSubagent: 'documentation-researcher',\r\n },\r\n // Step 9: Exploration Protocol (from library)\r\n 'exploration-protocol',\r\n // Step 10: Clarification Protocol (from library)\r\n 'clarification-protocol',\r\n // Step 11: Prepare Context (inline)\r\n {\r\n inline: true,\r\n title: 'Prepare Test Plan Generation Context',\r\n content: `**After ensuring requirements are clear through exploration and clarification:**\r\n\r\nBased on the gathered information:\r\n- **goal**: Extract the main purpose and objectives from all available documentation\r\n- **knowledge**: Combine product description with discovered documentation insights\r\n- **testPlan**: Use the standard test plan template structure, enriched with documentation findings\r\n- **gaps**: Identify areas lacking documentation that will need exploration`,\r\n },\r\n // Step 12: Generate Test Plan (inline - more detailed than library step)\r\n {\r\n inline: true,\r\n title: 'Generate Test Plan Using Simplified Format',\r\n content: `You are an expert QA Test Plan Writer. Generate a **concise** test plan (~50-100 lines) that serves as a feature checklist for test case generation.\r\n\r\n**CRITICAL - Keep it Simple:**\r\n- The test plan is a **feature checklist**, NOT a comprehensive document\r\n- Detailed UI elements and exploration findings go to \\`./exploration-reports/\\`\r\n- Technical patterns and architecture go to \\`.bugzy/runtime/knowledge-base.md\\`\r\n- Process documentation stays in \\`.bugzy/runtime/project-context.md\\`\r\n\r\n**Writing Instructions:**\r\n- **Use Product Terminology:** Use exact feature names from the product description\r\n- **Feature Checklist Format:** Each feature is a checkbox item with brief description\r\n- **Group by Feature Area:** Organize features into logical sections\r\n- **NO detailed UI elements** - those belong in exploration reports\r\n- **NO test scenarios** - those are generated in test cases\r\n- **NO process documentation** - keep only what's needed for test generation\r\n\r\n**Test Data Handling:**\r\n- Test data goes ONLY to \\`.env.testdata\\` file\r\n- In test plan, reference environment variable NAMES only (e.g., TEST_BASE_URL)\r\n- DO NOT generate values for env vars, only keys\r\n- Track all TEST_ variables for extraction to .env.testdata in the next step`,\r\n },\r\n // Step 13: Create Test Plan File (inline)\r\n {\r\n inline: true,\r\n title: 'Create Test Plan File',\r\n content: `Read the simplified template from \\`.bugzy/runtime/templates/test-plan-template.md\\` and fill it in:\r\n\r\n1. Read the template file\r\n2. Replace placeholders:\r\n - \\`[PROJECT_NAME]\\` with the actual project name\r\n - \\`[DATE]\\` with the current date\r\n - Feature sections with actual features grouped by area\r\n3. Each feature is a **checkbox item** with brief description\r\n4. **Mark ambiguities:**\r\n - MEDIUM: Mark with [ASSUMED: reason]\r\n - LOW: Mark with [TO BE EXPLORED: detail]\r\n5. Keep total document under 100 lines`,\r\n },\r\n // Step 14: Save Test Plan (inline)\r\n {\r\n inline: true,\r\n title: 'Save Test Plan',\r\n content: `Save to \\`test-plan.md\\` in project root. The template already includes frontmatter - just fill in the dates.`,\r\n },\r\n // Step 15: Extract Env Variables (inline - more detailed than library step)\r\n {\r\n inline: true,\r\n title: 'Extract and Save Environment Variables',\r\n content: `**CRITICAL**: Test data values must ONLY go to .env.testdata, NOT in the test plan document.\r\n\r\nAfter saving the test plan:\r\n\r\n1. **Parse the test plan** to find all TEST_ prefixed environment variables mentioned:\r\n - Look in the Testing Environment section\r\n - Search for any TEST_ variables referenced\r\n - Extract variables from configuration or setup sections\r\n - Common patterns include: TEST_BASE_URL, TEST_USER_*, TEST_API_*, TEST_ADMIN_*, etc.\r\n\r\n2. **Create .env.testdata file** with all discovered variables:\r\n \\`\\`\\`bash\r\n # Application Configuration\r\n TEST_BASE_URL=\r\n\r\n # Test User Credentials\r\n TEST_USER_EMAIL=\r\n TEST_USER_PASSWORD=\r\n TEST_ADMIN_EMAIL=\r\n TEST_ADMIN_PASSWORD=\r\n\r\n # API Configuration\r\n TEST_API_KEY=\r\n TEST_API_SECRET=\r\n\r\n # Other Test Data\r\n TEST_DB_NAME=\r\n TEST_TIMEOUT=\r\n \\`\\`\\`\r\n\r\n3. **Add helpful comments** for each variable group to guide users in filling values\r\n\r\n4. **Save the file** as \\`.env.testdata\\` in the project root\r\n\r\n5. **Verify test plan references .env.testdata**:\r\n - Ensure test plan DOES NOT contain test data values\r\n - Ensure test plan references \\`.env.testdata\\` for test data requirements\r\n - Add instruction: \"Fill in actual values in .env.testdata before running tests\"`,\r\n },\r\n // Step 16: Knowledge Base Update (library)\r\n 'update-knowledge-base',\r\n // Step 17: Team Communication (conditional inline)\r\n {\r\n inline: true,\r\n title: 'Team Communication',\r\n content: `{{INVOKE_TEAM_COMMUNICATOR}} to share the test plan with the team for review, highlighting coverage areas and any unresolved clarifications.`,\r\n conditionalOnSubagent: 'team-communicator',\r\n },\r\n // Step 18: Final Summary (inline)\r\n {\r\n inline: true,\r\n title: 'Final Summary',\r\n content: `Provide a summary of:\r\n- Test plan created successfully at \\`test-plan.md\\`\r\n- Environment variables extracted to \\`.env.testdata\\`\r\n- Number of TEST_ variables discovered\r\n- Instructions for the user to fill in actual values in .env.testdata before running tests`,\r\n },\r\n ],\r\n\r\n requiredSubagents: ['browser-automation'],\r\n optionalSubagents: ['documentation-researcher', 'team-communicator'],\r\n dependentTasks: [],\r\n};\r\n","/**\r\n * Handle Message Task (Composed)\r\n * Handle team responses and Slack communications, maintaining context for ongoing conversations\r\n *\r\n * Slack messages are processed by the LLM layer (lib/slack/llm-processor.ts)\r\n * which routes feedback/general chat to this task via the 'collect_feedback' action.\r\n * This task must be in SLACK_ALLOWED_TASKS to be Slack-callable.\r\n */\r\n\r\nimport type { ComposedTaskTemplate } from '../steps/types';\r\nimport { TASK_SLUGS } from '../constants';\r\n\r\nexport const handleMessageTask: ComposedTaskTemplate = {\r\n slug: TASK_SLUGS.HANDLE_MESSAGE,\r\n name: 'Handle Message',\r\n description: 'Handle team responses and Slack communications, maintaining context for ongoing conversations (LLM-routed)',\r\n\r\n frontmatter: {\r\n description: 'Handle team responses and Slack communications, maintaining context for ongoing conversations',\r\n 'argument-hint': '[slack thread context or team message]',\r\n },\r\n\r\n steps: [\r\n // Step 1: Overview (inline)\r\n {\r\n inline: true,\r\n title: 'Handle Message Overview',\r\n content: `# Handle Message Command\r\n\r\nProcess team responses from Slack threads and handle multi-turn conversations with the product team about testing clarifications, ambiguities, and questions.`,\r\n },\r\n // Step 2: Security Notice (library)\r\n 'security-notice',\r\n // Step 3: Arguments (inline)\r\n {\r\n inline: true,\r\n title: 'Arguments',\r\n content: `Team message/thread context: $ARGUMENTS`,\r\n },\r\n // Step 4: Load Project Context (library)\r\n 'load-project-context',\r\n // Step 5: Knowledge Base Read (library)\r\n 'read-knowledge-base',\r\n // Step 5: Detect Intent (inline - task-specific)\r\n {\r\n inline: true,\r\n title: 'Detect Message Intent and Load Handler',\r\n content: `Before processing the message, identify the intent type to load the appropriate handler.\r\n\r\n#### 0.1 Extract Intent from Event Payload\r\n\r\nCheck the event payload for the \\`intent\\` field provided by the LLM layer:\r\n- If \\`intent\\` is present, use it directly\r\n- Valid intent values: \\`question\\`, \\`feedback\\`, \\`status\\`\r\n\r\n#### 0.2 Fallback Intent Detection (if no intent provided)\r\n\r\nIf intent is not in the payload, detect from message patterns:\r\n\r\n| Condition | Intent |\r\n|-----------|--------|\r\n| Keywords: \"status\", \"progress\", \"how did\", \"results\", \"how many passed\" | \\`status\\` |\r\n| Keywords: \"bug\", \"issue\", \"broken\", \"doesn't work\", \"failed\", \"error\" | \\`feedback\\` |\r\n| Question words: \"what\", \"which\", \"do we have\", \"is there\" about tests/project | \\`question\\` |\r\n| Default (none of above) | \\`feedback\\` |\r\n\r\n#### 0.3 Load Handler File\r\n\r\nBased on detected intent, load the handler from:\r\n\\`.bugzy/runtime/handlers/messages/{intent}.md\\`\r\n\r\n**Handler files:**\r\n- \\`question.md\\` - Questions about tests, coverage, project details\r\n- \\`feedback.md\\` - Bug reports, test observations, general information\r\n- \\`status.md\\` - Status checks on test runs, task progress\r\n\r\n#### 0.4 Follow Handler Instructions\r\n\r\n**IMPORTANT**: The handler file is authoritative for this intent type.\r\n\r\n1. Read the handler file completely\r\n2. Follow its processing steps in order\r\n3. Apply its context loading requirements\r\n4. Use its response guidelines\r\n5. Perform any memory updates it specifies\r\n\r\nThe handler file contains all necessary processing logic for the detected intent type. Each handler includes:\r\n- Specific processing steps for that intent\r\n- Context loading requirements\r\n- Response guidelines\r\n- Memory update instructions`,\r\n },\r\n // Step 6: Post Response via Team Communicator\r\n {\r\n inline: true,\r\n title: 'Post Response to Team',\r\n content: `## Post Response to the Team\r\n\r\nAfter processing the message through the handler and composing your response:\r\n\r\n{{INVOKE_TEAM_COMMUNICATOR}} to post the response back to the team.\r\n\r\n**Context to include in the delegation:**\r\n- The original message/question from the team member\r\n- Your composed response with all gathered data\r\n- Whether this should be a thread reply (if the original message was in a thread) or a new message\r\n- The relevant channel (from project-context.md)\r\n\r\n**Do NOT:**\r\n- Skip posting and just display the response as text output\r\n- Ask the user whether to post — the message came from the team, the response goes back to the team\r\n- Compose a draft without sending it`,\r\n },\r\n // Step 7: Clarification Protocol (for ambiguous intents)\r\n 'clarification-protocol',\r\n // Step 8: Knowledge Base Update (library)\r\n 'update-knowledge-base',\r\n ],\r\n\r\n requiredSubagents: ['team-communicator'],\r\n optionalSubagents: [],\r\n dependentTasks: ['verify-changes'],\r\n};\r\n","/**\r\n * Process Event Task (Composed)\r\n * Process webhook events by analyzing for QA relevance and queuing proposed actions for team confirmation\r\n */\r\n\r\nimport type { ComposedTaskTemplate } from '../steps/types';\r\nimport { TASK_SLUGS } from '../constants';\r\n\r\nexport const processEventTask: ComposedTaskTemplate = {\r\n slug: TASK_SLUGS.PROCESS_EVENT,\r\n name: 'Process Event',\r\n description: 'Process webhook events by analyzing for QA relevance and queuing proposed actions for team confirmation',\r\n\r\n frontmatter: {\r\n description: 'Process webhook events by analyzing for QA relevance and queuing proposed actions for team confirmation',\r\n 'argument-hint': '[event payload or description]',\r\n },\r\n\r\n steps: [\r\n // Step 1: Overview (inline)\r\n {\r\n inline: true,\r\n title: 'Process Event Overview',\r\n content: `# Process Event Command\r\n\r\nProcess webhook events from integrated systems by analyzing event content, determining appropriate QA actions, and queuing them for team confirmation.\r\n\r\n**This task does NOT execute actions directly.** It proposes actions via the blocked-task-queue and notifies the team for confirmation. Only knowledge base updates and event history logging are performed directly.`,\r\n },\r\n // Step 2: Security Notice (library)\r\n 'security-notice',\r\n // Step 3: Arguments (inline)\r\n {\r\n inline: true,\r\n title: 'Arguments',\r\n content: `Arguments: $ARGUMENTS`,\r\n },\r\n // Step 4: Load Project Context (library)\r\n 'load-project-context',\r\n // Step 5: Knowledge Base Read (library)\r\n 'read-knowledge-base',\r\n // Step 5: Understand Event Context (inline)\r\n {\r\n inline: true,\r\n title: 'Understand Event Context',\r\n content: `Events come from integrated external systems via webhooks or manual input. Common sources include:\r\n- **Issue Trackers**: Jira, Linear, GitHub Issues\r\n- **Source Control**: GitHub, GitLab\r\n- **Communication Tools**: Slack\r\n\r\n**Event structure and semantics vary by source.** Use the inline event-action reference patterns and historical context to determine actions.\r\n\r\n#### Event Context to Extract:\r\n- **What happened**: The core event (test failed, PR merged, etc.)\r\n- **Where**: Component, service, or area affected\r\n- **Impact**: How this affects testing strategy\r\n- **Action Required**: What needs to be done in response`,\r\n },\r\n // Step 6: Clarify Unclear Events (inline - task-specific)\r\n {\r\n inline: true,\r\n title: 'Clarify Unclear Events',\r\n content: `If the event information is incomplete or ambiguous, seek clarification before processing:\r\n\r\n#### Detect Unclear Events\r\n\r\nEvents may be unclear in several ways:\r\n- **Vague description**: \"Something broke\", \"issue with login\" (what specifically?)\r\n- **Missing context**: Which component, which environment, which user?\r\n- **Contradictory information**: Event data conflicts with other sources\r\n- **Unknown references**: Mentions unfamiliar features, components, or systems\r\n- **Unclear severity**: Impact or priority is ambiguous\r\n\r\n#### Assess Ambiguity Severity\r\n\r\nClassify the ambiguity level to determine appropriate response:\r\n\r\n**🔴 CRITICAL - STOP and seek clarification:**\r\n- Cannot identify which component is affected\r\n- Event data is contradictory or nonsensical\r\n- Unknown system or feature mentioned\r\n- Cannot determine if this requires immediate action\r\n- Example: Event says \"production is down\" but unclear which service\r\n\r\n**🟠 HIGH - STOP and seek clarification:**\r\n- Vague problem description that could apply to multiple areas\r\n- Missing critical context needed for proper response\r\n- Unclear which team or system is responsible\r\n- Example: \"Login issue reported\" (login button? auth service? session? which page?)\r\n\r\n**🟡 MEDIUM - Proceed with documented assumptions:**\r\n- Some details missing but core event is clear\r\n- Can infer likely meaning from context\r\n- Can proceed but should clarify async\r\n- Example: \"Test failed on staging\" (can assume main staging, but clarify which one)\r\n\r\n**🟢 LOW - Mark and proceed:**\r\n- Minor details missing (optional context)\r\n- Cosmetic or non-critical information gaps\r\n- Can document gap and continue\r\n- Example: Missing timestamp or exact user who reported issue\r\n\r\n#### Clarification Approach by Severity\r\n\r\n**For CRITICAL/HIGH ambiguity:**\r\n1. **{{INVOKE_TEAM_COMMUNICATOR}} to ask specific questions**\r\n2. **WAIT for response before proceeding**\r\n3. **Document the clarification request in event history**\r\n\r\nExample clarification messages:\r\n- \"Event mentions 'login issue' - can you clarify if this is:\r\n • Login button not responding?\r\n • Authentication service failure?\r\n • Session management problem?\r\n • Specific page or global?\"\r\n\r\n- \"Event references component 'XYZ' which is unknown. What system does this belong to?\"\r\n\r\n- \"Event data shows contradictory information: status=success but error_count=15. Which is correct?\"\r\n\r\n**For MEDIUM ambiguity:**\r\n1. **Document assumption** with reasoning\r\n2. **Proceed with processing** based on assumption\r\n3. **Ask for clarification async** (non-blocking)\r\n4. **Mark in event history** for future reference\r\n\r\nExample: [ASSUMED: \"login issue\" refers to login button based on recent similar events]\r\n\r\n**For LOW ambiguity:**\r\n1. **Mark with [TO BE CLARIFIED: detail]**\r\n2. **Continue processing** normally\r\n3. **Document gap** in event history\r\n\r\nExample: [TO BE CLARIFIED: Exact timestamp of when issue was first observed]\r\n\r\n#### Document Clarification Process\r\n\r\nIn event history, record:\r\n- **Ambiguity detected**: What was unclear\r\n- **Severity assessed**: CRITICAL/HIGH/MEDIUM/LOW\r\n- **Clarification requested**: Questions asked (if any)\r\n- **Response received**: Team's clarification\r\n- **Assumption made**: If proceeded with assumption\r\n- **Resolution**: How ambiguity was resolved\r\n\r\nThis ensures future similar events can reference past clarifications and avoid redundant questions.`,\r\n },\r\n // Step 7: Load Context and Memory (inline)\r\n {\r\n inline: true,\r\n title: 'Load Context and Memory',\r\n content: `### Step 2: Load Context and Memory\r\n\r\n#### 2.1 Check Event Processor Memory\r\nRead \\`.bugzy/runtime/memory/event-processor.md\\` to:\r\n- Find similar event patterns\r\n- Load example events with reasoning\r\n- Get system-specific rules\r\n- Retrieve task mapping patterns\r\n\r\n#### 2.2 Check Event History\r\nRead \\`.bugzy/runtime/memory/event-history.md\\` to:\r\n- Ensure event hasn't been processed already (idempotency)\r\n- Find related recent events\r\n- Understand event patterns and trends\r\n\r\n#### 2.3 Read Current State\r\n- Read \\`test-plan.md\\` for current coverage\r\n- List \\`./test-cases/\\` for existing tests\r\n- Check \\`.bugzy/runtime/knowledge-base.md\\` for past insights\r\n\r\n#### 2.4 Knowledge Base: Drafted vs Real Tests (BYOT)\r\n\r\nWhen the project uses an external test repository, maintain two sections in \\`.bugzy/runtime/knowledge-base.md\\`:\r\n\r\n**Drafted Tests** (Open PRs — tests not yet merged):\r\n\\`\\`\\`markdown\r\n### Drafted Tests\r\n| PR | Branch | Tests Added | Status | Date |\r\n|----|--------|-------------|--------|------|\r\n| #12 | bugzy/verify-changes-a1b2c3d4 | login.spec.ts, checkout.spec.ts | Open | 2026-02-13 |\r\n\\`\\`\\`\r\n\r\n**Active Tests** (Merged — tests are part of the test suite):\r\n\\`\\`\\`markdown\r\n### Active Tests\r\n| File | What it tests | Source PR | Merged |\r\n|------|---------------|-----------|--------|\r\n| login.spec.ts | Login flow with valid/invalid credentials | #12 | 2026-02-13 |\r\n\\`\\`\\`\r\n\r\nMove entries from Drafted → Active Tests when PRs are merged. Remove entries when PRs are closed without merge.\r\n\r\n#### 2.5 Event-Action Reference Patterns\r\n\r\nUse these as reference patterns for common events. The webhook routing system already handles events with specific default tasks (e.g., deployment_status → /run-tests). Process-event receives events that need analysis.\r\n\r\n**Jira Events:**\r\n- **Status → \"Ready to Test\" / \"In Testing\" / \"Ready for QA\"**: Propose \\`/verify-changes\\` with issue context\r\n- **Resolution: \"Not a Bug\" / \"Won't Fix\" / \"User Error\"**: Update knowledge base directly with the learning (no queue needed)\r\n- **Bug created with relevant labels**: Propose \\`/generate-test-cases\\` to update related test coverage, confirm with team\r\n- **Backlog → To Do**: No QA action needed, log to event history only\r\n\r\n**GitHub Events:**\r\n- **PR merged (routed to process-event)**: Propose \\`/verify-changes\\` for the merged changes\r\n- **Issue closed as \"won't fix\"**: Update knowledge base directly with the learning\r\n- **Issue created/updated**: Analyze for QA relevance, propose actions if applicable\r\n\r\n**Recall.ai Events (Meeting Transcripts):**\r\n- **QA-relevant content found**: Propose appropriate follow-up tasks (e.g., \\`/generate-test-cases\\`, \\`/verify-changes\\`)\r\n- **No QA content** (HR meeting, offsite planning, etc.): Skip — log to event history only\r\n\r\n**External Test Repo Events** (BYOT - events from the customer's external test repository):\r\n- **PR opened by Bugzy** (\\`com.github.external_repo.pull_request\\`, \\`action: \"opened\"\\`, branch starts with \\`bugzy/\\`):\r\n Log to Knowledge Base under \"Drafted Tests\". No action task needed — just record the PR number, branch, and what tests were added.\r\n- **PR review submitted** (\\`com.github.external_repo.pull_request_review\\`):\r\n If changes were requested → queue \\`/verify-changes\\` with \\`{\"existingPrBranch\": \"{head.ref}\", \"context\": \"PR review feedback: {review.body}\"}\\`.\r\n The execution will iterate on the existing branch, push fixes, and skip PR creation.\r\n- **PR comment** (\\`com.github.external_repo.pull_request_comment\\`):\r\n Read the comment. If it contains actionable feedback, queue \\`/verify-changes\\`\r\n with \\`{\"existingPrBranch\": \"{issue.pull_request.head.ref}\"}\\`.\r\n- **PR merged** (\\`com.github.external_repo.pull_request\\`, \\`action: \"closed\"\\`, \\`merged: true\\`):\r\n Update Knowledge Base: move entries from \"Drafted Tests\" to \"Active Tests\". Notify team of new test coverage.\r\n The submodule pointer update happens automatically via the container (\\`updateSubmoduleToLatest\\`).\r\n- **PR closed without merge** (\\`com.github.external_repo.pull_request\\`, \\`action: \"closed\"\\`, \\`merged: false\\`):\r\n Remove from Knowledge Base \"Drafted Tests\". Notify team that tests were rejected.\r\n- **Direct push to main** (\\`com.github.external_repo.push\\`, ref is main/master):\r\n Update Knowledge Base if test files were affected. Submodule pointer update is automatic.\r\n\r\n**Other Events:**\r\n- Analyze for QA relevance based on knowledge base and project context\r\n- If action needed, propose appropriate task. If not, log and skip.\r\n\r\nCheck \\`.bugzy/runtime/project-context.md\\` for project-specific context that may inform action decisions.`,\r\n },\r\n // Step 8: Intelligent Event Analysis (inline)\r\n {\r\n inline: true,\r\n title: 'Intelligent Event Analysis',\r\n content: `### Step 3: Intelligent Event Analysis\r\n\r\n#### 3.1 Contextual Pattern Analysis\r\nDon't just match patterns - analyze the event within the full context:\r\n\r\n**Combine Multiple Signals**:\r\n- Event details + Historical patterns from memory\r\n- Current test plan state + Knowledge base\r\n- External system status + Team activity\r\n- Business priorities + Risk assessment\r\n\r\n**Example Contextual Analysis**:\r\n\\`\\`\\`\r\nEvent: Jira issue PROJ-456 moved to \"Ready for QA\"\r\n+ Reference Pattern: \"Ready for QA\" status suggests /verify-changes\r\n+ History: This issue was previously in \"In Progress\" for 3 days\r\n+ Knowledge: Related PR #123 merged yesterday\r\n= Decision: Propose /verify-changes with issue context and PR reference\r\n\\`\\`\\`\r\n\r\n**Pattern Recognition with Context**:\r\n- An issue resolution depends on the event-action reference patterns and project context\r\n- A duplicate event (same issue, same transition) should be skipped\r\n- Events from different sources about the same change should be correlated\r\n\r\n#### 3.2 Generate Semantic Queries\r\nBased on event type and content, generate 3-5 specific search queries:\r\n- Search for similar past events\r\n- Look for related test cases\r\n- Find relevant documentation\r\n- Check for known issues`,\r\n },\r\n // Step 9: Documentation Research (conditional library step)\r\n {\r\n stepId: 'gather-documentation',\r\n conditionalOnSubagent: 'documentation-researcher',\r\n },\r\n // Step 10: Task Planning (inline)\r\n {\r\n inline: true,\r\n title: 'Task Planning with Reasoning',\r\n content: `### Step 4: Task Planning with Reasoning\r\n\r\nGenerate tasks based on event analysis, using examples from memory as reference.\r\n\r\n#### Task Generation Logic:\r\nAnalyze the event in context of ALL available information to decide what actions to take:\r\n\r\n**Consider the Full Context**:\r\n- What do the event-action reference patterns suggest for this event type?\r\n- How does this relate to current knowledge?\r\n- What's the state of related issues in external systems?\r\n- Is this part of a larger pattern we've been seeing?\r\n- What's the business impact of this event?\r\n\r\n**Contextual Decision Making**:\r\nThe same event type can require different actions based on context:\r\n- If reference pattern suggests verification -> Propose /verify-changes (queue for confirmation)\r\n- If this issue was already processed (check event history) -> Skip to avoid duplicates\r\n- If related PR exists in knowledge base -> Include PR context in proposed actions\r\n- If this is a recurring pattern from the same source -> Consider flagging for review\r\n- If no clear action for this event type -> Analyze context or skip\r\n\r\n**Dynamic Task Selection**:\r\nBased on the contextual analysis, decide which tasks make sense:\r\n- **extract_learning**: When the event reveals something new about the system\r\n- **update_test_plan**: When our understanding of what to test has changed\r\n- **propose_generate_test_cases**: When tests need to reflect new reality (queued for confirmation)\r\n- **report_bug**: When we have a legitimate, impactful, reproducible issue\r\n- **skip_action**: When context shows no action needed (e.g., known issue, already fixed)\r\n\r\nThe key is to use ALL available context - not just react to the event type\r\n\r\n#### Document Reasoning:\r\nFor each task, document WHY it's being executed:\r\n\\`\\`\\`markdown\r\nTask: extract_learning\r\nReasoning: This event reveals a pattern of login failures on Chrome that wasn't previously documented\r\nData: \"Chrome-specific timeout issues with login button\"\r\n\\`\\`\\``,\r\n },\r\n // Step 11: Issue Tracking (conditional inline)\r\n {\r\n inline: true,\r\n title: 'Issue Tracking',\r\n content: `##### For Issue Tracking:\r\n\r\nWhen an issue needs to be tracked (task type: report_bug or update_story):\r\n\r\n{{INVOKE_ISSUE_TRACKER}}\r\n\r\n1. Check for duplicate issues in the tracking system\r\n2. For bugs: Create detailed bug report with:\r\n - Clear, descriptive title\r\n - Detailed description with context\r\n - Step-by-step reproduction instructions\r\n - Expected vs actual behavior\r\n - Environment and configuration details\r\n - Test case reference (if applicable)\r\n - Screenshots or error logs\r\n3. For stories: Update status and add QA comments\r\n4. Track issue lifecycle and maintain categorization\r\n\r\nThe issue-tracker agent will handle all aspects of issue tracking including duplicate detection, story management, QA workflow transitions, and integration with your project management system (Jira, Linear, Notion, etc.).`,\r\n conditionalOnSubagent: 'issue-tracker',\r\n },\r\n // Step 12: Execute Tasks (inline)\r\n {\r\n inline: true,\r\n title: 'Queue Proposed Actions and Notify Team',\r\n content: `### Step 5: Queue Proposed Actions and Notify Team\r\n\r\n#### 5.1 Categorize Determined Actions\r\n\r\nSeparate actions into two categories:\r\n\r\n**Queued Actions** (require team confirmation):\r\n- \\`/verify-changes\\`, \\`/generate-test-cases\\`, \\`/run-tests\\`, \\`/explore-application\\`\r\n- Any task that modifies tests, runs automation, or takes significant action\r\n\r\n**Direct Actions** (execute immediately):\r\n- Knowledge base updates and learnings\r\n- Event history logging\r\n- Event processor memory updates\r\n- Skip decisions\r\n\r\n#### 5.2 Execute Direct Actions\r\n\r\nUpdate \\`.bugzy/runtime/knowledge-base.md\\` directly for learnings (e.g., \"Not a Bug\" resolutions).\r\n\r\n#### 5.3 Queue Action Tasks\r\n\r\nFor each proposed action task, append one row to \\`.bugzy/runtime/blocked-task-queue.md\\`:\r\n\r\n| Task Slug | Question | Original Args |\r\n|-----------|----------|---------------|\r\n| /verify-changes | Verify PROJ-456 changes (moved to Ready for QA)? Related PR #123. | \\`{\"issue\": \"PROJ-456\", \"context\": \"Jira Ready to Test\"}\\` |\r\n\r\nRules:\r\n1. Read file first (create if doesn't exist)\r\n2. Each action gets its own row\r\n3. **Question** must be clear and include enough context for team to decide\r\n4. **Original Args** must include event source, IDs, and relevant context as JSON\r\n\r\n#### 5.4 Notify Team\r\n\r\n{{INVOKE_TEAM_COMMUNICATOR}} to share the outcome:\r\n\r\n**If actions were queued:**\r\n- What event was processed\r\n- What actions are proposed (with brief reasoning)\r\n- These are awaiting confirmation\r\n\r\n**If no actions queued (KB-only update or skip):**\r\n- What event was processed\r\n- What was learned or why it was skipped\r\n- That no action is needed from the team\r\n\r\n#### 5.5 Complete Task\r\n\r\nAfter queuing and notifying, the task is DONE. Do NOT:\r\n- Execute /verify-changes, /run-tests, /generate-test-cases directly\r\n- Wait for team response (messaging infrastructure handles that)\r\n- Create or modify test files\r\n- Run automated tests\r\n\r\n#### 5.6 Update Event Processor Memory\r\nIf new patterns discovered, append to \\`.bugzy/runtime/memory/event-processor.md\\`:\r\n\\`\\`\\`markdown\r\n### Pattern: [New Pattern Name]\r\n**First Seen**: [Date]\r\n**Indicators**: [What identifies this pattern]\r\n**Typical Tasks**: [Common task responses]\r\n**Example**: [This event]\r\n\\`\\`\\`\r\n\r\n#### 5.7 Update Event History\r\nAppend to \\`.bugzy/runtime/memory/event-history.md\\`:\r\n\\`\\`\\`markdown\r\n## [Timestamp] - Event #[ID]\r\n\r\n**Original Input**: [Raw arguments provided]\r\n**Parsed Event**:\r\n\\`\\`\\`yaml\r\ntype: [type]\r\nsource: [source]\r\n[other fields]\r\n\\`\\`\\`\r\n\r\n**Pattern Matched**: [Pattern name or \"New Pattern\"]\r\n**Tasks Executed**:\r\n1. [Task 1] - Reasoning: [Why]\r\n2. [Task 2] - Reasoning: [Why]\r\n\r\n**Files Modified**:\r\n- [List of files]\r\n\r\n**Outcome**: [Success/Partial/Failed]\r\n**Notes**: [Any additional context]\r\n---\r\n\\`\\`\\``,\r\n },\r\n // Step 13: Learning and Maintenance (inline)\r\n {\r\n inline: true,\r\n title: 'Learning from Events',\r\n content: `### Step 6: Learning from Events\r\n\r\nAfter processing, check if this event teaches us something new:\r\n1. Is this a new type of event we haven't seen?\r\n2. Did our task planning work well?\r\n3. Should we update our patterns?\r\n4. Are there trends across recent events?\r\n\r\nIf yes, update the event processor memory with new patterns or refined rules.\r\n\r\n### Step 7: Create Necessary Files\r\n\r\nEnsure all required files and directories exist:\r\n\\`\\`\\`bash\r\nmkdir -p ./test-cases .claude/memory\r\n\\`\\`\\`\r\n\r\nCreate files if they don't exist:\r\n- \\`.bugzy/runtime/knowledge-base.md\\`\r\n- \\`.bugzy/runtime/memory/event-processor.md\\`\r\n- \\`.bugzy/runtime/memory/event-history.md\\``,\r\n },\r\n // Step 14: Knowledge Base Update (library)\r\n 'update-knowledge-base',\r\n ],\r\n\r\n requiredSubagents: ['team-communicator'],\r\n optionalSubagents: ['documentation-researcher', 'issue-tracker'],\r\n dependentTasks: ['verify-changes', 'generate-test-cases', 'run-tests'],\r\n};\r\n","/**\r\n * Run Tests Task (Composed)\r\n * Select and run test cases using the browser-automation agent\r\n */\r\n\r\nimport type { ComposedTaskTemplate } from '../steps/types';\r\nimport { TASK_SLUGS } from '../constants';\r\n\r\nexport const runTestsTask: ComposedTaskTemplate = {\r\n slug: TASK_SLUGS.RUN_TESTS,\r\n name: 'Run Tests',\r\n description: 'Execute automated tests, analyze failures, and fix test issues automatically',\r\n\r\n frontmatter: {\r\n description: 'Execute automated tests, analyze failures, and fix test issues automatically',\r\n 'argument-hint': '[file-pattern|tag|all] (e.g., \"auth\", \"@smoke\", or a specific test file path)',\r\n },\r\n\r\n steps: [\r\n // Step 1: Overview (inline)\r\n {\r\n inline: true,\r\n title: 'Run Tests Overview',\r\n content: `# Run Tests Command\r\n\r\nExecute automated tests, analyze failures using JSON reports, automatically fix test issues, and log product bugs. Read \\`./tests/CLAUDE.md\\` for framework-specific conventions and commands.`,\r\n },\r\n // Step 2: Security Notice (library)\r\n 'security-notice',\r\n // Step 3: Arguments (inline)\r\n {\r\n inline: true,\r\n title: 'Arguments',\r\n content: `Arguments: $ARGUMENTS\r\n\r\n**Parse Arguments:**\r\nExtract the following from arguments:\r\n- **selector**: Test selection criteria\r\n - File pattern: \"auth\" → find matching test files (see \\`./tests/CLAUDE.md\\` for directory structure)\r\n - Tag: \"@smoke\" → runs tests with tag annotation\r\n - Specific file: path to a specific test file\r\n - All tests: \"all\" or \"\" → runs entire test suite`,\r\n },\r\n // Step 4: Load Project Context (library)\r\n 'load-project-context',\r\n // Step 5: Knowledge Base Read (library)\r\n 'read-knowledge-base',\r\n // Step 5: Test Execution Strategy (library)\r\n 'read-test-strategy',\r\n // Step 6: Clarification Protocol (library)\r\n 'clarification-protocol',\r\n // Step 7: Identify Tests (inline - task-specific)\r\n {\r\n inline: true,\r\n title: 'Identify Automated Tests to Run',\r\n content: `#### Understand Test Selection\r\n\r\nRead \\`./tests/CLAUDE.md\\` for the test directory structure, file patterns, and execution commands.\r\n\r\nParse the selector argument to determine which tests to run:\r\n\r\n**File Pattern** (e.g., \"auth\", \"login\"):\r\n- Find matching test files in the test directory specified by \\`./tests/CLAUDE.md\\`\r\n- Example: \"auth\" → finds all test files with \"auth\" in the name\r\n\r\n**Tag** (e.g., \"@smoke\", \"@regression\"):\r\n- Run tests with specific tag annotation using the tag command from \\`./tests/CLAUDE.md\\`\r\n\r\n**Specific File**:\r\n- Run that specific test file using the single-file command from \\`./tests/CLAUDE.md\\`\r\n\r\n**All Tests** (\"all\" or no selector):\r\n- Run entire test suite using the run-all command from \\`./tests/CLAUDE.md\\`\r\n\r\n#### Find Matching Test Files\r\nUse glob patterns to find test files in the directory structure defined by \\`./tests/CLAUDE.md\\`.\r\n\r\n#### Validate Test Files Exist\r\nCheck that at least one test file was found:\r\n- If no tests found, inform user and suggest available tests\r\n- List available test files if selection was unclear\r\n\r\n#### Confirm Selection Before Execution\r\nBefore running tests, confirm the selection with the user if ambiguous:\r\n- **Clear selection** (specific file or tag): Proceed immediately\r\n- **Pattern match** (multiple files): List matching files and ask for confirmation if count > 5\r\n- **No selector** (all tests): Confirm running full suite before executing`,\r\n },\r\n // Step 7-10: Test Execution (library steps)\r\n 'run-tests',\r\n 'normalize-test-results',\r\n 'parse-test-results',\r\n 'triage-failures',\r\n 'fix-test-issues',\r\n // Step 11: Log Product Bugs (conditional - library step)\r\n {\r\n stepId: 'log-product-bugs',\r\n conditionalOnSubagent: 'issue-tracker',\r\n },\r\n // Step 12: Handle Special Cases (inline - reference material, positioned before final action steps)\r\n {\r\n inline: true,\r\n title: 'Handle Special Cases',\r\n content: `#### If No Test Cases Found\r\nIf no test cases match the selection criteria:\r\n1. Inform user that no matching test cases were found\r\n2. List available test cases or suggest running \\`/generate-test-cases\\` first\r\n3. Provide examples of valid selection criteria\r\n\r\n#### If Browser Automation Agent Fails\r\nIf the browser-automation agent encounters issues:\r\n1. Report the specific error\r\n2. Suggest troubleshooting steps\r\n3. Offer to run tests individually if batch execution failed\r\n\r\n#### If Test Cases Are Invalid\r\nIf selected test cases have formatting issues:\r\n1. Report which test cases are invalid\r\n2. Specify what's missing or incorrect\r\n3. Offer to fix the issues or skip invalid tests\r\n\r\n### Important Notes\r\n\r\n**Test Selection Strategy**:\r\n- **Always read** \\`./tests/docs/test-execution-strategy.md\\` before selecting tests\r\n- Default to \\`@smoke\\` tests for fast validation unless user explicitly requests otherwise\r\n- Smoke tests provide 100% manual test case coverage with zero redundancy (~2-5 min)\r\n- Full regression includes intentional redundancy for diagnostic value (~10-15 min)\r\n- Use context keywords from user request to choose appropriate tier\r\n\r\n**Test Execution**:\r\n- Automated tests are executed via bash command, not through agents\r\n- Test execution time varies by tier (see strategy document for details)\r\n- JSON reports provide structured test results for analysis\r\n- Test framework may capture traces, screenshots, and videos on failures (see \\`./tests/CLAUDE.md\\`)\r\n- Test artifacts are stored as defined in \\`./tests/CLAUDE.md\\`\r\n\r\n**Failure Handling**:\r\n- Test failures are automatically triaged (product bugs vs test issues)\r\n- Test issues are automatically fixed by the test-debugger-fixer subagent\r\n- Product bugs are logged via issue tracker after triage\r\n- All results are analyzed for learning opportunities and team communication\r\n- Critical failures trigger immediate team notification\r\n\r\n**Related Documentation**:\r\n- \\`./tests/docs/test-execution-strategy.md\\` - When and why to run specific tests\r\n- \\`./tests/docs/testing-best-practices.md\\` - How to write tests (patterns and anti-patterns)`,\r\n },\r\n // Step 13: Knowledge Base Update (library)\r\n 'update-knowledge-base',\r\n // Step 14: Team Communication (conditional - library step, LAST actionable step)\r\n {\r\n stepId: 'notify-team',\r\n conditionalOnSubagent: 'team-communicator',\r\n },\r\n ],\r\n\r\n requiredSubagents: ['browser-automation', 'test-debugger-fixer'],\r\n optionalSubagents: ['issue-tracker', 'team-communicator'],\r\n dependentTasks: [],\r\n};\r\n","/**\r\n * Verify Changes - Unified Multi-Trigger Task (Composed)\r\n * Single dynamic task that handles all trigger sources: manual, Slack, GitHub PR, CI/CD\r\n *\r\n * This task replaces verify-changes-manual and verify-changes-slack with intelligent\r\n * trigger detection and multi-channel output routing.\r\n */\r\n\r\nimport type { ComposedTaskTemplate } from '../steps/types';\r\nimport { TASK_SLUGS } from '../constants';\r\n\r\nexport const verifyChangesTask: ComposedTaskTemplate = {\r\n slug: TASK_SLUGS.VERIFY_CHANGES,\r\n name: 'Verify Changes',\r\n description: 'Unified verification command for all trigger sources with automated tests and manual checklists',\r\n\r\n frontmatter: {\r\n description: 'Verify code changes with automated tests and manual verification checklists',\r\n 'argument-hint': '[trigger-auto-detected]',\r\n },\r\n\r\n steps: [\r\n // Step 1: Overview (inline)\r\n {\r\n inline: true,\r\n title: 'Verify Changes Overview',\r\n content: `# Verify Changes - Unified Multi-Trigger Workflow\r\n\r\n## Overview\r\n\r\nThis task performs comprehensive change verification with:\r\n- **Automated testing**: Execute automated tests with automatic triage and fixing\r\n- **Manual verification checklists**: Generate role-specific checklists for non-automatable scenarios\r\n- **Multi-trigger support**: Works from manual CLI, Slack messages, GitHub PRs, and CI/CD\r\n- **Smart output routing**: Results formatted and delivered to the appropriate channel`,\r\n },\r\n // Step 2: Security Notice (library)\r\n 'security-notice',\r\n // Step 3: Arguments (inline)\r\n {\r\n inline: true,\r\n title: 'Arguments',\r\n content: `**Input**: $ARGUMENTS\r\n\r\nThe input format determines the trigger source and context extraction strategy.`,\r\n },\r\n // Step 4: Load Project Context (library)\r\n 'load-project-context',\r\n // Step 5: Knowledge Base Read (library)\r\n 'read-knowledge-base',\r\n // Step 5: Detect Trigger Source (inline)\r\n {\r\n inline: true,\r\n title: 'Detect Trigger Source',\r\n content: `Analyze the input format to determine how this task was invoked:\r\n\r\n### Identify Trigger Type\r\n\r\n**GitHub PR Webhook:**\r\n- Input contains \\`pull_request\\` object with structure:\r\n \\`\\`\\`json\r\n {\r\n \"pull_request\": {\r\n \"number\": 123,\r\n \"title\": \"...\",\r\n \"body\": \"...\",\r\n \"changed_files\": [...],\r\n \"base\": { \"ref\": \"main\" },\r\n \"head\": { \"ref\": \"feature-branch\" },\r\n \"user\": { \"login\": \"...\" }\r\n }\r\n }\r\n \\`\\`\\`\r\n-> **Trigger detected: GITHUB_PR**\r\n\r\n**Slack Event:**\r\n- Input contains \\`event\\` object with structure:\r\n \\`\\`\\`json\r\n {\r\n \"eventType\": \"com.slack.message\" or \"com.slack.app_mention\",\r\n \"event\": {\r\n \"type\": \"message\",\r\n \"channel\": \"C123456\",\r\n \"user\": \"U123456\",\r\n \"text\": \"message content\",\r\n \"ts\": \"1234567890.123456\",\r\n \"thread_ts\": \"...\" (optional)\r\n }\r\n }\r\n \\`\\`\\`\r\n-> **Trigger detected: SLACK_MESSAGE**\r\n\r\n**CI/CD Environment:**\r\n- Environment variables present:\r\n - \\`CI=true\\`\r\n - \\`GITHUB_REF\\` (e.g., \"refs/heads/feature-branch\")\r\n - \\`GITHUB_SHA\\` (commit hash)\r\n - \\`GITHUB_BASE_REF\\` (base branch)\r\n - \\`GITHUB_HEAD_REF\\` (head branch)\r\n- Git context available via bash commands\r\n-> **Trigger detected: CI_CD**\r\n\r\n**Manual Invocation:**\r\n- Input is natural language, URL, or issue identifier\r\n- Patterns: \"PR #123\", GitHub URL, \"PROJ-456\", feature description\r\n-> **Trigger detected: MANUAL**\r\n\r\n### Store Trigger Context\r\n\r\nStore the detected trigger for use in output routing:\r\n- Set variable: \\`TRIGGER_SOURCE\\` = [GITHUB_PR | SLACK_MESSAGE | CI_CD | MANUAL]\r\n- This determines output formatting and delivery channel`,\r\n },\r\n // Step 5c: Coverage Gap vs. Ambiguity (inline)\r\n {\r\n inline: true,\r\n title: 'Coverage Gap vs. Ambiguity',\r\n content: `### Coverage Gap vs. Ambiguity\r\n\r\nWhen the trigger indicates a feature is ready for testing (Jira \"Ready to Test\", PR merged, CI/CD):\r\n\r\n**Missing test coverage is a COVERAGE GAP, not an ambiguity.** The trigger asserts the feature exists. Do NOT block based on stale docs or knowledge base gaps. Coverage gaps are handled in \"Create Tests for Coverage Gaps\" below.\r\n\r\n**If you can't find the referenced feature in the browser:** Apply the Clarification Protocol's execution obstacle principle. The authoritative trigger asserts it exists — this is an execution obstacle (wrong role, missing test data, feature flags, env config). PROCEED to create tests, add placeholder env vars, notify team about the access issue. Tests may fail until resolved — that's expected.\r\n\r\n**Only BLOCK if NO authoritative trigger source claims the feature exists** (e.g., vague manual request with no Jira/PR backing).`,\r\n },\r\n // Step 6: Clarification Protocol (library)\r\n 'clarification-protocol',\r\n // Step 7: Extract Context (inline)\r\n {\r\n inline: true,\r\n title: 'Extract Context Based on Trigger',\r\n content: `Based on the detected trigger source, extract relevant context:\r\n\r\n### GitHub PR Trigger - Extract PR Details\r\n\r\nIf trigger is GITHUB_PR:\r\n- **PR number**: \\`pull_request.number\\`\r\n- **Title**: \\`pull_request.title\\`\r\n- **Description**: \\`pull_request.body\\`\r\n- **Changed files**: \\`pull_request.changed_files\\` (array of file paths)\r\n- **Author**: \\`pull_request.user.login\\`\r\n- **Base branch**: \\`pull_request.base.ref\\`\r\n- **Head branch**: \\`pull_request.head.ref\\`\r\n\r\n### Slack Message Trigger - Parse Natural Language\r\n\r\nIf trigger is SLACK_MESSAGE:\r\n- **Message text**: \\`event.text\\`\r\n- **Channel**: \\`event.channel\\` (for posting results)\r\n- **User**: \\`event.user\\` (requester)\r\n- **Thread**: \\`event.thread_ts\\` or \\`event.ts\\` (for threading replies)\r\n\r\n**Extract references from text:**\r\n- PR numbers: \"#123\", \"PR 123\", \"pull request 123\"\r\n- Issue IDs: \"PROJ-456\", \"BUG-123\"\r\n- URLs: GitHub PR links, deployment URLs\r\n- Feature names: Quoted terms, capitalized phrases\r\n- Environments: \"staging\", \"production\", \"preview\"\r\n\r\n### CI/CD Trigger - Read CI Environment\r\n\r\nIf trigger is CI_CD:\r\n- **CI platform**: Read \\`CI\\` env var\r\n- **Branch**: \\`GITHUB_REF\\` -> extract branch name\r\n- **Commit**: \\`GITHUB_SHA\\`\r\n- **Base branch**: \\`GITHUB_BASE_REF\\` (for PRs)\r\n- **Changed files**: Run \\`git diff --name-only $BASE_SHA...$HEAD_SHA\\`\r\n\r\n### Manual Trigger - Parse User Input\r\n\r\nIf trigger is MANUAL:\r\n- **GitHub PR URL**: Parse to extract PR number, then fetch details via API\r\n- **Issue identifier**: Extract issue ID (patterns: \"PROJ-123\", \"#456\", \"BUG-789\")\r\n- **Feature description**: Use text as-is for verification context\r\n- **Deployment URL**: Extract for testing environment\r\n\r\n### Unified Context Structure\r\n\r\nAfter extraction, create unified context structure:\r\n\\`\\`\\`\r\nCHANGE_CONTEXT = {\r\n trigger: [GITHUB_PR | SLACK_MESSAGE | CI_CD | MANUAL],\r\n title: \"...\",\r\n description: \"...\",\r\n changedFiles: [\"src/pages/Login.tsx\", ...],\r\n author: \"...\",\r\n environment: \"staging\" | \"production\" | URL,\r\n prNumber: 123 (if available),\r\n issueId: \"PROJ-456\" (if available),\r\n slackChannel: \"C123456\" (if Slack trigger),\r\n slackThread: \"1234567890.123456\" (if Slack trigger),\r\n githubRepo: \"owner/repo\" (if GitHub trigger)\r\n}\r\n\\`\\`\\``,\r\n },\r\n // Step 6b: Retrieve Code Change Details (conditional - changelog-historian)\r\n {\r\n inline: true,\r\n title: 'Retrieve Code Change Details',\r\n content: `{{INVOKE_CHANGELOG_HISTORIAN}} to gather comprehensive context about recent code changes:\r\n\r\nExplore version control history related to the verification scope.\r\n\r\nSpecifically gather:\r\n- Recent changes merged to the target branch\r\n- Change authors and contributors\r\n- Scope and impact of each change\r\n- Change descriptions and rationale\r\n- Related issues or tickets\r\n- Files and components affected\r\n\r\nThe agent will:\r\n1. Check its memory for previously discovered repository context\r\n2. Explore version control for relevant changes\r\n3. Build comprehensive understanding of the change history\r\n4. Return synthesized change information\r\n\r\nUse this information to:\r\n- Identify which changes may have caused test failures\r\n- Understand the scope and risk of the changes\r\n- Enhance the verification report with change attribution\r\n- Provide better context for manual verification checklist`,\r\n conditionalOnSubagent: 'changelog-historian',\r\n },\r\n // Step 7: Determine Test Scope (inline)\r\n {\r\n inline: true,\r\n title: 'Determine Test Scope (Smart Selection)',\r\n content: `**IMPORTANT**: You do NOT have access to code files. Infer test scope from change **descriptions** only.\r\n\r\nBased on PR title, description, and commit messages, intelligently select which tests to run:\r\n\r\n### Infer Test Scope from Change Descriptions\r\n\r\nAnalyze the change description to identify affected feature areas:\r\n\r\n**Example mappings from descriptions to test suites:**\r\n\r\n| Description Keywords | Inferred Test Scope | Example |\r\n|---------------------|-------------------|---------|\r\n| \"login\", \"authentication\", \"sign in/up\" | Auth test suite | \"Fix login page validation\" -> Auth tests |\r\n| \"checkout\", \"payment\", \"purchase\" | Checkout test suite | \"Optimize checkout flow\" -> Checkout tests |\r\n| \"cart\", \"shopping cart\", \"add to cart\" | Cart test suite | \"Update cart calculations\" -> Cart tests |\r\n| \"API\", \"endpoint\", \"backend\" | API test suites | \"Add new user API endpoint\" -> User API tests |\r\n| \"profile\", \"account\", \"settings\" | Profile/settings test suite | \"Profile page redesign\" -> Profile tests |\r\n\r\n**Inference strategy:**\r\n1. **Extract feature keywords** from PR title and description\r\n2. **Analyze commit messages** for conventional commit scopes\r\n3. **Map keywords to test organization**\r\n4. **Identify test scope breadth from description tone**\r\n\r\n### Fallback Strategies Based on Description Analysis\r\n\r\n**Description patterns that indicate full suite:**\r\n- \"Refactor shared/common utilities\" (wide impact)\r\n- \"Update dependencies\" or \"Upgrade framework\" (safety validation)\r\n- \"Merge main into feature\" or \"Sync with main\" (comprehensive validation)\r\n- \"Breaking changes\" or \"Major version update\" (thorough testing)\r\n- \"Database migration\" or \"Schema changes\" (data integrity)\r\n\r\n**Description patterns that indicate smoke tests only:**\r\n- \"Fix typo\" or \"Update copy/text\" (cosmetic change)\r\n- \"Update README\" or \"Documentation only\" (no functional change)\r\n- \"Fix formatting\" or \"Linting fixes\" (no logic change)\r\n\r\n**When description is vague or ambiguous:**\r\n- **ACTION REQUIRED**: Use AskUserQuestion tool to clarify test scope\r\n\r\n**If specific test scope requested:**\r\n- User can override with: \"only smoke tests\", \"full suite\", specific test suite names\r\n- Honor user's explicit scope over smart selection\r\n\r\n### Test Selection Summary\r\n\r\nGenerate summary of test selection based on description analysis:\r\n\\`\\`\\`markdown\r\n### Test Scope Determined\r\n- **Change description**: [PR title or summary]\r\n- **Identified keywords**: [list extracted keywords: \"auth\", \"checkout\", etc.]\r\n- **Affected test suites**: [list inferred test suite paths or names]\r\n- **Scope reasoning**: [explain why this scope was selected]\r\n- **Execution strategy**: [smart selection | full suite | smoke tests | user-specified]\r\n\\`\\`\\``,\r\n },\r\n // Step 7b: Create Tests for Coverage Gaps (conditional - test-code-generator)\r\n {\r\n inline: true,\r\n title: 'Create Tests for Coverage Gaps',\r\n content: `If the test scope analysis found that existing tests do NOT cover the changed feature:\r\n\r\n### Identify Coverage Gaps\r\n\r\nCompare:\r\n- **Changed feature**: What the Jira issue / PR describes\r\n- **Existing tests**: What test specs already exist in tests/specs/\r\n\r\nIf there are NO automated tests covering the new/changed feature:\r\n\r\n### Create Manual Test Cases\r\n\r\nCreate or update test case files in \\`./test-cases/\\` for the new feature:\r\n- One file per test scenario (e.g., \\`test-cases/TC-XXX-checkout-improved.md\\`)\r\n- Include: objective, preconditions, test steps, expected results\r\n- Mark \\`automated: true\\` for scenarios that should be automated\r\n\r\n### Handle Missing Test Data\r\n\r\nIf the Jira issue or PR references test accounts/data (e.g., TEST_PREMIUM_USER, TEST_ADMIN_PASSWORD) that don't exist in \\`.env.testdata\\`:\r\n\r\n1. **DO NOT skip test creation** — missing data is not a blocker for writing tests\r\n2. Add placeholder entries to \\`.env.testdata\\` for non-secret variables (empty value with comment)\r\n3. Reference all variables as \\`process.env.VAR_NAME\\` in test code — they'll resolve at runtime\r\n4. Create the test cases and specs normally — tests may fail until data is configured, which is expected\r\n5. {{INVOKE_TEAM_COMMUNICATOR}} to notify the team about missing test data that needs to be configured\r\n6. Include in the Slack message: which variables are missing, what values they need, and which tests depend on them\r\n\r\n**CRITICAL**: Never conclude \"manual verification required\" or \"BLOCKED\" solely because test data is missing. Always create the test artifacts first.\r\n\r\n### Generate Automated Test Specs\r\n\r\n{{INVOKE_TEST_CODE_GENERATOR}} to create automated test specs:\r\n- Read the manual test cases you just created\r\n- Explore the feature in the browser to discover selectors and flows\r\n- Create page objects in the directory specified by \\`./tests/CLAUDE.md\\`\r\n- Create test specs in the directory specified by \\`./tests/CLAUDE.md\\`\r\n- Run each new test to verify it passes\r\n- Update the manual test case with \\`automated_test\\` reference\r\n\r\n### If Tests Already Cover the Feature\r\n\r\nSkip this step — proceed directly to running existing tests.`,\r\n conditionalOnSubagent: 'test-code-generator',\r\n },\r\n // Step 8-11: Test Execution (library steps)\r\n 'run-tests',\r\n 'parse-test-results',\r\n 'triage-failures',\r\n 'fix-test-issues',\r\n // Step 12: Log Product Bugs (conditional library step)\r\n {\r\n stepId: 'log-product-bugs',\r\n conditionalOnSubagent: 'issue-tracker',\r\n },\r\n // Step 13: Generate Manual Verification Checklist (inline)\r\n {\r\n inline: true,\r\n title: 'Generate Manual Verification Checklist',\r\n content: `Generate human-readable checklist for non-automatable scenarios:\r\n\r\n### Analyze Change Context\r\n\r\nReview the provided context to understand what changed:\r\n- Read PR title, description, and commit messages\r\n- Identify change types from descriptions: visual, UX, forms, mobile, accessibility, edge cases\r\n- Understand the scope and impact of changes from the change descriptions\r\n\r\n### Identify Non-Automatable Scenarios\r\n\r\nBased on the change analysis, identify scenarios that require human verification:\r\n\r\n**1. Visual Design Changes** (CSS, styling, design files, graphics)\r\n-> Add **Design Validation** checklist items\r\n\r\n**2. UX Interaction Changes** (animations, transitions, gestures, micro-interactions)\r\n-> Add **UX Feel** checklist items\r\n\r\n**3. Form and Input Changes** (new form fields, input validation, user input)\r\n-> Add **Accessibility** checklist items\r\n\r\n**4. Mobile and Responsive Changes** (media queries, touch interactions, viewport)\r\n-> Add **Mobile Experience** checklist items\r\n\r\n**5. Low ROI or Rare Scenarios** (edge cases, one-time migrations, rare user paths)\r\n-> Add **Exploratory Testing** notes\r\n\r\n### Generate Role-Specific Checklist Items\r\n\r\nFor each identified scenario, create clear, actionable checklist items:\r\n\r\n**Format for each item:**\r\n- Clear, specific task description\r\n- Assigned role (@design-team, @qa-team, @a11y-team, @mobile-team)\r\n- Acceptance criteria (what constitutes pass/fail)\r\n- Reference to standards when applicable (WCAG, iOS HIG, Material Design)\r\n- Priority indicator (red circle critical, yellow circle important, green circle nice-to-have)\r\n\r\n**Example checklist items:**\r\n\r\n**Design Validation (@design-team)**\r\n- [ ] Login button color matches brand guidelines (#FF6B35)\r\n- [ ] Loading spinner animation smooth (60fps, no jank)\r\n\r\n**Accessibility (@a11y-team)**\r\n- [ ] Screen reader announces form errors clearly (tested with VoiceOver/NVDA)\r\n- [ ] Keyboard navigation: Tab through all interactive elements in logical order\r\n- [ ] Color contrast meets WCAG 2.1 AA (4.5:1 for body text, 3:1 for large text)\r\n\r\n**Mobile Experience (@qa-team, @mobile-team)**\r\n- [ ] Touch targets greater than or equal to 44px (iOS Human Interface Guidelines)\r\n- [ ] Mobile keyboard doesn't obscure input fields on iOS/Android\r\n\r\n### When NO Manual Verification Needed\r\n\r\nIf the changes are purely:\r\n- Backend logic (no UI changes)\r\n- Code refactoring (no behavior changes)\r\n- Configuration changes (no user-facing impact)\r\n- Fully covered by automated tests\r\n\r\nOutput:\r\n\\`\\`\\`markdown\r\n**Manual Verification:** Not required for this change.\r\nAll user-facing changes are fully covered by automated tests.\r\n\\`\\`\\``,\r\n },\r\n // Step 14: Aggregate Results (inline)\r\n {\r\n inline: true,\r\n title: 'Aggregate Verification Results',\r\n content: `Combine automated and manual verification results:\r\n\r\n\\`\\`\\`markdown\r\n## Verification Results Summary\r\n\r\n### Automated Tests\r\n- Total tests: [count]\r\n- Passed: [count] ([percentage]%)\r\n- Failed: [count] ([percentage]%)\r\n- Test issues fixed: [count]\r\n- Product bugs logged: [count]\r\n- Duration: [time]\r\n\r\n### Manual Verification Required\r\n[Checklist generated in previous step, or \"Not required\"]\r\n\r\n### Overall Recommendation\r\n[Safe to merge | Review bugs before merging | Do not merge]\r\n\\`\\`\\``,\r\n },\r\n // Step 14b: Post Results to Slack (conditional on team-communicator)\r\n {\r\n inline: true,\r\n title: 'Post Results to Team Channel',\r\n content: `**IMPORTANT — Do this NOW before proceeding to any other step.**\r\n\r\n{{INVOKE_TEAM_COMMUNICATOR}} to post the verification results summary to the team Slack channel.\r\n\r\nInclude in the message:\r\n- What was verified (issue ID and feature name)\r\n- Test results (total / passed / failed)\r\n- New tests created (list file names)\r\n- Manual verification items count\r\n- Overall recommendation (safe to merge / review / block)\r\n- Any blocking issues or critical findings`,\r\n conditionalOnSubagent: 'team-communicator',\r\n },\r\n // Step 15: Documentation Research (conditional library step)\r\n {\r\n stepId: 'gather-documentation',\r\n conditionalOnSubagent: 'documentation-researcher',\r\n },\r\n // Step 16: Report Results (inline)\r\n {\r\n inline: true,\r\n title: 'Report Results (Multi-Channel Output)',\r\n content: `Route output based on trigger source:\r\n\r\n### MANUAL Trigger -> Terminal Output\r\n\r\nFormat as comprehensive markdown report for terminal display with:\r\n- Change Summary (what changed, scope, affected files)\r\n- Automated Test Results (statistics, tests fixed, bugs logged)\r\n- Manual Verification Checklist\r\n- Recommendation (safe to merge / review / do not merge)\r\n- Test Artifacts (JSON report, HTML report, traces, screenshots)\r\n\r\n### SLACK_MESSAGE Trigger -> Thread Reply\r\n\r\n{{INVOKE_TEAM_COMMUNICATOR}} to post concise results to Slack thread with:\r\n- Verification results summary\r\n- Critical failures that need immediate attention\r\n- Bugs logged with issue tracker links\r\n- Manual verification checklist summary\r\n- Recommendation and next steps\r\n- Tag relevant team members for critical issues\r\n\r\n### GITHUB_PR Trigger -> PR Comment\r\n\r\nUse GitHub API to post comprehensive comment on PR with:\r\n- Status (All tests passed / Issues found / Critical failures)\r\n- Automated Tests table (Total, Passed, Failed, Fixed, Bugs, Duration)\r\n- Failed Tests (triaged and with actions taken)\r\n- Tests Fixed Automatically (issue, fix, verified)\r\n- Product Bugs Logged (issue ID, title, test, severity)\r\n- Manual Verification Required (checklist)\r\n- Test Artifacts links\r\n- Recommendation\r\n\r\n### CI_CD Trigger -> Build Log + PR Comment\r\n\r\nOutput to CI build log (print detailed results to stdout) and exit with appropriate code:\r\n- Exit 0: All tests passed (safe to merge)\r\n- Exit 1: Tests failed or critical bugs found (block merge)\r\n\r\nPost PR comment if GitHub context available.`,\r\n conditionalOnSubagent: 'team-communicator',\r\n },\r\n // Step 17: Knowledge Base Update (library)\r\n 'update-knowledge-base',\r\n // Step 18: Handle Special Cases (inline)\r\n {\r\n inline: true,\r\n title: 'Handle Special Cases',\r\n content: `**If no tests found for changed files:** recommend smoke test suite, still generate manual verification checklist.\r\n\r\n**If all tests skipped:** explain why (dependencies, environment), recommend checking configuration.\r\n\r\n**If test execution fails:** report specific error, suggest troubleshooting, don't proceed with triage.`,\r\n },\r\n ],\r\n\r\n requiredSubagents: ['browser-automation', 'test-debugger-fixer'],\r\n optionalSubagents: ['documentation-researcher', 'issue-tracker', 'team-communicator', 'changelog-historian', 'test-code-generator'],\r\n dependentTasks: [],\r\n};\r\n","/**\r\n * Onboard Testing Task (Composed)\r\n * End-to-end workflow: explore → plan → cases → test → fix → report\r\n * Renamed from full-test-coverage to better reflect its purpose as a setup/onboarding task\r\n */\r\n\r\nimport type { ComposedTaskTemplate } from '../steps/types';\r\nimport { TASK_SLUGS } from '../constants';\r\n\r\nexport const onboardTestingTask: ComposedTaskTemplate = {\r\n slug: TASK_SLUGS.ONBOARD_TESTING,\r\n name: 'Onboard Testing',\r\n description:\r\n 'Complete workflow: explore application, generate test plan, create test cases, run tests, fix issues, and report results',\r\n\r\n frontmatter: {\r\n description: 'Complete test coverage workflow - from exploration to passing tests',\r\n 'argument-hint': '<focus-area-or-feature-description>',\r\n },\r\n\r\n steps: [\r\n // Step 1: Overview (inline)\r\n {\r\n inline: true,\r\n title: 'Onboard Testing Overview',\r\n content: `## Overview\r\n\r\nThis command orchestrates the complete test coverage workflow in a single execution:\r\n1. **Phase 1**: Read project context and explore application\r\n2. **Phase 2**: Generate lightweight test plan\r\n3. **Phase 3**: Generate and verify test cases (create + fix until passing)\r\n4. **Phase 4**: Triage failures and fix test issues\r\n5. **Phase 5**: Log product bugs to issue tracker\r\n6. **Phase 6**: Notify team via Slack/Teams with results summary\r\n7. **Phase 7**: Generate final report\r\n\r\n**IMPORTANT**: All phases must be completed. Do NOT skip Phase 5 (bug logging) or Phase 6 (team notification) — these are required deliverables.`,\r\n },\r\n // Step 2: Security Notice (from library)\r\n 'security-notice',\r\n // Step 3: Arguments (inline)\r\n {\r\n inline: true,\r\n title: 'Arguments',\r\n content: `Focus area: $ARGUMENTS`,\r\n },\r\n // Phase 1: Setup\r\n 'load-project-context',\r\n 'read-knowledge-base',\r\n {\r\n stepId: 'gather-documentation',\r\n conditionalOnSubagent: 'documentation-researcher',\r\n },\r\n\r\n // Phase 2: Exploration Protocol\r\n 'exploration-protocol',\r\n\r\n // Execute exploration via browser-automation\r\n 'create-exploration-test-case',\r\n 'run-exploration',\r\n 'process-exploration-results',\r\n\r\n // Phase 3: Test Plan Generation\r\n 'generate-test-plan',\r\n 'extract-env-variables',\r\n\r\n // Phase 4: Test Case Generation\r\n 'generate-test-cases',\r\n 'automate-test-cases',\r\n\r\n // Phase 5: Test Execution\r\n 'run-tests',\r\n 'parse-test-results',\r\n\r\n // Phase 6: Triage and Fix (NEW - was missing from full-test-coverage)\r\n 'triage-failures',\r\n 'fix-test-issues',\r\n {\r\n stepId: 'log-product-bugs',\r\n conditionalOnSubagent: 'issue-tracker',\r\n },\r\n\r\n // Phase 7: Reporting and Communication\r\n 'update-knowledge-base',\r\n {\r\n stepId: 'notify-team',\r\n conditionalOnSubagent: 'team-communicator',\r\n },\r\n 'generate-final-report',\r\n ],\r\n\r\n requiredSubagents: ['browser-automation', 'test-code-generator', 'test-debugger-fixer'],\r\n optionalSubagents: ['documentation-researcher', 'team-communicator', 'issue-tracker'],\r\n dependentTasks: ['run-tests', 'generate-test-cases'],\r\n};\r\n","/**\r\n * Explore Application Task (Composed)\r\n * Systematically explore application to discover UI elements, workflows, and behaviors\r\n */\r\n\r\nimport type { ComposedTaskTemplate } from '../steps/types';\r\nimport { TASK_SLUGS } from '../constants';\r\n\r\nexport const exploreApplicationTask: ComposedTaskTemplate = {\r\n slug: TASK_SLUGS.EXPLORE_APPLICATION,\r\n name: 'Explore Application',\r\n description: 'Systematically explore application to discover UI elements, workflows, and behaviors',\r\n\r\n frontmatter: {\r\n description: 'Explore application to discover UI, workflows, and behaviors',\r\n 'argument-hint': '--focus [area] --depth [shallow|deep] --system [name]',\r\n },\r\n\r\n steps: [\r\n // Step 1: Overview (inline)\r\n {\r\n inline: true,\r\n title: 'Explore Application Overview',\r\n content: `Discover actual UI elements, workflows, and behaviors using the browser-automation agent. Updates test plan and project documentation with findings.`,\r\n },\r\n // Step 2: Security Notice (from library)\r\n 'security-notice',\r\n // Step 3: Arguments (inline)\r\n {\r\n inline: true,\r\n title: 'Arguments',\r\n content: `**Arguments**: $ARGUMENTS\r\n\r\n**Parse:**\r\n- **focus**: auth, navigation, search, content, admin (default: comprehensive)\r\n- **depth**: shallow (15-20 min) or deep (45-60 min, default)\r\n- **system**: target system (optional for multi-system setups)`,\r\n },\r\n // Setup\r\n 'load-project-context',\r\n 'read-knowledge-base',\r\n\r\n // Exploration Protocol (adaptive depth)\r\n 'exploration-protocol',\r\n\r\n // Execute\r\n 'create-exploration-test-case',\r\n 'run-exploration',\r\n 'process-exploration-results',\r\n\r\n // Update\r\n 'update-exploration-artifacts',\r\n // Team Communication (conditional inline)\r\n {\r\n inline: true,\r\n title: 'Team Communication',\r\n content: `{{INVOKE_TEAM_COMMUNICATOR}} to notify the product team about exploration findings:\r\n\r\n\\`\\`\\`\r\n1. Post an update about exploration completion\r\n2. Summarize key discoveries:\r\n - UI elements and workflows identified\r\n - Behaviors documented\r\n - Areas needing further investigation\r\n3. Share exploration report location\r\n4. Ask for team feedback on findings\r\n5. Use appropriate channel and threading\r\n\\`\\`\\``,\r\n conditionalOnSubagent: 'team-communicator',\r\n },\r\n 'cleanup-temp-files',\r\n 'update-knowledge-base',\r\n ],\r\n\r\n requiredSubagents: ['browser-automation'],\r\n optionalSubagents: ['team-communicator'],\r\n dependentTasks: [],\r\n};\r\n","/**\r\n * Triage Results Task (Composed)\r\n * Analyze externally-submitted test results and triage failures\r\n */\r\n\r\nimport type { ComposedTaskTemplate } from '../steps/types';\r\nimport { TASK_SLUGS } from '../constants';\r\n\r\nexport const triageResultsTask: ComposedTaskTemplate = {\r\n slug: TASK_SLUGS.TRIAGE_RESULTS,\r\n name: 'Triage Results',\r\n description: 'Analyze externally-submitted test results and triage failures as product bugs or test issues',\r\n\r\n frontmatter: {\r\n description: 'Analyze externally-submitted test results and triage failures as product bugs or test issues',\r\n 'argument-hint': '[event payload with test results]',\r\n },\r\n\r\n steps: [\r\n // Step 1: Overview (inline)\r\n {\r\n inline: true,\r\n title: 'Triage Results Overview',\r\n content: `# Triage External Test Results\r\n\r\nAnalyze test results submitted from an external CI pipeline. The results were sent via webhook and are available in the event payload — either as inline data or a URL to download.\r\n\r\n**Goal**: Normalize the results into the standard manifest format, classify each failure as a PRODUCT BUG or TEST ISSUE, and generate a triage report.\r\n\r\nThis task is triggered automatically when test results are submitted to the Bugzy webhook from a CI system (GitHub Actions, GitLab CI, etc.).`,\r\n },\r\n // Step 2: Security Notice (library)\r\n 'security-notice',\r\n // Step 3: Arguments (inline)\r\n {\r\n inline: true,\r\n title: 'Arguments',\r\n content: `Arguments: $ARGUMENTS`,\r\n },\r\n // Step 4: Load Project Context (library)\r\n 'load-project-context',\r\n // Step 5: Knowledge Base Read (library)\r\n 'read-knowledge-base',\r\n // Step 6: Normalize Test Results (library — handles URL/inline results + manifest creation)\r\n 'normalize-test-results',\r\n // Step 7: Triage Failures (existing library step)\r\n 'triage-failures',\r\n // Step 8: Fix Test Issues (library — uses test-debugger-fixer)\r\n 'fix-test-issues',\r\n // Step 9: Log Product Bugs (conditional — requires issue-tracker)\r\n {\r\n stepId: 'log-product-bugs',\r\n conditionalOnSubagent: 'issue-tracker',\r\n },\r\n // Step 10: Update Knowledge Base (library)\r\n 'update-knowledge-base',\r\n // Step 11: Notify Team (conditional — requires team-communicator)\r\n {\r\n stepId: 'notify-team',\r\n conditionalOnSubagent: 'team-communicator',\r\n },\r\n // Step 12: Generate Triage Report (inline)\r\n {\r\n inline: true,\r\n title: 'Generate Triage Report',\r\n content: `## Generate Triage Report\r\n\r\nCreate a structured triage report as the task output. This report is stored in \\`task_executions.result\\` and displayed in the Bugzy dashboard.\r\n\r\n**Report Structure:**\r\n\\`\\`\\`json\r\n{\r\n \"summary\": {\r\n \"total\": <number>,\r\n \"passed\": <number>,\r\n \"failed\": <number>,\r\n \"skipped\": <number>,\r\n \"duration_ms\": <number or null>\r\n },\r\n \"ci_metadata\": {\r\n \"pipeline_url\": \"<from event payload>\",\r\n \"commit_sha\": \"<from event payload>\",\r\n \"branch\": \"<from event payload>\"\r\n },\r\n \"triage\": {\r\n \"product_bugs\": [\r\n {\r\n \"test_name\": \"<name>\",\r\n \"error\": \"<brief error>\",\r\n \"reason\": \"<why this is a product bug>\"\r\n }\r\n ],\r\n \"test_issues\": [\r\n {\r\n \"test_name\": \"<name>\",\r\n \"error\": \"<brief error>\",\r\n \"reason\": \"<why this is a test issue>\"\r\n }\r\n ]\r\n }\r\n}\r\n\\`\\`\\`\r\n\r\nOutput this JSON as the final result of the task.`,\r\n },\r\n ],\r\n\r\n requiredSubagents: ['browser-automation', 'test-debugger-fixer'],\r\n optionalSubagents: ['issue-tracker', 'team-communicator'],\r\n dependentTasks: [],\r\n};\r\n","/**\r\n * Explore Test Codebase Task (Composed)\r\n * Analyze an external test repository to understand framework, coverage, and conventions.\r\n * Used for BYOT (Bring Your Own Tests) projects during onboarding.\r\n */\r\n\r\nimport type { ComposedTaskTemplate } from '../steps/types';\r\nimport { TASK_SLUGS } from '../constants';\r\n\r\nexport const exploreTestCodebaseTask: ComposedTaskTemplate = {\r\n slug: TASK_SLUGS.EXPLORE_TEST_CODEBASE,\r\n name: 'Explore Test Codebase',\r\n description: 'Analyze external test repository to understand framework, coverage, and conventions',\r\n\r\n frontmatter: {\r\n description: 'Analyze external test codebase for BYOT onboarding',\r\n 'argument-hint': '--focus [area]',\r\n },\r\n\r\n steps: [\r\n // Step 1: Overview (inline)\r\n {\r\n inline: true,\r\n title: 'Explore Test Codebase Overview',\r\n content: `Analyze the external test repository to understand the testing framework, test coverage, conventions, and codebase structure. This task is triggered during BYOT (Bring Your Own Tests) onboarding to help Bugzy understand the customer's existing test suite.`,\r\n },\r\n // Step 2: Security Notice\r\n 'security-notice',\r\n // Step 3: Arguments (inline)\r\n {\r\n inline: true,\r\n title: 'Arguments',\r\n content: `**Arguments**: $ARGUMENTS\r\n\r\n**Parse:**\r\n- **focus**: specific area to analyze (default: comprehensive)`,\r\n },\r\n // Setup\r\n 'load-project-context',\r\n 'read-knowledge-base',\r\n\r\n // Core analysis\r\n 'analyze-test-codebase',\r\n\r\n // Generate results parser for normalizing test output\r\n 'create-results-parser',\r\n\r\n // Optional: explore the app itself if URL is available\r\n {\r\n inline: true,\r\n title: 'App Exploration (Optional)',\r\n content: `If the project has an app URL configured (check \\`.bugzy/runtime/project-context.md\\` or env vars for TEST_APP_HOST), {{INVOKE_BROWSER_AUTOMATION}} to briefly explore the application:\r\n\r\n1. Navigate to the app URL\r\n2. Identify main navigation and key pages\r\n3. Map discovered features to test coverage from the codebase analysis\r\n4. Note any features that appear untested\r\n\r\nThis step helps correlate what the tests cover with what the application actually contains. Skip if no app URL is available.`,\r\n conditionalOnSubagent: 'browser-automation',\r\n },\r\n\r\n // Generate output\r\n {\r\n inline: true,\r\n title: 'Commit Analysis Results',\r\n content: `Commit all analysis artifacts to the project repository:\r\n\r\n1. The test codebase analysis report (\\`.bugzy/runtime/test-codebase-analysis.md\\`)\r\n2. Any generated CLAUDE.md draft (if the external repo was missing one)\r\n\r\nUse a clear commit message: \"chore: analyze external test codebase\"\r\n\r\nThese artifacts will be available to all future task executions for this project.`,\r\n },\r\n\r\n // Team Communication (conditional)\r\n {\r\n inline: true,\r\n title: 'Team Communication',\r\n content: `{{INVOKE_TEAM_COMMUNICATOR}} to notify the team about the test codebase analysis:\r\n\r\n\\`\\`\\`\r\n1. Post a summary of the analysis findings\r\n2. Include key information:\r\n - Test framework and runner identified\r\n - Number of test files and estimated test cases\r\n - Feature areas covered by existing tests\r\n - Any gaps or areas without test coverage\r\n3. Ask if the analysis looks accurate\r\n4. Use appropriate channel and threading\r\n\\`\\`\\``,\r\n conditionalOnSubagent: 'team-communicator',\r\n },\r\n\r\n // Maintenance\r\n 'update-knowledge-base',\r\n ],\r\n\r\n requiredSubagents: ['browser-automation'],\r\n optionalSubagents: ['team-communicator'],\r\n dependentTasks: [],\r\n};\r\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACiNO,SAAS,aAAa,KAAuC;AAClE,SAAO,OAAO,QAAQ,YAAY,YAAY,OAAO,IAAI,WAAW;AACtE;AAKO,SAAS,sBAAsB,KAAgD;AACpF,SAAO,OAAO,QAAQ,YAAY,YAAY;AAChD;;;ACnNO,IAAM,aAAa;AAAA,EACxB,qBAAqB;AAAA,EACrB,iBAAiB;AAAA,EACjB,qBAAqB;AAAA,EACrB,oBAAoB;AAAA,EACpB,gBAAgB;AAAA,EAChB,eAAe;AAAA,EACf,WAAW;AAAA,EACX,gBAAgB;AAAA,EAChB,gBAAgB;AAAA,EAChB,uBAAuB;AAAA;AAAA,EAEvB,oBAAoB;AACtB;;;ACZO,IAAM,wBAA8C;AAAA,EACzD,MAAM,WAAW;AAAA,EACjB,MAAM;AAAA,EACN,aAAa;AAAA,EAEb,aAAa;AAAA,IACX,aAAa;AAAA,IACb,iBAAiB;AAAA,EACnB;AAAA,EAEA,OAAO;AAAA;AAAA,IAEL;AAAA,MACE,QAAQ;AAAA,MACR,OAAO;AAAA,MAC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AA,MACE,QAAQ;AAAA,MACR,OAAO;AAAA,MACP,SAAS;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAQX;AAAA;AAAA,IAGA;AAAA,MACE,QAAQ;AAAA,MACR,OAAO;AAAA,MACP,SAAS;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAYT,uBAAuB;AAAA,IACzB;AAAA;AAAA,IAGA;AAAA,EACF;AAAA,EAEA,mBAAmB,CAAC,oBAAoB;AAAA,EACxC,mBAAmB,CAAC,mBAAmB;AAAA,EACvC,gBAAgB,CAAC;AACnB;;;AZ1EO,IAAM,iBAAuD;AAAA,EAClE,CAAC,WAAW,mBAAmB,GAAG;AAAA,EAClC,CAAC,WAAW,kBAAkB,GAAG;AAAA,EACjC,CAAC,WAAW,cAAc,GAAG;AAAA,EAC7B,CAAC,WAAW,aAAa,GAAG;AAAA,EAC5B,CAAC,WAAW,SAAS,GAAG;AAAA,EACxB,CAAC,WAAW,cAAc,GAAG;AAAA,EAC7B,CAAC,WAAW,eAAe,GAAG;AAAA,EAC9B,CAAC,WAAW,mBAAmB,GAAG;AAAA,EAClC,CAAC,WAAW,cAAc,GAAG;AAAA,EAC7B,CAAC,WAAW,qBAAqB,GAAG;AACtC;AAKO,SAAS,gBAAgB,MAAgD;AAC9E,SAAO,eAAe,IAAI;AAC5B;AAKO,SAAS,kBAA4B;AAC1C,SAAO,OAAO,KAAK,cAAc;AACnC;AAKO,SAAS,iBAAiB,MAAuB;AACtD,SAAO,eAAe,IAAI,MAAM;AAClC;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../src/tasks/index.ts","../../src/tasks/steps/types.ts","../../src/tasks/constants.ts","../../src/tasks/library/generate-test-cases.ts","../../src/tasks/library/generate-test-plan.ts","../../src/tasks/library/handle-message.ts","../../src/tasks/library/process-event.ts","../../src/tasks/library/run-tests.ts","../../src/tasks/library/verify-changes.ts","../../src/tasks/library/onboard-testing.ts","../../src/tasks/library/explore-application.ts","../../src/tasks/library/triage-results.ts","../../src/tasks/library/explore-test-codebase.ts"],"sourcesContent":["/**\r\n * Tasks Module\r\n * Central registry and utilities for all task templates\r\n */\r\n\r\n// Export types and constants\r\nexport * from './types';\r\nexport * from './constants';\r\n\r\n// Import task templates\r\nimport { generateTestCasesTask } from './library/generate-test-cases';\r\nimport { generateTestPlanTask } from './library/generate-test-plan';\r\nimport { handleMessageTask } from './library/handle-message';\r\nimport { processEventTask } from './library/process-event';\r\nimport { runTestsTask } from './library/run-tests';\r\nimport { verifyChangesTask } from './library/verify-changes';\r\nimport { onboardTestingTask } from './library/onboard-testing';\r\nimport { exploreApplicationTask } from './library/explore-application';\r\nimport { triageResultsTask } from './library/triage-results';\r\nimport { exploreTestCodebaseTask } from './library/explore-test-codebase';\r\n\r\nimport type { ComposedTaskTemplate } from './types';\r\nimport { TASK_SLUGS } from './constants';\r\n\r\n/**\r\n * Task Templates Registry\r\n * All tasks use the step-based composition format\r\n */\r\nexport const TASK_TEMPLATES: Record<string, ComposedTaskTemplate> = {\r\n [TASK_SLUGS.GENERATE_TEST_CASES]: generateTestCasesTask,\r\n [TASK_SLUGS.GENERATE_TEST_PLAN]: generateTestPlanTask,\r\n [TASK_SLUGS.HANDLE_MESSAGE]: handleMessageTask,\r\n [TASK_SLUGS.PROCESS_EVENT]: processEventTask,\r\n [TASK_SLUGS.RUN_TESTS]: runTestsTask,\r\n [TASK_SLUGS.VERIFY_CHANGES]: verifyChangesTask,\r\n [TASK_SLUGS.ONBOARD_TESTING]: onboardTestingTask,\r\n [TASK_SLUGS.EXPLORE_APPLICATION]: exploreApplicationTask,\r\n [TASK_SLUGS.TRIAGE_RESULTS]: triageResultsTask,\r\n [TASK_SLUGS.EXPLORE_TEST_CODEBASE]: exploreTestCodebaseTask,\r\n};\r\n\r\n/**\r\n * Get task template by slug\r\n */\r\nexport function getTaskTemplate(slug: string): ComposedTaskTemplate | undefined {\r\n return TASK_TEMPLATES[slug];\r\n}\r\n\r\n/**\r\n * Get all registered task slugs\r\n */\r\nexport function getAllTaskSlugs(): string[] {\r\n return Object.keys(TASK_TEMPLATES);\r\n}\r\n\r\n/**\r\n * Check if a task slug is registered\r\n */\r\nexport function isTaskRegistered(slug: string): boolean {\r\n return TASK_TEMPLATES[slug] !== undefined;\r\n}\r\n\r\n/**\r\n * Slash Command Configuration for Cloud Run\r\n * Format expected by cloudrun-claude-code API\r\n */\r\nexport interface SlashCommandConfig {\r\n frontmatter: Record<string, any>;\r\n content: string;\r\n}\r\n\r\n","/**\r\n * Step Module Types\r\n * Type definitions for atomic, composable task steps\r\n */\r\n\r\nimport type { TaskFrontmatter } from '../types';\r\n\r\n/**\r\n * Step category for organization and filtering\r\n */\r\nexport type StepCategory =\r\n | 'security' // Security notices and warnings\r\n | 'setup' // Loading context, reading artifacts\r\n | 'exploration' // Exploring the application\r\n | 'clarification' // Handling ambiguity and questions\r\n | 'execution' // Running tests, parsing results\r\n | 'generation' // Creating test plans, cases, code\r\n | 'communication' // Team notifications\r\n | 'maintenance'; // Knowledge base updates, cleanup\r\n\r\n/**\r\n * TaskStep - Atomic, reusable unit of work within a task\r\n *\r\n * Steps are the building blocks of composed tasks. Each step represents\r\n * a discrete piece of work with clear instructions.\r\n */\r\nexport interface TaskStep {\r\n /**\r\n * Unique identifier for the step (kebab-case)\r\n * Examples: 'read-knowledge-base', 'triage-failures', 'run-tests'\r\n */\r\n id: string;\r\n\r\n /**\r\n * Human-readable step title (used in generated markdown headers)\r\n * Examples: 'Read Knowledge Base', 'Triage Failed Tests'\r\n */\r\n title: string;\r\n\r\n /**\r\n * Step category for organization\r\n */\r\n category: StepCategory;\r\n\r\n /**\r\n * Step content - the actual instructions as markdown string.\r\n *\r\n * Supported placeholders:\r\n * - {{STEP_NUMBER}} - Auto-replaced with computed step number during assembly\r\n * - {{INVOKE_*}} - Subagent invocation placeholders (e.g., {{INVOKE_TEST_DEBUGGER_FIXER}})\r\n * - $ARGUMENTS - Task arguments from user input\r\n */\r\n content: string;\r\n\r\n /**\r\n * Optional subagent role this step requires to be included.\r\n * If specified, step is only included when this subagent is configured.\r\n *\r\n * Use for steps that make no sense without the subagent.\r\n * Example: 'log-product-bugs' step requires 'issue-tracker' subagent\r\n */\r\n requiresSubagent?: string;\r\n\r\n /**\r\n * Subagent roles that this step invokes (for MCP derivation).\r\n * Different from requiresSubagent - this lists subagents the step calls\r\n * via {{INVOKE_*}} placeholders, not what makes the step available.\r\n */\r\n invokesSubagents?: string[];\r\n\r\n /**\r\n * Tags for categorization, filtering, and step discovery.\r\n * Examples: ['setup', 'execution', 'optional', 'triage']\r\n */\r\n tags?: string[];\r\n}\r\n\r\n/**\r\n * StepReferenceObject - Reference to a step in STEP_LIBRARY with per-usage configuration\r\n */\r\nexport interface StepReferenceObject {\r\n /**\r\n * The step ID to include from STEP_LIBRARY\r\n */\r\n stepId: string;\r\n\r\n /**\r\n * Override the step title for this specific usage\r\n */\r\n title?: string;\r\n\r\n /**\r\n * Additional content to append after the step\r\n */\r\n appendContent?: string;\r\n\r\n /**\r\n * Make this step conditional on a subagent being configured.\r\n * Different from step's requiresSubagent - this is per-task configuration.\r\n */\r\n conditionalOnSubagent?: string;\r\n}\r\n\r\n/**\r\n * InlineStep - Step with body defined directly in the task definition\r\n * Use for task-specific content like headers, arguments, or unique steps\r\n */\r\nexport interface InlineStep {\r\n /**\r\n * Discriminator to identify inline steps\r\n */\r\n inline: true;\r\n\r\n /**\r\n * Step title (becomes ### Step N: {title})\r\n */\r\n title: string;\r\n\r\n /**\r\n * Step body content (markdown)\r\n */\r\n content: string;\r\n\r\n /**\r\n * Optional category for metadata/filtering\r\n */\r\n category?: StepCategory;\r\n\r\n /**\r\n * Make this step conditional on a subagent being configured\r\n */\r\n conditionalOnSubagent?: string;\r\n}\r\n\r\n/**\r\n * StepReference - How tasks reference steps in their composition\r\n *\r\n * Can be:\r\n * - Simple string (step ID from STEP_LIBRARY)\r\n * - StepReferenceObject (reference with overrides)\r\n * - InlineStep (step with body defined inline)\r\n */\r\nexport type StepReference = string | StepReferenceObject | InlineStep;\r\n\r\n\r\n/**\r\n * ComposedTaskTemplate - Task built from step composition\r\n *\r\n * This is the new task format that replaces monolithic baseContent strings\r\n * with an array of step references.\r\n */\r\nexport interface ComposedTaskTemplate {\r\n /**\r\n * Unique task identifier (kebab-case)\r\n */\r\n slug: string;\r\n\r\n /**\r\n * Human-readable task name\r\n */\r\n name: string;\r\n\r\n /**\r\n * Brief task description\r\n */\r\n description: string;\r\n\r\n /**\r\n * Frontmatter for slash command generation\r\n */\r\n frontmatter: TaskFrontmatter;\r\n\r\n /**\r\n * Ordered list of step references that compose this task.\r\n * Steps are assembled in order with auto-generated step numbers.\r\n */\r\n steps: StepReference[];\r\n\r\n /**\r\n * Required subagents - task fails to build without these.\r\n * Instructions for required subagents should be embedded in step content.\r\n */\r\n requiredSubagents: string[];\r\n\r\n /**\r\n * Optional subagents - enhance task when configured.\r\n * Steps using these are conditionally included.\r\n */\r\n optionalSubagents?: string[];\r\n\r\n /**\r\n * Task slugs that can be invoked during execution.\r\n */\r\n dependentTasks?: string[];\r\n}\r\n\r\n/**\r\n * Normalized step reference (internal use for library steps)\r\n */\r\nexport interface NormalizedStepReference {\r\n stepId: string;\r\n title?: string;\r\n appendContent?: string;\r\n conditionalOnSubagent?: string;\r\n}\r\n\r\n/**\r\n * Type guard to check if a StepReference is an InlineStep\r\n */\r\nexport function isInlineStep(ref: StepReference): ref is InlineStep {\r\n return typeof ref === 'object' && 'inline' in ref && ref.inline === true;\r\n}\r\n\r\n/**\r\n * Type guard to check if a StepReference is a StepReferenceObject\r\n */\r\nexport function isStepReferenceObject(ref: StepReference): ref is StepReferenceObject {\r\n return typeof ref === 'object' && 'stepId' in ref;\r\n}\r\n\r\n/**\r\n * Normalize a step reference to its full object form (for library steps only)\r\n * Returns null for inline steps - use isInlineStep to check first\r\n */\r\nexport function normalizeStepReference(ref: StepReference): NormalizedStepReference | null {\r\n if (isInlineStep(ref)) {\r\n return null; // Inline steps don't normalize to NormalizedStepReference\r\n }\r\n if (typeof ref === 'string') {\r\n return { stepId: ref };\r\n }\r\n return ref as StepReferenceObject;\r\n}\r\n","/**\r\n * Task Slug Constants\r\n * Single source of truth for all task identifiers\r\n *\r\n * These constants should be used throughout the codebase instead of hardcoded strings\r\n * to ensure type safety and prevent typos.\r\n */\r\nexport const TASK_SLUGS = {\r\n EXPLORE_APPLICATION: 'explore-application',\r\n ONBOARD_TESTING: 'onboard-testing',\r\n GENERATE_TEST_CASES: 'generate-test-cases',\r\n GENERATE_TEST_PLAN: 'generate-test-plan',\r\n HANDLE_MESSAGE: 'handle-message',\r\n PROCESS_EVENT: 'process-event',\r\n RUN_TESTS: 'run-tests',\r\n VERIFY_CHANGES: 'verify-changes',\r\n TRIAGE_RESULTS: 'triage-results',\r\n EXPLORE_TEST_CODEBASE: 'explore-test-codebase',\r\n /** @deprecated Use ONBOARD_TESTING instead */\r\n FULL_TEST_COVERAGE: 'onboard-testing',\r\n} as const;\r\n\r\n/**\r\n * Type for task slugs\r\n * Ensures only valid task slugs can be used\r\n */\r\nexport type TaskSlug = typeof TASK_SLUGS[keyof typeof TASK_SLUGS];\r\n","/**\r\n * Generate Test Cases Task (Composed)\r\n * Generate both manual test case documentation AND automated test scripts\r\n */\r\n\r\nimport type { ComposedTaskTemplate } from '../steps/types';\r\nimport { TASK_SLUGS } from '../constants';\r\n\r\nexport const generateTestCasesTask: ComposedTaskTemplate = {\r\n slug: TASK_SLUGS.GENERATE_TEST_CASES,\r\n name: 'Generate Test Cases',\r\n description: 'Generate manual test case documentation AND automated test scripts from test plan',\r\n\r\n frontmatter: {\r\n description: 'Generate manual test case documentation AND automated test scripts from test plan',\r\n 'argument-hint': '--type [exploratory|functional|regression|smoke] --focus [optional-feature]',\r\n },\r\n\r\n steps: [\r\n // Step 1: Overview (inline)\r\n {\r\n inline: true,\r\n title: 'Generate Test Cases Overview',\r\n content: `Generate comprehensive test artifacts including BOTH manual test case documentation AND automated test scripts. Read \\`./tests/CLAUDE.md\\` for framework-specific conventions, directory structure, and commands.\r\n\r\nThis command generates:\r\n1. **Manual Test Case Documentation** (in \\`./test-cases/\\`) - Human-readable test cases in markdown format\r\n2. **Automated Test Scripts** (in directory from \\`./tests/CLAUDE.md\\`) - Executable test scripts\r\n3. **Page Objects** (in directory from \\`./tests/CLAUDE.md\\`) - Reusable page classes for automated tests\r\n4. **Supporting Files** (fixtures, helpers, components) - As needed for test automation`,\r\n },\r\n // Step 2: Security Notice (library)\r\n 'security-notice',\r\n // Step 3: Arguments (inline)\r\n {\r\n inline: true,\r\n title: 'Arguments',\r\n content: `Arguments: $ARGUMENTS\r\n\r\n**Parse Arguments:**\r\nExtract the following from arguments:\r\n- **type**: Test type (exploratory, functional, regression, smoke) - defaults to functional\r\n- **focus**: Optional specific feature or section to focus on`,\r\n },\r\n // Step 4: Load Project Context (library)\r\n 'load-project-context',\r\n // Step 5: Knowledge Base Read (library)\r\n 'read-knowledge-base',\r\n // Step 5: Gather Context (inline)\r\n {\r\n inline: true,\r\n title: 'Gather Context',\r\n content: `**1.1 Read Test Plan**\r\nRead the test plan from \\`test-plan.md\\` to understand:\r\n- Test items and features\r\n- Testing approach and automation strategy\r\n- Test Automation Strategy section (automated vs exploratory)\r\n- Pass/fail criteria\r\n- Test environment and data requirements\r\n- Automation decision criteria\r\n\r\n**1.2 Check Existing Test Cases and Tests**\r\n- List all files in \\`./test-cases/\\` to understand existing manual test coverage\r\n- List existing automated tests in the test directory (see \\`./tests/CLAUDE.md\\` for structure)\r\n- Determine next test case ID (TC-XXX format)\r\n- Identify existing page objects (see \\`./tests/CLAUDE.md\\` for directory)\r\n- Avoid creating overlapping test cases or duplicate automation`,\r\n },\r\n // Step 6: Documentation Researcher (conditional library step)\r\n {\r\n stepId: 'gather-documentation',\r\n conditionalOnSubagent: 'documentation-researcher',\r\n },\r\n // Step 7: Exploration Protocol (from library)\r\n 'exploration-protocol',\r\n // Step 8: Clarification Protocol (from library)\r\n 'clarification-protocol',\r\n // Step 9: Organize Test Scenarios (inline - task-specific)\r\n {\r\n inline: true,\r\n title: 'Organize Test Scenarios by Area',\r\n content: `Based on exploration and documentation, organize test scenarios by feature area/component:\r\n\r\n**Group scenarios into areas** (e.g., Authentication, Dashboard, Checkout, Profile Management):\r\n- Each area should be a logical feature grouping\r\n- Areas should be relatively independent for parallel test execution\r\n- Consider the application's navigation structure and user flows\r\n\r\n**For each area, identify scenarios**:\r\n\r\n1. **Critical User Paths** (must automate as smoke tests):\r\n - Login/authentication flows\r\n - Core feature workflows\r\n - Data creation/modification flows\r\n - Critical business transactions\r\n\r\n2. **Happy Path Scenarios** (automate for regression):\r\n - Standard user workflows\r\n - Common use cases\r\n - Typical data entry patterns\r\n\r\n3. **Error Handling Scenarios** (evaluate automation ROI):\r\n - Validation error messages\r\n - Network error handling\r\n - Permission/authorization errors\r\n\r\n4. **Edge Cases** (consider manual testing):\r\n - Rare scenarios (<1% occurrence)\r\n - Complex exploratory scenarios\r\n - Visual/UX validation requiring judgment\r\n - Features in heavy flux\r\n\r\n**Output**: Test scenarios organized by area with automation decisions for each\r\n\r\nExample structure:\r\n- **Authentication**: TC-001 Valid login (smoke, automate), TC-002 Invalid password (automate), TC-003 Password reset (automate)\r\n- **Dashboard**: TC-004 View dashboard widgets (smoke, automate), TC-005 Filter data by date (automate), TC-006 Export data (manual - rare use)`,\r\n },\r\n // Step 10: Generate Manual Test Cases (inline)\r\n {\r\n inline: true,\r\n title: 'Generate All Manual Test Case Files',\r\n content: `Generate ALL manual test case markdown files in \\`./test-cases/\\` BEFORE invoking the test-code-generator agent.\r\n\r\nCreate files using \\`TC-XXX-feature-description.md\\` format. Follow the format of existing test cases in the directory. If no existing cases exist, include:\r\n- Frontmatter with test case metadata (id, title, type, area, \\`automated: true/false\\`, \\`automated_test:\\` empty)\r\n- Clear test steps with expected results\r\n- Required test data references (use env var names, not values)`,\r\n },\r\n // Step 11: Automate Test Cases (inline - detailed instructions for test-code-generator)\r\n {\r\n inline: true,\r\n title: 'Automate Test Cases Area by Area',\r\n content: `**IMPORTANT**: Process each feature area separately to enable incremental, focused test creation.\r\n\r\n**For each area**, invoke the test-code-generator agent:\r\n\r\n**Prepare Area Context:**\r\nBefore invoking the agent, identify the test cases for the current area:\r\n- Current area name\r\n- Test case files for this area (e.g., TC-001-valid-login.md, TC-002-invalid-password.md)\r\n- Which test cases are marked for automation (automated: true)\r\n- Test type from arguments\r\n- Test plan reference: test-plan.md\r\n- Existing automated tests in ./tests/specs/\r\n- Existing Page Objects in ./tests/pages/\r\n\r\n**Invoke test-code-generator Agent:**\r\n\r\n{{INVOKE_TEST_CODE_GENERATOR}} for the current area with the following context:\r\n\r\n\"Automate test cases for the [AREA_NAME] area.\r\n\r\n**Context:**\r\n- Area: [AREA_NAME]\r\n- Manual test case files to automate: [list TC-XXX files marked with automated: true]\r\n- Test type: {type}\r\n- Test plan: test-plan.md\r\n- Manual test cases directory: ./test-cases/\r\n- Existing automated tests: [directory from ./tests/CLAUDE.md]\r\n- Existing page objects: [directory from ./tests/CLAUDE.md]\r\n\r\n**Knowledge Base Patterns (MUST APPLY):**\r\nInclude 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 — 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.\r\n\r\n**The agent should:**\r\n1. Read the manual test case files for this area\r\n2. Check existing Page Object infrastructure for this area\r\n3. Explore the feature area to understand implementation (gather selectors, URLs, flows)\r\n4. Build missing Page Objects and supporting code\r\n5. For each test case marked \\`automated: true\\`:\r\n - Create automated test in the test directory (from ./tests/CLAUDE.md)\r\n - Update the manual test case file to reference the automated test path\r\n - Apply ALL knowledge base patterns listed above (timing, selectors, assertions)\r\n6. Run and iterate on each test until it passes or fails with a product bug\r\n7. Update .env.testdata with any new variables\r\n\r\n**Focus only on the [AREA_NAME] area** - do not automate tests for other areas yet.\"\r\n\r\n**Verify Area Completion:**\r\nAfter the agent completes the area, verify:\r\n- Manual test case files updated with automated_test references\r\n- Automated tests created for all test cases marked automated: true\r\n- Tests are passing (or failing with documented product bugs)\r\n- Page Objects created/updated for the area\r\n\r\n**Repeat for Next Area:**\r\nMove to the next area and repeat until all areas are complete.\r\n\r\n**Benefits of area-by-area approach**:\r\n- Agent focuses on one feature at a time\r\n- POMs built incrementally as needed\r\n- Tests verified before moving to next area\r\n- Easier to manage and track progress\r\n- Can pause/resume between areas if needed`,\r\n },\r\n // Step 12: Validate Artifacts (library)\r\n 'validate-test-artifacts',\r\n // Step 13: Create Directories (inline)\r\n {\r\n inline: true,\r\n title: 'Create Directories if Needed',\r\n content: `Ensure required directories exist. Create the \\`./test-cases/\\` directory for manual test cases, and create the test directories specified in \\`./tests/CLAUDE.md\\` (test specs, page objects, components, fixtures, helpers).`,\r\n },\r\n // Step 14: Extract Env Variables (library)\r\n 'extract-env-variables',\r\n // Step 15: Knowledge Base Update (library)\r\n 'update-knowledge-base',\r\n // Step 16: Team Communication (conditional inline)\r\n {\r\n inline: true,\r\n title: 'Team Communication',\r\n content: `{{INVOKE_TEAM_COMMUNICATOR}} to share test case and automation results with the team, highlighting coverage areas, automation vs manual-only decisions, and any unresolved clarifications. Ask for team review.`,\r\n conditionalOnSubagent: 'team-communicator',\r\n },\r\n // Step 17: Final Summary (inline)\r\n {\r\n inline: true,\r\n title: 'Final Summary',\r\n 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\\`).`,\r\n },\r\n ],\r\n\r\n requiredSubagents: ['browser-automation', 'test-code-generator'],\r\n optionalSubagents: ['documentation-researcher', 'team-communicator'],\r\n dependentTasks: [],\r\n};\r\n","/**\r\n * Generate Test Plan Task (Composed)\r\n * Generate a comprehensive test plan from product description\r\n */\r\n\r\nimport type { ComposedTaskTemplate } from '../steps/types';\r\nimport { TASK_SLUGS } from '../constants';\r\n\r\nexport const generateTestPlanTask: ComposedTaskTemplate = {\r\n slug: TASK_SLUGS.GENERATE_TEST_PLAN,\r\n name: 'Generate Test Plan',\r\n description: 'Generate a concise feature checklist test plan from product description',\r\n\r\n frontmatter: {\r\n description: 'Generate a concise feature checklist test plan (~50-100 lines)',\r\n 'argument-hint': '<product-description>',\r\n },\r\n\r\n steps: [\r\n // Step 1: Overview (inline)\r\n {\r\n inline: true,\r\n title: 'Generate Test Plan Overview',\r\n content: `Generate a comprehensive test plan from product description following the Brain Module specifications.`,\r\n },\r\n // Step 2: Security Notice (library)\r\n 'security-notice',\r\n // Step 3: Arguments (inline)\r\n {\r\n inline: true,\r\n title: 'Arguments',\r\n content: `Product description: $ARGUMENTS`,\r\n },\r\n // Step 4: Load Project Context (library)\r\n 'load-project-context',\r\n // Step 5: Knowledge Base Read (library)\r\n 'read-knowledge-base',\r\n // Step 6: Process Description (inline)\r\n {\r\n inline: true,\r\n title: 'Process the Product Description',\r\n content: `Use the product description provided directly in the arguments, enriched with project context understanding.`,\r\n },\r\n // Step 7: Initialize Env Tracking (inline)\r\n {\r\n inline: true,\r\n title: 'Initialize Environment Variables Tracking',\r\n content: `Create a list to track all TEST_ prefixed environment variables discovered throughout the process.`,\r\n },\r\n // Step 8: Documentation Researcher (conditional library step)\r\n {\r\n stepId: 'gather-documentation',\r\n conditionalOnSubagent: 'documentation-researcher',\r\n },\r\n // Step 9: Exploration Protocol (from library)\r\n 'exploration-protocol',\r\n // Step 10: Clarification Protocol (from library)\r\n 'clarification-protocol',\r\n // Step 11: Prepare Context (inline)\r\n {\r\n inline: true,\r\n title: 'Prepare Test Plan Generation Context',\r\n content: `**After ensuring requirements are clear through exploration and clarification:**\r\n\r\nBased on the gathered information:\r\n- **goal**: Extract the main purpose and objectives from all available documentation\r\n- **knowledge**: Combine product description with discovered documentation insights\r\n- **testPlan**: Use the standard test plan template structure, enriched with documentation findings\r\n- **gaps**: Identify areas lacking documentation that will need exploration`,\r\n },\r\n // Step 12: Generate Test Plan (inline - more detailed than library step)\r\n {\r\n inline: true,\r\n title: 'Generate Test Plan Using Simplified Format',\r\n content: `You are an expert QA Test Plan Writer. Generate a **concise** test plan (~50-100 lines) that serves as a feature checklist for test case generation.\r\n\r\n**CRITICAL - Keep it Simple:**\r\n- The test plan is a **feature checklist**, NOT a comprehensive document\r\n- Detailed UI elements and exploration findings go to \\`./exploration-reports/\\`\r\n- Technical patterns and architecture go to \\`.bugzy/runtime/knowledge-base.md\\`\r\n- Process documentation stays in \\`.bugzy/runtime/project-context.md\\`\r\n\r\n**Writing Instructions:**\r\n- **Use Product Terminology:** Use exact feature names from the product description\r\n- **Feature Checklist Format:** Each feature is a checkbox item with brief description\r\n- **Group by Feature Area:** Organize features into logical sections\r\n- **NO detailed UI elements** - those belong in exploration reports\r\n- **NO test scenarios** - those are generated in test cases\r\n- **NO process documentation** - keep only what's needed for test generation\r\n\r\n**Test Data Handling:**\r\n- Test data goes ONLY to \\`.env.testdata\\` file\r\n- In test plan, reference environment variable NAMES only (e.g., TEST_BASE_URL)\r\n- DO NOT generate values for env vars, only keys\r\n- Track all TEST_ variables for extraction to .env.testdata in the next step`,\r\n },\r\n // Step 13: Create Test Plan File (inline)\r\n {\r\n inline: true,\r\n title: 'Create Test Plan File',\r\n content: `Read the simplified template from \\`.bugzy/runtime/templates/test-plan-template.md\\` and fill it in:\r\n\r\n1. Read the template file\r\n2. Replace placeholders:\r\n - \\`[PROJECT_NAME]\\` with the actual project name\r\n - \\`[DATE]\\` with the current date\r\n - Feature sections with actual features grouped by area\r\n3. Each feature is a **checkbox item** with brief description\r\n4. **Mark ambiguities:**\r\n - MEDIUM: Mark with [ASSUMED: reason]\r\n - LOW: Mark with [TO BE EXPLORED: detail]\r\n5. Keep total document under 100 lines`,\r\n },\r\n // Step 14: Save Test Plan (inline)\r\n {\r\n inline: true,\r\n title: 'Save Test Plan',\r\n content: `Save to \\`test-plan.md\\` in project root. The template already includes frontmatter - just fill in the dates.`,\r\n },\r\n // Step 15: Extract Env Variables (inline - more detailed than library step)\r\n {\r\n inline: true,\r\n title: 'Extract and Save Environment Variables',\r\n content: `**CRITICAL**: Test data values must ONLY go to .env.testdata, NOT in the test plan document.\r\n\r\nAfter saving the test plan:\r\n\r\n1. **Parse the test plan** to find all TEST_ prefixed environment variables mentioned:\r\n - Look in the Testing Environment section\r\n - Search for any TEST_ variables referenced\r\n - Extract variables from configuration or setup sections\r\n - Common patterns include: TEST_BASE_URL, TEST_USER_*, TEST_API_*, TEST_ADMIN_*, etc.\r\n\r\n2. **Create .env.testdata file** with all discovered variables:\r\n \\`\\`\\`bash\r\n # Application Configuration\r\n TEST_BASE_URL=\r\n\r\n # Test User Credentials\r\n TEST_USER_EMAIL=\r\n TEST_USER_PASSWORD=\r\n TEST_ADMIN_EMAIL=\r\n TEST_ADMIN_PASSWORD=\r\n\r\n # API Configuration\r\n TEST_API_KEY=\r\n TEST_API_SECRET=\r\n\r\n # Other Test Data\r\n TEST_DB_NAME=\r\n TEST_TIMEOUT=\r\n \\`\\`\\`\r\n\r\n3. **Add helpful comments** for each variable group to guide users in filling values\r\n\r\n4. **Save the file** as \\`.env.testdata\\` in the project root\r\n\r\n5. **Verify test plan references .env.testdata**:\r\n - Ensure test plan DOES NOT contain test data values\r\n - Ensure test plan references \\`.env.testdata\\` for test data requirements\r\n - Add instruction: \"Fill in actual values in .env.testdata before running tests\"`,\r\n },\r\n // Step 16: Knowledge Base Update (library)\r\n 'update-knowledge-base',\r\n // Step 17: Team Communication (conditional inline)\r\n {\r\n inline: true,\r\n title: 'Team Communication',\r\n content: `{{INVOKE_TEAM_COMMUNICATOR}} to share the test plan with the team for review, highlighting coverage areas and any unresolved clarifications.`,\r\n conditionalOnSubagent: 'team-communicator',\r\n },\r\n // Step 18: Final Summary (inline)\r\n {\r\n inline: true,\r\n title: 'Final Summary',\r\n content: `Provide a summary of:\r\n- Test plan created successfully at \\`test-plan.md\\`\r\n- Environment variables extracted to \\`.env.testdata\\`\r\n- Number of TEST_ variables discovered\r\n- Instructions for the user to fill in actual values in .env.testdata before running tests`,\r\n },\r\n ],\r\n\r\n requiredSubagents: ['browser-automation'],\r\n optionalSubagents: ['documentation-researcher', 'team-communicator'],\r\n dependentTasks: [],\r\n};\r\n","/**\r\n * Handle Message Task (Composed)\r\n * Handle team responses and Slack communications, maintaining context for ongoing conversations\r\n *\r\n * Slack messages are processed by the LLM layer (lib/slack/llm-processor.ts)\r\n * which routes feedback/general chat to this task via the 'collect_feedback' action.\r\n * This task must be in SLACK_ALLOWED_TASKS to be Slack-callable.\r\n */\r\n\r\nimport type { ComposedTaskTemplate } from '../steps/types';\r\nimport { TASK_SLUGS } from '../constants';\r\n\r\nexport const handleMessageTask: ComposedTaskTemplate = {\r\n slug: TASK_SLUGS.HANDLE_MESSAGE,\r\n name: 'Handle Message',\r\n description: 'Handle team responses and Slack communications, maintaining context for ongoing conversations (LLM-routed)',\r\n\r\n frontmatter: {\r\n description: 'Handle team responses and Slack communications, maintaining context for ongoing conversations',\r\n 'argument-hint': '[slack thread context or team message]',\r\n },\r\n\r\n steps: [\r\n // Step 1: Overview (inline)\r\n {\r\n inline: true,\r\n title: 'Handle Message Overview',\r\n content: `# Handle Message Command\r\n\r\nProcess team responses from Slack threads and handle multi-turn conversations with the product team about testing clarifications, ambiguities, and questions.`,\r\n },\r\n // Step 2: Security Notice (library)\r\n 'security-notice',\r\n // Step 3: Arguments (inline)\r\n {\r\n inline: true,\r\n title: 'Arguments',\r\n content: `Team message/thread context: $ARGUMENTS`,\r\n },\r\n // Step 4: Load Project Context (library)\r\n 'load-project-context',\r\n // Step 5: Knowledge Base Read (library)\r\n 'read-knowledge-base',\r\n // Step 5: Detect Intent (inline - task-specific)\r\n {\r\n inline: true,\r\n title: 'Detect Message Intent and Load Handler',\r\n content: `Before processing the message, identify the intent type to load the appropriate handler.\r\n\r\n#### 0.1 Extract Intent from Event Payload\r\n\r\nCheck the event payload for the \\`intent\\` field provided by the LLM layer:\r\n- If \\`intent\\` is present, use it directly\r\n- Valid intent values: \\`question\\`, \\`feedback\\`, \\`status\\`\r\n\r\n#### 0.2 Fallback Intent Detection (if no intent provided)\r\n\r\nIf intent is not in the payload, detect from message patterns:\r\n\r\n| Condition | Intent |\r\n|-----------|--------|\r\n| Keywords: \"status\", \"progress\", \"how did\", \"results\", \"how many passed\" | \\`status\\` |\r\n| Keywords: \"bug\", \"issue\", \"broken\", \"doesn't work\", \"failed\", \"error\" | \\`feedback\\` |\r\n| Question words: \"what\", \"which\", \"do we have\", \"is there\" about tests/project | \\`question\\` |\r\n| Default (none of above) | \\`feedback\\` |\r\n\r\n#### 0.3 Load Handler File\r\n\r\nBased on detected intent, load the handler from:\r\n\\`.bugzy/runtime/handlers/messages/{intent}.md\\`\r\n\r\n**Handler files:**\r\n- \\`question.md\\` - Questions about tests, coverage, project details\r\n- \\`feedback.md\\` - Bug reports, test observations, general information\r\n- \\`status.md\\` - Status checks on test runs, task progress\r\n\r\n#### 0.4 Follow Handler Instructions\r\n\r\n**IMPORTANT**: The handler file is authoritative for this intent type.\r\n\r\n1. Read the handler file completely\r\n2. Follow its processing steps in order\r\n3. Apply its context loading requirements\r\n4. Use its response guidelines\r\n5. Perform any memory updates it specifies\r\n\r\nThe handler file contains all necessary processing logic for the detected intent type. Each handler includes:\r\n- Specific processing steps for that intent\r\n- Context loading requirements\r\n- Response guidelines\r\n- Memory update instructions`,\r\n },\r\n // Step 6: Post Response via Team Communicator\r\n {\r\n inline: true,\r\n title: 'Post Response to Team',\r\n content: `## Post Response to the Team\r\n\r\nAfter processing the message through the handler and composing your response:\r\n\r\n{{INVOKE_TEAM_COMMUNICATOR}} to post the response back to the team.\r\n\r\n**Context to include in the delegation:**\r\n- The original message/question from the team member\r\n- Your composed response with all gathered data\r\n- Whether this should be a thread reply (if the original message was in a thread) or a new message\r\n- The relevant channel (from project-context.md)\r\n\r\n**Do NOT:**\r\n- Skip posting and just display the response as text output\r\n- Ask the user whether to post — the message came from the team, the response goes back to the team\r\n- Compose a draft without sending it`,\r\n },\r\n // Step 7: Clarification Protocol (for ambiguous intents)\r\n 'clarification-protocol',\r\n // Step 8: Knowledge Base Update (library)\r\n 'update-knowledge-base',\r\n ],\r\n\r\n requiredSubagents: ['team-communicator'],\r\n optionalSubagents: [],\r\n dependentTasks: ['verify-changes'],\r\n};\r\n","/**\r\n * Process Event Task (Composed)\r\n * Process webhook events by analyzing for QA relevance and queuing proposed actions for team confirmation\r\n */\r\n\r\nimport type { ComposedTaskTemplate } from '../steps/types';\r\nimport { TASK_SLUGS } from '../constants';\r\n\r\nexport const processEventTask: ComposedTaskTemplate = {\r\n slug: TASK_SLUGS.PROCESS_EVENT,\r\n name: 'Process Event',\r\n description: 'Process webhook events by analyzing for QA relevance and queuing proposed actions for team confirmation',\r\n\r\n frontmatter: {\r\n description: 'Process webhook events by analyzing for QA relevance and queuing proposed actions for team confirmation',\r\n 'argument-hint': '[event payload or description]',\r\n },\r\n\r\n steps: [\r\n // Step 1: Overview (inline)\r\n {\r\n inline: true,\r\n title: 'Process Event Overview',\r\n content: `# Process Event Command\r\n\r\nProcess webhook events from integrated systems by analyzing event content, determining appropriate QA actions, and queuing them for team confirmation.\r\n\r\n**This task does NOT execute actions directly.** It proposes actions via the blocked-task-queue and notifies the team for confirmation. Only knowledge base updates and event history logging are performed directly.`,\r\n },\r\n // Step 2: Security Notice (library)\r\n 'security-notice',\r\n // Step 3: Arguments (inline)\r\n {\r\n inline: true,\r\n title: 'Arguments',\r\n content: `Arguments: $ARGUMENTS`,\r\n },\r\n // Step 4: Load Project Context (library)\r\n 'load-project-context',\r\n // Step 5: Knowledge Base Read (library)\r\n 'read-knowledge-base',\r\n // Step 5: Understand Event Context (inline)\r\n {\r\n inline: true,\r\n title: 'Understand Event Context',\r\n content: `Events come from integrated external systems via webhooks or manual input. Common sources include:\r\n- **Issue Trackers**: Jira, Linear, GitHub Issues\r\n- **Source Control**: GitHub, GitLab\r\n- **Communication Tools**: Slack\r\n\r\n**Event structure and semantics vary by source.** Use the inline event-action reference patterns and historical context to determine actions.\r\n\r\n#### Event Context to Extract:\r\n- **What happened**: The core event (test failed, PR merged, etc.)\r\n- **Where**: Component, service, or area affected\r\n- **Impact**: How this affects testing strategy\r\n- **Action Required**: What needs to be done in response`,\r\n },\r\n // Step 6: Clarify Unclear Events (inline - task-specific)\r\n {\r\n inline: true,\r\n title: 'Clarify Unclear Events',\r\n content: `If the event information is incomplete or ambiguous, seek clarification before processing:\r\n\r\n#### Detect Unclear Events\r\n\r\nEvents may be unclear in several ways:\r\n- **Vague description**: \"Something broke\", \"issue with login\" (what specifically?)\r\n- **Missing context**: Which component, which environment, which user?\r\n- **Contradictory information**: Event data conflicts with other sources\r\n- **Unknown references**: Mentions unfamiliar features, components, or systems\r\n- **Unclear severity**: Impact or priority is ambiguous\r\n\r\n#### Assess Ambiguity Severity\r\n\r\nClassify the ambiguity level to determine appropriate response:\r\n\r\n**🔴 CRITICAL - STOP and seek clarification:**\r\n- Cannot identify which component is affected\r\n- Event data is contradictory or nonsensical\r\n- Unknown system or feature mentioned\r\n- Cannot determine if this requires immediate action\r\n- Example: Event says \"production is down\" but unclear which service\r\n\r\n**🟠 HIGH - STOP and seek clarification:**\r\n- Vague problem description that could apply to multiple areas\r\n- Missing critical context needed for proper response\r\n- Unclear which team or system is responsible\r\n- Example: \"Login issue reported\" (login button? auth service? session? which page?)\r\n\r\n**🟡 MEDIUM - Proceed with documented assumptions:**\r\n- Some details missing but core event is clear\r\n- Can infer likely meaning from context\r\n- Can proceed but should clarify async\r\n- Example: \"Test failed on staging\" (can assume main staging, but clarify which one)\r\n\r\n**🟢 LOW - Mark and proceed:**\r\n- Minor details missing (optional context)\r\n- Cosmetic or non-critical information gaps\r\n- Can document gap and continue\r\n- Example: Missing timestamp or exact user who reported issue\r\n\r\n#### Clarification Approach by Severity\r\n\r\n**For CRITICAL/HIGH ambiguity:**\r\n1. **{{INVOKE_TEAM_COMMUNICATOR}} to ask specific questions**\r\n2. **WAIT for response before proceeding**\r\n3. **Document the clarification request in event history**\r\n\r\nExample clarification messages:\r\n- \"Event mentions 'login issue' - can you clarify if this is:\r\n • Login button not responding?\r\n • Authentication service failure?\r\n • Session management problem?\r\n • Specific page or global?\"\r\n\r\n- \"Event references component 'XYZ' which is unknown. What system does this belong to?\"\r\n\r\n- \"Event data shows contradictory information: status=success but error_count=15. Which is correct?\"\r\n\r\n**For MEDIUM ambiguity:**\r\n1. **Document assumption** with reasoning\r\n2. **Proceed with processing** based on assumption\r\n3. **Ask for clarification async** (non-blocking)\r\n4. **Mark in event history** for future reference\r\n\r\nExample: [ASSUMED: \"login issue\" refers to login button based on recent similar events]\r\n\r\n**For LOW ambiguity:**\r\n1. **Mark with [TO BE CLARIFIED: detail]**\r\n2. **Continue processing** normally\r\n3. **Document gap** in event history\r\n\r\nExample: [TO BE CLARIFIED: Exact timestamp of when issue was first observed]\r\n\r\n#### Document Clarification Process\r\n\r\nIn event history, record:\r\n- **Ambiguity detected**: What was unclear\r\n- **Severity assessed**: CRITICAL/HIGH/MEDIUM/LOW\r\n- **Clarification requested**: Questions asked (if any)\r\n- **Response received**: Team's clarification\r\n- **Assumption made**: If proceeded with assumption\r\n- **Resolution**: How ambiguity was resolved\r\n\r\nThis ensures future similar events can reference past clarifications and avoid redundant questions.`,\r\n },\r\n // Step 7: Load Context and Memory (inline)\r\n {\r\n inline: true,\r\n title: 'Load Context and Memory',\r\n content: `### Step 2: Load Context and Memory\r\n\r\n#### 2.1 Check Event Processor Memory\r\nRead \\`.bugzy/runtime/memory/event-processor.md\\` to:\r\n- Find similar event patterns\r\n- Load example events with reasoning\r\n- Get system-specific rules\r\n- Retrieve task mapping patterns\r\n\r\n#### 2.2 Check Event History\r\nRead \\`.bugzy/runtime/memory/event-history.md\\` to:\r\n- Ensure event hasn't been processed already (idempotency)\r\n- Find related recent events\r\n- Understand event patterns and trends\r\n\r\n#### 2.3 Read Current State\r\n- Read \\`test-plan.md\\` for current coverage\r\n- List \\`./test-cases/\\` for existing tests\r\n- Check \\`.bugzy/runtime/knowledge-base.md\\` for past insights\r\n\r\n#### 2.4 Knowledge Base: Drafted vs Real Tests (BYOT)\r\n\r\nWhen the project uses an external test repository, maintain two sections in \\`.bugzy/runtime/knowledge-base.md\\`:\r\n\r\n**Drafted Tests** (Open PRs — tests not yet merged):\r\n\\`\\`\\`markdown\r\n### Drafted Tests\r\n| PR | Branch | Tests Added | Status | Date |\r\n|----|--------|-------------|--------|------|\r\n| #12 | bugzy/verify-changes-a1b2c3d4 | login.spec.ts, checkout.spec.ts | Open | 2026-02-13 |\r\n\\`\\`\\`\r\n\r\n**Active Tests** (Merged — tests are part of the test suite):\r\n\\`\\`\\`markdown\r\n### Active Tests\r\n| File | What it tests | Source PR | Merged |\r\n|------|---------------|-----------|--------|\r\n| login.spec.ts | Login flow with valid/invalid credentials | #12 | 2026-02-13 |\r\n\\`\\`\\`\r\n\r\nMove entries from Drafted → Active Tests when PRs are merged. Remove entries when PRs are closed without merge.\r\n\r\n#### 2.5 Event-Action Reference Patterns\r\n\r\nUse these as reference patterns for common events. The webhook routing system already handles events with specific default tasks (e.g., deployment_status → /run-tests). Process-event receives events that need analysis.\r\n\r\n**Jira Events:**\r\n- **Status → \"Ready to Test\" / \"In Testing\" / \"Ready for QA\"**: Propose \\`/verify-changes\\` with issue context\r\n- **Resolution: \"Not a Bug\" / \"Won't Fix\" / \"User Error\"**: Update knowledge base directly with the learning (no queue needed)\r\n- **Bug created with relevant labels**: Propose \\`/generate-test-cases\\` to update related test coverage, confirm with team\r\n- **Backlog → To Do**: No QA action needed, log to event history only\r\n\r\n**GitHub Events:**\r\n- **PR merged (routed to process-event)**: Propose \\`/verify-changes\\` for the merged changes\r\n- **Issue closed as \"won't fix\"**: Update knowledge base directly with the learning\r\n- **Issue created/updated**: Analyze for QA relevance, propose actions if applicable\r\n\r\n**Recall.ai Events (Meeting Transcripts):**\r\n- **QA-relevant content found**: Propose appropriate follow-up tasks (e.g., \\`/generate-test-cases\\`, \\`/verify-changes\\`)\r\n- **No QA content** (HR meeting, offsite planning, etc.): Skip — log to event history only\r\n\r\n**External Test Repo Events** (BYOT - events from the customer's external test repository):\r\n- **PR opened by Bugzy** (\\`com.github.external_repo.pull_request\\`, \\`action: \"opened\"\\`, branch starts with \\`bugzy/\\`):\r\n Log to Knowledge Base under \"Drafted Tests\". No action task needed — just record the PR number, branch, and what tests were added.\r\n- **PR review submitted** (\\`com.github.external_repo.pull_request_review\\`):\r\n If changes were requested → queue \\`/verify-changes\\` with \\`{\"existingPrBranch\": \"{head.ref}\", \"context\": \"PR review feedback: {review.body}\"}\\`.\r\n The execution will iterate on the existing branch, push fixes, and skip PR creation.\r\n- **PR comment** (\\`com.github.external_repo.pull_request_comment\\`):\r\n Read the comment. If it contains actionable feedback, queue \\`/verify-changes\\`\r\n with \\`{\"existingPrBranch\": \"{issue.pull_request.head.ref}\"}\\`.\r\n- **PR merged** (\\`com.github.external_repo.pull_request\\`, \\`action: \"closed\"\\`, \\`merged: true\\`):\r\n Update Knowledge Base: move entries from \"Drafted Tests\" to \"Active Tests\". Notify team of new test coverage.\r\n The submodule pointer update happens automatically via the container (\\`updateSubmoduleToLatest\\`).\r\n- **PR closed without merge** (\\`com.github.external_repo.pull_request\\`, \\`action: \"closed\"\\`, \\`merged: false\\`):\r\n Remove from Knowledge Base \"Drafted Tests\". Notify team that tests were rejected.\r\n- **Direct push to main** (\\`com.github.external_repo.push\\`, ref is main/master):\r\n Update Knowledge Base if test files were affected. Submodule pointer update is automatic.\r\n\r\n**Other Events:**\r\n- Analyze for QA relevance based on knowledge base and project context\r\n- If action needed, propose appropriate task. If not, log and skip.\r\n\r\nCheck \\`.bugzy/runtime/project-context.md\\` for project-specific context that may inform action decisions.`,\r\n },\r\n // Step 8: Intelligent Event Analysis (inline)\r\n {\r\n inline: true,\r\n title: 'Intelligent Event Analysis',\r\n content: `### Step 3: Intelligent Event Analysis\r\n\r\n#### 3.1 Contextual Pattern Analysis\r\nDon't just match patterns - analyze the event within the full context:\r\n\r\n**Combine Multiple Signals**:\r\n- Event details + Historical patterns from memory\r\n- Current test plan state + Knowledge base\r\n- External system status + Team activity\r\n- Business priorities + Risk assessment\r\n\r\n**Example Contextual Analysis**:\r\n\\`\\`\\`\r\nEvent: Jira issue PROJ-456 moved to \"Ready for QA\"\r\n+ Reference Pattern: \"Ready for QA\" status suggests /verify-changes\r\n+ History: This issue was previously in \"In Progress\" for 3 days\r\n+ Knowledge: Related PR #123 merged yesterday\r\n= Decision: Propose /verify-changes with issue context and PR reference\r\n\\`\\`\\`\r\n\r\n**Pattern Recognition with Context**:\r\n- An issue resolution depends on the event-action reference patterns and project context\r\n- A duplicate event (same issue, same transition) should be skipped\r\n- Events from different sources about the same change should be correlated\r\n\r\n#### 3.2 Generate Semantic Queries\r\nBased on event type and content, generate 3-5 specific search queries:\r\n- Search for similar past events\r\n- Look for related test cases\r\n- Find relevant documentation\r\n- Check for known issues`,\r\n },\r\n // Step 9: Documentation Research (conditional library step)\r\n {\r\n stepId: 'gather-documentation',\r\n conditionalOnSubagent: 'documentation-researcher',\r\n },\r\n // Step 10: Task Planning (inline)\r\n {\r\n inline: true,\r\n title: 'Task Planning with Reasoning',\r\n content: `### Step 4: Task Planning with Reasoning\r\n\r\nGenerate tasks based on event analysis, using examples from memory as reference.\r\n\r\n#### Task Generation Logic:\r\nAnalyze the event in context of ALL available information to decide what actions to take:\r\n\r\n**Consider the Full Context**:\r\n- What do the event-action reference patterns suggest for this event type?\r\n- How does this relate to current knowledge?\r\n- What's the state of related issues in external systems?\r\n- Is this part of a larger pattern we've been seeing?\r\n- What's the business impact of this event?\r\n\r\n**Contextual Decision Making**:\r\nThe same event type can require different actions based on context:\r\n- If reference pattern suggests verification -> Propose /verify-changes (queue for confirmation)\r\n- If this issue was already processed (check event history) -> Skip to avoid duplicates\r\n- If related PR exists in knowledge base -> Include PR context in proposed actions\r\n- If this is a recurring pattern from the same source -> Consider flagging for review\r\n- If no clear action for this event type -> Analyze context or skip\r\n\r\n**Dynamic Task Selection**:\r\nBased on the contextual analysis, decide which tasks make sense:\r\n- **extract_learning**: When the event reveals something new about the system\r\n- **update_test_plan**: When our understanding of what to test has changed\r\n- **propose_generate_test_cases**: When tests need to reflect new reality (queued for confirmation)\r\n- **report_bug**: When we have a legitimate, impactful, reproducible issue\r\n- **skip_action**: When context shows no action needed (e.g., known issue, already fixed)\r\n\r\nThe key is to use ALL available context - not just react to the event type\r\n\r\n#### Document Reasoning:\r\nFor each task, document WHY it's being executed:\r\n\\`\\`\\`markdown\r\nTask: extract_learning\r\nReasoning: This event reveals a pattern of login failures on Chrome that wasn't previously documented\r\nData: \"Chrome-specific timeout issues with login button\"\r\n\\`\\`\\``,\r\n },\r\n // Step 11: Issue Tracking (conditional inline)\r\n {\r\n inline: true,\r\n title: 'Issue Tracking',\r\n content: `##### For Issue Tracking:\r\n\r\nWhen an issue needs to be tracked (task type: report_bug or update_story):\r\n\r\n{{INVOKE_ISSUE_TRACKER}}\r\n\r\n1. Check for duplicate issues in the tracking system\r\n2. For bugs: Create detailed bug report with:\r\n - Clear, descriptive title\r\n - Detailed description with context\r\n - Step-by-step reproduction instructions\r\n - Expected vs actual behavior\r\n - Environment and configuration details\r\n - Test case reference (if applicable)\r\n - Screenshots or error logs\r\n3. For stories: Update status and add QA comments\r\n4. Track issue lifecycle and maintain categorization\r\n\r\nThe issue-tracker agent will handle all aspects of issue tracking including duplicate detection, story management, QA workflow transitions, and integration with your project management system (Jira, Linear, Notion, etc.).`,\r\n conditionalOnSubagent: 'issue-tracker',\r\n },\r\n // Step 12: Execute Tasks (inline)\r\n {\r\n inline: true,\r\n title: 'Queue Proposed Actions and Notify Team',\r\n content: `### Step 5: Queue Proposed Actions and Notify Team\r\n\r\n#### 5.1 Categorize Determined Actions\r\n\r\nSeparate actions into two categories:\r\n\r\n**Queued Actions** (require team confirmation):\r\n- \\`/verify-changes\\`, \\`/generate-test-cases\\`, \\`/run-tests\\`, \\`/explore-application\\`\r\n- Any task that modifies tests, runs automation, or takes significant action\r\n\r\n**Direct Actions** (execute immediately):\r\n- Knowledge base updates and learnings\r\n- Event history logging\r\n- Event processor memory updates\r\n- Skip decisions\r\n\r\n#### 5.2 Execute Direct Actions\r\n\r\nUpdate \\`.bugzy/runtime/knowledge-base.md\\` directly for learnings (e.g., \"Not a Bug\" resolutions).\r\n\r\n#### 5.3 Queue Action Tasks\r\n\r\nFor each proposed action task, append one row to \\`.bugzy/runtime/blocked-task-queue.md\\`:\r\n\r\n| Task Slug | Question | Original Args |\r\n|-----------|----------|---------------|\r\n| /verify-changes | Verify PROJ-456 changes (moved to Ready for QA)? Related PR #123. | \\`{\"issue\": \"PROJ-456\", \"context\": \"Jira Ready to Test\"}\\` |\r\n\r\nRules:\r\n1. Read file first (create if doesn't exist)\r\n2. Each action gets its own row\r\n3. **Question** must be clear and include enough context for team to decide\r\n4. **Original Args** must include event source, IDs, and relevant context as JSON\r\n\r\n#### 5.4 Notify Team\r\n\r\n{{INVOKE_TEAM_COMMUNICATOR}} to share the outcome:\r\n\r\n**If actions were queued:**\r\n- What event was processed\r\n- What actions are proposed (with brief reasoning)\r\n- These are awaiting confirmation\r\n\r\n**If no actions queued (KB-only update or skip):**\r\n- What event was processed\r\n- What was learned or why it was skipped\r\n- That no action is needed from the team\r\n\r\n#### 5.5 Complete Task\r\n\r\nAfter queuing and notifying, the task is DONE. Do NOT:\r\n- Execute /verify-changes, /run-tests, /generate-test-cases directly\r\n- Wait for team response (messaging infrastructure handles that)\r\n- Create or modify test files\r\n- Run automated tests\r\n\r\n#### 5.6 Update Event Processor Memory\r\nIf new patterns discovered, append to \\`.bugzy/runtime/memory/event-processor.md\\`:\r\n\\`\\`\\`markdown\r\n### Pattern: [New Pattern Name]\r\n**First Seen**: [Date]\r\n**Indicators**: [What identifies this pattern]\r\n**Typical Tasks**: [Common task responses]\r\n**Example**: [This event]\r\n\\`\\`\\`\r\n\r\n#### 5.7 Update Event History\r\nAppend to \\`.bugzy/runtime/memory/event-history.md\\`:\r\n\\`\\`\\`markdown\r\n## [Timestamp] - Event #[ID]\r\n\r\n**Original Input**: [Raw arguments provided]\r\n**Parsed Event**:\r\n\\`\\`\\`yaml\r\ntype: [type]\r\nsource: [source]\r\n[other fields]\r\n\\`\\`\\`\r\n\r\n**Pattern Matched**: [Pattern name or \"New Pattern\"]\r\n**Tasks Executed**:\r\n1. [Task 1] - Reasoning: [Why]\r\n2. [Task 2] - Reasoning: [Why]\r\n\r\n**Files Modified**:\r\n- [List of files]\r\n\r\n**Outcome**: [Success/Partial/Failed]\r\n**Notes**: [Any additional context]\r\n---\r\n\\`\\`\\``,\r\n },\r\n // Step 13: Learning and Maintenance (inline)\r\n {\r\n inline: true,\r\n title: 'Learning from Events',\r\n content: `### Step 6: Learning from Events\r\n\r\nAfter processing, check if this event teaches us something new:\r\n1. Is this a new type of event we haven't seen?\r\n2. Did our task planning work well?\r\n3. Should we update our patterns?\r\n4. Are there trends across recent events?\r\n\r\nIf yes, update the event processor memory with new patterns or refined rules.\r\n\r\n### Step 7: Create Necessary Files\r\n\r\nEnsure all required files and directories exist:\r\n\\`\\`\\`bash\r\nmkdir -p ./test-cases .claude/memory\r\n\\`\\`\\`\r\n\r\nCreate files if they don't exist:\r\n- \\`.bugzy/runtime/knowledge-base.md\\`\r\n- \\`.bugzy/runtime/memory/event-processor.md\\`\r\n- \\`.bugzy/runtime/memory/event-history.md\\``,\r\n },\r\n // Step 14: Knowledge Base Update (library)\r\n 'update-knowledge-base',\r\n ],\r\n\r\n requiredSubagents: ['team-communicator'],\r\n optionalSubagents: ['documentation-researcher', 'issue-tracker'],\r\n dependentTasks: ['verify-changes', 'generate-test-cases', 'run-tests'],\r\n};\r\n","/**\r\n * Run Tests Task (Composed)\r\n * Select and run test cases using the browser-automation agent\r\n */\r\n\r\nimport type { ComposedTaskTemplate } from '../steps/types';\r\nimport { TASK_SLUGS } from '../constants';\r\n\r\nexport const runTestsTask: ComposedTaskTemplate = {\r\n slug: TASK_SLUGS.RUN_TESTS,\r\n name: 'Run Tests',\r\n description: 'Execute automated tests, analyze failures, and fix test issues automatically',\r\n\r\n frontmatter: {\r\n description: 'Execute automated tests, analyze failures, and fix test issues automatically',\r\n 'argument-hint': '[file-pattern|tag|all] (e.g., \"auth\", \"@smoke\", or a specific test file path)',\r\n },\r\n\r\n steps: [\r\n // Step 1: Overview (inline)\r\n {\r\n inline: true,\r\n title: 'Run Tests Overview',\r\n content: `# Run Tests Command\r\n\r\nExecute automated tests, analyze failures using JSON reports, automatically fix test issues, and log product bugs. Read \\`./tests/CLAUDE.md\\` for framework-specific conventions and commands.`,\r\n },\r\n // Step 2: Security Notice (library)\r\n 'security-notice',\r\n // Step 3: Arguments (inline)\r\n {\r\n inline: true,\r\n title: 'Arguments',\r\n content: `Arguments: $ARGUMENTS\r\n\r\n**Parse Arguments:**\r\nExtract the following from arguments:\r\n- **selector**: Test selection criteria\r\n - File pattern: \"auth\" → find matching test files (see \\`./tests/CLAUDE.md\\` for directory structure)\r\n - Tag: \"@smoke\" → runs tests with tag annotation\r\n - Specific file: path to a specific test file\r\n - All tests: \"all\" or \"\" → runs entire test suite`,\r\n },\r\n // Step 4: Load Project Context (library)\r\n 'load-project-context',\r\n // Step 5: Knowledge Base Read (library)\r\n 'read-knowledge-base',\r\n // Step 5: Test Execution Strategy (library)\r\n 'read-test-strategy',\r\n // Step 6: Clarification Protocol (library)\r\n 'clarification-protocol',\r\n // Step 7: Identify Tests (inline - task-specific)\r\n {\r\n inline: true,\r\n title: 'Identify Automated Tests to Run',\r\n content: `#### Understand Test Selection\r\n\r\nRead \\`./tests/CLAUDE.md\\` for the test directory structure, file patterns, and execution commands.\r\n\r\nParse the selector argument to determine which tests to run:\r\n\r\n**File Pattern** (e.g., \"auth\", \"login\"):\r\n- Find matching test files in the test directory specified by \\`./tests/CLAUDE.md\\`\r\n- Example: \"auth\" → finds all test files with \"auth\" in the name\r\n\r\n**Tag** (e.g., \"@smoke\", \"@regression\"):\r\n- Run tests with specific tag annotation using the tag command from \\`./tests/CLAUDE.md\\`\r\n\r\n**Specific File**:\r\n- Run that specific test file using the single-file command from \\`./tests/CLAUDE.md\\`\r\n\r\n**All Tests** (\"all\" or no selector):\r\n- Run entire test suite using the run-all command from \\`./tests/CLAUDE.md\\`\r\n\r\n#### Find Matching Test Files\r\nUse glob patterns to find test files in the directory structure defined by \\`./tests/CLAUDE.md\\`.\r\n\r\n#### Validate Test Files Exist\r\nCheck that at least one test file was found:\r\n- If no tests found, inform user and suggest available tests\r\n- List available test files if selection was unclear\r\n\r\n#### Confirm Selection Before Execution\r\nBefore running tests, confirm the selection with the user if ambiguous:\r\n- **Clear selection** (specific file or tag): Proceed immediately\r\n- **Pattern match** (multiple files): List matching files and ask for confirmation if count > 5\r\n- **No selector** (all tests): Confirm running full suite before executing`,\r\n },\r\n // Step 7-10: Test Execution (library steps)\r\n 'run-tests',\r\n 'normalize-test-results',\r\n 'parse-test-results',\r\n 'triage-failures',\r\n 'fix-test-issues',\r\n // Step 11: Log Product Bugs (conditional - library step)\r\n {\r\n stepId: 'log-product-bugs',\r\n conditionalOnSubagent: 'issue-tracker',\r\n },\r\n // Step 12: Handle Special Cases (inline - reference material, positioned before final action steps)\r\n {\r\n inline: true,\r\n title: 'Handle Special Cases',\r\n content: `#### If No Test Cases Found\r\nIf no test cases match the selection criteria:\r\n1. Inform user that no matching test cases were found\r\n2. List available test cases or suggest running \\`/generate-test-cases\\` first\r\n3. Provide examples of valid selection criteria\r\n\r\n#### If Browser Automation Agent Fails\r\nIf the browser-automation agent encounters issues:\r\n1. Report the specific error\r\n2. Suggest troubleshooting steps\r\n3. Offer to run tests individually if batch execution failed\r\n\r\n#### If Test Cases Are Invalid\r\nIf selected test cases have formatting issues:\r\n1. Report which test cases are invalid\r\n2. Specify what's missing or incorrect\r\n3. Offer to fix the issues or skip invalid tests\r\n\r\n### Important Notes\r\n\r\n**Test Selection Strategy**:\r\n- **Always read** \\`./tests/docs/test-execution-strategy.md\\` before selecting tests\r\n- Default to \\`@smoke\\` tests for fast validation unless user explicitly requests otherwise\r\n- Smoke tests provide 100% manual test case coverage with zero redundancy (~2-5 min)\r\n- Full regression includes intentional redundancy for diagnostic value (~10-15 min)\r\n- Use context keywords from user request to choose appropriate tier\r\n\r\n**Test Execution**:\r\n- Automated tests are executed via bash command, not through agents\r\n- Test execution time varies by tier (see strategy document for details)\r\n- JSON reports provide structured test results for analysis\r\n- Test framework may capture traces, screenshots, and videos on failures (see \\`./tests/CLAUDE.md\\`)\r\n- Test artifacts are stored as defined in \\`./tests/CLAUDE.md\\`\r\n\r\n**Failure Handling**:\r\n- Test failures are automatically triaged (product bugs vs test issues)\r\n- Test issues are automatically fixed by the test-debugger-fixer subagent\r\n- Product bugs are logged via issue tracker after triage\r\n- All results are analyzed for learning opportunities and team communication\r\n- Critical failures trigger immediate team notification\r\n\r\n**Related Documentation**:\r\n- \\`./tests/docs/test-execution-strategy.md\\` - When and why to run specific tests\r\n- \\`./tests/docs/testing-best-practices.md\\` - How to write tests (patterns and anti-patterns)`,\r\n },\r\n // Step 13: Knowledge Base Update (library)\r\n 'update-knowledge-base',\r\n // Step 14: Team Communication (conditional - library step, LAST actionable step)\r\n {\r\n stepId: 'notify-team',\r\n conditionalOnSubagent: 'team-communicator',\r\n },\r\n ],\r\n\r\n requiredSubagents: ['browser-automation', 'test-debugger-fixer'],\r\n optionalSubagents: ['issue-tracker', 'team-communicator'],\r\n dependentTasks: [],\r\n};\r\n","/**\r\n * Verify Changes - Unified Multi-Trigger Task (Composed)\r\n * Single dynamic task that handles all trigger sources: manual, Slack, GitHub PR, CI/CD\r\n *\r\n * This task replaces verify-changes-manual and verify-changes-slack with intelligent\r\n * trigger detection and multi-channel output routing.\r\n */\r\n\r\nimport type { ComposedTaskTemplate } from '../steps/types';\r\nimport { TASK_SLUGS } from '../constants';\r\n\r\nexport const verifyChangesTask: ComposedTaskTemplate = {\r\n slug: TASK_SLUGS.VERIFY_CHANGES,\r\n name: 'Verify Changes',\r\n description: 'Unified verification command for all trigger sources with automated tests and manual checklists',\r\n\r\n frontmatter: {\r\n description: 'Verify code changes with automated tests and manual verification checklists',\r\n 'argument-hint': '[trigger-auto-detected]',\r\n },\r\n\r\n steps: [\r\n // Step 1: Overview (inline)\r\n {\r\n inline: true,\r\n title: 'Verify Changes Overview',\r\n content: `# Verify Changes - Unified Multi-Trigger Workflow\r\n\r\n## Overview\r\n\r\nThis task performs comprehensive change verification with:\r\n- **Automated testing**: Execute automated tests with automatic triage and fixing\r\n- **Manual verification checklists**: Generate role-specific checklists for non-automatable scenarios\r\n- **Multi-trigger support**: Works from manual CLI, Slack messages, GitHub PRs, and CI/CD\r\n- **Smart output routing**: Results formatted and delivered to the appropriate channel`,\r\n },\r\n // Step 2: Security Notice (library)\r\n 'security-notice',\r\n // Step 3: Arguments (inline)\r\n {\r\n inline: true,\r\n title: 'Arguments',\r\n content: `**Input**: $ARGUMENTS\r\n\r\nThe input format determines the trigger source and context extraction strategy.`,\r\n },\r\n // Step 4: Load Project Context (library)\r\n 'load-project-context',\r\n // Step 5: Knowledge Base Read (library)\r\n 'read-knowledge-base',\r\n // Step 5: Detect Trigger Source (inline)\r\n {\r\n inline: true,\r\n title: 'Detect Trigger Source',\r\n content: `Analyze the input format to determine how this task was invoked:\r\n\r\n### Identify Trigger Type\r\n\r\n**GitHub PR Webhook:**\r\n- Input contains \\`pull_request\\` object with structure:\r\n \\`\\`\\`json\r\n {\r\n \"pull_request\": {\r\n \"number\": 123,\r\n \"title\": \"...\",\r\n \"body\": \"...\",\r\n \"changed_files\": [...],\r\n \"base\": { \"ref\": \"main\" },\r\n \"head\": { \"ref\": \"feature-branch\" },\r\n \"user\": { \"login\": \"...\" }\r\n }\r\n }\r\n \\`\\`\\`\r\n-> **Trigger detected: GITHUB_PR**\r\n\r\n**Slack Event:**\r\n- Input contains \\`event\\` object with structure:\r\n \\`\\`\\`json\r\n {\r\n \"eventType\": \"com.slack.message\" or \"com.slack.app_mention\",\r\n \"event\": {\r\n \"type\": \"message\",\r\n \"channel\": \"C123456\",\r\n \"user\": \"U123456\",\r\n \"text\": \"message content\",\r\n \"ts\": \"1234567890.123456\",\r\n \"thread_ts\": \"...\" (optional)\r\n }\r\n }\r\n \\`\\`\\`\r\n-> **Trigger detected: SLACK_MESSAGE**\r\n\r\n**CI/CD Environment:**\r\n- Environment variables present:\r\n - \\`CI=true\\`\r\n - \\`GITHUB_REF\\` (e.g., \"refs/heads/feature-branch\")\r\n - \\`GITHUB_SHA\\` (commit hash)\r\n - \\`GITHUB_BASE_REF\\` (base branch)\r\n - \\`GITHUB_HEAD_REF\\` (head branch)\r\n- Git context available via bash commands\r\n-> **Trigger detected: CI_CD**\r\n\r\n**Manual Invocation:**\r\n- Input is natural language, URL, or issue identifier\r\n- Patterns: \"PR #123\", GitHub URL, \"PROJ-456\", feature description\r\n-> **Trigger detected: MANUAL**\r\n\r\n### Store Trigger Context\r\n\r\nStore the detected trigger for use in output routing:\r\n- Set variable: \\`TRIGGER_SOURCE\\` = [GITHUB_PR | SLACK_MESSAGE | CI_CD | MANUAL]\r\n- This determines output formatting and delivery channel`,\r\n },\r\n // Step 5c: Coverage Gap vs. Ambiguity (inline)\r\n {\r\n inline: true,\r\n title: 'Coverage Gap vs. Ambiguity',\r\n content: `### Coverage Gap vs. Ambiguity\r\n\r\nWhen the trigger indicates a feature is ready for testing (Jira \"Ready to Test\", PR merged, CI/CD):\r\n\r\n**Missing test coverage is a COVERAGE GAP, not an ambiguity.** The trigger asserts the feature exists. Do NOT block based on stale docs or knowledge base gaps. Coverage gaps are handled in \"Create Tests for Coverage Gaps\" below.\r\n\r\n**If you can't find the referenced feature in the browser:** Apply the Clarification Protocol's execution obstacle principle. The authoritative trigger asserts it exists — this is an execution obstacle (wrong role, missing test data, feature flags, env config). PROCEED to create tests, add placeholder env vars, notify team about the access issue. Tests may fail until resolved — that's expected.\r\n\r\n**Only BLOCK if NO authoritative trigger source claims the feature exists** (e.g., vague manual request with no Jira/PR backing).`,\r\n },\r\n // Step 6: Clarification Protocol (library)\r\n 'clarification-protocol',\r\n // Step 7: Extract Context (inline)\r\n {\r\n inline: true,\r\n title: 'Extract Context Based on Trigger',\r\n content: `Based on the detected trigger source, extract relevant context:\r\n\r\n### GitHub PR Trigger - Extract PR Details\r\n\r\nIf trigger is GITHUB_PR:\r\n- **PR number**: \\`pull_request.number\\`\r\n- **Title**: \\`pull_request.title\\`\r\n- **Description**: \\`pull_request.body\\`\r\n- **Changed files**: \\`pull_request.changed_files\\` (array of file paths)\r\n- **Author**: \\`pull_request.user.login\\`\r\n- **Base branch**: \\`pull_request.base.ref\\`\r\n- **Head branch**: \\`pull_request.head.ref\\`\r\n\r\n### Slack Message Trigger - Parse Natural Language\r\n\r\nIf trigger is SLACK_MESSAGE:\r\n- **Message text**: \\`event.text\\`\r\n- **Channel**: \\`event.channel\\` (for posting results)\r\n- **User**: \\`event.user\\` (requester)\r\n- **Thread**: \\`event.thread_ts\\` or \\`event.ts\\` (for threading replies)\r\n\r\n**Extract references from text:**\r\n- PR numbers: \"#123\", \"PR 123\", \"pull request 123\"\r\n- Issue IDs: \"PROJ-456\", \"BUG-123\"\r\n- URLs: GitHub PR links, deployment URLs\r\n- Feature names: Quoted terms, capitalized phrases\r\n- Environments: \"staging\", \"production\", \"preview\"\r\n\r\n### CI/CD Trigger - Read CI Environment\r\n\r\nIf trigger is CI_CD:\r\n- **CI platform**: Read \\`CI\\` env var\r\n- **Branch**: \\`GITHUB_REF\\` -> extract branch name\r\n- **Commit**: \\`GITHUB_SHA\\`\r\n- **Base branch**: \\`GITHUB_BASE_REF\\` (for PRs)\r\n- **Changed files**: Run \\`git diff --name-only $BASE_SHA...$HEAD_SHA\\`\r\n\r\n### Manual Trigger - Parse User Input\r\n\r\nIf trigger is MANUAL:\r\n- **GitHub PR URL**: Parse to extract PR number, then fetch details via API\r\n- **Issue identifier**: Extract issue ID (patterns: \"PROJ-123\", \"#456\", \"BUG-789\")\r\n- **Feature description**: Use text as-is for verification context\r\n- **Deployment URL**: Extract for testing environment\r\n\r\n### Unified Context Structure\r\n\r\nAfter extraction, create unified context structure:\r\n\\`\\`\\`\r\nCHANGE_CONTEXT = {\r\n trigger: [GITHUB_PR | SLACK_MESSAGE | CI_CD | MANUAL],\r\n title: \"...\",\r\n description: \"...\",\r\n changedFiles: [\"src/pages/Login.tsx\", ...],\r\n author: \"...\",\r\n environment: \"staging\" | \"production\" | URL,\r\n prNumber: 123 (if available),\r\n issueId: \"PROJ-456\" (if available),\r\n slackChannel: \"C123456\" (if Slack trigger),\r\n slackThread: \"1234567890.123456\" (if Slack trigger),\r\n githubRepo: \"owner/repo\" (if GitHub trigger)\r\n}\r\n\\`\\`\\``,\r\n },\r\n // Step 6b: Retrieve Code Change Details (conditional - changelog-historian)\r\n {\r\n inline: true,\r\n title: 'Retrieve Code Change Details',\r\n content: `{{INVOKE_CHANGELOG_HISTORIAN}} to gather comprehensive context about recent code changes:\r\n\r\nExplore version control history related to the verification scope.\r\n\r\nSpecifically gather:\r\n- Recent changes merged to the target branch\r\n- Change authors and contributors\r\n- Scope and impact of each change\r\n- Change descriptions and rationale\r\n- Related issues or tickets\r\n- Files and components affected\r\n\r\nThe agent will:\r\n1. Check its memory for previously discovered repository context\r\n2. Explore version control for relevant changes\r\n3. Build comprehensive understanding of the change history\r\n4. Return synthesized change information\r\n\r\nUse this information to:\r\n- Identify which changes may have caused test failures\r\n- Understand the scope and risk of the changes\r\n- Enhance the verification report with change attribution\r\n- Provide better context for manual verification checklist`,\r\n conditionalOnSubagent: 'changelog-historian',\r\n },\r\n // Step 7: Determine Test Scope (inline)\r\n {\r\n inline: true,\r\n title: 'Determine Test Scope (Smart Selection)',\r\n content: `**IMPORTANT**: You do NOT have access to code files. Infer test scope from change **descriptions** only.\r\n\r\nBased on PR title, description, and commit messages, intelligently select which tests to run:\r\n\r\n### Infer Test Scope from Change Descriptions\r\n\r\nAnalyze the change description to identify affected feature areas:\r\n\r\n**Example mappings from descriptions to test suites:**\r\n\r\n| Description Keywords | Inferred Test Scope | Example |\r\n|---------------------|-------------------|---------|\r\n| \"login\", \"authentication\", \"sign in/up\" | Auth test suite | \"Fix login page validation\" -> Auth tests |\r\n| \"checkout\", \"payment\", \"purchase\" | Checkout test suite | \"Optimize checkout flow\" -> Checkout tests |\r\n| \"cart\", \"shopping cart\", \"add to cart\" | Cart test suite | \"Update cart calculations\" -> Cart tests |\r\n| \"API\", \"endpoint\", \"backend\" | API test suites | \"Add new user API endpoint\" -> User API tests |\r\n| \"profile\", \"account\", \"settings\" | Profile/settings test suite | \"Profile page redesign\" -> Profile tests |\r\n\r\n**Inference strategy:**\r\n1. **Extract feature keywords** from PR title and description\r\n2. **Analyze commit messages** for conventional commit scopes\r\n3. **Map keywords to test organization**\r\n4. **Identify test scope breadth from description tone**\r\n\r\n### Fallback Strategies Based on Description Analysis\r\n\r\n**Description patterns that indicate full suite:**\r\n- \"Refactor shared/common utilities\" (wide impact)\r\n- \"Update dependencies\" or \"Upgrade framework\" (safety validation)\r\n- \"Merge main into feature\" or \"Sync with main\" (comprehensive validation)\r\n- \"Breaking changes\" or \"Major version update\" (thorough testing)\r\n- \"Database migration\" or \"Schema changes\" (data integrity)\r\n\r\n**Description patterns that indicate smoke tests only:**\r\n- \"Fix typo\" or \"Update copy/text\" (cosmetic change)\r\n- \"Update README\" or \"Documentation only\" (no functional change)\r\n- \"Fix formatting\" or \"Linting fixes\" (no logic change)\r\n\r\n**When description is vague or ambiguous:**\r\n- **ACTION REQUIRED**: Use AskUserQuestion tool to clarify test scope\r\n\r\n**If specific test scope requested:**\r\n- User can override with: \"only smoke tests\", \"full suite\", specific test suite names\r\n- Honor user's explicit scope over smart selection\r\n\r\n### Test Selection Summary\r\n\r\nGenerate summary of test selection based on description analysis:\r\n\\`\\`\\`markdown\r\n### Test Scope Determined\r\n- **Change description**: [PR title or summary]\r\n- **Identified keywords**: [list extracted keywords: \"auth\", \"checkout\", etc.]\r\n- **Affected test suites**: [list inferred test suite paths or names]\r\n- **Scope reasoning**: [explain why this scope was selected]\r\n- **Execution strategy**: [smart selection | full suite | smoke tests | user-specified]\r\n\\`\\`\\``,\r\n },\r\n // Step 7b: Create Tests for Coverage Gaps (conditional - test-code-generator)\r\n {\r\n inline: true,\r\n title: 'Create Tests for Coverage Gaps',\r\n content: `If the test scope analysis found that existing tests do NOT cover the changed feature:\r\n\r\n### Identify Coverage Gaps\r\n\r\nCompare:\r\n- **Changed feature**: What the Jira issue / PR describes\r\n- **Existing tests**: What test specs already exist in tests/specs/\r\n\r\nIf there are NO automated tests covering the new/changed feature:\r\n\r\n### Create Manual Test Cases\r\n\r\nCreate or update test case files in \\`./test-cases/\\` for the new feature:\r\n- One file per test scenario (e.g., \\`test-cases/TC-XXX-checkout-improved.md\\`)\r\n- Include: objective, preconditions, test steps, expected results\r\n- Mark \\`automated: true\\` for scenarios that should be automated\r\n\r\n### Handle Missing Test Data\r\n\r\nIf the Jira issue or PR references test accounts/data (e.g., TEST_PREMIUM_USER, TEST_ADMIN_PASSWORD) that don't exist in \\`.env.testdata\\`:\r\n\r\n1. **DO NOT skip test creation** — missing data is not a blocker for writing tests\r\n2. Add placeholder entries to \\`.env.testdata\\` for non-secret variables (empty value with comment)\r\n3. Reference all variables as \\`process.env.VAR_NAME\\` in test code — they'll resolve at runtime\r\n4. Create the test cases and specs normally — tests may fail until data is configured, which is expected\r\n5. {{INVOKE_TEAM_COMMUNICATOR}} to notify the team about missing test data that needs to be configured\r\n6. Include in the Slack message: which variables are missing, what values they need, and which tests depend on them\r\n\r\n**CRITICAL**: Never conclude \"manual verification required\" or \"BLOCKED\" solely because test data is missing. Always create the test artifacts first.\r\n\r\n### Generate Automated Test Specs\r\n\r\n{{INVOKE_TEST_CODE_GENERATOR}} to create automated test specs:\r\n- Read the manual test cases you just created\r\n- Explore the feature in the browser to discover selectors and flows\r\n- Create page objects in the directory specified by \\`./tests/CLAUDE.md\\`\r\n- Create test specs in the directory specified by \\`./tests/CLAUDE.md\\`\r\n- Run each new test to verify it passes\r\n- Update the manual test case with \\`automated_test\\` reference\r\n\r\n### If Tests Already Cover the Feature\r\n\r\nSkip this step — proceed directly to running existing tests.`,\r\n conditionalOnSubagent: 'test-code-generator',\r\n },\r\n // Step 8-11: Test Execution (library steps)\r\n 'run-tests',\r\n 'parse-test-results',\r\n 'triage-failures',\r\n 'fix-test-issues',\r\n // Step 12: Log Product Bugs (conditional library step)\r\n {\r\n stepId: 'log-product-bugs',\r\n conditionalOnSubagent: 'issue-tracker',\r\n },\r\n // Step 13: Generate Manual Verification Checklist (inline)\r\n {\r\n inline: true,\r\n title: 'Generate Manual Verification Checklist',\r\n content: `Generate human-readable checklist for non-automatable scenarios:\r\n\r\n### Analyze Change Context\r\n\r\nReview the provided context to understand what changed:\r\n- Read PR title, description, and commit messages\r\n- Identify change types from descriptions: visual, UX, forms, mobile, accessibility, edge cases\r\n- Understand the scope and impact of changes from the change descriptions\r\n\r\n### Identify Non-Automatable Scenarios\r\n\r\nBased on the change analysis, identify scenarios that require human verification:\r\n\r\n**1. Visual Design Changes** (CSS, styling, design files, graphics)\r\n-> Add **Design Validation** checklist items\r\n\r\n**2. UX Interaction Changes** (animations, transitions, gestures, micro-interactions)\r\n-> Add **UX Feel** checklist items\r\n\r\n**3. Form and Input Changes** (new form fields, input validation, user input)\r\n-> Add **Accessibility** checklist items\r\n\r\n**4. Mobile and Responsive Changes** (media queries, touch interactions, viewport)\r\n-> Add **Mobile Experience** checklist items\r\n\r\n**5. Low ROI or Rare Scenarios** (edge cases, one-time migrations, rare user paths)\r\n-> Add **Exploratory Testing** notes\r\n\r\n### Generate Role-Specific Checklist Items\r\n\r\nFor each identified scenario, create clear, actionable checklist items:\r\n\r\n**Format for each item:**\r\n- Clear, specific task description\r\n- Assigned role (@design-team, @qa-team, @a11y-team, @mobile-team)\r\n- Acceptance criteria (what constitutes pass/fail)\r\n- Reference to standards when applicable (WCAG, iOS HIG, Material Design)\r\n- Priority indicator (red circle critical, yellow circle important, green circle nice-to-have)\r\n\r\n**Example checklist items:**\r\n\r\n**Design Validation (@design-team)**\r\n- [ ] Login button color matches brand guidelines (#FF6B35)\r\n- [ ] Loading spinner animation smooth (60fps, no jank)\r\n\r\n**Accessibility (@a11y-team)**\r\n- [ ] Screen reader announces form errors clearly (tested with VoiceOver/NVDA)\r\n- [ ] Keyboard navigation: Tab through all interactive elements in logical order\r\n- [ ] Color contrast meets WCAG 2.1 AA (4.5:1 for body text, 3:1 for large text)\r\n\r\n**Mobile Experience (@qa-team, @mobile-team)**\r\n- [ ] Touch targets greater than or equal to 44px (iOS Human Interface Guidelines)\r\n- [ ] Mobile keyboard doesn't obscure input fields on iOS/Android\r\n\r\n### When NO Manual Verification Needed\r\n\r\nIf the changes are purely:\r\n- Backend logic (no UI changes)\r\n- Code refactoring (no behavior changes)\r\n- Configuration changes (no user-facing impact)\r\n- Fully covered by automated tests\r\n\r\nOutput:\r\n\\`\\`\\`markdown\r\n**Manual Verification:** Not required for this change.\r\nAll user-facing changes are fully covered by automated tests.\r\n\\`\\`\\``,\r\n },\r\n // Step 14: Aggregate Results (inline)\r\n {\r\n inline: true,\r\n title: 'Aggregate Verification Results',\r\n content: `Combine automated and manual verification results:\r\n\r\n\\`\\`\\`markdown\r\n## Verification Results Summary\r\n\r\n### Automated Tests\r\n- Total tests: [count]\r\n- Passed: [count] ([percentage]%)\r\n- Failed: [count] ([percentage]%)\r\n- Test issues fixed: [count]\r\n- Product bugs logged: [count]\r\n- Duration: [time]\r\n\r\n### Manual Verification Required\r\n[Checklist generated in previous step, or \"Not required\"]\r\n\r\n### Overall Recommendation\r\n[Safe to merge | Review bugs before merging | Do not merge]\r\n\\`\\`\\``,\r\n },\r\n // Step 14b: Post Results to Slack (conditional on team-communicator)\r\n {\r\n inline: true,\r\n title: 'Post Results to Team Channel',\r\n content: `**IMPORTANT — Do this NOW before proceeding to any other step.**\r\n\r\n{{INVOKE_TEAM_COMMUNICATOR}} to post the verification results summary to the team Slack channel.\r\n\r\nInclude in the message:\r\n- What was verified (issue ID and feature name)\r\n- Test results (total / passed / failed)\r\n- New tests created (list file names)\r\n- Manual verification items count\r\n- Overall recommendation (safe to merge / review / block)\r\n- Any blocking issues or critical findings`,\r\n conditionalOnSubagent: 'team-communicator',\r\n },\r\n // Step 15: Documentation Research (conditional library step)\r\n {\r\n stepId: 'gather-documentation',\r\n conditionalOnSubagent: 'documentation-researcher',\r\n },\r\n // Step 16: Report Results (inline)\r\n {\r\n inline: true,\r\n title: 'Report Results (Multi-Channel Output)',\r\n content: `Route output based on trigger source:\r\n\r\n### MANUAL Trigger -> Terminal Output\r\n\r\nFormat as comprehensive markdown report for terminal display with:\r\n- Change Summary (what changed, scope, affected files)\r\n- Automated Test Results (statistics, tests fixed, bugs logged)\r\n- Manual Verification Checklist\r\n- Recommendation (safe to merge / review / do not merge)\r\n- Test Artifacts (JSON report, HTML report, traces, screenshots)\r\n\r\n### SLACK_MESSAGE Trigger -> Thread Reply\r\n\r\n{{INVOKE_TEAM_COMMUNICATOR}} to post concise results to Slack thread with:\r\n- Verification results summary\r\n- Critical failures that need immediate attention\r\n- Bugs logged with issue tracker links\r\n- Manual verification checklist summary\r\n- Recommendation and next steps\r\n- Tag relevant team members for critical issues\r\n\r\n### GITHUB_PR Trigger -> PR Comment\r\n\r\nUse GitHub API to post comprehensive comment on PR with:\r\n- Status (All tests passed / Issues found / Critical failures)\r\n- Automated Tests table (Total, Passed, Failed, Fixed, Bugs, Duration)\r\n- Failed Tests (triaged and with actions taken)\r\n- Tests Fixed Automatically (issue, fix, verified)\r\n- Product Bugs Logged (issue ID, title, test, severity)\r\n- Manual Verification Required (checklist)\r\n- Test Artifacts links\r\n- Recommendation\r\n\r\n### CI_CD Trigger -> Build Log + PR Comment\r\n\r\nOutput to CI build log (print detailed results to stdout) and exit with appropriate code:\r\n- Exit 0: All tests passed (safe to merge)\r\n- Exit 1: Tests failed or critical bugs found (block merge)\r\n\r\nPost PR comment if GitHub context available.`,\r\n conditionalOnSubagent: 'team-communicator',\r\n },\r\n // Step 17: Knowledge Base Update (library)\r\n 'update-knowledge-base',\r\n // Step 18: Handle Special Cases (inline)\r\n {\r\n inline: true,\r\n title: 'Handle Special Cases',\r\n content: `**If no tests found for changed files:** recommend smoke test suite, still generate manual verification checklist.\r\n\r\n**If all tests skipped:** explain why (dependencies, environment), recommend checking configuration.\r\n\r\n**If test execution fails:** report specific error, suggest troubleshooting, don't proceed with triage.`,\r\n },\r\n ],\r\n\r\n requiredSubagents: ['browser-automation', 'test-debugger-fixer'],\r\n optionalSubagents: ['documentation-researcher', 'issue-tracker', 'team-communicator', 'changelog-historian', 'test-code-generator'],\r\n dependentTasks: [],\r\n};\r\n","/**\r\n * Onboard Testing Task (Composed)\r\n * End-to-end workflow: explore → plan → cases → test → fix → report\r\n * Renamed from full-test-coverage to better reflect its purpose as a setup/onboarding task\r\n */\r\n\r\nimport type { ComposedTaskTemplate } from '../steps/types';\r\nimport { TASK_SLUGS } from '../constants';\r\n\r\nexport const onboardTestingTask: ComposedTaskTemplate = {\r\n slug: TASK_SLUGS.ONBOARD_TESTING,\r\n name: 'Onboard Testing',\r\n description:\r\n 'Complete workflow: explore application, generate test plan, create test cases, run tests, fix issues, and report results',\r\n\r\n frontmatter: {\r\n description: 'Complete test coverage workflow - from exploration to passing tests',\r\n 'argument-hint': '<focus-area-or-feature-description>',\r\n },\r\n\r\n steps: [\r\n // Step 1: Overview (inline)\r\n {\r\n inline: true,\r\n title: 'Onboard Testing Overview',\r\n content: `## Overview\r\n\r\nThis command orchestrates the complete test coverage workflow in a single execution:\r\n1. **Phase 1**: Read project context and explore application\r\n2. **Phase 2**: Generate lightweight test plan\r\n3. **Phase 3**: Generate and verify test cases (create + fix until passing)\r\n4. **Phase 4**: Triage failures and fix test issues\r\n5. **Phase 5**: Log product bugs to issue tracker\r\n6. **Phase 6**: Notify team via Slack/Teams with results summary\r\n7. **Phase 7**: Generate final report\r\n\r\n**IMPORTANT**: All phases must be completed. Do NOT skip Phase 5 (bug logging) or Phase 6 (team notification) — these are required deliverables.`,\r\n },\r\n // Step 2: Security Notice (from library)\r\n 'security-notice',\r\n // Step 3: Arguments (inline)\r\n {\r\n inline: true,\r\n title: 'Arguments',\r\n content: `Focus area: $ARGUMENTS`,\r\n },\r\n // Phase 1: Setup\r\n 'load-project-context',\r\n 'read-knowledge-base',\r\n {\r\n stepId: 'gather-documentation',\r\n conditionalOnSubagent: 'documentation-researcher',\r\n },\r\n\r\n // Phase 2: Exploration Protocol\r\n 'exploration-protocol',\r\n\r\n // Execute exploration via browser-automation\r\n 'create-exploration-test-case',\r\n 'run-exploration',\r\n 'process-exploration-results',\r\n\r\n // Phase 3: Test Plan Generation\r\n 'generate-test-plan',\r\n 'extract-env-variables',\r\n\r\n // Phase 4: Test Case Generation\r\n 'generate-test-cases',\r\n 'automate-test-cases',\r\n\r\n // Phase 5: Test Execution\r\n 'run-tests',\r\n 'parse-test-results',\r\n\r\n // Phase 6: Triage and Fix (NEW - was missing from full-test-coverage)\r\n 'triage-failures',\r\n 'fix-test-issues',\r\n {\r\n stepId: 'log-product-bugs',\r\n conditionalOnSubagent: 'issue-tracker',\r\n },\r\n\r\n // Phase 7: Reporting and Communication\r\n 'update-knowledge-base',\r\n {\r\n stepId: 'notify-team',\r\n conditionalOnSubagent: 'team-communicator',\r\n },\r\n 'generate-final-report',\r\n ],\r\n\r\n requiredSubagents: ['browser-automation', 'test-code-generator', 'test-debugger-fixer'],\r\n optionalSubagents: ['documentation-researcher', 'team-communicator', 'issue-tracker'],\r\n dependentTasks: ['run-tests', 'generate-test-cases'],\r\n};\r\n","/**\r\n * Explore Application Task (Composed)\r\n * Systematically explore application to discover UI elements, workflows, and behaviors\r\n */\r\n\r\nimport type { ComposedTaskTemplate } from '../steps/types';\r\nimport { TASK_SLUGS } from '../constants';\r\n\r\nexport const exploreApplicationTask: ComposedTaskTemplate = {\r\n slug: TASK_SLUGS.EXPLORE_APPLICATION,\r\n name: 'Explore Application',\r\n description: 'Systematically explore application to discover UI elements, workflows, and behaviors',\r\n\r\n frontmatter: {\r\n description: 'Explore application to discover UI, workflows, and behaviors',\r\n 'argument-hint': '--focus [area] --depth [shallow|deep] --system [name]',\r\n },\r\n\r\n steps: [\r\n // Step 1: Overview (inline)\r\n {\r\n inline: true,\r\n title: 'Explore Application Overview',\r\n content: `Discover actual UI elements, workflows, and behaviors using the browser-automation agent. Updates test plan and project documentation with findings.`,\r\n },\r\n // Step 2: Security Notice (from library)\r\n 'security-notice',\r\n // Step 3: Arguments (inline)\r\n {\r\n inline: true,\r\n title: 'Arguments',\r\n content: `**Arguments**: $ARGUMENTS\r\n\r\n**Parse:**\r\n- **focus**: auth, navigation, search, content, admin (default: comprehensive)\r\n- **depth**: shallow (15-20 min) or deep (45-60 min, default)\r\n- **system**: target system (optional for multi-system setups)`,\r\n },\r\n // Setup\r\n 'load-project-context',\r\n 'read-knowledge-base',\r\n\r\n // Exploration Protocol (adaptive depth)\r\n 'exploration-protocol',\r\n\r\n // Execute\r\n 'create-exploration-test-case',\r\n 'run-exploration',\r\n 'process-exploration-results',\r\n\r\n // Update\r\n 'update-exploration-artifacts',\r\n // Team Communication (conditional inline)\r\n {\r\n inline: true,\r\n title: 'Team Communication',\r\n content: `{{INVOKE_TEAM_COMMUNICATOR}} to notify the product team about exploration findings:\r\n\r\n\\`\\`\\`\r\n1. Post an update about exploration completion\r\n2. Summarize key discoveries:\r\n - UI elements and workflows identified\r\n - Behaviors documented\r\n - Areas needing further investigation\r\n3. Share exploration report location\r\n4. Ask for team feedback on findings\r\n5. Use appropriate channel and threading\r\n\\`\\`\\``,\r\n conditionalOnSubagent: 'team-communicator',\r\n },\r\n 'cleanup-temp-files',\r\n 'update-knowledge-base',\r\n ],\r\n\r\n requiredSubagents: ['browser-automation'],\r\n optionalSubagents: ['team-communicator'],\r\n dependentTasks: [],\r\n};\r\n","/**\r\n * Triage Results Task (Composed)\r\n * Analyze externally-submitted test results and triage failures\r\n */\r\n\r\nimport type { ComposedTaskTemplate } from '../steps/types';\r\nimport { TASK_SLUGS } from '../constants';\r\n\r\nexport const triageResultsTask: ComposedTaskTemplate = {\r\n slug: TASK_SLUGS.TRIAGE_RESULTS,\r\n name: 'Triage Results',\r\n description: 'Analyze externally-submitted test results and triage failures as product bugs or test issues',\r\n\r\n frontmatter: {\r\n description: 'Analyze externally-submitted test results and triage failures as product bugs or test issues',\r\n 'argument-hint': '[event payload with test results]',\r\n },\r\n\r\n steps: [\r\n // Step 1: Overview (inline)\r\n {\r\n inline: true,\r\n title: 'Triage Results Overview',\r\n content: `# Triage External Test Results\r\n\r\nAnalyze test results submitted from an external CI pipeline. The results were sent via webhook and are available in the event payload — either as inline data or a URL to download.\r\n\r\n**Goal**: Normalize the results into the standard manifest format, classify each failure as a PRODUCT BUG or TEST ISSUE, and generate a triage report.\r\n\r\nThis task is triggered automatically when test results are submitted to the Bugzy webhook from a CI system (GitHub Actions, GitLab CI, etc.).`,\r\n },\r\n // Step 2: Security Notice (library)\r\n 'security-notice',\r\n // Step 3: Arguments (inline)\r\n {\r\n inline: true,\r\n title: 'Arguments',\r\n content: `Arguments: $ARGUMENTS`,\r\n },\r\n // Step 4: Load Project Context (library)\r\n 'load-project-context',\r\n // Step 5: Knowledge Base Read (library)\r\n 'read-knowledge-base',\r\n // Step 6: Normalize Test Results (library — handles URL/inline results + manifest creation)\r\n 'normalize-test-results',\r\n // Step 7: Triage Failures (existing library step)\r\n 'triage-failures',\r\n // Step 8: Fix Test Issues (library — uses test-debugger-fixer)\r\n 'fix-test-issues',\r\n // Step 9: Log Product Bugs (conditional — requires issue-tracker)\r\n {\r\n stepId: 'log-product-bugs',\r\n conditionalOnSubagent: 'issue-tracker',\r\n },\r\n // Step 10: Update Knowledge Base (library)\r\n 'update-knowledge-base',\r\n // Step 11: Notify Team (conditional — requires team-communicator)\r\n {\r\n stepId: 'notify-team',\r\n conditionalOnSubagent: 'team-communicator',\r\n },\r\n // Step 12: Generate Triage Report (inline)\r\n {\r\n inline: true,\r\n title: 'Generate Triage Report',\r\n content: `## Generate Triage Report\r\n\r\nCreate a structured triage report as the task output. This report is stored in \\`task_executions.result\\` and displayed in the Bugzy dashboard.\r\n\r\n**Report Structure:**\r\n\\`\\`\\`json\r\n{\r\n \"summary\": {\r\n \"total\": <number>,\r\n \"passed\": <number>,\r\n \"failed\": <number>,\r\n \"skipped\": <number>,\r\n \"duration_ms\": <number or null>\r\n },\r\n \"ci_metadata\": {\r\n \"pipeline_url\": \"<from event payload>\",\r\n \"commit_sha\": \"<from event payload>\",\r\n \"branch\": \"<from event payload>\"\r\n },\r\n \"triage\": {\r\n \"product_bugs\": [\r\n {\r\n \"test_name\": \"<name>\",\r\n \"error\": \"<brief error>\",\r\n \"reason\": \"<why this is a product bug>\"\r\n }\r\n ],\r\n \"test_issues\": [\r\n {\r\n \"test_name\": \"<name>\",\r\n \"error\": \"<brief error>\",\r\n \"reason\": \"<why this is a test issue>\"\r\n }\r\n ]\r\n }\r\n}\r\n\\`\\`\\`\r\n\r\nOutput this JSON as the final result of the task.`,\r\n },\r\n ],\r\n\r\n requiredSubagents: ['browser-automation', 'test-debugger-fixer'],\r\n optionalSubagents: ['issue-tracker', 'team-communicator'],\r\n dependentTasks: [],\r\n};\r\n","/**\r\n * Explore Test Codebase Task (Composed)\r\n * Analyze an external test repository to understand framework, coverage, and conventions.\r\n * Used for BYOT (Bring Your Own Tests) projects during onboarding.\r\n */\r\n\r\nimport type { ComposedTaskTemplate } from '../steps/types';\r\nimport { TASK_SLUGS } from '../constants';\r\n\r\nexport const exploreTestCodebaseTask: ComposedTaskTemplate = {\r\n slug: TASK_SLUGS.EXPLORE_TEST_CODEBASE,\r\n name: 'Explore Test Codebase',\r\n description: 'Analyze external test repository to understand framework, coverage, and conventions',\r\n\r\n frontmatter: {\r\n description: 'Analyze external test codebase for BYOT onboarding',\r\n 'argument-hint': '--focus [area]',\r\n },\r\n\r\n steps: [\r\n // Step 1: Overview (inline)\r\n {\r\n inline: true,\r\n title: 'Explore Test Codebase Overview',\r\n content: `Analyze the external test repository to understand the testing framework, test coverage, conventions, and codebase structure. This task is triggered during BYOT (Bring Your Own Tests) onboarding to help Bugzy understand the customer's existing test suite.`,\r\n },\r\n // Step 2: Security Notice\r\n 'security-notice',\r\n // Step 3: Arguments (inline)\r\n {\r\n inline: true,\r\n title: 'Arguments',\r\n content: `**Arguments**: $ARGUMENTS\r\n\r\n**Parse:**\r\n- **focus**: specific area to analyze (default: comprehensive)`,\r\n },\r\n // Setup\r\n 'load-project-context',\r\n 'read-knowledge-base',\r\n\r\n // Core analysis\r\n 'analyze-test-codebase',\r\n\r\n // Generate results parser for normalizing test output\r\n 'create-results-parser',\r\n\r\n // Optional: explore the app itself if URL is available\r\n {\r\n inline: true,\r\n title: 'App Exploration (Optional)',\r\n content: `If the project has an app URL configured (check \\`.bugzy/runtime/project-context.md\\` or env vars for TEST_APP_HOST), {{INVOKE_BROWSER_AUTOMATION}} to briefly explore the application:\r\n\r\n1. Navigate to the app URL\r\n2. Identify main navigation and key pages\r\n3. Map discovered features to test coverage from the codebase analysis\r\n4. Note any features that appear untested\r\n\r\nThis step helps correlate what the tests cover with what the application actually contains. Skip if no app URL is available.`,\r\n conditionalOnSubagent: 'browser-automation',\r\n },\r\n\r\n // Generate output\r\n {\r\n inline: true,\r\n title: 'Commit Analysis Results',\r\n content: `Commit analysis artifacts to the **parent project repository** (the workspace root).\r\n\r\n**IMPORTANT — Do NOT stage the \\`tests\\` submodule.** The \\`tests/\\` directory is an external git submodule. Any changes made inside it (e.g., \\`reporters/parse-results.ts\\`, \\`tests/CLAUDE.md\\`) will be committed and pushed to the external repo automatically by the post-execution handler. Staging the submodule in the parent would record a local-only commit SHA that doesn't exist on the remote, causing a broken reference.\r\n\r\n**What to commit in the parent repo:**\r\n1. \\`git add .bugzy/\\` — the test codebase analysis report and runtime files\r\n2. Do NOT run \\`git add .\\` or \\`git add tests\\` — this would stage the submodule pointer\r\n3. \\`git commit -m \"chore: analyze external test codebase\"\\`\r\n\r\nThese artifacts will be available to all future task executions for this project.`,\r\n },\r\n\r\n // Team Communication (conditional)\r\n {\r\n inline: true,\r\n title: 'Team Communication',\r\n content: `{{INVOKE_TEAM_COMMUNICATOR}} to notify the team about the test codebase analysis:\r\n\r\n\\`\\`\\`\r\n1. Post a summary of the analysis findings\r\n2. Include key information:\r\n - Test framework and runner identified\r\n - Number of test files and estimated test cases\r\n - Feature areas covered by existing tests\r\n - Any gaps or areas without test coverage\r\n3. Ask if the analysis looks accurate\r\n4. Use appropriate channel and threading\r\n\\`\\`\\``,\r\n conditionalOnSubagent: 'team-communicator',\r\n },\r\n\r\n // Maintenance\r\n 'update-knowledge-base',\r\n ],\r\n\r\n requiredSubagents: ['browser-automation'],\r\n optionalSubagents: ['team-communicator'],\r\n dependentTasks: [],\r\n};\r\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACiNO,SAAS,aAAa,KAAuC;AAClE,SAAO,OAAO,QAAQ,YAAY,YAAY,OAAO,IAAI,WAAW;AACtE;AAKO,SAAS,sBAAsB,KAAgD;AACpF,SAAO,OAAO,QAAQ,YAAY,YAAY;AAChD;;;ACnNO,IAAM,aAAa;AAAA,EACxB,qBAAqB;AAAA,EACrB,iBAAiB;AAAA,EACjB,qBAAqB;AAAA,EACrB,oBAAoB;AAAA,EACpB,gBAAgB;AAAA,EAChB,eAAe;AAAA,EACf,WAAW;AAAA,EACX,gBAAgB;AAAA,EAChB,gBAAgB;AAAA,EAChB,uBAAuB;AAAA;AAAA,EAEvB,oBAAoB;AACtB;;;ACZO,IAAM,wBAA8C;AAAA,EACzD,MAAM,WAAW;AAAA,EACjB,MAAM;AAAA,EACN,aAAa;AAAA,EAEb,aAAa;AAAA,IACX,aAAa;AAAA,IACb,iBAAiB;AAAA,EACnB;AAAA,EAEA,OAAO;AAAA;AAAA,IAEL;AAAA,MACE,QAAQ;AAAA,MACR,OAAO;AAAA,MACP,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