Repository navigation
Install on macOS or Linux:
curl -fsSL https://github.com/pedroknigge/pregate/releases/download/v0.0.12/install.sh | sh
Install on Windows PowerShell:
irm https://github.com/pedroknigge/pregate/releases/download/v0.0.12/install.ps1 | iex
Each archive and SHA256SUMS has a Sigstore bundle (.bundle) from cosign sign-blob (GitHub OIDC) and a GitHub artifact attestation. Verification steps are in docs/guides/installation.md.
Release 0.0.12
Pregate v0.0.12, core 0.0.1. macOS ARM64 stays the stable platform. Linux and Windows archives stay experimental until native validation is recorded.
Install 0.0.12, then review the project update it prepares (pregate update --project --preview) and approve that exact digest. A global update prepares that review for each enabled project whose lock still pins an older engine.
If you installed Pregate globally, with install.sh, install.ps1, npm i -g pregate, or npx pregate, update that installation so the hooks use 0.0.12. Run pregate update. It installs this engine and prepares a review for each enabled project that still pins an older one. Approve that review before the project runs on 0.0.12. A hook keeps using the engine the project already pinned until that review is approved.
This release adds checks you turn on yourself. A new methodology is not part of an existing preset. Select it with pregate pack enable. Pregate still enforces a project only where someone ran pregate enable. A directory that was never enabled, and a checkout that was disabled, block nothing. No rule was removed or downgraded.
Opt-in, and only where the project is enabled
Global hooks stay installed. They do not enforce a directory with no enable record.
The methodologies in this release are architecture/structure, node/operations, maintainability/proxies, typescript/compiler, and typescript/checked. Enable one with pregate pack enable, for example pregate pack enable architecture/structure. The rules run only where pregate enable is in effect. Approving the methodology does not start enforcement in a directory that was never enabled, or in a checkout that was disabled.
Presets that already select typescript/strict-types or typescript/discipline do not gain typescript/compiler or typescript/checked. human-maintainability stays 1.0.0 and does not include maintainability/proxies.
Architecture structure
Architecture pack 1.4.0 adds architecture/structure (#129).
ARCH-CYCLE-001 denies an edit that creates or enlarges a TypeScript or JavaScript import cycle. An existing cycle may stay.
ARCH-FILE-001 caps a file at 400 code lines by default. ARCH-EXPORT-001 caps public exports at 20 by default. An existing excess may stay when the edit does not raise it.
ARCH-HERIT-001 warns when a class extends chain is deeper than 3.
The engine metric vocabulary adds file.lines, file.publicExports, and heritage.depth. A metric may set ratchet: "no-increase", which grandfathers an existing excess even when the preset ratchet is strict. diff accepts count: "import-cycles".
forbidden-path reports a reviewed path that matches params.globs. No Node pack rule is bound to that primitive yet.
Node operations
The node pack is 1.4.0. node/operations is preview (#128). It adds thirteen checks from the Node.js invariant triage. They run only after pregate pack enable node/operations.
Five are fitness evidence:
NODE-LOCK-001is the Node.js side of coreCORE-INV-050: a committed lockfile, andnpm ci,pnpm install --frozen-lockfile, oryarn install --immutablein CI. It is not a shell gate.NODE-ENVFILE-001requires.envin.gitignoreand a committed.env.example. It stays fitness because the Node pack has not boundforbidden-path.NODE-PIN-001requires a readable Node.js pin. The pack already reads.nvmrc,.node-version,.tool-versions,engines.node, andvolta.node.NODE-SCRIPTS-001requires--ignore-scriptsor a reviewed install-script allowlist.NODE-EDGE-001is the edge-header evidence when headers are not in the process.
Eight are syntax proxies, each with a fidelity label: a graceful close on SIGTERM and SIGINT, HTTP timeouts and a body limit, /health and /ready, a startup process.env schema parse, Helmet or equivalent headers, a request id plus pino or winston, wrapped async route handlers, and logger arguments named like secrets.
A handler for uncaughtException or unhandledRejection must process.exit or rethrow. That requirement stays NODE-UNCAUGHT-001 in node/internals 1.2.0 (node/process/no-uncaught-exception-empty 1.1.0). It is not a second id. SQL injection, XSS, CORS, source secrets, fetch timeouts, and stack traces stay in vibe-proof. Empty catch stays clean-code/CC-ER-002. Import cycles stay with the architecture pack.
Maintainability proxies
Maintainability pack 1.3.0 adds maintainability/proxies (#130). The methodology is preview. Enable it with pregate pack enable maintainability/proxies. The coverage map is packs/maintainability/PROXIES.md. These rules run only where pregate enable has turned the project on.
MAINT-MAGIC-001warns on a numeric literal outside the allowlist.MAINT-TEST-001looks for a domain sibling or a mirrored test.MAINT-ADR-001looks for an ADR path in the same diff as a configured architecture file.MAINT-TODO-001looks for an issue reference on TODO and FIXME, beside the owner check.MAINT-FLAG-001warns when a configured risky path does not import a feature-flag module.MAINT-CHURN-001warns when a file that already changes often also grows.MAINT-AND-001warns on function names that use the wordsAndorThen.
God-module size and import cycles stay with the architecture pack.
TypeScript compiler and checked edits
TypeScript pack 1.4.0 adds typescript/compiler and typescript/checked (#131). They run only where the project enables those methodologies.
TS-CFG-001 reads a merged tsconfig, including extends, for one strict contract: strict, noUncheckedIndexedAccess, noImplicitOverride, noImplicitReturns, noFallthroughCasesInSwitch, forceConsistentCasingInFileNames, verbatimModuleSyntax, a target of ES2022 or newer, and moduleResolution of bundler, node16, or nodenext. strict: true is one finding, not eight. skipLibCheck and exactOptionalPropertyTypes warn and do not deny. tsc --noEmit and eslint stay on core/CORE-INV-056. The pack does not add a fitness command.
The other new rules are same-file or count proxies: type-only imports, prefer-const, I interface prefixes, a parser between JSON.parse or .json() and a typed use, readonly exported arrays, a copy before sort or reverse on a parameter, { cause } on a rethrow, a reason on @ts-expect-error and @ts-ignore, and separate no-increase ratchets for any and non-null !.
Boolean parameters and boolean property bags are one family in the senior pack. SR-FLAG-001 matches a boolean parameter. Senior pack 1.3.0 adds SR-FLAG-002, a low-fidelity warning that counts two or more boolean fields on one exported type. The TypeScript pack does not declare a second copy. The two rules do not match the same syntax. SR-FLAG-002 is part of senior/fowler, so a project that already selected that methodology gets the rule when the updated pack is reviewed. It is not its own methodology. A project that never selected senior/fowler does not start enforcing it.
Antigravity Auto still asks
Antigravity 1.5.7 made Auto the default agent mode where that mode is available, including agy -p, and Default where it is not (#126). Auto is not always-proceed and not Turbo.
An interactive session whose saved agentMode is auto, accept-edits, plan, or "" still receives force_ask for a literal pregate approve. strict still asks. A --settings overlay that sets neither toolPermission nor permissionPreset leaves that decision to the saved file.
On agy 1.5.9, --mode=auto reported the enable-auto-permission-preset rollout off and continued in Default. In that session a hook deny still blocked a contract write, including under --dangerously-skip-permissions. Headless -p did not apply pregate approve. A checkout that was never enabled, and one disabled with pregate disable, still got an empty hook reply.
On Windows the ancestor walk asks for one process at a time and still reads CommandLine only for an agy process. A snapshot of every process could pass the query deadline and was then treated as unreadable, which dropped force_ask.
Grok fails closed when the pre hook does not answer
The shared PreToolUse hook sets failClosed: true (#127, #45). Grok Build 1.0.71 and newer denies the tool when that hook crashes or times out inside a directory pregate enable covers. The Unix and Windows launchers decide that before either starts the engine.
A directory that was never enabled, and a checkout that was disabled, exits 0 with empty stdout when the engine is missing, crashes, or would hang. That includes a machine where another project is enabled. The pre hook does not print the disabled notice. pregate status still names the scope. A worktree disable and a project disable are not enforced.
An enforced checkout whose .git is a directory is recognized without starting git, so the timed hook does not pay for that process.
Grok 1.0.70 ignores the unknown field and keeps its fail-open crash. An allow stays empty stdout and exit 0. On Grok 1.0.77 that allow still lets the tool run. Stop, SessionStart, and project Claude hooks do not set the field.
What this release does not establish
- No rule was disabled, downgraded, or removed. Timeouts, thresholds, and the committed latency baselines are unchanged. The macOS latency gate still fails by runner noise at times.
- The new methodologies stay off until
pregate pack enableselects them and a human approves that review. Enforcement still happens only wherepregate enableran. forbidden-pathhas no Node pack rule bound to it.NODE-ENVFILE-001remains fitness evidence.node/operationsandmaintainability/proxiesare preview. The syntax proxies are labeled for fidelity. They are not a proof of the production behavior they stand in for.SR-FLAG-002warns. It counts boolean fields. It does not prove a hidden mode.- Grok 1.0.70 does not read
failClosed. A crash there stays fail-open. - The full suite does not run on macOS in CI. macOS runs the latency and release-build jobs there, and the suite on the maintainer's machine.
The changelog lists every change.