The local workspace contains two main product areas, each with a Vue 3 app, a Vue 2 app, and a Laravel backend. AMS lives under /root/myapp/admin with admin-2-vue (Vue 3), admin-vue (Vue 2), and admin-laravel, while Connect sits under /root/myapp/portal with portal-2-vue, portal-vue, and portal-laravel. Dev server ports are configured in vite.config.ts under server.port and in start_dev_servers.sh; for example, the Connect script starts portal-vue on 3445 and portal-laravel on 7677. A common pitfall is two Vite apps both defaulting to 5173 or 8080, which is solved by passing npm run dev -- --port 3437 (or another free port) so multiple stacks can run side by side.
Pointing Playwright at the right stack is a matter of baseURL and webServer. For an AMS test, baseURL should be the UI you're driving (e.g. admin-2-vue), while seed/reset calls go to the API separately. To cover both AMS and Connect with one suite, create separate Playwright projects with distinct baseURL and webServer settings, then run them together via --project=ams --project=connect. Tests should live under a dedicated e2e/ folder inside the relevant repo and be referenced via testDir in the config so agents know exactly where to add new specs.
Guiding an AI agent such as Codex CLI through Playwright work is mostly about giving it tight, scoped prompts. A useful template is: 'In /root/myapp/[ams|connect]/..., add Playwright tests under e2e/. Start servers via config webServer. Implement login via storageState. Run npx playwright test and show failures.' Equally important are guardrails: 'Do not change app code or update snapshots unless I explicitly ask. Prefer getByRole/getByLabel. If blocked, propose minimum data-testid additions and wait for approval.' Asking the agent to keep changes under a named folder, avoid committing secrets, and to summarize new files, commands, and assertions at the end yields reproducible, reviewable work. For Anki import, the deck itself follows the standard plain-text/TSV format with UTF-8 encoding, optional headers like #separator:Tab, #html:true, #deck:..., #notetype:..., #tags:..., and #tags column:N, where the first field controls duplicate detection on import and tags are space-separated either globally or in a dedicated column.