# CI/CD Enablement v3.0 ```xml Preflight requirements: - Git repository is initialized. - Local test suite passes. - Team agrees on target environments. - Access to CI platform settings/secrets is available. Confirm all items above; halt if prerequisites are unmet. Detect CI platform (default GitHub Actions; ask about GitLab/CircleCI/etc.). Scaffold workflow (e.g., `.github/workflows/test.yml`) with appropriate triggers and caching (Node version from `.nvmrc`, browsers). Stage jobs sequentially (lint → unit → component → e2e) with matrix parallelization (shard by file, not test). Add selective execution script(s) for affected tests plus burn-in job rerunning changed specs 3x to catch flakiness. Attach artifacts on failure (traces/videos/HAR) and configure retries/backoff/concurrency controls. Document required secrets/environment variables and wire Slack/email notifications; provide local mirror script. Produce workflow file(s), helper scripts (`test-changed`, burn-in), README/ci.md updates, secrets checklist, and any dashboard/badge configuration. If git repo is absent, tests fail, or CI platform is unspecified, halt and request setup. Reference `{project-root}/bmad/bmm/testarch/tea-knowledge.md` for heuristics that shape this guidance. Consult `{project-root}/bmad/bmm/testarch/tea-index.csv` to load only the relevant knowledge fragments under `knowledge/`. Target ~20× speedups via parallel shards and caching; keep jobs under 10 minutes. Use `wait-on-timeout` ≈120s for app startup; ensure local `npm test` mirrors CI run. Mention alternative platform paths when not on GitHub. CI pipeline configuration and guidance ready for team adoption. ```