@qa-gentic/stlc-agents 1.0.4 → 1.0.6
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/README.md +175 -34
- package/bin/postinstall.js +100 -44
- package/bin/qa-stlc.js +26 -6
- package/package.json +2 -2
- package/skills/{qa-stlc/AGENT-BEHAVIOR.md → AGENT-BEHAVIOR.md} +7 -6
- package/skills/{qa-stlc/deduplication-protocol.md → deduplication-protocol/SKILL.md} +16 -21
- package/skills/generate-gherkin/SKILL.md +287 -0
- package/skills/generate-gherkin/references/step-by-step.md +267 -0
- package/skills/{qa-stlc/generate-playwright-code.md → generate-playwright-code/SKILL.md} +13 -23
- package/skills/{qa-stlc/generate-test-cases.md → generate-test-cases/SKILL.md} +16 -2
- package/skills/qa-jira-manager/SKILL.md +287 -0
- package/skills/{qa-stlc/write-helix-files.md → write-helix-files/SKILL.md} +11 -17
- package/src/{boilerplate-bundle.js → cli/boilerplate-bundle.js} +8 -8
- package/src/cli/cmd-init.js +145 -0
- package/src/{cmd-mcp-config.js → cli/cmd-mcp-config.js} +72 -9
- package/src/cli/cmd-skills.js +209 -0
- package/src/{cmd-verify.js → cli/cmd-verify.js} +35 -3
- package/src/cli/prompt-integration.js +87 -0
- package/src/stlc_agents/agent_helix_writer/tools/boilerplate.py +8 -8
- package/src/stlc_agents/agent_jira_manager/__init__.py +0 -0
- package/src/stlc_agents/agent_jira_manager/server.py +500 -0
- package/src/stlc_agents/agent_jira_manager/tools/__init__.py +0 -0
- package/src/stlc_agents/agent_jira_manager/tools/jira_workitem.py +467 -0
- package/src/stlc_agents/shared_jira/__init__.py +0 -0
- package/src/stlc_agents/shared_jira/auth.py +270 -0
- package/skills/qa-stlc/generate-gherkin.md +0 -550
- package/src/cmd-init.js +0 -92
- package/src/cmd-skills.js +0 -124
- /package/src/{cmd-scaffold.js → cli/cmd-scaffold.js} +0 -0
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: generate-test-cases
|
|
3
|
+
description: >-
|
|
4
|
+
Use when creating or generating manual test cases for an Azure DevOps PBI, Bug, User Story,
|
|
5
|
+
or Feature. Triggers on: "create test cases", "generate test cases", "link test cases",
|
|
6
|
+
"manual tests", "TestedBy", "ADO test cases". Never creates test cases for Epics. Always
|
|
7
|
+
confirms before creating test cases for a Feature.
|
|
8
|
+
license: MIT
|
|
9
|
+
compatibility: "Requires qa-test-case-manager MCP server. Azure DevOps connectivity required."
|
|
10
|
+
metadata:
|
|
11
|
+
author: qa-gentic
|
|
12
|
+
version: "1.1"
|
|
13
|
+
---
|
|
14
|
+
|
|
1
15
|
# Skill: Generate Test Cases from Azure DevOps Work Item
|
|
2
16
|
|
|
3
17
|
> **Read `AGENT-BEHAVIOR.md` before this skill.** The behavior rules there override any
|
|
@@ -35,8 +49,8 @@ If the user replies 'no' or 'cancel', abort and inform them no test cases were c
|
|
|
35
49
|
|
|
36
50
|
## ⛔ Mandatory Pre-Flight: Deduplication Protocol
|
|
37
51
|
|
|
38
|
-
Before executing any step below, run the deduplication protocol
|
|
39
|
-
`
|
|
52
|
+
Before executing any step below, run the deduplication protocol
|
|
53
|
+
(see the `deduplication-protocol` skill).
|
|
40
54
|
|
|
41
55
|
The protocol is **work-item-scoped**: PHASE 1 runs once per `work_item_id` and its results
|
|
42
56
|
are cached. If this skill is invoked for the same `work_item_id` that another agent already
|
|
@@ -0,0 +1,287 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: qa-jira-manager
|
|
3
|
+
description: >-
|
|
4
|
+
Use for Jira Cloud QA pipeline: fetch issues, analyse acceptance criteria, generate test cases,
|
|
5
|
+
link to source issues, then generate Gherkin and Playwright. Triggers on: "Jira", "PROJ-123",
|
|
6
|
+
"Jira test cases", "Jira story", "Atlassian". Supports Story, Bug, Task, Sub-task, and Epic
|
|
7
|
+
types. Mirrors the ADO pipeline using shared qa-gherkin-generator, qa-playwright-generator,
|
|
8
|
+
qa-helix-writer agents.
|
|
9
|
+
license: MIT
|
|
10
|
+
compatibility: "Requires qa-jira-manager MCP server. Also uses qa-gherkin-generator, qa-playwright-generator, qa-helix-writer for downstream steps. Works with Claude Code, GitHub Copilot, Cursor, Windsurf."
|
|
11
|
+
metadata:
|
|
12
|
+
author: qa-gentic
|
|
13
|
+
version: "1.0"
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
# qa-jira-manager — Skill Reference
|
|
17
|
+
|
|
18
|
+
> MCP agent for Jira Cloud: fetch work items, analyse acceptance criteria, generate
|
|
19
|
+
> structured test cases, and link them back to the source issue via Jira REST API v3.
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## Tool Reference
|
|
24
|
+
|
|
25
|
+
### `fetch_jira_issue`
|
|
26
|
+
|
|
27
|
+
Fetch a Story, Bug, Task, or Sub-task from Jira Cloud.
|
|
28
|
+
|
|
29
|
+
**Inputs**
|
|
30
|
+
|
|
31
|
+
| Parameter | Type | Required | Description |
|
|
32
|
+
|------------|--------|----------|---------------------------------------------------|
|
|
33
|
+
| `issue_key` | string | ✓ | Jira issue key, e.g. `PROJ-123` |
|
|
34
|
+
| `cloud_id` | string | | Atlassian cloud ID (falls back to `JIRA_CLOUD_ID` env var) |
|
|
35
|
+
|
|
36
|
+
**Returns**
|
|
37
|
+
|
|
38
|
+
```json
|
|
39
|
+
{
|
|
40
|
+
"work_item": {
|
|
41
|
+
"key": "PROJ-123",
|
|
42
|
+
"type": "Story",
|
|
43
|
+
"summary": "...",
|
|
44
|
+
"description": "...",
|
|
45
|
+
"acceptance_criteria": "...",
|
|
46
|
+
"status": "In Progress",
|
|
47
|
+
"priority": "High",
|
|
48
|
+
"assignee": "Jane Smith",
|
|
49
|
+
"labels": ["regression"],
|
|
50
|
+
"story_points": 5,
|
|
51
|
+
"project_key": "PROJ",
|
|
52
|
+
"epic_key": "PROJ-10"
|
|
53
|
+
},
|
|
54
|
+
"parent_issue": { "key": "PROJ-10", "type": "Epic", "summary": "..." },
|
|
55
|
+
"existing_test_cases_count": 0,
|
|
56
|
+
"coverage_hints": ["post_action_state", "cancel_flows"]
|
|
57
|
+
}
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
**Routing rules (strict — do not infer)**
|
|
61
|
+
|
|
62
|
+
| Issue type | Correct tool |
|
|
63
|
+
|-------------|----------------------------|
|
|
64
|
+
| Epic | `fetch_jira_epic_hierarchy` |
|
|
65
|
+
| Story/Bug/Task/Sub-task | `fetch_jira_issue` |
|
|
66
|
+
|
|
67
|
+
---
|
|
68
|
+
|
|
69
|
+
### `fetch_jira_epic_hierarchy`
|
|
70
|
+
|
|
71
|
+
Fetch a Jira Epic and enumerate all child issues.
|
|
72
|
+
|
|
73
|
+
**Inputs**
|
|
74
|
+
|
|
75
|
+
| Parameter | Type | Required | Description |
|
|
76
|
+
|-----------|--------|----------|------------------------|
|
|
77
|
+
| `epic_key` | string | ✓ | Epic issue key |
|
|
78
|
+
| `cloud_id` | string | | Atlassian cloud ID |
|
|
79
|
+
|
|
80
|
+
**Returns**
|
|
81
|
+
|
|
82
|
+
```json
|
|
83
|
+
{
|
|
84
|
+
"epic": { "key": "PROJ-10", "summary": "...", "project_key": "PROJ" },
|
|
85
|
+
"children": [
|
|
86
|
+
{ "key": "PROJ-11", "type": "Story", "summary": "...", "status": "Open" }
|
|
87
|
+
],
|
|
88
|
+
"child_count": 1
|
|
89
|
+
}
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
---
|
|
93
|
+
|
|
94
|
+
### `create_and_link_test_cases`
|
|
95
|
+
|
|
96
|
+
Create test case issues in Jira and link them to the source issue.
|
|
97
|
+
|
|
98
|
+
**Inputs**
|
|
99
|
+
|
|
100
|
+
| Parameter | Type | Required | Description |
|
|
101
|
+
|---------------|---------|----------|----------------------------------------------------------|
|
|
102
|
+
| `issue_key` | string | ✓ | Source Jira issue to link test cases to |
|
|
103
|
+
| `project_key` | string | | Project where test cases are created (defaults to source issue project) |
|
|
104
|
+
| `cloud_id` | string | | Atlassian cloud ID |
|
|
105
|
+
| `test_cases` | array | ✓ | Array of test case objects (see schema below) |
|
|
106
|
+
| `confirmed` | boolean | | `true` only when retrying after Epic confirmation |
|
|
107
|
+
|
|
108
|
+
**Test case object**
|
|
109
|
+
|
|
110
|
+
```json
|
|
111
|
+
{
|
|
112
|
+
"summary": "Verify upload success toast appears",
|
|
113
|
+
"priority": "High",
|
|
114
|
+
"labels": ["regression", "smoke"],
|
|
115
|
+
"steps": [
|
|
116
|
+
{ "action": "Navigate to the upload page", "expected_result": "Upload page is displayed" },
|
|
117
|
+
{ "action": "Upload a valid PNG file", "expected_result": "Toast 'Upload successful' appears within 3 s" }
|
|
118
|
+
]
|
|
119
|
+
}
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
**Priority values:** `Highest` · `High` (default) · `Medium` · `Low` · `Lowest`
|
|
123
|
+
|
|
124
|
+
**Epic confirmation gate**
|
|
125
|
+
|
|
126
|
+
When `issue_key` resolves to an Epic, the server returns `confirmation_required: true`
|
|
127
|
+
and creates nothing. Surface the message to the user, wait for confirmation, then
|
|
128
|
+
retry with `confirmed: true`. Do not change any other parameter.
|
|
129
|
+
|
|
130
|
+
---
|
|
131
|
+
|
|
132
|
+
### `get_linked_test_cases`
|
|
133
|
+
|
|
134
|
+
Return all issues linked to an issue via `is tested by` / `Test` link type.
|
|
135
|
+
|
|
136
|
+
**Inputs**
|
|
137
|
+
|
|
138
|
+
| Parameter | Type | Required |
|
|
139
|
+
|------------|--------|----------|
|
|
140
|
+
| `issue_key` | string | ✓ |
|
|
141
|
+
| `cloud_id` | string | |
|
|
142
|
+
|
|
143
|
+
---
|
|
144
|
+
|
|
145
|
+
## Recommended Workflow
|
|
146
|
+
|
|
147
|
+
The Jira pipeline mirrors the ADO pipeline exactly. After creating test cases in Jira,
|
|
148
|
+
continue with Gherkin generation, Playwright code generation, and Helix-QA file writing
|
|
149
|
+
using the shared agents (`qa-gherkin-generator`, `qa-playwright-generator`, `qa-helix-writer`).
|
|
150
|
+
|
|
151
|
+
```
|
|
152
|
+
Step 1 — Fetch the Jira issue
|
|
153
|
+
fetch_jira_issue(issue_key)
|
|
154
|
+
→ read summary, acceptance_criteria, coverage_hints
|
|
155
|
+
→ check existing_test_cases_count — if > 0 call get_linked_test_cases first
|
|
156
|
+
For Epics: use fetch_jira_epic_hierarchy instead, then process each child issue.
|
|
157
|
+
|
|
158
|
+
Step 2 — Analyse and generate test case objects
|
|
159
|
+
Use acceptance_criteria + coverage_hints to draft test cases.
|
|
160
|
+
Complexity → TC range:
|
|
161
|
+
1–3 story points → Simple → 3–6 test cases
|
|
162
|
+
4–8 story points → Medium → 6–12 test cases
|
|
163
|
+
9+ story points → Complex → 12–18 test cases
|
|
164
|
+
Show the user the proposed list and get explicit confirmation before Step 3.
|
|
165
|
+
|
|
166
|
+
Step 3 — Create test cases in Jira and link them
|
|
167
|
+
create_and_link_test_cases(issue_key, test_cases=[...])
|
|
168
|
+
→ created_test_cases[].issue_key contains the new Jira keys
|
|
169
|
+
→ link_result.linked_keys confirms the 'is tested by' links
|
|
170
|
+
Report created keys and direct browse URLs to the user.
|
|
171
|
+
|
|
172
|
+
Step 4 — Generate Gherkin feature file [shared agent: qa-gherkin-generator]
|
|
173
|
+
Use fetch_work_item_for_gherkin (pass the Jira issue key as the work item reference)
|
|
174
|
+
or use the acceptance_criteria already fetched in Step 1.
|
|
175
|
+
Navigate to the live screen in the browser before writing any scenario.
|
|
176
|
+
Follow all HARD STOP rules in generate-gherkin skill.
|
|
177
|
+
Ask the user whether to attach the .feature file to the Jira issue or save locally.
|
|
178
|
+
|
|
179
|
+
Step 5 — Generate Playwright TypeScript [shared agent: qa-playwright-generator]
|
|
180
|
+
Run validate_gherkin_steps → generate_playwright_code.
|
|
181
|
+
Ask the user whether to attach generated files to the Jira issue or save locally.
|
|
182
|
+
|
|
183
|
+
Step 6 — Write files to Helix-QA project [shared agent: qa-helix-writer]
|
|
184
|
+
Call qa-helix-writer with the generated locators.ts / *Page.ts / *.steps.ts files.
|
|
185
|
+
Follow write-helix-files skill for path conventions.
|
|
186
|
+
|
|
187
|
+
Step 7 — Report to user
|
|
188
|
+
Summarise: Jira test case keys created, .feature file location, Playwright files
|
|
189
|
+
written, and Helix-QA paths updated.
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
> **Zero-inference rule** (from AGENT-BEHAVIOR.md): each delivery step (attach to Jira,
|
|
193
|
+
> attach Playwright, write Helix) requires a **separate, explicit confirmation** from the user.
|
|
194
|
+
> Completing one step does NOT automatically trigger the next.
|
|
195
|
+
|
|
196
|
+
---
|
|
197
|
+
|
|
198
|
+
## Coverage Hint Categories
|
|
199
|
+
|
|
200
|
+
Use these to ensure test design covers edge cases beyond the happy path:
|
|
201
|
+
|
|
202
|
+
| Hint | Trigger keywords |
|
|
203
|
+
|------|-----------------|
|
|
204
|
+
| `toast_notifications` | toast, notification, success message, confirmation |
|
|
205
|
+
| `file_size_boundary` | mb, kb, size limit, file size, maximum size |
|
|
206
|
+
| `post_action_state` | display, shows, reflects, after upload, after save, updated |
|
|
207
|
+
| `platform_specific` | mobile, webview, ios, android |
|
|
208
|
+
| `computed_values` | initials, first name, last name, derived, generated |
|
|
209
|
+
| `data_persistence` | refresh, reload, re-login, persist, retained |
|
|
210
|
+
| `accessibility` | tab, keyboard, accessible, aria, wcag, a11y |
|
|
211
|
+
| `image_manipulation` | crop, resize, zoom, drag, rotate |
|
|
212
|
+
| `file_formats` | format, png, jpg, jpeg, webp, svg |
|
|
213
|
+
| `cancel_flows` | cancel, close, discard, dismiss |
|
|
214
|
+
| `validation_errors` | required, invalid, error, validation, must be |
|
|
215
|
+
|
|
216
|
+
---
|
|
217
|
+
|
|
218
|
+
## Authentication Setup
|
|
219
|
+
|
|
220
|
+
### Step 1 — Create an Atlassian OAuth 2.0 (3LO) app
|
|
221
|
+
|
|
222
|
+
1. Go to <https://developer.atlassian.com/console/myapps/>
|
|
223
|
+
2. Click **Create** → **OAuth 2.0 integration**
|
|
224
|
+
3. Add callback URL: `http://localhost:8765/callback`
|
|
225
|
+
4. Under **Permissions**, add:
|
|
226
|
+
- Jira API → `read:jira-user`, `read:jira-work`, `write:jira-work`
|
|
227
|
+
5. Copy the **Client ID** and **Secret**
|
|
228
|
+
|
|
229
|
+
### Step 2 — Find your Cloud ID
|
|
230
|
+
|
|
231
|
+
```bash
|
|
232
|
+
curl -H "Authorization: Bearer <any-token>" \
|
|
233
|
+
https://api.atlassian.com/oauth/token/accessible-resources
|
|
234
|
+
```
|
|
235
|
+
|
|
236
|
+
Copy the `id` field for your site.
|
|
237
|
+
|
|
238
|
+
### Step 3 — Add to `.env`
|
|
239
|
+
|
|
240
|
+
```env
|
|
241
|
+
JIRA_CLIENT_ID=your-client-id
|
|
242
|
+
JIRA_CLIENT_SECRET=your-client-secret
|
|
243
|
+
JIRA_CLOUD_ID=your-cloud-id
|
|
244
|
+
# Optional — defaults to http://localhost:8765/callback
|
|
245
|
+
JIRA_REDIRECT_URI=http://localhost:8765/callback
|
|
246
|
+
```
|
|
247
|
+
|
|
248
|
+
### Step 4 — First run
|
|
249
|
+
|
|
250
|
+
```bash
|
|
251
|
+
qa-jira-manager
|
|
252
|
+
```
|
|
253
|
+
|
|
254
|
+
The browser opens once. Sign in to Jira. The token is cached at
|
|
255
|
+
`~/.jira-cache/jira-token.json` and silently refreshed for ~60 days.
|
|
256
|
+
|
|
257
|
+
---
|
|
258
|
+
|
|
259
|
+
## MCP Config (VS Code / `.vscode/mcp.json`)
|
|
260
|
+
|
|
261
|
+
```json
|
|
262
|
+
{
|
|
263
|
+
"servers": {
|
|
264
|
+
"qa-jira-manager": {
|
|
265
|
+
"type": "stdio",
|
|
266
|
+
"command": "qa-jira-manager",
|
|
267
|
+
"env": {
|
|
268
|
+
"JIRA_CLIENT_ID": "${env:JIRA_CLIENT_ID}",
|
|
269
|
+
"JIRA_CLIENT_SECRET": "${env:JIRA_CLIENT_SECRET}",
|
|
270
|
+
"JIRA_CLOUD_ID": "${env:JIRA_CLOUD_ID}"
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
```
|
|
276
|
+
|
|
277
|
+
---
|
|
278
|
+
|
|
279
|
+
## Notes
|
|
280
|
+
|
|
281
|
+
- Steps are stored as an ADF table in the issue **description** — compatible with
|
|
282
|
+
Jira Software, Jira Service Management, and Xray-free environments.
|
|
283
|
+
- If your project does not have a **Test** issue type, the agent automatically
|
|
284
|
+
falls back to **Task** and adds a `qa-test-case` label.
|
|
285
|
+
- The link type used is **Test** (Jira's built-in test link type). If that link
|
|
286
|
+
type does not exist in your instance, the agent falls back to **Relates**.
|
|
287
|
+
- `cloud_id` can be omitted on every call if `JIRA_CLOUD_ID` is set in `.env`.
|
|
@@ -1,22 +1,16 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: write-helix-files
|
|
3
|
-
description:
|
|
4
|
-
Use
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
compatibility:
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
- qa-helix-writer:read_helix_file
|
|
15
|
-
- qa-helix-writer:write_helix_files
|
|
16
|
-
- qa-helix-writer:update_helix_file
|
|
17
|
-
- qa-playwright-generator:generate_playwright_code
|
|
18
|
-
- qa-playwright-generator:scaffold_locator_repository
|
|
19
|
-
- qa-playwright-generator:pre_validate_cucumber_steps
|
|
3
|
+
description: >-
|
|
4
|
+
Use when placing generated Playwright TypeScript files into a Helix-QA project on disk.
|
|
5
|
+
Triggers after generate-playwright-code or scaffold_locator_repository has produced a
|
|
6
|
+
files dict. Triggers on: "write to helix", "helix-qa", "write files to disk", "write
|
|
7
|
+
locators", "write page objects", "write step definitions", "inspect helix", "helix root".
|
|
8
|
+
Always calls inspect_helix_project first.
|
|
9
|
+
license: MIT
|
|
10
|
+
compatibility: "Requires qa-helix-writer, qa-playwright-generator MCP servers."
|
|
11
|
+
metadata:
|
|
12
|
+
author: qa-gentic
|
|
13
|
+
version: "1.1"
|
|
20
14
|
---
|
|
21
15
|
|
|
22
16
|
# Write Helix Files Skill
|