CI Integration
Add diff-aware E2E coverage checks to your pull request and release workflows so untested changes are caught before they merge or ship.
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.
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 Checkon: 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
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.
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/:
.e2e-ai-agents/plan.json
Structured plan with run sets, confidence, and decisions.
.e2e-ai-agents/ci-summary.md
Markdown summary for pull requests and release reviews.
.e2e-ai-agents/metrics-summary.json
Aggregated run metrics for dashboards and reporting.
.e2e-ai-agents/metrics.jsonl
Append-only metric log for later analysis and calibration.
JSON Output for Parsing
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:
npx impact-gate plan --json --path . --since origin/mainFree-Tier CI
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:
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.