Skip to content

Quick Start

Core workflow

Learn how to install Impact Gate, run diff-aware impact analysis, and turn the result into a release-ready test plan in minutes. The same commands work for pull requests, release branches, and previous shipped tags.

What this gets you

Go from diff to test plan in one short loop

All three steps below are free-tier, require no API key, and work for pull requests, release branches, and previous shipped tags.

Two commands

Review your PR, then gate it

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

Step 1: Install

01

Install the package into the repo

Add the CLI as a dev dependency so impact analysis and planning run next to the test suite.

Terminal window
npm install -D @yasserkhanorg/impact-gate

Step 2: Review Your PR

02

See what changed, what's tested, and what's missing

The review command combines impact analysis, behavior analysis, coverage planning, and defect prediction into one report. No API key needed.

Point the tool at your project and diff against your base branch:

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

This outputs: which user flows changed, existing test coverage, coverage gaps, defect risk score, and specific test recommendations.

For release readiness, diff against the previous shipped tag:

Terminal window
npx impact-gate review --path . --since v2.1.0

Step 3: Generate Missing Tests (Optional)

03

Turn coverage gaps into ready-to-run test files

Add --generate to produce E2E test files for uncovered flows. Requires an LLM API key.

Terminal window
npx impact-gate review --path . --since origin/main --generate

The generator uses your project’s existing test patterns, page objects, and API surface to produce grounded test code. Generated files go through compile checks and smoke runs.

For CI PR comments, add --ci-comment-path:

Terminal window
npx impact-gate review --path . --since origin/main --ci-comment-path comment.md

Lower-level commands

The review command combines impact, plan, and predict. You can still use them individually for granular CI pipelines:

Terminal window
npx impact-gate impact --path . --since origin/main # just impact analysis
npx impact-gate plan --path . --since origin/main # coverage plan + artifacts
npx impact-gate gate --threshold 80 --path . # CI pass/fail gate

Why The AI Path Is Safer Than Raw Generation

Deterministic first

The plan exists before the model does

Diff analysis, impact mapping, and coverage planning happen before generation enters the loop.

Repo grounding

Prompts are constrained by local API knowledge

Page objects, helpers, signatures, and inherited methods are discovered before prompting.

Detection

Suspicious calls are flagged after generation

Invented methods and fabricated helpers are caught instead of silently landing in the main suite.

Verification

Generated specs still need to earn trust

Compile checks and smoke runs are used before a generated spec counts as verified.

When you later enable generation or healing, impact-gate does not just trust whatever the LLM writes.

  • The diff and coverage plan are established first with deterministic analysis
  • Generation prompts are grounded in your repository’s discovered page objects and helpers
  • The generator is told to use only known methods and fall back to raw Playwright selectors when needed
  • Suspicious method calls are detected after generation and blocked into generated-needs-review/
  • Written specs are compile-checked and smoke-run before they count as verified

What Next?

Confidence

Make the deterministic path trustworthy first

  • Run train --no-enrich to improve route-family accuracy
  • Add gate --threshold 80 in CI once plan output looks trustworthy
  • Add a CI integration to gate PRs on coverage
Expansion

Layer in graph bootstrap and optional AI later

  • If you already have an Understand-Anything knowledge graph, run bootstrap instead of train
  • Try crew --workflow quick-check for strategy recommendations on top of the core CI loop
  • Set up cost controls before enabling AI features