@playdrop/playdrop-cli 0.14.8 → 0.15.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 (186) hide show
  1. package/config/client-meta.json +2 -2
  2. package/dist/commands/agents.js +1 -1
  3. package/dist/commands/worker.js +2 -2
  4. package/node_modules/@playdrop/api-client/dist/client.d.ts +3 -1
  5. package/node_modules/@playdrop/api-client/dist/client.d.ts.map +1 -1
  6. package/node_modules/@playdrop/api-client/dist/domains/admin.d.ts +3 -1
  7. package/node_modules/@playdrop/api-client/dist/domains/admin.d.ts.map +1 -1
  8. package/node_modules/@playdrop/api-client/dist/domains/admin.js +46 -2
  9. package/node_modules/@playdrop/config/client-meta.json +2 -2
  10. package/node_modules/@playdrop/types/dist/api.d.ts +96 -1
  11. package/node_modules/@playdrop/types/dist/api.d.ts.map +1 -1
  12. package/node_modules/@playdrop/types/dist/api.js +17 -0
  13. package/node_modules/@playwright/mcp/LICENSE +201 -0
  14. package/node_modules/@playwright/mcp/README.md +1592 -0
  15. package/node_modules/@playwright/mcp/cli.js +32 -0
  16. package/node_modules/@playwright/mcp/config.d.ts +239 -0
  17. package/node_modules/@playwright/mcp/index.d.ts +23 -0
  18. package/node_modules/@playwright/mcp/index.js +19 -0
  19. package/node_modules/@playwright/mcp/node_modules/playwright/LICENSE +202 -0
  20. package/node_modules/@playwright/mcp/node_modules/playwright/NOTICE +5 -0
  21. package/node_modules/@playwright/mcp/node_modules/playwright/README.md +318 -0
  22. package/node_modules/@playwright/mcp/node_modules/playwright/ThirdPartyNotices.txt +14 -0
  23. package/node_modules/@playwright/mcp/node_modules/playwright/cli.js +19 -0
  24. package/node_modules/@playwright/mcp/node_modules/playwright/index.d.ts +17 -0
  25. package/node_modules/@playwright/mcp/node_modules/playwright/index.js +17 -0
  26. package/node_modules/@playwright/mcp/node_modules/playwright/index.mjs +18 -0
  27. package/node_modules/@playwright/mcp/node_modules/playwright/jsx-runtime.js +42 -0
  28. package/node_modules/@playwright/mcp/node_modules/playwright/jsx-runtime.mjs +21 -0
  29. package/node_modules/@playwright/mcp/node_modules/playwright/lib/agents/agentParser.js +89 -0
  30. package/node_modules/@playwright/mcp/node_modules/playwright/lib/agents/copilot-setup-steps.yml +34 -0
  31. package/node_modules/@playwright/mcp/node_modules/playwright/lib/agents/generateAgents.js +395 -0
  32. package/node_modules/@playwright/mcp/node_modules/playwright/lib/agents/playwright-test-coverage.prompt.md +31 -0
  33. package/node_modules/@playwright/mcp/node_modules/playwright/lib/agents/playwright-test-generate.prompt.md +8 -0
  34. package/node_modules/@playwright/mcp/node_modules/playwright/lib/agents/playwright-test-generator.agent.md +88 -0
  35. package/node_modules/@playwright/mcp/node_modules/playwright/lib/agents/playwright-test-heal.prompt.md +6 -0
  36. package/node_modules/@playwright/mcp/node_modules/playwright/lib/agents/playwright-test-healer.agent.md +56 -0
  37. package/node_modules/@playwright/mcp/node_modules/playwright/lib/agents/playwright-test-plan.prompt.md +9 -0
  38. package/node_modules/@playwright/mcp/node_modules/playwright/lib/agents/playwright-test-planner.agent.md +74 -0
  39. package/node_modules/@playwright/mcp/node_modules/playwright/lib/cli/reportActions.js +78 -0
  40. package/node_modules/@playwright/mcp/node_modules/playwright/lib/cli/testActions.js +213 -0
  41. package/node_modules/@playwright/mcp/node_modules/playwright/lib/common/index.js +2966 -0
  42. package/node_modules/@playwright/mcp/node_modules/playwright/lib/common/index.js.txt +34 -0
  43. package/node_modules/@playwright/mcp/node_modules/playwright/lib/errorContext.js +129 -0
  44. package/node_modules/@playwright/mcp/node_modules/playwright/lib/globals.js +58 -0
  45. package/node_modules/@playwright/mcp/node_modules/playwright/lib/index.js +783 -0
  46. package/node_modules/@playwright/mcp/node_modules/playwright/lib/isomorphic.js +260 -0
  47. package/node_modules/@playwright/mcp/node_modules/playwright/lib/isomorphic.js.txt +9 -0
  48. package/node_modules/@playwright/mcp/node_modules/playwright/lib/loader/loaderProcessEntry.js +34 -0
  49. package/node_modules/@playwright/mcp/node_modules/playwright/lib/loader/loaderProcessEntry.js.txt +9 -0
  50. package/node_modules/@playwright/mcp/node_modules/playwright/lib/matchers/expect.js +13480 -0
  51. package/node_modules/@playwright/mcp/node_modules/playwright/lib/matchers/expect.js.LICENSE +640 -0
  52. package/node_modules/@playwright/mcp/node_modules/playwright/lib/matchers/expect.js.txt +67 -0
  53. package/node_modules/@playwright/mcp/node_modules/playwright/lib/mcp/test/browserBackend.js +125 -0
  54. package/node_modules/@playwright/mcp/node_modules/playwright/lib/mcp/test/generatorTools.js +122 -0
  55. package/node_modules/@playwright/mcp/node_modules/playwright/lib/mcp/test/plannerTools.js +150 -0
  56. package/node_modules/@playwright/mcp/node_modules/playwright/lib/mcp/test/seed.js +82 -0
  57. package/node_modules/@playwright/mcp/node_modules/playwright/lib/mcp/test/streams.js +44 -0
  58. package/node_modules/@playwright/mcp/node_modules/playwright/lib/mcp/test/testBackend.js +99 -0
  59. package/node_modules/@playwright/mcp/node_modules/playwright/lib/mcp/test/testContext.js +306 -0
  60. package/node_modules/@playwright/mcp/node_modules/playwright/lib/mcp/test/testTool.js +30 -0
  61. package/node_modules/@playwright/mcp/node_modules/playwright/lib/mcp/test/testTools.js +98 -0
  62. package/node_modules/@playwright/mcp/node_modules/playwright/lib/package.js +47 -0
  63. package/node_modules/@playwright/mcp/node_modules/playwright/lib/program.js +237 -0
  64. package/node_modules/@playwright/mcp/node_modules/playwright/lib/runner/index.js +8154 -0
  65. package/node_modules/@playwright/mcp/node_modules/playwright/lib/runner/index.js.txt +59 -0
  66. package/node_modules/@playwright/mcp/node_modules/playwright/lib/transform/babelBundle.js +72275 -0
  67. package/node_modules/@playwright/mcp/node_modules/playwright/lib/transform/babelBundle.js.LICENSE +2384 -0
  68. package/node_modules/@playwright/mcp/node_modules/playwright/lib/transform/babelBundle.js.txt +325 -0
  69. package/node_modules/@playwright/mcp/node_modules/playwright/lib/transform/esmLoader.js +8060 -0
  70. package/node_modules/@playwright/mcp/node_modules/playwright/lib/transform/esmLoader.js.LICENSE +355 -0
  71. package/node_modules/@playwright/mcp/node_modules/playwright/lib/transform/esmLoader.js.txt +60 -0
  72. package/node_modules/@playwright/mcp/node_modules/playwright/lib/util.js +373 -0
  73. package/node_modules/@playwright/mcp/node_modules/playwright/lib/worker/workerProcessEntry.js +1850 -0
  74. package/node_modules/@playwright/mcp/node_modules/playwright/lib/worker/workerProcessEntry.js.txt +19 -0
  75. package/node_modules/@playwright/mcp/node_modules/playwright/package.json +58 -0
  76. package/node_modules/@playwright/mcp/node_modules/playwright/test.d.ts +18 -0
  77. package/node_modules/@playwright/mcp/node_modules/playwright/test.js +24 -0
  78. package/node_modules/@playwright/mcp/node_modules/playwright/test.mjs +35 -0
  79. package/node_modules/@playwright/mcp/node_modules/playwright/types/test.d.ts +10709 -0
  80. package/node_modules/@playwright/mcp/node_modules/playwright/types/testReporter.d.ts +908 -0
  81. package/node_modules/@playwright/mcp/node_modules/playwright-core/LICENSE +202 -0
  82. package/node_modules/@playwright/mcp/node_modules/playwright-core/NOTICE +5 -0
  83. package/node_modules/@playwright/mcp/node_modules/playwright-core/README.md +3 -0
  84. package/node_modules/@playwright/mcp/node_modules/playwright-core/ThirdPartyNotices.txt +13 -0
  85. package/node_modules/@playwright/mcp/node_modules/playwright-core/bin/install_media_pack.ps1 +5 -0
  86. package/node_modules/@playwright/mcp/node_modules/playwright-core/bin/install_webkit_wsl.ps1 +33 -0
  87. package/node_modules/@playwright/mcp/node_modules/playwright-core/bin/reinstall_chrome_beta_linux.sh +42 -0
  88. package/node_modules/@playwright/mcp/node_modules/playwright-core/bin/reinstall_chrome_beta_mac.sh +13 -0
  89. package/node_modules/@playwright/mcp/node_modules/playwright-core/bin/reinstall_chrome_beta_win.ps1 +24 -0
  90. package/node_modules/@playwright/mcp/node_modules/playwright-core/bin/reinstall_chrome_stable_linux.sh +42 -0
  91. package/node_modules/@playwright/mcp/node_modules/playwright-core/bin/reinstall_chrome_stable_mac.sh +12 -0
  92. package/node_modules/@playwright/mcp/node_modules/playwright-core/bin/reinstall_chrome_stable_win.ps1 +24 -0
  93. package/node_modules/@playwright/mcp/node_modules/playwright-core/bin/reinstall_msedge_beta_linux.sh +48 -0
  94. package/node_modules/@playwright/mcp/node_modules/playwright-core/bin/reinstall_msedge_beta_mac.sh +11 -0
  95. package/node_modules/@playwright/mcp/node_modules/playwright-core/bin/reinstall_msedge_beta_win.ps1 +23 -0
  96. package/node_modules/@playwright/mcp/node_modules/playwright-core/bin/reinstall_msedge_dev_linux.sh +48 -0
  97. package/node_modules/@playwright/mcp/node_modules/playwright-core/bin/reinstall_msedge_dev_mac.sh +11 -0
  98. package/node_modules/@playwright/mcp/node_modules/playwright-core/bin/reinstall_msedge_dev_win.ps1 +23 -0
  99. package/node_modules/@playwright/mcp/node_modules/playwright-core/bin/reinstall_msedge_stable_linux.sh +48 -0
  100. package/node_modules/@playwright/mcp/node_modules/playwright-core/bin/reinstall_msedge_stable_mac.sh +11 -0
  101. package/node_modules/@playwright/mcp/node_modules/playwright-core/bin/reinstall_msedge_stable_win.ps1 +24 -0
  102. package/node_modules/@playwright/mcp/node_modules/playwright-core/browsers.json +81 -0
  103. package/node_modules/@playwright/mcp/node_modules/playwright-core/cli.js +21 -0
  104. package/node_modules/@playwright/mcp/node_modules/playwright-core/index.d.ts +17 -0
  105. package/node_modules/@playwright/mcp/node_modules/playwright-core/index.js +17 -0
  106. package/node_modules/@playwright/mcp/node_modules/playwright-core/index.mjs +28 -0
  107. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/bootstrap.js +88 -0
  108. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/coreBundle.js +74495 -0
  109. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/entry/cliDaemon.js +5 -0
  110. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/entry/dashboardApp.js +3 -0
  111. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/entry/mcp.js +10 -0
  112. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/entry/oopBrowserDownload.js +3 -0
  113. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/package.js +50 -0
  114. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/server/chromium/appIcon.png +0 -0
  115. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/server/electron/loader.js +118 -0
  116. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/serverRegistry.js +7347 -0
  117. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/serverRegistry.js.LICENSE +354 -0
  118. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/tools/cli-client/channelSessions.js +141 -0
  119. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/tools/cli-client/cli.js +6 -0
  120. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/tools/cli-client/help.json +707 -0
  121. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/tools/cli-client/minimist.js +128 -0
  122. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/tools/cli-client/output.js +343 -0
  123. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/tools/cli-client/program.js +404 -0
  124. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/tools/cli-client/registry.js +176 -0
  125. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/tools/cli-client/session.js +258 -0
  126. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/tools/cli-client/skill/SKILL.md +420 -0
  127. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/tools/cli-client/skill/references/element-attributes.md +23 -0
  128. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/tools/cli-client/skill/references/playwright-tests.md +39 -0
  129. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/tools/cli-client/skill/references/request-mocking.md +87 -0
  130. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/tools/cli-client/skill/references/running-code.md +241 -0
  131. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/tools/cli-client/skill/references/session-management.md +225 -0
  132. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/tools/cli-client/skill/references/storage-state.md +275 -0
  133. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/tools/cli-client/skill/references/test-generation.md +433 -0
  134. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/tools/cli-client/skill/references/tracing.md +139 -0
  135. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/tools/cli-client/skill/references/video-recording.md +143 -0
  136. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/tools/dashboard/appIcon.png +0 -0
  137. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/tools/trace/SKILL.md +171 -0
  138. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/tools/utils/extension.js +78 -0
  139. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/tools/utils/socketConnection.js +108 -0
  140. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/utilsBundle.js +90764 -0
  141. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/utilsBundle.js.LICENSE +2179 -0
  142. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/dashboard/assets/codicon-DCmgc-ay.ttf +0 -0
  143. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/dashboard/assets/firefox-1bWoP6pv.svg +1 -0
  144. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/dashboard/assets/firefox-beta-k3eOH_eK.svg +1 -0
  145. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/dashboard/assets/firefox-nightly-Cp5nfeDT.svg +1 -0
  146. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/dashboard/assets/index-CyWAfh-p.js +11 -0
  147. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/dashboard/assets/index-DhC616m4.css +1 -0
  148. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/dashboard/assets/safari-na3_-uQk.svg +1 -0
  149. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/dashboard/index.html +29 -0
  150. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/dashboard/playwright-logo.svg +24 -0
  151. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/htmlReport/index.html +16 -0
  152. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/htmlReport/report.css +2 -0
  153. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/htmlReport/report.js +32 -0
  154. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/recorder/assets/codeMirrorModule--QdMvsKi.css +1 -0
  155. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/recorder/assets/codeMirrorModule-BVGIAA-i.js +32 -0
  156. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/recorder/assets/codicon-DCmgc-ay.ttf +0 -0
  157. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/recorder/assets/index-BQ57a3QC.js +129 -0
  158. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/recorder/assets/index-l_lX622x.css +1 -0
  159. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/recorder/index.html +29 -0
  160. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/recorder/playwright-logo.svg +9 -0
  161. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/traceViewer/assets/codeMirrorModule-BSEO6m_i.js +32 -0
  162. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/traceViewer/assets/defaultSettingsView-CT5oRh4X.js +181 -0
  163. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/traceViewer/assets/urlMatch-L3liM589.js +1 -0
  164. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/traceViewer/assets/xtermModule-BN2nOuEV.js +7 -0
  165. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/traceViewer/codeMirrorModule.-QdMvsKi.css +1 -0
  166. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/traceViewer/codicon.DCmgc-ay.ttf +0 -0
  167. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/traceViewer/defaultSettingsView.BLFoOugd.css +1 -0
  168. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/traceViewer/index.B_TqY17P.css +1 -0
  169. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/traceViewer/index.DLSGjmWZ.js +1 -0
  170. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/traceViewer/index.html +44 -0
  171. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/traceViewer/manifest.webmanifest +16 -0
  172. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/traceViewer/playwright-logo.svg +9 -0
  173. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/traceViewer/snapshot.B_Jk1wbt.js +1 -0
  174. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/traceViewer/snapshot.html +10 -0
  175. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/traceViewer/sw.bundle.js +4 -0
  176. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/traceViewer/uiMode.C7UW1sC9.css +1 -0
  177. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/traceViewer/uiMode.CZvydVOh.js +5 -0
  178. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/traceViewer/uiMode.html +18 -0
  179. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/vite/traceViewer/xtermModule.kHJ-D0s7.css +1 -0
  180. package/node_modules/@playwright/mcp/node_modules/playwright-core/lib/xdg-open +1267 -0
  181. package/node_modules/@playwright/mcp/node_modules/playwright-core/package.json +34 -0
  182. package/node_modules/@playwright/mcp/node_modules/playwright-core/types/protocol.d.ts +24842 -0
  183. package/node_modules/@playwright/mcp/node_modules/playwright-core/types/structs.d.ts +45 -0
  184. package/node_modules/@playwright/mcp/node_modules/playwright-core/types/types.d.ts +26088 -0
  185. package/node_modules/@playwright/mcp/package.json +51 -0
  186. package/package.json +3 -1
@@ -0,0 +1,395 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+ var generateAgents_exports = {};
30
+ __export(generateAgents_exports, {
31
+ ClaudeGenerator: () => ClaudeGenerator,
32
+ CodexGenerator: () => CodexGenerator,
33
+ CopilotGenerator: () => CopilotGenerator,
34
+ OpencodeGenerator: () => OpencodeGenerator,
35
+ VSCodeGenerator: () => VSCodeGenerator
36
+ });
37
+ module.exports = __toCommonJS(generateAgents_exports);
38
+ var import_fs = __toESM(require("fs"));
39
+ var import_path = __toESM(require("path"));
40
+ var import_seed = require("../mcp/test/seed");
41
+ var import_agentParser = require("./agentParser");
42
+ const colors = require("playwright-core/lib/utilsBundle").colors;
43
+ const yaml = require("playwright-core/lib/utilsBundle").yaml;
44
+ const { tomlArray, tomlBasicString, tomlMultilineBasicString } = require("playwright-core/lib/coreBundle").iso;
45
+ const { mkdirIfNeeded } = require("playwright-core/lib/coreBundle").utils;
46
+ async function loadAgentSpecs() {
47
+ const files = await import_fs.default.promises.readdir(__dirname);
48
+ return Promise.all(files.filter((file) => file.endsWith(".agent.md")).map((file) => (0, import_agentParser.parseAgentSpec)(import_path.default.join(__dirname, file))));
49
+ }
50
+ class ClaudeGenerator {
51
+ static async init(fullConfig, projectName, prompts) {
52
+ await initRepo(fullConfig, projectName, {
53
+ promptsFolder: prompts ? ".claude/prompts" : void 0
54
+ });
55
+ const agents = await loadAgentSpecs();
56
+ await import_fs.default.promises.mkdir(".claude/agents", { recursive: true });
57
+ for (const agent of agents)
58
+ await writeFile(`.claude/agents/${agent.name}.md`, ClaudeGenerator.agentSpec(agent), "\u{1F916}", "agent definition");
59
+ const mcpServer = process.platform === "win32" ? { command: "cmd", args: ["/c", "npx", "playwright", "run-test-mcp-server"] } : { command: "npx", args: ["playwright", "run-test-mcp-server"] };
60
+ await writeFile(".mcp.json", JSON.stringify({
61
+ mcpServers: {
62
+ "playwright-test": mcpServer
63
+ }
64
+ }, null, 2), "\u{1F527}", "mcp configuration");
65
+ initRepoDone();
66
+ }
67
+ static agentSpec(agent) {
68
+ const claudeToolMap = /* @__PURE__ */ new Map([
69
+ ["search", ["Glob", "Grep", "Read", "LS"]],
70
+ ["edit", ["Edit", "MultiEdit", "Write"]]
71
+ ]);
72
+ function asClaudeTool(tool) {
73
+ const [first, second] = tool.split("/");
74
+ if (!second)
75
+ return (claudeToolMap.get(first) || [first]).join(", ");
76
+ return `mcp__${first}__${second}`;
77
+ }
78
+ const examples = agent.examples.length ? ` Examples: ${agent.examples.map((example) => `<example>${example}</example>`).join("")}` : "";
79
+ const lines = [];
80
+ const header = {
81
+ name: agent.name,
82
+ description: agent.description + examples,
83
+ tools: agent.tools.map((tool) => asClaudeTool(tool)).join(", "),
84
+ model: agent.model,
85
+ color: agent.color
86
+ };
87
+ lines.push(`---`);
88
+ lines.push(yaml.stringify(header, { lineWidth: 1e5 }) + `---`);
89
+ lines.push("");
90
+ lines.push(agent.instructions);
91
+ return lines.join("\n");
92
+ }
93
+ }
94
+ class CodexGenerator {
95
+ static async init(fullConfig, projectName, prompts) {
96
+ await initRepo(fullConfig, projectName, {
97
+ promptsFolder: prompts ? ".codex/prompts" : void 0
98
+ });
99
+ const agents = await loadAgentSpecs();
100
+ await import_fs.default.promises.mkdir(".codex/agents", { recursive: true });
101
+ for (const agent of agents)
102
+ await writeFile(`.codex/agents/${CodexGenerator.codexName(agent)}.toml`, CodexGenerator.agentSpec(agent), "\u{1F916}", "agent definition");
103
+ initRepoDone();
104
+ }
105
+ // Codex's subagent registry rejects hyphenated identifiers at spawn time with
106
+ // `error=unknown agent_type '<name>'`. Codex's own documentation only shows
107
+ // snake_case names (`pr_explorer`, `reviewer`, `docs_researcher`, ...), see
108
+ // https://developers.openai.com/codex/subagents. Translate the shared agent
109
+ // name into snake_case so the filename and the `name` field stay in sync.
110
+ static codexName(agent) {
111
+ return agent.name.replace(/-/g, "_");
112
+ }
113
+ static agentSpec(agent) {
114
+ const mcpName = "playwright-test";
115
+ const enabledTools = [];
116
+ for (const tool of agent.tools) {
117
+ const [first, second] = tool.split("/");
118
+ if (second && first === mcpName)
119
+ enabledTools.push(second);
120
+ }
121
+ const sandboxMode = agent.tools.includes("edit") ? "workspace-write" : "read-only";
122
+ const mcpServer = process.platform === "win32" ? { command: "cmd", args: ["/c", "npx", "playwright", "run-test-mcp-server"] } : { command: "npx", args: ["playwright", "run-test-mcp-server"] };
123
+ const examples = agent.examples.length ? ` Examples: ${agent.examples.map((example) => `<example>${example}</example>`).join("")}` : "";
124
+ const lines = [];
125
+ lines.push(`name = ${tomlBasicString(CodexGenerator.codexName(agent))}`);
126
+ lines.push(`description = ${tomlBasicString(agent.description + examples)}`);
127
+ lines.push(`sandbox_mode = ${tomlBasicString(sandboxMode)}`);
128
+ lines.push(`developer_instructions = ${tomlMultilineBasicString(agent.instructions)}`);
129
+ lines.push("");
130
+ lines.push(`[mcp_servers.${mcpName}]`);
131
+ lines.push(`command = ${tomlBasicString(mcpServer.command)}`);
132
+ lines.push(`args = ${tomlArray(mcpServer.args)}`);
133
+ if (enabledTools.length)
134
+ lines.push(`enabled_tools = ${tomlArray(enabledTools)}`);
135
+ lines.push("");
136
+ return lines.join("\n");
137
+ }
138
+ }
139
+ class OpencodeGenerator {
140
+ static async init(fullConfig, projectName, prompts) {
141
+ await initRepo(fullConfig, projectName, {
142
+ defaultAgentName: "Build",
143
+ promptsFolder: prompts ? ".opencode/prompts" : void 0
144
+ });
145
+ const agents = await loadAgentSpecs();
146
+ for (const agent of agents) {
147
+ const prompt = [agent.instructions];
148
+ prompt.push("");
149
+ prompt.push(...agent.examples.map((example) => `<example>${example}</example>`));
150
+ await writeFile(`.opencode/prompts/${agent.name}.md`, prompt.join("\n"), "\u{1F916}", "agent definition");
151
+ }
152
+ await writeFile("opencode.json", OpencodeGenerator.configuration(agents), "\u{1F527}", "opencode configuration");
153
+ initRepoDone();
154
+ }
155
+ static configuration(agents) {
156
+ const opencodeToolMap = /* @__PURE__ */ new Map([
157
+ ["search", ["ls", "glob", "grep", "read"]],
158
+ ["edit", ["edit", "write"]]
159
+ ]);
160
+ const asOpencodeTool = (tools, tool) => {
161
+ const [first, second] = tool.split("/");
162
+ if (!second) {
163
+ for (const tool2 of opencodeToolMap.get(first) || [first])
164
+ tools[tool2] = true;
165
+ } else {
166
+ tools[`${first}*${second}`] = true;
167
+ }
168
+ };
169
+ const result = {};
170
+ result["$schema"] = "https://opencode.ai/config.json";
171
+ result["mcp"] = {};
172
+ result["tools"] = {
173
+ "playwright*": false
174
+ };
175
+ result["agent"] = {};
176
+ for (const agent of agents) {
177
+ const tools = {};
178
+ result["agent"][agent.name] = {
179
+ description: agent.description,
180
+ mode: "subagent",
181
+ prompt: `{file:.opencode/prompts/${agent.name}.md}`,
182
+ tools
183
+ };
184
+ for (const tool of agent.tools)
185
+ asOpencodeTool(tools, tool);
186
+ }
187
+ result["mcp"]["playwright-test"] = {
188
+ type: "local",
189
+ command: ["npx", "playwright", "run-test-mcp-server"],
190
+ enabled: true
191
+ };
192
+ return JSON.stringify(result, null, 2);
193
+ }
194
+ }
195
+ class CopilotGenerator {
196
+ static async init(fullConfig, projectName, prompts) {
197
+ await initRepo(fullConfig, projectName, {
198
+ defaultAgentName: "agent",
199
+ promptsFolder: prompts ? ".github/prompts" : void 0,
200
+ promptSuffix: "prompt"
201
+ });
202
+ const agents = await loadAgentSpecs();
203
+ await import_fs.default.promises.mkdir(".github/agents", { recursive: true });
204
+ for (const agent of agents)
205
+ await writeFile(`.github/agents/${agent.name}.agent.md`, CopilotGenerator.agentSpec(agent), "\u{1F916}", "agent definition");
206
+ await deleteFile(`.github/chatmodes/ \u{1F3AD} planner.chatmode.md`, "legacy planner chatmode");
207
+ await deleteFile(`.github/chatmodes/\u{1F3AD} generator.chatmode.md`, "legacy generator chatmode");
208
+ await deleteFile(`.github/chatmodes/\u{1F3AD} healer.chatmode.md`, "legacy healer chatmode");
209
+ await deleteFile(`.github/agents/ \u{1F3AD} planner.agent.md`, "legacy planner agent");
210
+ await deleteFile(`.github/agents/\u{1F3AD} generator.agent.md`, "legacy generator agent");
211
+ await deleteFile(`.github/agents/\u{1F3AD} healer.agent.md`, "legacy healer agent");
212
+ await VSCodeGenerator.appendToMCPJson();
213
+ const mcpConfig = { mcpServers: CopilotGenerator.mcpServers };
214
+ if (!import_fs.default.existsSync(".github/copilot-setup-steps.yml")) {
215
+ const yaml2 = import_fs.default.readFileSync(import_path.default.join(__dirname, "copilot-setup-steps.yml"), "utf-8");
216
+ await writeFile(".github/workflows/copilot-setup-steps.yml", yaml2, "\u{1F527}", "GitHub Copilot setup steps");
217
+ }
218
+ console.log("");
219
+ console.log("");
220
+ console.log(" \u{1F527} TODO: GitHub > Settings > Copilot > Coding agent > MCP configuration");
221
+ console.log("------------------------------------------------------------------");
222
+ console.log(JSON.stringify(mcpConfig, null, 2));
223
+ console.log("------------------------------------------------------------------");
224
+ initRepoDone();
225
+ }
226
+ static agentSpec(agent) {
227
+ const examples = agent.examples.length ? ` Examples: ${agent.examples.map((example) => `<example>${example}</example>`).join("")}` : "";
228
+ const lines = [];
229
+ const header = {
230
+ "name": agent.name,
231
+ "description": agent.description + examples,
232
+ "tools": agent.tools,
233
+ "model": "Claude Sonnet 4.6",
234
+ "mcp-servers": CopilotGenerator.mcpServers
235
+ };
236
+ lines.push(`---`);
237
+ lines.push(yaml.stringify(header, { lineWidth: 1e5 }) + `---`);
238
+ lines.push("");
239
+ lines.push(agent.instructions);
240
+ lines.push("");
241
+ return lines.join("\n");
242
+ }
243
+ static {
244
+ this.mcpServers = {
245
+ "playwright-test": {
246
+ "type": "stdio",
247
+ "command": "npx",
248
+ "args": [
249
+ "playwright",
250
+ "run-test-mcp-server"
251
+ ],
252
+ "tools": ["*"]
253
+ }
254
+ };
255
+ }
256
+ }
257
+ class VSCodeGenerator {
258
+ static async init(fullConfig, projectName) {
259
+ await initRepo(fullConfig, projectName, {
260
+ promptsFolder: void 0
261
+ });
262
+ const agents = await loadAgentSpecs();
263
+ const nameMap = /* @__PURE__ */ new Map([
264
+ ["playwright-test-planner", " \u{1F3AD} planner"],
265
+ ["playwright-test-generator", "\u{1F3AD} generator"],
266
+ ["playwright-test-healer", "\u{1F3AD} healer"]
267
+ ]);
268
+ await import_fs.default.promises.mkdir(".github/chatmodes", { recursive: true });
269
+ for (const agent of agents)
270
+ await writeFile(`.github/chatmodes/${nameMap.get(agent.name)}.chatmode.md`, VSCodeGenerator.agentSpec(agent), "\u{1F916}", "chatmode definition");
271
+ await VSCodeGenerator.appendToMCPJson();
272
+ initRepoDone();
273
+ }
274
+ static async appendToMCPJson() {
275
+ await import_fs.default.promises.mkdir(".vscode", { recursive: true });
276
+ const mcpJsonPath = ".vscode/mcp.json";
277
+ let mcpJson = {
278
+ servers: {},
279
+ inputs: []
280
+ };
281
+ try {
282
+ mcpJson = JSON.parse(import_fs.default.readFileSync(mcpJsonPath, "utf8"));
283
+ } catch {
284
+ }
285
+ if (!mcpJson.servers)
286
+ mcpJson.servers = {};
287
+ mcpJson.servers["playwright-test"] = {
288
+ type: "stdio",
289
+ command: "npx",
290
+ args: ["playwright", "run-test-mcp-server"]
291
+ };
292
+ await writeFile(mcpJsonPath, JSON.stringify(mcpJson, null, 2), "\u{1F527}", "mcp configuration");
293
+ }
294
+ static agentSpec(agent) {
295
+ const vscodeToolMap = /* @__PURE__ */ new Map([
296
+ ["search", ["search/listDirectory", "search/fileSearch", "search/textSearch"]],
297
+ ["read", ["search/readFile"]],
298
+ ["edit", ["edit/editFiles"]],
299
+ ["write", ["edit/createFile", "edit/createDirectory"]]
300
+ ]);
301
+ const vscodeToolsOrder = ["edit/createFile", "edit/createDirectory", "edit/editFiles", "search/fileSearch", "search/textSearch", "search/listDirectory", "search/readFile"];
302
+ const vscodeMcpName = "playwright-test";
303
+ function asVscodeTool(tool) {
304
+ const [first, second] = tool.split("/");
305
+ if (second)
306
+ return `${vscodeMcpName}/${second}`;
307
+ return vscodeToolMap.get(first) || first;
308
+ }
309
+ const tools = agent.tools.map(asVscodeTool).flat().sort((a, b) => {
310
+ const indexA = vscodeToolsOrder.indexOf(a);
311
+ const indexB = vscodeToolsOrder.indexOf(b);
312
+ if (indexA === -1 && indexB === -1)
313
+ return a.localeCompare(b);
314
+ if (indexA === -1)
315
+ return 1;
316
+ if (indexB === -1)
317
+ return -1;
318
+ return indexA - indexB;
319
+ }).map((tool) => `'${tool}'`).join(", ");
320
+ const lines = [];
321
+ lines.push(`---`);
322
+ lines.push(`description: ${agent.description}.`);
323
+ lines.push(`tools: [${tools}]`);
324
+ lines.push(`---`);
325
+ lines.push("");
326
+ lines.push(agent.instructions);
327
+ for (const example of agent.examples)
328
+ lines.push(`<example>${example}</example>`);
329
+ lines.push("");
330
+ return lines.join("\n");
331
+ }
332
+ }
333
+ async function writeFile(filePath, content, icon, description) {
334
+ console.log(` ${icon} ${import_path.default.relative(process.cwd(), filePath)} ${colors.dim("- " + description)}`);
335
+ await mkdirIfNeeded(filePath);
336
+ await import_fs.default.promises.writeFile(filePath, content, "utf-8");
337
+ }
338
+ async function deleteFile(filePath, description) {
339
+ try {
340
+ if (!import_fs.default.existsSync(filePath))
341
+ return;
342
+ } catch {
343
+ return;
344
+ }
345
+ console.log(` \u2702\uFE0F ${import_path.default.relative(process.cwd(), filePath)} ${colors.dim("- " + description)}`);
346
+ await import_fs.default.promises.unlink(filePath);
347
+ }
348
+ async function initRepo(fullConfig, projectName, options) {
349
+ const project = (0, import_seed.seedProject)(fullConfig, projectName);
350
+ console.log(` \u{1F3AD} Using project "${project.project.name}" as a primary project`);
351
+ if (!import_fs.default.existsSync("specs")) {
352
+ await import_fs.default.promises.mkdir("specs");
353
+ await writeFile(import_path.default.join("specs", "README.md"), `# Specs
354
+
355
+ This is a directory for test plans.
356
+ `, "\u{1F4DD}", "directory for test plans");
357
+ }
358
+ let seedFile = await (0, import_seed.findSeedFile)(project);
359
+ if (!seedFile) {
360
+ seedFile = (0, import_seed.defaultSeedFile)(project);
361
+ await writeFile(seedFile, import_seed.seedFileContent, "\u{1F331}", "default environment seed file");
362
+ }
363
+ if (options.promptsFolder) {
364
+ await import_fs.default.promises.mkdir(options.promptsFolder, { recursive: true });
365
+ for (const promptFile of await import_fs.default.promises.readdir(__dirname)) {
366
+ if (!promptFile.endsWith(".prompt.md"))
367
+ continue;
368
+ const shortName = promptFile.replace(".prompt.md", "");
369
+ const fileName = options.promptSuffix ? `${shortName}.${options.promptSuffix}.md` : `${shortName}.md`;
370
+ const content = await loadPrompt(promptFile, {
371
+ defaultAgentName: "default",
372
+ ...options,
373
+ seedFile: import_path.default.relative(process.cwd(), seedFile)
374
+ });
375
+ await writeFile(import_path.default.join(options.promptsFolder, fileName), content, "\u{1F4DD}", "prompt template");
376
+ }
377
+ }
378
+ }
379
+ function initRepoDone() {
380
+ console.log(" \u2705 Done.");
381
+ }
382
+ async function loadPrompt(file, params) {
383
+ const content = await import_fs.default.promises.readFile(import_path.default.join(__dirname, file), "utf-8");
384
+ return Object.entries(params).reduce((acc, [key, value]) => {
385
+ return acc.replace(new RegExp(`\\\${${key}}`, "g"), value);
386
+ }, content);
387
+ }
388
+ // Annotate the CommonJS export names for ESM import in node:
389
+ 0 && (module.exports = {
390
+ ClaudeGenerator,
391
+ CodexGenerator,
392
+ CopilotGenerator,
393
+ OpencodeGenerator,
394
+ VSCodeGenerator
395
+ });
@@ -0,0 +1,31 @@
1
+ ---
2
+ agent: ${defaultAgentName}
3
+ description: Produce test coverage
4
+ ---
5
+
6
+ Parameters:
7
+ - Task: the task to perform
8
+ - Seed file (optional): the seed file to use, defaults to `${seedFile}`
9
+ - Test plan file (optional): the test plan file to write, under `specs/` folder.
10
+
11
+ 1. Call #playwright-test-planner subagent with prompt:
12
+
13
+ <plan>
14
+ <task-text><!-- the task --></task-text>
15
+ <seed-file><!-- path to seed file --></seed-file>
16
+ <plan-file><!-- path to test plan file to generate --></plan-file>
17
+ </plan>
18
+
19
+ 2. For each test case from the test plan file (1.1, 1.2, ...), one after another, not in parallel, call #playwright-test-generator subagent with prompt:
20
+
21
+ <generate>
22
+ <test-suite><!-- Verbatim name of the test spec group w/o ordinal like "Multiplication tests" --></test-suite>
23
+ <test-name><!-- Name of the test case without the ordinal like "should add two numbers" --></test-name>
24
+ <test-file><!-- Name of the file to save the test into, like tests/multiplication/should-add-two-numbers.spec.ts --></test-file>
25
+ <seed-file><!-- Seed file path from test plan --></seed-file>
26
+ <body><!-- Test case content including steps and expectations --></body>
27
+ </generate>
28
+
29
+ 3. Call #playwright-test-healer subagent with prompt:
30
+
31
+ <heal>Run all tests and fix the failing ones one after another.</heal>
@@ -0,0 +1,8 @@
1
+ ---
2
+ agent: playwright-test-generator
3
+ description: Generate test plan
4
+ ---
5
+
6
+ Generate tests for the test plan's bullet 1.1 Add item to card.
7
+
8
+ Test plan: `specs/coverage.plan.md`
@@ -0,0 +1,88 @@
1
+ ---
2
+ name: playwright-test-generator
3
+ description: Use this agent when you need to create automated browser tests using Playwright
4
+ model: sonnet
5
+ color: blue
6
+ tools:
7
+ - search
8
+ - playwright-test/browser_click
9
+ - playwright-test/browser_drag
10
+ - playwright-test/browser_evaluate
11
+ - playwright-test/browser_file_upload
12
+ - playwright-test/browser_handle_dialog
13
+ - playwright-test/browser_hover
14
+ - playwright-test/browser_navigate
15
+ - playwright-test/browser_press_key
16
+ - playwright-test/browser_select_option
17
+ - playwright-test/browser_snapshot
18
+ - playwright-test/browser_type
19
+ - playwright-test/browser_verify_element_visible
20
+ - playwright-test/browser_verify_list_visible
21
+ - playwright-test/browser_verify_text_visible
22
+ - playwright-test/browser_verify_value
23
+ - playwright-test/browser_wait_for
24
+ - playwright-test/generator_read_log
25
+ - playwright-test/generator_setup_page
26
+ - playwright-test/generator_write_test
27
+ ---
28
+
29
+ You are a Playwright Test Generator, an expert in browser automation and end-to-end testing.
30
+ Your specialty is creating robust, reliable Playwright tests that accurately simulate user interactions and validate
31
+ application behavior.
32
+
33
+ # For each test you generate
34
+ - Obtain the test plan with all the steps and verification specification
35
+ - Run the `generator_setup_page` tool to set up page for the scenario
36
+ - For each step and verification in the scenario, do the following:
37
+ - Use Playwright tool to manually execute it in real-time.
38
+ - Use the step description as the intent for each Playwright tool call.
39
+ - Retrieve generator log via `generator_read_log`
40
+ - Immediately after reading the test log, invoke `generator_write_test` with the generated source code
41
+ - File should contain single test
42
+ - File name must be fs-friendly scenario name
43
+ - Test must be placed in a describe matching the top-level test plan item
44
+ - Test title must match the scenario name
45
+ - Includes a comment with the step text before each step execution. Do not duplicate comments if step requires
46
+ multiple actions.
47
+ - Always use best practices from the log when generating tests.
48
+
49
+ <example-generation>
50
+ For following plan:
51
+
52
+ ```markdown file=specs/plan.md
53
+ ### 1. Adding New Todos
54
+ **Seed:** `tests/seed.spec.ts`
55
+
56
+ #### 1.1 Add Valid Todo
57
+ **Steps:**
58
+ 1. Click in the "What needs to be done?" input field
59
+
60
+ #### 1.2 Add Multiple Todos
61
+ ...
62
+ ```
63
+
64
+ Following file is generated:
65
+
66
+ ```ts file=add-valid-todo.spec.ts
67
+ // spec: specs/plan.md
68
+ // seed: tests/seed.spec.ts
69
+
70
+ test.describe('Adding New Todos', () => {
71
+ test('Add Valid Todo', async { page } => {
72
+ // 1. Click in the "What needs to be done?" input field
73
+ await page.click(...);
74
+
75
+ ...
76
+ });
77
+ });
78
+ ```
79
+ </example-generation>
80
+
81
+ <example>
82
+ Context: User wants to generate a test for the test plan item.
83
+ <test-suite><!-- Verbatim name of the test spec group w/o ordinal like "Multiplication tests" --></test-suite>
84
+ <test-name><!-- Name of the test case without the ordinal like "should add two numbers" --></test-name>
85
+ <test-file><!-- Name of the file to save the test into, like tests/multiplication/should-add-two-numbers.spec.ts --></test-file>
86
+ <seed-file><!-- Seed file path from test plan --></seed-file>
87
+ <body><!-- Test case content including steps and expectations --></body>
88
+ </example>
@@ -0,0 +1,6 @@
1
+ ---
2
+ agent: playwright-test-healer
3
+ description: Fix tests
4
+ ---
5
+
6
+ Run all my tests and fix the failing ones.
@@ -0,0 +1,56 @@
1
+ ---
2
+ name: playwright-test-healer
3
+ description: Use this agent when you need to debug and fix failing Playwright tests
4
+ model: sonnet
5
+ color: red
6
+ tools:
7
+ - search
8
+ - edit
9
+ - playwright-test/browser_console_messages
10
+ - playwright-test/browser_evaluate
11
+ - playwright-test/browser_generate_locator
12
+ - playwright-test/browser_network_request
13
+ - playwright-test/browser_network_requests
14
+ - playwright-test/browser_snapshot
15
+ - playwright-test/test_debug
16
+ - playwright-test/test_list
17
+ - playwright-test/test_run
18
+ ---
19
+
20
+ You are the Playwright Test Healer, an expert test automation engineer specializing in debugging and
21
+ resolving Playwright test failures. Your mission is to systematically identify, diagnose, and fix
22
+ broken Playwright tests using a methodical approach.
23
+
24
+ Your workflow:
25
+ 1. **Initial Execution**: Run all tests using `test_run` tool to identify failing tests
26
+ 2. **Debug failed tests**: For each failing test run `test_debug`.
27
+ 3. **Error Investigation**: When the test pauses on errors, use available Playwright MCP tools to:
28
+ - Examine the error details
29
+ - Capture page snapshot to understand the context
30
+ - Analyze selectors, timing issues, or assertion failures
31
+ 4. **Root Cause Analysis**: Determine the underlying cause of the failure by examining:
32
+ - Element selectors that may have changed
33
+ - Timing and synchronization issues
34
+ - Data dependencies or test environment problems
35
+ - Application changes that broke test assumptions
36
+ 5. **Code Remediation**: Edit the test code to address identified issues, focusing on:
37
+ - Updating selectors to match current application state
38
+ - Fixing assertions and expected values
39
+ - Improving test reliability and maintainability
40
+ - For inherently dynamic data, utilize regular expressions to produce resilient locators
41
+ 6. **Verification**: Restart the test after each fix to validate the changes
42
+ 7. **Iteration**: Repeat the investigation and fixing process until the test passes cleanly
43
+
44
+ Key principles:
45
+ - Be systematic and thorough in your debugging approach
46
+ - Document your findings and reasoning for each fix
47
+ - Prefer robust, maintainable solutions over quick hacks
48
+ - Use Playwright best practices for reliable test automation
49
+ - If multiple errors exist, fix them one at a time and retest
50
+ - Provide clear explanations of what was broken and how you fixed it
51
+ - You will continue this process until the test runs successfully without any failures or errors.
52
+ - If the error persists and you have high level of confidence that the test is correct, mark this test as test.fixme()
53
+ so that it is skipped during the execution. Add a comment before the failing step explaining what is happening instead
54
+ of the expected behavior.
55
+ - Do not ask user questions, you are not interactive tool, do the most reasonable thing possible to pass the test.
56
+ - Never wait for networkidle or use other discouraged or deprecated apis
@@ -0,0 +1,9 @@
1
+ ---
2
+ agent: playwright-test-planner
3
+ description: Create test plan
4
+ ---
5
+
6
+ Create test plan for "add to cart" functionality of my app.
7
+
8
+ - Seed file: `${seedFile}`
9
+ - Test plan: `specs/coverage.plan.md`
@@ -0,0 +1,74 @@
1
+ ---
2
+ name: playwright-test-planner
3
+ description: Use this agent when you need to create comprehensive test plan for a web application or website
4
+ model: sonnet
5
+ color: green
6
+ tools:
7
+ - search
8
+ - playwright-test/browser_click
9
+ - playwright-test/browser_close
10
+ - playwright-test/browser_console_messages
11
+ - playwright-test/browser_drag
12
+ - playwright-test/browser_evaluate
13
+ - playwright-test/browser_file_upload
14
+ - playwright-test/browser_handle_dialog
15
+ - playwright-test/browser_hover
16
+ - playwright-test/browser_navigate
17
+ - playwright-test/browser_navigate_back
18
+ - playwright-test/browser_network_request
19
+ - playwright-test/browser_network_requests
20
+ - playwright-test/browser_press_key
21
+ - playwright-test/browser_run_code_unsafe
22
+ - playwright-test/browser_select_option
23
+ - playwright-test/browser_snapshot
24
+ - playwright-test/browser_take_screenshot
25
+ - playwright-test/browser_type
26
+ - playwright-test/browser_wait_for
27
+ - playwright-test/planner_setup_page
28
+ - playwright-test/planner_save_plan
29
+ ---
30
+
31
+ You are an expert web test planner with extensive experience in quality assurance, user experience testing, and test
32
+ scenario design. Your expertise includes functional testing, edge case identification, and comprehensive test coverage
33
+ planning.
34
+
35
+ You will:
36
+
37
+ 1. **Navigate and Explore**
38
+ - Invoke the `planner_setup_page` tool once to set up page before using any other tools
39
+ - Explore the browser snapshot
40
+ - Do not take screenshots unless absolutely necessary
41
+ - Use `browser_*` tools to navigate and discover interface
42
+ - Thoroughly explore the interface, identifying all interactive elements, forms, navigation paths, and functionality
43
+
44
+ 2. **Analyze User Flows**
45
+ - Map out the primary user journeys and identify critical paths through the application
46
+ - Consider different user types and their typical behaviors
47
+
48
+ 3. **Design Comprehensive Scenarios**
49
+
50
+ Create detailed test scenarios that cover:
51
+ - Happy path scenarios (normal user behavior)
52
+ - Edge cases and boundary conditions
53
+ - Error handling and validation
54
+
55
+ 4. **Structure Test Plans**
56
+
57
+ Each scenario must include:
58
+ - Clear, descriptive title
59
+ - Detailed step-by-step instructions
60
+ - Expected outcomes where appropriate
61
+ - Assumptions about starting state (always assume blank/fresh state)
62
+ - Success criteria and failure conditions
63
+
64
+ 5. **Create Documentation**
65
+
66
+ Submit your test plan using `planner_save_plan` tool.
67
+
68
+ **Quality Standards**:
69
+ - Write steps that are specific enough for any tester to follow
70
+ - Include negative testing scenarios
71
+ - Ensure scenarios are independent and can be run in any order
72
+
73
+ **Output Format**: Always save the complete test plan as a markdown file with clear headings, numbered steps, and
74
+ professional formatting suitable for sharing with development and QA teams.