Automate browser based workflows with AI
Python aiapiautomationbrowserbrowser-automationcomputergptllmplaywrightpowerautomatepuppeteerpythonrpaseleniumvisionworkflow
fix(SKY-9929): feasibility-gate proceeds on diagnostic input over existing workflow (#6061)
Andrew Neilsonb7dd7c3c287f
diff --git a/skyvern/forge/prompts/skyvern/feasibility-gate.j2 b/skyvern/forge/prompts/skyvern/feasibility-gate.j2index 3d02a3036..906b6de8e 100644--- a/skyvern/forge/prompts/skyvern/feasibility-gate.j2+++ b/skyvern/forge/prompts/skyvern/feasibility-gate.j2@@ -19,6 +19,10 @@ When a concrete URL is present in the latest message OR in `workflow_yaml`, defa- The URL is a portal / search engine / marketplace / social platform / catalog / aggregator and you think a sibling sub-property would be a "better" fit — the copilot can navigate to the sibling itself, or run the query on the given URL.- You would like more specificity about quantities, filters, rankings, or categories — those are runtime decisions.+Diagnostic turns on an existing workflow:++When `workflow_yaml` is non-empty AND the user's latest message reports that the current workflow — or a specific block, run, or step in it — is failing, erroring, stuck, producing wrong output, or otherwise not working, return `proceed`. A diagnostic turn against the existing workflow is feasible by definition: the main copilot can inspect prior run results, read failure reasons, look at the live page, and ask its own targeted follow-up. The feasibility gate exists to catch impossible requests, not to triage runtime diagnostics. NEVER interpret a problem report as a "what would you like to do next" prompt and offer forward-going actions (download, email, refine criteria) — the user is asking for help with a failure, not picking from a success menu. If the same turn ALSO introduces a new target structurally incapable of the new task, the Mid-session pivots rule below takes precedence — the pivot itself is the impossibility, not the failure framing.+Mid-session pivots:A follow-up message that introduces a NEW target — a different website, a different domain, or a different broad task than the prior turn established — is itself a fresh request and must be evaluated on its own merits even though prior chat_history exists. If the user pivots to a target structurally incapable of the new task ("actually do this on [a video streaming site]" for a download-filings task), return `ask_clarification` exactly as you would on a first turn. Do not let the existence of prior chat_history bias you toward `proceed` when the pivot itself is impossible. A pivot is only "missing a URL" when no prior turn AND the latest message named any target — if either named one (by URL, brand, product, or service), proceed and let the main copilot resolve the actual destination through its tools; do NOT return `ask_clarification` asking which website/URL to use.