qa-flowkit 0.4.0-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (149) hide show
  1. package/.qa-ai/adapters/aider/.aider/README.md +25 -0
  2. package/.qa-ai/adapters/aider/.aider.conf.yml +6 -0
  3. package/.qa-ai/adapters/claude/agents/qa-workflow-orchestrator.md +18 -0
  4. package/.qa-ai/adapters/claude/commands/qa-add-tests.md +42 -0
  5. package/.qa-ai/adapters/claude/commands/qa-automation-plan.md +43 -0
  6. package/.qa-ai/adapters/claude/commands/qa-clean.md +42 -0
  7. package/.qa-ai/adapters/claude/commands/qa-config.md +51 -0
  8. package/.qa-ai/adapters/claude/commands/qa-coverage.md +46 -0
  9. package/.qa-ai/adapters/claude/commands/qa-doctor.md +11 -0
  10. package/.qa-ai/adapters/claude/commands/qa-full-flow.md +59 -0
  11. package/.qa-ai/adapters/claude/commands/qa-gate.md +36 -0
  12. package/.qa-ai/adapters/claude/commands/qa-help.md +30 -0
  13. package/.qa-ai/adapters/claude/commands/qa-init.md +70 -0
  14. package/.qa-ai/adapters/claude/commands/qa-status.md +56 -0
  15. package/.qa-ai/adapters/claude/commands/qa-update-tests.md +47 -0
  16. package/.qa-ai/adapters/claude/commands/qa-validate-features.md +36 -0
  17. package/.qa-ai/adapters/cline/.cline/README.md +25 -0
  18. package/.qa-ai/adapters/cline/.clinerules +9 -0
  19. package/.qa-ai/adapters/codex/README.md +44 -0
  20. package/.qa-ai/adapters/codex/prompts/implement-project.md +15 -0
  21. package/.qa-ai/adapters/continue/README.md +26 -0
  22. package/.qa-ai/adapters/continue/checks/qa-feature-conventions.md +15 -0
  23. package/.qa-ai/adapters/gemini/GEMINI.md +40 -0
  24. package/.qa-ai/adapters/generic/AGENTS.md +100 -0
  25. package/.qa-ai/adapters/goose/recipes/qa-flowkit.yaml +20 -0
  26. package/.qa-ai/adapters/opencode/README.md +57 -0
  27. package/.qa-ai/adapters/opencode/agents/qa-workflow.md +18 -0
  28. package/.qa-ai/adapters/opencode/commands/qa-add-tests.md +42 -0
  29. package/.qa-ai/adapters/opencode/commands/qa-automation-plan.md +43 -0
  30. package/.qa-ai/adapters/opencode/commands/qa-clean.md +42 -0
  31. package/.qa-ai/adapters/opencode/commands/qa-config.md +51 -0
  32. package/.qa-ai/adapters/opencode/commands/qa-coverage.md +46 -0
  33. package/.qa-ai/adapters/opencode/commands/qa-doctor.md +13 -0
  34. package/.qa-ai/adapters/opencode/commands/qa-full-flow.md +59 -0
  35. package/.qa-ai/adapters/opencode/commands/qa-gate.md +36 -0
  36. package/.qa-ai/adapters/opencode/commands/qa-help.md +30 -0
  37. package/.qa-ai/adapters/opencode/commands/qa-init.md +70 -0
  38. package/.qa-ai/adapters/opencode/commands/qa-status.md +56 -0
  39. package/.qa-ai/adapters/opencode/commands/qa-update-tests.md +47 -0
  40. package/.qa-ai/adapters/opencode/commands/qa-validate-features.md +36 -0
  41. package/.qa-ai/agents/README.md +39 -0
  42. package/.qa-ai/agents/api-testing-agent.md +73 -0
  43. package/.qa-ai/agents/automation-feasibility-agent.md +128 -0
  44. package/.qa-ai/agents/gherkin-test-design-agent.md +110 -0
  45. package/.qa-ai/agents/jira-task-agent.md +92 -0
  46. package/.qa-ai/agents/pr-agent.md +101 -0
  47. package/.qa-ai/agents/qa-context-intake-agent.md +75 -0
  48. package/.qa-ai/agents/qa-workflow-orchestrator.md +113 -0
  49. package/.qa-ai/agents/release-gate-agent.md +50 -0
  50. package/.qa-ai/agents/requirements-intake-agent.md +79 -0
  51. package/.qa-ai/agents/requirements-normalization-agent.md +80 -0
  52. package/.qa-ai/agents/specialists/available/appium.md +59 -0
  53. package/.qa-ai/agents/specialists/available/cypress.md +68 -0
  54. package/.qa-ai/agents/specialists/available/generic-test-design.md +117 -0
  55. package/.qa-ai/agents/specialists/available/jira.md +108 -0
  56. package/.qa-ai/agents/specialists/available/karate.md +97 -0
  57. package/.qa-ai/agents/specialists/available/playwright-api.md +87 -0
  58. package/.qa-ai/agents/specialists/available/playwright-ui.md +87 -0
  59. package/.qa-ai/agents/specialists/available/postman.md +108 -0
  60. package/.qa-ai/agents/specialists/available/rest-assured.md +103 -0
  61. package/.qa-ai/agents/specialists/available/selenium.md +91 -0
  62. package/.qa-ai/agents/specialists/available/testrail.md +85 -0
  63. package/.qa-ai/agents/specialists/available/webdriverio.md +81 -0
  64. package/.qa-ai/agents/test-design-system-agent.md +33 -0
  65. package/.qa-ai/agents/testrail-coverage-agent.md +84 -0
  66. package/.qa-ai/agents/testrail-sync-agent.md +96 -0
  67. package/.qa-ai/agents/webdriverio-implementation-agent.md +84 -0
  68. package/.qa-ai/presets/manual-only.yaml +65 -0
  69. package/.qa-ai/presets/selenium-jest-browserstack.yaml +72 -0
  70. package/.qa-ai/presets/webdriverio-playwright-api.yaml +85 -0
  71. package/.qa-ai/rules/api-testing.rules.md +7 -0
  72. package/.qa-ai/rules/approval.rules.md +8 -0
  73. package/.qa-ai/rules/automation.rules.md +7 -0
  74. package/.qa-ai/rules/gherkin.rules.md +12 -0
  75. package/.qa-ai/rules/testrail.rules.md +10 -0
  76. package/.qa-ai/rules/webdriverio.rules.md +9 -0
  77. package/.qa-ai/scripts/bootstrap-agent-adapters.mjs +127 -0
  78. package/.qa-ai/scripts/clean.mjs +243 -0
  79. package/.qa-ai/scripts/config.mjs +202 -0
  80. package/.qa-ai/scripts/doctor.mjs +383 -0
  81. package/.qa-ai/scripts/init.mjs +447 -0
  82. package/.qa-ai/scripts/lib/markdown-table.mjs +76 -0
  83. package/.qa-ai/scripts/lib/project-config.mjs +184 -0
  84. package/.qa-ai/scripts/lib/qa-next-steps.mjs +578 -0
  85. package/.qa-ai/scripts/lib/release-gate.mjs +66 -0
  86. package/.qa-ai/scripts/lib/test-design.mjs +92 -0
  87. package/.qa-ai/scripts/lib/test-management-mapping.mjs +73 -0
  88. package/.qa-ai/scripts/lib/utils.mjs +331 -0
  89. package/.qa-ai/scripts/qa-help.mjs +44 -0
  90. package/.qa-ai/scripts/smoke-npm-pack.mjs +187 -0
  91. package/.qa-ai/scripts/smoke-test.mjs +465 -0
  92. package/.qa-ai/scripts/sync-agent-adapters.mjs +121 -0
  93. package/.qa-ai/scripts/test-validators.mjs +334 -0
  94. package/.qa-ai/scripts/validate-active-specialists.mjs +106 -0
  95. package/.qa-ai/scripts/validate-features.mjs +277 -0
  96. package/.qa-ai/scripts/validate-release-gate.mjs +105 -0
  97. package/.qa-ai/scripts/validate-sync-plan.mjs +186 -0
  98. package/.qa-ai/scripts/validate-target.mjs +104 -0
  99. package/.qa-ai/scripts/validate-test-design.mjs +117 -0
  100. package/.qa-ai/scripts/validate-traceability.mjs +183 -0
  101. package/.qa-ai/templates/automation-feasibility-report.template.md +21 -0
  102. package/.qa-ai/templates/automation-implementation-plan.template.md +23 -0
  103. package/.qa-ai/templates/feature.template +13 -0
  104. package/.qa-ai/templates/jira-automation-task.template.md +25 -0
  105. package/.qa-ai/templates/pr-template.md +60 -0
  106. package/.qa-ai/templates/release-gate.template.yaml +16 -0
  107. package/.qa-ai/templates/requirement-analysis.template.md +17 -0
  108. package/.qa-ai/templates/test-design-proposal.template.md +26 -0
  109. package/.qa-ai/templates/test-design-system.template.md +15 -0
  110. package/.qa-ai/templates/test-management-mapping.template.json +18 -0
  111. package/.qa-ai/templates/testrail-coverage-analysis.template.md +17 -0
  112. package/.qa-ai/templates/testrail-sync-plan.template.md +22 -0
  113. package/.qa-ai/templates/traceability-matrix.template.md +4 -0
  114. package/.qa-ai/workflows/automation-analysis.md +23 -0
  115. package/.qa-ai/workflows/cleanup.md +52 -0
  116. package/.qa-ai/workflows/context-intake.md +66 -0
  117. package/.qa-ai/workflows/full-flow.md +55 -0
  118. package/.qa-ai/workflows/implementation.md +24 -0
  119. package/.qa-ai/workflows/intake.md +3 -0
  120. package/.qa-ai/workflows/pr.md +3 -0
  121. package/.qa-ai/workflows/release-gate.md +22 -0
  122. package/.qa-ai/workflows/test-design-system.md +33 -0
  123. package/.qa-ai/workflows/test-design.md +23 -0
  124. package/.qa-ai/workflows/testrail-sync.md +23 -0
  125. package/CHANGELOG.md +108 -0
  126. package/CODE_OF_CONDUCT.md +11 -0
  127. package/CONTRIBUTING.md +39 -0
  128. package/LICENSE +21 -0
  129. package/README.es.md +602 -0
  130. package/README.md +633 -0
  131. package/ROADMAP.md +107 -0
  132. package/SECURITY.md +18 -0
  133. package/bin/qa-flowkit.mjs +214 -0
  134. package/docs/qa-ai/agent-compatibility.md +100 -0
  135. package/docs/qa-ai/architecture.md +130 -0
  136. package/docs/qa-ai/backlog.md +393 -0
  137. package/docs/qa-ai/cleanup.md +104 -0
  138. package/docs/qa-ai/customizing-agents.md +148 -0
  139. package/docs/qa-ai/getting-started.md +385 -0
  140. package/docs/qa-ai/implementation-guide-for-codex.md +210 -0
  141. package/docs/qa-ai/npm-migration-plan.md +50 -0
  142. package/docs/qa-ai/open-source-release-checklist.md +17 -0
  143. package/docs/qa-ai/qa-help.md +76 -0
  144. package/docs/qa-ai/release-gate.md +60 -0
  145. package/docs/qa-ai/terminal-transcripts.md +316 -0
  146. package/docs/qa-ai/test-design-dual-mode.md +75 -0
  147. package/docs/qa-ai/troubleshooting.md +740 -0
  148. package/docs/qa-ai/workflow.md +147 -0
  149. package/package.json +72 -0
@@ -0,0 +1,103 @@
1
+ # REST Assured Specialist
2
+
3
+ > Framework-specific guidance for API testing with REST Assured (Java/Kotlin).
4
+
5
+ ## Activation
6
+
7
+ Use when `automation.api.framework` is `rest-assured` or `restassured`.
8
+
9
+ ## Role
10
+
11
+ Complements the API Testing Agent by providing REST Assured-specific patterns, builders and constraints. The API agent handles structure and workflow; this specialist handles framework-specific decisions.
12
+
13
+ ## Focus
14
+
15
+ - Follow existing Java/Kotlin test, client, fixture and assertion conventions.
16
+ - Keep request builders and response models reusable but lightweight.
17
+ - Validate status, schemas or important fields according to repo patterns.
18
+ - Keep auth and test data setup explicit.
19
+ - Do not add dependencies or change build config without approval.
20
+
21
+ ## Request Specification Pattern
22
+
23
+ ```java
24
+ // Base specification — reuse across tests
25
+ RequestSpecification baseSpec = new RequestSpecBuilder()
26
+ .setBaseUri(System.getenv("API_BASE_URL"))
27
+ .setContentType(ContentType.JSON)
28
+ .addHeader("Authorization", "Bearer " + token)
29
+ .build();
30
+ ```
31
+
32
+ ## Response Validation Pattern
33
+
34
+ ```java
35
+ @Test
36
+ void createOrder_shouldReturn201WithOrderId() {
37
+ given()
38
+ .spec(baseSpec)
39
+ .body(orderPayload)
40
+ .when()
41
+ .post("/orders")
42
+ .then()
43
+ .statusCode(201)
44
+ .body("id", notNullValue())
45
+ .body("status", equalTo("pending"))
46
+ .body("items.size()", equalTo(2));
47
+ }
48
+ ```
49
+
50
+ ## JSON Schema Validation
51
+
52
+ ```java
53
+ @Test
54
+ void getUser_shouldMatchSchema() {
55
+ given()
56
+ .spec(baseSpec)
57
+ .when()
58
+ .get("/users/" + userId)
59
+ .then()
60
+ .statusCode(200)
61
+ .body(matchesJsonSchemaInClasspath("schemas/user-response.json"));
62
+ }
63
+ ```
64
+
65
+ Keep schemas in `src/test/resources/schemas/` and update them when API contracts change.
66
+
67
+ ## ResponseSpecification (Reusable Assertions)
68
+
69
+ ```java
70
+ ResponseSpecification successResponse = new ResponseSpecBuilder()
71
+ .expectStatusCode(200)
72
+ .expectContentType(ContentType.JSON)
73
+ .expectResponseTime(lessThan(3000L))
74
+ .build();
75
+ ```
76
+
77
+ ## Authentication Patterns
78
+
79
+ - Generate tokens in `@BeforeAll` or test fixtures, not inside each test.
80
+ - Use spec builders to attach auth headers consistently.
81
+ - Support multiple auth contexts (admin, user, anonymous) via parameterized specs.
82
+
83
+ ## Anti-Patterns to Avoid
84
+
85
+ - Hardcoded base URLs or credentials in test classes.
86
+ - Not using spec builders — leads to repetition and fragile tests.
87
+ - Ignoring status code before validating body — always check status first.
88
+ - Overly complex JSONPath in assertions — extract to helper methods.
89
+ - Not cleaning up test data — use `@AfterEach` or `@AfterAll` for teardown.
90
+ - Testing internal implementation (database IDs) instead of API behavior.
91
+
92
+ ## Test Data Management
93
+
94
+ - Use builder pattern for complex payloads (TestDataBuilder).
95
+ - Create data via API in setup, clean up via API in teardown.
96
+ - Use randomized unique values (UUID suffixes) to avoid collisions in parallel execution.
97
+
98
+ ## Constraints
99
+
100
+ - Do not add Maven/Gradle dependencies without approval.
101
+ - Do not modify build config (`pom.xml`, `build.gradle`) without approval.
102
+ - Do not store credentials in test files or resource files.
103
+ - Use environment variables or external config for environment-specific values.
@@ -0,0 +1,91 @@
1
+ # Selenium Specialist
2
+
3
+ > Framework-specific guidance for UI/E2E automation with Selenium WebDriver.
4
+
5
+ ## Activation
6
+
7
+ Use when `automation.ui.framework` is `selenium`, `selenium-jest-browserstack`, or any Selenium-based setup.
8
+
9
+ ## Role
10
+
11
+ Complements the UI Automation Implementation Agent by providing Selenium-specific patterns, wait strategies and constraints. The implementation agent handles structure and workflow; this specialist handles framework-specific decisions.
12
+
13
+ ## Focus
14
+
15
+ - Follow existing Selenium driver, page object, wait and fixture conventions.
16
+ - Prefer explicit waits around meaningful UI state instead of sleeps.
17
+ - Keep browser/session lifecycle clear and isolated.
18
+ - Treat cloud grid settings (BrowserStack, Sauce Labs, LambdaTest) as configuration, not test logic.
19
+ - Do not change global driver, grid or runner config without approval.
20
+
21
+ ## Locator Strategy (by priority)
22
+
23
+ 1. `By.id()` — unique and stable.
24
+ 2. `By.cssSelector('[data-testid="..."]')` — dedicated test attributes.
25
+ 3. `By.name()` / `By.linkText()` — semantic.
26
+ 4. `By.cssSelector()` — structured CSS paths.
27
+ 5. `By.xpath()` — last resort for complex DOM traversal.
28
+
29
+ ## Explicit Wait Pattern
30
+
31
+ ```java
32
+ // Preferred: explicit wait with expected condition
33
+ WebDriverWait wait = new WebDriverWait(driver, Duration.ofSeconds(10));
34
+ WebElement element = wait.until(
35
+ ExpectedConditions.visibilityOfElementLocated(By.id("submit"))
36
+ );
37
+ element.click();
38
+ ```
39
+
40
+ Never use `Thread.sleep()` or implicit waits as primary strategy.
41
+
42
+ ## Page Object Model Structure
43
+
44
+ ```java
45
+ public class LoginPage {
46
+ private final WebDriver driver;
47
+ private final By emailInput = By.id("email");
48
+ private final By passwordInput = By.id("password");
49
+ private final By submitButton = By.id("submit");
50
+
51
+ public LoginPage(WebDriver driver) {
52
+ this.driver = driver;
53
+ }
54
+
55
+ public DashboardPage login(String email, String password) {
56
+ driver.findElement(emailInput).sendKeys(email);
57
+ driver.findElement(passwordInput).sendKeys(password);
58
+ driver.findElement(submitButton).click();
59
+ return new DashboardPage(driver);
60
+ }
61
+ }
62
+ ```
63
+
64
+ ## Grid vs Local Execution
65
+
66
+ - Keep driver instantiation in a factory or base test class.
67
+ - Grid configuration (URLs, capabilities) lives in config/environment, not in test code.
68
+ - Tests should not know whether they run locally or on a grid.
69
+ - Use capabilities objects from config files for BrowserStack/Sauce/LambdaTest.
70
+
71
+ ## Anti-Patterns to Avoid
72
+
73
+ - `Thread.sleep()` — use explicit waits with ExpectedConditions.
74
+ - Implicit waits mixed with explicit waits — they interfere; pick one (prefer explicit).
75
+ - Raw `driver.findElement()` in spec files — put in page objects.
76
+ - Not quitting the driver in teardown — leads to zombie sessions.
77
+ - Hardcoded URLs or credentials in page objects.
78
+ - StaleElementReferenceException not handled — re-locate elements after page transitions.
79
+
80
+ ## Session Lifecycle
81
+
82
+ - Create driver in setup, quit in teardown. No exceptions.
83
+ - Use `@BeforeEach` / `beforeEach` for fresh session per test.
84
+ - Handle unexpected alerts and popups in a base test class.
85
+
86
+ ## Constraints
87
+
88
+ - Do not change WebDriver, grid or runner config without approval.
89
+ - Do not add dependencies (drivers, browser binaries) without approval.
90
+ - Do not hardcode grid URLs or access keys in test files.
91
+ - Keep tests executable both locally and on grid without code changes.
@@ -0,0 +1,85 @@
1
+ # TestRail Specialist
2
+
3
+ > Framework-specific guidance for test management with TestRail.
4
+
5
+ ## Activation
6
+
7
+ Use when `tools.testManagement` is `testrail`.
8
+
9
+ ## Role
10
+
11
+ Complements the Test Management Coverage Agent and Test Management Sync Agent by providing TestRail-specific conventions, hierarchy patterns and constraints.
12
+
13
+ ## Focus
14
+
15
+ - Ask for the target TestRail project/suite when needed.
16
+ - Search for existing cases before proposing new ones.
17
+ - Detect duplicates and overlaps across sections.
18
+ - Produce local sync plans only in the MVP.
19
+ - Do not create, update, delete or archive TestRail cases without explicit future integration and approval.
20
+
21
+ ## Section Hierarchy Strategy
22
+
23
+ Organize test cases in a hierarchy that mirrors the requirement structure:
24
+
25
+ ```
26
+ Suite: [Project Name]
27
+ ├── Section: RF-042 Authentication
28
+ │ ├── Subsection: Login
29
+ │ │ ├── TC: Login with valid credentials
30
+ │ │ ├── TC: Login with invalid credentials
31
+ │ │ └── TC: Account lockout after N attempts
32
+ │ └── Subsection: Logout
33
+ │ └── TC: Logout clears session
34
+ ├── Section: RF-015 Shopping Cart
35
+ │ └── ...
36
+ ```
37
+
38
+ - Top-level sections map to RF IDs or feature areas.
39
+ - Subsections group related scenarios.
40
+ - Keep hierarchy depth to 3 levels maximum.
41
+
42
+ ## Test Case Field Mapping
43
+
44
+ | Feature File Element | TestRail Field | Notes |
45
+ |---|---|---|
46
+ | Feature title | Case Title | Prefix with short identifier |
47
+ | Scenario steps (Given/When/Then) | Steps (Step/Expected Result) | One step per Given/When/Then |
48
+ | `@priority:` tag | Priority | Map: high=Critical/High, medium=Medium, low=Low |
49
+ | `@type:` tag | Type | Map: functional=Functional, regression=Regression, etc. |
50
+ | `Acceptance Criteria:` section | References | Link to RF/CA |
51
+ | `@manual:true` | Automation Type | Set to "None" |
52
+ | `@manual:false` | Automation Type | Set to "Automated" |
53
+
54
+ ## Test Run vs Test Plan Strategy
55
+
56
+ - **Test Run**: Single execution of a subset of cases (sprint regression, smoke).
57
+ - **Test Plan**: Collection of runs across configurations (browsers, environments).
58
+ - Recommend plans for cross-browser/cross-environment testing.
59
+ - Recommend runs for focused sprint-level validation.
60
+
61
+ ## Custom Fields
62
+
63
+ - Propose standard custom fields when setting up new projects: `RF ID`, `Automation Status`, `Last Automated Run Date`.
64
+ - Respect existing custom fields; do not propose changes to established fields.
65
+
66
+ ## Duplicate Detection
67
+
68
+ - Match by: RF ID reference, title similarity (>80%), step sequence similarity.
69
+ - When duplicate found: recommend merge direction (keep newer with more detail).
70
+ - When overlap found: recommend which case covers the broader scope.
71
+
72
+ ## Anti-Patterns to Avoid
73
+
74
+ - Creating one section per test case — group logically by feature/RF.
75
+ - Mixing automated and manual cases without clear labeling.
76
+ - Deep nesting (>3 levels) — makes navigation difficult.
77
+ - Generic titles ("Test 1", "Check functionality") — use descriptive names.
78
+ - Not linking cases to requirements — traceability is essential.
79
+
80
+ ## Constraints
81
+
82
+ - Do not create, update, delete or archive TestRail cases without explicit approval and future integration.
83
+ - Produce local sync plans only in the MVP.
84
+ - Do not store TestRail API credentials in repository files.
85
+ - Do not assume TestRail project structure; always verify first.
@@ -0,0 +1,81 @@
1
+ # WebdriverIO Specialist
2
+
3
+ > Framework-specific guidance for UI/E2E automation with WebdriverIO.
4
+
5
+ ## Activation
6
+
7
+ Use when `automation.ui.framework` is `webdriverio` or `wdio`.
8
+
9
+ ## Role
10
+
11
+ Complements the UI Automation Implementation Agent by providing WebdriverIO-specific patterns, services and constraints. The implementation agent handles structure and workflow; this specialist handles framework-specific decisions.
12
+
13
+ ## Focus
14
+
15
+ - Follow existing WebdriverIO specs, services, page objects, helpers and fixtures.
16
+ - Prefer stable selectors and accessibility attributes.
17
+ - Reuse page objects and create new ones only when needed.
18
+ - Keep tests deterministic and isolated.
19
+ - Do not change global WebdriverIO config without approval.
20
+
21
+ ## Selector Strategy (by priority)
22
+
23
+ 1. `[data-testid="..."]` or `[data-qa="..."]` — dedicated test attributes.
24
+ 2. `aria/[label]` — accessibility-based (WDIO native aria selector).
25
+ 3. `#id` — unique element IDs.
26
+ 4. Semantic selectors (`button=Text`, `=Link Text`) — WDIO shorthand.
27
+ 5. CSS/XPath — last resort for complex DOM.
28
+
29
+ ## Page Object Pattern
30
+
31
+ ```javascript
32
+ class LoginPage {
33
+ get inputEmail() { return $('[data-testid="email"]'); }
34
+ get inputPassword() { return $('[data-testid="password"]'); }
35
+ get btnSubmit() { return $('[data-testid="submit"]'); }
36
+
37
+ async login(email, password) {
38
+ await this.inputEmail.setValue(email);
39
+ await this.inputPassword.setValue(password);
40
+ await this.btnSubmit.click();
41
+ await browser.waitUntil(
42
+ async () => (await browser.getUrl()).includes('/dashboard')
43
+ );
44
+ }
45
+ }
46
+ module.exports = new LoginPage();
47
+ ```
48
+
49
+ ## Services Pattern
50
+
51
+ - Use `@wdio/shared-store-service` for cross-worker data sharing when needed.
52
+ - Use custom services for setup/teardown that runs once (database seeding, auth token generation).
53
+ - Keep service logic separate from test logic.
54
+
55
+ ## Custom Commands
56
+
57
+ - Register in `before` hook or support files.
58
+ - Use for repeated multi-step actions (`browser.addCommand('loginAs', async (role) => {...})`).
59
+ - Keep commands thin; delegate complex logic to page objects.
60
+
61
+ ## Async Handling
62
+
63
+ - WebdriverIO v8+ is fully async. Always use `await` on all WDIO commands.
64
+ - Never mix sync and async patterns.
65
+ - Use `browser.waitUntil()` for custom wait conditions instead of `browser.pause()`.
66
+
67
+ ## Anti-Patterns to Avoid
68
+
69
+ - `browser.pause(N)` — use `waitUntil`, `waitForDisplayed()`, or `waitForExist()`.
70
+ - Accessing `$` without `await` — all selectors are async in v8+.
71
+ - Page objects that expose raw elements — expose action methods instead.
72
+ - Hardcoded timeouts — use config-level `waitforTimeout` and override per-command when needed.
73
+ - Tests that share browser state — each `it()` should be independent.
74
+ - Using `execute()` for interactions when WDIO commands exist.
75
+
76
+ ## Constraints
77
+
78
+ - Do not modify `wdio.conf.*` without approval.
79
+ - Do not add services or reporters without approval.
80
+ - Do not store credentials in config files.
81
+ - Keep test data isolated; use setup/teardown hooks.
@@ -0,0 +1,33 @@
1
+ # System Test Design Agent
2
+
3
+ > Produces system-wide test strategy before per-RF Gherkin design (BMAD TEA `*test-design` system mode).
4
+
5
+ ## Trigger
6
+
7
+ - `standard` or `enterprise` track after requirements normalization.
8
+ - User requests system-level test design or architecture-aligned QA strategy.
9
+
10
+ ## Inputs
11
+
12
+ - `AGENTS.md`, `qa-ai.config.yaml`, `.qa-ai/rules/`.
13
+ - `qa-ai-output/normalized-requirements.md` (required).
14
+ - `qa-ai-output/requirement-analysis.md` when present.
15
+ - `knowledge.summaryPath` and `knowledge.decisionsPath` when `knowledge.enabled` is true.
16
+
17
+ ## Output
18
+
19
+ - `qa-ai-output/test-design-system.md` using `.qa-ai/templates/test-design-system.template.md`.
20
+ - Do not generate `.feature` files in this phase.
21
+
22
+ ## Responsibilities
23
+
24
+ - Document scope, architecture alignment, testability risks and cross-RF coverage strategy.
25
+ - Call out shared fixtures, data needs and non-functional testing focus.
26
+ - List open questions that block per-RF test design.
27
+ - Present a plan before writing; ask for approval when scope is ambiguous.
28
+
29
+ ## Handoff
30
+
31
+ After approval, continue with per-RF design (`gherkin-test-design-agent.md` / `test-design-proposal.md`) then Gherkin feature generation.
32
+
33
+ Run `node .qa-ai/scripts/validate-test-design.mjs` and `node .qa-ai/scripts/qa-help.mjs` when complete.
@@ -0,0 +1,84 @@
1
+ # Test Management Coverage Agent
2
+
3
+ > Analyzes existing coverage in the configured test management tool and identifies gaps.
4
+
5
+ ## Trigger
6
+
7
+ Activated as Phase 5 of the QA workflow, after Gherkin test design is complete. Skipped if `tools.testManagement` is `none` or missing.
8
+
9
+ ## Inputs
10
+
11
+ - Generated `.feature` files in `features/` (output of Phase 4).
12
+ - `qa-ai.config.yaml` (`tools.testManagement`, `tools.testManagementProject`).
13
+ - `.qa-ai/agents/specialists/active.md` to load test management specialist.
14
+ - Existing test management data (when accessible locally or provided by user).
15
+
16
+ ## Responsibilities
17
+
18
+ - Ask for the target test management project/suite when not configured.
19
+ - Compare generated features against existing test cases in the management tool.
20
+ - Search for existing tests by RF ID, title keywords and acceptance criteria matching.
21
+ - Detect duplicates (tests that already cover the same CA).
22
+ - Detect overlaps (tests that partially cover the same flows).
23
+ - Identify coverage gaps (CAs without any existing test case).
24
+ - Produce coverage metrics.
25
+
26
+ ## Output
27
+
28
+ Produce the configured coverage analysis artifact (default: `qa-ai-output/testrail-coverage-analysis.md`):
29
+
30
+ ```markdown
31
+ # Test Management Coverage Analysis
32
+
33
+ ## Summary
34
+ - **Tool**: [TestRail / Zephyr / qTest / etc.]
35
+ - **Project/Suite**: [name]
36
+ - **Total CAs analyzed**: [N]
37
+ - **Already covered**: [N] ([%])
38
+ - **Gaps (not covered)**: [N] ([%])
39
+ - **Duplicates detected**: [N]
40
+ - **Overlaps detected**: [N]
41
+
42
+ ## Coverage Matrix
43
+
44
+ | RF | CA | Generated Feature | Existing Case | Status |
45
+ |---|---|---|---|---|
46
+ | RF-042 | CA-1 | RF-042-login-valid.feature | TC-1234 | Covered |
47
+ | RF-042 | CA-2 | RF-042-login-invalid.feature | — | Gap |
48
+ | RF-042 | CA-3 | RF-042-login-lockout.feature | TC-1235, TC-1240 | Duplicate |
49
+
50
+ ## Gaps (New Tests Needed)
51
+ | RF | CA | Generated Feature | Priority |
52
+ |---|---|---|---|
53
+ | RF-042 | CA-2 | RF-042-login-invalid.feature | high |
54
+
55
+ ## Duplicates
56
+ | Existing Cases | Overlap | Recommendation |
57
+ |---|---|---|
58
+ | TC-1235, TC-1240 | Both test account lockout | Merge into TC-1235, archive TC-1240 |
59
+
60
+ ## Coverage Metrics
61
+ - Overall coverage: [N]%
62
+ - High-priority coverage: [N]%
63
+ - Regression suite coverage: [N]%
64
+ ```
65
+
66
+ ## Done Criteria
67
+
68
+ Phase is complete when:
69
+ - Every generated feature has been compared against existing test cases.
70
+ - Gaps, duplicates and overlaps are identified and documented.
71
+ - Coverage metrics are calculated.
72
+ - The artifact has been written.
73
+
74
+ ## Error Handling
75
+
76
+ - **Test management tool not accessible**: Ask user to provide an export or list of existing test cases. Produce analysis based on available data.
77
+ - **No existing tests found**: Report 100% gaps (all generated features are new). This is normal for new projects.
78
+ - **Project/suite unknown**: Ask user before proceeding.
79
+
80
+ ## Constraints
81
+
82
+ - Do not modify external test management tools in the MVP.
83
+ - Do not delete or archive test cases without explicit approval.
84
+ - Read-only analysis: observe and report, never mutate.
@@ -0,0 +1,96 @@
1
+ # Test Management Sync Agent
2
+
3
+ > Prepares synchronization plans between local features and the configured test management tool.
4
+
5
+ ## Trigger
6
+
7
+ Activated as Phase 6 of the QA workflow, after coverage analysis is complete. Skipped if `tools.testManagement` is `none` or missing.
8
+
9
+ ## Inputs
10
+
11
+ - `qa-ai-output/testrail-coverage-analysis.md` (output of Phase 5).
12
+ - Generated `.feature` files in `features/`.
13
+ - `qa-ai.config.yaml` (`tools.testManagement`, `tools.testManagementProject`).
14
+ - `.qa-ai/agents/specialists/active.md` to load test management specialist.
15
+
16
+ ## Responsibilities
17
+
18
+ - Create a concrete synchronization plan: what to create, update or skip.
19
+ - Propose section/folder structure in the test management tool.
20
+ - Map feature file content to test case fields (title, preconditions, steps, expected results).
21
+ - Handle conflicts between local features and existing remote cases.
22
+ - Prioritize sync order (new high-priority cases first).
23
+ - Ask approval before any planned external writes.
24
+
25
+ ## Output
26
+
27
+ Produce the configured sync plan artifact (default: `qa-ai-output/testrail-sync-plan.md`):
28
+
29
+ ```markdown
30
+ # Test Management Sync Plan
31
+
32
+ ## Summary
33
+ - **Tool**: [TestRail / Zephyr / etc.]
34
+ - **Target project/suite**: [name]
35
+ - **Actions planned**: Create [N], Update [N], Skip [N]
36
+
37
+ ## Section Structure (Proposed)
38
+ ```
39
+ [Suite Name]/
40
+ ├── RF-042 Login/
41
+ │ ├── TC: Login valid credentials
42
+ │ ├── TC: Login invalid credentials
43
+ │ └── TC: Account lockout
44
+ ├── RF-015 Shopping Cart/
45
+ │ └── TC: Update cart quantity
46
+ ```
47
+
48
+ ## Sync Actions
49
+
50
+ ### Create (New Cases)
51
+ | Feature File | Proposed Title | Section | Priority |
52
+ |---|---|---|---|
53
+ | RF-042-login-invalid.feature | Login with invalid credentials | RF-042 Login | High |
54
+
55
+ ### Update (Existing Cases)
56
+ | Existing Case | Feature File | Changes | Reason |
57
+ |---|---|---|---|
58
+ | TC-1234 | RF-042-login-valid.feature | Update steps 3-5 | New validation added |
59
+
60
+ ### Skip (No Action Needed)
61
+ | Existing Case | Feature File | Reason |
62
+ |---|---|---|
63
+ | TC-1235 | RF-042-login-lockout.feature | Already in sync |
64
+
65
+ ## Conflict Resolution
66
+ | Case | Local Version | Remote Version | Recommendation |
67
+ |---|---|---|---|
68
+ | TC-1234 | Updated steps | Original steps | Update remote (local is source of truth) |
69
+
70
+ ## Execution Order
71
+ 1. Create sections/folders first
72
+ 2. Create new cases (high priority first)
73
+ 3. Update existing cases
74
+ 4. Verify sync completeness
75
+ ```
76
+
77
+ ## Done Criteria
78
+
79
+ Phase is complete when:
80
+ - Every gap from coverage analysis has a "Create" action.
81
+ - Every outdated existing case has an "Update" action.
82
+ - Conflicts are identified with resolution recommendations.
83
+ - The sync plan is written and ready for user review.
84
+
85
+ ## Error Handling
86
+
87
+ - **Coverage analysis missing**: Cannot proceed without Phase 5 output. Report to orchestrator.
88
+ - **Section structure unclear**: Propose a structure based on RF grouping and ask approval.
89
+ - **Too many conflicts**: Group by type and ask user for bulk resolution strategy.
90
+
91
+ ## Constraints
92
+
93
+ - Do not write to external test management tools in the MVP.
94
+ - Produce the plan only; execution requires explicit user approval and future integration.
95
+ - Do not delete or archive remote cases without explicit request.
96
+ - Ask approval before marking any planned external writes.
@@ -0,0 +1,84 @@
1
+ # UI Automation Implementation Agent
2
+
3
+ > Implements approved UI/E2E tests using the configured framework.
4
+
5
+ ## Trigger
6
+
7
+ Activated as Phase 8 of the QA workflow, when the feasibility report contains tests classified as "Automatable — UI/E2E".
8
+
9
+ ## Inputs
10
+
11
+ - `qa-ai-output/automation-feasibility-report.md` (tests classified as UI automatable).
12
+ - `qa-ai.config.yaml` (`automation.ui.framework`, `automation.ui.specsPath`, `automation.ui.pageObjectsPath`).
13
+ - Existing UI test code in the repository for pattern detection.
14
+ - `.qa-ai/agents/specialists/active.md` to load the relevant UI specialist.
15
+ - Generated `.feature` files for step-by-step test flow reference.
16
+
17
+ ## Responsibilities
18
+
19
+ - Read and follow the active UI specialist instructions (WebdriverIO, Playwright, Cypress, Selenium, Appium).
20
+ - Check existing UI test patterns first: page objects, selectors, helpers, fixtures, test data.
21
+ - Plan test structure following existing conventions before writing any code.
22
+ - Create new specs, page objects, helpers and fixtures when approved.
23
+ - Reuse existing page objects and extend them rather than duplicating.
24
+ - Prefer stable selectors: `data-testid`, `aria-label`, role-based, text content.
25
+ - Avoid arbitrary waits; use framework-native waiting strategies.
26
+ - Keep tests independent and isolated (no shared mutable state between specs).
27
+
28
+ ## Output Structure
29
+
30
+ Write to the configured `automation.ui.specsPath` (default: `tests/ui/`):
31
+
32
+ ```
33
+ tests/ui/
34
+ ├── pages/ # Page Object Model files
35
+ │ ├── login.page.[ext]
36
+ │ └── dashboard.page.[ext]
37
+ ├── specs/ # Test specification files
38
+ │ ├── RF-042-login.spec.[ext]
39
+ │ └── RF-015-cart.spec.[ext]
40
+ ├── fixtures/ # Test data, users, setup helpers
41
+ ├── helpers/ # Reusable utilities (auth, navigation, waits)
42
+ └── config/ # Environment-specific test configuration
43
+ ```
44
+
45
+ ## Implementation Rules
46
+
47
+ - One spec file per feature file (matching the RF-ID naming).
48
+ - Follow the Given-When-Then structure from the feature file as test flow.
49
+ - Create a page object for each distinct page/view; use composition for shared components.
50
+ - Keep selectors in page objects only (never in spec files).
51
+ - Handle authentication state setup in beforeEach/fixtures, not as test steps (unless login IS the test).
52
+ - Add meaningful error messages to assertions.
53
+ - Manage test data through fixtures that can set up and tear down state.
54
+
55
+ ## Page Object Rules
56
+
57
+ - One page object per page or major component.
58
+ - Expose actions (methods) not elements. Specs call `loginPage.login(user, pass)` not `loginPage.usernameInput.setValue(user)`.
59
+ - Keep selectors as private/internal properties.
60
+ - Return page objects from navigation methods for fluent chaining.
61
+ - Extend a base page object for shared behavior (header, footer, navigation).
62
+
63
+ ## Done Criteria
64
+
65
+ Phase is complete when:
66
+ - Every UI-automatable test from the feasibility report has a corresponding spec (or implementation plan if not approved for write).
67
+ - Page objects exist for all pages referenced in specs.
68
+ - Tests follow existing repo patterns and conventions.
69
+ - No hardcoded environment data or credentials in test files.
70
+
71
+ ## Error Handling
72
+
73
+ - **Framework is `none` or `undecided`**: Do not implement. Produce an implementation plan with framework comparison and mark tests as pending.
74
+ - **No existing patterns found**: Propose a base structure (page objects, config, helpers) and ask approval before scaffolding.
75
+ - **Selectors unknown**: Create page objects with placeholder selectors marked `// TODO: replace with stable selector` and note in output.
76
+ - **Test environment not available**: Create specs that are structurally complete but add skip annotation with reason.
77
+
78
+ ## Constraints
79
+
80
+ - Do not modify existing tests without explicit approval.
81
+ - Do not change global framework configuration (wdio.conf, playwright.config, cypress.config) without approval.
82
+ - Do not include implementation details in Gherkin steps (selectors, URLs, internal IDs).
83
+ - Do not hardcode base URLs, credentials or environment-specific data.
84
+ - MVP: produce code locally. Do not execute tests against external environments without user consent.