How Impact Gate Works
Impact Gate is easiest to understand as one pipeline: read a diff, map it to product areas, compare that to coverage, and only then decide whether AI should help extend the suite.
Diff in, evidence out, AI last
01 read a diff
02 map changed files to product areas
03 compare those areas to E2E coverage
04 produce a plan and a gate decision
05 optionally generate or heal with guardrails
The strongest story is deterministic first
The product is not “an AI test generator” first. It is a diff-aware evidence layer that becomes more valuable once a team trusts what it is telling them.
Core Mental Model
The product is not “an AI test generator” first. Its strongest path is deterministic:
- read a git diff
- determine what changed
- determine what should run
- determine what is missing
- decide whether the current PR or release candidate is ready
That deterministic path is why impact, plan, and gate are the core commands.
Step 1: Diff In
Everything starts with a git comparison
origin/mainfor pull requests- a previous release tag for release readiness
- a hotfix base for emergency verification
Release-ready plan from one tag
npx impact-gate plan --path . --since v2.1.0
Everything starts with a git comparison. In practice, teams use:
Step 2: Knowledge Layer
The diff is interpreted through what the repo already knows
- route families map code paths to product areas and flows
- dependency graph catches transitive impacts
- traceability adds file-to-test evidence from CI history
- historical failure data can raise confidence that an area needs attention
This is what turns files into flows and tests
Without the knowledge layer, you only know which files changed. With it, you can reason about which product areas and E2E checks actually matter.
The diff is interpreted through project knowledge:
Step 3: Coverage Planning
Coverage planning answers what changed, what to run, and what is missing
- what is impacted
- what should run now
- what confidence we have in that decision
- what flows appear under-covered
- whether new tests or more manual verification are needed
plan produces a structured answer to:
The main artifacts are written under .e2e-ai-agents/.
Step 4: Gate Decision
Gate turns the plan into a CI policy decision
- advisory while onboarding
- threshold-based blocking once the manifest is trustworthy
- stronger enforcement for release branches or critical paths
gate turns the plan into a CI decision. This is where you decide how strict to be:
Step 5: Optional AI With Guardrails
The AI path helps only after the deterministic picture exists
- enrich flow understanding
- generate specs for uncovered gaps
- heal failing generated specs
- power deeper exploratory or crew workflows
The generation path uses local API-surface grounding, prompt sanitization,
hallucination detection, quarantine into generated-needs-review/,
compile checks, and smoke-run verification.
AI enters after the deterministic evidence is already established.
The AI layer is used to:
See AI Guardrails for the full safety model.
Why This Matters
Every layer answers a different confidence question
- the diff explains why you are testing
- the manifest explains what feature was affected
- the plan explains what is covered
- the gate explains whether confidence is high enough
- the AI layer helps only after that foundation is already in place
This keeps the product honest
The tool feels stronger because it can justify every recommendation with artifacts and repo knowledge, not just a prompt and a model opinion.