Principle:777genius Agent teams ai Quality Gates
| Knowledge Sources | |
|---|---|
| Domains | Release, Quality |
| Last Updated | 2026-10-22 00:00 GMT |
Overview
Pattern for running a full quality gate (type checking, linting, testing, build verification) plus critical-path coverage thresholds before a release is published.
Description
Quality Gates is the process of running a comprehensive set of checks to ensure release readiness. The `pnpm quality` script runs types + lint + test + build, and `pnpm test:coverage:critical` enforces coverage thresholds on critical paths.
Key gates:
- Type checking: `pnpm typecheck` uses the project's pinned native TypeScript compiler.
- Linting: ESLint with oxlint integration for fast linting.
- Testing: Vitest runs the full test suite with happy-dom environment.
- Build verification: `pnpm build` ensures the production build succeeds.
- Critical coverage: `pnpm test:coverage:critical` enforces coverage thresholds on critical code paths via `vitest.critical.config.ts`.
- Dead code detection: knip detects unused exports and dependencies.
- Format check: Code formatting is verified as part of `pnpm quality`.
Usage
Use this principle when establishing release quality gates for a TypeScript project, especially when multiple checking tools (types, lint, test, build, coverage) must all pass before a release.