# Gate CI

> Shift-left quality gate that runs on push-to-PR events. Executes the full unit suite, integration tests, contract tests, security scan (semgrep, snyk), performance regression (k6), and enforces an 80% line coverage threshold. Blocks on failure. Max duration: 30min.

- Skill: `quantumquirkxyz/gate-ci` (Agent Skill)
- Install (CLI): `npx get-skill add quantumquirkxyz/gate-ci`
- Raw SKILL.md: https://api.skillmd.com/api/skills/quantumquirkxyz/gate-ci/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Security
- License: MIT
- Author: quantumquirkxyz (https://skillmd.com/u/quantumquirkxyz)
- Updated: 2026-11-15
- Page: https://skillmd.com/skills/quantumquirkxyz/gate-ci

---


## Contract

- Input: push-to-PR event, PR metadata, full repo state.
- Output: `GateCiArtifact` with full suite results, coverage data, and terminal state.
- Scope: CI-level checks — unit, integration, contract, security scan, performance regression, coverage.
- Rule: enforce 80% line coverage threshold for new/modified lines.
- Rule: max duration 30min (30 minutes); fail the gate if exceeded.
- Rule: block on failure; PR cannot be merged until gate passes.

## Provenance

| Question | Answer |
|---|---|
| What is the source of truth? | The push-to-PR event and PR metadata |
| What is in scope? | Full unit suite, integration tests, contract tests, security scan, performance regression, coverage |
| What is explicitly out of scope? | E2E tests, manual QA, production canary |
| Who or what consumes this artifact afterward? | `review-pr` or merge gate |
| What evidence proves it is done? | All checks completed, coverage threshold met, structured result returned |
| What risk remains? | Flaky tests; security scan false positives; performance regression baselines may need tuning |

## Artifact

Return `GateCiArtifact` as structured output in the current response. Do not write local artifact files unless the user explicitly asks for an export.

## Process

### 1. Run full unit suite
Execute the full unit test suite. Capture pass/fail counts, duration, and any failures.

### 2. Run integration tests
Execute integration tests against a test environment. Capture results.

### 3. Run contract tests
Execute contract tests (Pact, OpenAPI-driven Spectral, etc.) to verify API contracts are unbroken.

### 4. Run security scan
Execute static analysis security scanner (semgrep, snyk) against the codebase. Capture findings by severity.

### 5. Run performance regression
Execute performance test suite (k6, Gatling) against baseline. Flag regressions beyond configured thresholds.

### 6. Check coverage
Measure line coverage for new/modified lines. Enforce 80% threshold. If below threshold, mark check as failed.

### 7. Enforce time budget
Track elapsed time. If approaching 30min (30 minutes), skip remaining non-critical checks and mark as `skipped` with reason `time-budget-exceeded`.

### 8. Aggregate and block
Compile all results into `GateCiArtifact`. Terminal state:
- Any `failed` → `blocked` (PR merge prevented)
- All `passed` and coverage met → `completed`
- Error → `failed`

## Completion

- full unit suite executed
- integration tests executed
- contract tests executed
- security scan completed
- performance regression executed
- coverage threshold enforced (80% lines)
- structured result returned
- PR blocked if any check failed

