Modern QA2026Step 5 — Decide the opinionated defaults — tiles
Log inJoin
29 / 139 · 13 Browser Automation with Playwright · Quick Start Preparation: Turn Discovery into a Scaffolding-Ready Package← prev⊞ allnext →☰ Read as one page

2.9Step 5 — Decide the opinionated defaults

Before scaffolding, make these rules explicit.

Preferred stack

  • Node.js
  • TypeScript
  • Playwright Test
  • npm
  • ESLint
  • Prettier
  • dotenv
  • zod

Preferred API harness style

Use Playwright APIRequestContext by default for API automation.

Preferred pattern:

  • request context per appropriate scope
  • domain-specific wrapper clients
  • shared auth setup
  • schema validation with zod
  • explicit assertions for status, headers, and important body fields

Preferred UI harness style

  • selectors live inside the owning page object
  • page objects hold reusable page-specific actions
  • flows handle multi-page business behavior
  • assertion helpers hold reusable domain expectations
  • component objects exist only for reused page fragments

Preferred agent loop

At minimum:

Planner → Generator → Evaluator

Secondary roles can be added later:

  • Reviewer
  • Doc-gardener

Note that Playwright itself now ships first-party Test Agents (planner / generator / healer, since v1.56) scaffolded with npx playwright init-agents --loop=claude. They produce Markdown test plans in specs/ and a seed.spec.ts entry point. This harness keeps its own Planner → Generator → Evaluator loop because it covers more than test authoring (docs, plans, standards, CI), but the official agents are a good drop-in for the plan-and-generate portion — and the healer is worth adopting for flaky-locator repair either way.

Preferred repo-memory style

  • short root instruction files
  • deep guidance in docs/
  • plans written to files
  • handoffs written to files
  • evaluator reports written to files
  • future agents should be able to continue from repo state alone

These defaults should be visible in the final template.