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,68 @@
1
+ # Cypress Specialist
2
+
3
+ > Framework-specific guidance for UI/E2E automation with Cypress.
4
+
5
+ ## Activation
6
+
7
+ Use when `automation.ui.framework` is `cypress`.
8
+
9
+ ## Role
10
+
11
+ Complements the UI Automation Implementation Agent by providing Cypress-specific patterns, commands and constraints. The implementation agent handles structure and workflow; this specialist handles framework-specific decisions.
12
+
13
+ ## Focus
14
+
15
+ - Follow existing Cypress specs, commands, fixtures and support file conventions.
16
+ - Prefer stable selectors (`data-cy`, `data-testid`) and custom commands only when they reduce repeated workflow noise.
17
+ - Avoid arbitrary waits; use Cypress retry behavior, `cy.intercept()` and network aliases.
18
+ - Keep tests independent and avoid leaking state between specs.
19
+ - Do not change Cypress global config without approval.
20
+
21
+ ## Selector Strategy (by priority)
22
+
23
+ 1. `[data-cy="..."]` or `[data-testid="..."]` (dedicated test attributes).
24
+ 2. `cy.findByRole()` / `cy.findByText()` (Testing Library integration if available).
25
+ 3. Semantic HTML selectors (button, input[type="..."], aria-label).
26
+ 4. CSS class selectors (avoid; they change with styling).
27
+
28
+ ## Command Patterns
29
+
30
+ - **Custom commands**: Use for multi-step repeated workflows (login, navigation, form fill). Keep atomic.
31
+ - **cy.intercept()**: Stub or wait for API calls to control test timing and isolate frontend.
32
+ - **cy.session()**: Cache and restore authentication state across specs. Prefer over repeated login flows.
33
+ - **Fixtures**: Use `cy.fixture()` for static test data. Keep fixtures small and focused.
34
+
35
+ ## Component Testing vs E2E
36
+
37
+ - Use Cypress Component Testing for isolated component validation (faster, no server needed).
38
+ - Use E2E specs for user flows that cross multiple pages or require backend state.
39
+ - Do not mix component and E2E concerns in the same spec file.
40
+
41
+ ## Anti-Patterns to Avoid
42
+
43
+ - `cy.wait(N)` with hardcoded milliseconds — use `cy.intercept()` aliases instead.
44
+ - Chaining too many assertions in one `it()` block — split into focused test cases.
45
+ - Using `cy.get()` with dynamic classes — use stable test attributes.
46
+ - Accessing `window` or DOM directly when a Cypress command exists.
47
+ - Tests that depend on execution order within a spec file.
48
+ - Using `{ force: true }` to bypass visibility — fix the UI interaction instead.
49
+
50
+ ## Authentication Pattern
51
+
52
+ ```javascript
53
+ // Preferred: use cy.session() for cached auth
54
+ cy.session('user', () => {
55
+ cy.visit('/login')
56
+ cy.get('[data-cy=email]').type(email)
57
+ cy.get('[data-cy=password]').type(password)
58
+ cy.get('[data-cy=submit]').click()
59
+ cy.url().should('not.include', '/login')
60
+ })
61
+ ```
62
+
63
+ ## Constraints
64
+
65
+ - Do not modify `cypress.config.*` without approval.
66
+ - Do not add plugins or dependencies without approval.
67
+ - Do not use `cy.exec()` for test setup when API commands are available.
68
+ - Keep test data isolated; do not rely on shared database state.
@@ -0,0 +1,117 @@
1
+ # Generic Test Design Specialist
2
+
3
+ > Guidance for non-Gherkin test case design: structured manual tests, test matrices and exploratory charters.
4
+
5
+ ## Activation
6
+
7
+ Use for test design output that is not written as Gherkin `.feature` files. Activated when the workflow needs manual test documentation, structured test cases, or when the team prefers non-Gherkin formats.
8
+
9
+ ## Role
10
+
11
+ Complements the Gherkin Test Design Agent when alternative output formats are needed. Produces structured test case documentation for manual execution, exploratory testing, or teams that do not use Gherkin.
12
+
13
+ ## Focus
14
+
15
+ - Produce clear manual or structured test cases in the configured interface language.
16
+ - Include preconditions, test data, steps, expected results, priority, type and automation suitability.
17
+ - Maintain traceability to RF/CA IDs.
18
+ - Keep one logical test case per section or record.
19
+ - Do not replace required Gherkin generation when `gherkin` output is requested or required by config.
20
+
21
+ ## Test Case Template
22
+
23
+ ```markdown
24
+ ## TC-[RF-ID]-[N]: [Title]
25
+
26
+ **Traceability**: RF-[ID] CA-[N]
27
+ **Priority**: High | Medium | Low
28
+ **Type**: Functional | Regression | Smoke | E2E | Negative | Edge-case
29
+ **Automation**: Automatable | Manual Only | Automated
30
+ **Estimated Time**: [minutes]
31
+
32
+ ### Preconditions
33
+ - [Required state before test execution]
34
+ - [Required test data]
35
+
36
+ ### Test Data
37
+ | Field | Value | Notes |
38
+ |---|---|---|
39
+ | [input field] | [value] | [explanation] |
40
+
41
+ ### Steps
42
+ | # | Action | Expected Result |
43
+ |---|---|---|
44
+ | 1 | [action] | [expected outcome] |
45
+ | 2 | [action] | [expected outcome] |
46
+
47
+ ### Postconditions
48
+ - [State after test execution]
49
+ - [Cleanup needed]
50
+
51
+ ### Notes
52
+ - [Edge cases to consider]
53
+ - [Related test cases]
54
+ ```
55
+
56
+ ## Test Design Techniques
57
+
58
+ Apply appropriate techniques based on the criterion type:
59
+
60
+ | Technique | When to Use | Output |
61
+ |---|---|---|
62
+ | **Boundary Value Analysis** | Numeric inputs, ranges, limits | Min, min+1, max-1, max, below-min, above-max |
63
+ | **Equivalence Partitioning** | Large input domains | Representative value per partition |
64
+ | **Decision Table** | Multiple conditions with combined outcomes | Condition/action matrix |
65
+ | **State Transition** | Workflows, status changes | State diagram + transition test cases |
66
+ | **Pairwise/Combinatorial** | Multiple parameters with many values | Reduced combination set |
67
+ | **Error Guessing** | Known failure patterns | Negative test cases |
68
+
69
+ ## Decision Table Format
70
+
71
+ ```markdown
72
+ ### Decision Table: [Feature]
73
+
74
+ | Condition | Rule 1 | Rule 2 | Rule 3 | Rule 4 |
75
+ |---|---|---|---|---|
76
+ | [Condition A] | T | T | F | F |
77
+ | [Condition B] | T | F | T | F |
78
+ | **Action** | | | | |
79
+ | [Action X] | ✓ | ✓ | — | — |
80
+ | [Action Y] | — | — | ✓ | ✗ |
81
+ ```
82
+
83
+ ## Exploratory Testing Charter
84
+
85
+ ```markdown
86
+ ## Charter: [Area/Feature]
87
+
88
+ **Mission**: Explore [feature/area] to discover [type of issues]
89
+ **Time box**: [30-90 minutes]
90
+ **Focus areas**:
91
+ - [Specific aspect 1]
92
+ - [Specific aspect 2]
93
+
94
+ **Risks to investigate**:
95
+ - [Known risk 1]
96
+ - [Known risk 2]
97
+
98
+ **Notes template**:
99
+ - Observations: [what was found]
100
+ - Issues: [bugs or concerns]
101
+ - Questions: [things to clarify]
102
+ ```
103
+
104
+ ## Anti-Patterns to Avoid
105
+
106
+ - Steps that say "verify it works correctly" — specify exact expected outcome.
107
+ - Missing preconditions — tests become unreproducible.
108
+ - Steps that combine multiple actions and verifications — keep atomic.
109
+ - No traceability — every test case must link to a requirement.
110
+ - Overly detailed steps for senior testers / too vague for junior testers — calibrate to team.
111
+
112
+ ## Constraints
113
+
114
+ - Do not replace Gherkin generation when config requires `.feature` output.
115
+ - Use as complement (manual test docs) or alternative (when explicitly chosen).
116
+ - Write in the configured interface language.
117
+ - Maintain traceability to RF/CA in all formats.
@@ -0,0 +1,108 @@
1
+ # Jira Specialist
2
+
3
+ > Integration guidance for Jira as requirement source and issue tracker.
4
+
5
+ ## Activation
6
+
7
+ Use when `tools.issueTracker` or `sources.main` is `jira`.
8
+
9
+ ## Role
10
+
11
+ Complements the Requirements Intake Agent (when Jira is the requirement source) and the Issue Task Agent (when Jira is the issue tracker) by providing Jira-specific extraction patterns, field conventions and constraints.
12
+
13
+ ## Focus
14
+
15
+ - Treat Jira content as a requirement source when configured.
16
+ - Extract story, RF, acceptance criteria, attachments and linked context.
17
+ - Prepare issue/task drafts locally when automation work cannot be completed now.
18
+ - Keep external writes disabled in the MVP.
19
+ - Never store Jira credentials or private tokens in repository files.
20
+
21
+ ## Requirement Extraction from Jira
22
+
23
+ When Jira is `sources.main`:
24
+
25
+ | Jira Field | Maps To | Notes |
26
+ |---|---|---|
27
+ | Issue Key (PROJ-123) | RF ID | Use as-is or map to RF-[key] |
28
+ | Summary | Requirement Title | — |
29
+ | Description | Requirement Description | Parse for user story format |
30
+ | Acceptance Criteria (custom field or description section) | CA list | Extract numbered criteria |
31
+ | Priority | Requirement Priority | Map: Highest/High→high, Medium→medium, Low/Lowest→low |
32
+ | Attachments | Supporting docs | Reference file names |
33
+ | Linked Issues | Dependencies/Context | Note blocking/blocked relationships |
34
+ | Labels/Components | Tags/Categories | Map to test types when applicable |
35
+
36
+ ## User Story Parsing
37
+
38
+ Detect and extract from common formats:
39
+
40
+ ```
41
+ As a [role]
42
+ I want to [action]
43
+ So that [business value]
44
+
45
+ Acceptance Criteria:
46
+ - Given [context] When [action] Then [expected]
47
+ - [criterion in natural language]
48
+ ```
49
+
50
+ When the format is non-standard, extract best-effort and flag for review.
51
+
52
+ ## JQL Patterns for Discovery
53
+
54
+ ```
55
+ # Find stories for a sprint/epic
56
+ project = PROJ AND issuetype = Story AND sprint = "Sprint 23"
57
+ project = PROJ AND "Epic Link" = PROJ-100
58
+
59
+ # Find stories with acceptance criteria
60
+ project = PROJ AND issuetype = Story AND description ~ "Acceptance Criteria"
61
+
62
+ # Find linked test cases
63
+ project = PROJ AND issuetype = "Test Case" AND issueFunction in linkedIssuesOf("key = PROJ-123")
64
+ ```
65
+
66
+ ## Issue Task Draft Format (for Jira)
67
+
68
+ When creating task drafts for the Issue Task Agent:
69
+
70
+ ```markdown
71
+ # Task Draft: [Title]
72
+
73
+ ## Jira Fields
74
+ - **Project**: [PROJ]
75
+ - **Issue Type**: Task | Story | Sub-task
76
+ - **Priority**: [mapped priority]
77
+ - **Labels**: automation, qa, [framework]
78
+ - **Components**: [if applicable]
79
+ - **Epic Link**: [parent epic if known]
80
+ - **Linked Issues**: relates to [RF issue key]
81
+
82
+ ## Description
83
+ [Task description in Jira markdown format]
84
+
85
+ ## Acceptance Criteria
86
+ - [checkbox style criteria]
87
+ ```
88
+
89
+ ## Custom Fields
90
+
91
+ - Respect existing custom field configurations.
92
+ - Common QA-relevant custom fields: `Acceptance Criteria`, `Test Coverage`, `Automation Status`, `RF ID`.
93
+ - When custom fields are unknown, ask user for the field mapping.
94
+
95
+ ## Anti-Patterns to Avoid
96
+
97
+ - Parsing Jira wiki markup incorrectly — handle `{panel}`, `{code}`, tables and lists.
98
+ - Assuming all stories follow the same template — handle variations.
99
+ - Creating sub-tasks without knowing the project's workflow — draft only.
100
+ - Ignoring linked issues — they provide context for dependencies and scope.
101
+ - Storing Jira API tokens or cookies in any file.
102
+
103
+ ## Constraints
104
+
105
+ - Keep external writes disabled in the MVP. Draft tasks locally only.
106
+ - Never store Jira credentials or private tokens in repository files.
107
+ - Do not assume project workflow states; ask when needed.
108
+ - Do not modify Jira issues without explicit approval and future integration.
@@ -0,0 +1,97 @@
1
+ # Karate API Specialist
2
+
3
+ > Framework-specific guidance for API testing with Karate DSL.
4
+
5
+ ## Activation
6
+
7
+ Use when `automation.api.framework` is `karate`.
8
+
9
+ ## Role
10
+
11
+ Complements the API Testing Agent by providing Karate-specific patterns, feature file conventions and constraints. The API agent handles structure and workflow; this specialist handles framework-specific decisions.
12
+
13
+ ## Focus
14
+
15
+ - Follow existing Karate feature, config and runner conventions.
16
+ - Keep reusable setup in `karate-config.js` or shared feature files according to repo patterns.
17
+ - Prefer readable scenario steps and data tables over complex scripting.
18
+ - Validate status, response structure and business-relevant fields.
19
+ - Do not change build, runner or environment config without approval.
20
+
21
+ ## Feature File Pattern
22
+
23
+ ```gherkin
24
+ Feature: Create Order API
25
+
26
+ Background:
27
+ * url baseUrl
28
+ * header Authorization = 'Bearer ' + authToken
29
+
30
+ Scenario: Create order with valid payload
31
+ Given path '/orders'
32
+ And request { items: [{ sku: 'ABC', qty: 2 }] }
33
+ When method post
34
+ Then status 201
35
+ And match response.id == '#notnull'
36
+ And match response.status == 'pending'
37
+ And match response.items == '#[1]'
38
+ ```
39
+
40
+ ## Reusable Features (call)
41
+
42
+ ```gherkin
43
+ # login.feature (reusable)
44
+ Feature: Login
45
+ Scenario:
46
+ Given url baseUrl + '/auth/login'
47
+ And request { email: '#(email)', password: '#(password)' }
48
+ When method post
49
+ Then status 200
50
+ * def authToken = response.token
51
+ ```
52
+
53
+ Call from other features: `* def login = call read('classpath:login.feature') { email: '...', password: '...' }`
54
+
55
+ ## Data-Driven Testing
56
+
57
+ ```gherkin
58
+ Scenario Outline: Validate order status transitions
59
+ Given path '/orders/' + orderId + '/status'
60
+ And request { status: '<newStatus>' }
61
+ When method patch
62
+ Then status <expectedCode>
63
+
64
+ Examples:
65
+ | newStatus | expectedCode |
66
+ | confirmed | 200 |
67
+ | invalid | 400 |
68
+ | shipped | 200 |
69
+ ```
70
+
71
+ ## Embedded Expressions
72
+
73
+ - Use `#(variable)` for simple substitution.
74
+ - Use `#(expression)` for inline JavaScript evaluation.
75
+ - Use `karate.set()` for dynamic values across scenarios.
76
+ - Prefer JSON path matchers (`#notnull`, `#present`, `#[N]`, `#regex`) over custom assertions.
77
+
78
+ ## Anti-Patterns to Avoid
79
+
80
+ - Complex JavaScript logic inside feature files — move to `karate-config.js` or Java helpers.
81
+ - Hardcoded base URLs — use `karate-config.js` with environment switching.
82
+ - Long scenario chains that depend on order — keep scenarios independent.
83
+ - Not using Background for shared setup.
84
+ - Ignoring response schema — always validate structure, not just status.
85
+
86
+ ## Environment Configuration
87
+
88
+ - Use `karate-config.js` with `karate.env` for environment switching.
89
+ - Keep sensitive values (tokens, keys) in environment variables referenced via `karate.properties`.
90
+ - Never hardcode environment-specific values in feature files.
91
+
92
+ ## Constraints
93
+
94
+ - Do not change `karate-config.js`, build files (pom.xml, build.gradle) or runner config without approval.
95
+ - Do not add Java dependencies without approval.
96
+ - Do not hardcode credentials or environment URLs in feature files.
97
+ - Keep features readable by non-developers (QA team members).
@@ -0,0 +1,87 @@
1
+ # Playwright API Specialist
2
+
3
+ > Framework-specific guidance for API/integration testing with Playwright's request context.
4
+
5
+ ## Activation
6
+
7
+ Use when `automation.api.framework` is `playwright-api` or `playwright`.
8
+
9
+ ## Role
10
+
11
+ Complements the API Testing Agent by providing Playwright APIRequestContext-specific patterns and constraints. The API agent handles structure and workflow; this specialist handles framework-specific decisions.
12
+
13
+ ## Focus
14
+
15
+ - Follow existing Playwright request context, fixture and API client conventions.
16
+ - Keep API clients thin and reusable using custom fixtures.
17
+ - Validate status, contract-relevant response fields and important side effects.
18
+ - Keep auth, test data setup and cleanup explicit.
19
+ - Do not change global Playwright config without approval.
20
+
21
+ ## APIRequestContext Pattern
22
+
23
+ ```typescript
24
+ // fixtures.ts — create API client as a fixture
25
+ import { test as base } from '@playwright/test';
26
+
27
+ export const test = base.extend<{ apiClient: APIRequestContext }>({
28
+ apiClient: async ({ playwright }, use) => {
29
+ const context = await playwright.request.newContext({
30
+ baseURL: process.env.API_BASE_URL,
31
+ extraHTTPHeaders: {
32
+ 'Authorization': `Bearer ${process.env.API_TOKEN}`,
33
+ 'Content-Type': 'application/json',
34
+ },
35
+ });
36
+ await use(context);
37
+ await context.dispose();
38
+ },
39
+ });
40
+ ```
41
+
42
+ ## Response Validation Pattern
43
+
44
+ ```typescript
45
+ test('create order returns expected structure', async ({ apiClient }) => {
46
+ const response = await apiClient.post('/orders', { data: orderPayload });
47
+
48
+ expect(response.status()).toBe(201);
49
+ const body = await response.json();
50
+ expect(body).toHaveProperty('id');
51
+ expect(body.status).toBe('pending');
52
+ expect(body.items).toHaveLength(orderPayload.items.length);
53
+ });
54
+ ```
55
+
56
+ ## Schema Validation
57
+
58
+ - Use Zod, JSON Schema, or TypeScript type guards for response shape validation.
59
+ - Validate schema in a reusable helper, not inline in every test.
60
+ - Separate "contract tests" (schema shape) from "behavior tests" (business logic).
61
+
62
+ ## Authentication Patterns
63
+
64
+ - Token-based: Generate token in a global setup, share via environment or fixture.
65
+ - Session-based: Create session in a `beforeAll` fixture, pass context with cookies.
66
+ - API Key: Load from environment variables, never hardcode.
67
+
68
+ ## Anti-Patterns to Avoid
69
+
70
+ - Hardcoding base URLs — use `baseURL` from config or environment.
71
+ - Not disposing request contexts — always dispose in fixture teardown.
72
+ - Testing implementation details (internal IDs, database state) — test observable behavior.
73
+ - Skipping status code validation — always assert status before parsing body.
74
+ - Chaining dependent API calls without assertions between them.
75
+
76
+ ## Test Data Management
77
+
78
+ - Create test data via API in setup, clean up in teardown.
79
+ - Use factory patterns for complex payloads.
80
+ - Never depend on pre-existing database state; tests must be self-contained.
81
+
82
+ ## Constraints
83
+
84
+ - Do not modify `playwright.config.*` without approval.
85
+ - Do not store API tokens or credentials in test files.
86
+ - Do not run destructive operations (DELETE, PATCH) on shared environments without safeguards.
87
+ - Use environment variables for all environment-specific configuration.
@@ -0,0 +1,87 @@
1
+ # Playwright UI Specialist
2
+
3
+ > Framework-specific guidance for UI/E2E automation with Playwright.
4
+
5
+ ## Activation
6
+
7
+ Use when `automation.ui.framework` is `playwright` or `playwright-ui`.
8
+
9
+ ## Role
10
+
11
+ Complements the UI Automation Implementation Agent by providing Playwright-specific patterns, fixtures and constraints. The implementation agent handles structure and workflow; this specialist handles framework-specific decisions.
12
+
13
+ ## Focus
14
+
15
+ - Follow existing Playwright test, fixture and page-object conventions.
16
+ - Prefer locators by role, label, text or test id over brittle CSS/XPath.
17
+ - Use Playwright auto-waiting and web-first assertions instead of fixed sleeps.
18
+ - Keep browser context, auth state, fixtures and test data isolated.
19
+ - Do not change Playwright global config without approval.
20
+
21
+ ## Locator Strategy (by priority)
22
+
23
+ 1. `page.getByRole('button', { name: '...' })` — semantic, accessible, stable.
24
+ 2. `page.getByLabel('...')` / `page.getByPlaceholder('...')` — form elements.
25
+ 3. `page.getByText('...')` — visible text content.
26
+ 4. `page.getByTestId('...')` — dedicated test attributes.
27
+ 5. `page.locator('css=...')` — last resort for complex cases.
28
+
29
+ ## Modern Fixture Pattern (POM + Fixtures)
30
+
31
+ ```typescript
32
+ // fixtures.ts — compose page objects as fixtures
33
+ import { test as base } from '@playwright/test';
34
+ import { LoginPage } from './pages/login.page';
35
+
36
+ export const test = base.extend<{ loginPage: LoginPage }>({
37
+ loginPage: async ({ page }, use) => {
38
+ await use(new LoginPage(page));
39
+ },
40
+ });
41
+ ```
42
+
43
+ Prefer fixture-based page object injection over manual instantiation in each test.
44
+
45
+ ## Authentication Pattern
46
+
47
+ ```typescript
48
+ // Use storageState for cached auth across tests
49
+ const authFile = '.auth/user.json';
50
+
51
+ setup('authenticate', async ({ page }) => {
52
+ await page.goto('/login');
53
+ await page.getByLabel('Email').fill(email);
54
+ await page.getByLabel('Password').fill(password);
55
+ await page.getByRole('button', { name: 'Sign in' }).click();
56
+ await page.context().storageState({ path: authFile });
57
+ });
58
+ ```
59
+
60
+ ## Debugging and Traces
61
+
62
+ - Use `trace: 'on-first-retry'` in config for CI debugging.
63
+ - Use `video: 'on-first-retry'` to capture failures.
64
+ - Use `await page.pause()` during development, never commit it.
65
+ - Use `test.describe.configure({ mode: 'serial' })` only when tests genuinely depend on order.
66
+
67
+ ## Anti-Patterns to Avoid
68
+
69
+ - `page.waitForTimeout(N)` — use `expect(locator).toBeVisible()` or similar assertions.
70
+ - `page.locator('.class-name')` as first choice — use semantic locators.
71
+ - Sharing page state between `test()` blocks — each test gets a fresh context by default.
72
+ - Using `{ force: true }` on clicks — fix the actionability issue instead.
73
+ - `page.$()` / `page.$$()` (ElementHandle API) — use Locator API instead.
74
+ - Manual `try/catch` around assertions — let Playwright's retry mechanism handle transient states.
75
+
76
+ ## Parallel Execution
77
+
78
+ - Tests run in parallel by default. Design for isolation.
79
+ - Use `test.describe.configure({ mode: 'parallel' })` explicitly for clarity.
80
+ - Workers share nothing; avoid filesystem-based shared state.
81
+
82
+ ## Constraints
83
+
84
+ - Do not modify `playwright.config.*` without approval.
85
+ - Do not add browser dependencies without approval.
86
+ - Do not use `page.evaluate()` for interactions when Locator API methods exist.
87
+ - Keep test data isolated; do not rely on shared database state between workers.
@@ -0,0 +1,108 @@
1
+ # Postman/Newman Specialist
2
+
3
+ > Framework-specific guidance for API testing with Postman collections and Newman CLI.
4
+
5
+ ## Activation
6
+
7
+ Use when `automation.api.framework` is `postman` or `newman`.
8
+
9
+ ## Role
10
+
11
+ Complements the API Testing Agent by providing Postman/Newman-specific patterns, variable strategies and constraints. The API agent handles structure and workflow; this specialist handles framework-specific decisions.
12
+
13
+ ## Focus
14
+
15
+ - Follow existing collection, environment and data-file conventions.
16
+ - Keep secrets out of collections and repository files.
17
+ - Prefer reusable variables and pre-request scripts only when they clarify repeated setup.
18
+ - Make assertions clear, stable and tied to acceptance criteria.
19
+ - Document Newman execution commands when tests cannot be run locally.
20
+
21
+ ## Collection Structure
22
+
23
+ ```
24
+ postman/
25
+ ├── collections/
26
+ │ ├── RF-042-authentication.postman_collection.json
27
+ │ └── RF-015-orders.postman_collection.json
28
+ ├── environments/
29
+ │ ├── local.postman_environment.json
30
+ │ └── staging.postman_environment.json
31
+ ├── data/
32
+ │ └── order-test-data.json
33
+ └── README.md (execution instructions)
34
+ ```
35
+
36
+ ## Variable Scopes (priority order)
37
+
38
+ 1. **Data variables** — from CSV/JSON data files (highest priority in iteration).
39
+ 2. **Environment variables** — environment-specific values (base URL, keys).
40
+ 3. **Collection variables** — shared defaults within a collection.
41
+ 4. **Global variables** — cross-collection shared values (use sparingly).
42
+
43
+ Never store secrets in collection or global variables committed to repo.
44
+
45
+ ## Pre-Request Script Patterns
46
+
47
+ ```javascript
48
+ // Token refresh in pre-request
49
+ if (!pm.environment.get('authToken') || tokenExpired()) {
50
+ pm.sendRequest({
51
+ url: pm.environment.get('baseUrl') + '/auth/token',
52
+ method: 'POST',
53
+ body: { mode: 'raw', raw: JSON.stringify({ ... }) }
54
+ }, (err, res) => {
55
+ pm.environment.set('authToken', res.json().token);
56
+ });
57
+ }
58
+ ```
59
+
60
+ Use pre-request scripts only for: auth token refresh, dynamic test data generation, timestamp/nonce creation.
61
+
62
+ ## Test (Assertion) Patterns
63
+
64
+ ```javascript
65
+ // Clear, tied to acceptance criteria
66
+ pm.test("RF-042 CA-1: Login returns 200 with token", () => {
67
+ pm.response.to.have.status(200);
68
+ const body = pm.response.json();
69
+ pm.expect(body.token).to.be.a('string').and.not.empty;
70
+ pm.expect(body.expiresIn).to.be.above(0);
71
+ });
72
+
73
+ pm.test("RF-042 CA-2: Invalid credentials return 401", () => {
74
+ pm.response.to.have.status(401);
75
+ pm.expect(pm.response.json().error).to.eql('Invalid credentials');
76
+ });
77
+ ```
78
+
79
+ ## Newman CI Execution
80
+
81
+ ```bash
82
+ # Basic execution
83
+ newman run collections/RF-042-auth.postman_collection.json \
84
+ -e environments/staging.postman_environment.json \
85
+ --reporters cli,junit \
86
+ --reporter-junit-export results/junit-report.xml
87
+
88
+ # Data-driven execution
89
+ newman run collections/RF-015-orders.postman_collection.json \
90
+ -d data/order-test-data.json \
91
+ -e environments/staging.postman_environment.json
92
+ ```
93
+
94
+ ## Anti-Patterns to Avoid
95
+
96
+ - Storing secrets (tokens, passwords, API keys) in collection or environment files committed to repo.
97
+ - Complex business logic in pre-request scripts — keep it simple, move complex logic to API-side.
98
+ - Tests that depend on execution order — each request should be independently runnable.
99
+ - Using global variables for request-specific data — scope correctly.
100
+ - Not documenting Newman execution commands — other team members need to run tests.
101
+ - Assertions that only check status code — validate response structure and business fields.
102
+
103
+ ## Constraints
104
+
105
+ - Do not commit environment files with real credentials to the repository.
106
+ - Do not use Postman Cloud sync for collections that contain sensitive test configurations.
107
+ - Document Newman execution commands in the collection's README.
108
+ - Keep collections importable/exportable (do not rely on Postman-specific cloud features for execution).