common-qa-mcp 0.5.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 (69) hide show
  1. package/README.md +37 -79
  2. package/dist/adapters/remoteMcp/adapter.d.ts +7 -1
  3. package/dist/adapters/remoteMcp/adapter.d.ts.map +1 -1
  4. package/dist/adapters/remoteMcp/adapter.js +8 -3
  5. package/dist/adapters/remoteMcp/adapter.js.map +1 -1
  6. package/dist/adapters/simplifyqa/adapter.d.ts +112 -26
  7. package/dist/adapters/simplifyqa/adapter.d.ts.map +1 -1
  8. package/dist/adapters/simplifyqa/adapter.js +731 -240
  9. package/dist/adapters/simplifyqa/adapter.js.map +1 -1
  10. package/dist/adapters/simplifyqa/mapper.d.ts +5 -1
  11. package/dist/adapters/simplifyqa/mapper.d.ts.map +1 -1
  12. package/dist/adapters/simplifyqa/mapper.js +45 -1
  13. package/dist/adapters/simplifyqa/mapper.js.map +1 -1
  14. package/dist/adapters/types.d.ts +55 -13
  15. package/dist/adapters/types.d.ts.map +1 -1
  16. package/dist/adapters/walnut/actionTypes.d.ts +1 -1
  17. package/dist/adapters/walnut/actionTypes.d.ts.map +1 -1
  18. package/dist/adapters/walnut/actionTypes.js +37 -0
  19. package/dist/adapters/walnut/actionTypes.js.map +1 -1
  20. package/dist/adapters/walnut/mapper.d.ts.map +1 -1
  21. package/dist/adapters/walnut/mapper.js +12 -1
  22. package/dist/adapters/walnut/mapper.js.map +1 -1
  23. package/dist/domain/types.d.ts +105 -15
  24. package/dist/domain/types.d.ts.map +1 -1
  25. package/dist/initAgents.d.ts.map +1 -1
  26. package/dist/initAgents.js +132 -26
  27. package/dist/initAgents.js.map +1 -1
  28. package/dist/server.d.ts.map +1 -1
  29. package/dist/server.js +95 -1
  30. package/dist/server.js.map +1 -1
  31. package/dist/tools/backlog.tools.d.ts.map +1 -1
  32. package/dist/tools/backlog.tools.js +24 -2
  33. package/dist/tools/backlog.tools.js.map +1 -1
  34. package/dist/tools/connection.tools.d.ts.map +1 -1
  35. package/dist/tools/connection.tools.js +15 -3
  36. package/dist/tools/connection.tools.js.map +1 -1
  37. package/dist/tools/defects.tools.d.ts.map +1 -1
  38. package/dist/tools/defects.tools.js +29 -3
  39. package/dist/tools/defects.tools.js.map +1 -1
  40. package/dist/tools/discovery.tools.d.ts.map +1 -1
  41. package/dist/tools/discovery.tools.js +304 -137
  42. package/dist/tools/discovery.tools.js.map +1 -1
  43. package/dist/tools/gapAnalysis.tools.d.ts +31 -0
  44. package/dist/tools/gapAnalysis.tools.d.ts.map +1 -0
  45. package/dist/tools/gapAnalysis.tools.js +287 -0
  46. package/dist/tools/gapAnalysis.tools.js.map +1 -0
  47. package/dist/tools/impactAnalysis.tools.d.ts +17 -0
  48. package/dist/tools/impactAnalysis.tools.d.ts.map +1 -0
  49. package/dist/tools/impactAnalysis.tools.js +352 -0
  50. package/dist/tools/impactAnalysis.tools.js.map +1 -0
  51. package/dist/tools/markdown.d.ts.map +1 -1
  52. package/dist/tools/markdown.js +9 -5
  53. package/dist/tools/markdown.js.map +1 -1
  54. package/dist/tools/objects.tools.d.ts.map +1 -1
  55. package/dist/tools/objects.tools.js +174 -18
  56. package/dist/tools/objects.tools.js.map +1 -1
  57. package/dist/tools/recording.tools.d.ts.map +1 -1
  58. package/dist/tools/recording.tools.js +108 -10
  59. package/dist/tools/recording.tools.js.map +1 -1
  60. package/dist/tools/run.tools.d.ts.map +1 -1
  61. package/dist/tools/run.tools.js +257 -63
  62. package/dist/tools/run.tools.js.map +1 -1
  63. package/dist/tools/tasks.tools.d.ts.map +1 -1
  64. package/dist/tools/tasks.tools.js +29 -3
  65. package/dist/tools/tasks.tools.js.map +1 -1
  66. package/dist/tools/testcase.tools.d.ts.map +1 -1
  67. package/dist/tools/testcase.tools.js +14 -5
  68. package/dist/tools/testcase.tools.js.map +1 -1
  69. package/package.json +1 -1
@@ -9,22 +9,38 @@ 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 = {
15
29
  slug: 'common-qa-agent',
16
30
  description: 'The single QA agent for the connected product (Walnut / SimplifyQA): discover projects and test ' +
17
31
  'cases, create test cases by delegating a recording task to a technology sub-agent (web / android / ' +
18
- 'mainframe / db), run them (local or cloud), and triage the result. One agent for the whole ' +
32
+ 'ios / mainframe / db), run them (local or cloud), and triage the result. One agent for the whole ' +
19
33
  'lifecycle — the technology and the product are resolved downstream.',
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',
26
42
  'common-qa-mcp/tc_run', 'common-qa-mcp/run_status', 'common-qa-mcp/run_stop',
27
- 'common-qa-mcp/cloud_runners', 'common-qa-mcp/local_agents',
43
+ 'common-qa-mcp/cloud_runners', 'common-qa-mcp/local_agents', 'common-qa-mcp/remote_agents',
28
44
  // Manage existing schedules — list / edit / pause-resume-cancel / delete
29
45
  'common-qa-mcp/schedule_list', 'common-qa-mcp/schedule_update', 'common-qa-mcp/schedule_control', 'common-qa-mcp/schedule_delete',
30
46
  // User stories → manual test cases → automate. story_list/get pull up stories; tc_draft_create/update
@@ -48,22 +64,27 @@ const COMMON_QA_AGENT = {
48
64
  'common-qa-mcp/web', 'common-qa-mcp/web_status',
49
65
  'common-qa-mcp/mainframe', 'common-qa-mcp/mainframe_status',
50
66
  'common-qa-mcp/android', 'common-qa-mcp/android_status', 'common-qa-mcp/android_devices',
67
+ 'common-qa-mcp/ios', 'common-qa-mcp/ios_status', 'common-qa-mcp/ios_devices',
51
68
  'common-qa-mcp/db',
52
69
  // Lists the technology sub-agents + which are available (like list_projects, but for technologies)
53
70
  'common-qa-mcp/qa_technology_status',
54
71
  ],
55
- 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.
56
73
  ${PROJECT_NOTE}
74
+ ${PROVIDER_NOTE}
57
75
 
58
76
  ## Discover — read-only
59
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).
60
78
  - \`suite_list\` (the project's test suites) and \`suite_get\` (one suite with its ordered member test cases).
61
- - \`qa_technology_status\` — lists the technology sub-agents (web / android / mainframe / db) and which are available (web + mainframe + android today), the way \`list_projects\` lists projects. CHECK IT before promising a recording: mainframe additionally needs the agent to be on Windows with WINDOWS_MCP_ENABLED, and android needs a device visible to \`adb devices\` — both report that themselves.
79
+ - \`qa_technology_status\` — lists the technology sub-agents (web / android / ios / mainframe / db) and which are available (web + mainframe + android + ios today), the way \`list_projects\` lists projects. CHECK IT before promising a recording: mainframe additionally needs the agent to be on Windows with WINDOWS_MCP_ENABLED, android needs a device visible to \`adb devices\`, and iOS needs an attached iPhone (or, only for a SIMULATOR, a macOS host) — all three report that themselves.
62
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.
63
81
 
64
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
+
65
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:**
66
- 1. **Which technology?** — **web / mainframe / android / db** (confirm what's actually available with \`qa_technology_status\`; web + mainframe + android today).
87
+ 1. **Which technology?** — **web / mainframe / android / ios / db** (confirm what's actually available with \`qa_technology_status\`; web + mainframe + android + ios today).
67
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"\`).
68
89
  Proceed only after BOTH answers: automated → continue below; manual → the manual-drafting flow.
69
90
 
@@ -77,13 +98,87 @@ Hand the whole recording to the sub-agent for the target technology; it opens a
77
98
  - **"continue" / "carry on" / "resume"** → \`<tech>_recording_resume({ sessionId })\`, optionally with \`task\` to steer the rest of the flow differently. Same session, same browser/device, steps keep appending. Then go back to polling \`<tech>_status\`.
78
99
  - **"cancel" / "abandon" / "throw it away"** → \`<tech>_recording_discard({ sessionId })\`. This is IRREVERSIBLE — the steps are gone and nothing is saved — but it is also the only way to free a device / HLLAPI attachment / browser that is stuck holding a session. Confirm first unless the user has plainly asked to abandon it.
79
100
  - A paused recording **expires** if it is never resumed (it is holding a real resource); \`<tech>_status\` reports \`"paused"\` with the deadline. While paused, polling does NOT advance anything — do not sit in a poll loop waiting for \`"done"\`, tell the user it is paused and ask what they want to do.
80
- - Mainframe especially: a paused recording still holds the ONE HLLAPI attachment, so nothing else on the mainframe can run until it is resumed and finished, discarded, or expires.
101
+ - Mainframe especially, on the EMULATOR route (recorded with an emulator session file): a paused recording still holds the ONE HLLAPI attachment, so nothing else on the mainframe can run until it is resumed and finished, discarded, or expires. A recording on the DIRECT route (recorded with a \`target\`) holds no shared attachment, so a pause there blocks nothing and several can run at once.
81
102
  - **REVIEW BEFORE SAVING — never auto-save. This applies to EVERY technology.** When the poll tool (\`web_status\`, \`mainframe_status\`, …) reports \`"done"\`, show the user the recorded steps in plain language (including the nested Login/Logout wrappers) and ask them to confirm or request changes. A finished recording is an UNSAVED draft and nothing is persisted until they approve. **Being asked to "record a test case" / "create this test" is an instruction to RECORD (produce this draft) — it is NOT an instruction to save; recording and saving are SEPARATE steps, so STOP at the draft and ask.** Call **\`tc_save({ draftId })\`** ONLY when the user EXPLICITLY tells you to (e.g. "save it", "save this one", "persist it", "okay save"). Finishing a recording is NOT permission to save, and neither is the user saying the draft "looks good" / "nice" / "that's right" — those are approval of the CONTENT, not an instruction to persist it; if you are unsure whether a reply was a save instruction, ASK. The user may instead save it themselves in the Walnut UI — that's fine; do NOT also \`tc_save\` (it would duplicate). \`tc_save\` persists it as a DRAFT test case and opens it in the real Walnut UI for review / edit / run.
82
- - **\`mainframe({ task, appPath?, attachOnly?, nestStart?, nestEnd? })\`** — the SAME two-step shape for TN3270 terminals: it launches the emulator, attaches over HLLAPI, drives the screens (reading, sending text/AID keys, capturing each field by label + row/col), then you **poll \`mainframe_status({ sessionId })\`** every ~15–20 s until \`"done"\` — the same cadence as web, and HOLD that cadence. The 5–45 min figure is how long the RECORDING takes, NOT how long to wait between polls: a long quiet stretch is normal and is not a reason to slow the polling down, to assume it stalled, or to report elapsed time you have not actually observed (each poll returns the real elapsed seconds — read it, do not estimate). Pass \`appPath\` (the emulator SESSION FILE) so the emulator gets launched and step 1 records as "Launch \${app_path}" — omit it only to attach to an already-open emulator. The extension identifies the emulator: **\`.ecf\` = Quick3270, \`.ws\` = IBM Personal Communications, \`.rd3x\`/\`.rd5x\` = Micro Focus Reflection**. **If you do not know the path, ASK THE USER for it — do NOT go searching the filesystem**, and do NOT assume an extension (guessing \`.ws\` on a Quick3270 machine finds nothing and wastes the turn). Two constraints worth stating up front: it needs the agent on **Windows with WINDOWS_MCP_ENABLED**; and mainframe recordings **cannot overlap** (one HLLAPI session admits one attachment, so a second call is refused, not queued). Mainframe DOES record assertions — \`mf_verify_screen\` / \`mf_verify_field\` run against the live terminal — so include what to verify in the \`task\`, exactly as you would for web.
103
+ - **\`mainframe({ task, target?, appPath?, attachOnly?, nestStart?, nestEnd? })\`** — the SAME two-step shape for TN3270 terminals: it drives the screens (reading, sending text/AID keys, capturing each field by label + row/col), then you **poll \`mainframe_status({ sessionId })\`** every ~15–20 s until \`"done"\` — the same cadence as web, and HOLD that cadence. The 5–45 min figure is how long the RECORDING takes, NOT how long to wait between polls: a long quiet stretch is normal and is not a reason to slow the polling down, to assume it stalled, or to report elapsed time you have not actually observed (each poll returns the real elapsed seconds — read it, do not estimate).
104
+
105
+ **TWO ROUTES, and you MUST ASK THE USER which one FIRST — before any other work, and never pick for them.** Ask before you list test cases, before you read an existing one, and before you inspect the machine. Do NOT try to INFER the route: a running emulator does not mean the user wants the emulator route, an absent one does not rule it out (the direct route needs none), and the routes used by existing test cases in the project say nothing about the one they want now. Checking \`tasklist\` or the filesystem to decide this is always wrong — it answers a question nobody asked and biases you toward whatever happens to be installed. One question, then proceed. Whichever argument you pass selects the route, and a test case is TIED to the route it was recorded on, so this is not a detail you can decide later:
106
+ - **Direct (\`host\` + \`port\` + \`marker\`)** — dials the host over TN3270 with NO emulator. **ASK THE USER for all three, one question, before recording**: the hostname (\`zos.example.com\`), the port (\`1023\` on Marist, \`3270\` on a local Hercules — no safe default, so ask), and the marker: text that appears on the FIRST screen once the host is ready, e.g. \`z/OS\`. Pass the marker EXACTLY as the user gives it — matching is CASE-SENSITIVE, and no escaping or URL-encoding is needed, the tool assembles the target itself. Never invent a host and never reuse one from an earlier conversation.
107
+ ADVANCED, ask only if raised: \`ssl\` (default false, correct for plain TN3270) and \`dialect\` (\`zos\` default, \`tk4\` for MVS 3.8j under Hercules). \`target\` is the already-assembled form a SAVED test case carries — use it when replaying, not when recording something new.
108
+ No Windows requirement, no attachment limit, several recordings can run at once.
109
+ - **Emulator (\`appPath\`)** — launches a TN3270 emulator from its SESSION FILE and attaches over HLLAPI; step 1 records as "Launch \${app_path}". Omit \`appPath\` only to attach to an already-open emulator. The extension identifies the emulator: **\`.ecf\` = Quick3270, \`.ws\` = IBM Personal Communications, \`.rd3x\`/\`.rd5x\` = Micro Focus Reflection**. **If you do not know the path, ASK THE USER for it — do NOT go searching the filesystem**, and do NOT assume an extension (guessing \`.ws\` on a Quick3270 machine finds nothing and wastes the turn). This route needs the agent on **Windows with WINDOWS_MCP_ENABLED**, and emulator recordings **cannot overlap** (one HLLAPI session admits one attachment, so a second call is refused, not queued).
110
+
111
+ Mainframe DOES record assertions — \`mf_verify_screen\` / \`mf_verify_field\` run against the live terminal — so include what to verify in the \`task\`, exactly as you would for web.
83
112
  - **\`android({ task, packageName, deviceId?, activityName?, action?, nestStart?, nestEnd? })\`** — the SAME two-step shape for Android devices: it attaches to a real device over ADB (Appium + uiautomator2), launches \`packageName\`, drives the screens (reading UI snapshots, tapping, typing, scrolling, asserting), then you **poll \`android_status({ sessionId })\`** every ~15–20 s until \`"done"\` — the same cadence as web. The 5–15 min figure is the RECORDING duration, not a poll interval; expect many consecutive polls that still say \`"recording"\`, which is normal and not a stall. \`packageName\` is REQUIRED and is an exact package id (e.g. \`in.redbus.android\`) — **never ask the user for it and never guess it from the app's name** (redBus is \`in.redbus.android\`, Flipkart is \`com.flipkart.android\`; the mapping is not derivable). The user names the app the way a human does — *"record a redBus search"* — and YOU resolve it: call **\`android_devices\`** first, which lists every attached device and its installed apps as \`name — packageId\`, then pass that exact id. \`android_devices\` also shows which devices are BUSY, so you can avoid starting a recording that would be refused. **\`deviceId\` is the one to be careful with:** omit it and the agent auto-selects when EXACTLY ONE device is connected (it tells you which); with SEVERAL connected the call is REFUSED and lists the udids — **ASK THE USER which device to record on, never pick one yourself.** Recording on the wrong device does not fail, it silently produces a test case against the wrong handset. Two constraints worth stating up front: it needs a device visible to \`adb devices\` with USB debugging enabled; and one recording per device (a second call on the same udid is refused, though DIFFERENT devices record in parallel). Local devices only for now — LambdaTest cloud is not wired to this path yet.
113
+ - **\`ios({ task, bundleId, deviceId?, projectId?, nestStart?, nestEnd? })\`** — the SAME two-step shape for iPhones and iPads: it drives a booted SIMULATOR or a REAL device through **WebDriverAgent** (Apple's XCUITest server) over HTTP, launches \`bundleId\`, drives the screens, then you **poll \`ios_status({ sessionId })\`** every ~15–20 s until \`"done"\`. \`bundleId\` is REQUIRED and is an exact bundle id (\`com.apple.Preferences\`, not "Settings") — **never guess it from the display name** (Photos is \`com.apple.mobileslideshow\`) and **never ask the user for it**. Instead call **\`ios_devices\`**, which lists every installed app as \`Display Name — bundleId\`, and resolve it yourself: the user says *"record a Settings flow"* and YOU find the id — exactly the same division of labour as \`android_devices\`. One difference from android worth knowing: on iOS you match the user's word against the **display name**, because it is read from the app bundle and is the real home-screen string, whereas android's name column is a derived placeholder and must be matched against the package id instead. If nothing matches or several do, show the candidates and ask. \`deviceId\` behaves exactly as android's: omit it with exactly one device available, and with SEVERAL the call is REFUSED and lists them — **ask which one, never pick.** Three things that differ from android and are worth saying up front: **a real device does NOT need a macOS agent** — go-ios drives pairing, the developer image and WebDriverAgent from Windows and Linux too, and only a **SIMULATOR** requires macOS (xcodebuild + simctl), so on a non-Mac host pass a real device udid; a **real device additionally needs WDA signed and installed**, which is what \`projectId\` enables (a simulator needs no signing, so omit it there); and **bring-up is slower** than android on a real device — signing, install and tunnel — so several early polls still reading \`"recording"\` are expected, not a stall. One recording per device, as on android; DIFFERENT devices record in parallel.
84
114
  - **\`db({ task })\`** — same shape for its technology; declared but not built yet (it replies "not available yet").
85
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.
86
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
+
174
+ ## Author backlog from a BRD / context — TOP-DOWN, ASK EACH RUNG
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:
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".
177
+ 2. **Feature(s)** — ASK: "Which feature(s) should the stories live under?" — grouping matters. From a BRD, propose the split up front ("I see 3 features: X, Y, Z — should I create these under epic <name>?"), resolve names via \`feature_list({ epicId })\`, or \`feature_create\` new ones under the chosen epic. Do NOT scatter stories across features without confirmation.
178
+ 3. **Stories** — only NOW call \`story_create\` per story, passing both \`epicId\` and \`featureId\` from steps 1–2. When creating MULTIPLE stories from one BRD, group them under the SAME parent unless the BRD clearly splits them across features (in which case name the split and ask before creating).
179
+
180
+ The three questions are NOT optional and NOT batch-mergeable ("here's an epic + features + stories, save all?" — no). Ask, wait, resolve, then descend. On re-runs in the same session, the previously-chosen epic/feature persist — reuse them silently unless the user says "different epic".
181
+
87
182
  ## Stories → manual test cases → automate
88
183
  Pull up user stories, draft MANUAL test cases for them, and later promote those to automated.
89
184
  - **Backlog hierarchy: epic → feature → story.** Use **\`epic_list\` / \`epic_get\` / \`epic_create\` / \`epic_update\`** for the top rung (EP_XXX), **\`feature_list\` / \`feature_get\` / \`feature_create\` / \`feature_update\`** for the middle (FT_XXX, links up via \`epicId\`), and **\`story_create\` / \`story_update\`** for stories (US_XXX, links up via \`epicId\` + \`featureId\`). All four LIST tools accept the same \`createdBy\` / \`updatedBy\` / \`ownerId\` filters (numeric userId or \`"me"\`; resolve names via \`list_users\` first). Create/update require \`state\` — it must match the project's state config; call \`epic_get\` / \`feature_get\` / \`story_get\` on an existing item to see valid values. Updates take an \`updateVersion\` from the last read (optimistic concurrency) — omit it only for blind writes.
@@ -94,14 +189,16 @@ Pull up user stories, draft MANUAL test cases for them, and later promote those
94
189
 
95
190
  ## Run — execute & triage
96
191
  Runs are AUTOMATED-only — a MANUAL test case can't be run or scheduled by an agent (the backend refuses it). **NEVER assume anything** — walk the user through these IN ORDER, asking each and WAITING for the answer before the next (this mirrors the product UI exactly):
97
- 1. **Local or cloud?** — ASK; never guess.
192
+ 1. **Local, remote, or cloud?** — ASK; never guess. **local** = THIS machine's desktop agent; **remote** = ANOTHER registered machine (a teammate's box) via the SimplifyQA queue; **cloud** = a SimplifyQA cloud runner VM.
98
193
  2. **Now or scheduled?** — ASK; never guess.
99
194
  3. **If scheduled** — BEFORE offering any agent, ASK the START time (\`scheduledFor\`, ISO), the RECURRENCE (\`scheduleType\`: once / hourly / daily / weekdays / weekly / monthly — default once; hourly/daily/weekdays need an \`endDate\`) and the TIMEZONE.
100
- 4. **Browser?** — OFFER a choice for EVERY run (test case OR suite, local OR cloud, now OR scheduled): **chromium** (default), **chrome**, **msedge**, **firefox**, **webkit** → pass as \`browser\`. A SCHEDULE accepts only chromium / msedge / firefox / webkit (NOT chrome). If the user has no preference, default chromium — but always let them choose.
195
+ 4. **Browser?** — OFFER a choice for EVERY run (test case OR suite, any mode, now OR scheduled): **chromium** (default), **chrome**, **msedge**, **firefox**, **webkit** → pass as \`browser\`. A SCHEDULE accepts only chromium / msedge / firefox / webkit (NOT chrome). If the user has no preference, default chromium — but always let them choose.
101
196
  5. **THEN offer the agent/runner** — the AVAILABLE list depends on where AND when:
102
- - **local + now** → call **\`local_agents\`** and offer ONLY the **ONLINE** agents (a run-now can't target an offline agent). Pass the chosen one as **\`agentId\`** (or omit to auto-pick the user's own online agent).
103
- - **local + scheduled** → call **\`local_agents\`** and offer **ALL** agents — **ONLINE and OFFLINE** (a schedule can target an agent that's offline now; it runs when it fires). **\`agentId\` is REQUIRED** here — a schedule has no live session to fall back to.
104
- - **cloud (now OR scheduled)** → call **\`cloud_runners\`** and offer ONLY the **ONLINE** runners; if none are online, say *"there are no active cloud runners in your project"* and STOP (never silently fall back to local). Pass the chosen one as **\`cloudRunnerId\`** (for a schedule, omit it to let the backend auto-pick a live VM at fire time).
197
+ - **local + now** → call **\`local_agents\`** (0 or 1 row per box: this machine's own agent). If empty, tell the user to start the SimplifyQA desktop agent, or switch to \`remote\` / \`cloud\`. Otherwise pass \`agentId\` (or omit to auto-pick this machine's agent). \`tc_run\` also probes the desktop agent (:4040) and refuses cleanly if it's not up — you don't have to check yourself.
198
+ - **local + scheduled** → same as above, but **\`agentId\` is REQUIRED** (a schedule has no live session to fall back to).
199
+ - **remote + now** → call **\`remote_agents\`** and offer ONLY the **ONLINE** rows (a run-now can't target an offline remote agent). **\`agentId\` is REQUIRED** (no auto-pick across teammate boxes).
200
+ - **remote + scheduled** → call **\`remote_agents\`** and offer **ALL** rows (a schedule can target an offline agent; it runs when it fires). **\`agentId\` is REQUIRED**.
201
+ - **cloud (now OR scheduled)** → call **\`cloud_runners\`** and offer ONLY the **ONLINE** runners; if none are online, say *"there are no active cloud runners in your project"* and STOP (never silently fall back to local/remote). Pass the chosen one as **\`cloudRunnerId\`** (for a schedule, omit it to let the backend auto-pick a live VM at fire time).
105
202
  - Agents/runners read as **owner · hostname** (e.g. *rishi · SIMLAP24*) — present them that way so the user recognizes their machine; the credential id is only for the tool call.
106
203
  6. **Execute:**
107
204
  - **now** → **\`tc_run({ tcId, mode, when: "immediate", browser?, agentId? | cloudRunnerId? })\`** → a run id; then **poll \`run_status\`** until terminal (passed / failed / stopped / error). Don't call a still-\`queued\`/\`running\` run a result; if it stayed \`queued\` and never started, the agent likely didn't pick it up — say that, not "pass". **\`run_stop\`** cancels a run.
@@ -119,6 +216,7 @@ Edit an EXISTING test case's steps from here — no re-recording needed for stru
119
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.
120
217
 
121
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.
122
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).
123
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.`,
124
222
  };
@@ -154,13 +252,11 @@ function fileFor(loop, a, mcp) {
154
252
  path: `.github/agents/${a.slug}.agent.md`,
155
253
  content: `---\nname: ${a.slug}\ndescription: ${a.description}\ntools: ['${mcp}/*']\n---\n\n${a.body}${toolsNote(a)}`,
156
254
  };
157
- case 'devin': // Devin custom SUBAGENT — .devin/agents/<name>.md. Devin imports Claude Code's agent
158
- // format, so this mirrors the claude case: a SCOPED mcp__<server>__* allowlist (every common-qa-mcp
159
- // tool, none drop; the editor's own tools stay out) + the persona body.
160
- return {
161
- path: `.devin/agents/${a.slug}.md`,
162
- content: `---\nname: ${a.slug}\ndescription: ${a.description}\ntools:\n - mcp__${mcp}__*\n---\n\n${a.body}${toolsNote(a)}`,
163
- };
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');
164
260
  }
165
261
  }
166
262
  function parseLoop(args) {
@@ -202,15 +298,24 @@ export async function runInitAgents(args) {
202
298
  const loops = loopArg === 'all' ? [...ALL_LOOPS] : [loopArg];
203
299
  const cwd = process.cwd();
204
300
  // MCP server NAME for the scoped tool-wildcards. Each editor stores its MCP config in a different
205
- // file/format (Claude .mcp.json, Cursor .cursor/mcp.json, Devin .devin/mcp_config.json, VS Code
206
- // .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
207
303
  // from — the name comes from an explicit --server-name flag, else the package-name default. Name the
208
304
  // server this in each editor's config (or pass --server-name) so the wildcard resolves. Logged below.
209
305
  const serverName = parseServerName(args) ?? DEFAULT_MCP;
210
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;
211
310
  for (const loop of loops) {
212
- if (loop === 'codex') {
213
- // 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
+ }
214
319
  const rel = 'AGENTS.md';
215
320
  const body = '# Common QA agent (common-qa-mcp)\n\nOne agent drives the Common QA MCP — the whole test-case lifecycle.\n\n' +
216
321
  AGENTS.map((a) => `---\n\n## ${a.slug}\n\n${a.description}\n\n${a.body}${toolsNote(a)}`).join('\n');
@@ -220,11 +325,12 @@ export async function runInitAgents(args) {
220
325
  // carries it (in the tool allowlists), so re-running converges on a single clean file.
221
326
  if (existsSync(target) && !readFileSync(target, 'utf8').includes('common-qa-mcp')) {
222
327
  target = join(cwd, 'common-qa-mcp.AGENTS.md');
223
- 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`);
224
329
  }
225
330
  mkdirSync(dirname(target), { recursive: true });
226
331
  writeFileSync(target, body, 'utf8');
227
- process.stderr.write(`init-agents [codex]: wrote ${target}\n`);
332
+ process.stderr.write(`init-agents [${loop}]: wrote ${target}\n`);
333
+ agentsMdWritten = true;
228
334
  continue;
229
335
  }
230
336
  for (const a of AGENTS) {
@@ -233,7 +339,7 @@ export async function runInitAgents(args) {
233
339
  }
234
340
  }
235
341
  process.stderr.write('\nInstalled the Common QA agent. Ensure the "common-qa-mcp" MCP server is configured in this ' +
236
- '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), ' +
237
343
  'reload the client so it picks up the agent, then start a QA task.\n');
238
344
  }
239
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,6FAA6F;QAC7F,qEAAqE;IACvE,KAAK,EAAE,QAAQ;IACf,KAAK,EAAE,QAAQ;IACf,KAAK,EAAE;QACL,oCAAoC;QACpC,6BAA6B,EAAE,iCAAiC,EAAE,4BAA4B;QAC9F,uBAAuB,EAAE,sBAAsB,EAAE,uBAAuB,EAAE,yBAAyB;QACnG,sBAAsB,EAAE,0BAA0B,EAAE,wBAAwB;QAC5E,6BAA6B,EAAE,4BAA4B;QAC3D,yEAAyE;QACzE,6BAA6B,EAAE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AgB,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.5.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,MAAM,0BAA0B,CAAC;AAChE,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAClE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,E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,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"}
@@ -1 +1 @@
1
- {"version":3,"file":"backlog.tools.d.ts","sourceRoot":"","sources":["../../src/tools/backlog.tools.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAEzE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAE5D;;;;;GAKG;AACH,MAAM,MAAM,gBAAgB,GAAG;IAC7B,UAAU,EAAE,MAAM,eAAe,GAAG,IAAI,CAAC;CAC1C,CAAC;AAyCF,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,SAAS,EAAE,IAAI,EAAE,gBAAgB,GAAG,IAAI,CA8hBpF"}
1
+ {"version":3,"file":"backlog.tools.d.ts","sourceRoot":"","sources":["../../src/tools/backlog.tools.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAEzE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAE5D;;;;;GAKG;AACH,MAAM,MAAM,gBAAgB,GAAG;IAC7B,UAAU,EAAE,MAAM,eAAe,GAAG,IAAI,CAAC;CAC1C,CAAC;AAyCF,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,SAAS,EAAE,IAAI,EAAE,gBAAgB,GAAG,IAAI,CA4jBpF"}
@@ -286,6 +286,8 @@ export function registerBacklogTools(server, deps) {
286
286
  projectIds: z.array(z.number()).optional(),
287
287
  epicId: z.number().optional().describe('Parent epic numeric id. RESOLVE VIA `epic_list` OR ASK THE USER before creating — do not ' +
288
288
  'leave a feature parent-less unless the user explicitly says "no epic".'),
289
+ orphan: z.boolean().optional().describe('Set true ONLY if the user has explicitly said the feature has no parent epic ("standalone", ' +
290
+ '"no epic"). Required when `epicId` is omitted — the tool refuses otherwise.'),
289
291
  state: z.string().optional().describe('Optional. Defaults to the project-configured default feature state when omitted.'),
290
292
  priority: z.string().optional().describe('Optional. Defaults to the project-configured default feature priority when omitted.'),
291
293
  ownerId: z.number().optional(),
@@ -324,8 +326,15 @@ export function registerBacklogTools(server, deps) {
324
326
  return err(NOT_CONNECTED);
325
327
  if (!adapter.createFeature)
326
328
  return err('This product does not expose feature creation.');
329
+ if (input.epicId == null && input.orphan !== true) {
330
+ return err('HIERARCHY REQUIRED: no `epicId` provided. Before creating, ASK the user which epic this ' +
331
+ 'feature belongs to — offer (a) create a new epic first via `epic_create`, or (b) pick an ' +
332
+ 'existing one (list by name via `epic_list`). Only re-call with `orphan: true` if the user ' +
333
+ 'explicitly says "no epic" / "standalone".');
334
+ }
327
335
  try {
328
- const ref = await adapter.createFeature(input);
336
+ const { orphan: _orphan, ...payload } = input;
337
+ const ref = await adapter.createFeature(payload);
329
338
  return ok(`Created feature \`${ref.id}\`.`, { savedRef: ref });
330
339
  }
331
340
  catch (e) {
@@ -399,6 +408,9 @@ export function registerBacklogTools(server, deps) {
399
408
  'leave a story parent-less unless the user explicitly says "no parent".'),
400
409
  featureId: z.number().optional().describe('Parent feature numeric id. RESOLVE VIA `feature_list` OR ASK THE USER before creating — a ' +
401
410
  'story typically lives under a feature. Skip only if the user explicitly says "no feature".'),
411
+ orphan: z.boolean().optional().describe('Set true ONLY if the user has explicitly said the story has no parent ("standalone", "no ' +
412
+ 'epic/feature"). Required when BOTH `epicId` and `featureId` are omitted — the tool refuses ' +
413
+ 'otherwise so orphan stories cannot be created silently from a BRD/BRS prompt.'),
402
414
  moduleId: z.number().optional(),
403
415
  releaseId: z.number().optional(),
404
416
  iterationId: z.number().optional().describe('Sprint numeric id (SQA `iterationId`).'),
@@ -451,8 +463,18 @@ export function registerBacklogTools(server, deps) {
451
463
  return err(NOT_CONNECTED);
452
464
  if (!adapter.createStory)
453
465
  return err('This product does not expose story creation.');
466
+ if (input.epicId == null && input.featureId == null && input.orphan !== true) {
467
+ return err('HIERARCHY REQUIRED: no `epicId` or `featureId` provided. Before creating, ASK the user ' +
468
+ 'which parents this story belongs to — offer two paths: (a) generate the full Epic → ' +
469
+ 'Feature → Story hierarchy (call `epic_create` then `feature_create` then this tool), or ' +
470
+ '(b) pick existing parents (list by NAME via `epic_list` / `feature_list`, then pass their ' +
471
+ 'ids). Only re-call with `orphan: true` if the user explicitly says "no parent" / ' +
472
+ '"standalone". Apply the same ask to sibling stories in this batch — do not create some ' +
473
+ 'linked and some orphaned silently.');
474
+ }
454
475
  try {
455
- const ref = await adapter.createStory(input);
476
+ const { orphan: _orphan, ...payload } = input;
477
+ const ref = await adapter.createStory(payload);
456
478
  return ok(`Created story \`${ref.id}\`.`, { savedRef: ref });
457
479
  }
458
480
  catch (e) {