@qa-gentic/stlc-agents 1.0.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.
- package/README.md +310 -0
- package/bin/postinstall.js +78 -0
- package/bin/qa-stlc.js +89 -0
- package/package.json +48 -0
- package/skills/qa-stlc/AGENT-BEHAVIOR.md +383 -0
- package/skills/qa-stlc/deduplication-protocol.md +303 -0
- package/skills/qa-stlc/generate-gherkin.md +550 -0
- package/skills/qa-stlc/generate-playwright-code.md +464 -0
- package/skills/qa-stlc/generate-test-cases.md +176 -0
- package/skills/qa-stlc/write-helix-files.md +374 -0
- package/src/boilerplate-bundle.js +66 -0
- package/src/cmd-init.js +92 -0
- package/src/cmd-mcp-config.js +177 -0
- package/src/cmd-scaffold.js +130 -0
- package/src/cmd-skills.js +124 -0
- package/src/cmd-verify.js +129 -0
- package/src/stlc_agents/__init__.py +0 -0
- package/src/stlc_agents/agent_gherkin_generator/__init__.py +0 -0
- package/src/stlc_agents/agent_gherkin_generator/server.py +502 -0
- package/src/stlc_agents/agent_gherkin_generator/tools/__init__.py +0 -0
- package/src/stlc_agents/agent_gherkin_generator/tools/ado_gherkin.py +854 -0
- package/src/stlc_agents/agent_helix_writer/__init__.py +0 -0
- package/src/stlc_agents/agent_helix_writer/server.py +529 -0
- package/src/stlc_agents/agent_helix_writer/tools/__init__.py +0 -0
- package/src/stlc_agents/agent_helix_writer/tools/boilerplate.py +70 -0
- package/src/stlc_agents/agent_helix_writer/tools/helix_write.py +796 -0
- package/src/stlc_agents/agent_playwright_generator/__init__.py +0 -0
- package/src/stlc_agents/agent_playwright_generator/server.py +2610 -0
- package/src/stlc_agents/agent_playwright_generator/tools/__init__.py +0 -0
- package/src/stlc_agents/agent_playwright_generator/tools/ado_attach.py +62 -0
- package/src/stlc_agents/agent_test_case_manager/__init__.py +0 -0
- package/src/stlc_agents/agent_test_case_manager/server.py +483 -0
- package/src/stlc_agents/agent_test_case_manager/tools/__init__.py +0 -0
- package/src/stlc_agents/agent_test_case_manager/tools/ado_workitem.py +302 -0
- package/src/stlc_agents/shared/__init__.py +0 -0
- package/src/stlc_agents/shared/auth.py +119 -0
package/README.md
ADDED
|
@@ -0,0 +1,310 @@
|
|
|
1
|
+
# @stlc/agents
|
|
2
|
+
|
|
3
|
+
> AI-powered QA STLC automation — from Azure DevOps work item to self-healing Playwright TypeScript in a Helix-QA project.
|
|
4
|
+
|
|
5
|
+
Works with **GitHub Copilot** (VS Code Agent mode), **Claude Code**, **Cursor**, and **Windsurf**.
|
|
6
|
+
|
|
7
|
+
[](https://www.npmjs.com/package/@stlc/agents)
|
|
8
|
+
[](https://pypi.org/project/stlc-agents/)
|
|
9
|
+
[](LICENSE)
|
|
10
|
+
[](https://nodejs.org)
|
|
11
|
+
[](https://python.org)
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## What It Does
|
|
16
|
+
|
|
17
|
+
Four Python MCP servers cover the full QA Software Test Life Cycle:
|
|
18
|
+
|
|
19
|
+
| Agent | Input | Output |
|
|
20
|
+
|---|---|---|
|
|
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 the ADO work item |
|
|
23
|
+
| `qa-playwright-generator` | Gherkin + live browser | `locators.ts` + page objects + step defs attached to ADO |
|
|
24
|
+
| `qa-helix-writer` | Generated `.ts` files + `helix_root` | Files written to Helix-QA directory layout on disk |
|
|
25
|
+
|
|
26
|
+
A fifth 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.
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
## Install
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
npm install -g @stlc/agents
|
|
34
|
+
qa-stlc init --vscode
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
`qa-stlc init` does three things:
|
|
38
|
+
1. `pip install stlc-agents` — installs the four Python MCP servers
|
|
39
|
+
2. Copies skill files to `.github/copilot-instructions/` (and `.claude/` if not `--vscode`)
|
|
40
|
+
3. Writes `.vscode/mcp.json` with all five servers configured
|
|
41
|
+
|
|
42
|
+
Start the Playwright browser server before your first session:
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
npx @playwright/mcp@latest --port 8931
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
---
|
|
49
|
+
|
|
50
|
+
## Requirements
|
|
51
|
+
|
|
52
|
+
- Node.js ≥ 18
|
|
53
|
+
- Python ≥ 3.10, < 3.14
|
|
54
|
+
- Azure DevOps organisation with a `.env` containing:
|
|
55
|
+
|
|
56
|
+
```env
|
|
57
|
+
ADO_ORGANIZATION_URL=https://dev.azure.com/your-org
|
|
58
|
+
ADO_PROJECT_NAME=YourProject
|
|
59
|
+
ADO_PAT=your-personal-access-token
|
|
60
|
+
APP_BASE_URL=your-app-base-url
|
|
61
|
+
APP_EMAIL=your-test-email@example.com
|
|
62
|
+
APP_PASSWORD=your-test-password
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
---
|
|
66
|
+
|
|
67
|
+
## Commands
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
qa-stlc init [--vscode] [--python <path>]
|
|
71
|
+
# Full bootstrap: pip install + skills + MCP config
|
|
72
|
+
|
|
73
|
+
qa-stlc scaffold [--name <name>] [--dir <path>] [--no-install]
|
|
74
|
+
# Copy full Playwright + Cucumber + TypeScript boilerplate to a new project directory
|
|
75
|
+
|
|
76
|
+
qa-stlc skills [--target claude|vscode|cursor|windsurf|both|print]
|
|
77
|
+
# Copy skill files to the correct AI coding agent directory
|
|
78
|
+
|
|
79
|
+
qa-stlc mcp-config [--vscode] [--print] [--python <path>] [--playwright-port <n>]
|
|
80
|
+
# Write .vscode/mcp.json (--vscode) or .mcp.json (Claude Code)
|
|
81
|
+
|
|
82
|
+
qa-stlc verify
|
|
83
|
+
# Check that all five MCP servers are reachable
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
---
|
|
87
|
+
|
|
88
|
+
## Usage
|
|
89
|
+
|
|
90
|
+
Open your AI coding agent and use natural language:
|
|
91
|
+
|
|
92
|
+
```
|
|
93
|
+
# Generate test cases
|
|
94
|
+
Generate test cases for work item #12345 in MyProject at https://dev.azure.com/myorg
|
|
95
|
+
|
|
96
|
+
# Generate Gherkin BDD
|
|
97
|
+
Generate a Gherkin regression suite for Feature #11000 in MyProject at https://dev.azure.com/myorg
|
|
98
|
+
|
|
99
|
+
# Generate Playwright code (requires Playwright MCP running)
|
|
100
|
+
Generate Playwright TypeScript for the Gherkin I just created. The login page is at /auth/login
|
|
101
|
+
|
|
102
|
+
# Write to Helix-QA project
|
|
103
|
+
Write the generated files to my Helix-QA project at /workspace/my-qa-project
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
---
|
|
107
|
+
|
|
108
|
+
## Tool Reference
|
|
109
|
+
|
|
110
|
+
### qa-test-case-manager
|
|
111
|
+
|
|
112
|
+
| Tool | Description |
|
|
113
|
+
|---|---|
|
|
114
|
+
| `fetch_work_item` | Fetch a PBI, Bug, or Feature with acceptance criteria, linked test cases, and coverage hints. Returns `epic_not_supported` for Epics. Returns `confirmation_required: true` for Features. |
|
|
115
|
+
| `get_linked_test_cases` | List all test cases already linked to a work item. Call before generating to power the deduplication diff. |
|
|
116
|
+
| `create_and_link_test_cases` | Create structured manual test cases in ADO and link them via TestedBy-Forward. |
|
|
117
|
+
|
|
118
|
+
### qa-gherkin-generator
|
|
119
|
+
|
|
120
|
+
| Tool | Description |
|
|
121
|
+
|---|---|
|
|
122
|
+
| `fetch_epic_hierarchy` | Fetch an Epic and all child Features, PBIs, Bugs, and existing test cases. |
|
|
123
|
+
| `fetch_feature_hierarchy` | Fetch a Feature and all child PBIs/Bugs with acceptance criteria and existing attachments. |
|
|
124
|
+
| `fetch_work_item_for_gherkin` | Fetch a PBI or Bug with parent Feature context, suggested file name, and linked test case steps. |
|
|
125
|
+
| `attach_gherkin_to_feature` | Validate and attach a `.feature` file to a Feature work item. |
|
|
126
|
+
| `attach_gherkin_to_work_item` | Validate and attach a `.feature` file to a PBI or Bug work item. |
|
|
127
|
+
| `validate_gherkin_content` | Structural validation — tags, scenario count, navigation steps. Returns `valid: bool` + `errors` + `warnings`. |
|
|
128
|
+
|
|
129
|
+
### qa-playwright-generator
|
|
130
|
+
|
|
131
|
+
| Tool | Description |
|
|
132
|
+
|---|---|
|
|
133
|
+
| `generate_playwright_code` | Generate `locators.ts`, `*Page.ts`, `*.steps.ts`, and `cucumber-profile.js` from validated Gherkin + live AX-tree `context_map`. Hard-blocks if `context_map` is absent to prevent hallucinated locators. |
|
|
134
|
+
| `scaffold_locator_repository` | Generate the six Helix-QA healing infrastructure files. |
|
|
135
|
+
| `validate_gherkin_steps` | Check for duplicate step strings and missing `When` steps. |
|
|
136
|
+
| `attach_code_to_work_item` | Attach delta Playwright TypeScript files to an ADO work item. Pass only net-new delta files. |
|
|
137
|
+
|
|
138
|
+
### qa-helix-writer
|
|
139
|
+
|
|
140
|
+
| Tool | Description |
|
|
141
|
+
|---|---|
|
|
142
|
+
| `inspect_helix_project` | Returns `framework_state` (`present` / `partial` / `absent`) and `recommendation`. |
|
|
143
|
+
| `list_helix_tree` | List the full directory tree of a Helix-QA project. |
|
|
144
|
+
| `read_helix_file` | Read an existing file from the Helix-QA project for overlap detection. |
|
|
145
|
+
| `write_helix_files` | Write generated files to the correct Helix-QA paths. |
|
|
146
|
+
|
|
147
|
+
### playwright (external)
|
|
148
|
+
|
|
149
|
+
| Tool | Description |
|
|
150
|
+
|---|---|
|
|
151
|
+
| `browser_navigate` | Navigate to a URL in the live browser. |
|
|
152
|
+
| `browser_snapshot` | Capture the full AX tree — source for zero-hallucination locators. |
|
|
153
|
+
| `browser_fill_form` | Fill multiple form fields by ref. |
|
|
154
|
+
| `browser_click` | Click an element by ref. |
|
|
155
|
+
| `browser_file_upload` | Upload a file to a file input by ref. |
|
|
156
|
+
|
|
157
|
+
---
|
|
158
|
+
|
|
159
|
+
## MCP Config
|
|
160
|
+
|
|
161
|
+
### VS Code / GitHub Copilot (`.vscode/mcp.json`)
|
|
162
|
+
|
|
163
|
+
```json
|
|
164
|
+
{
|
|
165
|
+
"servers": {
|
|
166
|
+
"qa-test-case-manager": { "command": "/path/to/.venv/bin/qa-test-case-manager" },
|
|
167
|
+
"qa-gherkin-generator": { "command": "/path/to/.venv/bin/qa-gherkin-generator" },
|
|
168
|
+
"qa-playwright-generator": { "command": "/path/to/.venv/bin/qa-playwright-generator" },
|
|
169
|
+
"qa-helix-writer": { "command": "/path/to/.venv/bin/qa-helix-writer" },
|
|
170
|
+
"playwright": { "type": "http", "url": "http://localhost:8931/mcp" }
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
### Claude Code (`.mcp.json`)
|
|
176
|
+
|
|
177
|
+
```json
|
|
178
|
+
{
|
|
179
|
+
"mcpServers": {
|
|
180
|
+
"qa-test-case-manager": { "command": "/path/to/.venv/bin/qa-test-case-manager" },
|
|
181
|
+
"qa-gherkin-generator": { "command": "/path/to/.venv/bin/qa-gherkin-generator" },
|
|
182
|
+
"qa-playwright-generator": { "command": "/path/to/.venv/bin/qa-playwright-generator" },
|
|
183
|
+
"qa-helix-writer": { "command": "/path/to/.venv/bin/qa-helix-writer" },
|
|
184
|
+
"playwright": { "type": "url", "url": "ws://localhost:8931" }
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
> VS Code requires `http://localhost:8931/mcp` (with `/mcp` suffix).
|
|
190
|
+
> Claude Code requires `ws://localhost:8931` (WebSocket, no `/mcp`).
|
|
191
|
+
> `qa-stlc mcp-config` writes the correct format automatically.
|
|
192
|
+
|
|
193
|
+
---
|
|
194
|
+
|
|
195
|
+
## Skills Installed
|
|
196
|
+
|
|
197
|
+
| Skill | Purpose |
|
|
198
|
+
|---|---|
|
|
199
|
+
| `AGENT-BEHAVIOR.md` | Zero-inference contract. Read first. Always. |
|
|
200
|
+
| `generate-test-cases.md` | PBI / Bug / Feature → ADO manual test cases |
|
|
201
|
+
| `generate-gherkin.md` | Epic / Feature / PBI / Bug → validated `.feature` + ADO attach |
|
|
202
|
+
| `generate-playwright-code.md` | Gherkin + live browser → three-layer self-healing Playwright TypeScript |
|
|
203
|
+
| `write-helix-files.md` | Generated files → Helix-QA disk layout, scaffold or merge |
|
|
204
|
+
| `deduplication-protocol.md` | READ → DIFF → CREATE mandatory pre-flight gate |
|
|
205
|
+
|
|
206
|
+
---
|
|
207
|
+
|
|
208
|
+
## Three-Layer Self-Healing Architecture
|
|
209
|
+
|
|
210
|
+
| Layer | Class | What it heals |
|
|
211
|
+
|---|---|---|
|
|
212
|
+
| 1 — Locator | `LocatorHealer` | primary selector → role → label → text → AI Vision → CDPSession AX tree |
|
|
213
|
+
| 2 — Timing | `TimingHealer` | network-trace drift → auto-adjusted timeouts → HealingDashboard |
|
|
214
|
+
| 3 — Visual | `VisualIntentChecker` | element screenshot diff at assertions → HealingDashboard |
|
|
215
|
+
|
|
216
|
+
Healed selectors persist in `LocatorRepository`. HealingDashboard: `http://localhost:7890`.
|
|
217
|
+
|
|
218
|
+
All suggestions require human approval before entering version control.
|
|
219
|
+
|
|
220
|
+
---
|
|
221
|
+
|
|
222
|
+
## Run Tests
|
|
223
|
+
|
|
224
|
+
```bash
|
|
225
|
+
ENABLE_SELF_HEALING=true \
|
|
226
|
+
HEALING_DASHBOARD_PORT=7890 \
|
|
227
|
+
APP_BASE_URL=<your-app-base-url> \
|
|
228
|
+
APP_EMAIL=<email> \
|
|
229
|
+
APP_PASSWORD=<password> \
|
|
230
|
+
cucumber-js --config=config/cucumber.js -p <feature_profile>
|
|
231
|
+
|
|
232
|
+
# Smoke only
|
|
233
|
+
cucumber-js --config=config/cucumber.js -p <feature_profile> --tags "@smoke"
|
|
234
|
+
```
|
|
235
|
+
|
|
236
|
+
---
|
|
237
|
+
|
|
238
|
+
## Scaffold a New QA Project
|
|
239
|
+
|
|
240
|
+
The `scaffold` command copies the full Playwright + Cucumber + TypeScript boilerplate framework — including three-layer AI self-healing, BDD templates, and CI/CD integration — into a new project directory.
|
|
241
|
+
|
|
242
|
+
```bash
|
|
243
|
+
# Scaffold into ./my-qa-project (default name)
|
|
244
|
+
qa-stlc scaffold
|
|
245
|
+
|
|
246
|
+
# Custom project name and location
|
|
247
|
+
qa-stlc scaffold --name acme-e2e --dir /path/to/workspace/acme-e2e
|
|
248
|
+
|
|
249
|
+
# Skip npm install (e.g. to inspect files first)
|
|
250
|
+
qa-stlc scaffold --name acme-e2e --no-install
|
|
251
|
+
```
|
|
252
|
+
|
|
253
|
+
After scaffolding:
|
|
254
|
+
|
|
255
|
+
```bash
|
|
256
|
+
cd my-qa-project
|
|
257
|
+
npx playwright install chromium # install browser binaries
|
|
258
|
+
cp .env.example .env # already done by scaffold
|
|
259
|
+
# Edit .env — set BASE_URL and optionally AI_API_KEY
|
|
260
|
+
npm test # run the example scenario
|
|
261
|
+
```
|
|
262
|
+
|
|
263
|
+
### What Gets Scaffolded
|
|
264
|
+
|
|
265
|
+
| Layer | Contents |
|
|
266
|
+
|---|---|
|
|
267
|
+
| **Config** | `package.json`, `tsconfig.json`, `cucumber.js`, `.env.example`, `.gitignore` |
|
|
268
|
+
| **CI/CD** | `Dockerfile`, `docker-compose.yml`, `azure-pipelines.yml` |
|
|
269
|
+
| **Framework** | `src/hooks/`, `src/pages/BasePage.ts`, `src/locators/`, `src/config/` |
|
|
270
|
+
| **Self-healing** | All healing utilities: `LocatorHealer`, `TimingHealer`, `VisualIntentChecker`, `HealingDashboard`, `review-server`, `healix-ci-apply`, etc. |
|
|
271
|
+
| **AI utilities** | `AILocatorGenerator`, `AISelfHealing`, `AITestGenerator` |
|
|
272
|
+
| **Auth** | `AuthManager`, `AuthSetup` |
|
|
273
|
+
| **Templates** | `_template.feature`, `_template.locators.ts`, `_template.steps.ts`, `_TemplatePage.ts` |
|
|
274
|
+
| **Example test** | `src/test/features/example.feature` + steps |
|
|
275
|
+
|
|
276
|
+
### Healing Dashboard
|
|
277
|
+
|
|
278
|
+
During a test run the live dashboard is available at **http://localhost:7890**. After the run use the review server for promote-to-source + PR creation:
|
|
279
|
+
|
|
280
|
+
```bash
|
|
281
|
+
npm run healix:review # http://localhost:7891
|
|
282
|
+
# or in CI:
|
|
283
|
+
HEALIX_CI_AUTO_APPROVE=true npm run healix:apply-ci
|
|
284
|
+
```
|
|
285
|
+
|
|
286
|
+
---
|
|
287
|
+
|
|
288
|
+
## Development
|
|
289
|
+
|
|
290
|
+
```bash
|
|
291
|
+
make install # create .venv + pip install -e .
|
|
292
|
+
make test # run pytest tests/ -v
|
|
293
|
+
make skills # install skill files to .claude/skills/
|
|
294
|
+
make verify # check MSAL auth status without making ADO calls
|
|
295
|
+
make clean # remove .venv, __pycache__, dist
|
|
296
|
+
```
|
|
297
|
+
|
|
298
|
+
---
|
|
299
|
+
|
|
300
|
+
## Documentation
|
|
301
|
+
|
|
302
|
+
- [Quick Start Guide](docs/quickstart.md)
|
|
303
|
+
- [Architecture Reference](docs/architecture.md)
|
|
304
|
+
- [End-to-End Walkthrough](docs/walkthrough.md)
|
|
305
|
+
|
|
306
|
+
---
|
|
307
|
+
|
|
308
|
+
## License
|
|
309
|
+
|
|
310
|
+
MIT
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* postinstall.js — Auto-install Python MCP servers after npm install -g.
|
|
4
|
+
*/
|
|
5
|
+
"use strict";
|
|
6
|
+
|
|
7
|
+
const { spawnSync } = require("child_process");
|
|
8
|
+
const pkg = require("../package.json");
|
|
9
|
+
|
|
10
|
+
const C = {
|
|
11
|
+
reset: "\x1b[0m",
|
|
12
|
+
bold: "\x1b[1m",
|
|
13
|
+
green: "\x1b[32m",
|
|
14
|
+
cyan: "\x1b[36m",
|
|
15
|
+
yellow: "\x1b[33m",
|
|
16
|
+
red: "\x1b[31m",
|
|
17
|
+
dim: "\x1b[2m",
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
const b = (s) => `${C.bold}${s}${C.reset}`;
|
|
21
|
+
const ok = (s) => console.log(`${C.green}✓${C.reset} ${s}`);
|
|
22
|
+
const info = (s) => console.log(`${C.cyan}→${C.reset} ${s}`);
|
|
23
|
+
const warn = (s) => console.log(`${C.yellow}⚠${C.reset} ${s}`);
|
|
24
|
+
const y = (s) => `${C.yellow}${s}${C.reset}`;
|
|
25
|
+
const d = (s) => `${C.dim}${s}${C.reset}`;
|
|
26
|
+
|
|
27
|
+
console.log(`\n${b("QA STLC Agents")} — post-install\n`);
|
|
28
|
+
|
|
29
|
+
// ── 1. Find python ────────────────────────────────────────────────────────────
|
|
30
|
+
const pythonCandidates = ["python3", "python"];
|
|
31
|
+
let python = null;
|
|
32
|
+
for (const candidate of pythonCandidates) {
|
|
33
|
+
const r = spawnSync(candidate, ["--version"], { encoding: "utf8" });
|
|
34
|
+
if (r.status === 0) { python = candidate; break; }
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
if (!python) {
|
|
38
|
+
warn("Python not found — skipping pip install.");
|
|
39
|
+
warn("Run manually after installing Python 3.10+:");
|
|
40
|
+
warn(" pip install qa-gentic-stlc-agents");
|
|
41
|
+
} else {
|
|
42
|
+
// ── 2. pip install qa-gentic-stlc-agents ──────────────────────────────────────────
|
|
43
|
+
info("Installing qa-gentic-stlc-agents via pip…");
|
|
44
|
+
const pip = spawnSync(python, ["-m", "pip", "install", "qa-gentic-stlc-agents", "--upgrade", "--quiet"], {
|
|
45
|
+
stdio: "inherit",
|
|
46
|
+
encoding: "utf8",
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
if (pip.status === 0) {
|
|
50
|
+
ok("qa-gentic-stlc-agents installed.");
|
|
51
|
+
} else {
|
|
52
|
+
warn("pip install failed. Run manually: pip install qa-gentic-stlc-agents");
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
// ── 3. Next steps ─────────────────────────────────────────────────────────────
|
|
57
|
+
console.log(`
|
|
58
|
+
${b("Setup")} — run once in your project root:
|
|
59
|
+
|
|
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")}
|
|
62
|
+
|
|
63
|
+
${d("Writes .vscode/mcp.json + installs skill files — then reload VS Code.")}
|
|
64
|
+
|
|
65
|
+
${b("Start Playwright MCP")} ${d("(keep running in a separate terminal)")}:
|
|
66
|
+
|
|
67
|
+
${C.cyan}npx @playwright/mcp@latest --port 8931${C.reset}
|
|
68
|
+
|
|
69
|
+
${b("STLC Workflow")} — use agents in this order:
|
|
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")}
|
|
75
|
+
|
|
76
|
+
${d("Skills reference all four steps — ask your agent: \"@generate-playwright-code\"")}
|
|
77
|
+
${d("Docs: https://github.com/qa-gentic/stlc-agents")}
|
|
78
|
+
`);
|
package/bin/qa-stlc.js
ADDED
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* qa-stlc — CLI for QA STLC Agents
|
|
4
|
+
*
|
|
5
|
+
* Usage:
|
|
6
|
+
* qa-stlc init # Bootstrap MCP config + skills for current project
|
|
7
|
+
* qa-stlc skills [--target] # Install skills into a coding agent
|
|
8
|
+
* qa-stlc mcp-config [--vscode] # Write MCP server config
|
|
9
|
+
* qa-stlc verify # Check Python agents + Playwright MCP are reachable
|
|
10
|
+
* qa-stlc help # Show full help
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
"use strict";
|
|
14
|
+
|
|
15
|
+
const { program } = require("commander");
|
|
16
|
+
const path = require("path");
|
|
17
|
+
const pkg = require("../package.json");
|
|
18
|
+
|
|
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");
|
|
25
|
+
|
|
26
|
+
program
|
|
27
|
+
.name("qa-stlc")
|
|
28
|
+
.description(
|
|
29
|
+
"QA STLC Agents — MCP servers + skills for AI-powered test case, Gherkin, and Playwright generation."
|
|
30
|
+
)
|
|
31
|
+
.version(pkg.version);
|
|
32
|
+
|
|
33
|
+
// ── init ─────────────────────────────────────────────────────────────────────
|
|
34
|
+
program
|
|
35
|
+
.command("init")
|
|
36
|
+
.description(
|
|
37
|
+
"Bootstrap the current project: install Python MCP agents, copy skills, and write MCP config.\n" +
|
|
38
|
+
"Equivalent to running: pip install qa-gentic-stlc-agents && qa-stlc skills && qa-stlc mcp-config"
|
|
39
|
+
)
|
|
40
|
+
.option("--vscode", "Also write .vscode/mcp.json for GitHub Copilot")
|
|
41
|
+
.option("--python <path>", "Path to Python 3.10+ binary", "python3")
|
|
42
|
+
.action(cmdInit);
|
|
43
|
+
|
|
44
|
+
// ── skills ────────────────────────────────────────────────────────────────────
|
|
45
|
+
program
|
|
46
|
+
.command("skills")
|
|
47
|
+
.description("Install agent skill files into the current project for your coding agent to read.")
|
|
48
|
+
.option(
|
|
49
|
+
"--target <target>",
|
|
50
|
+
"Where to install: claude (default), vscode, cursor, windsurf, print",
|
|
51
|
+
"claude"
|
|
52
|
+
)
|
|
53
|
+
.action(cmdSkills);
|
|
54
|
+
|
|
55
|
+
// ── mcp-config ────────────────────────────────────────────────────────────────
|
|
56
|
+
program
|
|
57
|
+
.command("mcp-config")
|
|
58
|
+
.description("Generate MCP server configuration for Claude Code (.mcp.json) or VS Code (.vscode/mcp.json).")
|
|
59
|
+
.option("--vscode", "Write .vscode/mcp.json instead of .mcp.json")
|
|
60
|
+
.option("--print", "Print config to stdout without writing any file")
|
|
61
|
+
.option("--python <path>", "Path to Python 3.10+ binary or venv", "python3")
|
|
62
|
+
.option("--playwright-port <port>", "Port Playwright MCP is running on", "8931")
|
|
63
|
+
.action(cmdMcpConfig);
|
|
64
|
+
|
|
65
|
+
// ── verify ────────────────────────────────────────────────────────────────────
|
|
66
|
+
program
|
|
67
|
+
.command("verify")
|
|
68
|
+
.description("Check that Python MCP agents are installed and Playwright MCP is reachable.")
|
|
69
|
+
.option("--playwright-port <port>", "Port Playwright MCP is running on", "8931")
|
|
70
|
+
.action(cmdVerify);
|
|
71
|
+
|
|
72
|
+
// ── scaffold ──────────────────────────────────────────────────────────────────
|
|
73
|
+
program
|
|
74
|
+
.command("scaffold")
|
|
75
|
+
.description(
|
|
76
|
+
"Scaffold a new Playwright + Cucumber + TypeScript QA project from the Healix boilerplate.\n" +
|
|
77
|
+
"Includes three-layer AI self-healing, BDD templates, and CI/CD integration."
|
|
78
|
+
)
|
|
79
|
+
.option("--name <name>", "Project name (used in package.json and directory)", "my-qa-project")
|
|
80
|
+
.option("--dir <dir>", "Output directory (defaults to ./<name>)")
|
|
81
|
+
.option("--no-install", "Skip npm install after scaffolding")
|
|
82
|
+
.action(cmdScaffold);
|
|
83
|
+
|
|
84
|
+
program.parse(process.argv);
|
|
85
|
+
|
|
86
|
+
// Show help if no command given
|
|
87
|
+
if (!process.argv.slice(2).length) {
|
|
88
|
+
program.outputHelp();
|
|
89
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@qa-gentic/stlc-agents",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "QA STLC Agents — MCP servers + skills for AI-powered test case, Gherkin, and Playwright generation against Azure DevOps. Works with Claude Code, GitHub Copilot, Cursor, Windsurf.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"playwright",
|
|
7
|
+
"mcp",
|
|
8
|
+
"azure-devops",
|
|
9
|
+
"gherkin",
|
|
10
|
+
"bdd",
|
|
11
|
+
"qa",
|
|
12
|
+
"test-automation",
|
|
13
|
+
"claude",
|
|
14
|
+
"copilot",
|
|
15
|
+
"claude-code",
|
|
16
|
+
"mcp-server",
|
|
17
|
+
"self-healing"
|
|
18
|
+
],
|
|
19
|
+
"homepage": "https://github.com/qa-gentic/stlc-agents#readme",
|
|
20
|
+
"bugs": {
|
|
21
|
+
"url": "https://github.com/qa-gentic/stlc-agents/issues"
|
|
22
|
+
},
|
|
23
|
+
"repository": {
|
|
24
|
+
"type": "git",
|
|
25
|
+
"url": "git+https://github.com/qa-gentic/stlc-agents.git"
|
|
26
|
+
},
|
|
27
|
+
"license": "MIT",
|
|
28
|
+
"bin": {
|
|
29
|
+
"qa-stlc": "bin/qa-stlc.js"
|
|
30
|
+
},
|
|
31
|
+
"files": [
|
|
32
|
+
"bin/",
|
|
33
|
+
"src/",
|
|
34
|
+
"skills/",
|
|
35
|
+
".claude-plugin/",
|
|
36
|
+
"README.md"
|
|
37
|
+
],
|
|
38
|
+
"scripts": {
|
|
39
|
+
"postinstall": "node ./bin/postinstall.js"
|
|
40
|
+
},
|
|
41
|
+
"dependencies": {
|
|
42
|
+
"commander": "^12.0.0",
|
|
43
|
+
"which": "^4.0.0"
|
|
44
|
+
},
|
|
45
|
+
"engines": {
|
|
46
|
+
"node": ">=18.0.0"
|
|
47
|
+
}
|
|
48
|
+
}
|