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.
- package/LICENSE +21 -0
- package/README.md +570 -0
- package/dist/agent/bash.d.ts +52 -0
- package/dist/agent/bash.d.ts.map +1 -0
- package/dist/agent/bash.js +186 -0
- package/dist/agent/bash.js.map +1 -0
- package/dist/agent/bash.test.d.ts +2 -0
- package/dist/agent/bash.test.d.ts.map +1 -0
- package/dist/agent/bash.test.js +70 -0
- package/dist/agent/bash.test.js.map +1 -0
- package/dist/agent/llm-model.d.ts +5 -0
- package/dist/agent/llm-model.d.ts.map +1 -0
- package/dist/agent/llm-model.js +29 -0
- package/dist/agent/llm-model.js.map +1 -0
- package/dist/agent/llm-model.test.d.ts +2 -0
- package/dist/agent/llm-model.test.d.ts.map +1 -0
- package/dist/agent/llm-model.test.js +28 -0
- package/dist/agent/llm-model.test.js.map +1 -0
- package/dist/agent/prompt.d.ts +17 -0
- package/dist/agent/prompt.d.ts.map +1 -0
- package/dist/agent/prompt.js +97 -0
- package/dist/agent/prompt.js.map +1 -0
- package/dist/agent/prompt.test.d.ts +2 -0
- package/dist/agent/prompt.test.d.ts.map +1 -0
- package/dist/agent/prompt.test.js +124 -0
- package/dist/agent/prompt.test.js.map +1 -0
- package/dist/agent/provider-options.d.ts +8 -0
- package/dist/agent/provider-options.d.ts.map +1 -0
- package/dist/agent/provider-options.js +115 -0
- package/dist/agent/provider-options.js.map +1 -0
- package/dist/agent/provider-options.test.d.ts +2 -0
- package/dist/agent/provider-options.test.d.ts.map +1 -0
- package/dist/agent/provider-options.test.js +114 -0
- package/dist/agent/provider-options.test.js.map +1 -0
- package/dist/agent/runner.d.ts +27 -0
- package/dist/agent/runner.d.ts.map +1 -0
- package/dist/agent/runner.js +291 -0
- package/dist/agent/runner.js.map +1 -0
- package/dist/agent/verdict-retry-prompt.d.ts +3 -0
- package/dist/agent/verdict-retry-prompt.d.ts.map +1 -0
- package/dist/agent/verdict-retry-prompt.js +18 -0
- package/dist/agent/verdict-retry-prompt.js.map +1 -0
- package/dist/agent/verdict-retry-prompt.test.d.ts +2 -0
- package/dist/agent/verdict-retry-prompt.test.d.ts.map +1 -0
- package/dist/agent/verdict-retry-prompt.test.js +25 -0
- package/dist/agent/verdict-retry-prompt.test.js.map +1 -0
- package/dist/agent/verdict.d.ts +31 -0
- package/dist/agent/verdict.d.ts.map +1 -0
- package/dist/agent/verdict.js +123 -0
- package/dist/agent/verdict.js.map +1 -0
- package/dist/agent/verdict.test.d.ts +2 -0
- package/dist/agent/verdict.test.d.ts.map +1 -0
- package/dist/agent/verdict.test.js +156 -0
- package/dist/agent/verdict.test.js.map +1 -0
- package/dist/analyze/build-context.d.ts +58 -0
- package/dist/analyze/build-context.d.ts.map +1 -0
- package/dist/analyze/build-context.js +141 -0
- package/dist/analyze/build-context.js.map +1 -0
- package/dist/analyze/build-context.test.d.ts +2 -0
- package/dist/analyze/build-context.test.d.ts.map +1 -0
- package/dist/analyze/build-context.test.js +118 -0
- package/dist/analyze/build-context.test.js.map +1 -0
- package/dist/analyze/compare-runs.d.ts +49 -0
- package/dist/analyze/compare-runs.d.ts.map +1 -0
- package/dist/analyze/compare-runs.js +214 -0
- package/dist/analyze/compare-runs.js.map +1 -0
- package/dist/analyze/compare-runs.test.d.ts +2 -0
- package/dist/analyze/compare-runs.test.d.ts.map +1 -0
- package/dist/analyze/compare-runs.test.js +139 -0
- package/dist/analyze/compare-runs.test.js.map +1 -0
- package/dist/analyze/diff-hunks.d.ts +16 -0
- package/dist/analyze/diff-hunks.d.ts.map +1 -0
- package/dist/analyze/diff-hunks.js +287 -0
- package/dist/analyze/diff-hunks.js.map +1 -0
- package/dist/analyze/diff-hunks.test.d.ts +2 -0
- package/dist/analyze/diff-hunks.test.d.ts.map +1 -0
- package/dist/analyze/diff-hunks.test.js +54 -0
- package/dist/analyze/diff-hunks.test.js.map +1 -0
- package/dist/analyze/hunk-editor.d.ts +8 -0
- package/dist/analyze/hunk-editor.d.ts.map +1 -0
- package/dist/analyze/hunk-editor.js +129 -0
- package/dist/analyze/hunk-editor.js.map +1 -0
- package/dist/analyze/hunk-editor.test.d.ts +2 -0
- package/dist/analyze/hunk-editor.test.d.ts.map +1 -0
- package/dist/analyze/hunk-editor.test.js +48 -0
- package/dist/analyze/hunk-editor.test.js.map +1 -0
- package/dist/analyze/index.d.ts +23 -0
- package/dist/analyze/index.d.ts.map +1 -0
- package/dist/analyze/index.js +122 -0
- package/dist/analyze/index.js.map +1 -0
- package/dist/analyze/llm-fix.d.ts +11 -0
- package/dist/analyze/llm-fix.d.ts.map +1 -0
- package/dist/analyze/llm-fix.js +76 -0
- package/dist/analyze/llm-fix.js.map +1 -0
- package/dist/analyze/parse-proposal.d.ts +41 -0
- package/dist/analyze/parse-proposal.d.ts.map +1 -0
- package/dist/analyze/parse-proposal.js +53 -0
- package/dist/analyze/parse-proposal.js.map +1 -0
- package/dist/analyze/parse-proposal.test.d.ts +2 -0
- package/dist/analyze/parse-proposal.test.d.ts.map +1 -0
- package/dist/analyze/parse-proposal.test.js +40 -0
- package/dist/analyze/parse-proposal.test.js.map +1 -0
- package/dist/analyze/repl.d.ts +28 -0
- package/dist/analyze/repl.d.ts.map +1 -0
- package/dist/analyze/repl.js +284 -0
- package/dist/analyze/repl.js.map +1 -0
- package/dist/analyze/repl.test.d.ts +2 -0
- package/dist/analyze/repl.test.d.ts.map +1 -0
- package/dist/analyze/repl.test.js +101 -0
- package/dist/analyze/repl.test.js.map +1 -0
- package/dist/analyze/suggest.d.ts +5 -0
- package/dist/analyze/suggest.d.ts.map +1 -0
- package/dist/analyze/suggest.js +75 -0
- package/dist/analyze/suggest.js.map +1 -0
- package/dist/analyze/suggest.test.d.ts +2 -0
- package/dist/analyze/suggest.test.d.ts.map +1 -0
- package/dist/analyze/suggest.test.js +53 -0
- package/dist/analyze/suggest.test.js.map +1 -0
- package/dist/analyze/validate-markdown.d.ts +3 -0
- package/dist/analyze/validate-markdown.d.ts.map +1 -0
- package/dist/analyze/validate-markdown.js +25 -0
- package/dist/analyze/validate-markdown.js.map +1 -0
- package/dist/artifacts/policy.d.ts +9 -0
- package/dist/artifacts/policy.d.ts.map +1 -0
- package/dist/artifacts/policy.js +46 -0
- package/dist/artifacts/policy.js.map +1 -0
- package/dist/artifacts/policy.test.d.ts +2 -0
- package/dist/artifacts/policy.test.d.ts.map +1 -0
- package/dist/artifacts/policy.test.js +73 -0
- package/dist/artifacts/policy.test.js.map +1 -0
- package/dist/auth/resolve.d.ts +22 -0
- package/dist/auth/resolve.d.ts.map +1 -0
- package/dist/auth/resolve.js +148 -0
- package/dist/auth/resolve.js.map +1 -0
- package/dist/auth/store.d.ts +23 -0
- package/dist/auth/store.d.ts.map +1 -0
- package/dist/auth/store.js +103 -0
- package/dist/auth/store.js.map +1 -0
- package/dist/cache/generate.d.ts +8 -0
- package/dist/cache/generate.d.ts.map +1 -0
- package/dist/cache/generate.js +61 -0
- package/dist/cache/generate.js.map +1 -0
- package/dist/cache/hash.d.ts +5 -0
- package/dist/cache/hash.d.ts.map +1 -0
- package/dist/cache/hash.js +21 -0
- package/dist/cache/hash.js.map +1 -0
- package/dist/cache/hash.test.d.ts +2 -0
- package/dist/cache/hash.test.d.ts.map +1 -0
- package/dist/cache/hash.test.js +42 -0
- package/dist/cache/hash.test.js.map +1 -0
- package/dist/cache/resolve.d.ts +5 -0
- package/dist/cache/resolve.d.ts.map +1 -0
- package/dist/cache/resolve.js +8 -0
- package/dist/cache/resolve.js.map +1 -0
- package/dist/cache/store.d.ts +20 -0
- package/dist/cache/store.d.ts.map +1 -0
- package/dist/cache/store.js +90 -0
- package/dist/cache/store.js.map +1 -0
- package/dist/cache/store.test.d.ts +2 -0
- package/dist/cache/store.test.d.ts.map +1 -0
- package/dist/cache/store.test.js +101 -0
- package/dist/cache/store.test.js.map +1 -0
- package/dist/cli/analyze.d.ts +21 -0
- package/dist/cli/analyze.d.ts.map +1 -0
- package/dist/cli/analyze.js +148 -0
- package/dist/cli/analyze.js.map +1 -0
- package/dist/cli/concurrency.d.ts +17 -0
- package/dist/cli/concurrency.d.ts.map +1 -0
- package/dist/cli/concurrency.js +56 -0
- package/dist/cli/concurrency.js.map +1 -0
- package/dist/cli/concurrency.test.d.ts +2 -0
- package/dist/cli/concurrency.test.d.ts.map +1 -0
- package/dist/cli/concurrency.test.js +74 -0
- package/dist/cli/concurrency.test.js.map +1 -0
- package/dist/cli/config.d.ts +2 -0
- package/dist/cli/config.d.ts.map +1 -0
- package/dist/cli/config.js +14 -0
- package/dist/cli/config.js.map +1 -0
- package/dist/cli/help.d.ts +23 -0
- package/dist/cli/help.d.ts.map +1 -0
- package/dist/cli/help.js +458 -0
- package/dist/cli/help.js.map +1 -0
- package/dist/cli/help.test.d.ts +2 -0
- package/dist/cli/help.test.d.ts.map +1 -0
- package/dist/cli/help.test.js +41 -0
- package/dist/cli/help.test.js.map +1 -0
- package/dist/cli/index.d.ts +3 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +300 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/cli/mcp.d.ts +6 -0
- package/dist/cli/mcp.d.ts.map +1 -0
- package/dist/cli/mcp.js +17 -0
- package/dist/cli/mcp.js.map +1 -0
- package/dist/cli/record.d.ts +27 -0
- package/dist/cli/record.d.ts.map +1 -0
- package/dist/cli/record.js +244 -0
- package/dist/cli/record.js.map +1 -0
- package/dist/cli/run.d.ts +11 -0
- package/dist/cli/run.d.ts.map +1 -0
- package/dist/cli/run.js +676 -0
- package/dist/cli/run.js.map +1 -0
- package/dist/cli/subprocess.d.ts +19 -0
- package/dist/cli/subprocess.d.ts.map +1 -0
- package/dist/cli/subprocess.js +142 -0
- package/dist/cli/subprocess.js.map +1 -0
- package/dist/cli/subprocess.test.d.ts +2 -0
- package/dist/cli/subprocess.test.d.ts.map +1 -0
- package/dist/cli/subprocess.test.js +76 -0
- package/dist/cli/subprocess.test.js.map +1 -0
- package/dist/cli/tags.d.ts +5 -0
- package/dist/cli/tags.d.ts.map +1 -0
- package/dist/cli/tags.js +33 -0
- package/dist/cli/tags.js.map +1 -0
- package/dist/cli/tags.test.d.ts +2 -0
- package/dist/cli/tags.test.d.ts.map +1 -0
- package/dist/cli/tags.test.js +31 -0
- package/dist/cli/tags.test.js.map +1 -0
- package/dist/config/env-vars.d.ts +2 -0
- package/dist/config/env-vars.d.ts.map +1 -0
- package/dist/config/env-vars.js +14 -0
- package/dist/config/env-vars.js.map +1 -0
- package/dist/config/env.d.ts +2 -0
- package/dist/config/env.d.ts.map +1 -0
- package/dist/config/env.js +9 -0
- package/dist/config/env.js.map +1 -0
- package/dist/config/lightpanda.d.ts +6 -0
- package/dist/config/lightpanda.d.ts.map +1 -0
- package/dist/config/lightpanda.js +38 -0
- package/dist/config/lightpanda.js.map +1 -0
- package/dist/config/lightpanda.test.d.ts +2 -0
- package/dist/config/lightpanda.test.d.ts.map +1 -0
- package/dist/config/lightpanda.test.js +46 -0
- package/dist/config/lightpanda.test.js.map +1 -0
- package/dist/config/load.d.ts +22 -0
- package/dist/config/load.d.ts.map +1 -0
- package/dist/config/load.js +242 -0
- package/dist/config/load.js.map +1 -0
- package/dist/config/load.test.d.ts +2 -0
- package/dist/config/load.test.d.ts.map +1 -0
- package/dist/config/load.test.js +86 -0
- package/dist/config/load.test.js.map +1 -0
- package/dist/config/set.d.ts +8 -0
- package/dist/config/set.d.ts.map +1 -0
- package/dist/config/set.js +93 -0
- package/dist/config/set.js.map +1 -0
- package/dist/config/set.test.d.ts +2 -0
- package/dist/config/set.test.d.ts.map +1 -0
- package/dist/config/set.test.js +98 -0
- package/dist/config/set.test.js.map +1 -0
- package/dist/healing/classify.d.ts +15 -0
- package/dist/healing/classify.d.ts.map +1 -0
- package/dist/healing/classify.js +209 -0
- package/dist/healing/classify.js.map +1 -0
- package/dist/healing/classify.test.d.ts +2 -0
- package/dist/healing/classify.test.d.ts.map +1 -0
- package/dist/healing/classify.test.js +167 -0
- package/dist/healing/classify.test.js.map +1 -0
- package/dist/healing/recovery-prompt.d.ts +3 -0
- package/dist/healing/recovery-prompt.d.ts.map +1 -0
- package/dist/healing/recovery-prompt.js +22 -0
- package/dist/healing/recovery-prompt.js.map +1 -0
- package/dist/mcp/inline-scenario.d.ts +13 -0
- package/dist/mcp/inline-scenario.d.ts.map +1 -0
- package/dist/mcp/inline-scenario.js +23 -0
- package/dist/mcp/inline-scenario.js.map +1 -0
- package/dist/mcp/server.d.ts +4 -0
- package/dist/mcp/server.d.ts.map +1 -0
- package/dist/mcp/server.js +186 -0
- package/dist/mcp/server.js.map +1 -0
- package/dist/mcp/skill.d.ts +5 -0
- package/dist/mcp/skill.d.ts.map +1 -0
- package/dist/mcp/skill.js +38 -0
- package/dist/mcp/skill.js.map +1 -0
- package/dist/mcp/skill.test.d.ts +2 -0
- package/dist/mcp/skill.test.d.ts.map +1 -0
- package/dist/mcp/skill.test.js +18 -0
- package/dist/mcp/skill.test.js.map +1 -0
- package/dist/paths.d.ts +12 -0
- package/dist/paths.d.ts.map +1 -0
- package/dist/paths.js +61 -0
- package/dist/paths.js.map +1 -0
- package/dist/prompt/load.d.ts +4 -0
- package/dist/prompt/load.d.ts.map +1 -0
- package/dist/prompt/load.js +19 -0
- package/dist/prompt/load.js.map +1 -0
- package/dist/recorder/bridge-process.d.ts +14 -0
- package/dist/recorder/bridge-process.d.ts.map +1 -0
- package/dist/recorder/bridge-process.js +133 -0
- package/dist/recorder/bridge-process.js.map +1 -0
- package/dist/recorder/bridge-process.test.d.ts +2 -0
- package/dist/recorder/bridge-process.test.d.ts.map +1 -0
- package/dist/recorder/bridge-process.test.js +36 -0
- package/dist/recorder/bridge-process.test.js.map +1 -0
- package/dist/recorder/bridge-worker.d.ts +2 -0
- package/dist/recorder/bridge-worker.d.ts.map +1 -0
- package/dist/recorder/bridge-worker.js +76 -0
- package/dist/recorder/bridge-worker.js.map +1 -0
- package/dist/recorder/bridge.d.ts +12 -0
- package/dist/recorder/bridge.d.ts.map +1 -0
- package/dist/recorder/bridge.js +61 -0
- package/dist/recorder/bridge.js.map +1 -0
- package/dist/recorder/bridge.test.d.ts +2 -0
- package/dist/recorder/bridge.test.d.ts.map +1 -0
- package/dist/recorder/bridge.test.js +21 -0
- package/dist/recorder/bridge.test.js.map +1 -0
- package/dist/recorder/enrich-event.d.ts +31 -0
- package/dist/recorder/enrich-event.d.ts.map +1 -0
- package/dist/recorder/enrich-event.js +91 -0
- package/dist/recorder/enrich-event.js.map +1 -0
- package/dist/recorder/events.d.ts +11 -0
- package/dist/recorder/events.d.ts.map +1 -0
- package/dist/recorder/events.js +42 -0
- package/dist/recorder/events.js.map +1 -0
- package/dist/recorder/events.test.d.ts +2 -0
- package/dist/recorder/events.test.d.ts.map +1 -0
- package/dist/recorder/events.test.js +40 -0
- package/dist/recorder/events.test.js.map +1 -0
- package/dist/recorder/generate-scenario.d.ts +16 -0
- package/dist/recorder/generate-scenario.d.ts.map +1 -0
- package/dist/recorder/generate-scenario.js +78 -0
- package/dist/recorder/generate-scenario.js.map +1 -0
- package/dist/recorder/in-page-helpers.d.ts +6 -0
- package/dist/recorder/in-page-helpers.d.ts.map +1 -0
- package/dist/recorder/in-page-helpers.js +238 -0
- package/dist/recorder/in-page-helpers.js.map +1 -0
- package/dist/recorder/in-page-helpers.test.d.ts +2 -0
- package/dist/recorder/in-page-helpers.test.d.ts.map +1 -0
- package/dist/recorder/in-page-helpers.test.js +186 -0
- package/dist/recorder/in-page-helpers.test.js.map +1 -0
- package/dist/recorder/page-script.d.ts +7 -0
- package/dist/recorder/page-script.d.ts.map +1 -0
- package/dist/recorder/page-script.js +132 -0
- package/dist/recorder/page-script.js.map +1 -0
- package/dist/recorder/redact.d.ts +8 -0
- package/dist/recorder/redact.d.ts.map +1 -0
- package/dist/recorder/redact.js +26 -0
- package/dist/recorder/redact.js.map +1 -0
- package/dist/recorder/redact.test.d.ts +2 -0
- package/dist/recorder/redact.test.d.ts.map +1 -0
- package/dist/recorder/redact.test.js +27 -0
- package/dist/recorder/redact.test.js.map +1 -0
- package/dist/recorder/session.d.ts +8 -0
- package/dist/recorder/session.d.ts.map +1 -0
- package/dist/recorder/session.js +28 -0
- package/dist/recorder/session.js.map +1 -0
- package/dist/recorder/snapshot-match.d.ts +22 -0
- package/dist/recorder/snapshot-match.d.ts.map +1 -0
- package/dist/recorder/snapshot-match.js +102 -0
- package/dist/recorder/snapshot-match.js.map +1 -0
- package/dist/recorder/snapshot-match.test.d.ts +2 -0
- package/dist/recorder/snapshot-match.test.d.ts.map +1 -0
- package/dist/recorder/snapshot-match.test.js +34 -0
- package/dist/recorder/snapshot-match.test.js.map +1 -0
- package/dist/redact/env-secrets.d.ts +14 -0
- package/dist/redact/env-secrets.d.ts.map +1 -0
- package/dist/redact/env-secrets.js +86 -0
- package/dist/redact/env-secrets.js.map +1 -0
- package/dist/redact/env-secrets.test.d.ts +2 -0
- package/dist/redact/env-secrets.test.d.ts.map +1 -0
- package/dist/redact/env-secrets.test.js +103 -0
- package/dist/redact/env-secrets.test.js.map +1 -0
- package/dist/reporter/export.d.ts +14 -0
- package/dist/reporter/export.d.ts.map +1 -0
- package/dist/reporter/export.js +53 -0
- package/dist/reporter/export.js.map +1 -0
- package/dist/reporter/export.test.d.ts +2 -0
- package/dist/reporter/export.test.d.ts.map +1 -0
- package/dist/reporter/export.test.js +100 -0
- package/dist/reporter/export.test.js.map +1 -0
- package/dist/reporter/index.d.ts +11 -0
- package/dist/reporter/index.d.ts.map +1 -0
- package/dist/reporter/index.js +161 -0
- package/dist/reporter/index.js.map +1 -0
- package/dist/reporter/index.test.d.ts +2 -0
- package/dist/reporter/index.test.d.ts.map +1 -0
- package/dist/reporter/index.test.js +61 -0
- package/dist/reporter/index.test.js.map +1 -0
- package/dist/scenarios/globs.d.ts +15 -0
- package/dist/scenarios/globs.d.ts.map +1 -0
- package/dist/scenarios/globs.js +48 -0
- package/dist/scenarios/globs.js.map +1 -0
- package/dist/scenarios/globs.test.d.ts +2 -0
- package/dist/scenarios/globs.test.d.ts.map +1 -0
- package/dist/scenarios/globs.test.js +53 -0
- package/dist/scenarios/globs.test.js.map +1 -0
- package/dist/scenarios/parser.d.ts +15 -0
- package/dist/scenarios/parser.d.ts.map +1 -0
- package/dist/scenarios/parser.js +278 -0
- package/dist/scenarios/parser.js.map +1 -0
- package/dist/scenarios/parser.test.d.ts +2 -0
- package/dist/scenarios/parser.test.d.ts.map +1 -0
- package/dist/scenarios/parser.test.js +373 -0
- package/dist/scenarios/parser.test.js.map +1 -0
- package/dist/skills/loader.d.ts +10 -0
- package/dist/skills/loader.d.ts.map +1 -0
- package/dist/skills/loader.js +98 -0
- package/dist/skills/loader.js.map +1 -0
- package/dist/types/config.d.ts +131 -0
- package/dist/types/config.d.ts.map +1 -0
- package/dist/types/config.js +2 -0
- package/dist/types/config.js.map +1 -0
- package/dist/types/recorder.d.ts +71 -0
- package/dist/types/recorder.d.ts.map +1 -0
- package/dist/types/recorder.js +2 -0
- package/dist/types/recorder.js.map +1 -0
- package/dist/types/scenario.d.ts +41 -0
- package/dist/types/scenario.d.ts.map +1 -0
- package/dist/types/scenario.js +2 -0
- package/dist/types/scenario.js.map +1 -0
- package/dist/types/skill.d.ts +20 -0
- package/dist/types/skill.d.ts.map +1 -0
- package/dist/types/skill.js +13 -0
- package/dist/types/skill.js.map +1 -0
- package/dist/types/verdict.d.ts +82 -0
- package/dist/types/verdict.d.ts.map +1 -0
- package/dist/types/verdict.js +13 -0
- package/dist/types/verdict.js.map +1 -0
- package/package.json +75 -0
- package/pqa.config.ts +82 -0
- package/prompt/ANALYZE-FLAKY.md +62 -0
- package/prompt/ANALYZE.md +110 -0
- package/prompt/CACHE-HINTS.md +49 -0
- package/prompt/RECORD.md +114 -0
- package/prompt/SYSTEM.md +118 -0
- package/skills/agent-browser/SKILL.md +2438 -0
- package/skills/create-pqa-scenario/SKILL.md +273 -0
package/package.json
ADDED
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "prose-qa",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "ProseQA — agent harness for NL E2E regression testing via agent-browser",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"bin": {
|
|
7
|
+
"pqa": "./dist/cli/index.js"
|
|
8
|
+
},
|
|
9
|
+
"files": [
|
|
10
|
+
"dist",
|
|
11
|
+
"prompt",
|
|
12
|
+
"skills",
|
|
13
|
+
"pqa.config.ts"
|
|
14
|
+
],
|
|
15
|
+
"scripts": {
|
|
16
|
+
"build": "tsc",
|
|
17
|
+
"test": "node --import tsx --test src/**/*.test.ts",
|
|
18
|
+
"dev": "tsx src/cli/index.ts",
|
|
19
|
+
"mcp": "tsx src/cli/index.ts mcp",
|
|
20
|
+
"postinstall": "mkdir -p ./skills/agent-browser && agent-browser skills get core --full > ./skills/agent-browser/SKILL.md",
|
|
21
|
+
"install-chrome": "agent-browser install --with-deps",
|
|
22
|
+
"install-lightpanda": "node scripts/install-lightpanda.mjs",
|
|
23
|
+
"demo:server": "node scripts/demo-server.mjs",
|
|
24
|
+
"prepublishOnly": "npm run build",
|
|
25
|
+
"prepare": "husky"
|
|
26
|
+
},
|
|
27
|
+
"engines": {
|
|
28
|
+
"node": ">=24"
|
|
29
|
+
},
|
|
30
|
+
"repository": {
|
|
31
|
+
"type": "git",
|
|
32
|
+
"url": "https://github.com/FreakDev/Prose-QA.git"
|
|
33
|
+
},
|
|
34
|
+
"homepage": "https://github.com/FreakDev/Prose-QA#readme",
|
|
35
|
+
"bugs": {
|
|
36
|
+
"url": "https://github.com/FreakDev/Prose-QA/issues"
|
|
37
|
+
},
|
|
38
|
+
"keywords": [
|
|
39
|
+
"e2e",
|
|
40
|
+
"testing",
|
|
41
|
+
"browser",
|
|
42
|
+
"ai",
|
|
43
|
+
"agent",
|
|
44
|
+
"regression"
|
|
45
|
+
],
|
|
46
|
+
"publishConfig": {
|
|
47
|
+
"access": "public"
|
|
48
|
+
},
|
|
49
|
+
"dependencies": {
|
|
50
|
+
"@ai-sdk/anthropic": "^2.0.0",
|
|
51
|
+
"@ai-sdk/fireworks": "^2.0.53",
|
|
52
|
+
"@ai-sdk/google": "^2.0.74",
|
|
53
|
+
"@ai-sdk/openai": "^2.0.0",
|
|
54
|
+
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
55
|
+
"@openrouter/ai-sdk-provider": "^2.9.0",
|
|
56
|
+
"agent-browser": "^0.27.1",
|
|
57
|
+
"ai": "^6.0.193",
|
|
58
|
+
"chalk": "^5.4.1",
|
|
59
|
+
"commander": "^14.0.0",
|
|
60
|
+
"dotenv-flow": "^4.1.0",
|
|
61
|
+
"fast-glob": "^3.3.3",
|
|
62
|
+
"gray-matter": "^4.0.3",
|
|
63
|
+
"jiti": "^2.4.2",
|
|
64
|
+
"ollama-ai-provider-v2": "^3.5.1",
|
|
65
|
+
"ora": "^8.2.0",
|
|
66
|
+
"zod": "^4.1.8"
|
|
67
|
+
},
|
|
68
|
+
"devDependencies": {
|
|
69
|
+
"@types/node": "^22.15.0",
|
|
70
|
+
"husky": "^9.1.7",
|
|
71
|
+
"tsx": "^4.19.0",
|
|
72
|
+
"typescript": "^5.8.0"
|
|
73
|
+
},
|
|
74
|
+
"license": "MIT"
|
|
75
|
+
}
|
package/pqa.config.ts
ADDED
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Default Prose-QA configuration.
|
|
3
|
+
* Used when no pqa.config.* exists in the project cwd (e.g. pilar-ui).
|
|
4
|
+
* Override locally by adding pqa.config.json (or .mjs / .ts / .js) in your project root.
|
|
5
|
+
*/
|
|
6
|
+
const config = {
|
|
7
|
+
scenariosDir: "scenarios",
|
|
8
|
+
llm: {
|
|
9
|
+
provider:
|
|
10
|
+
(process.env.PQA_LLM_PROVIDER as
|
|
11
|
+
| "anthropic"
|
|
12
|
+
| "openai"
|
|
13
|
+
| "fireworks"
|
|
14
|
+
| "ollama"
|
|
15
|
+
| "google"
|
|
16
|
+
| "openrouter") ?? "anthropic",
|
|
17
|
+
model: process.env.PQA_LLM_MODEL ?? "claude-sonnet-4-20250514",
|
|
18
|
+
thinking: {
|
|
19
|
+
enabled: true,
|
|
20
|
+
budgetTokens: 10_000,
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
browser: {
|
|
24
|
+
headed: false,
|
|
25
|
+
sessionName: "pqa",
|
|
26
|
+
defaultTimeout: 25_000,
|
|
27
|
+
engine: "chrome",
|
|
28
|
+
lightpanda: {
|
|
29
|
+
executablePath: "./bin",
|
|
30
|
+
telemetry: false,
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
systemPromptPath: "prompt/SYSTEM.md",
|
|
34
|
+
envVars: [],
|
|
35
|
+
sensitiveEnvVars: [],
|
|
36
|
+
skills: {
|
|
37
|
+
dirs: ["skills"],
|
|
38
|
+
preloads: ["core"],
|
|
39
|
+
},
|
|
40
|
+
agent: {
|
|
41
|
+
parallel: 0,
|
|
42
|
+
maxTurns: 300,
|
|
43
|
+
bashTimeoutMs: 120_000,
|
|
44
|
+
},
|
|
45
|
+
auth: {
|
|
46
|
+
admin: {
|
|
47
|
+
scenario: "login-admin",
|
|
48
|
+
},
|
|
49
|
+
},
|
|
50
|
+
healing: {
|
|
51
|
+
enabled: true,
|
|
52
|
+
maxRecoveryTurns: 2,
|
|
53
|
+
recoverOnUnknown: false,
|
|
54
|
+
transientPatterns: [
|
|
55
|
+
"timeout",
|
|
56
|
+
"timed out",
|
|
57
|
+
"not found",
|
|
58
|
+
"waiting for",
|
|
59
|
+
"navigation",
|
|
60
|
+
"net::",
|
|
61
|
+
"target closed",
|
|
62
|
+
"detached",
|
|
63
|
+
"stale",
|
|
64
|
+
"interrupted",
|
|
65
|
+
],
|
|
66
|
+
},
|
|
67
|
+
recorder: {
|
|
68
|
+
bridgePort: 17_321,
|
|
69
|
+
outputDir: ".pqa/recordings",
|
|
70
|
+
defaultTags: ["recorded"],
|
|
71
|
+
},
|
|
72
|
+
cache: {
|
|
73
|
+
dir: ".pqa/cache",
|
|
74
|
+
enabled: true,
|
|
75
|
+
},
|
|
76
|
+
report: {
|
|
77
|
+
outputPath: "",
|
|
78
|
+
zip: false,
|
|
79
|
+
},
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
export default config;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
# Prose-QA flaky scenario analysis
|
|
2
|
+
|
|
3
|
+
You analyze **inconsistent E2E results** for the same scenario across multiple run sessions. The scenario sometimes passes and sometimes fails (or the same Then checkpoint flips). Your job is to compare representative pass vs fail runs, diagnose whether failures are **false negatives**, passes are **false positives**, timing flakes, agent drift, or real product bugs — then propose the **smallest scenario edit** that reduces flakiness without hiding regressions.
|
|
4
|
+
|
|
5
|
+
## Inputs
|
|
6
|
+
|
|
7
|
+
You receive JSON with:
|
|
8
|
+
|
|
9
|
+
- `heuristicFinding` — cross-run summary (`failureKind`, `signals`, `suggestions`)
|
|
10
|
+
- `scenarioIntent` — parsed Goal, Steps, Then, frontmatter
|
|
11
|
+
- `scenarioResult` — baseline run (usually a recent fail) with truncated transcript
|
|
12
|
+
- `scenarioMarkdown` — current scenario file (source of truth for `revisedMarkdown`)
|
|
13
|
+
- `runComparison` — multi-run data:
|
|
14
|
+
- `runIds`, `stats` (pass/fail/error counts)
|
|
15
|
+
- `inconsistentCheckpoints` — Then assertions that passed in some runs and failed in others
|
|
16
|
+
- `filePathWarnings` — alert if scenario file path changed between runs
|
|
17
|
+
- `representativeRuns.pass` / `representativeRuns.fail` — full truncated transcripts to compare
|
|
18
|
+
- `otherRuns` — summary-only for remaining sessions
|
|
19
|
+
|
|
20
|
+
## Required reasoning (mental — do not output unless asked)
|
|
21
|
+
|
|
22
|
+
1. **Compare pass vs fail transcripts**: same Steps executed? different navigation order? missing waits on fail runs?
|
|
23
|
+
2. **Checkpoint flips**: if assertion X passes in pass run but fails in fail run, is the check at the wrong step boundary or racing DOM/URL?
|
|
24
|
+
3. **False negative**: fail run completed Steps but Then failed on strict or misplaced assertion while app behaved as intended → fix placement/timing, not product expectations.
|
|
25
|
+
4. **False positive**: pass run used healing recovery, or pass missed a regression the fail run caught → do not weaken Then; tighten Steps or add intermediate checks.
|
|
26
|
+
5. **Timing flake**: timeout/stale ref/navigation race → explicit wait Step after triggering action.
|
|
27
|
+
6. **Agent drift**: pass and fail took different paths not implied by Goal → clarify Steps; do not delete valid Then.
|
|
28
|
+
7. **Product bug**: fail run shows validation error, blocked action, or missing UI the Goal requires → `shouldEditScenario: false`.
|
|
29
|
+
|
|
30
|
+
If pass and fail evidence suggests a **real product regression**, set `shouldEditScenario: false` even when the scenario is flaky.
|
|
31
|
+
|
|
32
|
+
## Editing rules
|
|
33
|
+
|
|
34
|
+
Same as single-run analysis:
|
|
35
|
+
|
|
36
|
+
- Minimal diff; preserve Goal narrative
|
|
37
|
+
- Three H1 sections: `# Goal`, `# Steps`, `# Then`
|
|
38
|
+
- Natural-language Steps; observable Then bullets
|
|
39
|
+
- Move checkpoints to correct step boundaries
|
|
40
|
+
- `revisedMarkdown` must be the complete file
|
|
41
|
+
|
|
42
|
+
## Output
|
|
43
|
+
|
|
44
|
+
Reply with **only** a JSON code block:
|
|
45
|
+
|
|
46
|
+
```json
|
|
47
|
+
{
|
|
48
|
+
"shouldEditScenario": true,
|
|
49
|
+
"flakeDiagnosis": {
|
|
50
|
+
"type": "false_negative",
|
|
51
|
+
"confidence": "high",
|
|
52
|
+
"explanation": "Fail run reached project detail before checking list-only text; pass run checked earlier."
|
|
53
|
+
},
|
|
54
|
+
"rationale": "One paragraph: intent, pass vs fail difference, why edit stabilizes without hiding bugs.",
|
|
55
|
+
"changes": ["Move 'page shows \"Projects\"' to immediately after step 4."],
|
|
56
|
+
"revisedMarkdown": "---\nname: example\n---\n\n# Goal\n...\n"
|
|
57
|
+
}
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
`flakeDiagnosis.type` must be one of: `false_negative`, `false_positive`, `timing_flake`, `agent_drift`, `product`.
|
|
61
|
+
|
|
62
|
+
When `shouldEditScenario` is `false`, omit `revisedMarkdown` or set it to `null`. Still include `flakeDiagnosis` when you can classify the inconsistency.
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
# Prose-QA scenario fix analysis
|
|
2
|
+
|
|
3
|
+
You analyze failed E2E test runs and propose **concrete edits** to the scenario markdown file.
|
|
4
|
+
|
|
5
|
+
The scenario is not a list of UI clicks — it is a **user story**: a Goal (why), Steps (ordered actions), and Then (observable proof). Your job is not to patch symptoms in isolation. It is to **reconcile what the author intended** with **what actually happened in the browser**, then suggest the smallest edit that preserves intent while making the scenario reliable and verifiable.
|
|
6
|
+
|
|
7
|
+
## Inputs
|
|
8
|
+
|
|
9
|
+
You receive JSON with:
|
|
10
|
+
|
|
11
|
+
- `heuristicFinding` — rule-based classification (`failureKind`, `signals`, `suggestions`)
|
|
12
|
+
- `scenarioIntent` — parsed Goal, Steps, Then, and frontmatter (when available)
|
|
13
|
+
- `scenarioResult` — verdict, error, truncated transcript (agent actions + evidence)
|
|
14
|
+
- `scenarioMarkdown` — the current scenario file content (source of truth for `revisedMarkdown`)
|
|
15
|
+
|
|
16
|
+
When `scenarioIntent` and `scenarioMarkdown` differ, trust `scenarioMarkdown` for exact wording; use `scenarioIntent` to see structure clearly.
|
|
17
|
+
|
|
18
|
+
## Before you propose changes (required reasoning)
|
|
19
|
+
|
|
20
|
+
Work through this mentally (do not output this analysis unless asked):
|
|
21
|
+
|
|
22
|
+
1. **Read the Goal first.** What user outcome is this scenario trying to prove? Who is the user, what area of the app, what success looks like in plain language.
|
|
23
|
+
2. **Read Steps as a temporal chain.** Step N must be doable after step N−1. Identify phases: land → interact → navigate → confirm. Do not reorder steps unless the failure proves the current order is wrong for the intended journey.
|
|
24
|
+
3. **Read Then as proof obligations.** Each checkpoint should be justified by the Goal and the UI state **at the moment it is checked**. A Then that targets a page the Steps deliberately leave is often a placement bug, not a product bug.
|
|
25
|
+
4. **Replay the failure from the transcript:**
|
|
26
|
+
- Which Steps did the agent execute (bash commands, snapshots, URLs)?
|
|
27
|
+
- Which Then checkpoints failed, and **why** (verdict reasons, snapshot/URL evidence)?
|
|
28
|
+
- Did the agent finish all Steps before checking Then, or verify too early/late?
|
|
29
|
+
5. **Separate mechanics from intent:**
|
|
30
|
+
- Wrong page at check time → likely **scenario authoring** (Then placement, missing intermediate checkpoint, missing wait).
|
|
31
|
+
- App shows validation error / blocked action / missing UI the Goal expects → likely **product regression** — do not weaken Then to force a pass.
|
|
32
|
+
- Timeout, stale ref, race after navigation → likely **transient** — prefer waits or clearer step boundaries, not weaker assertions.
|
|
33
|
+
6. **Check coherence with the original scenario:**
|
|
34
|
+
- Preserve the author's business meaning (same Goal story, same user path).
|
|
35
|
+
- Do not invent a different flow just because it would pass.
|
|
36
|
+
- Do not delete Then bullets that encode real regression signal unless they are duplicated or checked at the wrong time.
|
|
37
|
+
- Prefer moving or splitting checks over changing what is being verified.
|
|
38
|
+
|
|
39
|
+
If `heuristicFinding` and transcript evidence disagree, **trust the transcript and verdict** for facts, and use heuristics as hints.
|
|
40
|
+
|
|
41
|
+
## How to interpret common failure patterns
|
|
42
|
+
|
|
43
|
+
| What you see | Likely intent gap | Prefer fixing by |
|
|
44
|
+
| --- | --- | --- |
|
|
45
|
+
| Steps completed, Then fails on `page shows` for text from an earlier page | Checkpoint checked after navigation away | Move Then to immediately after the step that reaches that page; or add intermediate Then before navigating |
|
|
46
|
+
| `url contains` fails because URL is a detail route | Then written for list view only | Narrow URL check to list route, or add Then before opening detail |
|
|
47
|
+
| Agent never reached expected page | Missing/w vague Step, or missing wait | Clarify Step target (visible label); add wait after navigation/submit |
|
|
48
|
+
| Semantic/`equals` checkpoint fails with product error text | App behaviour changed or regressed | `shouldEditScenario: false` unless scenario text is objectively wrong |
|
|
49
|
+
| Flaky pass on retry, timeout/stale ref in bash | Timing or DOM stability | Add explicit wait Step after the action that triggers load/navigation |
|
|
50
|
+
| Agent did extra navigation not in Steps | Scenario under-specified or agent drift | Tighten Steps only if transcript shows the **intended** path was clear |
|
|
51
|
+
|
|
52
|
+
## Editing rules
|
|
53
|
+
|
|
54
|
+
1. **Product regressions** (`failureKind: product`): the application is wrong, not the scenario. Set `shouldEditScenario: false` and explain why editing would hide a real bug.
|
|
55
|
+
|
|
56
|
+
2. **Scenario authoring issues** (`failureKind: scenario_issue`): fix Then placement, Step wording, missing intermediate steps/checkpoints, or incorrect ordering. **Minimal diff** — keep Goal narrative intact.
|
|
57
|
+
|
|
58
|
+
3. **Transient flakes** (`failureKind: transient`): add waits, split overloaded Steps, stabilize assertions. Only change Then wording when timing — not product behaviour — is the root cause.
|
|
59
|
+
|
|
60
|
+
4. **Unknown**: investigate transcript evidence. Edit only if you can tie a specific scenario fix to intent + evidence; otherwise `shouldEditScenario: false`.
|
|
61
|
+
|
|
62
|
+
5. Preserve frontmatter (`name`, `tags`, `auth`, `url`, `skills`) unless clearly wrong.
|
|
63
|
+
|
|
64
|
+
6. Keep exactly three H1 sections: `# Goal`, `# Steps`, `# Then`.
|
|
65
|
+
|
|
66
|
+
7. When moving checkpoints, place them at the **correct step boundary** in the markdown body — not only at the end of `# Then` if the check belongs earlier in the flow.
|
|
67
|
+
|
|
68
|
+
8. Steps stay **natural language** for an agent using agent-browser: visible labels, one observable action per step when possible. No CSS selectors, no `@e12` refs.
|
|
69
|
+
|
|
70
|
+
9. Then bullets stay **observable**: `url contains`, `page shows`, semantic equals — verifiable from URL or snapshot.
|
|
71
|
+
|
|
72
|
+
10. `revisedMarkdown` must be the **complete** file (frontmatter + body), ready to write to disk.
|
|
73
|
+
|
|
74
|
+
## Quality checklist
|
|
75
|
+
|
|
76
|
+
Before returning JSON, verify:
|
|
77
|
+
|
|
78
|
+
- [ ] **Goal unchanged in meaning** unless it was factually wrong or contradicted the Steps.
|
|
79
|
+
- [ ] Steps still describe the **same user journey** the author intended, in a logical time order.
|
|
80
|
+
- [ ] Every Then you keep or move is checkable **at the point in the flow** where you place it.
|
|
81
|
+
- [ ] Failed checkpoints are addressed by placement/clarity/timing — not by removing real regression signal.
|
|
82
|
+
- [ ] No secrets, refs, or selectors introduced in Steps.
|
|
83
|
+
- [ ] Fix is **minimal but complete** — an agent can replay without guessing missing actions.
|
|
84
|
+
|
|
85
|
+
## Anti-patterns (avoid)
|
|
86
|
+
|
|
87
|
+
- Weakening or deleting Then bullets just to get a green run when the app likely regressed.
|
|
88
|
+
- Moving all checks to the end when the scenario deliberately navigates through multiple pages.
|
|
89
|
+
- Rewriting the Goal into a different feature than the original scenario name/tags imply.
|
|
90
|
+
- Adding vague Steps (“wait for page to load”) without tying them to a concrete UI outcome.
|
|
91
|
+
- Treating a misleading combobox **display value** as the target action when Steps meant **select a different option**.
|
|
92
|
+
- Ignoring `scenarioIntent.goal` and over-fitting to a single failed assertion without reading the full flow.
|
|
93
|
+
|
|
94
|
+
## Output
|
|
95
|
+
|
|
96
|
+
Reply with **only** a JSON code block matching this schema:
|
|
97
|
+
|
|
98
|
+
```json
|
|
99
|
+
{
|
|
100
|
+
"shouldEditScenario": true,
|
|
101
|
+
"rationale": "One short paragraph: original intent, what failed, why your edit preserves intent.",
|
|
102
|
+
"changes": [
|
|
103
|
+
"Move 'page shows \"Projects\"' to immediately after step 4 (before opening project detail).",
|
|
104
|
+
"Add wait for URL after clicking Save."
|
|
105
|
+
],
|
|
106
|
+
"revisedMarkdown": "---\nname: example\n---\n\n# Goal\n...\n"
|
|
107
|
+
}
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
When `shouldEditScenario` is `false`, omit `revisedMarkdown` or set it to `null`. The `rationale` must still explain the scenario's intent and why no edit is appropriate.
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# Scenario replay hints generator
|
|
2
|
+
|
|
3
|
+
You analyze a **successful** Prose-QA E2E run and produce markdown hints for a future agent running the **same scenario**.
|
|
4
|
+
|
|
5
|
+
## What to write (and what to skip)
|
|
6
|
+
|
|
7
|
+
Write **only** advice grounded in **this scenario’s** Goal, Steps, Then, URLs, labels, refs, and the provided transcript.
|
|
8
|
+
|
|
9
|
+
**Do not include:**
|
|
10
|
+
|
|
11
|
+
- Generic E2E or `agent-browser` best practices (snapshot before click, one command per bash call, re-snapshot after navigation, etc.) — the agent already has those in its system prompt.
|
|
12
|
+
- Vague tips (“be patient”, “check the page”, “verify carefully”).
|
|
13
|
+
- Advice that could apply to any scenario without naming **this** scenario’s concrete targets.
|
|
14
|
+
|
|
15
|
+
Every bullet should tie to a **specific** step, checkpoint, URL fragment, button/link text, or failure/recovery that appeared in **this** run.
|
|
16
|
+
|
|
17
|
+
## Output format
|
|
18
|
+
|
|
19
|
+
Return **only** markdown (no JSON wrapper). Use these sections when you have **scenario-specific** content; omit empty sections.
|
|
20
|
+
|
|
21
|
+
### Effective actions
|
|
22
|
+
|
|
23
|
+
- Map **each** scenario Step to the exact `agent-browser` commands from the transcript (locators, URLs).
|
|
24
|
+
- Quote or paraphrase real labels and paths from this run.
|
|
25
|
+
|
|
26
|
+
### Then verification shortcuts
|
|
27
|
+
|
|
28
|
+
- For **each** Then bullet in the scenario, the exact CLI used on this run and what evidence passed.
|
|
29
|
+
|
|
30
|
+
### Pitfalls avoided (this scenario)
|
|
31
|
+
|
|
32
|
+
- Mistakes almost made or recovery wasted on **this** UI (wrong ref, stale snapshot, wrong page) — only if seen in the transcript.
|
|
33
|
+
|
|
34
|
+
### Hard interactions resolved (this scenario)
|
|
35
|
+
|
|
36
|
+
- Ambiguous steps, dialogs, or flaky elements **on this run**: what worked, what to skip next time.
|
|
37
|
+
|
|
38
|
+
## When prior hints exist
|
|
39
|
+
|
|
40
|
+
Merge with the existing hints block:
|
|
41
|
+
|
|
42
|
+
- Drop generic or redundant lines; keep or update only scenario-specific facts.
|
|
43
|
+
- Prefer the latest transcript when refs or UI changed.
|
|
44
|
+
- Stay concise — a short, precise cheat sheet beats a long essay.
|
|
45
|
+
|
|
46
|
+
## Rules
|
|
47
|
+
|
|
48
|
+
- Source of truth: scenario text + transcript only. No invented URLs, credentials, or steps.
|
|
49
|
+
- Hints are accelerators, not scripts — the next agent must re-snapshot if the UI changed.
|
package/prompt/RECORD.md
ADDED
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
# Prose-QA scenario generation from recordings
|
|
2
|
+
|
|
3
|
+
You convert browser recording timelines into **Prose-QA scenario markdown** files.
|
|
4
|
+
|
|
5
|
+
The recording is a **chronological trace** of what the user did in the browser, plus optional **comments** and **checkpoint hints** that express intent. Your job is not to transcribe events literally — it is to **reconstruct the user journey** the way a human tester would describe it: why they are here, what they do in order, and what must be true at the end.
|
|
6
|
+
|
|
7
|
+
## Before you write (required reasoning)
|
|
8
|
+
|
|
9
|
+
Work through this mentally (do not output this analysis unless asked):
|
|
10
|
+
|
|
11
|
+
1. **Read the timeline in timestamp order** (`ts` on each event). That order is the ground truth for cause and effect.
|
|
12
|
+
2. **Infer intent from meta + comments + checkpoint_hint**, not only from raw clicks:
|
|
13
|
+
- `comment` → motivation, edge cases, “I do X on purpose”, business context.
|
|
14
|
+
- `checkpoint_hint` → what success looks like; often becomes `# Then`.
|
|
15
|
+
- `meta.startUrl` / first `navigate` → where the flow starts.
|
|
16
|
+
3. **Group events into user-visible phases** (e.g. “land on page” → “open control” → “choose value” → “confirm result”). Each phase may map to one Step, not one event.
|
|
17
|
+
4. **Separate UI mechanics from business meaning**:
|
|
18
|
+
- Clicking a combobox that currently shows value **A** usually means *open that dropdown*, not *set the field to A*.
|
|
19
|
+
- Clicking an **option** named **B** means *select B* as the new value.
|
|
20
|
+
- Prefer describing the **outcome** the user wanted (from comments/checkpoints) over misreading the current label as the target action.
|
|
21
|
+
5. **Check coherence**: every Step should be something the agent can do **after** the previous step; every Then should be justified by the Goal and the final UI state implied by the recording.
|
|
22
|
+
|
|
23
|
+
If comments and events seem to disagree, **trust comments and checkpoints for intent**, and use events for the concrete UI path.
|
|
24
|
+
|
|
25
|
+
## Output rules
|
|
26
|
+
|
|
27
|
+
1. Emit a **complete** markdown file only (optional fenced block with language `markdown`).
|
|
28
|
+
2. YAML frontmatter **required** fields: `name` (kebab-case, matches requested scenario name), `tags` (use provided defaultTags plus any sensible extras).
|
|
29
|
+
3. Include `url` in frontmatter when the recording started on a stable app URL (from meta.startUrl or first navigate event).
|
|
30
|
+
4. Three H1 sections exactly: `# Goal`, `# Steps`, `# Then` (case as shown).
|
|
31
|
+
5. Every **Then** checkpoint must be its own bullet starting with `- `.
|
|
32
|
+
6. Prefer machine-friendly Then patterns:
|
|
33
|
+
- `- url contains "/path"`
|
|
34
|
+
- `- page shows "visible text"`
|
|
35
|
+
7. Never include passwords, API keys, or raw secrets. Use `$PQA_TEST_EMAIL` / `$PQA_TEST_PASSWORD` only when describing login flows.
|
|
36
|
+
8. Do **not** include agent-browser refs like `@e12` or CSS selectors in Steps (use `snapshot.name` / visible labels from `snapshot.description`, not the ref id).
|
|
37
|
+
9. Steps must be **natural language** numbered list items an LLM agent can follow with agent-browser (visible labels, button names, roles).
|
|
38
|
+
10. **Condense** noisy events, but **never break temporal logic**: many keystrokes on one field → one fill step; repeated navigations to same URL → skip duplicates; opening a menu then picking an option → two ordered steps (or one step that names both actions clearly in sequence).
|
|
39
|
+
|
|
40
|
+
## Mapping recording events
|
|
41
|
+
|
|
42
|
+
| Event | Use in scenario |
|
|
43
|
+
| --- | --- |
|
|
44
|
+
| `navigate` | Context for `url` frontmatter or an early navigation Step when not covered by frontmatter |
|
|
45
|
+
| `click` | One Step per meaningful interaction in time order; use `snapshot.name` / `snapshot.role` / `snapshot.description` when present |
|
|
46
|
+
| `fill` | Step or table row for form data (skip if value is `[REDACTED]`); use `snapshot.name` for the field label when present |
|
|
47
|
+
| `select` | Step: select **{value}** for **{snapshot.name or name}** |
|
|
48
|
+
| `submit` | Step: submit the form / click primary action |
|
|
49
|
+
| `comment` | **Primary source of intent** — weave into Goal; add clarifying detail to Steps when it explains *why* or *which* row/field |
|
|
50
|
+
| `checkpoint_hint` | **Must** become one or more `# Then` bullets (rephrase for observability) |
|
|
51
|
+
|
|
52
|
+
### Snapshot enrichment
|
|
53
|
+
|
|
54
|
+
When `snapshot` is present on an event, treat it as the **authoritative label** for that interaction at record time. Use it to disambiguate duplicate roles (e.g. several comboboxes on a list page → scope to “the **first row**” when comments/checkpoints identify which item).
|
|
55
|
+
|
|
56
|
+
## Steps: temporal chain of actions
|
|
57
|
+
|
|
58
|
+
Steps are a **numbered, strictly ordered playbook**. The agent executes step N before step N+1.
|
|
59
|
+
|
|
60
|
+
Rules:
|
|
61
|
+
|
|
62
|
+
- **Preserve chronological order** of user actions. Do not reorder steps for readability if that would change what happens first in the UI (e.g. do not put “select **B**” before “open the dropdown”).
|
|
63
|
+
- **One observable action per step** when possible (align with `prompt/references/scenario-format.md`): navigate, click, fill, select, wait for page/feedback.
|
|
64
|
+
- **Do not skip necessary intermediate steps** the agent needs (open menu → pick item; open tab → click button). Condense only when the agent can still succeed without the intermediate (e.g. five `fill` events on the same field → one fill).
|
|
65
|
+
- **Do not invent steps** that are not supported by the recording or by standard setup (login) implied by comments.
|
|
66
|
+
- **Do not duplicate** navigation already handled by frontmatter `url` unless the flow later navigates elsewhere.
|
|
67
|
+
- When `url` is in frontmatter, step 1 should **not** repeat “go to URL” unless the user navigated away and back during the recording.
|
|
68
|
+
- Name **targets** the way a user sees them: button/link text, field labels, combobox values **to select**, tab names — not internal DOM ids.
|
|
69
|
+
|
|
70
|
+
### Interpreting common patterns
|
|
71
|
+
|
|
72
|
+
| Recording pattern | Write as |
|
|
73
|
+
| --- | --- |
|
|
74
|
+
| `click` combobox showing current value X, then `click` option Y | Open the control (e.g. “open the **Field** dropdown”), then “select **Y**” |
|
|
75
|
+
| `comment` names a list item or row | Scope Steps and Then to that item (e.g. first row, third card) |
|
|
76
|
+
| `fill` then `submit` | Fill fields, then submit / save |
|
|
77
|
+
| `checkpoint_hint` mentions final state | Matching Then bullets (visible text, url, selection) |
|
|
78
|
+
| Intentional bad input (`comment`) | Step notes the deliberate mistake; Then expects validation error or blocked action |
|
|
79
|
+
|
|
80
|
+
## Goal
|
|
81
|
+
|
|
82
|
+
Write one short paragraph that answers:
|
|
83
|
+
|
|
84
|
+
- **Who / where** (role or area of the app, from URL and navigation).
|
|
85
|
+
- **What** the user is trying to accomplish (from comments + event sequence, not from a single misleading click label).
|
|
86
|
+
- **Success** in plain language (aligned with `# Then`, not a duplicate list).
|
|
87
|
+
|
|
88
|
+
The Goal is the **story**; Steps are the **script**; Then is the **proof**.
|
|
89
|
+
|
|
90
|
+
## Then
|
|
91
|
+
|
|
92
|
+
- Derive primarily from `checkpoint_hint` events, refined into observable checks.
|
|
93
|
+
- Add supporting checks only when clearly implied by the Goal and final interactions (e.g. selected value visible after a dropdown change).
|
|
94
|
+
- Only **observable** assertions: URL fragments, visible strings, counts — verifiable via snapshot or URL.
|
|
95
|
+
- Wording must match what a human would **see** on screen, not internal state names unless they appear in the UI.
|
|
96
|
+
|
|
97
|
+
## Quality checklist
|
|
98
|
+
|
|
99
|
+
Before returning the markdown, verify:
|
|
100
|
+
|
|
101
|
+
- [ ] Goal reflects **user intent** (comments/checkpoints), not a literal misread of UI labels.
|
|
102
|
+
- [ ] Steps form a **logical time sequence** matching the recording order.
|
|
103
|
+
- [ ] No step describes the wrong direction (e.g. “set to **A**” when the user selected **B**).
|
|
104
|
+
- [ ] Then bullets are testable and tied to checkpoint hints / final UI state.
|
|
105
|
+
- [ ] No secrets, refs, or CSS selectors in Steps.
|
|
106
|
+
- [ ] Flow is **minimal but complete** — an agent can replay without guessing missing clicks.
|
|
107
|
+
|
|
108
|
+
## Anti-patterns (avoid)
|
|
109
|
+
|
|
110
|
+
- Listing clicks in random or reverse order.
|
|
111
|
+
- Treating the **current** combobox/display value as the **target** action.
|
|
112
|
+
- Ignoring `comment` / `checkpoint_hint` while over-fitting to noisy DOM labels (`body`, icon-only wrappers).
|
|
113
|
+
- Merging “open dropdown” and “pick option” into one vague step when the agent needs two distinct actions.
|
|
114
|
+
- Empty or generic Goal (“user interacts with the page”) when comments state a clear business action.
|
package/prompt/SYSTEM.md
ADDED
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
# ProseQA E2E Regression
|
|
2
|
+
|
|
3
|
+
You are ProseQA, an E2E regression testing agent. Execute scenarios using
|
|
4
|
+
`agent-browser` via bash commands only.
|
|
5
|
+
|
|
6
|
+
## Rules
|
|
7
|
+
|
|
8
|
+
- Use `agent-browser` CLI for all browser interactions (see the core skill below).
|
|
9
|
+
- Do NOT use curl, wget, or other HTTP clients to test the web UI.
|
|
10
|
+
- After completing Steps, verify every Then checkpoint using agent-browser CLI.
|
|
11
|
+
- On failure, save screenshot and snapshot to `$PQA_ARTIFACT_DIR`.
|
|
12
|
+
- Your **final message** must include the JSON verdict block defined below.
|
|
13
|
+
|
|
14
|
+
## Observe-Act-Verify loop
|
|
15
|
+
|
|
16
|
+
Follow the agent-browser **core loop** (see skill below): snapshot → choose ref →
|
|
17
|
+
act → re-snapshot. These rules are mandatory for every UI interaction:
|
|
18
|
+
|
|
19
|
+
1. **Snapshot before interaction** — Before any `click`, `fill`, `select`, or
|
|
20
|
+
`check`, you must have a recent `snapshot -i`. State the target ref (`@eN`)
|
|
21
|
+
and its visible label in one short sentence.
|
|
22
|
+
2. **Re-snapshot after change** — After `open`, navigation, submit, dialog open/close,
|
|
23
|
+
or any DOM change, run `snapshot -i` before the next ref-based interaction.
|
|
24
|
+
3. **One UI command per bash call** — Each `bash` tool call must contain at most
|
|
25
|
+
one UI interaction command (`click`, `fill`, `select`, `check`, `open`,
|
|
26
|
+
`press`). Do not chain interactions (`click && click`).
|
|
27
|
+
4. **Read-only commands may batch** — Multiple read-only commands (`get url`,
|
|
28
|
+
`get text`, `snapshot -i`) in one bash call are allowed when useful.
|
|
29
|
+
5. **Minimal narration** — One short sentence before each UI interaction: intent
|
|
30
|
+
- ref. No long chain-of-thought.
|
|
31
|
+
|
|
32
|
+
## When to pause and reason
|
|
33
|
+
|
|
34
|
+
Do not reflect before every action. Pause and explain only at these decision points:
|
|
35
|
+
|
|
36
|
+
- **Ambiguous refs** — Multiple elements match the target → explain your choice
|
|
37
|
+
or use a semantic locator (`find role button --name "Save"`).
|
|
38
|
+
- **Unexpected output** — Non-zero exit code, wrong URL, or missing expected text →
|
|
39
|
+
capture screenshot and snapshot to `$PQA_ARTIFACT_DIR`, diagnose before continuing.
|
|
40
|
+
- **Ambiguous step** — The scenario does not specify which element to use →
|
|
41
|
+
snapshot, then justify your choice before acting.
|
|
42
|
+
- **Before the verdict** — Confirm each Then bullet has CLI evidence ready; do not
|
|
43
|
+
emit the verdict until all Steps are complete.
|
|
44
|
+
|
|
45
|
+
## Workflow
|
|
46
|
+
|
|
47
|
+
1. Read the scenario **Goal**, **Steps**, and **Then** checkpoints from the prompt.
|
|
48
|
+
2. Execute **Steps** using the Observe-Act-Verify loop and `agent-browser` bash commands.
|
|
49
|
+
3. After all steps, verify **every** Then checkpoint using agent-browser CLI.
|
|
50
|
+
4. On any checkpoint failure, capture artifacts to `$PQA_ARTIFACT_DIR`:
|
|
51
|
+
- `agent-browser screenshot "$PQA_ARTIFACT_DIR/failure.png"`
|
|
52
|
+
- `agent-browser snapshot -i --json > "$PQA_ARTIFACT_DIR/snapshot.json"`
|
|
53
|
+
5. Emit a **final JSON verdict** (required — see schema below).
|
|
54
|
+
|
|
55
|
+
## Then checkpoint patterns
|
|
56
|
+
|
|
57
|
+
| Pattern | How to verify |
|
|
58
|
+
| ---------------------- | ------------------------------------------------ |
|
|
59
|
+
| `url contains "..."` | `agent-browser get url` — check substring |
|
|
60
|
+
| `page shows "..."` | `agent-browser snapshot -i` — check text present |
|
|
61
|
+
| `<field> equals "..."` | snapshot + locate field value |
|
|
62
|
+
| Other semantic checks | snapshot + reason about page content |
|
|
63
|
+
|
|
64
|
+
Record evidence (URL, snapshot excerpt, or command output) for each checkpoint.
|
|
65
|
+
|
|
66
|
+
## Browser session
|
|
67
|
+
|
|
68
|
+
Use environment variables when opening:
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
agent-browser open "https://example.com/page"
|
|
72
|
+
# With auth:
|
|
73
|
+
agent-browser --state "$AGENT_BROWSER_STATE" open "https://example.com/page"
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
If the scenario frontmatter includes a `url`, open that URL first. Otherwise, navigate to URLs as specified in Steps.
|
|
77
|
+
|
|
78
|
+
Auth scenarios (referenced from `pqa.config.ts`) perform login only — the harness saves browser state after they pass. Consumer scenarios with `auth: <profile>` open pages using preloaded state via `$AGENT_BROWSER_STATE`.
|
|
79
|
+
|
|
80
|
+
During auth scenarios, never run `agent-browser close`, `agent-browser close --all`, or `agent-browser state save` — closing the session before the harness saves produces an empty auth file.
|
|
81
|
+
|
|
82
|
+
For consumer scenarios, avoid `agent-browser close --all` unless a step explicitly requires it; prefer keeping one browser session for the whole scenario.
|
|
83
|
+
|
|
84
|
+
See **Observe-Act-Verify loop** above for re-snapshot rules after navigation or interaction.
|
|
85
|
+
|
|
86
|
+
## Required final output
|
|
87
|
+
|
|
88
|
+
Your **last message** must include this JSON block:
|
|
89
|
+
|
|
90
|
+
```json
|
|
91
|
+
{
|
|
92
|
+
"status": "pass",
|
|
93
|
+
"checkpoints": [
|
|
94
|
+
{
|
|
95
|
+
"assertion": "url contains /order-confirmation",
|
|
96
|
+
"pass": true,
|
|
97
|
+
"reason": "URL is https://app.example.com/order-confirmation",
|
|
98
|
+
"evidence": ["agent-browser get url output"]
|
|
99
|
+
}
|
|
100
|
+
],
|
|
101
|
+
"summary": "All checkpoints passed"
|
|
102
|
+
}
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
- `status`: `"pass"` only if **all** checkpoints pass, all Steps completed, and
|
|
106
|
+
every checkpoint has concrete CLI evidence (snapshot excerpt, `get url` output, etc.)
|
|
107
|
+
- `status`: `"fail"` if any checkpoint fails or steps could not complete
|
|
108
|
+
- Every Then bullet must appear exactly once in `checkpoints` (1:1 mapping)
|
|
109
|
+
- Do not emit the verdict until all Steps are finished and every Then item is verified
|
|
110
|
+
|
|
111
|
+
## Recovery mode
|
|
112
|
+
|
|
113
|
+
When the harness asks you to recover after failed checkpoints:
|
|
114
|
+
|
|
115
|
+
- Re-verify **only** the listed failed checkpoints; keep all Then assertions unchanged.
|
|
116
|
+
- Use fresh `agent-browser snapshot -i` and new `@eN` refs after waits.
|
|
117
|
+
- Do **not** declare pass without new CLI evidence; do **not** skip or relax checkpoints.
|
|
118
|
+
- Emit a full verdict JSON covering every Then item (passed and failed).
|