@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
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @qa-gentic/stlc-agents
|
|
2
2
|
|
|
3
|
-
> AI-powered QA STLC automation — from Azure DevOps work item to self-healing Playwright TypeScript in a Helix-QA project.
|
|
3
|
+
> AI-powered QA STLC automation — from Azure DevOps **or Jira Cloud** work item to self-healing Playwright TypeScript in a Helix-QA project.
|
|
4
4
|
|
|
5
5
|
Works with **GitHub Copilot** (VS Code Agent mode), **Claude Code**, **Cursor**, and **Windsurf**.
|
|
6
6
|
|
|
@@ -14,16 +14,19 @@ Works with **GitHub Copilot** (VS Code Agent mode), **Claude Code**, **Cursor**,
|
|
|
14
14
|
|
|
15
15
|
## What It Does
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
Five Python MCP servers cover the full QA Software Test Life Cycle:
|
|
18
18
|
|
|
19
19
|
| Agent | Input | Output |
|
|
20
20
|
|---|---|---|
|
|
21
21
|
| `qa-test-case-manager` | ADO PBI / Bug / Feature ID | Manual test cases created & linked via TestedBy-Forward |
|
|
22
|
-
| `qa-gherkin-generator` | ADO Epic / Feature / PBI / Bug ID | `.feature` file attached to
|
|
23
|
-
| `qa-playwright-generator` | Gherkin + live browser | `locators.ts` + page objects + step defs attached to ADO |
|
|
22
|
+
| `qa-gherkin-generator` | ADO / Jira Epic / Feature / PBI / Bug ID | `.feature` file attached to ADO work item or saved locally |
|
|
23
|
+
| `qa-playwright-generator` | Gherkin + live browser | `locators.ts` + page objects + step defs attached to ADO or saved locally |
|
|
24
24
|
| `qa-helix-writer` | Generated `.ts` files + `helix_root` | Files written to Helix-QA directory layout on disk |
|
|
25
|
+
| `qa-jira-manager` | **Jira** Story / Bug / Task / Epic | Test cases created in Jira → Gherkin → Playwright TypeScript → Helix-QA files |
|
|
25
26
|
|
|
26
|
-
A
|
|
27
|
+
A sixth server — **Playwright MCP** (`http://localhost:8931/mcp`) — drives a real browser during code generation, replacing hand-authored locators with accessibility-tree-derived, zero-hallucination selectors.
|
|
28
|
+
|
|
29
|
+
> **ADO or Jira?** Both pipelines now run the full STLC: fetch → analyse → test cases → Gherkin → Playwright → Helix-QA. ADO uses `qa-test-case-manager` as the entry point; Jira uses `qa-jira-manager`. Agents 2–4 (`qa-gherkin-generator`, `qa-playwright-generator`, `qa-helix-writer`) are shared by both pipelines.
|
|
27
30
|
|
|
28
31
|
---
|
|
29
32
|
|
|
@@ -31,12 +34,17 @@ A fifth server — **Playwright MCP** (`http://localhost:8931/mcp`) — drives a
|
|
|
31
34
|
|
|
32
35
|
```bash
|
|
33
36
|
# 1. Install the CLI + npm package globally
|
|
37
|
+
# You will be prompted to choose your integration: ado / jira / both
|
|
38
|
+
# The choice is saved to ~/.qa-stlc/integration and reused by all subsequent commands.
|
|
34
39
|
npm install -g @qa-gentic/stlc-agents
|
|
35
40
|
|
|
36
41
|
# 2. Bootstrap your project (installs Python agents, copies skills, writes MCP config)
|
|
37
|
-
|
|
38
|
-
#
|
|
39
|
-
qa-stlc init
|
|
42
|
+
# --integration overrides the saved preference; omit to reuse the choice from step 1.
|
|
43
|
+
qa-stlc init --vscode --integration ado # GitHub Copilot / VS Code — ADO pipeline
|
|
44
|
+
qa-stlc init --vscode --integration jira # GitHub Copilot / VS Code — Jira pipeline
|
|
45
|
+
qa-stlc init --vscode --integration both # GitHub Copilot / VS Code — both pipelines
|
|
46
|
+
# or for Claude Code (no --vscode flag):
|
|
47
|
+
qa-stlc init --integration ado
|
|
40
48
|
|
|
41
49
|
# 3. Scaffold a new Playwright + Cucumber + TypeScript QA project
|
|
42
50
|
qa-stlc scaffold --name my-qa-project
|
|
@@ -47,10 +55,15 @@ qa-stlc scaffold --name acme-e2e --dir /path/to/acme-e2e
|
|
|
47
55
|
npx @playwright/mcp@latest --port 8931
|
|
48
56
|
```
|
|
49
57
|
|
|
50
|
-
`qa-stlc init` does
|
|
51
|
-
1. `pip install qa-gentic-stlc-agents` — installs
|
|
58
|
+
`qa-stlc init` does four things:
|
|
59
|
+
1. `pip install qa-gentic-stlc-agents` — installs all five Python MCP servers
|
|
52
60
|
2. Copies skill files to `.github/copilot-instructions/` (and `.claude/` if not `--vscode`)
|
|
53
|
-
3.
|
|
61
|
+
3. Copies custom agent files to `.github/agents/` (used by GitHub Copilot and Claude's agent picker)
|
|
62
|
+
4. Writes `.vscode/mcp.json` with all six servers configured
|
|
63
|
+
|
|
64
|
+
> **Integration flag:** `--integration` controls which agents and skill files are installed.
|
|
65
|
+
> If omitted, the value saved during `npm install -g` is used.
|
|
66
|
+
> You can change it at any time by re-running `qa-stlc init --integration <ado|jira|both>`.
|
|
54
67
|
|
|
55
68
|
---
|
|
56
69
|
|
|
@@ -58,7 +71,7 @@ npx @playwright/mcp@latest --port 8931
|
|
|
58
71
|
|
|
59
72
|
- Node.js ≥ 18
|
|
60
73
|
- Python ≥ 3.10, < 3.14
|
|
61
|
-
- Azure DevOps
|
|
74
|
+
- For **Azure DevOps** (Agents 1–4) — a `.env` containing:
|
|
62
75
|
|
|
63
76
|
```env
|
|
64
77
|
ADO_ORGANIZATION_URL=https://dev.azure.com/your-org
|
|
@@ -69,13 +82,26 @@ APP_EMAIL=your-test-email@example.com
|
|
|
69
82
|
APP_PASSWORD=your-test-password
|
|
70
83
|
```
|
|
71
84
|
|
|
85
|
+
- For **Jira Cloud** (Agent 5) — additional `.env` vars:
|
|
86
|
+
|
|
87
|
+
```env
|
|
88
|
+
JIRA_CLIENT_ID=your-atlassian-oauth-client-id
|
|
89
|
+
JIRA_CLIENT_SECRET=your-atlassian-oauth-client-secret
|
|
90
|
+
JIRA_CLOUD_ID=your-atlassian-cloud-id
|
|
91
|
+
# Optional — defaults to http://localhost:8765/callback
|
|
92
|
+
# JIRA_REDIRECT_URI=http://localhost:8765/callback
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
See [Jira Authentication Setup](#jira-authentication-setup) for how to obtain these values.
|
|
96
|
+
|
|
72
97
|
---
|
|
73
98
|
|
|
74
99
|
## Commands
|
|
75
100
|
|
|
76
101
|
```bash
|
|
77
|
-
qa-stlc init [--vscode] [--python <path>]
|
|
78
|
-
# Full bootstrap: pip install + skills + MCP config
|
|
102
|
+
qa-stlc init [--vscode] [--python <path>] [--integration ado|jira|both]
|
|
103
|
+
# Full bootstrap: pip install + skills + agent files + MCP config
|
|
104
|
+
# Integration defaults to the value saved during npm install -g (prompted at that time)
|
|
79
105
|
|
|
80
106
|
qa-stlc scaffold [--name <name>] [--dir <path>] [--no-install]
|
|
81
107
|
# Copy full Playwright + Cucumber + TypeScript boilerplate to a new project directory
|
|
@@ -87,7 +113,7 @@ qa-stlc mcp-config [--vscode] [--print] [--python <path>] [--playwright-port <n>
|
|
|
87
113
|
# Write .vscode/mcp.json (--vscode) or .mcp.json (Claude Code)
|
|
88
114
|
|
|
89
115
|
qa-stlc verify
|
|
90
|
-
# Check that all
|
|
116
|
+
# Check that all six MCP servers are reachable
|
|
91
117
|
```
|
|
92
118
|
|
|
93
119
|
---
|
|
@@ -97,13 +123,19 @@ qa-stlc verify
|
|
|
97
123
|
Open your AI coding agent and use natural language:
|
|
98
124
|
|
|
99
125
|
```
|
|
100
|
-
# Generate test cases
|
|
126
|
+
# Azure DevOps — Generate test cases
|
|
101
127
|
Generate test cases for work item #12345 in MyProject at https://dev.azure.com/myorg
|
|
102
128
|
|
|
103
|
-
# Generate Gherkin BDD
|
|
129
|
+
# Azure DevOps — Generate Gherkin BDD
|
|
104
130
|
Generate a Gherkin regression suite for Feature #11000 in MyProject at https://dev.azure.com/myorg
|
|
105
131
|
|
|
106
|
-
#
|
|
132
|
+
# Jira — Fetch issue and generate test cases
|
|
133
|
+
Generate test cases for Jira issue PROJ-123
|
|
134
|
+
|
|
135
|
+
# Jira — Fetch an Epic hierarchy
|
|
136
|
+
Fetch the full Epic hierarchy for PROJ-10 in Jira
|
|
137
|
+
|
|
138
|
+
# Generate Playwright code (requires Playwright MCP running — works with both ADO and Jira flows)
|
|
107
139
|
Generate Playwright TypeScript for the Gherkin I just created. The login page is at /auth/login
|
|
108
140
|
|
|
109
141
|
# Write to Helix-QA project
|
|
@@ -114,7 +146,7 @@ Write the generated files to my Helix-QA project at /workspace/my-qa-project
|
|
|
114
146
|
|
|
115
147
|
## Tool Reference
|
|
116
148
|
|
|
117
|
-
### qa-test-case-manager
|
|
149
|
+
### qa-test-case-manager _(Azure DevOps)_
|
|
118
150
|
|
|
119
151
|
| Tool | Description |
|
|
120
152
|
|---|---|
|
|
@@ -122,7 +154,7 @@ Write the generated files to my Helix-QA project at /workspace/my-qa-project
|
|
|
122
154
|
| `get_linked_test_cases` | List all test cases already linked to a work item. Call before generating to power the deduplication diff. |
|
|
123
155
|
| `create_and_link_test_cases` | Create structured manual test cases in ADO and link them via TestedBy-Forward. |
|
|
124
156
|
|
|
125
|
-
### qa-gherkin-generator
|
|
157
|
+
### qa-gherkin-generator _(Azure DevOps)_
|
|
126
158
|
|
|
127
159
|
| Tool | Description |
|
|
128
160
|
|---|---|
|
|
@@ -133,7 +165,7 @@ Write the generated files to my Helix-QA project at /workspace/my-qa-project
|
|
|
133
165
|
| `attach_gherkin_to_work_item` | Validate and attach a `.feature` file to a PBI or Bug work item. |
|
|
134
166
|
| `validate_gherkin_content` | Structural validation — tags, scenario count, navigation steps. Returns `valid: bool` + `errors` + `warnings`. |
|
|
135
167
|
|
|
136
|
-
### qa-playwright-generator
|
|
168
|
+
### qa-playwright-generator _(ADO + Jira)_
|
|
137
169
|
|
|
138
170
|
| Tool | Description |
|
|
139
171
|
|---|---|
|
|
@@ -142,7 +174,7 @@ Write the generated files to my Helix-QA project at /workspace/my-qa-project
|
|
|
142
174
|
| `validate_gherkin_steps` | Check for duplicate step strings and missing `When` steps. |
|
|
143
175
|
| `attach_code_to_work_item` | Attach delta Playwright TypeScript files to an ADO work item. Pass only net-new delta files. |
|
|
144
176
|
|
|
145
|
-
### qa-helix-writer
|
|
177
|
+
### qa-helix-writer _(ADO + Jira)_
|
|
146
178
|
|
|
147
179
|
| Tool | Description |
|
|
148
180
|
|---|---|
|
|
@@ -151,7 +183,16 @@ Write the generated files to my Helix-QA project at /workspace/my-qa-project
|
|
|
151
183
|
| `read_helix_file` | Read an existing file from the Helix-QA project for overlap detection. |
|
|
152
184
|
| `write_helix_files` | Write generated files to the correct Helix-QA paths. |
|
|
153
185
|
|
|
154
|
-
###
|
|
186
|
+
### qa-jira-manager _(Jira Cloud)_
|
|
187
|
+
|
|
188
|
+
| Tool | Description |
|
|
189
|
+
|---|---|
|
|
190
|
+
| `fetch_jira_issue` | Fetch a Story, Bug, or Task with acceptance criteria, coverage hints, and existing linked test case count. Returns `epic_use_hierarchy` for Epics. |
|
|
191
|
+
| `fetch_jira_epic_hierarchy` | Fetch an Epic with all child issues (Stories, Tasks, Bugs, Sub-tasks). |
|
|
192
|
+
| `create_and_link_test_cases` | Create test case issues in Jira (type `Test`, falls back to `Task`) and link them via `is tested by`. Steps stored as an ADF table — no Xray required. Returns `confirmation_required: true` for Epics. |
|
|
193
|
+
| `get_linked_test_cases` | List all issues linked to a Jira issue via `is tested by` / `Test` link type. Call before generating to avoid duplicates. |
|
|
194
|
+
|
|
195
|
+
### playwright _(external)_
|
|
155
196
|
|
|
156
197
|
| Tool | Description |
|
|
157
198
|
|---|---|
|
|
@@ -174,6 +215,14 @@ Write the generated files to my Helix-QA project at /workspace/my-qa-project
|
|
|
174
215
|
"qa-gherkin-generator": { "command": "/path/to/.venv/bin/qa-gherkin-generator" },
|
|
175
216
|
"qa-playwright-generator": { "command": "/path/to/.venv/bin/qa-playwright-generator" },
|
|
176
217
|
"qa-helix-writer": { "command": "/path/to/.venv/bin/qa-helix-writer" },
|
|
218
|
+
"qa-jira-manager": {
|
|
219
|
+
"command": "/path/to/.venv/bin/qa-jira-manager",
|
|
220
|
+
"env": {
|
|
221
|
+
"JIRA_CLIENT_ID": "${env:JIRA_CLIENT_ID}",
|
|
222
|
+
"JIRA_CLIENT_SECRET": "${env:JIRA_CLIENT_SECRET}",
|
|
223
|
+
"JIRA_CLOUD_ID": "${env:JIRA_CLOUD_ID}"
|
|
224
|
+
}
|
|
225
|
+
},
|
|
177
226
|
"playwright": { "type": "http", "url": "http://localhost:8931/mcp" }
|
|
178
227
|
}
|
|
179
228
|
}
|
|
@@ -188,6 +237,14 @@ Write the generated files to my Helix-QA project at /workspace/my-qa-project
|
|
|
188
237
|
"qa-gherkin-generator": { "command": "/path/to/.venv/bin/qa-gherkin-generator" },
|
|
189
238
|
"qa-playwright-generator": { "command": "/path/to/.venv/bin/qa-playwright-generator" },
|
|
190
239
|
"qa-helix-writer": { "command": "/path/to/.venv/bin/qa-helix-writer" },
|
|
240
|
+
"qa-jira-manager": {
|
|
241
|
+
"command": "/path/to/.venv/bin/qa-jira-manager",
|
|
242
|
+
"env": {
|
|
243
|
+
"JIRA_CLIENT_ID": "${env:JIRA_CLIENT_ID}",
|
|
244
|
+
"JIRA_CLIENT_SECRET": "${env:JIRA_CLIENT_SECRET}",
|
|
245
|
+
"JIRA_CLOUD_ID": "${env:JIRA_CLOUD_ID}"
|
|
246
|
+
}
|
|
247
|
+
},
|
|
191
248
|
"playwright": { "type": "url", "url": "ws://localhost:8931" }
|
|
192
249
|
}
|
|
193
250
|
}
|
|
@@ -201,14 +258,75 @@ Write the generated files to my Helix-QA project at /workspace/my-qa-project
|
|
|
201
258
|
|
|
202
259
|
## Skills Installed
|
|
203
260
|
|
|
261
|
+
Skills follow the [Agent Skills specification](https://agentskills.io/specification) and live under `skills/<n>/SKILL.md`.
|
|
262
|
+
|
|
204
263
|
| Skill | Purpose |
|
|
205
264
|
|---|---|
|
|
206
265
|
| `AGENT-BEHAVIOR.md` | Zero-inference contract. Read first. Always. |
|
|
207
|
-
| `generate-test-cases.md` | PBI / Bug / Feature → ADO manual test cases |
|
|
208
|
-
| `generate-gherkin.md` | Epic / Feature / PBI / Bug → validated `.feature` + ADO attach |
|
|
209
|
-
| `generate-playwright-code.md` | Gherkin + live browser → three-layer self-healing Playwright TypeScript |
|
|
210
|
-
| `write-helix-files.md` | Generated files → Helix-QA disk layout, scaffold or merge |
|
|
211
|
-
| `deduplication-protocol.md` | READ → DIFF → CREATE mandatory pre-flight gate |
|
|
266
|
+
| `generate-test-cases/SKILL.md` | PBI / Bug / Feature → ADO manual test cases |
|
|
267
|
+
| `generate-gherkin/SKILL.md` | Epic / Feature / PBI / Bug → validated `.feature` + ADO attach |
|
|
268
|
+
| `generate-playwright-code/SKILL.md` | Gherkin + live browser → three-layer self-healing Playwright TypeScript |
|
|
269
|
+
| `write-helix-files/SKILL.md` | Generated files → Helix-QA disk layout, scaffold or merge |
|
|
270
|
+
| `deduplication-protocol/SKILL.md` | READ → DIFF → CREATE mandatory pre-flight gate |
|
|
271
|
+
| `qa-jira-manager/SKILL.md` | Jira issue → test case issues + `is tested by` links |
|
|
272
|
+
|
|
273
|
+
> **Installed copies** (`.claude/skills/`, `.github/copilot-instructions/`) are generated by
|
|
274
|
+
> `qa-stlc init` / `qa-stlc skills` at project bootstrap time and are gitignored.
|
|
275
|
+
> The canonical source for all skills is the `skills/` directory.
|
|
276
|
+
|
|
277
|
+
---
|
|
278
|
+
|
|
279
|
+
## Jira Authentication Setup
|
|
280
|
+
|
|
281
|
+
`qa-jira-manager` uses **Jira OAuth 2.0 (3LO)** with a persistent file-based token cache
|
|
282
|
+
at `~/.jira-cache/jira-token.json` — the same silent-cache / browser-fallback pattern
|
|
283
|
+
used by the ADO MSAL auth module.
|
|
284
|
+
|
|
285
|
+
### Step 1 — Create an Atlassian OAuth 2.0 (3LO) app
|
|
286
|
+
|
|
287
|
+
1. Go to <https://developer.atlassian.com/console/myapps/>
|
|
288
|
+
2. Click **Create** → **OAuth 2.0 integration**
|
|
289
|
+
3. Add callback URL: `http://localhost:8765/callback`
|
|
290
|
+
4. Under **Permissions**, enable: `read:jira-user`, `read:jira-work`, `write:jira-work`, `offline_access`
|
|
291
|
+
5. Copy the **Client ID** and **Secret**
|
|
292
|
+
|
|
293
|
+
### Step 2 — Find your Cloud ID
|
|
294
|
+
|
|
295
|
+
```bash
|
|
296
|
+
curl -H "Authorization: Bearer <any-token>" \
|
|
297
|
+
https://api.atlassian.com/oauth/token/accessible-resources
|
|
298
|
+
```
|
|
299
|
+
|
|
300
|
+
Copy the `id` field for your Jira site.
|
|
301
|
+
|
|
302
|
+
### Step 3 — Add to `.env`
|
|
303
|
+
|
|
304
|
+
```env
|
|
305
|
+
JIRA_CLIENT_ID=your-client-id
|
|
306
|
+
JIRA_CLIENT_SECRET=your-client-secret
|
|
307
|
+
JIRA_CLOUD_ID=your-cloud-id
|
|
308
|
+
```
|
|
309
|
+
|
|
310
|
+
### Step 4 — First run
|
|
311
|
+
|
|
312
|
+
The browser opens once on startup. Sign in to Jira. The token is cached silently
|
|
313
|
+
and refreshed automatically for ~60 days — no re-prompting.
|
|
314
|
+
|
|
315
|
+
---
|
|
316
|
+
|
|
317
|
+
## Workflow Comparison: ADO vs Jira
|
|
318
|
+
|
|
319
|
+
| Step | Azure DevOps | Jira Cloud |
|
|
320
|
+
|---|---|---|
|
|
321
|
+
| Fetch issue | `fetch_work_item` | `fetch_jira_issue` |
|
|
322
|
+
| Fetch Epic hierarchy | `fetch_epic_hierarchy` | `fetch_jira_epic_hierarchy` |
|
|
323
|
+
| Check for duplicates | `get_linked_test_cases` | `get_linked_test_cases` |
|
|
324
|
+
| Create & link test cases | `create_and_link_test_cases` | `create_and_link_test_cases` |
|
|
325
|
+
| Generate Gherkin | `fetch_work_item_for_gherkin` → `attach_gherkin_to_work_item` | `qa-gherkin-generator` with Jira issue AC (save locally or attach to Jira) |
|
|
326
|
+
| Generate Playwright | `generate_playwright_code` (shared) | `generate_playwright_code` (shared) |
|
|
327
|
+
| Write to disk | `write_helix_files` (shared) | `write_helix_files` (shared) |
|
|
328
|
+
| Authentication | MSAL silent + browser (`~/.msal-cache/`) | OAuth 2.0 (3LO) + browser (`~/.jira-cache/`) |
|
|
329
|
+
| Link relation | `TestedBy-Forward` | `is tested by` / `Test` link type |
|
|
212
330
|
|
|
213
331
|
---
|
|
214
332
|
|
|
@@ -295,18 +413,41 @@ HEALIX_CI_AUTO_APPROVE=true npm run healix:apply-ci
|
|
|
295
413
|
## Development
|
|
296
414
|
|
|
297
415
|
```bash
|
|
298
|
-
|
|
299
|
-
make
|
|
300
|
-
make
|
|
301
|
-
make
|
|
302
|
-
|
|
416
|
+
# Install (all five agents from one pip package)
|
|
417
|
+
make install-ado # install + ADO next steps
|
|
418
|
+
make install-jira # install + Jira next steps
|
|
419
|
+
make install-both # install + Both next steps
|
|
420
|
+
|
|
421
|
+
# Verify
|
|
422
|
+
make verify-ado # ADO agents + MSAL auth cache
|
|
423
|
+
make verify-jira # Jira agents + OAuth token cache
|
|
424
|
+
make verify-both # all agents + both auth caches
|
|
425
|
+
|
|
426
|
+
# Skills
|
|
427
|
+
make skills-ado # ADO skill files → .claude/skills/ + copilot-instructions/
|
|
428
|
+
make skills-jira # Jira skill files
|
|
429
|
+
make skills-both # all skill files
|
|
430
|
+
|
|
431
|
+
# MCP config
|
|
432
|
+
make mcp-config-ado # write .mcp.json for ADO pipeline
|
|
433
|
+
make mcp-config-jira # write .mcp.json for Jira pipeline
|
|
434
|
+
make mcp-config-both # write .mcp.json for both pipelines
|
|
435
|
+
|
|
436
|
+
# Test + clean
|
|
437
|
+
make test # run pytest tests/ -v
|
|
438
|
+
make clean # remove .venv, __pycache__, dist
|
|
303
439
|
```
|
|
304
440
|
|
|
305
441
|
---
|
|
306
442
|
|
|
307
443
|
## Documentation
|
|
308
444
|
|
|
309
|
-
- [Quick Start
|
|
445
|
+
- [Quick Start: Azure DevOps](QUICKSTART-ADO.md)
|
|
446
|
+
- [Quick Start: Jira Cloud](QUICKSTART-JIRA.md)
|
|
447
|
+
- [Architecture: ADO](ARCHITECTURE-ADO.md)
|
|
448
|
+
- [Architecture: Jira](ARCHITECTURE-JIRA.md)
|
|
449
|
+
- [Walkthrough: ADO](WALKTHROUGH-ADO.md)
|
|
450
|
+
- [Walkthrough: Jira](WALKTHROUGH-JIRA.md)
|
|
310
451
|
- [Architecture Reference](docs/architecture.md)
|
|
311
452
|
- [End-to-End Walkthrough](docs/walkthrough.md)
|
|
312
453
|
|
package/bin/postinstall.js
CHANGED
|
@@ -1,78 +1,134 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
/**
|
|
3
|
-
* postinstall.js — Auto-install Python MCP servers after
|
|
3
|
+
* postinstall.js — Auto-install Python MCP servers after npm install -g
|
|
4
|
+
*
|
|
5
|
+
* Asks the user which integration they need (ADO / Jira / Both) and installs
|
|
6
|
+
* only the relevant Python agents. In non-interactive (CI) environments the
|
|
7
|
+
* prompt is skipped and the default (ado) is used.
|
|
8
|
+
*
|
|
9
|
+
* The chosen value is persisted to ~/.qa-stlc/integration so that
|
|
10
|
+
* `qa-stlc init`, `qa-stlc mcp-config`, and `qa-stlc verify` all read it
|
|
11
|
+
* without asking again.
|
|
4
12
|
*/
|
|
5
13
|
"use strict";
|
|
6
14
|
|
|
7
|
-
const { spawnSync }
|
|
8
|
-
const
|
|
15
|
+
const { spawnSync } = require("child_process");
|
|
16
|
+
const path = require("path");
|
|
17
|
+
const fs = require("fs");
|
|
18
|
+
const os = require("os");
|
|
19
|
+
const pickIntegration = require("../src/cli/prompt-integration");
|
|
20
|
+
const pkg = require("../package.json");
|
|
9
21
|
|
|
10
22
|
const C = {
|
|
11
|
-
reset: "\x1b[0m",
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
cyan: "\x1b[36m",
|
|
15
|
-
yellow: "\x1b[33m",
|
|
16
|
-
red: "\x1b[31m",
|
|
17
|
-
dim: "\x1b[2m",
|
|
23
|
+
reset: "\x1b[0m", bold: "\x1b[1m",
|
|
24
|
+
green: "\x1b[32m", cyan: "\x1b[36m",
|
|
25
|
+
yellow: "\x1b[33m", red: "\x1b[31m", dim: "\x1b[2m",
|
|
18
26
|
};
|
|
19
27
|
|
|
20
|
-
const b
|
|
21
|
-
const ok
|
|
28
|
+
const b = (s) => `${C.bold}${s}${C.reset}`;
|
|
29
|
+
const ok = (s) => console.log(`${C.green}✓${C.reset} ${s}`);
|
|
22
30
|
const info = (s) => console.log(`${C.cyan}→${C.reset} ${s}`);
|
|
23
31
|
const warn = (s) => console.log(`${C.yellow}⚠${C.reset} ${s}`);
|
|
24
|
-
const y
|
|
25
|
-
const d
|
|
32
|
+
const y = (s) => `${C.yellow}${s}${C.reset}`;
|
|
33
|
+
const d = (s) => `${C.dim}${s}${C.reset}`;
|
|
26
34
|
|
|
27
|
-
|
|
35
|
+
// Persistent preference file — shared with cmd-init / cmd-mcp-config / cmd-verify
|
|
36
|
+
const PREF_DIR = path.join(os.homedir(), ".qa-stlc");
|
|
37
|
+
const PREF_FILE = path.join(PREF_DIR, "integration");
|
|
28
38
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
if (r.status === 0) { python = candidate; break; }
|
|
39
|
+
function savePreference(value) {
|
|
40
|
+
try {
|
|
41
|
+
fs.mkdirSync(PREF_DIR, { recursive: true });
|
|
42
|
+
fs.writeFileSync(PREF_FILE, value, "utf8");
|
|
43
|
+
} catch (_) { /* non-fatal */ }
|
|
35
44
|
}
|
|
36
45
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
// ──
|
|
46
|
+
console.log(`\n${b("QA STLC Agents")} v${pkg.version} — post-install\n`);
|
|
47
|
+
|
|
48
|
+
// ── Async main ───────────────────────────────────────────────────────────────
|
|
49
|
+
(async () => {
|
|
50
|
+
|
|
51
|
+
// ── 1. Find Python ─────────────────────────────────────────────────────────
|
|
52
|
+
const pythonCandidates = ["python3", "python"];
|
|
53
|
+
let python = null;
|
|
54
|
+
for (const candidate of pythonCandidates) {
|
|
55
|
+
const r = spawnSync(candidate, ["--version"], { encoding: "utf8" });
|
|
56
|
+
if (r.status === 0) { python = candidate; break; }
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
if (!python) {
|
|
60
|
+
warn("Python not found — skipping pip install.");
|
|
61
|
+
warn("Run manually after installing Python 3.10+:");
|
|
62
|
+
warn(" pip install qa-gentic-stlc-agents");
|
|
63
|
+
printNextSteps("ado");
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
// ── 2. Ask which integration ──────────────────────────────────────────────
|
|
68
|
+
const integration = await pickIntegration("ado");
|
|
69
|
+
savePreference(integration);
|
|
70
|
+
|
|
71
|
+
// ── 3. pip install ────────────────────────────────────────────────────────
|
|
43
72
|
info("Installing qa-gentic-stlc-agents via pip…");
|
|
44
|
-
const pip = spawnSync(
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
73
|
+
const pip = spawnSync(
|
|
74
|
+
python,
|
|
75
|
+
["-m", "pip", "install", "qa-gentic-stlc-agents", "--upgrade", "--quiet"],
|
|
76
|
+
{ stdio: "inherit", encoding: "utf8" }
|
|
77
|
+
);
|
|
48
78
|
|
|
49
79
|
if (pip.status === 0) {
|
|
50
80
|
ok("qa-gentic-stlc-agents installed.");
|
|
51
81
|
} else {
|
|
52
82
|
warn("pip install failed. Run manually: pip install qa-gentic-stlc-agents");
|
|
53
83
|
}
|
|
54
|
-
}
|
|
55
84
|
|
|
56
|
-
// ──
|
|
57
|
-
|
|
85
|
+
// ── 4. Print next steps ───────────────────────────────────────────────────
|
|
86
|
+
printNextSteps(integration);
|
|
87
|
+
|
|
88
|
+
})();
|
|
89
|
+
|
|
90
|
+
// ── Helpers ──────────────────────────────────────────────────────────────────
|
|
91
|
+
|
|
92
|
+
function printNextSteps(integration) {
|
|
93
|
+
const initFlag = integration !== "ado" ? ` --integration ${integration}` : "";
|
|
94
|
+
|
|
95
|
+
const adoWorkflow = `
|
|
96
|
+
${d("ADO pipeline:")}
|
|
97
|
+
${d("1 →")} ${y("qa-test-case-manager")} ${d("ADO work item → manual test cases")}
|
|
98
|
+
${d("2 →")} ${y("qa-gherkin-generator")} ${d("Epic / Feature / PBI → .feature file")}
|
|
99
|
+
${d("3 →")} ${y("qa-playwright-generator")} ${d("Gherkin + live browser → self-healing Playwright TypeScript")}
|
|
100
|
+
${d("4 →")} ${y("qa-helix-writer")} ${d("Generated files → Helix-QA project on disk")}`;
|
|
101
|
+
|
|
102
|
+
const jiraWorkflow = `
|
|
103
|
+
${d("Jira pipeline:")}
|
|
104
|
+
${d("1 →")} ${y("qa-jira-manager")} ${d("Fetch Jira issue + analyse acceptance criteria")}
|
|
105
|
+
${d("2 →")} ${y("qa-jira-manager")} ${d("Generate test cases and create in Jira with 'is tested by' links")}
|
|
106
|
+
${d("3 →")} ${y("qa-gherkin-generator")} ${d("Generate Gherkin .feature file from Jira issue AC")}
|
|
107
|
+
${d("4 →")} ${y("qa-playwright-generator")} ${d("Gherkin + live browser → self-healing Playwright TypeScript")}
|
|
108
|
+
${d("5 →")} ${y("qa-helix-writer")} ${d("Generated files → Helix-QA project on disk")}
|
|
109
|
+
${d(" Requires: JIRA_CLIENT_ID + JIRA_CLIENT_SECRET + JIRA_CLOUD_ID in .env")}`;
|
|
110
|
+
|
|
111
|
+
const workflow =
|
|
112
|
+
integration === "ado" ? adoWorkflow
|
|
113
|
+
: integration === "jira" ? jiraWorkflow
|
|
114
|
+
: adoWorkflow + "\n" + jiraWorkflow;
|
|
115
|
+
|
|
116
|
+
console.log(`
|
|
58
117
|
${b("Setup")} — run once in your project root:
|
|
59
118
|
|
|
60
|
-
${C.cyan}qa-stlc init --vscode${C.reset} ${d("# GitHub Copilot / VS Code")}
|
|
61
|
-
${C.cyan}qa-stlc init${C.reset} ${d("# Claude Code")}
|
|
119
|
+
${C.cyan}qa-stlc init --vscode${initFlag}${C.reset} ${d("# GitHub Copilot / VS Code")}
|
|
120
|
+
${C.cyan}qa-stlc init${initFlag}${C.reset} ${d("# Claude Code")}
|
|
62
121
|
|
|
63
|
-
${d("Writes
|
|
122
|
+
${d("Writes MCP config + installs skill files — then reload VS Code.")}
|
|
64
123
|
|
|
65
124
|
${b("Start Playwright MCP")} ${d("(keep running in a separate terminal)")}:
|
|
66
125
|
|
|
67
126
|
${C.cyan}npx @playwright/mcp@latest --port 8931${C.reset}
|
|
68
127
|
|
|
69
|
-
${b("STLC Workflow")}
|
|
70
|
-
|
|
71
|
-
${d("1 →")} ${y("qa-test-case-manager")} ${d("ADO work item ID → create manual test cases in ADO")}
|
|
72
|
-
${d("2 →")} ${y("qa-gherkin-generator")} ${d("Epic / Feature / PBI → BDD .feature file attached to ADO")}
|
|
73
|
-
${d("3 →")} ${y("qa-playwright-generator")} ${d("Gherkin + live page snapshot → self-healing Playwright TypeScript")}
|
|
74
|
-
${d("4 →")} ${y("qa-helix-writer")} ${d("Generated files → merged into Helix-QA project on disk")}
|
|
128
|
+
${b("STLC Workflow")}:
|
|
129
|
+
${workflow}
|
|
75
130
|
|
|
76
|
-
${d("
|
|
131
|
+
${d("Change integration at any time: qa-stlc init --integration <ado|jira|both>")}
|
|
77
132
|
${d("Docs: https://github.com/qa-gentic/stlc-agents")}
|
|
78
133
|
`);
|
|
134
|
+
}
|
package/bin/qa-stlc.js
CHANGED
|
@@ -17,11 +17,11 @@ const path = require("path");
|
|
|
17
17
|
const pkg = require("../package.json");
|
|
18
18
|
|
|
19
19
|
// Sub-commands
|
|
20
|
-
const cmdInit = require("../src/cmd-init");
|
|
21
|
-
const cmdSkills = require("../src/cmd-skills");
|
|
22
|
-
const cmdMcpConfig = require("../src/cmd-mcp-config");
|
|
23
|
-
const cmdVerify = require("../src/cmd-verify");
|
|
24
|
-
const cmdScaffold = require("../src/cmd-scaffold");
|
|
20
|
+
const cmdInit = require("../src/cli/cmd-init");
|
|
21
|
+
const cmdSkills = require("../src/cli/cmd-skills");
|
|
22
|
+
const cmdMcpConfig = require("../src/cli/cmd-mcp-config");
|
|
23
|
+
const cmdVerify = require("../src/cli/cmd-verify");
|
|
24
|
+
const cmdScaffold = require("../src/cli/cmd-scaffold");
|
|
25
25
|
|
|
26
26
|
program
|
|
27
27
|
.name("qa-stlc")
|
|
@@ -39,6 +39,7 @@ program
|
|
|
39
39
|
)
|
|
40
40
|
.option("--vscode", "Also write .vscode/mcp.json for GitHub Copilot")
|
|
41
41
|
.option("--python <path>", "Path to Python 3.10+ binary", "python3")
|
|
42
|
+
.option("--integration <value>", "Integration to set up: ado, jira, or both (prompts if omitted)")
|
|
42
43
|
.action(cmdInit);
|
|
43
44
|
|
|
44
45
|
// ── skills ────────────────────────────────────────────────────────────────────
|
|
@@ -60,6 +61,7 @@ program
|
|
|
60
61
|
.option("--print", "Print config to stdout without writing any file")
|
|
61
62
|
.option("--python <path>", "Path to Python 3.10+ binary or venv", "python3")
|
|
62
63
|
.option("--playwright-port <port>", "Port Playwright MCP is running on", "8931")
|
|
64
|
+
.option("--integration <value>", "Override integration filter: ado, jira, or both")
|
|
63
65
|
.action(cmdMcpConfig);
|
|
64
66
|
|
|
65
67
|
// ── verify ────────────────────────────────────────────────────────────────────
|
|
@@ -81,9 +83,27 @@ program
|
|
|
81
83
|
.option("--no-install", "Skip npm install after scaffolding")
|
|
82
84
|
.action(cmdScaffold);
|
|
83
85
|
|
|
86
|
+
// ── Quick-start hint appended to every --help output ─────────────────────────
|
|
87
|
+
program.addHelpText("after", `
|
|
88
|
+
Quick Start (run once in your project root):
|
|
89
|
+
$ qa-stlc init --vscode GitHub Copilot / VS Code
|
|
90
|
+
$ qa-stlc init Claude Code (prompts for ADO/Jira/Both)
|
|
91
|
+
|
|
92
|
+
Override integration without prompting:
|
|
93
|
+
$ qa-stlc init --integration ado Azure DevOps only
|
|
94
|
+
$ qa-stlc init --integration jira Jira Cloud only
|
|
95
|
+
$ qa-stlc init --integration both Both
|
|
96
|
+
|
|
97
|
+
Then scaffold a new QA project:
|
|
98
|
+
$ qa-stlc scaffold --name my-qa-project
|
|
99
|
+
|
|
100
|
+
Start Playwright MCP (keep running in a separate terminal):
|
|
101
|
+
$ npx @playwright/mcp@latest --port 8931
|
|
102
|
+
`);
|
|
103
|
+
|
|
84
104
|
program.parse(process.argv);
|
|
85
105
|
|
|
86
106
|
// Show help if no command given
|
|
87
107
|
if (!process.argv.slice(2).length) {
|
|
88
108
|
program.outputHelp();
|
|
89
|
-
}
|
|
109
|
+
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@qa-gentic/stlc-agents",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"description": "QA STLC Agents —
|
|
3
|
+
"version": "1.0.6",
|
|
4
|
+
"description": "QA STLC Agents — five MCP servers + skills for AI-powered test case, Gherkin, Playwright generation, and Helix-QA file writing against Azure DevOps and Jira Cloud. Full pipeline for both: fetch → test cases → Gherkin → Playwright → Helix-QA. Works with Claude Code, GitHub Copilot, Cursor, Windsurf.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"playwright",
|
|
7
7
|
"mcp",
|
|
@@ -17,9 +17,10 @@
|
|
|
17
17
|
| Agent | What it does | What it produces |
|
|
18
18
|
|---|---|---|
|
|
19
19
|
| `qa-test-case-manager` | Fetches ADO work items; creates and links manual test cases | ADO test case work items linked via `TestedBy-Forward` |
|
|
20
|
-
| `qa-gherkin-generator` | Fetches ADO work item hierarchies; validates and attaches `.feature` files | `.feature` files attached to ADO work items |
|
|
21
|
-
| `qa-playwright-generator` | Generates TypeScript Playwright code from Gherkin; attaches files to ADO | `locators.ts`, `*Page.ts`, `*.steps.ts` attached to ADO work items |
|
|
22
|
-
| `qa-helix-writer` | Writes already-generated files to disk at Helix-QA paths | Files on disk — no ADO writes |
|
|
20
|
+
| `qa-gherkin-generator` | Fetches ADO/Jira work item hierarchies; validates and attaches `.feature` files | `.feature` files attached to ADO work items or saved locally |
|
|
21
|
+
| `qa-playwright-generator` | Generates TypeScript Playwright code from Gherkin; attaches files to ADO | `locators.ts`, `*Page.ts`, `*.steps.ts` attached to ADO work items or saved locally |
|
|
22
|
+
| `qa-helix-writer` | Writes already-generated files to disk at Helix-QA paths | Files on disk — no ADO/Jira writes |
|
|
23
|
+
| `qa-jira-manager` | Fetches Jira issues; generates and creates test cases in Jira with 'is tested by' links; then hands off to `qa-gherkin-generator` → `qa-playwright-generator` → `qa-helix-writer` | Jira test case issues + Gherkin + Playwright TypeScript + Helix-QA files |
|
|
23
24
|
|
|
24
25
|
### What the agents do NOT do
|
|
25
26
|
|
|
@@ -47,7 +48,7 @@ This applies specifically to:
|
|
|
47
48
|
| User says "yes" to one step | Carrying that "yes" forward to the next step | Seek fresh confirmation for each distinct action |
|
|
48
49
|
| Navigation path not in work item | Inventing a path | Write placeholder `<!-- TODO: confirm screen name -->` and surface to user |
|
|
49
50
|
| Test data not provided | Inventing emails, IDs, file contents | Stop and ask; never hardcode invented data |
|
|
50
|
-
| Work item appears new | Skipping the deduplication protocol | Always run Phase 1 of deduplication-protocol
|
|
51
|
+
| Work item appears new | Skipping the deduplication protocol | Always run Phase 1 of the deduplication-protocol skill before creating anything |
|
|
51
52
|
|
|
52
53
|
---
|
|
53
54
|
|
|
@@ -101,7 +102,7 @@ Every artifact type has exactly one delivery rule. Completing one artifact does
|
|
|
101
102
|
|
|
102
103
|
| Condition | Action |
|
|
103
104
|
|---|---|
|
|
104
|
-
| User asks to write files to disk | Follow `write-helix-files
|
|
105
|
+
| User asks to write files to disk | Follow the `write-helix-files` skill in full — never skip any step |
|
|
105
106
|
| `write_helix_files` succeeds | Report the deduplication summary to the user |
|
|
106
107
|
| `write_helix_files` fails | **See failure recovery rules below** — do NOT fall back to `create_file` |
|
|
107
108
|
| A locator file already exists on disk (`list_helix_tree` returns it) | Extend that file via `write_helix_files` — **NEVER create a new file** |
|
|
@@ -370,7 +371,7 @@ When a rule is changed:
|
|
|
370
371
|
|
|
371
372
|
1. Update the rule in this file with a dated entry in the change log below.
|
|
372
373
|
2. Update the corresponding skill file in `skills/` to match.
|
|
373
|
-
3. Run
|
|
374
|
+
3. Run `make skills-ado`, `make skills-jira`, or `make skills-both` to sync installed skills.
|
|
374
375
|
4. Update `CLAUDE.md` if the rule affects a key rule number.
|
|
375
376
|
|
|
376
377
|
### Change log
|