@gate-forge/cli 0.8.0 → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +78 -1143
- package/dist/adapter-audit.d.ts +54 -0
- package/dist/adapter-audit.d.ts.map +1 -1
- package/dist/adapter-audit.js +48 -0
- package/dist/adapter-audit.js.map +1 -1
- package/dist/adapter-scaffold.d.ts +28 -3
- package/dist/adapter-scaffold.d.ts.map +1 -1
- package/dist/adapter-scaffold.js +145 -24
- package/dist/adapter-scaffold.js.map +1 -1
- package/dist/args.d.ts.map +1 -1
- package/dist/args.js +2 -0
- package/dist/args.js.map +1 -1
- package/dist/behavior-setup.d.ts.map +1 -1
- package/dist/behavior-setup.js +18 -5
- package/dist/behavior-setup.js.map +1 -1
- package/dist/commands/adapters.d.ts.map +1 -1
- package/dist/commands/adapters.js +73 -2
- package/dist/commands/adapters.js.map +1 -1
- package/dist/commands/adopt.d.ts +7 -0
- package/dist/commands/adopt.d.ts.map +1 -1
- package/dist/commands/adopt.js +35 -1
- package/dist/commands/adopt.js.map +1 -1
- package/dist/commands/blocking.d.ts +25 -1
- package/dist/commands/blocking.d.ts.map +1 -1
- package/dist/commands/blocking.js +64 -5
- package/dist/commands/blocking.js.map +1 -1
- package/dist/commands/check.d.ts.map +1 -1
- package/dist/commands/check.js +60 -2
- package/dist/commands/check.js.map +1 -1
- package/dist/commands/classify.d.ts +1 -1
- package/dist/commands/classify.d.ts.map +1 -1
- package/dist/commands/classify.js +63 -18
- package/dist/commands/classify.js.map +1 -1
- package/dist/commands/enforcement.d.ts.map +1 -1
- package/dist/commands/enforcement.js +81 -4
- package/dist/commands/enforcement.js.map +1 -1
- package/dist/commands/explain.d.ts +1 -1
- package/dist/commands/explain.d.ts.map +1 -1
- package/dist/commands/explain.js +162 -3
- package/dist/commands/explain.js.map +1 -1
- package/dist/commands/init-presets.d.ts +7 -0
- package/dist/commands/init-presets.d.ts.map +1 -1
- package/dist/commands/init-presets.js +10 -1
- package/dist/commands/init-presets.js.map +1 -1
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +386 -39
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/next.d.ts.map +1 -1
- package/dist/commands/next.js +103 -5
- package/dist/commands/next.js.map +1 -1
- package/dist/commands/test-gates.js +1 -1
- package/dist/commands/tests.d.ts.map +1 -1
- package/dist/commands/tests.js +39 -7
- package/dist/commands/tests.js.map +1 -1
- package/dist/docs-exclusions.d.ts.map +1 -1
- package/dist/docs-exclusions.js +18 -3
- package/dist/docs-exclusions.js.map +1 -1
- package/dist/endpoint-compiler.d.ts.map +1 -1
- package/dist/endpoint-compiler.js +49 -1
- package/dist/endpoint-compiler.js.map +1 -1
- package/dist/evaluate.d.ts +16 -1
- package/dist/evaluate.d.ts.map +1 -1
- package/dist/evaluate.js +12 -2
- package/dist/evaluate.js.map +1 -1
- package/dist/gateforge-owned.d.ts +78 -0
- package/dist/gateforge-owned.d.ts.map +1 -0
- package/dist/gateforge-owned.js +254 -0
- package/dist/gateforge-owned.js.map +1 -0
- package/dist/git-hooks.d.ts +18 -0
- package/dist/git-hooks.d.ts.map +1 -1
- package/dist/git-hooks.js +21 -1
- package/dist/git-hooks.js.map +1 -1
- package/dist/git-ignored.d.ts +27 -0
- package/dist/git-ignored.d.ts.map +1 -0
- package/dist/git-ignored.js +102 -0
- package/dist/git-ignored.js.map +1 -0
- package/dist/glob.d.ts +33 -14
- package/dist/glob.d.ts.map +1 -1
- package/dist/glob.js +96 -5
- package/dist/glob.js.map +1 -1
- package/dist/index.d.ts +4 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/io.d.ts +18 -5
- package/dist/io.d.ts.map +1 -1
- package/dist/io.js +5 -4
- package/dist/io.js.map +1 -1
- package/dist/pipeline.d.ts +16 -1
- package/dist/pipeline.d.ts.map +1 -1
- package/dist/pipeline.js +23 -3
- package/dist/pipeline.js.map +1 -1
- package/dist/planes-inference.d.ts +12 -5
- package/dist/planes-inference.d.ts.map +1 -1
- package/dist/planes-inference.js +13 -15
- package/dist/planes-inference.js.map +1 -1
- package/dist/repo-scan.d.ts +7 -0
- package/dist/repo-scan.d.ts.map +1 -1
- package/dist/repo-scan.js +109 -8
- package/dist/repo-scan.js.map +1 -1
- package/dist/route-plane-proposals.d.ts +100 -0
- package/dist/route-plane-proposals.d.ts.map +1 -0
- package/dist/route-plane-proposals.js +213 -0
- package/dist/route-plane-proposals.js.map +1 -0
- package/dist/scope.d.ts +20 -0
- package/dist/scope.d.ts.map +1 -1
- package/dist/scope.js +26 -5
- package/dist/scope.js.map +1 -1
- package/dist/singleton-guidance.d.ts +15 -6
- package/dist/singleton-guidance.d.ts.map +1 -1
- package/dist/singleton-guidance.js +30 -10
- package/dist/singleton-guidance.js.map +1 -1
- package/dist/unmatched-routes.d.ts +60 -0
- package/dist/unmatched-routes.d.ts.map +1 -0
- package/dist/unmatched-routes.js +131 -0
- package/dist/unmatched-routes.js.map +1 -0
- package/guides/CONNECT-YOUR-PROJECT.md +78 -20
- package/guides/QUICKSTART.md +55 -10
- package/guides/REFERENCE.md +1710 -0
- package/guides/TEST-ENVIRONMENT.md +8 -5
- package/guides/UPGRADE-0.8-to-0.9.md +104 -0
- package/package.json +10 -10
package/guides/QUICKSTART.md
CHANGED
|
@@ -14,11 +14,11 @@ Example for a React frontend, FastAPI backend, and SQLAlchemy data layer:
|
|
|
14
14
|
|
|
15
15
|
```sh
|
|
16
16
|
npm i -D \
|
|
17
|
-
@gate-forge/cli@0.
|
|
18
|
-
@gate-forge/pack-playwright@0.
|
|
19
|
-
@gate-forge/pack-http@0.
|
|
20
|
-
@gate-forge/pack-fastapi@0.
|
|
21
|
-
@gate-forge/pack-sqlalchemy@0.
|
|
17
|
+
@gate-forge/cli@0.9.0 \
|
|
18
|
+
@gate-forge/pack-playwright@0.9.0 \
|
|
19
|
+
@gate-forge/pack-http@0.9.0 \
|
|
20
|
+
@gate-forge/pack-fastapi@0.9.0 \
|
|
21
|
+
@gate-forge/pack-sqlalchemy@0.9.0
|
|
22
22
|
```
|
|
23
23
|
|
|
24
24
|
Use the project-local `gateforge` binary from your npm script or add `node_modules/.bin` to your shell `PATH`. If the scan recommends other packs, add only the ones your code uses, at the same version. A mismatched Gateforge package contract can stop the CLI with exit code 2 and `GATEFORGE_PACKAGE_INCOMPATIBLE`.
|
|
@@ -33,7 +33,7 @@ This installs every pack of the release; the scan still recommends the ones your
|
|
|
33
33
|
|
|
34
34
|
**You should see:** npm installs the packages without a Gateforge compatibility error.
|
|
35
35
|
|
|
36
|
-
**If not:** align every direct `@gate-forge/*` package to `0.
|
|
36
|
+
**If not:** align every direct `@gate-forge/*` package to `0.9.0`, then install again. Do not work around the compatibility error.
|
|
37
37
|
|
|
38
38
|
## 2. Pick a goal
|
|
39
39
|
|
|
@@ -89,13 +89,48 @@ It writes:
|
|
|
89
89
|
- `GATEFORGE.md`
|
|
90
90
|
- `tests/e2e/gateforge/README.md` for the default overlay proof path
|
|
91
91
|
|
|
92
|
-
It also creates `.gateforge/adapters/` and `.gateforge/waivers
|
|
92
|
+
It also creates `.gateforge/adapters/` and `.gateforge/waivers/`, and adds
|
|
93
|
+
`.gateforge/test-gates/` (Gateforge's own run state: catalog, caches,
|
|
94
|
+
receipts, history) to `.gitignore` so `git add -A` never stages it. It
|
|
95
|
+
preserves existing files. A chosen documentation exclusion adds
|
|
96
|
+
`.gateforge/docs-exclusions.yml`.
|
|
93
97
|
|
|
94
98
|
**You should see:** a scan summary, recommended packages, the goal summary
|
|
95
|
-
with its `undo:`
|
|
99
|
+
with its `undo:` lines, and a `skeleton ready` message.
|
|
96
100
|
|
|
97
101
|
**If not:** read the first error. Fix invalid or missing project configuration, install a recommended pack, then run `gateforge init` again. Existing files are not replaced by a normal rerun.
|
|
98
102
|
|
|
103
|
+
### Already have code? Adopt what is there
|
|
104
|
+
|
|
105
|
+
If the repository already has an application, the next commit is not
|
|
106
|
+
green: `gateforge check` reports everything discovery finds as existing
|
|
107
|
+
debt, and debt blocks. Do not reach for `--no-verify` — there is a
|
|
108
|
+
command for exactly this situation, and `init` names it in its own output
|
|
109
|
+
whenever the repository already had code:
|
|
110
|
+
|
|
111
|
+
```sh
|
|
112
|
+
gateforge adopt
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
It records today's blocking findings as forgiven debt, in
|
|
116
|
+
`.gateforge/baselines/obligations.json` plus a dated receipt in
|
|
117
|
+
`.gateforge/baselines/adoption.json`, and then wires the blocking gate.
|
|
118
|
+
|
|
119
|
+
- The recorded set is **shrink-only**. It never forgives new work: new
|
|
120
|
+
unproven changes keep blocking. Resolve debt and shrink the set with
|
|
121
|
+
`gateforge baseline update`.
|
|
122
|
+
- Run it **once**. A second `adopt` is a no-op success; there is exactly
|
|
123
|
+
one sanctioned bulk-add per repository.
|
|
124
|
+
- Under `--preset strict` / `strictE2E`, an adopted E2E obligation is not
|
|
125
|
+
proof. It blocks with `ENFORCEMENT_UNTRUSTED` again as soon as a change
|
|
126
|
+
touches it — adoption forgives today's state, not the next edit.
|
|
127
|
+
- `gateforge adopt --help` prints this contract, and
|
|
128
|
+
`gateforge baseline diff <before> <after>` compares two adopted sets by
|
|
129
|
+
obligation ID.
|
|
130
|
+
|
|
131
|
+
Adopting forgives; it does not prove. The work of proving obligations
|
|
132
|
+
starts in step 4 and is unchanged.
|
|
133
|
+
|
|
99
134
|
## 4. Find existing tests and suggestions
|
|
100
135
|
|
|
101
136
|
First inventory the test suite:
|
|
@@ -112,7 +147,7 @@ gateforge tests suggest
|
|
|
112
147
|
|
|
113
148
|
Discovery writes a derived catalog under `.gateforge/test-gates/`. Suggestions are for inspection; they do not create declarations or prove a test.
|
|
114
149
|
|
|
115
|
-
**You should see:** discovered test keys and suggestions with obligation IDs and any mapping problems.
|
|
150
|
+
**You should see:** discovered test keys and suggestions with obligation IDs and any mapping problems. Candidates are ranked by the evidence their own row carries, so the strongest match is `#1`; each candidate prints the `why:` lines that produced its rank, the text surface shows the top five, and `gateforge tests suggest --json` returns the full ranked list. With a candidate in hand, the next action is to declare that existing test `observed-e2e` and run it under the witness — the overlay-test instruction appears only when no existing test fits (`new test needed: yes`). After a declaration, `gateforge check` prints `mapped to: <test> (not yet witnessed)` for obligations whose mapping exists but whose evidence has not been collected yet.
|
|
116
151
|
|
|
117
152
|
**If not:** fix Playwright installation, configuration, or test enumeration first. Do not treat an empty or failed inventory as proof that no tests exist. If a test does not fit, the suggestion report explains what is missing.
|
|
118
153
|
|
|
@@ -233,6 +268,16 @@ gateforge classify plane 'app/main.py' tenant \
|
|
|
233
268
|
--reason 'Owner review confirms the tenant plane for DELETE /items/{}.' --confirm
|
|
234
269
|
```
|
|
235
270
|
|
|
271
|
+
`classify plane` takes one file, one FOLDER, or one glob — a folder answer
|
|
272
|
+
is written as `match: 'app/routes/**'`, so a repository with hundreds of
|
|
273
|
+
routers needs one reviewed rule per router directory rather than one per
|
|
274
|
+
file:
|
|
275
|
+
|
|
276
|
+
```sh
|
|
277
|
+
gateforge classify plane 'app/routes' tenant \
|
|
278
|
+
--reason 'Every router in this folder serves tenant-scoped records.' --confirm
|
|
279
|
+
```
|
|
280
|
+
|
|
236
281
|
Then run `gateforge next` again: the same block must not reappear. A route
|
|
237
282
|
that is genuinely internal is the other answer, and it stays owner-only (an
|
|
238
283
|
`internalRules` entry in `.gateforge/classification-policy.yml`).
|
|
@@ -331,7 +376,7 @@ the registry. To gate a release that is not on the registry yet (a local
|
|
|
331
376
|
regenerate:
|
|
332
377
|
|
|
333
378
|
```sh
|
|
334
|
-
GATEFORGE_CI_ENGINE_SOURCE=vendor/gate-forge-cli-0.
|
|
379
|
+
GATEFORGE_CI_ENGINE_SOURCE=vendor/gate-forge-cli-0.9.0.tgz \
|
|
335
380
|
gateforge enforce --ci github
|
|
336
381
|
```
|
|
337
382
|
|