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
1---2name: gate-ci3category: platform4maturity: stable5version: 16description: "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."7license: MIT8capabilities:9 - run full test suite10 - produce quality gate artifact11 - validate quality gate completion criteria12 - trace gate ci decisions across inputs, constraints, and failure paths13 - validate platform outcomes with evidence, assumptions, and explicit next steps14outputs:15 - type: object16 name: GateCiArtifact17 properties:18 trigger: { type: string, enum: [push-to-pr] }19 checks:20 type: array21 items:22 type: object23 properties:24 name: { type: string }25 status: { type: string, enum: [passed, failed, skipped] }26 durationMs: { type: integer }27 output: { type: string }28 maxDuration: { type: integer }29 blockOnFailure: { type: boolean }30 coverageThreshold: { type: integer }31 qualityBar: { type: boolean }32 result: { type: string, enum: [completed, blocked, failed] }33 required: [trigger, checks, maxDuration, blockOnFailure, coverageThreshold, result]34sideEffects: []35dependencies: []36stopCondition: Shift-left quality gate that runs on push-to-PR events complete; structured result returned; completion criteria checked.37risk: medium38trustTier: 139maxIterations: 340modelTier: fast41promptVersion: "2.0"42artifactType: plan43evaluators:44 - behavioral45 - regression46fixturesPath: .agents/skills/platform/fixtures/behavioral/gate-ci.json47diataxis: how-to48tags: [quality, ci, integration, gate]49compatibility: [implement, publish-open-pr, review-pr]50approvalRequired: false51approvalFor: []52metadata:53 source: https://skillmd.com/skills/quantumquirkxyz/gate-ci54---5556## Contract5758- Input: push-to-PR event, PR metadata, full repo state.59- Output: `GateCiArtifact` with full suite results, coverage data, and terminal state.60- Scope: CI-level checks — unit, integration, contract, security scan, performance regression, coverage.61- Rule: enforce 80% line coverage threshold for new/modified lines.62- Rule: max duration 30min (30 minutes); fail the gate if exceeded.63- Rule: block on failure; PR cannot be merged until gate passes.6465## Provenance6667| Question | Answer |68|---|---|69| What is the source of truth? | The push-to-PR event and PR metadata |70| What is in scope? | Full unit suite, integration tests, contract tests, security scan, performance regression, coverage |71| What is explicitly out of scope? | E2E tests, manual QA, production canary |72| Who or what consumes this artifact afterward? | `review-pr` or merge gate |73| What evidence proves it is done? | All checks completed, coverage threshold met, structured result returned |74| What risk remains? | Flaky tests; security scan false positives; performance regression baselines may need tuning |7576## Artifact7778Return `GateCiArtifact` as structured output in the current response. Do not write local artifact files unless the user explicitly asks for an export.7980## Process8182### 1. Run full unit suite83Execute the full unit test suite. Capture pass/fail counts, duration, and any failures.8485### 2. Run integration tests86Execute integration tests against a test environment. Capture results.8788### 3. Run contract tests89Execute contract tests (Pact, OpenAPI-driven Spectral, etc.) to verify API contracts are unbroken.9091### 4. Run security scan92Execute static analysis security scanner (semgrep, snyk) against the codebase. Capture findings by severity.9394### 5. Run performance regression95Execute performance test suite (k6, Gatling) against baseline. Flag regressions beyond configured thresholds.9697### 6. Check coverage98Measure line coverage for new/modified lines. Enforce 80% threshold. If below threshold, mark check as failed.99100### 7. Enforce time budget101Track elapsed time. If approaching 30min (30 minutes), skip remaining non-critical checks and mark as `skipped` with reason `time-budget-exceeded`.102103### 8. Aggregate and block104Compile all results into `GateCiArtifact`. Terminal state:105- Any `failed` → `blocked` (PR merge prevented)106- All `passed` and coverage met → `completed`107- Error → `failed`108109## Completion110111- full unit suite executed112- integration tests executed113- contract tests executed114- security scan completed115- performance regression executed116- coverage threshold enforced (80% lines)117- structured result returned118- PR blocked if any check failed