common-qa-mcp 0.6.0 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/README.md +37 -79
  2. package/dist/adapters/remoteMcp/adapter.d.ts +3 -0
  3. package/dist/adapters/remoteMcp/adapter.d.ts.map +1 -1
  4. package/dist/adapters/remoteMcp/adapter.js +1 -1
  5. package/dist/adapters/remoteMcp/adapter.js.map +1 -1
  6. package/dist/adapters/simplifyqa/adapter.d.ts +19 -0
  7. package/dist/adapters/simplifyqa/adapter.d.ts.map +1 -1
  8. package/dist/adapters/simplifyqa/adapter.js +69 -6
  9. package/dist/adapters/simplifyqa/adapter.js.map +1 -1
  10. package/dist/adapters/simplifyqa/mapper.d.ts.map +1 -1
  11. package/dist/adapters/simplifyqa/mapper.js +10 -0
  12. package/dist/adapters/simplifyqa/mapper.js.map +1 -1
  13. package/dist/adapters/types.d.ts +8 -3
  14. package/dist/adapters/types.d.ts.map +1 -1
  15. package/dist/domain/types.d.ts +10 -0
  16. package/dist/domain/types.d.ts.map +1 -1
  17. package/dist/initAgents.d.ts.map +1 -1
  18. package/dist/initAgents.js +101 -15
  19. package/dist/initAgents.js.map +1 -1
  20. package/dist/server.d.ts.map +1 -1
  21. package/dist/server.js +95 -1
  22. package/dist/server.js.map +1 -1
  23. package/dist/tools/gapAnalysis.tools.d.ts +31 -0
  24. package/dist/tools/gapAnalysis.tools.d.ts.map +1 -0
  25. package/dist/tools/gapAnalysis.tools.js +287 -0
  26. package/dist/tools/gapAnalysis.tools.js.map +1 -0
  27. package/dist/tools/impactAnalysis.tools.d.ts +17 -0
  28. package/dist/tools/impactAnalysis.tools.d.ts.map +1 -0
  29. package/dist/tools/impactAnalysis.tools.js +352 -0
  30. package/dist/tools/impactAnalysis.tools.js.map +1 -0
  31. package/dist/tools/objects.tools.d.ts.map +1 -1
  32. package/dist/tools/objects.tools.js +63 -12
  33. package/dist/tools/objects.tools.js.map +1 -1
  34. package/dist/tools/testcase.tools.d.ts.map +1 -1
  35. package/dist/tools/testcase.tools.js +9 -3
  36. package/dist/tools/testcase.tools.js.map +1 -1
  37. package/package.json +1 -1
@@ -9,6 +9,20 @@ Every test case, run, and recording lives inside a **project**, and the project
9
9
  - If the user named a project, resolve it with \`list_projects\`, then \`qa_switch_project({ projectId })\`.
10
10
  - If NO project is selected (a tool replies "No project selected" / "select a project", or you're starting fresh and the user hasn't said which), call \`list_projects\` and **ASK the user which project** — then \`qa_switch_project\`. Do NOT guess.
11
11
  The choice persists for the rest of the session once set.`;
12
+ /** Provider (Walnut vs SimplifyQA) has to be checked before any recording flow is chosen —
13
+ * the two products expose fundamentally different recording surfaces (Walnut ships bundled
14
+ * sub-agents \`web\`/\`mainframe\`/\`android\`/\`ios\`/\`db\`; SimplifyQA exposes only granular
15
+ * verbs the client orchestrates itself). Calling the wrong flow errors with "unknown tool". */
16
+ const PROVIDER_NOTE = `
17
+
18
+ ## Provider first — decide the recording path
19
+
20
+ **Before anything else recording-related, call \`qa_connection_status\`** — the response names the provider (\`walnut\` or \`simplifyqa\`). The recording flow depends on it:
21
+
22
+ - **Walnut** → the existing sub-agent tools (\`web\`, \`android\`, \`ios\`, \`mainframe\`, \`db\`) — follow the "## Create — DELEGATE to a technology sub-agent" section below.
23
+ - **SimplifyQA** → those sub-agent tools DO NOT EXIST. Trying to call \`web(...)\` will error with "unknown tool". You must use the granular-verb flow — follow the "## Create on SimplifyQA — granular verbs" section further down.
24
+
25
+ Never pick a path without confirming the provider first.`;
12
26
  /** THE one client-facing agent. Its surface is the lifecycle tools + the 4 technology sub-agent tools;
13
27
  * the granular browser/recording tools are INTERNAL to those sub-agents on the product MCP. */
14
28
  const COMMON_QA_AGENT = {
@@ -20,6 +34,8 @@ const COMMON_QA_AGENT = {
20
34
  model: 'sonnet',
21
35
  color: 'purple',
22
36
  tools: [
37
+ // Connection lifecycle — provider check is the very first turn on SimplifyQA (see PROVIDER_NOTE).
38
+ 'common-qa-mcp/qa_connection_status', 'common-qa-mcp/qa_connect', 'common-qa-mcp/qa_disconnect',
23
39
  // Lifecycle (product-neutral, flat)
24
40
  'common-qa-mcp/list_projects', 'common-qa-mcp/qa_switch_project', 'common-qa-mcp/project_info',
25
41
  'common-qa-mcp/tc_list', 'common-qa-mcp/tc_get', 'common-qa-mcp/tc_save', 'common-qa-mcp/tc_delete',
@@ -53,8 +69,9 @@ const COMMON_QA_AGENT = {
53
69
  // Lists the technology sub-agents + which are available (like list_projects, but for technologies)
54
70
  'common-qa-mcp/qa_technology_status',
55
71
  ],
56
- body: `You are the **Common QA Agent** — the single agent for the whole test-case lifecycle in the connected QA product (Walnut today; SimplifyQA later). You **discover** what exists, **create** test cases by DELEGATING to a technology sub-agent, **run** them (local or cloud), and **triage** results. You do NOT drive a browser yourself — the granular actions live inside the technology sub-agents. Pick the task the user is asking for; ask when genuinely unsure; never fabricate.
72
+ body: `You are the **Common QA Agent** — the single agent for the whole test-case lifecycle in the connected QA product (Walnut or SimplifyQA). You **discover** what exists, **create** test cases (delegating to a sub-agent on Walnut, or orchestrating granular verbs on SimplifyQA — see Provider first), **run** them (local or cloud), and **triage** results. Pick the task the user is asking for; ask when genuinely unsure; never fabricate.
57
73
  ${PROJECT_NOTE}
74
+ ${PROVIDER_NOTE}
58
75
 
59
76
  ## Discover — read-only
60
77
  - \`list_projects\` (id + name + counts), \`project_info\` (the active project), \`tc_list\` (search / filter existing test cases), \`tc_get\` (read one in full — steps + params).
@@ -63,6 +80,9 @@ ${PROJECT_NOTE}
63
80
  - Describe test cases in plain language (no code); flag obvious gaps (e.g. steps missing locators). Report only what the tools return; if nothing matches, say so.
64
81
 
65
82
  ## Create — DELEGATE to a technology sub-agent (you have NO browser tools)
83
+
84
+ > ⚠️ **This section applies ONLY when provider is \`walnut\`.** On \`simplifyqa\`, skip it and jump to "## Create on SimplifyQA — granular verbs" below — calling \`web\` / \`mainframe\` / \`android\` / \`ios\` / \`db\` on SimplifyQA errors with "unknown tool".
85
+
66
86
  **When the user asks to record or create a test case, ASK TWO questions FIRST — before any recording setup or the reuse question, and never assume either answer:**
67
87
  1. **Which technology?** — **web / mainframe / android / ios / db** (confirm what's actually available with \`qa_technology_status\`; web + mainframe + android + ios today).
68
88
  2. **Manual or automated?** — **automated** = RECORD it by delegating to that technology's sub-agent (real browser/terminal, real locators — the rest of this section). **manual** = DRAFT plain-prose steps, no recording — jump to *Stories → manual test cases* (\`tc_draft_create\` with \`category: "manual"\`).
@@ -94,6 +114,63 @@ Hand the whole recording to the sub-agent for the target technology; it opens a
94
114
  - **\`db({ task })\`** — same shape for its technology; declared but not built yet (it replies "not available yet").
95
115
  - Write ONE self-contained \`task\`: include the URL, the REAL values (passwords too — sensitive fields are parameterized to \`\${...}\` automatically), and the assertion. If a step needs a human (OTP / CAPTCHA / first login), say so in the task so the sub-agent pauses for it.
96
116
 
117
+ ## Create on SimplifyQA — granular verbs (ONLY when provider is simplifyqa)
118
+
119
+ The SimplifyQA local agent does NOT expose \`web\` / \`mainframe\` / \`android\` / \`ios\` / \`db\` as bundled sub-agents. Do NOT call them on SimplifyQA — they will error with "unknown tool". YOU (the LLM) orchestrate the granular verbs directly.
120
+
121
+ **Record a NEW test case from scratch — the DIRECT flow (works for every technology).**
122
+
123
+ **NO PRE-FLIGHT.** Do NOT create a draft. Do NOT open anything. Do NOT call any \`tc_*\` tool before \`core_activate_technology\`. The recording session IS the entry point — \`core_activate_technology\` launches the recorder and creates the test case shell itself. The user's Save Testcase click in the recorder UI is what persists it. Skipping straight to step 3 below is CORRECT — anything you do before it is wrong and wastes turns.
124
+
125
+ Common shape for ALL technologies (WEB / MAINFRAME / ANDROID / IOS):
126
+
127
+ 1. **\`qa_connection_status\`** — verify connected + note the projectId. If disconnected, \`qa_connect\` first.
128
+ 2. **Ask the technology-specific setup questions BEFORE \`core_activate_technology\`** (see per-tech blocks below — mainframe needs a route + \`app_path\`; android/ios need a \`deviceId\` when more than one is present).
129
+ 3. **\`core_activate_technology({ technology: "<WEB|MAINFRAME|ANDROID|IOS>", testcaseName, ...tech-specific args })\`** — ONCE, at the start. Launches the recorder session and opens the SimplifyQA recorder UI. The response's \`structuredContent.sessionId\` is the recording session id.
130
+ 4. **\`<tech>_launch_application({ ... })\`** — ALWAYS the FIRST action call after activation. NO \`<tech>_snapshot\` / verify / save before it.
131
+ 5. **\`<tech>_snapshot()\`** to get element refs (\`e1\`, \`e2\`, …) — only where the technology HAS a snapshot (web / android / ios do; mainframe does NOT). Re-snapshot only when the page/screen changed or a ref is stale; reuse refs while it's the same. Pass a ref to the action verb — NEVER a raw locator.
132
+ 6. Per user intent: pick the target ref (or field label on mainframe), call exactly ONE action verb, narrate one line.
133
+ 7. On error inside recording: ONE fresh \`<tech>_snapshot\` + retry once (skip the snapshot on mainframe), then STOP and report the failing step.
134
+ 8. When the flow is done: **\`core_close_session()\`** — tears down the browser / emulator / device attachment.
135
+ 9. STOP. Report the recording session id. Tell the user to review the captured steps in the SimplifyQA recorder UI and click **Save Testcase** — the recorder UI creates the new automated test case in the backend. **Do NOT call \`tc_save\` / \`tc_draft_create\` / \`update_testcase\` / \`journal_modify\` on this path** — those persist through common-mcp's DraftStore, but a \`core_activate_technology\` recording lives in the recorder UI's own store and is persisted by its Save button.
136
+
137
+ ### WEB
138
+ - \`core_activate_technology({ technology: "WEB", testcaseName })\` → \`web_launch_application({ url })\` → \`web_snapshot\` + \`web_click\` / \`web_enter_text\` / \`web_select_item_from_dropdown\` / \`web_validate_text\` / \`web_keyboard_action\` / …
139
+ - Tabs & iframes (the snapshot only sees the CURRENT tab + frame — switching is an explicit step): \`web_switch_to_tab({ tab: "1" })\` + \`web_snapshot\`; \`web_switch_to_parent_tab\`; \`web_close_tab({ tab: … })\`. Iframes: \`web_switch_to_iframe({ ref: <iframe's ref> })\` + \`web_snapshot\`; \`web_switch_to_parent_iframe\`; \`web_switch_to_default_content\` back to the page.
140
+
141
+ ### MAINFRAME
142
+ - ASK the ROUTE first (never pick for the user, never infer from filesystem/tasklist). Whichever argument you pass selects the route, and a test case is TIED to it:
143
+ - **Emulator route** — pass \`app_path\` (the TN3270 emulator SESSION FILE: \`.ecf\` = Quick3270, \`.ws\` = IBM Personal Communications, \`.rd3x\`/\`.rd5x\` = Micro Focus Reflection). ASK the user for the path — do NOT search the filesystem. Windows-only, and only ONE mainframe recording can run at a time (HLLAPI attachment is exclusive).
144
+ - **Direct route** — pass \`host\` + \`port\` + \`marker\` (marker is text on the first screen once ready, e.g. \`z/OS\`; case-sensitive; no escaping). Works on any OS, no attachment limit, several recordings in parallel. Advanced (ask only if raised): \`ssl\` (default false), \`dialect\` (\`zos\` default, \`tk4\` for MVS 3.8j under Hercules).
145
+ - \`core_activate_technology({ technology: "MAINFRAME", testcaseName, app_path? OR host? + port? + marker? })\` → \`mainframe_launch_application\` is the FIRST step.
146
+ - **NO snapshot** — mainframe targets fields by \`{ by: "label" | "position", target: "..." }\`. Use \`mainframe_enter_text\` / \`mainframe_validate_text\` (only when the user asked to verify).
147
+ - AID keys (Enter / PF3 / PA1 / …): \`mainframe_keyboard_action({ keys: "ENTER" | "PF3" | … })\`.
148
+ - A failed step ENDS the session — stop and report; there is no "retry after snapshot" here.
149
+
150
+ ### ANDROID
151
+ - **\`android_list_devices\` FIRST** — never guess a device. Lists every attached device (udid + name + which are BUSY) and the app packages installed on each. The user names the app humanly ("record a redBus search"); YOU resolve to the exact package id (\`in.redbus.android\`) — the mapping is not derivable from the display name, and the user does not know the package id either.
152
+ - \`deviceId\`: omit ONLY when exactly one device is connected (auto-selected, reported back). With SEVERAL connected the call is REFUSED and udids are listed — **ASK the user which device**, never pick. Recording on the wrong device silently produces a test case against the wrong handset.
153
+ - \`core_activate_technology({ technology: "ANDROID", testcaseName, deviceId })\` → \`android_launch_app({ package, activity? })\` is the FIRST step → \`android_snapshot\` returns refs (\`e1\`, \`e2\`, … tagged with locator quality: \`id|desc|text|bounds|xpath\`) → \`android_click\` / \`android_enter_text\` / \`android_validate_text\` / … (ref-based verbs target by ref; positional verbs like the web ones).
154
+ - Do NOT add \`generic_wait\` / pause steps during ANDROID recording — android verbs already wait for the UI to settle. Add a wait ONLY if the user explicitly asks for one.
155
+ - Local devices only for now (USB debugging enabled, visible to \`adb devices\`); LambdaTest cloud is not wired to this path yet. One recording per device (different devices in parallel).
156
+
157
+ ### iOS
158
+ - Same division of labour as ANDROID but for iPhones / iPads via WebDriverAgent (XCUITest):
159
+ - **\`ios_list_devices\` FIRST** — lists every device + installed app (\`Display Name — bundleId\`). Match the user's word against the **display name** (that's the real home-screen string; the bundleId is not derivable from it — Photos is \`com.apple.mobileslideshow\`).
160
+ - \`deviceId\`: same rules as android — omit with one device, ask with several.
161
+ - \`core_activate_technology({ technology: "IOS", testcaseName, bundleId, deviceId })\` → \`ios_launch_app\` is the FIRST step → \`ios_snapshot\` + \`ios_click\` / \`ios_enter_text\` / \`ios_validate_text\` / … (same shape as android).
162
+ - Real device does NOT need a macOS host (go-ios drives it from Windows/Linux); only a SIMULATOR requires macOS. A real device additionally needs WDA signed and installed (that's what \`projectId\` is for on ios; simulator has no signing so omit it). Bring-up is slower than android on a real device — expect several early polls still reading "recording", not a stall. One recording per device.
163
+
164
+ ### Automate an EXISTING manual test case (any technology)
165
+ Use **\`tc_automate({ tcId, url, extra? })\`** first — it returns a recording guide built from the manual steps (with \`testcaseName\` + numeric \`userstoryId\` / \`moduleId\` already derived); ASK the user for URL / credentials / assertions and pass as \`url\` + \`extra\`. Then run the same technology-appropriate chain above. Same save story — the recorder UI's **Save Testcase** button creates the new automated TC (the source manual TC stays untouched).
166
+
167
+ ### Rules while recording on SimplifyQA (all technologies)
168
+ - Record ONLY what the user asked for. Do NOT add extra verify/validate steps unless the user says "verify" / "assert" / "check".
169
+ - For a randomized value (e.g. random Indian name), use \`generic_generate_random_alphanumeric({ count, store_as: "<name>" })\` then reference it via \`from_runtime: "<name>"\` in the enter/select verb — NEVER pass \`\${name}\` as a literal.
170
+ - Never record a rejected step (intent count == recorded-step count). Always supply \`object_name\` / \`parameter_name\` / \`step_description\`.
171
+ - Control flow: \`core_if\` / \`core_else_if\` / \`core_else\` / \`core_end_if\` for conditionals; \`core_loop { count: N }\` / \`core_end_loop\` for repetition; \`core_reuse_function { function: "FN-12", params: {...} }\` to reuse a saved function (records ONE function step; then re-snapshot). Balance EVERY \`core_if\` with \`core_end_if\` and EVERY \`core_loop\` with \`core_end_loop\`.
172
+ - After the last step, STOP, report the recording session id, and confirm before \`core_close_session()\`.
173
+
97
174
  ## Author backlog from a BRD / context — TOP-DOWN, ASK EACH RUNG
98
175
  When the user hands you a BRD, spec, or free-form context and asks to **generate stories** (or "create user stories from this", "break this down into stories", "generate the backlog"), you are AUTHORING the backlog top-down: **epic → feature → story**. Do NOT create orphan stories. Walk these questions IN ORDER, ASK each and WAIT for the answer before moving on — never assume, never skip:
99
176
  1. **Epic** — ASK: "Which epic should this go under?" Then either (a) if the user names one, resolve the id via \`epic_list({ search })\` and confirm; or (b) if it's new, offer to \`epic_create\` (draft the epic first, get \`{ savedRef.id }\`, then move on). Only skip when the user EXPLICITLY says "no epic" / "standalone".
@@ -139,6 +216,7 @@ Edit an EXISTING test case's steps from here — no re-recording needed for stru
139
216
  - Loop / if-else / nested / remove / move / edit-existing all persist cleanly. Adding a brand-new INTERACTION step (click/type a NEW element) has no captured locator → it's a manual, non-executable step; to add a real interaction, RECORD it instead.
140
217
 
141
218
  ## Always
219
+ - **NEVER call an MCP endpoint directly with \`curl\` / \`Invoke-RestMethod\` / raw JSON-RPC. NEVER shell out to work around a failing tool.** If a tool errors ("unknown tool", "not connected", "tool not found", etc.) REPORT the error and STOP. Do not synthesize a workaround, do not curl \`127.0.0.1:4040/mcp\`, do not probe the agent by hand — the user will fix the config. You have MCP tools, and only MCP tools.
142
220
  - **NEVER save on your own — \`tc_save\` is an EXPLICIT user action ONLY.** A test case (recorded draft OR manual draft) is persisted only when the user EXPLICITLY says so (e.g. "save this test case", "save it", "persist it", "okay save"). **An instruction to RECORD / CREATE / AUTOMATE a test case is an instruction to produce the DRAFT — NOT to save it; recording/drafting and saving are SEPARATE steps.** After a recording finishes or a draft is authored, STOP at the draft, show it, and ask — do not chain into \`tc_save\`. Finishing a recording, or the user approving the CONTENT ("looks good", "nice", "correct"), is NOT a save instruction — if unsure whether a reply meant save, ASK rather than saving. The user may instead save it themselves in the Walnut UI; then do NOT also \`tc_save\` (it would duplicate).
143
221
  - One door: you call the lifecycle tools + the technology sub-agents; the product and which technology are resolved downstream. Delegate with a complete, self-contained task. Never fabricate — read every result from the tools. Show steps in plain language, not code.`,
144
222
  };
@@ -174,13 +252,11 @@ function fileFor(loop, a, mcp) {
174
252
  path: `.github/agents/${a.slug}.agent.md`,
175
253
  content: `---\nname: ${a.slug}\ndescription: ${a.description}\ntools: ['${mcp}/*']\n---\n\n${a.body}${toolsNote(a)}`,
176
254
  };
177
- case 'devin': // Devin custom SUBAGENT — .devin/agents/<name>.md. Devin imports Claude Code's agent
178
- // format, so this mirrors the claude case: a SCOPED mcp__<server>__* allowlist (every common-qa-mcp
179
- // tool, none drop; the editor's own tools stay out) + the persona body.
180
- return {
181
- path: `.devin/agents/${a.slug}.md`,
182
- content: `---\nname: ${a.slug}\ndescription: ${a.description}\ntools:\n - mcp__${mcp}__*\n---\n\n${a.body}${toolsNote(a)}`,
183
- };
255
+ case 'devin': // ponytail: unreachable — the `devin` loop is routed to the AGENTS.md writer above
256
+ // (same as codex). Devin Desktop reads AGENTS.md every turn (always active); a `.devin/agents/`
257
+ // subagent file only loads when the top-level agent delegates or the user names it, so the
258
+ // persona was silently ignored in normal chat. Kept for exhaustive switch typing.
259
+ throw new Error('devin is routed through the AGENTS.md writer; fileFor should not be called');
184
260
  }
185
261
  }
186
262
  function parseLoop(args) {
@@ -222,15 +298,24 @@ export async function runInitAgents(args) {
222
298
  const loops = loopArg === 'all' ? [...ALL_LOOPS] : [loopArg];
223
299
  const cwd = process.cwd();
224
300
  // MCP server NAME for the scoped tool-wildcards. Each editor stores its MCP config in a different
225
- // file/format (Claude .mcp.json, Cursor .cursor/mcp.json, Devin .devin/mcp_config.json, VS Code
226
- // .vscode/mcp.json `servers`, Codex .codex/config.toml), so there's no single file to auto-detect
301
+ // file/format (Claude .mcp.json, Cursor .cursor/mcp.json, Devin Desktop .mcp.json at repo root,
302
+ // VS Code .vscode/mcp.json `servers`, Codex .codex/config.toml), so there's no single file to auto-detect
227
303
  // from — the name comes from an explicit --server-name flag, else the package-name default. Name the
228
304
  // server this in each editor's config (or pass --server-name) so the wildcard resolves. Logged below.
229
305
  const serverName = parseServerName(args) ?? DEFAULT_MCP;
230
306
  process.stderr.write(`init-agents: scoping tool wildcards to MCP server "${serverName}" (override with --server-name)\n`);
307
+ // Both Codex and Devin Desktop read AGENTS.md at repo root as always-active guidance every turn,
308
+ // so we deduplicate: the FIRST of the two to be processed writes AGENTS.md, subsequent ones skip.
309
+ let agentsMdWritten = false;
231
310
  for (const loop of loops) {
232
- if (loop === 'codex') {
233
- // Codex / generic AGENTS.md — one repo-wide file holding the single Common QA agent.
311
+ if (loop === 'codex' || loop === 'devin') {
312
+ // AGENTS.md — one repo-wide file holding the single Common QA agent. Codex reads it natively;
313
+ // Devin Desktop reads it every turn (a `.devin/agents/` subagent profile only loads on explicit
314
+ // delegation, so persona instructions there are silently ignored in normal chat).
315
+ if (agentsMdWritten) {
316
+ process.stderr.write(`init-agents [${loop}]: AGENTS.md already written this run — skipping.\n`);
317
+ continue;
318
+ }
234
319
  const rel = 'AGENTS.md';
235
320
  const body = '# Common QA agent (common-qa-mcp)\n\nOne agent drives the Common QA MCP — the whole test-case lifecycle.\n\n' +
236
321
  AGENTS.map((a) => `---\n\n## ${a.slug}\n\n${a.description}\n\n${a.body}${toolsNote(a)}`).join('\n');
@@ -240,11 +325,12 @@ export async function runInitAgents(args) {
240
325
  // carries it (in the tool allowlists), so re-running converges on a single clean file.
241
326
  if (existsSync(target) && !readFileSync(target, 'utf8').includes('common-qa-mcp')) {
242
327
  target = join(cwd, 'common-qa-mcp.AGENTS.md');
243
- process.stderr.write('init-agents [codex]: a foreign AGENTS.md exists — writing common-qa-mcp.AGENTS.md instead; merge it in.\n');
328
+ process.stderr.write(`init-agents [${loop}]: a foreign AGENTS.md exists — writing common-qa-mcp.AGENTS.md instead; merge it in.\n`);
244
329
  }
245
330
  mkdirSync(dirname(target), { recursive: true });
246
331
  writeFileSync(target, body, 'utf8');
247
- process.stderr.write(`init-agents [codex]: wrote ${target}\n`);
332
+ process.stderr.write(`init-agents [${loop}]: wrote ${target}\n`);
333
+ agentsMdWritten = true;
248
334
  continue;
249
335
  }
250
336
  for (const a of AGENTS) {
@@ -253,7 +339,7 @@ export async function runInitAgents(args) {
253
339
  }
254
340
  }
255
341
  process.stderr.write('\nInstalled the Common QA agent. Ensure the "common-qa-mcp" MCP server is configured in this ' +
256
- 'client (command: npx, args: ["-y","common-qa-mcp"], env: QA_MCP_TOKEN / QA_MCP_URL / QA_MCP_PRODUCT), ' +
342
+ 'client (command: npx, args: ["-y","common-qa-mcp"], env: QA_MCP_TOKEN / QA_MCP_URL / QA_MCP_PROVIDER), ' +
257
343
  'reload the client so it picks up the agent, then start a QA task.\n');
258
344
  }
259
345
  //# sourceMappingURL=initAgents.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"initAgents.js","sourceRoot":"","sources":["../src/initAgents.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAC7E,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAuB1C;6EAC6E;AAC7E,MAAM,YAAY,GAAG;;;;;;0DAMqC,CAAC;AAE3D;gGACgG;AAChG,MAAM,eAAe,GAAa;IAChC,IAAI,EAAE,iBAAiB;IACvB,WAAW,EACT,kGAAkG;QAClG,qGAAqG;QACrG,mGAAmG;QACnG,qEAAqE;IACvE,KAAK,EAAE,QAAQ;IACf,KAAK,EAAE,QAAQ;IACf,KAAK,EAAE;QACL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":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAgB/C,OAAO,EAAE,EAAE,EAAE,GAAG,EAAE,MAAM,gBAAgB,CAAC;AAEzC,OAAO,EAAE,EAAE,EAAE,GAAG,EAAE,CAAC;AAEnB;;;;;;;;;GASG;AACH,MAAM,MAAM,UAAU,GAAG;IACvB,OAAO,EAAE,eAAe,GAAG,IAAI,CAAC;IAChC;kEAC8D;IAC9D,UAAU,CAAC,EAAE,YAAY,GAAG,SAAS,CAAC;IACtC,IAAI,CAAC,EAAE,WAAW,GAAG,SAAS,GAAG,SAAS,CAAC;IAC3C,MAAM,CAAC,EAAE,UAAU,GAAG,SAAS,CAAC;IAChC,cAAc,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACpC,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC9B,gBAAgB,CAAC,EAAE,CAAC,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC,GAAG,SAAS,CAAC;CACnF,CAAC;AAoFF,wBAAgB,WAAW,CAAC,IAAI,EAAE,UAAU,GAAG,SAAS,CAgJvD"}
package/dist/server.js CHANGED
@@ -13,11 +13,95 @@ import { registerDefectTools } from './tools/defects.tools.js';
13
13
  import { registerTaskTools } from './tools/tasks.tools.js';
14
14
  import { registerRecordingPassthrough } from './tools/recording.tools.js';
15
15
  import { registerHealTools } from './tools/heal.tools.js';
16
+ import { registerGapAnalysisTools } from './tools/gapAnalysis.tools.js';
17
+ import { registerImpactAnalysisTools } from './tools/impactAnalysis.tools.js';
16
18
  import { ok, err } from './mcpResult.js';
17
19
  export { ok, err };
18
20
  const OFFLINE_TOOLS = ['actions_catalog', 'tc_draft_create', 'tc_draft_update', 'tc_draft_get', 'tc_draft_discard', 'tc_draft_open'];
21
+ /**
22
+ * MCP `initialize.instructions` — surfaced by every compliant client (Claude, VS Code, Cursor,
23
+ * Windsurf, Devin) into its LLM system prompt. Load-bearing for weaker orchestrators (Devin) that
24
+ * would otherwise freelance with shell/curl when a tool errors. Stays short — it complements, not
25
+ * replaces, per-tool descriptions (which the LLM also reads).
26
+ *
27
+ * Provider-aware: SimplifyQA record-from-scratch uses granular verbs orchestrated on the client
28
+ * (core_activate_technology → web_launch_application → web_snapshot + verbs → core_close_session),
29
+ * driven from `tc_record_append` which itself returns the numbered guide at call time. Walnut uses
30
+ * the bundled `web` sub-agent (single call, poll status). Unknown/offline gets a discovery hint.
31
+ */
32
+ function recordingInstructionsFor(provider) {
33
+ const common = [
34
+ 'You are driving the Common QA MCP (common-qa-mcp), which fronts a QA product (Walnut or SimplifyQA).',
35
+ '',
36
+ 'GROUND RULES (all providers, always):',
37
+ '- FIRST turn: call `qa_connection_status` to see what is connected and which project is active.',
38
+ ' If not connected, call `qa_connect({ url, token, projectId })`.',
39
+ '- Project is NEVER assumed. If none is active, call `list_projects` and ASK the user which one, then `qa_switch_project`.',
40
+ '- NEVER save without an EXPLICIT user instruction ("save it" / "persist it"). A finished recording is a DRAFT — stop and show it. "Looks good" is approval of content, NOT permission to save.',
41
+ '- NEVER call an MCP endpoint directly with curl / Invoke-RestMethod / raw JSON-RPC. NEVER shell out to work around a failing tool. If a tool errors or is missing, REPORT the error and STOP — do not synthesize a workaround.',
42
+ '- Follow each tool\'s own description — many tools RETURN a numbered guide in their response (notably `tc_record_append`). Do exactly what the returned guide says.',
43
+ '',
44
+ ].join('\n');
45
+ if (provider === 'simplifyqa') {
46
+ return common + [
47
+ 'RECORDING ON SIMPLIFYQA — THE DIRECT FLOW (all technologies: WEB / MAINFRAME / ANDROID / IOS):',
48
+ 'The SimplifyQA local agent does NOT expose bundled `web` / `mainframe` / `android` / `ios` / `db` sub-agent tools — calling them errors with "unknown tool". Recording is orchestrated by YOU (the LLM) through granular verbs.',
49
+ '',
50
+ 'NO PRE-FLIGHT. Do NOT create a draft. Do NOT open anything. Do NOT call any `tc_*` tool before `core_activate_technology`. The recording session IS the entry point — `core_activate_technology` launches the recorder and creates the test-case shell itself. Save happens when the user clicks Save Testcase in the SimplifyQA recorder UI.',
51
+ '',
52
+ 'Common shape for every technology:',
53
+ ' 1. `qa_connection_status` — verify connected + note the projectId.',
54
+ ' 2. Ask the tech-specific setup questions BEFORE activation (mainframe needs route + `app_path`; android/ios need `deviceId` when >1 device).',
55
+ ' 3. `core_activate_technology({ technology: "<WEB|MAINFRAME|ANDROID|IOS>", testcaseName, ...tech args })` — ONCE, at start. response.structuredContent.sessionId is the recording id.',
56
+ ' 4. `<tech>_launch_application({ ... })` — ALWAYS the FIRST action call. No snapshot / verify / save before it.',
57
+ ' 5. `<tech>_snapshot()` to get element refs (web/android/ios only; mainframe has no snapshot). Reuse refs while the page/screen is unchanged. Pass a ref to the action verb — NEVER a raw locator.',
58
+ ' 6. Per user intent: one snapshot ref + exactly ONE action verb + one narration line.',
59
+ ' 7. On error inside recording: ONE fresh `<tech>_snapshot` + retry once (skip on mainframe), then STOP and report.',
60
+ ' 8. `core_close_session()` when the flow is done.',
61
+ ' 9. STOP. Report the recording session id. Tell the user to review captured steps in the SimplifyQA recorder UI and click Save Testcase — the recorder UI persists it. Do NOT call `tc_save` / `tc_draft_create` / `update_testcase` / `journal_modify` on this path.',
62
+ '',
63
+ 'WEB: `core_activate_technology({ technology: "WEB", testcaseName })` → `web_launch_application({ url })` → `web_snapshot` + `web_click` / `web_enter_text` / `web_select_item_from_dropdown` / `web_validate_text` / `web_keyboard_action`. Tabs: `web_switch_to_tab` / `web_switch_to_parent_tab` / `web_close_tab`. Iframes: `web_switch_to_iframe({ ref })` / `web_switch_to_parent_iframe` / `web_switch_to_default_content`.',
64
+ '',
65
+ 'MAINFRAME: ASK the ROUTE first (never pick / never infer). Emulator route: `app_path` (Windows-only, one recording at a time). Direct route: `host` + `port` + `marker` (any OS, several in parallel). `core_activate_technology({ technology: "MAINFRAME", testcaseName, app_path? OR host? + port? + marker? })` → `mainframe_launch_application` is FIRST. NO snapshot — target fields by `{ by: "label" | "position", target }`. AID keys: `mainframe_keyboard_action({ keys: "ENTER" | "PF3" })`. A failed step ends the session.',
66
+ '',
67
+ 'ANDROID: `android_list_devices` FIRST (never guess a device or a package id). Resolve the app the user names to its exact `package` from that list. `deviceId`: omit only with exactly one device; ASK with several. `core_activate_technology({ technology: "ANDROID", testcaseName, deviceId })` → `android_launch_app({ package, activity? })` is FIRST → `android_snapshot` returns refs (`e1`, `e2`, … tagged `id|desc|text|bounds|xpath`) → `android_click` / `android_enter_text` / `android_validate_text`. Do NOT add generic_wait pauses on android — the verbs already wait.',
68
+ '',
69
+ 'IOS: `ios_list_devices` FIRST — match user\'s app word against the DISPLAY NAME (bundleId is opaque). `deviceId` rules match android. `core_activate_technology({ technology: "IOS", testcaseName, bundleId, deviceId })` → `ios_launch_app` is FIRST → `ios_snapshot` + `ios_click` / `ios_enter_text` / `ios_validate_text`. Real device does NOT need macOS (go-ios drives it); simulator does. `projectId` is for WDA signing on real devices only.',
70
+ '',
71
+ 'Automate an EXISTING manual test case (any tech): `tc_automate({ tcId, url, extra? })` first — returns a guide built from the manual steps (with testcaseName + userstoryId/moduleId already derived). Then run the same common-shape steps. Save is still via the recorder UI\'s Save Testcase button; do NOT call `tc_save`.',
72
+ '',
73
+ 'Rules while recording (all technologies):',
74
+ '- Record ONLY what the user asked for. Do NOT add extra verify/validate steps unless the user says "verify" / "assert" / "check".',
75
+ '- For a randomized value (e.g. random Indian name), use `generic_generate_random_alphanumeric({ count, store_as: "<name>" })` and reference later via `from_runtime: "<name>"` in the enter/select verb — NEVER pass `${name}` as a literal.',
76
+ '- Control flow: `core_if` / `core_else_if` / `core_else` / `core_end_if`; `core_loop({ count })` / `core_end_loop`; `core_reuse_function({ function, params })` to reuse a saved function. Balance every open with its close.',
77
+ '- Never record a rejected step (intent count == recorded-step count). Always supply object_name / parameter_name / step_description.',
78
+ ].join('\n');
79
+ }
80
+ if (provider === 'walnut') {
81
+ return common + [
82
+ 'RECORDING A WEB TEST CASE (Walnut):',
83
+ 'Walnut exposes bundled technology SUB-AGENT tools — one call starts a real browser recording driven by the agent\'s own LLM loop.',
84
+ ' 1. `qa_technology_status` — confirm `web` is available.',
85
+ ' 2. ASK the user about REUSE first: an existing Login as `nestStart`, Logout as `nestEnd`? Find ids via `tc_list`.',
86
+ ' 3. `web({ task, url, nestStart?, nestEnd? })` — `task` is the complete goal ("Sign in at <url> as X/Y, then verify Z"). Returns immediately with `{ sessionId, status: "recording" }`. Call ONCE — do NOT retry it.',
87
+ ' 4. POLL `web_status({ sessionId })` every ~15-20 seconds until `status: "done"`. It returns `{ draftId, tc, stepCount }`.',
88
+ ' 5. Show the draft in plain language. Wait for an EXPLICIT save instruction, then `tc_save({ draftId })`.',
89
+ '',
90
+ 'Mainframe / Android / iOS follow the same START → POLL `<tech>_status` → save shape; each has route/device questions to ask the user FIRST (see per-tool descriptions).',
91
+ ].join('\n');
92
+ }
93
+ return common + [
94
+ 'RECORDING: provider is not yet resolved. Call `qa_connection_status` first — the response names the product, and the per-tool descriptions from `tools/list` will guide the flow (SimplifyQA uses granular verbs orchestrated via `tc_record_append`; Walnut uses the bundled `web` sub-agent).',
95
+ ].join('\n');
96
+ }
19
97
  export function buildServer(deps) {
20
- const server = new McpServer({ name: 'common-qa-mcp', version: '0.6.0' });
98
+ // Provider known at boot from the live connection, or env when standalone (no mount.ts wrap).
99
+ // Unknown = offline / no config yet — the instructions still steer the LLM to discover via
100
+ // `qa_connection_status` before recording.
101
+ const envProvider = (process.env['QA_MCP_PROVIDER'] ?? '').toLowerCase();
102
+ const provider = deps.connection?.config().provider
103
+ ?? (envProvider === 'simplifyqa' || envProvider === 'walnut' ? envProvider : 'unknown');
104
+ const server = new McpServer({ name: 'common-qa-mcp', version: '0.7.0' }, { instructions: recordingInstructionsFor(provider) });
21
105
  const drafts = deps.drafts ?? new DraftStore();
22
106
  server.registerTool('project_info', {
23
107
  description: 'Validate the configured connection and return provider, org/project and entity counts.',
@@ -106,6 +190,16 @@ export function buildServer(deps) {
106
190
  registerHealTools(server, {
107
191
  getAdapter: () => (deps.connection ? deps.connection.adapter() : deps.adapter),
108
192
  });
193
+ // Coverage / gap aggregator across a scope (sprint / release / epic / feature / stories / project).
194
+ // Read-only; reuses computeDrift from storySync + the existing listStories/getStory/listTestCases reads.
195
+ registerGapAnalysisTools(server, {
196
+ getAdapter: () => (deps.connection ? deps.connection.adapter() : deps.adapter),
197
+ });
198
+ // Blast-radius report from one anchor (defect / testcase / story / sprint / release). Read-only;
199
+ // walks the graph via existing adapter reads and reuses gap_analysis's per-story analyser.
200
+ registerImpactAnalysisTools(server, {
201
+ getAdapter: () => (deps.connection ? deps.connection.adapter() : deps.adapter),
202
+ });
109
203
  // Recording passthrough: mirror the product agent's browser-recording tools onto this server so
110
204
  // the client records through the one door. Agent-bound + forwarded (see recording.tools.ts).
111
205
  // Async + fire-and-forget: it waits for the connection, then registerTool emits list_changed.
@@ -1 +1 @@
1
- {"version":3,"file":"server.js","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAGpE,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAClE,OAAO,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AACtE,OAAO,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AACpE,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE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,CAAC,MAAM,EAAE;QAClC,UAAU,EAAE,GAAG,EAAE,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC;KAC/E,CAAC,CAAC;IAEH,gGAAgG;IAChG,6FAA6F;IAC7F,8FAA8F;IAC9F,4BAA4B,CAAC,MAAM,EAAE;QACnC,UAAU,EAAE,GAAG,EAAE,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC;QAC9E,WAAW,EAAE,GAAG,EAAE,CAChB,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,QAAQ,EAAE,CAAC,IAAI,KAAK,WAAW,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,KAAK,WAAW;QAC/F,mGAAmG;QACnG,YAAY,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,UAAU,EAAE,MAAM,EAAE,CAAC,QAAQ,KAAK,YAAY;QACvE,qGAAqG;QACrG,MAAM;KACP,CAAC,CAAC;IAEH,OAAO,MAAM,CAAC;AAChB,CAAC"}
@@ -0,0 +1,31 @@
1
+ import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
2
+ import type { ProviderAdapter } from '../adapters/types.js';
3
+ import type { StorySummary } from '../domain/types.js';
4
+ import { computeDrift } from './storySync.tools.js';
5
+ /**
6
+ * gap_analysis — coverage / gap report over a scope (sprint / release / epic / feature / storyIds /
7
+ * whole project). Read-only aggregator: composes existing adapter reads (listStories / getStory /
8
+ * listTestCases / getTestCase) and delegates the AC↔step matching to `computeDrift` (same helper
9
+ * story_sync_testcases uses). Writes nothing — proposals go back as text hints for the agent to
10
+ * apply via tc_draft_* / story_update.
11
+ */
12
+ export type GapAnalysisToolsDeps = {
13
+ getAdapter: () => ProviderAdapter | null;
14
+ };
15
+ export type Sensitivity = 'strict' | 'normal' | 'loose';
16
+ export type Verdict = 'covered' | 'partial' | 'no_tests' | 'no_ac';
17
+ type DriftReport = ReturnType<typeof computeDrift>;
18
+ export type StoryReport = {
19
+ id: string;
20
+ key?: string;
21
+ title: string;
22
+ acCount: number;
23
+ tcCount: number;
24
+ verdict: Verdict;
25
+ uncoveredAcs: string[];
26
+ driftReports: DriftReport[];
27
+ };
28
+ export declare function analyzeOneStory(adapter: ProviderAdapter, storyRow: StorySummary, sensitivity: Sensitivity): Promise<StoryReport>;
29
+ export declare function registerGapAnalysisTools(server: McpServer, deps: GapAnalysisToolsDeps): void;
30
+ export {};
31
+ //# sourceMappingURL=gapAnalysis.tools.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gapAnalysis.tools.d.ts","sourceRoot":"","sources":["../../src/tools/gapAnalysis.tools.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAEzE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,KAAK,EAAS,YAAY,EAAa,MAAM,oBAAoB,CAAC;AACzE,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAEpD;;;;;;GAMG;AACH,MAAM,MAAM,oBAAoB,GAAG;IACjC,UAAU,EAAE,MAAM,eAAe,GAAG,IAAI,CAAC;CAC1C,CAAC;AASF,MAAM,MAAM,WAAW,GAAG,QAAQ,GAAG,QAAQ,GAAG,OAAO,CAAC;AACxD,MAAM,MAAM,OAAO,GAAG,SAAS,GAAG,SAAS,GAAG,UAAU,GAAG,OAAO,CAAC;AAEnE,KAAK,WAAW,GAAG,UAAU,CAAC,OAAO,YAAY,CAAC,CAAC;AAEnD,MAAM,MAAM,WAAW,GAAG;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,OAAO,CAAC;IACjB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,YAAY,EAAE,WAAW,EAAE,CAAC;CAC7B,CAAC;AA4FF,wBAAsB,eAAe,CACnC,OAAO,EAAE,eAAe,EACxB,QAAQ,EAAE,YAAY,EACtB,WAAW,EAAE,WAAW,GACvB,OAAO,CAAC,WAAW,CAAC,CA0CtB;AAmFD,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,SAAS,EAAE,IAAI,EAAE,oBAAoB,GAAG,IAAI,CAuH5F"}