Skip to content

CI Integration

Operational guide

Add diff-aware E2E coverage checks to your pull request and release workflows so untested changes are caught before they merge or ship.

What CI gets you

Make impact analysis part of the release pipeline

Start with deterministic planning in CI, then add gating and optional AI only after the route-family manifest is reliable enough to trust.

Core CI loop

The same workflow works in pull requests and releases

npx impact-gate impact --path . --since origin/main npx impact-gate plan --path . --since origin/main npx impact-gate gate --threshold 80 --path .

GitHub Actions Example

name: E2E Coverage Check
on:
pull_request:
branches: [main, master]
jobs:
e2e-coverage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version: 20
- name: Install impact-gate
run: npm install -D @yasserkhanorg/impact-gate
- name: Run coverage check
run: |
npx impact-gate plan \
--since origin/${{ github.base_ref }} \
--fail-on-must-add-tests \
--github-output "$GITHUB_OUTPUT"

Gate Command

Thresholds

Use gate when you want an explicit pass/fail decision

The gate command exits non-zero if overall coverage falls below the configured threshold, making it suitable as a required status check.

Gate example

Thresholds use percentage-style values

npx impact-gate gate --threshold 80 --path .

--threshold uses percentage-style values (0-100).

CI Artifacts

Every run produces files under .e2e-ai-agents/:

Plan artifact

.e2e-ai-agents/plan.json

Structured plan with run sets, confidence, and decisions.

PR summary

.e2e-ai-agents/ci-summary.md

Markdown summary for pull requests and release reviews.

Metrics summary

.e2e-ai-agents/metrics-summary.json

Aggregated run metrics for dashboards and reporting.

Event log

.e2e-ai-agents/metrics.jsonl

Append-only metric log for later analysis and calibration.

JSON Output for Parsing

Machine-readable output

Use JSON when another job needs to consume the result

Structured JSON output is useful when CI needs to branch on impact results or feed the plan into another reporting step.

Use --json to get structured log output suitable for CI pipelines:

Terminal window
npx impact-gate plan --json --path . --since origin/main

Free-Tier CI

No-key mode

Run the core planning loop in CI without any provider

Deterministic analysis only requires git, the repository, and the route manifest. Provider environment variables are optional.

For zero-cost CI runs, skip AI enrichment:

Terminal window
npx impact-gate impact --path . --since origin/${{ github.base_ref }}
npx impact-gate plan --path . --since origin/${{ github.base_ref }}

These commands use deterministic analysis only and require no API key. Add provider env vars only when you intentionally want AI enrichment on top of this baseline.