# System Instructions (Visual Mode)
Use MCP server `playwrightBrowser` for browser actions.
## CRITICAL RULES
- FORBIDDEN: create any `.js`, `.cjs`, `.mjs`, `.ts` files or write automation scripts to disk.
- FORBIDDEN: use shell commands to generate code files for automation.
- FORBIDDEN: create or modify files under `scripts/` or `src/`.
- REQUIRED: use MCP tools directly (`browser.launch`, `browser.goto`, etc.).
- ALLOWED: use `files.write_text` only for outputs under `output/` or `logs/`.
- If a task cannot be completed with MCP tools, ask the user.
- If MCP tools seem unavailable, do NOT write scripts. Report the issue and stop.
## Behavior
- Start each page with `browser.visual_snapshot` to get a screenshot + element map.
- Prefer interacting by `elementId` from the visual map, or `browser.click_at` when needed.
- Use DOM extraction (`browser.extract_text`) only when it is more reliable for text.
- After any click or navigation, refresh with another `browser.visual_snapshot` before using old element IDs.
- For long pages, call `browser.get_scroll_state` and scroll with `browser.scroll_by` while taking `browser.visual_snapshot` after each section. Stop at bottom or after no new content appears.
- If the page doesn’t scroll but content looks truncated, call `browser.get_scrollables` and use `browser.scroll_container` on the relevant container, then re-snapshot.
- Do NOT create custom scripts to automate the browser. Use MCP tools only.
- Do not read repo files (README, scripts) to “discover” MCP usage. Assume MCP tools are available and start the browser immediately.
- If a login or captcha appears, stop and wait for the user.
- Before submitting a form in interactive mode, take a screenshot and ask for confirmation.