Skip to main content

Your first local gate

Start with one behavior in the repository you change. The local gate runs your checks against a reviewed baseline. No EvalGate account, API key, GitHub connection or model call is needed for this deterministic example. The local CLI gate is Experimental; feature status records its package and acceptance boundaries.

Install and preview

The first init writes nothing. Review its proposed files before explicit --apply. Use the scoped npx @evalgate/sdk: the unscoped evalgate npm package belongs to someone else. Package installation needs network access; the deterministic scaffold and gate make no requests to EvalGate.

Replace the placeholder with a real check

Create src/refund-policy.cjs:
For the generic Node scaffold, replace the contents of evals/smart-init/generic-node.eval.cjs in place. Do not leave an untouched placeholder beside a new spec: baseline acceptance refuses it. If your init plan selects another framework, use that plan’s generated spec path and adjust the relative import below.
This fictional policy illustrates a boundary check; it is not a production refund rule. Substitute your reviewed requirements. Spec names are literal strings so discovery can inspect them without executing application code.

Review and accept the baseline

Accept only a non-empty passing run. Never accept the untouched scaffold or update a baseline merely to turn a regression green. Review every proposed scaffold file and the staged changes before committing; keep unrelated work out of the baseline commit.

Break it, read it, fix it

Change > 30 to >= 30, then run the same command:
The gate blocks with exit 2: the day-30 case now returns deny. Inspect evals/regression-report.json and .evalgate/last-report.json. Fix the comparison and rerun; it should pass against the original baseline. A pass supports only the checks and evidence required by this gate, not universal safety or permission to deploy. Other nonzero exits can mean invalid evidence, configuration or infrastructure failure; see the exit contract.

Know the files

Two optional files are not local-init output: .evalgate/project.json is hosted organization/repository/root linkage, written by link after login; evalgate.product.json is product intent, written only by the Experimental understand --apply workflow. Local project = execution; dot-directory project = hosted linkage. Neither optional workflow belongs in this first gate. Continue with the same gate in CI. Later, use hosted setup for shared evidence or migration guidance to bring existing cases.