# Automation Expansion v3.0 ```xml Preflight requirements: - Acceptance criteria are satisfied. - Code builds locally without errors. - Framework scaffolding is configured. Verify all requirements above; halt if any fail. Review story source/diff to confirm automation targets. Review quality heuristics from `{project-root}/bmad/bmm/testarch/tea-knowledge.md` before proposing additions. Use `{project-root}/bmad/bmm/testarch/tea-index.csv` to pull supporting fragments from `knowledge/` as needed. Ensure fixture architecture exists (Playwright `mergeTests`, Cypress commands); add apiRequest/network/auth/log fixtures if missing. Map acceptance criteria using `{project-root}/bmad/bmm/testarch/test-levels-framework.md` and avoid duplicate coverage. Assign priorities using `{project-root}/bmad/bmm/testarch/test-priorities-matrix.md`. Generate unit/integration/E2E specs (naming `feature-name.spec.ts`) covering happy, negative, and edge paths. Enforce deterministic waits, self-cleaning factories, and execution under 1.5 minutes per test. Run the suite, capture Definition of Done results, and update package.json scripts plus README instructions. Create new/enhanced spec files grouped by level, supporting fixtures/helpers, data factory utilities, updated scripts/README notes, and a DoD summary highlighting remaining gaps. If the automation target is unclear or the framework is missing, halt and request clarification/setup. Never create page objects; keep tests under 300 lines and stateless. Forbid hard waits/conditional flow; co-locate tests near source. Flag flaky patterns immediately. Reference `tea-index.csv` tags (e.g., fixture-architecture, selective-testing, ci-burn-in) to load the right fragment instead of the entire knowledge bundle. Prioritized automation suite updates and DoD summary ready for gating. ```