AI-generated code is inflating test suites and slowing CI pipelines. This guide covers building a fast frontend CI pipeline by running only affected files rather than the entire codebase. Key techniques include: using git diff to detect changed files, walking the import graph backward to find all dependents, wrapping ESLint, TypeScript, and Vitest to accept filtered file lists, caching node_modules and tool caches (ESLint cache, tsbuildinfo) in GitHub Actions, sharding Playwright E2E tests across parallel machines, and building a custom route-aware affected spec selector for E2E tests. The guide also covers running the same checks locally via git hooks (Lefthook) with instructions for AI coding agents to prevent bypassing hooks with --no-verify.