@qa-gentic/stlc-agents 1.0.27 → 1.0.29
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/ARCHITECTURE-ADO.md +350 -0
- package/ARCHITECTURE-JIRA.md +203 -0
- package/QUICKSTART-ADO.md +400 -0
- package/QUICKSTART-JIRA.md +334 -0
- package/README.md +49 -0
- package/bin/postinstall.js +14 -4
- package/package.json +19 -7
- package/skills/migrate-framework/SKILL.md +207 -0
- package/src/stlc_agents/agent_migration/__init__.py +0 -0
- package/src/stlc_agents/agent_migration/_migrate.py +1398 -0
- package/src/stlc_agents/agent_migration/cli.py +217 -0
- package/src/stlc_agents/agent_migration/detector.py +81 -0
- package/src/stlc_agents/agent_migration/mapper.py +439 -0
- package/src/stlc_agents/agent_migration/reporter.py +86 -0
- package/src/stlc_agents/agent_migration/server.py +267 -0
- package/src/stlc_agents/agent_migration/transformer/__init__.py +0 -0
- package/src/stlc_agents/agent_migration/transformer/config_merger.py +513 -0
- package/src/stlc_agents/agent_migration/transformer/healer_injector.py +1143 -0
- package/src/stlc_agents/agent_migration/transformer/import_fixer.py +419 -0
- package/src/stlc_agents/agent_migration/transformer/js_to_ts.py +413 -0
- package/src/stlc_agents/agent_migration/transformer/local_var_hoister.py +378 -0
- package/src/stlc_agents/agent_migration/transformer/locator_moderniser.py +132 -0
- package/src/stlc_agents/agent_migration/transformer/locator_registrar.py +328 -0
- package/src/stlc_agents/agent_migration/transformer/spec_to_bdd.py +820 -0
- package/src/stlc_agents/agent_playwright_generator/server.py +926 -91
- package/src/stlc_agents/__pycache__/__init__.cpython-314.pyc +0 -0
- package/src/stlc_agents/agent_gherkin_generator/__pycache__/__init__.cpython-314.pyc +0 -0
- package/src/stlc_agents/agent_gherkin_generator/__pycache__/server.cpython-314.pyc +0 -0
- package/src/stlc_agents/agent_gherkin_generator/tools/__pycache__/__init__.cpython-314.pyc +0 -0
- package/src/stlc_agents/agent_gherkin_generator/tools/__pycache__/ado_gherkin.cpython-314.pyc +0 -0
- package/src/stlc_agents/agent_helix_writer/__pycache__/__init__.cpython-314.pyc +0 -0
- package/src/stlc_agents/agent_helix_writer/__pycache__/server.cpython-314.pyc +0 -0
- package/src/stlc_agents/agent_helix_writer/tools/__pycache__/__init__.cpython-314.pyc +0 -0
- package/src/stlc_agents/agent_helix_writer/tools/__pycache__/boilerplate.cpython-314.pyc +0 -0
- package/src/stlc_agents/agent_helix_writer/tools/__pycache__/helix_write.cpython-314.pyc +0 -0
- package/src/stlc_agents/agent_playwright_generator/__pycache__/__init__.cpython-314.pyc +0 -0
- package/src/stlc_agents/agent_playwright_generator/__pycache__/server.cpython-314.pyc +0 -0
- package/src/stlc_agents/agent_playwright_generator/tools/__pycache__/__init__.cpython-314.pyc +0 -0
- package/src/stlc_agents/agent_playwright_generator/tools/__pycache__/ado_attach.cpython-314.pyc +0 -0
- package/src/stlc_agents/agent_test_case_manager/__pycache__/__init__.cpython-314.pyc +0 -0
- package/src/stlc_agents/agent_test_case_manager/__pycache__/server.cpython-314.pyc +0 -0
- package/src/stlc_agents/agent_test_case_manager/tools/__pycache__/__init__.cpython-314.pyc +0 -0
- package/src/stlc_agents/agent_test_case_manager/tools/__pycache__/ado_workitem.cpython-314.pyc +0 -0
- package/src/stlc_agents/shared/__pycache__/__init__.cpython-314.pyc +0 -0
- package/src/stlc_agents/shared/__pycache__/auth.cpython-314.pyc +0 -0
- package/src/stlc_agents/shared/__pycache__/cost_tracker.cpython-314.pyc +0 -0
- package/src/stlc_agents/shared/__pycache__/pricing.cpython-314.pyc +0 -0
|
@@ -0,0 +1,334 @@
|
|
|
1
|
+
# @qa-gentic/stlc-agents — Jira Cloud Quick Start
|
|
2
|
+
|
|
3
|
+
> Jira Cloud pipeline: issue → test cases → Gherkin → Playwright TypeScript → Helix-QA.
|
|
4
|
+
> For Azure DevOps see [QUICKSTART-ADO.md](QUICKSTART-ADO.md).
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
Works with **GitHub Copilot** (VS Code Agent mode), **Claude Code**, **Cursor**, and **Windsurf**.
|
|
8
|
+
|
|
9
|
+
[](https://www.npmjs.com/package/@qa-gentic/stlc-agents)
|
|
10
|
+
[](https://pypi.org/project/qa-gentic-stlc-agents/)
|
|
11
|
+
[](LICENSE)
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
## What the Jira Pipeline Does
|
|
17
|
+
|
|
18
|
+
Six Python MCP servers. The Jira pipeline uses `qa-jira-manager` as its entry point, then the three shared agents, with `qa-migration` / `stlc-migrate` available for converting existing Playwright projects:
|
|
19
|
+
|
|
20
|
+
| Step | Agent | What happens |
|
|
21
|
+
|---|---|---|
|
|
22
|
+
| 1 | `qa-jira-manager` | Fetch Jira issue + analyse acceptance criteria |
|
|
23
|
+
| 2 | `qa-jira-manager` | Generate test cases → create in Jira with `is tested by` links |
|
|
24
|
+
| 3 | `qa-gherkin-generator` | Generate Gherkin `.feature` file |
|
|
25
|
+
| 4 | `qa-playwright-generator` | Gherkin + live browser → self-healing Playwright TypeScript |
|
|
26
|
+
| 5 | `qa-helix-writer` | Write generated files to Helix-QA project on disk |
|
|
27
|
+
| — | `qa-migration` / `stlc-migrate` | Existing Playwright project → fully agent-ready Helix-QA tree (Jira `.mcp.json`, skills, healer scaffold, BOILERPLATE infra) |
|
|
28
|
+
|
|
29
|
+
The Playwright MCP server (`http://localhost:8931/mcp`) is required for browser-driven code generation. It is not part of this package and must be started separately.
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
## Install
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
npm install -g @qa-gentic/stlc-agents
|
|
37
|
+
qa-stlc init --vscode --integration jira
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
`qa-stlc init --integration jira` performs:
|
|
42
|
+
1. `pip install qa-gentic-stlc-agents` — installs all six Python MCP servers + `stlc-migrate` CLI
|
|
43
|
+
2. Copies skill files (including `qa-jira-manager/`, `generate-gherkin/`, `generate-playwright-code/`, `write-helix-files/`, `migrate-framework/`) to your coding agent directory
|
|
44
|
+
3. Writes `.vscode/mcp.json` with all required servers configured (`qa-jira-manager` + shared Agents 2–4 + `qa-migration` + `playwright`)
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
Start the Playwright MCP server before your first session:
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
npx @playwright/mcp@latest --port 8931
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
---
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
## Requirements
|
|
57
|
+
|
|
58
|
+
- Node.js ≥ 18
|
|
59
|
+
- Python ≥ 3.10, < 3.14
|
|
60
|
+
- Jira Cloud site with OAuth 2.0 credentials (see [Authentication Setup](#authentication-setup))
|
|
61
|
+
- A `.env` file containing:
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
```env
|
|
65
|
+
# Jira Cloud credentials
|
|
66
|
+
JIRA_CLIENT_ID=your-atlassian-oauth-client-id
|
|
67
|
+
JIRA_CLIENT_SECRET=your-atlassian-oauth-client-secret
|
|
68
|
+
JIRA_CLOUD_ID=your-atlassian-cloud-id
|
|
69
|
+
# Optional — defaults to http://localhost:8765/callback
|
|
70
|
+
# JIRA_REDIRECT_URI=http://localhost:8765/callback
|
|
71
|
+
|
|
72
|
+
# Application under test
|
|
73
|
+
APP_BASE_URL=https://your-app.example.com
|
|
74
|
+
APP_EMAIL=your-test-email@example.com
|
|
75
|
+
APP_PASSWORD=your-test-password
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
---
|
|
79
|
+
|
|
80
|
+
## Authentication Setup
|
|
81
|
+
|
|
82
|
+
### Step 1 — Create an Atlassian OAuth 2.0 (3LO) app
|
|
83
|
+
|
|
84
|
+
1. Go to <https://developer.atlassian.com/console/myapps/>
|
|
85
|
+
2. Click **Create** → **OAuth 2.0 integration**
|
|
86
|
+
3. Add callback URL: `http://localhost:8765/callback`
|
|
87
|
+
4. Under **Permissions**, add Jira API scopes: `read:jira-user`, `read:jira-work`, `write:jira-work`
|
|
88
|
+
5. Copy the **Client ID** and **Secret**
|
|
89
|
+
|
|
90
|
+
### Step 2 — Find your Cloud ID
|
|
91
|
+
|
|
92
|
+
```bash
|
|
93
|
+
curl -H "Authorization: Bearer <any-valid-token>" \
|
|
94
|
+
https://api.atlassian.com/oauth/token/accessible-resources
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
Copy the `id` field for your Jira site.
|
|
98
|
+
|
|
99
|
+
### Step 3 — Add to `.env`
|
|
100
|
+
|
|
101
|
+
```env
|
|
102
|
+
JIRA_CLIENT_ID=your-client-id
|
|
103
|
+
JIRA_CLIENT_SECRET=your-client-secret
|
|
104
|
+
JIRA_CLOUD_ID=your-cloud-id
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
### Step 4 — First run
|
|
108
|
+
|
|
109
|
+
On first use a browser opens once for sign-in. The token is cached at `~/.jira-cache/jira-token.json` and silently refreshed for ~60 days.
|
|
110
|
+
|
|
111
|
+
---
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
## Commands
|
|
115
|
+
|
|
116
|
+
All `qa-stlc` commands accept `--integration jira`:
|
|
117
|
+
|
|
118
|
+
```bash
|
|
119
|
+
qa-stlc init [--vscode] [--python <path>] --integration jira
|
|
120
|
+
# Full bootstrap: pip install + Jira skills + MCP config with all 5 agents
|
|
121
|
+
|
|
122
|
+
qa-stlc mcp-config [--vscode] [--print] [--python <path>] --integration jira
|
|
123
|
+
# Write MCP config including qa-jira-manager + shared agents
|
|
124
|
+
|
|
125
|
+
qa-stlc skills [--target claude|vscode|cursor|windsurf|both|print] --integration jira
|
|
126
|
+
# Install Jira + shared skill files (excludes ADO-only generate-test-cases/)
|
|
127
|
+
|
|
128
|
+
qa-stlc verify --integration jira
|
|
129
|
+
# Check all 6 MCP servers are installed + Jira auth cache exists
|
|
130
|
+
|
|
131
|
+
qa-stlc scaffold [--name <n>] [--dir <path>]
|
|
132
|
+
# Scaffold a new Playwright + Cucumber + TypeScript QA project (same as ADO)
|
|
133
|
+
|
|
134
|
+
stlc-migrate --source <existing> --helix <target> --integration jira [--conflict overwrite|skip|interactive] [--dry-run] [--json]
|
|
135
|
+
# Migrate an existing Playwright (with or without Cucumber) project into the
|
|
136
|
+
# Helix-QA layout, Jira variant. Installs Jira-only skills + .mcp.json with
|
|
137
|
+
# qa-jira-manager (incl. JIRA_CLIENT_ID/SECRET/CLOUD_ID env passthrough),
|
|
138
|
+
# the enhanced healer scaffold (LocatorHealer 8-strategy chain, LocatorRepository
|
|
139
|
+
# schema v1, HealingDashboard with write-back), AGENT-BEHAVIOR.md,
|
|
140
|
+
# ORCHESTRATION_RULES.md, and the 11-file BOILERPLATE allowlist. See
|
|
141
|
+
# `skills/migrate-framework/SKILL.md` for the full pipeline reference.
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
### Makefile shortcuts
|
|
145
|
+
|
|
146
|
+
```bash
|
|
147
|
+
make bootstrap-jira # one-shot: Jira skills + .mcp.json
|
|
148
|
+
make migrate-jira SOURCE=<old> HELIX=<new> # Jira migration with sensible defaults
|
|
149
|
+
make migrate-jira SOURCE=<old> HELIX=<new> CONFLICT=overwrite # re-migrate in place
|
|
150
|
+
make audit-migration HELIX=<new> # framework_state + skills + healer scaffold + heal-store report
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
---
|
|
154
|
+
|
|
155
|
+
## Usage
|
|
156
|
+
|
|
157
|
+
Open your AI coding agent and use natural language:
|
|
158
|
+
|
|
159
|
+
```
|
|
160
|
+
# Full Jira pipeline — single prompt
|
|
161
|
+
Run the full STLC pipeline for Jira issue PROJ-123
|
|
162
|
+
|
|
163
|
+
# Step by step
|
|
164
|
+
Fetch Jira issue PROJ-123 and analyse acceptance criteria
|
|
165
|
+
Generate test cases for PROJ-123 and create them in Jira
|
|
166
|
+
Generate Gherkin feature file for PROJ-123
|
|
167
|
+
Generate Playwright TypeScript for the Gherkin I just created. The login page is at /auth/login
|
|
168
|
+
Write the generated files to my Helix-QA project at /workspace/my-qa-project
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
---
|
|
172
|
+
|
|
173
|
+
## Tool Reference
|
|
174
|
+
|
|
175
|
+
|
|
176
|
+
### qa-jira-manager
|
|
177
|
+
|
|
178
|
+
| Tool | Description |
|
|
179
|
+
|---|---|
|
|
180
|
+
| `fetch_jira_issue` | Fetch a Story, Bug, Task, or Sub-task with acceptance criteria and coverage hints. Routes Epics to `fetch_jira_epic_hierarchy`. |
|
|
181
|
+
| `fetch_jira_epic_hierarchy` | Fetch an Epic and all child issues (Stories, Tasks, Bugs, Sub-tasks). |
|
|
182
|
+
| `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 ADF table — no Xray required. Returns `confirmation_required: true` for Epics. |
|
|
183
|
+
| `get_linked_test_cases` | Return all test cases already linked to a Jira issue. Call before generating to power the deduplication gate. |
|
|
184
|
+
|
|
185
|
+
### qa-gherkin-generator (shared)
|
|
186
|
+
|
|
187
|
+
| Tool | Description |
|
|
188
|
+
|---|---|
|
|
189
|
+
| `fetch_work_item_for_gherkin` | Fetch a work item with AC context for Gherkin generation (pass Jira issue key). |
|
|
190
|
+
| `validate_gherkin_content` | Structural validation — tags, scenario count, navigation steps. Returns `valid: bool` + `errors` + `warnings`. |
|
|
191
|
+
| `attach_gherkin_to_work_item` | Validate and attach a `.feature` file (for Jira pipeline: saves locally or attaches via Jira REST). |
|
|
192
|
+
|
|
193
|
+
### qa-playwright-generator (shared)
|
|
194
|
+
|
|
195
|
+
| Tool | Description |
|
|
196
|
+
|---|---|
|
|
197
|
+
| `generate_playwright_code` | Generate `locators.ts`, `*Page.ts`, `*.steps.ts` from validated Gherkin + live AX-tree `context_map`. Blocks if `context_map` is absent. |
|
|
198
|
+
| `scaffold_locator_repository` | Generate the six Helix-QA healing infrastructure files. |
|
|
199
|
+
| `validate_gherkin_steps` | Check for duplicate step strings and missing `When` steps. |
|
|
200
|
+
|
|
201
|
+
### qa-helix-writer (shared)
|
|
202
|
+
|
|
203
|
+
| Tool | Description |
|
|
204
|
+
|---|---|
|
|
205
|
+
| `inspect_helix_project` | Returns `framework_state` (`present` / `partial` / `absent`) and `recommendation`. |
|
|
206
|
+
| `list_helix_tree` | List the full directory tree of a Helix-QA project. |
|
|
207
|
+
| `read_helix_file` | Read an existing file for overlap detection. |
|
|
208
|
+
| `write_helix_files` | Write generated files to the correct Helix-QA paths. |
|
|
209
|
+
|
|
210
|
+
### playwright (external)
|
|
211
|
+
|
|
212
|
+
| Tool | Description |
|
|
213
|
+
|---|---|
|
|
214
|
+
| `browser_navigate` | Navigate to a URL in the live browser. |
|
|
215
|
+
| `browser_snapshot` | Capture the full AX tree — source for zero-hallucination locators. |
|
|
216
|
+
| `browser_fill_form` | Fill multiple form fields by ref. |
|
|
217
|
+
| `browser_click` | Click an element by ref. |
|
|
218
|
+
|
|
219
|
+
---
|
|
220
|
+
|
|
221
|
+
## MCP Config
|
|
222
|
+
|
|
223
|
+
### VS Code / GitHub Copilot (`.vscode/mcp.json`)
|
|
224
|
+
|
|
225
|
+
```json
|
|
226
|
+
{
|
|
227
|
+
"servers": {
|
|
228
|
+
"qa-jira-manager": { "command": "/path/to/.venv/bin/qa-jira-manager",
|
|
229
|
+
"env": { "JIRA_CLIENT_ID": "${env:JIRA_CLIENT_ID}",
|
|
230
|
+
"JIRA_CLIENT_SECRET": "${env:JIRA_CLIENT_SECRET}",
|
|
231
|
+
"JIRA_CLOUD_ID": "${env:JIRA_CLOUD_ID}" } },
|
|
232
|
+
"qa-gherkin-generator": { "command": "/path/to/.venv/bin/qa-gherkin-generator" },
|
|
233
|
+
"qa-playwright-generator": { "command": "/path/to/.venv/bin/qa-playwright-generator" },
|
|
234
|
+
"qa-helix-writer": { "command": "/path/to/.venv/bin/qa-helix-writer" },
|
|
235
|
+
"qa-migration": { "command": "/path/to/.venv/bin/stlc-migrate" },
|
|
236
|
+
"playwright": { "type": "http", "url": "http://localhost:8931/mcp" }
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
```
|
|
240
|
+
|
|
241
|
+
### Claude Code (`.mcp.json`)
|
|
242
|
+
|
|
243
|
+
```json
|
|
244
|
+
{
|
|
245
|
+
"mcpServers": {
|
|
246
|
+
"qa-jira-manager": { "command": "/path/to/.venv/bin/qa-jira-manager",
|
|
247
|
+
"env": { "JIRA_CLIENT_ID": "${env:JIRA_CLIENT_ID}",
|
|
248
|
+
"JIRA_CLIENT_SECRET": "${env:JIRA_CLIENT_SECRET}",
|
|
249
|
+
"JIRA_CLOUD_ID": "${env:JIRA_CLOUD_ID}" } },
|
|
250
|
+
"qa-gherkin-generator": { "command": "/path/to/.venv/bin/qa-gherkin-generator" },
|
|
251
|
+
"qa-playwright-generator": { "command": "/path/to/.venv/bin/qa-playwright-generator" },
|
|
252
|
+
"qa-helix-writer": { "command": "/path/to/.venv/bin/qa-helix-writer" },
|
|
253
|
+
"qa-migration": { "command": "/path/to/.venv/bin/stlc-migrate" },
|
|
254
|
+
"playwright": { "command": "npx", "args": ["@playwright/mcp@latest", "--isolated"] }
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
> Run `qa-stlc mcp-config --integration jira [--vscode]` to generate this
|
|
260
|
+
> manually, or run `stlc-migrate --integration jira` and the migration emits
|
|
261
|
+
> `.mcp.json` automatically with absolute binary paths discovered from the
|
|
262
|
+
> active venv.
|
|
263
|
+
|
|
264
|
+
---
|
|
265
|
+
|
|
266
|
+
|
|
267
|
+
## Skills Installed (Jira integration)
|
|
268
|
+
|
|
269
|
+
| Skill | Purpose |
|
|
270
|
+
|---|---|
|
|
271
|
+
| `AGENT-BEHAVIOR.md` | Zero-inference contract. Read first. Always. |
|
|
272
|
+
| `qa-jira-manager/` | Jira fetch, test case creation, and full pipeline orchestration |
|
|
273
|
+
| `generate-gherkin/` | Gherkin generation from issue AC |
|
|
274
|
+
| `generate-playwright-code/` | Gherkin + live browser → self-healing Playwright TypeScript |
|
|
275
|
+
| `write-helix-files/` | Generated files → Helix-QA disk layout |
|
|
276
|
+
| `deduplication-protocol/` | READ → DIFF → CREATE mandatory pre-flight gate |
|
|
277
|
+
|
|
278
|
+
> `generate-test-cases/` is excluded for Jira-only installs — it is ADO work-item-scoped.
|
|
279
|
+
|
|
280
|
+
---
|
|
281
|
+
|
|
282
|
+
## Three-Layer Self-Healing Architecture
|
|
283
|
+
|
|
284
|
+
Same as the ADO pipeline — the generated Playwright code uses identical healing infrastructure:
|
|
285
|
+
|
|
286
|
+
| Layer | Class | What it heals |
|
|
287
|
+
|---|---|---|
|
|
288
|
+
| 1 — Locator | `LocatorHealer` | 8-strategy chain: cached → primary → **attribute** → **type-hint** → role → label → text → AI Vision. After match, introspects the live element and persists a specific single-attribute selector (`#id`, `[data-testid=…]`, etc.). |
|
|
289
|
+
| 2 — Timing | `TimingHealer` | Network-trace drift → auto-adjusted timeouts → HealingDashboard |
|
|
290
|
+
| 3 — Visual | `VisualIntentChecker` | Element screenshot diff at assertions → HealingDashboard |
|
|
291
|
+
|
|
292
|
+
Refer to [ARCHITECTURE-ADO.md § Three-Layer Self-Healing Architecture](ARCHITECTURE-ADO.md#three-layer-self-healing-architecture) for full strategy ordering, env-var tuning (`HEAL_STRATEGY_ORDER`, `LOCATOR_TIMEOUT`, `LOCATOR_HEAL_ATTEMPTS`, etc.), and HealingDashboard write-back behaviour.
|
|
293
|
+
|
|
294
|
+
---
|
|
295
|
+
|
|
296
|
+
## Run Tests
|
|
297
|
+
|
|
298
|
+
```bash
|
|
299
|
+
ENABLE_SELF_HEALING=true \
|
|
300
|
+
HEALING_DASHBOARD_PORT=7890 \
|
|
301
|
+
APP_BASE_URL=<your-app-base-url> \
|
|
302
|
+
APP_EMAIL=<email> \
|
|
303
|
+
APP_PASSWORD=<password> \
|
|
304
|
+
cucumber-js --config=config/cucumber.js -p <feature_profile>
|
|
305
|
+
```
|
|
306
|
+
|
|
307
|
+
### Inspect healed locators (migrated projects only)
|
|
308
|
+
|
|
309
|
+
```bash
|
|
310
|
+
ENV=qa4 npm run healix:dashboard # http://localhost:7890 — Confirm / Revert
|
|
311
|
+
ENV=qa4 npm run healix:review # http://localhost:7891 — read-only mirror
|
|
312
|
+
cat self-heals/healed-locators.qa4.json | jq .
|
|
313
|
+
tail self-heals/heal.log
|
|
314
|
+
```
|
|
315
|
+
|
|
316
|
+
Confirm on a healed entry rewrites the source `*.locators.ts` file's
|
|
317
|
+
`selector:` field — future runs use it as the primary probe.
|
|
318
|
+
|
|
319
|
+
---
|
|
320
|
+
|
|
321
|
+
## Documentation
|
|
322
|
+
|
|
323
|
+
- [Quick Start: Azure DevOps](QUICKSTART-ADO.md)
|
|
324
|
+
- [Quick Start: Jira Cloud](QUICKSTART-JIRA.md)
|
|
325
|
+
- [Architecture: ADO](ARCHITECTURE-ADO.md)
|
|
326
|
+
- [Architecture: Jira](ARCHITECTURE-JIRA.md)
|
|
327
|
+
- [Walkthrough: ADO](WALKTHROUGH-ADO.md)
|
|
328
|
+
- [Walkthrough: Jira](WALKTHROUGH-JIRA.md)
|
|
329
|
+
|
|
330
|
+
---
|
|
331
|
+
|
|
332
|
+
## License
|
|
333
|
+
|
|
334
|
+
MIT
|
package/README.md
CHANGED
|
@@ -136,6 +136,55 @@ qa-stlc scaffold --name my-qa-project
|
|
|
136
136
|
npx @playwright/mcp@latest --port 8931
|
|
137
137
|
```
|
|
138
138
|
|
|
139
|
+
### Migrating an existing Playwright project
|
|
140
|
+
|
|
141
|
+
If you have an existing Playwright (with or without Cucumber) project and want
|
|
142
|
+
to bring it onto the agent rails, use `stlc-migrate`:
|
|
143
|
+
|
|
144
|
+
```bash
|
|
145
|
+
# Preview without writing
|
|
146
|
+
stlc-migrate --source ./my-old-tests --helix ./helix-qa --dry-run
|
|
147
|
+
|
|
148
|
+
# Full migration — every agent skill, .mcp.json, healer scaffold, agent docs
|
|
149
|
+
stlc-migrate --source ./my-old-tests --helix ./helix-qa --integration both
|
|
150
|
+
|
|
151
|
+
# ADO-only or Jira-only
|
|
152
|
+
stlc-migrate --source ./my-old-tests --helix ./helix-qa --integration ado
|
|
153
|
+
stlc-migrate --source ./my-old-tests --helix ./helix-qa --integration jira
|
|
154
|
+
|
|
155
|
+
# Refresh scaffold/skills on an existing migrated tree
|
|
156
|
+
stlc-migrate --source ./my-old-tests --helix ./helix-qa --conflict overwrite
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
The tool emits a complete agent-ready tree:
|
|
160
|
+
|
|
161
|
+
| Layer | What lands |
|
|
162
|
+
|---|---|
|
|
163
|
+
| **Code** | Page objects + step files + locator files in `{selector, intent, stability}` format; every locator interaction routed through `LocatorHealer.*WithHealing`; non-BDD `.spec.*` files losslessly converted to one-scenario-per-test BDD |
|
|
164
|
+
| **Healing infra** | 8-strategy `LocatorHealer` (attribute / type-hint / role / label / text / AI Vision), `LocatorRepository` with schema-versioned heal-only persist + per-env file suffix, `HealingDashboard` (read/write at 7890 + read-only mirror at `HEALIX_REVIEW_PORT`), `TimingHealer`, `VisualIntentChecker` |
|
|
165
|
+
| **Agent assets** | `.mcp.json` (all 6 MCP servers + Playwright MCP), `.claude/skills/<name>/SKILL.md` per integration, `.github/copilot-instructions/<name>.md` flat copies, `AGENT-BEHAVIOR.md` + `ORCHESTRATION_RULES.md` at root + `.claude/` + `.github/` |
|
|
166
|
+
| **Configs** | `cucumber.js` with `dotenv/config` as first `requireModule`, `package.json` with `dotenv` + `@types/*` companions, `tsconfig.json` aliases, `.env.example` documenting every healing knob |
|
|
167
|
+
|
|
168
|
+
See `skills/migrate-framework/SKILL.md` for the full pipeline + environment variable reference.
|
|
169
|
+
|
|
170
|
+
### Healing dashboard
|
|
171
|
+
|
|
172
|
+
Once a migrated project has run any test that triggers healing, inspect the
|
|
173
|
+
results via the dashboard:
|
|
174
|
+
|
|
175
|
+
```bash
|
|
176
|
+
ENV=qa4 npm run healix:dashboard # full UI at http://localhost:7890
|
|
177
|
+
ENV=qa4 npm run healix:review # read-only mirror at http://localhost:7891
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
The dashboard shows each healed locator with its original selector, the
|
|
181
|
+
specific selector that actually matched on the live page (introspected from
|
|
182
|
+
the matched element — e.g. `#login-username`, not the generic search union),
|
|
183
|
+
and **Confirm / Revert** buttons. **Confirm rewrites the original locator
|
|
184
|
+
`.ts` file's `selector:` field** so the next run uses the verified selector
|
|
185
|
+
as the primary probe — no healing chain required until the page changes
|
|
186
|
+
again.
|
|
187
|
+
|
|
139
188
|
### Cost Tracking Activation
|
|
140
189
|
|
|
141
190
|
**npm install** (`npm install -g @qa-gentic/stlc-agents`): Cost tracking is activated automatically after the Python servers are installed. No manual step required.
|
package/bin/postinstall.js
CHANGED
|
@@ -85,10 +85,20 @@ if (!python) {
|
|
|
85
85
|
if (pip.status === 0) {
|
|
86
86
|
ok("qa-gentic-stlc-agents installed.");
|
|
87
87
|
} else {
|
|
88
|
-
//
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
88
|
+
// Route pip's output through _write (/dev/tty) — process.stderr is swallowed
|
|
89
|
+
// by npm 7+ for global lifecycle scripts, so direct stderr writes vanish.
|
|
90
|
+
const combined = `${pip.stdout || ""}${pip.stderr || ""}`;
|
|
91
|
+
combined.split("\n").filter(Boolean).forEach((l) => console.log(d(l)));
|
|
92
|
+
warn("pip install failed.");
|
|
93
|
+
if (/externally-managed-environment/i.test(combined)) {
|
|
94
|
+
console.log("");
|
|
95
|
+
console.log(`${b("This Python is PEP 668-locked")} ${d("(Homebrew, Debian, Ubuntu).")} Install with one of:`);
|
|
96
|
+
console.log(` ${C.cyan}brew install pipx && pipx install qa-gentic-stlc-agents${C.reset} ${d("# isolated, commands on PATH")}`);
|
|
97
|
+
console.log(` ${C.cyan}python3 -m pip install --user --break-system-packages qa-gentic-stlc-agents${C.reset}`);
|
|
98
|
+
console.log(` ${C.cyan}python3 -m venv .venv && source .venv/bin/activate && pip install qa-gentic-stlc-agents${C.reset}`);
|
|
99
|
+
} else {
|
|
100
|
+
warn("Run manually: pip install qa-gentic-stlc-agents");
|
|
101
|
+
}
|
|
92
102
|
}
|
|
93
103
|
}
|
|
94
104
|
|
package/package.json
CHANGED
|
@@ -1,22 +1,29 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@qa-gentic/stlc-agents",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"description": "QA STLC Agents —
|
|
3
|
+
"version": "1.0.29",
|
|
4
|
+
"description": "QA STLC Agents — six MCP servers + skills for AI-powered test case, Gherkin, self-healing Playwright generation, Helix-QA file writing, and existing-framework migration against Azure DevOps and Jira Cloud. Includes an 8-strategy LocatorHealer with a live HealingDashboard (write-back-to-source) and a one-shot `stlc-migrate` CLI that converts an existing Playwright project into a fully agent-ready Helix-QA tree. Works with Claude Code, GitHub Copilot, Cursor, Windsurf.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"playwright",
|
|
7
|
+
"playwright-migration",
|
|
8
|
+
"framework-migration",
|
|
7
9
|
"mcp",
|
|
10
|
+
"mcp-server",
|
|
8
11
|
"azure-devops",
|
|
12
|
+
"jira",
|
|
9
13
|
"gherkin",
|
|
10
14
|
"bdd",
|
|
15
|
+
"cucumber",
|
|
11
16
|
"qa",
|
|
12
17
|
"test-automation",
|
|
18
|
+
"self-healing",
|
|
19
|
+
"healing-dashboard",
|
|
20
|
+
"locator-healer",
|
|
13
21
|
"claude",
|
|
14
|
-
"copilot",
|
|
15
22
|
"claude-code",
|
|
16
|
-
"
|
|
17
|
-
"self-healing",
|
|
23
|
+
"copilot",
|
|
18
24
|
"helix",
|
|
19
25
|
"scaffold",
|
|
26
|
+
"stlc-migrate",
|
|
20
27
|
"cursor",
|
|
21
28
|
"windsurf"
|
|
22
29
|
],
|
|
@@ -38,13 +45,17 @@
|
|
|
38
45
|
"skills/",
|
|
39
46
|
".github/agents/",
|
|
40
47
|
"README.md",
|
|
41
|
-
"ORCHESTRATION_RULES.md"
|
|
48
|
+
"ORCHESTRATION_RULES.md",
|
|
49
|
+
"AGENT-BEHAVIOR.md",
|
|
50
|
+
"ARCHITECTURE-ADO.md",
|
|
51
|
+
"ARCHITECTURE-JIRA.md",
|
|
52
|
+
"QUICKSTART-ADO.md",
|
|
53
|
+
"QUICKSTART-JIRA.md"
|
|
42
54
|
],
|
|
43
55
|
"scripts": {
|
|
44
56
|
"postinstall": "node ./bin/postinstall.js"
|
|
45
57
|
},
|
|
46
58
|
"_comment": "Diff to apply to package.json — add the cost command to qa-stlc.js",
|
|
47
|
-
|
|
48
59
|
"diff": {
|
|
49
60
|
"bin/qa-stlc.js": {
|
|
50
61
|
"add_require": "const cmdCost = require('../src/cli/cmd-cost');",
|
|
@@ -56,6 +67,7 @@
|
|
|
56
67
|
},
|
|
57
68
|
"full_command_to_add_to_qa-stlc.js": "// ── cost ─────────────────────────────────────────────────────────────────\nprogram\n .command('cost')\n .description(\n 'Show token usage and cost for the current or past pipeline sessions.\\n' +\n 'Reads logs from ~/.qa-stlc/cost-*.jsonl written by the MCP servers.\\n' +\n 'Each MCP tool call logs tokens, cost, and latency automatically.'\n )\n .option('--all', 'Show all sessions (not just the last one)')\n .option('--session <id>', 'Show a specific session by its ID')\n .option('--json', 'Emit raw JSON instead of a formatted table')\n .action(cmdCost);",
|
|
58
69
|
"dependencies": {
|
|
70
|
+
"@qa-gentic/stlc-agents": "^1.0.28",
|
|
59
71
|
"commander": "^12.0.0",
|
|
60
72
|
"which": "^4.0.0"
|
|
61
73
|
},
|