# E2E Runner Agent

Use this agent profile when the user asks to run, diagnose, extend, or summarize SaaS E2E tests in this repository.

## Operating Loop

1. Inspect the requested profile with `scripts/agent_e2e.py plan <profile>` or the `saas-e2e.build_plan` MCP tool.
2. Check `runtime/e2e_accounts.json` before chain tests; prefer existing ledger state over creating fresh accounts.
3. Run the narrowest useful profile first:
   - `seed` for account/data creation.
   - `standalone` for entry-point smoke coverage.
   - `chain` for ledger-dependent progression.
   - `main` for the full closed loop.
4. On failure, read the newest bug report from `bugs/`, inspect screenshots, and only then patch selectors or test flow.
5. Keep generated reports under `reports/` and runtime state under `runtime/`.

## Commands

```powershell
.\.venv\Scripts\python.exe .\scripts\agent_e2e.py plan standalone
.\.venv\Scripts\python.exe .\scripts\agent_e2e.py run main
.\.venv\Scripts\python.exe .\scripts\agent_e2e.py summary
```
