testeiya 0.2.1 → 0.3.10

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 (402) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +284 -171
  3. package/dist/prompt/context.js +79 -0
  4. package/dist/prompt/context.js.map +1 -0
  5. package/dist/prompt/index.js +60 -0
  6. package/dist/prompt/index.js.map +1 -0
  7. package/dist/prompt/print.js +30 -0
  8. package/dist/prompt/print.js.map +1 -0
  9. package/dist/prompt/project-info.js +2 -0
  10. package/dist/prompt/project-info.js.map +1 -0
  11. package/{src/prompt/system-prompt.ts → dist/prompt/system-prompt.js} +38 -25
  12. package/dist/prompt/system-prompt.js.map +1 -0
  13. package/dist/prompt/testomatio.js +264 -0
  14. package/dist/prompt/testomatio.js.map +1 -0
  15. package/dist/prompt/tools.js +57 -0
  16. package/dist/prompt/tools.js.map +1 -0
  17. package/dist/prompt/vocab.js +8 -0
  18. package/dist/prompt/vocab.js.map +1 -0
  19. package/dist/src/args.js +172 -0
  20. package/dist/src/args.js.map +1 -0
  21. package/dist/src/cli.js +97 -0
  22. package/dist/src/cli.js.map +1 -0
  23. package/dist/src/doctor.js +186 -0
  24. package/dist/src/doctor.js.map +1 -0
  25. package/dist/src/env.js +93 -0
  26. package/dist/src/env.js.map +1 -0
  27. package/dist/src/mcp-extension.js +9 -0
  28. package/dist/src/mcp-extension.js.map +1 -0
  29. package/dist/src/mcp.js +139 -0
  30. package/dist/src/mcp.js.map +1 -0
  31. package/dist/src/model.js +71 -0
  32. package/dist/src/model.js.map +1 -0
  33. package/dist/src/models.js +38 -0
  34. package/dist/src/models.js.map +1 -0
  35. package/dist/src/output.js +185 -0
  36. package/dist/src/output.js.map +1 -0
  37. package/dist/src/result.js +41 -0
  38. package/dist/src/result.js.map +1 -0
  39. package/dist/src/run.js +291 -0
  40. package/dist/src/run.js.map +1 -0
  41. package/dist/src/session.js +92 -0
  42. package/dist/src/session.js.map +1 -0
  43. package/dist/src/sessions.js +61 -0
  44. package/dist/src/sessions.js.map +1 -0
  45. package/dist/vendor/mcp.js +14801 -0
  46. package/mcp-tools.json +2967 -0
  47. package/package.json +34 -43
  48. package/prompt/context.ts +101 -0
  49. package/prompt/index.ts +102 -0
  50. package/prompt/print.ts +32 -0
  51. package/prompt/project-info.ts +30 -0
  52. package/prompt/system-prompt.ts +187 -0
  53. package/{src/prompt → prompt}/testomatio.ts +120 -9
  54. package/prompt/tools.ts +57 -0
  55. package/prompt/vocab.ts +7 -0
  56. package/skills/codeceptjs/ci-fix-tests/SKILL.md +7 -8
  57. package/skills/codeceptjs/codeceptjs-auth/SKILL.md +47 -64
  58. package/skills/codeceptjs/codeceptjs-exploration/SKILL.md +56 -47
  59. package/skills/codeceptjs/codeceptjs-fundamentals/SKILL.md +144 -106
  60. package/skills/codeceptjs/codeceptjs-run-analysis/SKILL.md +50 -57
  61. package/skills/codeceptjs/debugging-codeceptjs-tests/SKILL.md +88 -196
  62. package/skills/codeceptjs/migrate-codeceptjs-4/SKILL.md +4 -5
  63. package/skills/codeceptjs/migrate-cypress-to-codeceptjs/SKILL.md +25 -36
  64. package/skills/codeceptjs/migrate-protractor-to-codeceptjs/SKILL.md +23 -36
  65. package/skills/codeceptjs/migrate-selenium-java-to-codeceptjs/SKILL.md +23 -36
  66. package/skills/codeceptjs/migrate-testcafe-to-codeceptjs/SKILL.md +23 -35
  67. package/skills/codeceptjs/refactoring-codeceptjs-tests/SKILL.md +50 -53
  68. package/skills/codeceptjs/writing-codeceptjs-tests/SKILL.md +87 -191
  69. package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/SKILL.md +1 -1
  70. package/{skills.lock.json → skills/skills.lock.json} +43 -36
  71. package/skills/skills.yaml +34 -0
  72. package/skills/testomatio/explorbot/explorbot-fundamentals/SKILL.md +49 -61
  73. package/skills/testomatio/explorbot/explorbot-fundamentals/references/no-install.md +36 -0
  74. package/skills/testomatio/explorbot/explorbot-plan/SKILL.md +20 -7
  75. package/skills/testomatio/explorbot/explorbot-setup/SKILL.md +41 -289
  76. package/skills/testomatio/qa-process/qa-explain-behavior/SKILL.md +111 -0
  77. package/skills/testomatio/qa-process/qa-explain-behavior/references/answer-shapes.md +116 -0
  78. package/skills/testomatio/qa-process/qa-explain-behavior/references/examples.md +157 -0
  79. package/skills/testomatio/qa-process/qa-lead-strategy-advisor/SKILL.md +91 -0
  80. package/skills/testomatio/qa-process/qa-lead-strategy-advisor/references/output-format.md +71 -0
  81. package/skills/testomatio/qa-process/testing-workflow/SKILL.md +227 -0
  82. package/skills/testomatio/test-automation/qa-data-seeder/SKILL.md +83 -0
  83. package/skills/testomatio/test-automation/run-tests-with-testomatio-reporter/SKILL.md +5 -3
  84. package/skills/testomatio/test-automation/setup-change-aware-pr-testing/SKILL.md +190 -0
  85. package/skills/testomatio/test-automation/setup-ci-automation/SKILL.md +76 -0
  86. package/skills/testomatio/test-management/qa-split-testing-levels-pyramid/SKILL.md +55 -0
  87. package/skills/testomatio/test-management/qa-sprint-report-by-testomatio/SKILL.md +220 -0
  88. package/skills/testomatio/test-management/qa-sprint-report-by-testomatio/references/qa-sprint-report.md +126 -0
  89. package/skills/testomatio/test-management/qa-test-code-coverage/SKILL.md +1 -1
  90. package/skills/testomatio/test-management/qa-thinking/SKILL.md +25 -25
  91. package/skills/testomatio/test-management/testomatio-mcp/SKILL.md +14 -1
  92. package/skills/testomatio/test-management/testomatio-mcp/references/MCP_SETUP.md +8 -0
  93. package/assets/testeiya-logo-dark.svg +0 -16
  94. package/assets/testeiya-logo.svg +0 -15
  95. package/models.catalog.json +0 -6963
  96. package/skills/playwright-best-practices-skill/LICENSE.md +0 -7
  97. package/skills/playwright-best-practices-skill/README.md +0 -147
  98. package/skills/testeiya/README.md +0 -29
  99. package/skills/testeiya/answer-formatting/SKILL.md +0 -30
  100. package/skills/testeiya/check-cucumber/SKILL.md +0 -200
  101. package/skills/testeiya/check-tests/SKILL.md +0 -260
  102. package/skills/testeiya/manual-run-assistant/SKILL.md +0 -61
  103. package/skills/testeiya/testomatio-docs/INDEX.md +0 -175
  104. package/skills/testeiya/testomatio-docs/SKILL.md +0 -102
  105. package/skills/testeiya/testomatio-docs/docs/advanced/ai-powered-features/ai-agents.md +0 -144
  106. package/skills/testeiya/testomatio-docs/docs/advanced/ai-powered-features/ai-powered-features.md +0 -531
  107. package/skills/testeiya/testomatio-docs/docs/advanced/ai-powered-features/ai-requirements.md +0 -437
  108. package/skills/testeiya/testomatio-docs/docs/advanced/api-access/index.md +0 -191
  109. package/skills/testeiya/testomatio-docs/docs/advanced/branches-folder/index.md +0 -277
  110. package/skills/testeiya/testomatio-docs/docs/advanced/bulk-edit-folder/bulk-edit-demos.mdx +0 -39
  111. package/skills/testeiya/testomatio-docs/docs/advanced/bulk-edit-folder/bulk-edit-on-suite-and-test-level.md +0 -122
  112. package/skills/testeiya/testomatio-docs/docs/advanced/bulk-edit-folder/what-is-bulk-edit.md +0 -170
  113. package/skills/testeiya/testomatio-docs/docs/advanced/jira-plugin/branches.md +0 -53
  114. package/skills/testeiya/testomatio-docs/docs/advanced/jira-plugin/index.mdx +0 -98
  115. package/skills/testeiya/testomatio-docs/docs/advanced/jira-plugin/jira-issue.md +0 -151
  116. package/skills/testeiya/testomatio-docs/docs/advanced/jira-plugin/runs-and-reports.md +0 -377
  117. package/skills/testeiya/testomatio-docs/docs/advanced/jira-plugin/work-in-jira.md +0 -267
  118. package/skills/testeiya/testomatio-docs/docs/advanced/living-doc/index.md +0 -138
  119. package/skills/testeiya/testomatio-docs/docs/advanced/milestones/index.md +0 -220
  120. package/skills/testeiya/testomatio-docs/docs/advanced/shortcuts/index.md +0 -48
  121. package/skills/testeiya/testomatio-docs/docs/advanced/tags-labels/labels-and-custom-fields.md +0 -201
  122. package/skills/testeiya/testomatio-docs/docs/advanced/tags-labels/tags-or-labels.md +0 -94
  123. package/skills/testeiya/testomatio-docs/docs/advanced/tags-labels/tags.md +0 -243
  124. package/skills/testeiya/testomatio-docs/docs/advanced/test-artifacts/index.md +0 -135
  125. package/skills/testeiya/testomatio-docs/docs/advanced/tql/index.md +0 -394
  126. package/skills/testeiya/testomatio-docs/docs/getting-started/index.md +0 -290
  127. package/skills/testeiya/testomatio-docs/docs/integrations/continuous-integration/azure.md +0 -96
  128. package/skills/testeiya/testomatio-docs/docs/integrations/continuous-integration/bamboo.md +0 -94
  129. package/skills/testeiya/testomatio-docs/docs/integrations/continuous-integration/bitbucket.md +0 -106
  130. package/skills/testeiya/testomatio-docs/docs/integrations/continuous-integration/circle.md +0 -115
  131. package/skills/testeiya/testomatio-docs/docs/integrations/continuous-integration/github.md +0 -120
  132. package/skills/testeiya/testomatio-docs/docs/integrations/continuous-integration/gitlab.md +0 -88
  133. package/skills/testeiya/testomatio-docs/docs/integrations/continuous-integration/index.mdx +0 -151
  134. package/skills/testeiya/testomatio-docs/docs/integrations/continuous-integration/jenkins.md +0 -121
  135. package/skills/testeiya/testomatio-docs/docs/integrations/continuous-integration/teamcity.md +0 -96
  136. package/skills/testeiya/testomatio-docs/docs/integrations/issues-management/azure.md +0 -31
  137. package/skills/testeiya/testomatio-docs/docs/integrations/issues-management/clickup.md +0 -54
  138. package/skills/testeiya/testomatio-docs/docs/integrations/issues-management/confluence.md +0 -34
  139. package/skills/testeiya/testomatio-docs/docs/integrations/issues-management/github.md +0 -31
  140. package/skills/testeiya/testomatio-docs/docs/integrations/issues-management/gitlab.md +0 -93
  141. package/skills/testeiya/testomatio-docs/docs/integrations/issues-management/index.md +0 -131
  142. package/skills/testeiya/testomatio-docs/docs/integrations/issues-management/jira.md +0 -164
  143. package/skills/testeiya/testomatio-docs/docs/integrations/issues-management/linear.md +0 -29
  144. package/skills/testeiya/testomatio-docs/docs/integrations/issues-management/shortcut.md +0 -67
  145. package/skills/testeiya/testomatio-docs/docs/integrations/issues-management/youtrack.md +0 -94
  146. package/skills/testeiya/testomatio-docs/docs/integrations/report-notifications/azure-devops.md +0 -53
  147. package/skills/testeiya/testomatio-docs/docs/integrations/report-notifications/email.md +0 -71
  148. package/skills/testeiya/testomatio-docs/docs/integrations/report-notifications/jira.md +0 -52
  149. package/skills/testeiya/testomatio-docs/docs/integrations/report-notifications/ms-teams.md +0 -60
  150. package/skills/testeiya/testomatio-docs/docs/integrations/report-notifications/rules.md +0 -267
  151. package/skills/testeiya/testomatio-docs/docs/integrations/report-notifications/slack.md +0 -82
  152. package/skills/testeiya/testomatio-docs/docs/integrations/report-notifications/telegram.md +0 -73
  153. package/skills/testeiya/testomatio-docs/docs/integrations/scim-provisioning/index.mdx +0 -207
  154. package/skills/testeiya/testomatio-docs/docs/integrations/scim-provisioning/okta.md +0 -204
  155. package/skills/testeiya/testomatio-docs/docs/integrations/single-sign-on/azure.md +0 -95
  156. package/skills/testeiya/testomatio-docs/docs/integrations/single-sign-on/google.md +0 -75
  157. package/skills/testeiya/testomatio-docs/docs/integrations/single-sign-on/index.mdx +0 -33
  158. package/skills/testeiya/testomatio-docs/docs/integrations/single-sign-on/okta.md +0 -108
  159. package/skills/testeiya/testomatio-docs/docs/integrations/single-sign-on/saml.md +0 -66
  160. package/skills/testeiya/testomatio-docs/docs/legal/compliance/gdpr.md +0 -95
  161. package/skills/testeiya/testomatio-docs/docs/legal/compliance/index.mdx +0 -94
  162. package/skills/testeiya/testomatio-docs/docs/legal/compliance/privacy.md +0 -26
  163. package/skills/testeiya/testomatio-docs/docs/legal/compliance/terms.md +0 -32
  164. package/skills/testeiya/testomatio-docs/docs/legal/security/index.mdx +0 -242
  165. package/skills/testeiya/testomatio-docs/docs/legal/security/jira.md +0 -140
  166. package/skills/testeiya/testomatio-docs/docs/legal/security/subprocessors.md +0 -76
  167. package/skills/testeiya/testomatio-docs/docs/management/company/administration.md +0 -363
  168. package/skills/testeiya/testomatio-docs/docs/management/company/audit-log.md +0 -41
  169. package/skills/testeiya/testomatio-docs/docs/management/company/plan-features-comparison.md +0 -240
  170. package/skills/testeiya/testomatio-docs/docs/management/company/subscriptions.md +0 -326
  171. package/skills/testeiya/testomatio-docs/docs/management/company/trials.md +0 -75
  172. package/skills/testeiya/testomatio-docs/docs/management/company/users-and-permissions/accountant.md +0 -49
  173. package/skills/testeiya/testomatio-docs/docs/management/company/users-and-permissions/index.mdx +0 -285
  174. package/skills/testeiya/testomatio-docs/docs/management/company/users-and-permissions/read-only-user.md +0 -67
  175. package/skills/testeiya/testomatio-docs/docs/management/company/users-and-permissions/teams.md +0 -138
  176. package/skills/testeiya/testomatio-docs/docs/management/project/settings.md +0 -87
  177. package/skills/testeiya/testomatio-docs/docs/management/project/templates.md +0 -546
  178. package/skills/testeiya/testomatio-docs/docs/project/analytics/index.md +0 -326
  179. package/skills/testeiya/testomatio-docs/docs/project/import-export/export-tests/classical-tests-markdown-format.md +0 -386
  180. package/skills/testeiya/testomatio-docs/docs/project/import-export/export-tests/download-manual-tests-as-files.md +0 -378
  181. package/skills/testeiya/testomatio-docs/docs/project/import-export/export-tests/export-to-obsidian.md +0 -112
  182. package/skills/testeiya/testomatio-docs/docs/project/import-export/export-tests/export-to-spreadsheet.md +0 -127
  183. package/skills/testeiya/testomatio-docs/docs/project/import-export/import/auto-import.md +0 -63
  184. package/skills/testeiya/testomatio-docs/docs/project/import-export/import/import-tests-from-Allure-TestOps.md +0 -49
  185. package/skills/testeiya/testomatio-docs/docs/project/import-export/import/import-tests-from-QTest.md +0 -41
  186. package/skills/testeiya/testomatio-docs/docs/project/import-export/import/import-tests-from-Qase.md +0 -39
  187. package/skills/testeiya/testomatio-docs/docs/project/import-export/import/import-tests-from-Zephyr.md +0 -37
  188. package/skills/testeiya/testomatio-docs/docs/project/import-export/import/import-tests-from-csv-xlsx.md +0 -117
  189. package/skills/testeiya/testomatio-docs/docs/project/import-export/import/import-tests-from-cucumber.md +0 -93
  190. package/skills/testeiya/testomatio-docs/docs/project/import-export/import/import-tests-from-qmetry.md +0 -44
  191. package/skills/testeiya/testomatio-docs/docs/project/import-export/import/import-tests-from-source-code.md +0 -117
  192. package/skills/testeiya/testomatio-docs/docs/project/import-export/import/import-tests-from-testcaselabs.md +0 -44
  193. package/skills/testeiya/testomatio-docs/docs/project/import-export/import/import-tests-from-testmo.md +0 -47
  194. package/skills/testeiya/testomatio-docs/docs/project/import-export/import/import-tests-from-testrail.md +0 -82
  195. package/skills/testeiya/testomatio-docs/docs/project/import-export/import/import-tests-from-xray.md +0 -55
  196. package/skills/testeiya/testomatio-docs/docs/project/plans/index.md +0 -334
  197. package/skills/testeiya/testomatio-docs/docs/project/pulse/index.md +0 -104
  198. package/skills/testeiya/testomatio-docs/docs/project/runs/archive-runs-and-groups.md +0 -176
  199. package/skills/testeiya/testomatio-docs/docs/project/runs/custom-statuses.md +0 -195
  200. package/skills/testeiya/testomatio-docs/docs/project/runs/environments.md +0 -203
  201. package/skills/testeiya/testomatio-docs/docs/project/runs/managing-runs.md +0 -455
  202. package/skills/testeiya/testomatio-docs/docs/project/runs/merge-strategies.md +0 -137
  203. package/skills/testeiya/testomatio-docs/docs/project/runs/reports.md +0 -329
  204. package/skills/testeiya/testomatio-docs/docs/project/runs/rungroups.md +0 -342
  205. package/skills/testeiya/testomatio-docs/docs/project/runs/running-automated-tests.md +0 -256
  206. package/skills/testeiya/testomatio-docs/docs/project/runs/running-manual-and-automated-tests.md +0 -331
  207. package/skills/testeiya/testomatio-docs/docs/project/runs/running-tests-manually.md +0 -633
  208. package/skills/testeiya/testomatio-docs/docs/project/runs/temporary-tests-notes.md +0 -223
  209. package/skills/testeiya/testomatio-docs/docs/project/steps-snippets/snippets.md +0 -68
  210. package/skills/testeiya/testomatio-docs/docs/project/steps-snippets/steps.md +0 -181
  211. package/skills/testeiya/testomatio-docs/docs/project/tests/bdd-test-case-editor.md +0 -98
  212. package/skills/testeiya/testomatio-docs/docs/project/tests/classical-test-case-editor.md +0 -354
  213. package/skills/testeiya/testomatio-docs/docs/project/tests/classical-vs-bdd.md +0 -169
  214. package/skills/testeiya/testomatio-docs/docs/project/tests/copy-and-move-your-tests.md +0 -156
  215. package/skills/testeiya/testomatio-docs/docs/project/tests/other-features-for-test-case-design.md +0 -412
  216. package/skills/testeiya/testomatio-docs/docs/project/tests/test-case-creation-and-editing.md +0 -527
  217. package/skills/testeiya/testomatio-docs/docs/support/index.md +0 -75
  218. package/skills/testeiya/testomatio-docs/docs/test-reporting/artifacts.md +0 -388
  219. package/skills/testeiya/testomatio-docs/docs/test-reporting/cli.md +0 -215
  220. package/skills/testeiya/testomatio-docs/docs/test-reporting/configuration.md +0 -247
  221. package/skills/testeiya/testomatio-docs/docs/test-reporting/frameworks.md +0 -490
  222. package/skills/testeiya/testomatio-docs/docs/test-reporting/functions.md +0 -144
  223. package/skills/testeiya/testomatio-docs/docs/test-reporting/index.mdx +0 -48
  224. package/skills/testeiya/testomatio-docs/docs/test-reporting/junit.md +0 -248
  225. package/skills/testeiya/testomatio-docs/docs/test-reporting/logger.md +0 -138
  226. package/skills/testeiya/testomatio-docs/docs/test-reporting/php.md +0 -77
  227. package/skills/testeiya/testomatio-docs/docs/test-reporting/pipes/bitbucket.md +0 -72
  228. package/skills/testeiya/testomatio-docs/docs/test-reporting/pipes/csv.md +0 -23
  229. package/skills/testeiya/testomatio-docs/docs/test-reporting/pipes/debug.md +0 -18
  230. package/skills/testeiya/testomatio-docs/docs/test-reporting/pipes/github.md +0 -63
  231. package/skills/testeiya/testomatio-docs/docs/test-reporting/pipes/gitlab.md +0 -29
  232. package/skills/testeiya/testomatio-docs/docs/test-reporting/pipes/html.md +0 -80
  233. package/skills/testeiya/testomatio-docs/docs/test-reporting/pipes/index.mdx +0 -57
  234. package/skills/testeiya/testomatio-docs/docs/test-reporting/pipes/testomatio.md +0 -331
  235. package/skills/testeiya/testomatio-docs/docs/test-reporting/python.md +0 -229
  236. package/skills/testeiya/testomatio-docs/docs/test-reporting/workflows.md +0 -325
  237. package/skills/testeiya/testomatio-docs/docs/tutorials/Interacting-via-API.md +0 -159
  238. package/skills/testeiya/testomatio-docs/docs/tutorials/Manual-Testing-Classic.md +0 -164
  239. package/skills/testeiya/testomatio-docs/docs/tutorials/Set-Up-Read-Only-Access.md +0 -85
  240. package/skills/testeiya/testomatio-docs/docs/tutorials/Using-AI-in-Testing.md +0 -163
  241. package/skills/testeiya/testomatio-docs/docs/tutorials/Working-with-Jira.md +0 -125
  242. package/skills/testeiya/testomatio-docs/docs/tutorials/java.md +0 -478
  243. package/skills/testeiya/testomatio-docs/docs/tutorials/playwright.md +0 -207
  244. package/skills/testeiya/testomatio-docs/docs/tutorials/webdriver.md +0 -218
  245. package/skills/testeiya/testomatio-docs/docs.lock.json +0 -6
  246. package/skills/testeiya/testomatio-reporter/SKILL.md +0 -307
  247. package/skills/testomatio/test-automation/setup-pr-testing/SKILL.md +0 -199
  248. package/skills.yaml +0 -21
  249. package/src/ai-debug.ts +0 -188
  250. package/src/api/agent-get.ts +0 -22
  251. package/src/api/agent-start.ts +0 -384
  252. package/src/api/client-log.ts +0 -29
  253. package/src/api/context.ts +0 -332
  254. package/src/api/debug-layout.ts +0 -47
  255. package/src/api/debug-report.ts +0 -29
  256. package/src/api/debug-snapshot.ts +0 -30
  257. package/src/api/debug-stream.ts +0 -52
  258. package/src/api/files-delete.ts +0 -184
  259. package/src/api/files-read.ts +0 -41
  260. package/src/api/files-rename.ts +0 -99
  261. package/src/api/files-tree.ts +0 -292
  262. package/src/api/files-write.ts +0 -41
  263. package/src/api/mcp.ts +0 -603
  264. package/src/api/memory.ts +0 -69
  265. package/src/api/open-external.ts +0 -39
  266. package/src/api/playwright-cli.ts +0 -606
  267. package/src/api/providers.ts +0 -457
  268. package/src/api/read-env-token.ts +0 -33
  269. package/src/api/sessions.ts +0 -79
  270. package/src/api/settings.ts +0 -120
  271. package/src/api/skills.ts +0 -58
  272. package/src/api/testomatio-attachment.ts +0 -89
  273. package/src/api/testomatio-auth.ts +0 -284
  274. package/src/api/testomatio-proxy.ts +0 -197
  275. package/src/api/testomatio-run-stats.ts +0 -81
  276. package/src/api/testomatio-target.ts +0 -225
  277. package/src/api/testomatio-transcription.ts +0 -82
  278. package/src/api/workspace-search.ts +0 -96
  279. package/src/api/workspace-sync.ts +0 -151
  280. package/src/api/workspace.ts +0 -165
  281. package/src/app-server.ts +0 -556
  282. package/src/bridge.ts +0 -251
  283. package/src/check-tests.ts +0 -156
  284. package/src/cli.ts +0 -17
  285. package/src/commands.ts +0 -244
  286. package/src/config.ts +0 -183
  287. package/src/connection.ts +0 -658
  288. package/src/context-store.ts +0 -265
  289. package/src/debug-bus.ts +0 -405
  290. package/src/extensions/tool-gate.ts +0 -220
  291. package/src/extensions/webui/ask-channel.ts +0 -52
  292. package/src/extensions/webui/index.ts +0 -184
  293. package/src/extensions/webui/tools/ask-question.ts +0 -88
  294. package/src/extensions/webui/tools/query-result.ts +0 -79
  295. package/src/extensions/webui/tools/render-chart.ts +0 -53
  296. package/src/extensions/webui/tools/render-item.ts +0 -61
  297. package/src/extensions/webui/tools/render-list.ts +0 -170
  298. package/src/extensions/webui/tools/render-result.ts +0 -85
  299. package/src/extensions/webui/tools/render-tree.ts +0 -71
  300. package/src/extensions/webui/tools/ui-widget.ts +0 -54
  301. package/src/extensions/webui/tools/widget-result.ts +0 -13
  302. package/src/extensions/webui/widget-channel.ts +0 -50
  303. package/src/file-log.ts +0 -196
  304. package/src/git-tracked.ts +0 -68
  305. package/src/gitignore.ts +0 -53
  306. package/src/json-store.ts +0 -43
  307. package/src/load-env.ts +0 -70
  308. package/src/loader-style.ts +0 -96
  309. package/src/main.ts +0 -140
  310. package/src/mcp-catalog.ts +0 -96
  311. package/src/models-catalog.ts +0 -72
  312. package/src/permissions.ts +0 -120
  313. package/src/project-dir.ts +0 -189
  314. package/src/project-info.ts +0 -108
  315. package/src/prompt/app-ui.ts +0 -59
  316. package/src/prompt/browser.ts +0 -27
  317. package/src/prompt/index.ts +0 -62
  318. package/src/prompt/tools.ts +0 -27
  319. package/src/server-info.ts +0 -62
  320. package/src/session-factory.ts +0 -442
  321. package/src/session-store.ts +0 -115
  322. package/src/shell-env.ts +0 -45
  323. package/src/skills.ts +0 -163
  324. package/src/sync-snapshot.ts +0 -140
  325. package/src/telemetry.ts +0 -239
  326. package/src/testomatio-auth.ts +0 -299
  327. package/src/testomatio.ts +0 -98
  328. package/src/theme.ts +0 -30
  329. package/src/user-env.ts +0 -94
  330. package/src/welcome.ts +0 -194
  331. package/src/workspace/safe-path.ts +0 -85
  332. package/src/workspace/test-md.ts +0 -70
  333. package/src/workspace-model.ts +0 -440
  334. package/testeiya.config.json +0 -14
  335. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/advanced/authentication-flows.md +0 -0
  336. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/advanced/authentication.md +0 -0
  337. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/advanced/clock-mocking.md +0 -0
  338. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/advanced/mobile-testing.md +0 -0
  339. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/advanced/multi-context.md +0 -0
  340. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/advanced/multi-user.md +0 -0
  341. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/advanced/network-advanced.md +0 -0
  342. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/advanced/third-party.md +0 -0
  343. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/architecture/pom-vs-fixtures.md +0 -0
  344. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/architecture/test-architecture.md +0 -0
  345. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/architecture/when-to-mock.md +0 -0
  346. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/browser-apis/browser-apis.md +0 -0
  347. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/browser-apis/iframes.md +0 -0
  348. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/browser-apis/service-workers.md +0 -0
  349. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/browser-apis/websockets.md +0 -0
  350. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/core/annotations.md +0 -0
  351. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/core/assertions-waiting.md +0 -0
  352. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/core/configuration.md +0 -0
  353. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/core/fixtures-hooks.md +0 -0
  354. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/core/global-setup.md +0 -0
  355. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/core/locators.md +0 -0
  356. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/core/page-object-model.md +0 -0
  357. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/core/projects-dependencies.md +0 -0
  358. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/core/test-data.md +0 -0
  359. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/core/test-suite-structure.md +0 -0
  360. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/core/test-tags.md +0 -0
  361. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/debugging/console-errors.md +0 -0
  362. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/debugging/debugging.md +0 -0
  363. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/debugging/error-testing.md +0 -0
  364. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/debugging/flaky-tests.md +0 -0
  365. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/frameworks/angular.md +0 -0
  366. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/frameworks/nextjs.md +0 -0
  367. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/frameworks/react.md +0 -0
  368. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/frameworks/vue.md +0 -0
  369. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/infrastructure-ci-cd/ci-cd.md +0 -0
  370. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/infrastructure-ci-cd/docker.md +0 -0
  371. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/infrastructure-ci-cd/github-actions.md +0 -0
  372. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/infrastructure-ci-cd/gitlab.md +0 -0
  373. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/infrastructure-ci-cd/other-providers.md +0 -0
  374. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/infrastructure-ci-cd/parallel-sharding.md +0 -0
  375. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/infrastructure-ci-cd/performance.md +0 -0
  376. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/infrastructure-ci-cd/reporting.md +0 -0
  377. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/infrastructure-ci-cd/test-coverage.md +0 -0
  378. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/testing-patterns/accessibility.md +0 -0
  379. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/testing-patterns/api-testing.md +0 -0
  380. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/testing-patterns/browser-extensions.md +0 -0
  381. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/testing-patterns/canvas-webgl.md +0 -0
  382. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/testing-patterns/component-testing.md +0 -0
  383. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/testing-patterns/drag-drop.md +0 -0
  384. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/testing-patterns/electron.md +0 -0
  385. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/testing-patterns/file-operations.md +0 -0
  386. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/testing-patterns/file-upload-download.md +0 -0
  387. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/testing-patterns/forms-validation.md +0 -0
  388. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/testing-patterns/graphql-testing.md +0 -0
  389. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/testing-patterns/i18n.md +0 -0
  390. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/testing-patterns/performance-testing.md +0 -0
  391. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/testing-patterns/security-testing.md +0 -0
  392. /package/skills/{playwright-best-practices-skill → playwright/playwright-best-practices}/testing-patterns/visual-regression.md +0 -0
  393. /package/skills/{playwright-cli → playwright/playwright-cli}/SKILL.md +0 -0
  394. /package/skills/{playwright-cli → playwright/playwright-cli}/references/element-attributes.md +0 -0
  395. /package/skills/{playwright-cli → playwright/playwright-cli}/references/playwright-tests.md +0 -0
  396. /package/skills/{playwright-cli → playwright/playwright-cli}/references/request-mocking.md +0 -0
  397. /package/skills/{playwright-cli → playwright/playwright-cli}/references/running-code.md +0 -0
  398. /package/skills/{playwright-cli → playwright/playwright-cli}/references/session-management.md +0 -0
  399. /package/skills/{playwright-cli → playwright/playwright-cli}/references/storage-state.md +0 -0
  400. /package/skills/{playwright-cli → playwright/playwright-cli}/references/test-generation.md +0 -0
  401. /package/skills/{playwright-cli → playwright/playwright-cli}/references/tracing.md +0 -0
  402. /package/skills/{playwright-cli → playwright/playwright-cli}/references/video-recording.md +0 -0
@@ -1,90 +1,83 @@
1
1
  ---
2
2
  name: codeceptjs-run-analysis
3
- description: Use after running CodeceptJS tests with the `aiTrace` plugin enabled — analyse the trace artifacts (trace.md, per-step HTML/ARIA/screenshots, console logs) via bash tools. Toolkit, not a workflow — use cases include verifying a fix, clustering errors across a CI fail-storm, diagnosing flakiness across reruns, or investigating a single failure. Other skills (`writing-codeceptjs-tests`, `debugging-codeceptjs-tests`, `refactoring-codeceptjs-tests`) invoke this whenever a run has happened and needs to be reviewed. Trigger on phrases like "what failed", "analyse the run", "cluster these errors", "is it flaky", "did the fix hold".
3
+ description: >
4
+ Use after running CodeceptJS tests with the `aiTrace` plugin enabled and the
5
+ results need review — verify a fix held, investigate a single failure, cluster
6
+ errors across a CI fail-storm, diagnose flakiness across reruns. Invoked by
7
+ other CodeceptJS skills whenever a run has happened. Trigger on "what failed",
8
+ "analyse the run", "cluster these errors", "is it flaky", "did the fix hold".
4
9
  ---
5
10
 
6
11
  # CodeceptJS Run Analysis
7
12
 
8
- After `npx codeceptjs run`, the trace artifacts land in `output/`. This skill is the playbook for reading them efficiently — pulling out the right step, the right file, and the right slice of a giant HTML snapshot using bash tools rather than re-running the test through MCP.
13
+ After `npx codeceptjs run`, trace artifacts land in `output/`. This skill reads them efficiently — right step, right file, right slice of a giant HTML snapshot via bash tools rather than re-running through MCP.
9
14
 
10
- There's no single end goal pick the use case that matches the situation. The foundations (where artifacts live, how to read them, what tools to reach for) apply to all of them.
15
+ No single end goal: pick the use case matching the situation. The foundations apply to all of them.
11
16
 
12
17
  ## Foundations
13
18
 
14
- ### Ensure aiTrace is on
15
- The whole skill leans on `output/trace_<TestName>_<hash>/trace.md` and its sibling artifacts. Confirm `plugins: { aiTrace: { enabled: true } }` in the active config (run `codeceptjs-fundamentals` if you don't already know). Without aiTrace there are screenshots and `pageInfo` dumps at most useful but partial; suggest enabling and re-running before deep analysis.
19
+ - **aiTrace must be on.** Everything leans on `output/trace_<TestName>_<hash>/trace.md`. Confirm in the active config (run `codeceptjs-fundamentals` if unknown). Without it there are only screenshots and `pageInfo` dumps — suggest enabling and re-running before deep analysis.
20
+ - `run_step_by_step` is interactive only; `aiTrace` is the sole source of per-step files. Ad-hoc `run_code` / `snapshot` still produce single-shot bundles under `output/trace_run_code_*` / `output/snapshot_*`.
21
+ - **Locate traces**: reruns create new dirs — when unclear, most recent wins (`ls -dt output/trace_*`).
22
+ - **Read trace.md first** — it's the index linking each step to its artifacts.
23
+ - Focus on the failed step; none marked → last step in the trace.
24
+ - Multiple failures marked → the **first** is usually the cause; the rest cascade.
16
25
 
17
- The MCP `run_step_by_step` tool is now interactive (pauses after every step; agent advances via `continue`) and no longer auto-writes a per-run artifact bundle. `aiTrace` is the only source of per-step trace files now — for ad-hoc `run_code` and `snapshot` calls you still get a single-shot artifact set under `output/trace_run_code_*` / `output/snapshot_*`.
18
-
19
- ### Locate traces
20
- Trace directories are `output/trace_<TestName>_<short-hash>/`; reruns produce a new dir per run. **When the right trace isn't obvious, sort by modification time and take the most recent** (`ls -dt`) — almost always the run you just kicked off.
21
-
22
- ### Read trace.md first
23
- trace.md is the index — each step block links to its screenshot/HTML/ARIA/console. **Focus on the step marked failed; if no failure is explicitly marked, jump to the last step in the trace** — execution usually stops where the failure happened. When more than one step shows failed, the **first** is usually the cause; the rest are cascading side effects.
24
-
25
- ### Open artifacts in the right order
26
- For the focus step `NNNN_<step>`:
26
+ ### Artifact order for the focus step (`NNNN_<step>`)
27
27
 
28
28
  | Artifact | When |
29
29
  |---|---|
30
- | `NNNN_*_aria.txt` | First read — leaner than HTML, structured, easy to scan for duplicates |
30
+ | `NNNN_*_aria.txt` | First read — lean, structured, easy to scan for duplicates |
31
31
  | `NNNN_*_screenshot.png` | Visual confirmation — layout, animation, "rendered but wrong" |
32
- | `NNNN_*_page.html` | Only when ARIA is missing context. **Use `grep`, not `cat`** |
33
- | `NNNN_*_console.json` | JS errors, 4xx/5xx, deprecation warnings explaining "vanished" elements |
34
- | `NNNN_*_storage.json` | Cookies + localStorage at this step. First place to look when auth is the suspected culprit. |
32
+ | `NNNN_*_console.json` | JS errors, 4xx/5xx, deprecation warnings explaining vanished elements |
33
+ | `NNNN_*_storage.json` | Cookies + localStorage at this step first stop when auth suspected |
34
+ | `NNNN_*_page.html` | Last resort, and only via `grep` |
35
35
 
36
36
  ### Never read big files whole
37
- HTML snapshots can be megabytes; `console.json` arrays can be long.
38
37
 
39
- - Use `grep` to search HTML for expected elements / attributes / locator variants (text, class, aria-label, `data-*`). Line numbers and context flags make the match readable.
40
- - Use `jq` to filter `console.json` for errors or specific event types instead of reading every entry.
41
- - When scanning many files, `grep -l` returns filenames-only.
38
+ - HTML snapshots: search with `grep` (text, class, aria-label, `data-*`) line numbers + context flags keep matches readable.
39
+ - `console.json`: filter with `jq`, don't read every entry.
40
+ - Scanning many files: `grep -l` for filenames only.
42
41
 
43
42
  ## Use cases
44
43
 
45
44
  ### Verify a fix held
46
- After editing a test (e.g. via MCP) and re-running it via CLI: locate the latest trace, read trace.md, confirm no FAILED markers. Glance at `console.json` for warnings worth fixing while you're there.
45
+ Locate latest trace read trace.md confirm no FAILED markers. Glance at `console.json` for warnings worth fixing while you're there.
47
46
 
48
47
  ### Cluster errors across a CI batch
49
- When many tests failed in one run: extract the failing-step lines from every `trace.md` in the batch, group by signature (`grep` + `sort` + `uniq -c`), rank by frequency.
50
-
51
- - **Same error in many tests = systemic.** Env var missing, auth broken, base URL wrong, deploy regression. Fix the root cause once and rerun the batch.
52
- - **Different errors per test = local issues.** Triage one at a time.
53
-
54
- Pick the most-frequent root cause first; rerun to see how many tests came back along with it.
55
-
56
- ### Diagnose flakiness across reruns
57
- Run the same test 5–10 times. Extract which step failed in each trace and look at how the answer varies. If the failing step is the *same* but the surrounding state differs, `diff` the ARIA snapshots at that step between two runs to spot what changed.
58
-
59
- - **Different step each run** timing, environment, external service.
60
- - **Same step, different reason** → likely a missing or wrong wait (see Waiting in writing/debug skills).
61
- - **`console.json` differs between runs** → transient backend / network errors.
62
- - **Bounding box differs** → layout reflow or late-loading content shifting things.
48
+ Extract failing-step lines from every `trace.md`, group by signature (`grep` + `sort` + `uniq -c`), rank by frequency.
49
+ - Same error in many tests = **systemic** (env var, auth, base URL, deploy regression) — fix root cause once, rerun the batch.
50
+ - Different errors per test = local triage one at a time.
51
+ Start with the most frequent root cause; rerun to see how many tests came back with it.
52
+
53
+ ### Diagnose flakiness
54
+ Rerun the same test 5–10 times; compare which step failed in each trace.
55
+ - Different step each run → timing, environment, external service
56
+ - Same step, different state missing/wrong wait `diff` the ARIA snapshots of that step between runs
57
+ - `console.json` differs between runs → transient backend/network errors
58
+ - Bounding box differslayout reflow or late-loading content
63
59
 
64
60
  ### Investigate a single failure
65
- Locate the trace, jump to the failed-or-last step, open ARIA + screenshot first, console.json second, HTML last (and only via `grep`). Form a hypothesis. If the trace alone isn't enough the failure resists static analysis or the page state needs live poking hand off to **debugging-codeceptjs-tests** for the MCP-driven loop.
61
+ Failed-or-last step ARIA + screenshot first, console second, HTML last (grep only). Form a hypothesis. Trace not enough / page needs live poking hand off to `debugging-codeceptjs-tests`.
66
62
 
67
- ## After the analysis
63
+ ## After analysis
68
64
 
69
- - **Systemic cause across many tests** — fix the root once (env, auth, deploy, base URL). Not per test.
70
- - **Locator drift** invoke **codeceptjs-exploration** to pick a new stable locator.
71
- - **Timing / wait issue** apply the Waiting guidance from the writing/debugging skills, replacing `I.wait(N)` with a specific `waitFor*`.
72
- - **Failure resists static analysis** invoke **debugging-codeceptjs-tests** for the live MCP loop.
73
- - **Test passed cleanly** done. Still glance at `console.json` for warnings worth fixing now.
65
+ - Systemic cause fix root once (env, auth, deploy), not per test
66
+ - Locator drift `codeceptjs-exploration`
67
+ - Timing/wait issue Waiting guidance from fundamentals/writing skills; replace `I.wait(N)` with specific `waitFor*`
68
+ - Resists static analysis `debugging-codeceptjs-tests` (live MCP loop)
69
+ - Clean pass done, but glance at `console.json` anyway
74
70
 
75
71
  ## Things to avoid
76
72
 
77
- - Reading large HTML or `console.json` files whole — search them with `grep` / `jq` instead.
78
- - When more than one step is marked failed, stopping at the last one — the **first** failure is usually the cause and the rest are cascading.
79
- - Triaging individual failures before clustering — fixing 12 symptoms of one bug is wasted effort.
80
- - Drawing flakiness conclusions from a single run — needs 5+ reruns.
81
- - Deleting `output/` mid-investigation; the artifacts are the only record of the run.
73
+ - Reading large HTML or `console.json` whole — `grep` / `jq`.
74
+ - Stopping at the last marked failure instead of the first.
75
+ - Triaging individual failures before clustering.
76
+ - Flakiness conclusions from a single run — needs 5+ reruns.
77
+ - Deleting `output/` mid-investigation.
82
78
 
83
- ## Pointers
79
+ ## Related skills
84
80
 
85
- - `node_modules/codeceptjs/docs/aitrace.md` — trace format and config knobs
86
- - `node_modules/codeceptjs/docs/debugging.md` — verbose flags, `pause` plugin's `on=` modes
87
- - `node_modules/codeceptjs/docs/reports.md` — alternative reporters
88
- - `codeceptjs-fundamentals` — what's actually configured
89
- - `codeceptjs-exploration` — when locator drift is the cause
90
- - `debugging-codeceptjs-tests` — when post-mortem isn't enough
81
+ - `codeceptjs-fundamentals` — what's configured, aiTrace `-p` overrides
82
+ - `codeceptjs-exploration` — locator drift fixes
83
+ - `debugging-codeceptjs-tests` — live loop + offline locator resolution via `codeceptq`
@@ -1,234 +1,126 @@
1
1
  ---
2
2
  name: debugging-codeceptjs-tests
3
- description: "Use when a CodeceptJS 4 test is failing, flaky, or behaving unexpectedly — stack traces from `npx codeceptjs run`, intermittent failures, locator drift, timing issues, \"works locally fails in CI\", \"step through this test\", \"pause at step N\", \"set a breakpoint\". For AI agents the primary path is **MCP with pause** — drop a `pause()` in the test (or pass `pauseAt: N` to `run_test` for a no-edit breakpoint), inspect via `run_code` / `snapshot` against the live browser, release with `continue`. Step indices for `pauseAt` come from `npx codeceptjs dry-run --debug --grep <test> --numbers --no-ansi`. CLI debugging (`npx codeceptjs run --debug`, `DEBUG=\"codeceptjs:*\"`) is the fallback for humans, CI repros, and framework-internal issues (recorder hangs, leaks, plugin races). Don't fix from the error message alone; capture page state and read it. Trigger on broken or flaky tests, run errors, \"why does this fail\", trace/screenshot/console mentions, breakpoint/pause/step-through requests."
3
+ description: >
4
+ Use when a CodeceptJS 4 test fails, flakes, or behaves unexpectedly. Trigger
5
+ on run errors and stack traces from `npx codeceptjs run`, intermittent
6
+ failures, locator drift, timing issues, "works locally fails in CI", "why
7
+ does this fail", trace/screenshot/console mentions, and breakpoint /
8
+ step-through / "pause at step N" requests.
4
9
  ---
5
10
 
6
11
  # Debugging CodeceptJS 4 Tests
7
12
 
8
- Failures lie. The error usually points at a step that's a side effect of something earlier auth expired, a frame switch missed, a network call still pending. Reproduce, capture state, and read it before fixing.
13
+ Failures lie the error usually points at a step that's a side effect of something earlier (auth expired, frame switch missed, network call pending). Reproduce, capture state, read it, then fix.
9
14
 
10
- Two paths, picked by who's driving:
15
+ ## Paths
11
16
 
12
- - **MCP-first (for AI agents)** drive the test through the MCP server. In-test `pause()` and the `pauseAt: N` option on `run_test` both yield control back to the agent in-process same `I` / browser the test is using. Inspect via `run_code` / `snapshot`, advance one step at a time via `run_step_by_step` + `continue`, release a pause via `continue`. `aiTrace` artifacts cover the prior steps.
13
- - **CLI fallback (for humans / CI / framework internals)** — `npx codeceptjs run --debug` for verbose framework output. Escalate to `DEBUG="codeceptjs:*"` when the *framework itself* looks at fault: recorder hangs, plugin races, event leaks, "step never ran". Use this path for CI repros, headless servers, and framework-internal bugs.
17
+ - **MCP-first (AI agents)**: `run_test` / in-test `pause()` yield control to the agent on the same `I` / browser the test uses. Inspect via `run_code` / `snapshot`; step through via `run_step_by_step` + `continue`.
18
+ - **CLI fallback (humans / CI / framework internals)**: `--debug` `--verbose` `DEBUG="codeceptjs:*"`. The DEBUG escape hatch is only for framework-internal suspicion: recorder hangs, plugin races, event leaks, "step never ran". Namespaces: `codeceptjs:recorder`, `codeceptjs:pause`, `codeceptjs:ai`, `codeceptjs:plugin:<name>`.
14
19
 
15
- In-test `pause()` adapts to who's driving: at a TTY it opens the readline REPL; under MCP it yields control to the agent (same in-process `I` / browser); in a non-TTY non-MCP subprocess it prints a notice and resolves immediately so leftover `pause()` calls don't deadlock CI. **Adding `pause()` is now the primary MCP breakpoint** — drop it where you want to look, run via `run_test`, drive the live page through `run_code`, release with `continue`.
20
+ `pause()` adapts to who's driving: TTY readline REPL; MCP yields control to the agent; non-TTY non-MCP subprocess prints a notice and resolves (no CI deadlock).
16
21
 
17
22
  ## Workflow
18
23
 
19
- ### 1. Read the project (fundamentals)
20
- Run the **codeceptjs-fundamentals** skill. You need: helper, plugins on (especially `aiTrace`, `screenshot`, `pageInfo`, `retryFailedStep`, `pause`, `auth`), env vars, whether MCP is wired up. If `aiTrace` is **not** declared, add it **once** with `plugins: { aiTrace: { enabled: true } }` most of this skill leans on its output.
21
-
22
- **Declare `aiTrace` once; never edit config to change its trigger.** The capture mode is controlled per-run from the CLI, exactly like the `pause` plugin:
23
-
24
- ```bash
25
- npx codeceptjs run -p aiTrace:on=step # persist every step (default)
26
- npx codeceptjs run -p aiTrace:on=fail # persist only the failed step
27
- npx codeceptjs run -p aiTrace:on=test # persist only the last step of each test
28
- npx codeceptjs run -p aiTrace:on=file:path=tests/login_test.js;line=43
29
- npx codeceptjs run -p aiTrace:on=url:pattern=/checkout/*
30
- ```
31
-
32
- `-p aiTrace:on=...` overrides the config-declared mode for that run only. Reach for `on=fail` to keep a CI repro lean, `on=step` while actively diagnosing. Don't flip `on:` in `codecept.conf.js` between runs — it churns the config and the change leaks into other runs.
33
-
34
- ### 2. Reproduce minimally
35
- Run only the failing test, with steps printed:
36
- ```bash
37
- npx codeceptjs run --grep '<scenario>' --steps
38
- ```
39
- Add `--config codecept.ci.conf.js` if the failure is CI-specific. Confirm reproduction before instrumenting further.
40
-
41
- ### 3. Pick a path
42
-
43
- **MCP (primary for AI agents):**
44
- - `run_test <test>` runs a specific test in-process; shares `I` / browser with `run_code` and `snapshot`. Returns the JSON reporter result on completion, **or** `{ status: 'paused', pausedAfter, page, suggestions }` if the test calls `pause()` or hits the optional `pauseAt: N` breakpoint. From a paused state, drive the live page via `run_code` / `snapshot` and release with `continue`.
45
- - `run_step_by_step <test>` interactive: pauses after every step. After each `continue`, the test advances one step and re-pauses (or completes). Use when you want to watch the whole flow tick by; use `run_test` with `pauseAt: N` instead for a single targeted breakpoint.
46
- - `continue` releases a paused test. After `pause()` or `pauseAt`: runs to completion (or to the next `pause()`). After `run_step_by_step`: advances one step.
47
- - `run_code <CodeceptJS lines>` — runs arbitrary CodeceptJS code in the live session (works fresh **and** while a test is paused — same container). Returns the **value the code produced**, captures `console.log` / `info` / `warn` / `error` / `debug` output, and saves a final-state snapshot (URL, ARIA, HTML, screenshot, storage). Use to test a locator hypothesis or grab a value at the failure point.
48
- - `snapshot` — captures current browser state without performing any action (URL, cookies, localStorage, HTML, ARIA, screenshot, console). Use between actions when you want to reason about what to do next without re-running anything.
49
- - `list_actions` sanity-check that an `I.*` method exists on the active helper.
50
-
51
- **CLI (fallback):**
52
- - `npx codeceptjs run --grep '<scenario>' --debug` — first move when MCP isn't available. Steps + helper internals + URLs + plugin events.
53
- - `npx codeceptjs run ... --verbose` — adds promise-queue / retry / timeout logs on top of `--debug`.
54
- - `DEBUG="codeceptjs:*" npx codeceptjs run ...` — turns on CodeceptJS's internal debug streams. Reach for this when `--debug` doesn't explain the failure: orphaned timers, event leaks, recorder hangs, plugin races, double-emitted events, "step disappeared from the queue". Narrow with namespaces: `codeceptjs:recorder` (promise queue), `codeceptjs:pause`, `codeceptjs:ai`, `codeceptjs:plugin:<name>`. Most user-level test failures don't need this — it's the framework-internal escape hatch.
55
-
56
- ### 4. Set a breakpoint with `pause()` or `pauseAt`
57
-
58
- The MCP server installs an in-process pause handler at startup. Whenever a test running through `run_test` hits `pause()` (or completes the `pauseAt: N` step), control yields back to the agent on the same `I` / browser. There's no subprocess, no IPC, and `run_code` / `snapshot` work against the live page — exactly what a paused REPL would give you.
59
-
60
- Two ways to land at a breakpoint:
61
-
62
- - **In-test `pause()`** — drop `pause()` directly in the test where you want to look. Best when you're already editing the file or want to break inside a `within` / loop / hook.
63
- - **`pauseAt: N` on `run_test`** — programmatic, no test edit required. Pauses after the Nth leaf step completes.
64
-
65
- To pick `N`, list the steps with their indices:
66
-
67
- ```bash
68
- npx codeceptjs dry-run --debug --grep '<scenario>' --numbers --no-ansi
69
- ```
70
-
71
- Output is one numbered line per leaf step (1-based, per-test). The number on the line you want to stop *after* is the value to pass as `pauseAt`. `--no-ansi` strips colors so the output is clean for parsing.
72
-
73
- Once paused (`{ status: 'paused', pausedAfter, page, suggestions }`):
74
-
75
- 1. **Inspect with `run_code`** — `await I.grabCurrentUrl()`, `await I.grabWebElement(...)`, `await I.seeElement({ role: 'dialog' })`. Each call returns URL + ARIA + console + storage from the live page.
76
- 2. **Capture clean state with `snapshot`** between hypotheses — no action, just the artifact bundle.
77
- 3. **Walk earlier steps via `aiTrace`** — `output/trace_<TestName>_<hash>/trace.md` has the per-step state for everything that ran before the breakpoint.
78
- 4. **Release with `continue`** — runs to completion (or to the next `pause()`). For a step-by-step walk, use `run_step_by_step` instead of `run_test`; each `continue` then advances one step.
79
-
80
- ### 5. Read the trace
81
- Hand off to **codeceptjs-run-analysis** to walk `output/trace_<TestName>_<hash>/trace.md` and the per-step artifacts. Focus on the **first** failed step — late failures are usually side effects of an earlier silent miss. The run-analysis skill also covers grepping into large HTML, clustering errors across many traces, and comparing reruns when flakiness is in play.
82
-
83
- For locator-level questions on a saved snapshot ("would `.btn-primary` have matched here?", "is `Username` a field at step 7?") use **`codeceptq`** against the per-step `<NNNN>_<step>_page.html` — see the "Query trace HTML with `codeceptq`" section below. Faster feedback loop than `run_code` when you're iterating selector candidates.
84
-
85
- ### 6. Form a hypothesis
86
-
87
- | Symptom | Likely cause |
88
- |---|---|
89
- | Element missing, page is `/login` | Auth: stale `check`, expired session, missing env var |
90
- | Element in HTML but `display: none` | `waitForVisible`, not `waitForElement` |
91
- | Locator matches 2+ (strict mode) | Disambiguate: ARIA role, `step.opts({ elementIndex })`, `within` |
92
- | Element in screenshot N+1, missing in N | Animation / lazy load — `waitForVisible(loc, t)` |
93
- | 401/403 in console.json | API token expired or env var missing |
94
- | Steps pass, next `I.see` fails | Frame switch missed — wrap in `within({ frame })` |
95
- | Different result CI vs local | `setHeadlessWhen(CI)`, viewport, timing, env var |
96
- | Recorder hangs, step never fires | `DEBUG="codeceptjs:recorder"` to inspect the queue |
97
- | Plugin misbehaves | `DEBUG="codeceptjs:plugin:<name>"` |
98
-
99
- ### 7. Verify the fix on the live page
100
- For agents driving MCP, use `run_code` to try the candidate fix in the live session **before editing the file**. If it works there, it'll work in the test. While paused (in-test `pause()` or `pauseAt`), `run_code` operates on the same `I` / browser the test is using, so a candidate replacement step can be tried in place. Humans running with `--debug` at a TTY can use in-test `pause()` for the same purpose at a readline REPL.
101
-
102
- ### 8. Apply and re-run
103
- Edit the test, then `npx codeceptjs run --grep '<scenario>' --steps`. Use **codeceptjs-run-analysis** to verify the trace looks right after the fix — and to confirm the failure didn't shift to another step. If the fix introduces a `waitFor*` or `step.opts`, leave a one-line `Why:` comment — those are the comments worth keeping.
104
-
105
- ## When to reach for which plugin / mode
106
-
107
- | You want to … | Use |
108
- |---|---|
109
- | Per-step artifacts after a run | `aiTrace` plugin (`output/trace_*/`), declared once in config |
110
- | Capture every step's state | `npx codeceptjs run -p aiTrace:on=step` |
111
- | Capture only the failed step (lean CI repro) | `npx codeceptjs run -p aiTrace:on=fail` |
112
- | Capture last step per test | `npx codeceptjs run -p aiTrace:on=test` |
113
- | Capture steps from a file/line or URL | `-p aiTrace:on=file:path=<file>;line=<N>` / `-p aiTrace:on=url:pattern=<glob>` |
114
- | REPL on first failure | `npx codeceptjs run -p pause` (default `on=fail`) |
115
- | Single-step interactively | `npx codeceptjs run -p pause:on=step` |
116
- | Break on a file or URL | `pause:on=file:path=<file>;line=<N>` / `pause:on=url:pattern=<glob>` |
117
- | Programmatic breakpoint at step N (no test edit) | MCP `run_test` with `pauseAt: N` (discover N via `dry-run --numbers`) |
118
- | In-test breakpoint at a specific line | drop `pause()` in the test, then MCP `run_test` |
119
- | Step-by-step REPL from an AI agent | MCP `run_step_by_step`, then `continue` between steps |
120
- | Release a paused test | MCP `continue` |
121
- | Test a hypothesis on the live page (agent) | MCP `run_code` (works fresh **and** while paused) |
122
- | Capture state without acting (agent) | MCP `snapshot` |
123
- | Test a hypothesis on the live page (human, TTY) | in-test `pause()` + `npx codeceptjs run --debug` |
124
- | List steps with their indices (for `pauseAt`) | `npx codeceptjs dry-run --debug --grep '<test>' --numbers --no-ansi` |
125
- | Visual replay slideshow | `screenshot:slides=true` → `output/records.html` |
126
- | Auto-suggest fixes for broken locators | `heal` plugin + `--ai` (disabled in `--debug`) |
127
- | Diagnose framework-internal behaviour | `DEBUG="codeceptjs:*"` (or a specific namespace) |
128
- | Inspect specific elements — state, markup, position, children | `I.grabWebElement` / `I.grabWebElements` (cross-helper WebElement API) |
129
- | Drop to native helper APIs when nothing else works | `I.usePlaywrightTo` / `I.usePuppeteerTo` / `I.useWebDriverTo` |
130
- | Verify a locator against a saved trace snapshot (offline) | `codeceptq <locator> --file output/trace_*/<NNNN>_<step>_page.html` |
131
-
132
- ## Waiting (a common cause of flakes)
133
-
134
- Most "intermittent" failures are missed waits. Use the trace HTML / ARIA to find the *actual* gating element rather than adding a generic delay:
135
- - a **loader / spinner / skeleton** still on the page → `I.waitForInvisible('.spinner')` / `I.waitForDetached('.skeleton')`
136
- - a **modal / drawer / panel** that hasn't appeared yet → `I.waitForVisible('.modal')` / `I.waitForElement({ role: 'dialog' })`
137
- - async data — list rows, cards, charts, async-rendered text → `I.waitForElement('.user-row', 10)` / `I.waitForText('Loaded', 10, '.status')`
138
-
139
- `I.wait(N)` (raw seconds) is fine **during debugging** to confirm a timing hypothesis — if a 5-second sleep makes the test pass, you've found the cause. **Replace it with the specific `I.waitFor*` before committing.** Raw sleeps are slow on fast machines, flaky on slow ones, and hide the real sync point so the next person to touch the test inherits the same problem.
140
-
141
- ## Inspect the page when the trace isn't enough
142
-
143
- When the trace tells you *what* failed but you need more page-state detail to diagnose — "is this button actually disabled?", "are there really two Save buttons?", "what's the rendered markup of this row?" — hand off to the **codeceptjs-exploration** skill. It covers the WebElement API (`I.grabWebElement` / `I.grabWebElements`, state checks, `toSimplifiedHTML`, `toAbsoluteXPath`, iframe walking) and the broad-XPath candidate-discovery technique.
144
-
145
- Debug-specific reaches into that toolkit:
146
-
147
- - **Button rendered but the click had no effect** — `grabWebElement('Submit')`, then `isEnabled()` + `getBoundingBox()`. Disabled? offscreen? zero-sized?
148
- - **Strict-mode "matched 2 elements"** — exploration's broad-XPath + iterate-and-disambiguate pattern is the canonical fix.
149
- - **Iframe content** — exploration's `inIframe` pattern; the failing step likely needs to be wrapped in `within({ frame })`.
150
-
151
- Prefer this over `usePlaywrightTo` / `useWebDriverTo` for inspection: same code across helpers, less boilerplate.
24
+ 1. **Fundamentals** run `codeceptjs-fundamentals`: helper, plugins (`aiTrace`, `screenshot`, `pageInfo`, `retryFailedStep`, `pause`, `auth`), env vars, MCP availability. If `aiTrace` isn't declared, add it once: `plugins: { aiTrace: { enabled: true } }` — most of this skill leans on its output.
25
+ - **Declare once; never edit config to change its trigger.** Override per-run with `-p aiTrace:on=step|fail|test|file|url` (fundamentals § Plugins from CLI). `on=fail` for lean CI repros, `on=step` while diagnosing. Flipping `on:` in config churns the repo and leaks into other runs.
26
+ 2. **Reproduce minimally**: `npx codeceptjs run --grep '<scenario>' --steps`. Add `-c codecept.ci.conf.js` if CI-specific. Confirm reproduction before instrumenting.
27
+ 3. **Pick tools**:
28
+ - MCP `run_test <test>` — runs in-process; returns reporter result or `{ status: 'paused', pausedAfter, page, suggestions }`
29
+ - MCP `run_step_by_step` + `continue` — pause after every step; for watching the whole flow
30
+ - MCP `run_code` arbitrary code in the live session; works fresh *and* paused; returns produced values + console output + final-state snapshot
31
+ - MCP `snapshot` current browser state without acting (URL, cookies, storage, HTML, ARIA, screenshot, console)
32
+ - MCP `list_actions` sanity-check an `I.*` method exists
33
+ - CLI `npx codeceptjs run --grep '<scenario>' --debug` — first move without MCP; `--verbose` adds promise-queue/retry/timeout logs
34
+ 4. **Breakpoint**:
35
+ - In-test `pause()` — best when already editing or breaking inside `within`/loop/hook
36
+ - `pauseAt: N` on `run_test` — no test edit; pauses after the Nth leaf step
37
+ - Find N: `npx codeceptjs dry-run --debug --grep '<scenario>' --numbers --no-ansi` (1-based, per-test; number of the line to stop *after*)
38
+ - While paused: inspect with `run_code`, capture clean state with `snapshot`, walk prior steps in `output/trace_<TestName>_<hash>/trace.md`, release with `continue`
39
+ 5. **Read the trace** — hand off to `codeceptjs-run-analysis`; focus on the **first** failed step — late failures are usually side effects of an earlier silent miss. It also covers grepping large HTML, clustering errors across traces, comparing reruns.
40
+ 6. **Form a hypothesis**:
41
+
42
+ | Symptom | Likely cause |
43
+ |---|---|
44
+ | Element missing, page is `/login` | Auth: stale session cache, missing env var |
45
+ | Element in HTML but `display: none` | `waitForVisible`, not `waitForElement` |
46
+ | Locator matches 2+ (strict mode) | Scope it: context arg, then ARIA role, then `step.opts({ elementIndex })` |
47
+ | Element present in screenshot N+1, missing in N | Animation / lazy load → `waitForVisible(loc, t)` |
48
+ | 401/403 in console.json | API token expired or env var missing |
49
+ | Steps pass, next `I.see` fails | Frame switch missed `within({ frame })` |
50
+ | Different result CI vs local | `setHeadlessWhen(CI)`, viewport, timing, env vars |
51
+ | Recorder hangs, step never fires | `DEBUG="codeceptjs:recorder"` |
52
+ | Plugin misbehaves | `DEBUG="codeceptjs:plugin:<name>"` |
53
+
54
+ 7. **Verify the fix on the live page** — try the candidate replacement step via `run_code` (works while paused, same `I`) **before editing the file**. Humans at a TTY get the same via in-test `pause()`.
55
+ 8. **Apply and re-run**: edit, then `npx codeceptjs run --grep '<scenario>' --steps`; confirm via `codeceptjs-run-analysis` that the failure didn't shift steps. Leave a one-line `Why:` comment when the fix introduces `waitFor*` or `step.opts` — those comments are worth keeping.
152
56
 
153
57
  ## Query trace HTML with `codeceptq`
154
58
 
155
- `aiTrace` writes a per-step `<NNNN>_<step>_page.html` snapshot of the live DOM for every step (formatted so each element sits on its own line — line numbers map 1:1 to elements). To answer "would my locator have matched at step N?", use `codeceptq` — a CLI that resolves any CodeceptJS locator (CSS / XPath / fuzzy / semantic) against a saved HTML snapshot and prints the matched elements with their source lines.
59
+ `aiTrace` writes per-step `<NNNN>_<step>_page.html` snapshots (one element per line — line numbers map 1:1 to elements). `codeceptq` resolves any CodeceptJS locator against a saved snapshot.
156
60
 
157
- **Never load the page HTML into your context to inspect it manually.** Real-world `*_page.html` files are thousands of lines and burn context for nothing — `codeceptq` does the locator resolution and returns only the relevant elements. Reach for it instead of `Read`-ing the snapshot.
61
+ - **Never load page HTML into context manually** snapshots are thousands of lines; `codeceptq` returns only matched elements with their line numbers.
62
+ - Test candidate locators offline before applying via `run_code` — a hit is a green light to try live, not a guarantee (visibility, re-renders).
63
+ - Multiple matches → don't write a brittler XPath; disambiguate with `step.opts({ elementIndex })` following the order `codeceptq` prints.
158
64
 
159
65
  ```bash
160
- # does this CSS resolve?
161
- npx codeceptq '#submit-btn' --file output/trace_<TestName>_<hash>/0007_I_click_Submit_page.html
162
-
163
- # semantic field lookup against a saved snapshot
164
- npx codeceptq 'Email' --field --file output/trace_*/0003_*_page.html
165
-
166
- # semantic clickable, scoped to a context
167
- npx codeceptq 'Save' '.modal' --click --file output/trace_*/0005_*_page.html
168
-
169
- # pipe directly from stdin
170
- cat output/trace_*/0001_*_page.html | npx codeceptq './/form//input[@required]'
171
-
172
- # machine-readable for chained tooling
173
- npx codeceptq 'Username' --field --json --file output/trace_*/0002_*_page.html
66
+ npx codeceptq '#submit-btn' --file output/trace_*/0007_*_page.html # CSS
67
+ npx codeceptq 'Email' --field --file output/trace_*/0003_*_page.html # semantic field
68
+ npx codeceptq 'Save' '.modal' --click --file output/trace_*/0005_*_page.html # scoped clickable
69
+ npx codeceptq 'Username' --field --json --file ... # machine-readable
174
70
  ```
175
71
 
176
- What you get back: a count, the resolved XPath, and one entry per match with the **line number** in the snapshot file plus the element's outerHTML.
72
+ Key flags: `--field/--click/--checkable/--select` force semantic strategies; `--xpath`/`--css` override auto-detection (a bare tag name like `select.foo` is treated as fuzzy text); exit codes `0` match / `1` none / `2` invalid input.
177
73
 
178
- Flags worth knowing:
179
- - `--field` / `--click` / `--checkable` / `--select` — force a CodeceptJS semantic strategy (label, button text, checkbox, option). Without a flag, the locator type is auto-detected (CSS if it starts with `#`/`.`/`[`; XPath if it starts with `//` or `./`; fuzzy text otherwise).
180
- - `--xpath` / `--css` — force interpretation when auto-detection wouldn't pick the right one (e.g., a bare tag name like `select.foo` without `--css` would be treated as fuzzy text).
181
- - `[context]` — second positional arg restricts matches to descendants of the context locator (e.g., `'Save' '.modal' --click`).
182
- - `--limit N` (default 20), `--snippet N` (default 500), `--full`, `--json`.
183
- - Exit codes: `0` matches, `1` no match, `2` invalid input/XPath — useful for scripted "did this locator break?" checks.
74
+ > **The `[context]` second positional does not scope** (CodeceptJS 4.1.0). It prints `N matches within '<ctx>'` but returns page-wide results — `lib/command/query.js` evaluates an absolute XPath (`//…`) against the context node, and `//foo` re-roots at the document. It will report a match inside a container that does not hold the element. To check a scoped locator offline, pass one composed selector (`codeceptq '.modal button[aria-label="Save"]'`) and compare its count against the unscoped form; a context-dependent locator is only truly verified by running the step.
184
75
 
185
- Use `codeceptq` to test locators against the snapshot **before** applying them via `run_code`. If a candidate matches, you've validated the locator string against the DOM as captured. It can still fail live — element not visible, removed by a re-render, or the snapshot is from a different step — so treat a hit as a green light to try, not a guarantee.
76
+ ## Inspect deeper
186
77
 
187
- When `codeceptq` returns multiple matches, **don't write a brittler XPath** disambiguate with `step.opts({ elementIndex })`. Indexing is 1-based and follows the order `codeceptq` prints; supports `'first'`, `'last'`, and negatives.
78
+ Hand off to `codeceptjs-exploration` when the trace says *what* failed but you need more page-state detail ("is this button actually disabled?", "are there really two Save buttons?"). Debug-specific reaches:
188
79
 
189
- ```js
190
- I.click('Edit', step.opts({ elementIndex: 2 }))
191
- I.fillField('input', 'value', step.opts({ elementIndex: 'last' }))
192
- ```
80
+ - Button rendered but click had no effect → `grabWebElement('Submit')` + `isEnabled()` + `getBoundingBox()` (disabled? offscreen?)
81
+ - Strict-mode multi-match → exploration's broad-XPath iterate-and-disambiguate pattern
82
+ - Iframe content → wrap failing steps in `within({ frame })`
193
83
 
194
- ## Native helper API escape hatch
84
+ Prefer this over `usePlaywrightTo`/`useWebDriverTo` for inspection — same code across helpers, less boilerplate.
195
85
 
196
- When `I.grabWebElement` and the rest of the `I.*` surface still don't cover it — listening to network requests, manipulating storage, calling a Playwright-only API, raw browser context work — drop down to the underlying helper:
86
+ ## Native helper escape hatch
197
87
 
198
- - **Playwright** `I.usePlaywrightTo('description', async ({ browser, browserContext, page }) => { ... })`
199
- - **Puppeteer** — `I.usePuppeteerTo('description', async ({ page }) => { ... })`
200
- - **WebDriver** — `I.useWebDriverTo('description', async ({ browser }) => { ... })`
88
+ Only when the `I.*` surface truly doesn't cover it (network interception, storage manipulation, helper-only APIs):
201
89
 
202
- The first arg is a label that shows up in step output and traces. The callback receives the helper's native objects. Use these to inspect or manipulate state CodeceptJS doesn't expose — `page.evaluate(() => performance.timing)`, `page.context().cookies()`, `browserContext.on('request', …)`, raw `executeScript` chains. They work inside MCP `run_code` too, so you can poke at internals during a live debug session.
90
+ - Playwright: `I.usePlaywrightTo('label', async ({ browser, browserContext, page }) => { ... })`
91
+ - Puppeteer: `I.usePuppeteerTo('label', async ({ page }) => { ... })`
92
+ - WebDriver: `I.useWebDriverTo('label', async ({ browser }) => { ... })`
203
93
 
204
- Try the regular `I.*` API first these escape hatches couple the test to a specific helper. Reach for them only when nothing else works.
94
+ The label shows up in step output and traces. Works inside MCP `run_code` too. These couple tests to a specific helper last resort.
205
95
 
206
- ## Helper-specific gotchas
96
+ ## Helper gotchas
207
97
 
208
- - **Playwright** `strict: true` throws on multi-match. `trace: 'on'` produces `output/trace.zip` (open with `npx playwright show-trace`). Prefer `'load'` / `'domcontentloaded'` over `'networkidle'`.
209
- - **Puppeteer** `'networkidle0'` can hang on long-polling pages; try `'networkidle2'` or `'domcontentloaded'`.
210
- - **WebDriver** `smartWait` applies to actions only, not assertions. `executeScript` args must be JSON-serializable.
98
+ - Playwright: `strict: true` throws on multi-match; prefer `'load'`/`'domcontentloaded'` over `'networkidle'`; `trace: 'on'` `output/trace.zip` (`npx playwright show-trace`)
99
+ - Puppeteer: `'networkidle0'` hangs on long-polling pages use `'networkidle2'` or `'domcontentloaded'`
100
+ - WebDriver: `smartWait` covers actions only, not assertions; `executeScript` args must be JSON-serializable
211
101
 
212
102
  ## Auth-related failures
213
103
 
214
- If the trace shows a redirect to `/login` mid-test, or 401/403 in console, fix **auth**, not the failing step. Check the `auth` plugin's `check`, that credential env vars are exported, and that the cached session under `output/<role>_session.json` isn't stale (delete it to force re-login). The **codeceptjs-auth** skill has the full pattern.
104
+ Redirect to `/login` mid-test or 401/403 in console fix **auth**, not the failing step: check the plugin's `check`, credential env vars, and stale cached session under `output/<role>_session.json` (delete to force re-login). Full pattern in `codeceptjs-auth`.
105
+
106
+ ## Flakiness and waits
107
+
108
+ Most "intermittent" failures are missed waits. Use trace HTML/ARIA to find the actual gating element instead of adding generic delay (fundamentals § Waiting has the mapping). `I.wait(N)` confirms a timing hypothesis while debugging — replace with the specific `waitFor*` before committing.
215
109
 
216
110
  ## Things to avoid
217
111
 
218
112
  - Fixing from the error message without reading the trace.
219
- - Editing the test before verifying the fix in `run_code` — you'll iterate without ground truth.
220
- - Committing `pause()` calls. They're a debugging tool — remove (or replace with `pauseAt`) before merging. A `pause()` left in a test that runs in a non-TTY non-MCP CI subprocess will print a notice and skip, but it's still noise on every run.
221
- - Adding `waitFor*` blindly instead of identifying the real gating element from HTML/ARIA.
222
- - Leaving `I.wait(N)` (raw seconds) in committed tests — keep them only while debugging, then replace with the specific `waitFor*`.
223
- - Editing `aiTrace`'s `on:` in `codecept.conf.js` to switch capture modes — declare it once and override per-run with `-p aiTrace:on=...`. Repeated config edits churn the repo and leak the mode into unrelated runs.
224
- - Skipping the config check — `setHeadlessWhen(CI)` or env-driven URLs explain many "works locally fails in CI" reports.
225
- - Hiding the failure with `retries` instead of fixing the cause.
226
-
227
- ## Pointers
228
-
229
- - `node_modules/codeceptjs/docs/mcp.md` — MCP tool list and client config
230
- - `node_modules/codeceptjs/docs/aitrace.md` — plugin config, trace.md format
231
- - `node_modules/codeceptjs/docs/debugging.md` — in-test `pause()`, the `pause` plugin's `on=` modes, IDE setup, DEBUG namespaces
232
- - `node_modules/codeceptjs/docs/heal.md` — self-healing recipes
233
- - `node_modules/codeceptjs/docs/retry.md` — retry semantics across step / scenario / hook
234
- - `node_modules/codeceptjs/lib/plugin/aiTrace.js`, `lib/plugin/pause.js`, `lib/plugin/screenshot.js`, `lib/plugin/browser.js`, `bin/mcp-server.js` — source if docs and code disagree
113
+ - Editing the test before verifying the fix via `run_code`.
114
+ - Committing `pause()` calls debugging tool only.
115
+ - Blind `waitFor*` instead of identifying the real gating element.
116
+ - Leaving `I.wait(N)` in committed tests.
117
+ - Editing `aiTrace`'s `on:` in config between runs — declare once, override per-run.
118
+ - Skipping the config check — `setHeadlessWhen(CI)` / env-driven URLs explain many "works locally fails in CI".
119
+ - Hiding failures with `retries` instead of fixing the cause.
120
+
121
+ ## Related skills
122
+
123
+ - `codeceptjs-fundamentals` — effects, plugins-from-CLI, waiting rules
124
+ - `codeceptjs-exploration` — WebElement inspection, broad-XPath disambiguation
125
+ - `codeceptjs-run-analysis` — trace.md walking, error clustering, rerun comparison
126
+ - `codeceptjs-auth` — auth failure patterns
@@ -1,9 +1,8 @@
1
1
  ---
2
2
  name: migrate-codeceptjs-4
3
- description: "Migrate a CodeceptJS '3.x' project to '4.x'. Trigger when 'package.json' pins 'codeceptjs' at '3.x' or is missing '\"type\": \"module\"', when test files still use CommonJS ('require()' / 'module.exports') against CodeceptJS APIs, when config references removed helpers ('Nightmare', 'Protractor', 'TestCafe', 'AI', 'SoftExpectHelper', 'Mochawesome') or removed plugins ('autoLogin', 'tryTo', 'retryTo', 'eachElement', 'commentStep', 'fakerTransform', 'enhancedRetryFailedStep', 'allure', 'htmlReporter', 'wdio', 'selenoid', 'screenshotOnFail', 'pauseOnFail', 'stepByStepReport'), or when '3.x' APIs are in use ('ai.request' function, Joi schemas in 'seeResponseMatchesJsonSchema', 'restart: 'browser'', 'I.retry()', 'I.limitTime()', Playwright 'customLocators'). Walks the project through Node + package upgrade, ESM conversion, helper/plugin replacements, AI/Zod/effects API changes, 'noGlobals: true' adoption, dependency bumps, and the post-upgrade verify pass."
3
+ description: "Migrate a CodeceptJS 3.x project to 4.x. Trigger when `package.json` pins `codeceptjs` at 3.x or is missing `\"type\": \"module\"`, when test files still use CommonJS (`require()` / `module.exports`) against CodeceptJS APIs, when config references removed helpers (`Nightmare`, `Protractor`, `TestCafe`, `AI`, `SoftExpectHelper`, `Mochawesome`) or removed plugins (`autoLogin`, `tryTo`, `retryTo`, `eachElement`, `commentStep`, `fakerTransform`, `enhancedRetryFailedStep`, `allure`, `htmlReporter`, `wdio`, `selenoid`, `screenshotOnFail`, `pauseOnFail`, `stepByStepReport`), or when 3.x APIs are in use (`ai.request` function, Joi schemas in `seeResponseMatchesJsonSchema`, `restart: 'browser'`, `I.retry()`, `I.limitTime()`, Playwright `customLocators`)."
4
4
  ---
5
5
 
6
-
7
6
  # Migrate CodeceptJS 3.x → 4.x
8
7
 
9
8
  CodeceptJS 4 is **ESM-only and TypeScript-first**. There is no compatibility shim for CommonJS — every helper, page object, custom step, and config file must be ESM. This skill drives a project through the upgrade end-to-end.
@@ -103,8 +102,8 @@ Run, in order:
103
102
  5. Grep the repo for `tryTo(`, `retryTo(`, `eachElement(`, `commentStep(`, `softExpect`, `I.softExpect`, `Joi.`, `restart: 'browser'`, `I.retry(`, `I.limitTime(`, and (unless the user chose to keep it) `Mochawesome` / `--reporter mochawesome` — none should remain. `step.retry(` / `step.timeout(` passed as a step argument is the expected replacement, not a leftover.
104
103
  6. If the project used `autoLogin`: confirm the `auth` plugin restores sessions and roles.
105
104
 
106
- ## Pointers
105
+ ## Related skills
107
106
 
108
- - `node_modules/codeceptjs/docs/migration-4.md` — full reference (this skill is a workflow over it)
109
107
  - `codeceptjs-auth` — replacement for the removed `autoLogin` plugin
110
- - `codeceptjs-fundamentals` — run **after** migration to confirm the new setup is wired correctly
108
+ - `codeceptjs-fundamentals` — run **after** migration to confirm wiring
109
+ - Full reference: `node_modules/codeceptjs/docs/migration-4.md`