From c93f15663050334045f513ece670b45271f37bb7 Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 13 Mar 2026 22:26:42 +0000 Subject: [PATCH] improve demo pacing and add natural mouse movement to script prompt MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Replace blanket waitForTimeout(1500) rule with tiered timing: 300ms between routine actions, 800ms only after key visual moments (animations, state changes, panel openings). Eliminates stacked pauses. - Add mouse movement section: model should add a single intermediate waypoint before each target so the cursor doesn't teleport between interactions. Keeps it subtle — one waypoint, plausible coordinates. https://claude.ai/code/session_01WpqwtdViucvCCdgxj6RCGG --- packages/core/src/generator/prompts.ts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/packages/core/src/generator/prompts.ts b/packages/core/src/generator/prompts.ts index 182075c..bd6a233 100644 --- a/packages/core/src/generator/prompts.ts +++ b/packages/core/src/generator/prompts.ts @@ -24,7 +24,6 @@ export function buildScriptGenerationPrompt(options: ScriptPromptOptions): strin ## Rules - Navigate to the affected pages - Interact with new/changed UI elements (click buttons, fill forms, hover states) -- Add \`await page.waitForTimeout(1500)\` pauses on key visual states so the recording captures them clearly - Use resilient selectors in priority order: text content > ARIA roles > test IDs > CSS classes - The script must be self-contained and immediately runnable - Total demo should be under ${options.maxDuration} seconds @@ -33,6 +32,16 @@ export function buildScriptGenerationPrompt(options: ScriptPromptOptions): strin - Do NOT inject code into the page via \`page.evaluate\`, \`page.addInitScript\`, or inline \`