Repository navigation
v0.0.6
Release 0.0.6
Pregate v0.0.6, core 0.0.1. macOS ARM64 stays the stable platform. Linux and Windows archives stay experimental until native validation is recorded.
Install 0.0.6, 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.
0.0.5 added the path from an instruction file to rules. This release is what the first trial of that path on a production repository changed. The trial is published as a case study, with what it measured and what it did not.
No folder outside the layer rules
A file in no layer is unrestricted. With a partial layer map, code moved to an uncovered folder imported anything and the check stayed quiet, while the same import from a declared layer was reported.
pregate layers apply <map.json> --preview --completerefuses a map that leaves a source file in scope in no layer, or under which a folder created later would be in none, and names the folders.- A catch-all layer such as
src/**closes the gap. The most specific layer path still wins, so it takes only the files no other layer names. - Partial maps are unchanged, and so are the engine and the contract format. Completeness is a property of the map, and it is opt-in.
Rules from prose, with their exceptions
- A
compile applyproposal can state where the code is allowed withexcept, a list of globs. The drafted rule ignores those paths, and the engine proves it before staging: the failing code placed under each excepted path must pass. - A first layer map, or new layers beside existing ones, no longer prints
WARNING: this may weaken protectionwhen the new globs share a path prefix. A new glob that can take a file from a layer that already had it still warns.
In the trial, one rule made from a statement about money was exact as a pattern and broader than the statement: 5 of 15 sampled findings were money, and 8 were hours, a coordinate or a percentage. A rule like that needs a path scope or stays in advisor mode. The case study has the sample.
A large file no longer stalls analysis
One vendored 1.9 MB, 68,000-line JavaScript bundle made an audit run for more than ten minutes. Three questions with one answer per node were asked again for every candidate. Each is now answered once per node, and findings are unchanged.
| On an Apple M5 Pro, engine run from source | Before | After |
|---|---|---|
| Check of that file, 194 rules | not finished at 120 s | 7.2 s |
| Audit of the 13,499-file repository | not finished at 600 s | 86 s |
Clearer first run and audit
- First-run instructions name one command,
pregate guide --preview. It already proposed advisor mode for a new project; the setup notice,status, the setup messages, the README and the skill no longer add--enforcement advisor. An end-to-end test covers the path: no mode flag, an advisor finding that does not block the write, promotion, then the same edit denied. - The human output of
pregate auditends with a line that states the exit code of that run and what it means.Exit 2is an incomplete audit, not a count of violations, and the line names the cause. Exit codes are unchanged.
Routine commands work in an enabled project
Since 0.0.5 the shell guard refused commands an agent runs all the time in a project with an approved contract. A measurement of 101 routine commands through the real pre hook found 32 refusals. This release leaves 10.
| Refused in 0.0.5 | Why | Now |
|---|---|---|
cd src, type, read, wait, umask on macOS |
A shell builtin was looked up on PATH, and macOS ships /usr/bin/cd and its siblings as scripts with a computed command name |
A builtin is never looked up |
bun test in a project with a test directory |
Read as Bun running a script named test |
A Bun subcommand is not a script file |
pregate layers, pregate compile |
Not on the list of commands an agent may run, although the skill tells the agent to run them | Allowed when they read or prepare a review; no form that applies one is |
npm install, npm test, npx |
npm is a Node script and was read like a project script |
An installed tool outside every project is read for control commands only |
The last row is a trade. A script planted in a PATH folder outside the project is no longer refused before it writes; Stop, the pre-commit check and the CI ratchet judge the tree it leaves. A script on PATH inside a project, such as node_modules/.bin, is still read whole. Guarantees and limits states it.
Still refused, and listed in Shell guard friction with the corpus, the method and a labeled sample from one real session: a read-only project script that imports a file-system module (bun scripts/report.ts, python3 scripts/count.py), a script named through a variable, and a script whose text names a control command in prose. No anti-evasion rule was added.
Two gaps found by a real run against the installed agents
The end-to-end runner was run against the installed Claude Code 2.1.322, Codex 0.167.0, Cursor 2026.11.05, Grok 1.0.80 and Antigravity (agy) 1.5.3. It found two cases where a forbidden edit was written. Both are fixed, and the multi-harness notes record the run.
- Antigravity 1.5.3 edits are gated again. agy 1.5.3 renamed its edit tools, the registered matcher named only the older ones, and no pre hook ran. Stop still blocked the turn. Run
pregate setupagain after the update to register the new matcher. - A hung pinned engine no longer fails open for a project below the session's folder. With the session started in a parent folder and the edit in a nested enabled project, a pinned engine that hung let the write through.
Also in this release
- The architecture notes state the CI latency gate as it runs: the 150 ms budget belongs to the reference machine, and CI fails on a regression against each platform's baseline.
- Windows CI: every temporary directory cleanup in the suites waits out the lock Windows keeps on a just-run engine, and a test with no deadline of its own gets 20 s there.
What this release does not establish
-
No live agent session was measured. The case study has no count of edits stopped before a pull request.
-
One rule's findings were sampled. There is no false-positive rate.
-
The latency in the case study is the pre-check command run from source, not the registered hook with the compiled engine.
-
The friction measurement is a hand-assembled corpus on one macOS machine. It is not a rate for any real session, and the result depends on which tools a machine has as scripts.
The changelog lists every change. Guarantees and limits changed in one place: a script found on PATH.