Implementation:777genius Agent teams ai pnpm quality
Appearance
| Knowledge Sources | |
|---|---|
| Domains | Release, Quality |
| Last Updated | 2026-10-22 00:00 GMT |
Overview
Concrete tool for running the full quality gate (types, lint, test, build) plus critical-path coverage thresholds, provided by the Agent Teams application.
Description
The pnpm quality script runs the complete quality gate pipeline, and pnpm test:coverage:critical enforces coverage thresholds on critical code paths. Both are defined in `package.json` scripts.
pnpm quality pipeline:
- Type checking: `pnpm typecheck` uses the project's pinned native TypeScript 7 compiler.
- Linting: ESLint with oxlint integration for fast linting; `pnpm lint:fix` auto-fixes (but should not be run during parallel agent work).
- Testing: Vitest runs the full test suite with happy-dom environment.
- Build: `pnpm build` ensures the production build succeeds.
pnpm test:coverage:critical:
- Uses `vitest.critical.config.ts` to run only critical-path tests.
- Enforces coverage thresholds on critical code paths.
- Separated from the full test suite for faster CI feedback.
Additional quality scripts:
- pnpm format: Code formatting.
- pnpm fix: Lint fix + format.
- pnpm check: Full quality gate (types + lint + test + build).
- pnpm guard:source-file-size: Rejects new production files above 800 lines.
- pnpm guard:team-provisioning-architecture: Prevents new facade inheritance.
Usage
- Pre-release: Run `pnpm quality` to ensure all gates pass.
- Critical coverage: Run `pnpm test:coverage:critical` for critical-path coverage.
- CI: Both commands are part of the CI pipeline.
Code Reference
Source Location
- Repository: agent-teams
- File: package.json (scripts section), vitest.critical.config.ts
Signature
# Full quality gate
pnpm quality
# Critical path coverage
pnpm test:coverage:critical
# Full check (alias)
pnpm check
# Format check + knip
pnpm fix
I/O Contract
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
| Source tree | directory | Yes | Full source tree (src/, test/, packages/) |
| vitest.critical.config.ts | config | Yes (critical) | Critical path test configuration |
Outputs
| Name | Type | Description |
|---|---|---|
| exit code | 1 | 0 = all gates passed; 1 = at least one gate failed |
| stdout | text | Type errors, lint violations, test results, coverage report |
Usage Examples
Running Full Quality Gate
# Run all quality checks
pnpm quality
# Expected output:
# ✓ Type checking passed
# ✓ Linting passed
# ✓ Tests passed
# ✓ Build succeeded
Critical Coverage Only
# Run critical-path coverage
pnpm test:coverage:critical
# Enforces coverage thresholds on critical code paths
# Faster than full test suite
Guard Rails
# Reject new files over 800 lines
pnpm guard:source-file-size
# Prevent facade inheritance in team provisioning
pnpm guard:team-provisioning-architecture
Related Pages
Implements Principle
Requires Environment
Page Connections
Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment