# AGENTS.md instructions for 用于浏览器自动化和 UI 验证的 Playwright CLI

Use 用于浏览器自动化和 UI 验证的 Playwright CLI only for: 从命令行运行浏览器测试、生成 trace，并验证用户流程。

## Default behavior

- Prefer non-interactive commands and stable output formats: json, junit, html, text.
- Start with read-only inspection commands before changing state.
- Show the exact command before destructive or deployment actions.
- Require explicit user approval for commands marked `requires-review` or `destructive`.

## Useful commands

- safe: `npx playwright test` — Runs browser tests in CI or locally.
- safe: `npx playwright show-report` — Inspects the generated HTML report.
- requires-review: `npx playwright codegen https://example.com` — Records browser actions for a target site.

## Safety notes

- Browser automation should avoid destructive authenticated flows unless explicitly approved.
- Use screenshots, traces, and test reports as evidence for agent conclusions.