prose-qa 0.1.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 (427) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +570 -0
  3. package/dist/agent/bash.d.ts +52 -0
  4. package/dist/agent/bash.d.ts.map +1 -0
  5. package/dist/agent/bash.js +186 -0
  6. package/dist/agent/bash.js.map +1 -0
  7. package/dist/agent/bash.test.d.ts +2 -0
  8. package/dist/agent/bash.test.d.ts.map +1 -0
  9. package/dist/agent/bash.test.js +70 -0
  10. package/dist/agent/bash.test.js.map +1 -0
  11. package/dist/agent/llm-model.d.ts +5 -0
  12. package/dist/agent/llm-model.d.ts.map +1 -0
  13. package/dist/agent/llm-model.js +29 -0
  14. package/dist/agent/llm-model.js.map +1 -0
  15. package/dist/agent/llm-model.test.d.ts +2 -0
  16. package/dist/agent/llm-model.test.d.ts.map +1 -0
  17. package/dist/agent/llm-model.test.js +28 -0
  18. package/dist/agent/llm-model.test.js.map +1 -0
  19. package/dist/agent/prompt.d.ts +17 -0
  20. package/dist/agent/prompt.d.ts.map +1 -0
  21. package/dist/agent/prompt.js +97 -0
  22. package/dist/agent/prompt.js.map +1 -0
  23. package/dist/agent/prompt.test.d.ts +2 -0
  24. package/dist/agent/prompt.test.d.ts.map +1 -0
  25. package/dist/agent/prompt.test.js +124 -0
  26. package/dist/agent/prompt.test.js.map +1 -0
  27. package/dist/agent/provider-options.d.ts +8 -0
  28. package/dist/agent/provider-options.d.ts.map +1 -0
  29. package/dist/agent/provider-options.js +115 -0
  30. package/dist/agent/provider-options.js.map +1 -0
  31. package/dist/agent/provider-options.test.d.ts +2 -0
  32. package/dist/agent/provider-options.test.d.ts.map +1 -0
  33. package/dist/agent/provider-options.test.js +114 -0
  34. package/dist/agent/provider-options.test.js.map +1 -0
  35. package/dist/agent/runner.d.ts +27 -0
  36. package/dist/agent/runner.d.ts.map +1 -0
  37. package/dist/agent/runner.js +291 -0
  38. package/dist/agent/runner.js.map +1 -0
  39. package/dist/agent/verdict-retry-prompt.d.ts +3 -0
  40. package/dist/agent/verdict-retry-prompt.d.ts.map +1 -0
  41. package/dist/agent/verdict-retry-prompt.js +18 -0
  42. package/dist/agent/verdict-retry-prompt.js.map +1 -0
  43. package/dist/agent/verdict-retry-prompt.test.d.ts +2 -0
  44. package/dist/agent/verdict-retry-prompt.test.d.ts.map +1 -0
  45. package/dist/agent/verdict-retry-prompt.test.js +25 -0
  46. package/dist/agent/verdict-retry-prompt.test.js.map +1 -0
  47. package/dist/agent/verdict.d.ts +31 -0
  48. package/dist/agent/verdict.d.ts.map +1 -0
  49. package/dist/agent/verdict.js +123 -0
  50. package/dist/agent/verdict.js.map +1 -0
  51. package/dist/agent/verdict.test.d.ts +2 -0
  52. package/dist/agent/verdict.test.d.ts.map +1 -0
  53. package/dist/agent/verdict.test.js +156 -0
  54. package/dist/agent/verdict.test.js.map +1 -0
  55. package/dist/analyze/build-context.d.ts +58 -0
  56. package/dist/analyze/build-context.d.ts.map +1 -0
  57. package/dist/analyze/build-context.js +141 -0
  58. package/dist/analyze/build-context.js.map +1 -0
  59. package/dist/analyze/build-context.test.d.ts +2 -0
  60. package/dist/analyze/build-context.test.d.ts.map +1 -0
  61. package/dist/analyze/build-context.test.js +118 -0
  62. package/dist/analyze/build-context.test.js.map +1 -0
  63. package/dist/analyze/compare-runs.d.ts +49 -0
  64. package/dist/analyze/compare-runs.d.ts.map +1 -0
  65. package/dist/analyze/compare-runs.js +214 -0
  66. package/dist/analyze/compare-runs.js.map +1 -0
  67. package/dist/analyze/compare-runs.test.d.ts +2 -0
  68. package/dist/analyze/compare-runs.test.d.ts.map +1 -0
  69. package/dist/analyze/compare-runs.test.js +139 -0
  70. package/dist/analyze/compare-runs.test.js.map +1 -0
  71. package/dist/analyze/diff-hunks.d.ts +16 -0
  72. package/dist/analyze/diff-hunks.d.ts.map +1 -0
  73. package/dist/analyze/diff-hunks.js +287 -0
  74. package/dist/analyze/diff-hunks.js.map +1 -0
  75. package/dist/analyze/diff-hunks.test.d.ts +2 -0
  76. package/dist/analyze/diff-hunks.test.d.ts.map +1 -0
  77. package/dist/analyze/diff-hunks.test.js +54 -0
  78. package/dist/analyze/diff-hunks.test.js.map +1 -0
  79. package/dist/analyze/hunk-editor.d.ts +8 -0
  80. package/dist/analyze/hunk-editor.d.ts.map +1 -0
  81. package/dist/analyze/hunk-editor.js +129 -0
  82. package/dist/analyze/hunk-editor.js.map +1 -0
  83. package/dist/analyze/hunk-editor.test.d.ts +2 -0
  84. package/dist/analyze/hunk-editor.test.d.ts.map +1 -0
  85. package/dist/analyze/hunk-editor.test.js +48 -0
  86. package/dist/analyze/hunk-editor.test.js.map +1 -0
  87. package/dist/analyze/index.d.ts +23 -0
  88. package/dist/analyze/index.d.ts.map +1 -0
  89. package/dist/analyze/index.js +122 -0
  90. package/dist/analyze/index.js.map +1 -0
  91. package/dist/analyze/llm-fix.d.ts +11 -0
  92. package/dist/analyze/llm-fix.d.ts.map +1 -0
  93. package/dist/analyze/llm-fix.js +76 -0
  94. package/dist/analyze/llm-fix.js.map +1 -0
  95. package/dist/analyze/parse-proposal.d.ts +41 -0
  96. package/dist/analyze/parse-proposal.d.ts.map +1 -0
  97. package/dist/analyze/parse-proposal.js +53 -0
  98. package/dist/analyze/parse-proposal.js.map +1 -0
  99. package/dist/analyze/parse-proposal.test.d.ts +2 -0
  100. package/dist/analyze/parse-proposal.test.d.ts.map +1 -0
  101. package/dist/analyze/parse-proposal.test.js +40 -0
  102. package/dist/analyze/parse-proposal.test.js.map +1 -0
  103. package/dist/analyze/repl.d.ts +28 -0
  104. package/dist/analyze/repl.d.ts.map +1 -0
  105. package/dist/analyze/repl.js +284 -0
  106. package/dist/analyze/repl.js.map +1 -0
  107. package/dist/analyze/repl.test.d.ts +2 -0
  108. package/dist/analyze/repl.test.d.ts.map +1 -0
  109. package/dist/analyze/repl.test.js +101 -0
  110. package/dist/analyze/repl.test.js.map +1 -0
  111. package/dist/analyze/suggest.d.ts +5 -0
  112. package/dist/analyze/suggest.d.ts.map +1 -0
  113. package/dist/analyze/suggest.js +75 -0
  114. package/dist/analyze/suggest.js.map +1 -0
  115. package/dist/analyze/suggest.test.d.ts +2 -0
  116. package/dist/analyze/suggest.test.d.ts.map +1 -0
  117. package/dist/analyze/suggest.test.js +53 -0
  118. package/dist/analyze/suggest.test.js.map +1 -0
  119. package/dist/analyze/validate-markdown.d.ts +3 -0
  120. package/dist/analyze/validate-markdown.d.ts.map +1 -0
  121. package/dist/analyze/validate-markdown.js +25 -0
  122. package/dist/analyze/validate-markdown.js.map +1 -0
  123. package/dist/artifacts/policy.d.ts +9 -0
  124. package/dist/artifacts/policy.d.ts.map +1 -0
  125. package/dist/artifacts/policy.js +46 -0
  126. package/dist/artifacts/policy.js.map +1 -0
  127. package/dist/artifacts/policy.test.d.ts +2 -0
  128. package/dist/artifacts/policy.test.d.ts.map +1 -0
  129. package/dist/artifacts/policy.test.js +73 -0
  130. package/dist/artifacts/policy.test.js.map +1 -0
  131. package/dist/auth/resolve.d.ts +22 -0
  132. package/dist/auth/resolve.d.ts.map +1 -0
  133. package/dist/auth/resolve.js +148 -0
  134. package/dist/auth/resolve.js.map +1 -0
  135. package/dist/auth/store.d.ts +23 -0
  136. package/dist/auth/store.d.ts.map +1 -0
  137. package/dist/auth/store.js +103 -0
  138. package/dist/auth/store.js.map +1 -0
  139. package/dist/cache/generate.d.ts +8 -0
  140. package/dist/cache/generate.d.ts.map +1 -0
  141. package/dist/cache/generate.js +61 -0
  142. package/dist/cache/generate.js.map +1 -0
  143. package/dist/cache/hash.d.ts +5 -0
  144. package/dist/cache/hash.d.ts.map +1 -0
  145. package/dist/cache/hash.js +21 -0
  146. package/dist/cache/hash.js.map +1 -0
  147. package/dist/cache/hash.test.d.ts +2 -0
  148. package/dist/cache/hash.test.d.ts.map +1 -0
  149. package/dist/cache/hash.test.js +42 -0
  150. package/dist/cache/hash.test.js.map +1 -0
  151. package/dist/cache/resolve.d.ts +5 -0
  152. package/dist/cache/resolve.d.ts.map +1 -0
  153. package/dist/cache/resolve.js +8 -0
  154. package/dist/cache/resolve.js.map +1 -0
  155. package/dist/cache/store.d.ts +20 -0
  156. package/dist/cache/store.d.ts.map +1 -0
  157. package/dist/cache/store.js +90 -0
  158. package/dist/cache/store.js.map +1 -0
  159. package/dist/cache/store.test.d.ts +2 -0
  160. package/dist/cache/store.test.d.ts.map +1 -0
  161. package/dist/cache/store.test.js +101 -0
  162. package/dist/cache/store.test.js.map +1 -0
  163. package/dist/cli/analyze.d.ts +21 -0
  164. package/dist/cli/analyze.d.ts.map +1 -0
  165. package/dist/cli/analyze.js +148 -0
  166. package/dist/cli/analyze.js.map +1 -0
  167. package/dist/cli/concurrency.d.ts +17 -0
  168. package/dist/cli/concurrency.d.ts.map +1 -0
  169. package/dist/cli/concurrency.js +56 -0
  170. package/dist/cli/concurrency.js.map +1 -0
  171. package/dist/cli/concurrency.test.d.ts +2 -0
  172. package/dist/cli/concurrency.test.d.ts.map +1 -0
  173. package/dist/cli/concurrency.test.js +74 -0
  174. package/dist/cli/concurrency.test.js.map +1 -0
  175. package/dist/cli/config.d.ts +2 -0
  176. package/dist/cli/config.d.ts.map +1 -0
  177. package/dist/cli/config.js +14 -0
  178. package/dist/cli/config.js.map +1 -0
  179. package/dist/cli/help.d.ts +23 -0
  180. package/dist/cli/help.d.ts.map +1 -0
  181. package/dist/cli/help.js +458 -0
  182. package/dist/cli/help.js.map +1 -0
  183. package/dist/cli/help.test.d.ts +2 -0
  184. package/dist/cli/help.test.d.ts.map +1 -0
  185. package/dist/cli/help.test.js +41 -0
  186. package/dist/cli/help.test.js.map +1 -0
  187. package/dist/cli/index.d.ts +3 -0
  188. package/dist/cli/index.d.ts.map +1 -0
  189. package/dist/cli/index.js +300 -0
  190. package/dist/cli/index.js.map +1 -0
  191. package/dist/cli/mcp.d.ts +6 -0
  192. package/dist/cli/mcp.d.ts.map +1 -0
  193. package/dist/cli/mcp.js +17 -0
  194. package/dist/cli/mcp.js.map +1 -0
  195. package/dist/cli/record.d.ts +27 -0
  196. package/dist/cli/record.d.ts.map +1 -0
  197. package/dist/cli/record.js +244 -0
  198. package/dist/cli/record.js.map +1 -0
  199. package/dist/cli/run.d.ts +11 -0
  200. package/dist/cli/run.d.ts.map +1 -0
  201. package/dist/cli/run.js +676 -0
  202. package/dist/cli/run.js.map +1 -0
  203. package/dist/cli/subprocess.d.ts +19 -0
  204. package/dist/cli/subprocess.d.ts.map +1 -0
  205. package/dist/cli/subprocess.js +142 -0
  206. package/dist/cli/subprocess.js.map +1 -0
  207. package/dist/cli/subprocess.test.d.ts +2 -0
  208. package/dist/cli/subprocess.test.d.ts.map +1 -0
  209. package/dist/cli/subprocess.test.js +76 -0
  210. package/dist/cli/subprocess.test.js.map +1 -0
  211. package/dist/cli/tags.d.ts +5 -0
  212. package/dist/cli/tags.d.ts.map +1 -0
  213. package/dist/cli/tags.js +33 -0
  214. package/dist/cli/tags.js.map +1 -0
  215. package/dist/cli/tags.test.d.ts +2 -0
  216. package/dist/cli/tags.test.d.ts.map +1 -0
  217. package/dist/cli/tags.test.js +31 -0
  218. package/dist/cli/tags.test.js.map +1 -0
  219. package/dist/config/env-vars.d.ts +2 -0
  220. package/dist/config/env-vars.d.ts.map +1 -0
  221. package/dist/config/env-vars.js +14 -0
  222. package/dist/config/env-vars.js.map +1 -0
  223. package/dist/config/env.d.ts +2 -0
  224. package/dist/config/env.d.ts.map +1 -0
  225. package/dist/config/env.js +9 -0
  226. package/dist/config/env.js.map +1 -0
  227. package/dist/config/lightpanda.d.ts +6 -0
  228. package/dist/config/lightpanda.d.ts.map +1 -0
  229. package/dist/config/lightpanda.js +38 -0
  230. package/dist/config/lightpanda.js.map +1 -0
  231. package/dist/config/lightpanda.test.d.ts +2 -0
  232. package/dist/config/lightpanda.test.d.ts.map +1 -0
  233. package/dist/config/lightpanda.test.js +46 -0
  234. package/dist/config/lightpanda.test.js.map +1 -0
  235. package/dist/config/load.d.ts +22 -0
  236. package/dist/config/load.d.ts.map +1 -0
  237. package/dist/config/load.js +242 -0
  238. package/dist/config/load.js.map +1 -0
  239. package/dist/config/load.test.d.ts +2 -0
  240. package/dist/config/load.test.d.ts.map +1 -0
  241. package/dist/config/load.test.js +86 -0
  242. package/dist/config/load.test.js.map +1 -0
  243. package/dist/config/set.d.ts +8 -0
  244. package/dist/config/set.d.ts.map +1 -0
  245. package/dist/config/set.js +93 -0
  246. package/dist/config/set.js.map +1 -0
  247. package/dist/config/set.test.d.ts +2 -0
  248. package/dist/config/set.test.d.ts.map +1 -0
  249. package/dist/config/set.test.js +98 -0
  250. package/dist/config/set.test.js.map +1 -0
  251. package/dist/healing/classify.d.ts +15 -0
  252. package/dist/healing/classify.d.ts.map +1 -0
  253. package/dist/healing/classify.js +209 -0
  254. package/dist/healing/classify.js.map +1 -0
  255. package/dist/healing/classify.test.d.ts +2 -0
  256. package/dist/healing/classify.test.d.ts.map +1 -0
  257. package/dist/healing/classify.test.js +167 -0
  258. package/dist/healing/classify.test.js.map +1 -0
  259. package/dist/healing/recovery-prompt.d.ts +3 -0
  260. package/dist/healing/recovery-prompt.d.ts.map +1 -0
  261. package/dist/healing/recovery-prompt.js +22 -0
  262. package/dist/healing/recovery-prompt.js.map +1 -0
  263. package/dist/mcp/inline-scenario.d.ts +13 -0
  264. package/dist/mcp/inline-scenario.d.ts.map +1 -0
  265. package/dist/mcp/inline-scenario.js +23 -0
  266. package/dist/mcp/inline-scenario.js.map +1 -0
  267. package/dist/mcp/server.d.ts +4 -0
  268. package/dist/mcp/server.d.ts.map +1 -0
  269. package/dist/mcp/server.js +186 -0
  270. package/dist/mcp/server.js.map +1 -0
  271. package/dist/mcp/skill.d.ts +5 -0
  272. package/dist/mcp/skill.d.ts.map +1 -0
  273. package/dist/mcp/skill.js +38 -0
  274. package/dist/mcp/skill.js.map +1 -0
  275. package/dist/mcp/skill.test.d.ts +2 -0
  276. package/dist/mcp/skill.test.d.ts.map +1 -0
  277. package/dist/mcp/skill.test.js +18 -0
  278. package/dist/mcp/skill.test.js.map +1 -0
  279. package/dist/paths.d.ts +12 -0
  280. package/dist/paths.d.ts.map +1 -0
  281. package/dist/paths.js +61 -0
  282. package/dist/paths.js.map +1 -0
  283. package/dist/prompt/load.d.ts +4 -0
  284. package/dist/prompt/load.d.ts.map +1 -0
  285. package/dist/prompt/load.js +19 -0
  286. package/dist/prompt/load.js.map +1 -0
  287. package/dist/recorder/bridge-process.d.ts +14 -0
  288. package/dist/recorder/bridge-process.d.ts.map +1 -0
  289. package/dist/recorder/bridge-process.js +133 -0
  290. package/dist/recorder/bridge-process.js.map +1 -0
  291. package/dist/recorder/bridge-process.test.d.ts +2 -0
  292. package/dist/recorder/bridge-process.test.d.ts.map +1 -0
  293. package/dist/recorder/bridge-process.test.js +36 -0
  294. package/dist/recorder/bridge-process.test.js.map +1 -0
  295. package/dist/recorder/bridge-worker.d.ts +2 -0
  296. package/dist/recorder/bridge-worker.d.ts.map +1 -0
  297. package/dist/recorder/bridge-worker.js +76 -0
  298. package/dist/recorder/bridge-worker.js.map +1 -0
  299. package/dist/recorder/bridge.d.ts +12 -0
  300. package/dist/recorder/bridge.d.ts.map +1 -0
  301. package/dist/recorder/bridge.js +61 -0
  302. package/dist/recorder/bridge.js.map +1 -0
  303. package/dist/recorder/bridge.test.d.ts +2 -0
  304. package/dist/recorder/bridge.test.d.ts.map +1 -0
  305. package/dist/recorder/bridge.test.js +21 -0
  306. package/dist/recorder/bridge.test.js.map +1 -0
  307. package/dist/recorder/enrich-event.d.ts +31 -0
  308. package/dist/recorder/enrich-event.d.ts.map +1 -0
  309. package/dist/recorder/enrich-event.js +91 -0
  310. package/dist/recorder/enrich-event.js.map +1 -0
  311. package/dist/recorder/events.d.ts +11 -0
  312. package/dist/recorder/events.d.ts.map +1 -0
  313. package/dist/recorder/events.js +42 -0
  314. package/dist/recorder/events.js.map +1 -0
  315. package/dist/recorder/events.test.d.ts +2 -0
  316. package/dist/recorder/events.test.d.ts.map +1 -0
  317. package/dist/recorder/events.test.js +40 -0
  318. package/dist/recorder/events.test.js.map +1 -0
  319. package/dist/recorder/generate-scenario.d.ts +16 -0
  320. package/dist/recorder/generate-scenario.d.ts.map +1 -0
  321. package/dist/recorder/generate-scenario.js +78 -0
  322. package/dist/recorder/generate-scenario.js.map +1 -0
  323. package/dist/recorder/in-page-helpers.d.ts +6 -0
  324. package/dist/recorder/in-page-helpers.d.ts.map +1 -0
  325. package/dist/recorder/in-page-helpers.js +238 -0
  326. package/dist/recorder/in-page-helpers.js.map +1 -0
  327. package/dist/recorder/in-page-helpers.test.d.ts +2 -0
  328. package/dist/recorder/in-page-helpers.test.d.ts.map +1 -0
  329. package/dist/recorder/in-page-helpers.test.js +186 -0
  330. package/dist/recorder/in-page-helpers.test.js.map +1 -0
  331. package/dist/recorder/page-script.d.ts +7 -0
  332. package/dist/recorder/page-script.d.ts.map +1 -0
  333. package/dist/recorder/page-script.js +132 -0
  334. package/dist/recorder/page-script.js.map +1 -0
  335. package/dist/recorder/redact.d.ts +8 -0
  336. package/dist/recorder/redact.d.ts.map +1 -0
  337. package/dist/recorder/redact.js +26 -0
  338. package/dist/recorder/redact.js.map +1 -0
  339. package/dist/recorder/redact.test.d.ts +2 -0
  340. package/dist/recorder/redact.test.d.ts.map +1 -0
  341. package/dist/recorder/redact.test.js +27 -0
  342. package/dist/recorder/redact.test.js.map +1 -0
  343. package/dist/recorder/session.d.ts +8 -0
  344. package/dist/recorder/session.d.ts.map +1 -0
  345. package/dist/recorder/session.js +28 -0
  346. package/dist/recorder/session.js.map +1 -0
  347. package/dist/recorder/snapshot-match.d.ts +22 -0
  348. package/dist/recorder/snapshot-match.d.ts.map +1 -0
  349. package/dist/recorder/snapshot-match.js +102 -0
  350. package/dist/recorder/snapshot-match.js.map +1 -0
  351. package/dist/recorder/snapshot-match.test.d.ts +2 -0
  352. package/dist/recorder/snapshot-match.test.d.ts.map +1 -0
  353. package/dist/recorder/snapshot-match.test.js +34 -0
  354. package/dist/recorder/snapshot-match.test.js.map +1 -0
  355. package/dist/redact/env-secrets.d.ts +14 -0
  356. package/dist/redact/env-secrets.d.ts.map +1 -0
  357. package/dist/redact/env-secrets.js +86 -0
  358. package/dist/redact/env-secrets.js.map +1 -0
  359. package/dist/redact/env-secrets.test.d.ts +2 -0
  360. package/dist/redact/env-secrets.test.d.ts.map +1 -0
  361. package/dist/redact/env-secrets.test.js +103 -0
  362. package/dist/redact/env-secrets.test.js.map +1 -0
  363. package/dist/reporter/export.d.ts +14 -0
  364. package/dist/reporter/export.d.ts.map +1 -0
  365. package/dist/reporter/export.js +53 -0
  366. package/dist/reporter/export.js.map +1 -0
  367. package/dist/reporter/export.test.d.ts +2 -0
  368. package/dist/reporter/export.test.d.ts.map +1 -0
  369. package/dist/reporter/export.test.js +100 -0
  370. package/dist/reporter/export.test.js.map +1 -0
  371. package/dist/reporter/index.d.ts +11 -0
  372. package/dist/reporter/index.d.ts.map +1 -0
  373. package/dist/reporter/index.js +161 -0
  374. package/dist/reporter/index.js.map +1 -0
  375. package/dist/reporter/index.test.d.ts +2 -0
  376. package/dist/reporter/index.test.d.ts.map +1 -0
  377. package/dist/reporter/index.test.js +61 -0
  378. package/dist/reporter/index.test.js.map +1 -0
  379. package/dist/scenarios/globs.d.ts +15 -0
  380. package/dist/scenarios/globs.d.ts.map +1 -0
  381. package/dist/scenarios/globs.js +48 -0
  382. package/dist/scenarios/globs.js.map +1 -0
  383. package/dist/scenarios/globs.test.d.ts +2 -0
  384. package/dist/scenarios/globs.test.d.ts.map +1 -0
  385. package/dist/scenarios/globs.test.js +53 -0
  386. package/dist/scenarios/globs.test.js.map +1 -0
  387. package/dist/scenarios/parser.d.ts +15 -0
  388. package/dist/scenarios/parser.d.ts.map +1 -0
  389. package/dist/scenarios/parser.js +278 -0
  390. package/dist/scenarios/parser.js.map +1 -0
  391. package/dist/scenarios/parser.test.d.ts +2 -0
  392. package/dist/scenarios/parser.test.d.ts.map +1 -0
  393. package/dist/scenarios/parser.test.js +373 -0
  394. package/dist/scenarios/parser.test.js.map +1 -0
  395. package/dist/skills/loader.d.ts +10 -0
  396. package/dist/skills/loader.d.ts.map +1 -0
  397. package/dist/skills/loader.js +98 -0
  398. package/dist/skills/loader.js.map +1 -0
  399. package/dist/types/config.d.ts +131 -0
  400. package/dist/types/config.d.ts.map +1 -0
  401. package/dist/types/config.js +2 -0
  402. package/dist/types/config.js.map +1 -0
  403. package/dist/types/recorder.d.ts +71 -0
  404. package/dist/types/recorder.d.ts.map +1 -0
  405. package/dist/types/recorder.js +2 -0
  406. package/dist/types/recorder.js.map +1 -0
  407. package/dist/types/scenario.d.ts +41 -0
  408. package/dist/types/scenario.d.ts.map +1 -0
  409. package/dist/types/scenario.js +2 -0
  410. package/dist/types/scenario.js.map +1 -0
  411. package/dist/types/skill.d.ts +20 -0
  412. package/dist/types/skill.d.ts.map +1 -0
  413. package/dist/types/skill.js +13 -0
  414. package/dist/types/skill.js.map +1 -0
  415. package/dist/types/verdict.d.ts +82 -0
  416. package/dist/types/verdict.d.ts.map +1 -0
  417. package/dist/types/verdict.js +13 -0
  418. package/dist/types/verdict.js.map +1 -0
  419. package/package.json +75 -0
  420. package/pqa.config.ts +82 -0
  421. package/prompt/ANALYZE-FLAKY.md +62 -0
  422. package/prompt/ANALYZE.md +110 -0
  423. package/prompt/CACHE-HINTS.md +49 -0
  424. package/prompt/RECORD.md +114 -0
  425. package/prompt/SYSTEM.md +118 -0
  426. package/skills/agent-browser/SKILL.md +2438 -0
  427. package/skills/create-pqa-scenario/SKILL.md +273 -0
@@ -0,0 +1,273 @@
1
+ ---
2
+ name: prose-qa
3
+ description: >-
4
+ Author Prose-QA E2E scenario markdown (YAML frontmatter, Goal, Steps, Then).
5
+ Use when creating or editing scenarios under Prose-QA/scenarios, writing
6
+ checkpoints, auth flows, partials, or when the user mentions Prose-QA, pqa,
7
+ or browser regression scenarios.
8
+ ---
9
+
10
+ # Prose-QA scenario authoring
11
+
12
+ Prose-QA runs natural-language browser scenarios from markdown files in the **Prose-QA** repo (`scenarios/`). The harness parses frontmatter and three sections; an agent executes Steps with `agent-browser` and verifies **Then** checkpoints.
13
+
14
+ Canonical reference: `prompt/references/scenario-format.md`.
15
+
16
+ ## File template
17
+
18
+ Use this skeleton for every new scenario:
19
+
20
+ ```markdown
21
+ ---
22
+ name: scenario-name
23
+ tags: [...]
24
+ url: https://app.example.com/projects
25
+ ---
26
+
27
+ # Goal
28
+
29
+ One short paragraph: who is acting, what they want, and what success means.
30
+
31
+ # Steps
32
+
33
+ 1. First observable action (use snapshot refs from agent-browser when UI is complex).
34
+ 2. Second action.
35
+ 3. Submit or navigate as needed.
36
+
37
+ # Then
38
+
39
+ - url contains "/dashboard"
40
+ - page shows "Welcome back"
41
+ ```
42
+
43
+ ## Frontmatter
44
+
45
+ | Field | Required | Notes |
46
+ | --------- | -------- | ------------------------------------------------------------------------- |
47
+ | `name` | yes | Stable ID; must match `pqa.config.ts` auth `scenario` when used for login |
48
+ | `tags` | no | Filter runs: `pqa run scenarios/**/*.md --tags smoke` |
49
+ | `url` | no | Harness opens this before Steps; prefer for consumer scenarios |
50
+ | `auth` | no | Profile key (e.g. `admin`) — uses cached state from auth scenario |
51
+ | `skills` | no | Extra Agent Skill names merged into the prompt |
52
+ | `partial` | no | `true` = include-only fragment; never run in batch |
53
+
54
+ **Auth defaults (from scenario-format reference)**
55
+
56
+ - Protected pages: `auth: admin` (configured in `pqa.config.ts` → `login-admin`).
57
+ - Auth scenario: `scenarios/auth/login-admin.md` — credentials only via `$PQA_TEST_EMAIL` / `$PQA_TEST_PASSWORD`, never in the file.
58
+ - Tag scenarios for filtering (e.g. `smoke`, `checkout`, `auth`).
59
+
60
+ ## Sections (parser rules)
61
+
62
+ Section headers must be exactly these H1 titles (case-insensitive): `# Goal`, `# Steps`, `# Then`.
63
+
64
+ ### Goal
65
+
66
+ - One paragraph of user intent and context.
67
+ - Do not duplicate step-by-step instructions here.
68
+
69
+ ### Steps
70
+
71
+ - Numbered list (`1.`, `2.`, …) or clear short paragraphs.
72
+ - Each step = one agent-executable action (navigate, fill, click, wait).
73
+ - Reference env vars as `$PQA_TEST_EMAIL` in auth flows only.
74
+ - For tabular test data, use a fenced block or bullet list (see example below).
75
+ - Prefer visible labels and roles (“click **Save**”) over brittle CSS selectors.
76
+ - Keep steps atomic — one UI interaction per step; do not bundle multiple clicks in one instruction.
77
+ - After navigation or submit, instruct the agent to re-snapshot when the DOM changes (aligns with Observe-Act-Verify in `prompt/SYSTEM.md`).
78
+
79
+ ### Then (critical)
80
+
81
+ **Every checkpoint must be its own bullet line starting with `-`.** The parser only collects lines that begin with `-`. Prose without a leading dash is ignored and will not be verified reliably.
82
+
83
+ Prefer machine-friendly patterns (parsed and documented in `prompt/SYSTEM.md`):
84
+
85
+ | Pattern | Example |
86
+ | ------------- | ---------------------------- |
87
+ | URL substring | `- url contains "/projects"` |
88
+ | Visible text | `- page shows "Thank you"` |
89
+ | Field value | `- cart count equals "3"` |
90
+
91
+ Semantic checks are allowed when structured patterns do not fit:
92
+
93
+ ```markdown
94
+ # Then
95
+
96
+ - url does not contain "/login"
97
+ - page shows validation errors for required fields
98
+ ```
99
+
100
+ Keep each bullet **assertive and observable** (what the agent can confirm via `agent-browser get url` or `agent-browser snapshot`).
101
+
102
+ ## Reusable fragments (partials)
103
+
104
+ Extract repeated flows into `scenarios/partials/*.md` (or link to `partial.md` as in the format reference):
105
+
106
+ ```markdown
107
+ ---
108
+ name: partial-block
109
+ partial: true
110
+ skills: [core]
111
+ ---
112
+
113
+ Fill the client field with **Acme Corp**.
114
+ ```
115
+
116
+ Include in a parent scenario body (any section):
117
+
118
+ ```markdown
119
+ 2. [client step](./partial.md)
120
+ 3. Click **Save**.
121
+ ```
122
+
123
+ - Set `partial: true` on fragments.
124
+ - Skills on partials are merged into the parent run automatically.
125
+ - Avoid circular links between `.md` files.
126
+
127
+ ## Comments and disabled fields
128
+
129
+ - **Frontmatter**: `#` starts a YAML comment (line removed by parser). Use to temporarily disable `auth:` without deleting the key.
130
+ - **Body**: `<!-- note -->` HTML comments are stripped. Do not put required steps inside HTML comments.
131
+ - **Body**: lines starting with `#` that are not section headers are kept (e.g. step notes).
132
+
133
+ ## Auth scenarios vs consumers
134
+
135
+ | Type | `tags` | `auth` | Run in batch |
136
+ | -------------------------------- | ------------------- | ------- | ------------------------- |
137
+ | Auth (`login-admin`) | `[auth]` | omit | No — on demand via config |
138
+ | Consumer (`checkout-happy-path`) | `[smoke, checkout]` | `admin` | Yes |
139
+
140
+ Auth Steps must end on an authenticated app URL; never instruct `agent-browser close` or `state save` in auth scenarios.
141
+
142
+ ## Complete consumer example
143
+
144
+ From the Prose-QA README and scenario-format reference:
145
+
146
+ ```markdown
147
+ ---
148
+ name: checkout-happy-path
149
+ tags: [smoke]
150
+ auth: admin
151
+ url: https://app.example.com
152
+ ---
153
+
154
+ # Goal
155
+
156
+ As a user, complete checkout.
157
+
158
+ # Steps
159
+
160
+ 1. Add item to cart and proceed to checkout.
161
+ 2. Complete payment with test card.
162
+
163
+ # Then
164
+
165
+ - url contains "/order-confirmation"
166
+ - page shows "Thank you"
167
+ ```
168
+
169
+ ## Authenticated smoke example
170
+
171
+ From `scenarios/1_example-authenticated.md`:
172
+
173
+ ```markdown
174
+ ---
175
+ name: example-authenticated
176
+ tags: [smoke, example]
177
+ auth: admin
178
+ url: https://app.example.com/projects
179
+ ---
180
+
181
+ # Goal
182
+
183
+ Verify that an authenticated user can load a protected page.
184
+
185
+ # Steps
186
+
187
+ 1. Confirm the projects page has loaded.
188
+
189
+ # Then
190
+
191
+ - url contains "/projects"
192
+ ```
193
+
194
+ ## Auth scenario example
195
+
196
+ From `scenarios/auth/login-admin.md` and the format reference:
197
+
198
+ ```markdown
199
+ ---
200
+ name: login-admin
201
+ tags: [auth]
202
+ url: https://app.example.com/login
203
+ ---
204
+
205
+ # Goal
206
+
207
+ Authenticate as an admin test user. This scenario is not run in batch — it runs on demand when a consumer scenario needs `auth: admin`.
208
+
209
+ # Steps
210
+
211
+ 1. Open the login page.
212
+ 2. Sign in using `$PQA_TEST_EMAIL` and `$PQA_TEST_PASSWORD` from the environment.
213
+ 3. Confirm you reach an authenticated area (dashboard or home).
214
+
215
+ # Then
216
+
217
+ - url does not contain "/login"
218
+ ```
219
+
220
+ ## Authoring checklist
221
+
222
+ Before saving a scenario file:
223
+
224
+ - [ ] `name` is unique kebab-case
225
+ - [ ] All three sections present: `# Goal`, `# Steps`, `# Then`
226
+ - [ ] Every **Then** line starts with `-`
227
+ - [ ] Checkpoints are verifiable (URL, visible text, or explicit semantic claim)
228
+ - [ ] `url` or Steps include how to reach the starting page
229
+ - [ ] `auth: admin` only when the page requires a saved session; credentials not in repo
230
+ - [ ] `tags` set for how you plan to filter runs (`smoke`, `checkout`, etc.)
231
+ - [ ] No secrets in the file (passwords, API keys)
232
+
233
+ ## Record a scenario (Prose-QA recorder)
234
+
235
+ From the Prose-QA repo, capture browser actions and generate a draft markdown file:
236
+
237
+ ```bash
238
+ pqa record start --url http://localhost:3000/your-page
239
+ pqa record note "optional context for the LLM"
240
+ pqa record checkpoint 'page shows "Expected title"'
241
+ pqa record stop --name my-flow
242
+ pqa debug scenarios/recorded/my-flow.md --verbose --headed
243
+ ```
244
+
245
+ Edit the generated file before committing (condense steps, add `auth:`, table data, partials). Recorded scenarios default-tag `recorded` (configurable via `recorder.defaultTags` in `pqa.config`).
246
+
247
+ Chrome extension for a daily browser profile: `recorder-extension/` in the Prose-QA repo (see its README).
248
+
249
+ ## Validate locally
250
+
251
+ From the Prose-QA repo (start `npm run demo:server` first — bundled examples use http://127.0.0.1:8080/):
252
+
253
+ ```bash
254
+ npm run dev -- debug scenarios/0_hello-world.md --verbose
255
+ # or
256
+ npm run dev -- run scenarios/**/*.md --tags example
257
+ ```
258
+
259
+ Parser errors (`missing 'name'`, `Circular scenario include`) mean fix frontmatter or links before debugging the UI.
260
+
261
+ ## Common mistakes
262
+
263
+ | Mistake | Fix |
264
+ | ------------------------------------ | ---------------------------------------------------------- |
265
+ | Then lines without `-` | Prefix every checkpoint with `- ` |
266
+ | Duplicate step numbers (1, 4, 5) | Renumber Steps sequentially |
267
+ | Vague Then (“the form should work”) | Split into `page shows "…"` / `url contains "…"` bullets |
268
+ | Consumer with login Steps | Use `auth: admin` and rely on the configured auth scenario |
269
+ | `name` mismatch with `pqa.config.ts` | Align `auth.admin.scenario` with auth file `name` |
270
+
271
+ ## When unsure
272
+
273
+ Read bundled examples in `scenarios/` (`0_hello-world.md`, `1_example-authenticated.md`, `auth/login-admin.md`) and mirror their structure. For browser mechanics, the run uses the `agent-browser` skill from Prose-QA — scenarios should not re-document CLI flags.