arkgate 4.8.20 → 4.8.22

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.
Files changed (75) hide show
  1. package/CHANGELOG.md +172 -5
  2. package/README.md +107 -117
  3. package/bin/ark-check-runtime.mjs +3 -4
  4. package/bin/ark-layer-match.mjs +110 -18
  5. package/bin/lib/analysis-engine.mjs +13 -6
  6. package/bin/lib/config-contract.mjs +5 -0
  7. package/bin/lib/diagnostic-catalog.mjs +1 -0
  8. package/bin/lib/doctor-advisories.mjs +20 -0
  9. package/bin/lib/doctor-human.mjs +11 -9
  10. package/bin/lib/doctor-plan.mjs +15 -14
  11. package/bin/lib/first-run-help.mjs +7 -1
  12. package/bin/lib/html-report-advisories.mjs +8 -0
  13. package/bin/lib/html-report-depth.mjs +9 -8
  14. package/bin/lib/invariant-coverage.mjs +417 -72
  15. package/bin/lib/managed-upgrade.mjs +59 -14
  16. package/bin/lib/pilot-loop.mjs +183 -37
  17. package/bin/lib/upgrade-behavior-changes.mjs +83 -0
  18. package/bin/lib/upgrade-command.mjs +69 -31
  19. package/bin/lib/upgrade-outcome.mjs +359 -0
  20. package/bin/lib/violations.mjs +109 -0
  21. package/dist/{configTypes-VVknqcTJ.d.ts → configTypes-CTELo87-.d.ts} +7 -0
  22. package/dist/{diagnosticCatalog-BPYWNyJR.d.ts → diagnosticCatalog-WD2TPSwZ.d.ts} +78 -5
  23. package/dist/eslint/index.cjs +4 -4
  24. package/dist/eslint/index.d.ts +26 -3
  25. package/dist/eslint/index.js +4 -4
  26. package/dist/index.cjs +32 -25
  27. package/dist/index.d.ts +9 -4
  28. package/dist/index.js +33 -26
  29. package/dist/nestjs/index.cjs +9 -9
  30. package/dist/nestjs/index.d.ts +3 -3
  31. package/dist/nestjs/index.js +9 -9
  32. package/dist/runtime/index.cjs +22 -15
  33. package/dist/runtime/index.d.ts +6 -6
  34. package/dist/runtime/index.js +22 -15
  35. package/dist/{types-p_fCp6P-.d.ts → types-fQ9-KrBj.d.ts} +1 -1
  36. package/dist/{types-Cs-46DRu.d.ts → types-yDNEQ603.d.ts} +1 -1
  37. package/docs/README.md +5 -3
  38. package/docs/agent-guide.md +15 -7
  39. package/docs/brownfield-adoption.md +4 -3
  40. package/docs/configuration.md +34 -11
  41. package/docs/diagnostics.md +12 -2
  42. package/docs/package-surface.md +3 -2
  43. package/docs/product-voice.md +11 -3
  44. package/package.json +2 -1
  45. package/schemas/ark.config.schema.json +8 -0
  46. package/server.json +2 -2
  47. package/templates/agent-skills/README.md +1 -1
  48. package/templates/agent-skills/ark-adopt/SKILL.md +5 -2
  49. package/templates/agent-skills/ark-architect/SKILL.md +2 -0
  50. package/templates/agent-skills/ark-autopilot/SKILL.md +6 -4
  51. package/templates/agent-skills/ark-contract/SKILL.md +2 -0
  52. package/templates/agent-skills/ark-coverage/SKILL.md +2 -0
  53. package/templates/agent-skills/ark-explain/SKILL.md +2 -0
  54. package/templates/agent-skills/ark-explore/SKILL.md +4 -2
  55. package/templates/agent-skills/ark-fix/SKILL.md +2 -0
  56. package/templates/agent-skills/ark-loop/SKILL.md +2 -0
  57. package/templates/agent-skills/ark-order/SKILL.md +2 -0
  58. package/templates/agent-skills/ark-place/SKILL.md +2 -0
  59. package/templates/agent-skills/ark-runtime/SKILL.md +2 -0
  60. package/templates/agent-skills/ark-think/SKILL.md +2 -0
  61. package/templates/agent-skills/ark-upgrade/SKILL.md +20 -7
  62. package/templates/skills/ark-adopt.md +5 -2
  63. package/templates/skills/ark-architect.md +2 -0
  64. package/templates/skills/ark-autopilot.md +6 -4
  65. package/templates/skills/ark-contract.md +2 -0
  66. package/templates/skills/ark-coverage.md +2 -0
  67. package/templates/skills/ark-explain.md +2 -0
  68. package/templates/skills/ark-explore.md +4 -2
  69. package/templates/skills/ark-fix.md +2 -0
  70. package/templates/skills/ark-loop.md +2 -0
  71. package/templates/skills/ark-order.md +2 -0
  72. package/templates/skills/ark-place.md +2 -0
  73. package/templates/skills/ark-runtime.md +2 -0
  74. package/templates/skills/ark-think.md +2 -0
  75. package/templates/skills/ark-upgrade.md +20 -7
package/CHANGELOG.md CHANGED
@@ -96,6 +96,165 @@ in the immutable pre-2.0 archive linked below.
96
96
  Existing configs keep whatever URL they already have. Editor completion
97
97
  matches the 4.x line you just installed.
98
98
 
99
+ ## 4.8.22 — 2026-09-27
100
+
101
+ **Patch** over **4.8.21**. Daily accumulate (2026-09-27 ART) of the ships
102
+ that landed after 4.8.21 published: `coverage.symbol` recognizes
103
+ `export const X: Type =` (including `=>` inside a function type) and a
104
+ cross-file comment is reported as `no declaration matched`
105
+ ([#324](https://github.com/pedroknigge/arkgate/pull/324) /
106
+ [#322](https://github.com/pedroknigge/arkgate/issues/322)), test titles that
107
+ contain the other quote character count as coverage
108
+ ([#324](https://github.com/pedroknigge/arkgate/pull/324) /
109
+ [#323](https://github.com/pedroknigge/arkgate/issues/323)), and a packed
110
+ journey matrix in CI
111
+ ([#324](https://github.com/pedroknigge/arkgate/pull/324)).
112
+ **Write. Check. Ship.** **No required config migration.** No
113
+ `schemaVersion` bump. No new behavior change: both fixes only accept
114
+ coverage that 4.8.21 wrongly rejected. Does not close `K01` / `Z09`. This
115
+ mother `ark.config.json` still does **not** turn `arkOrder` on.
116
+
117
+ **Status: released** (tag `v4.8.22`). This file does not assert registry
118
+ state; run `npm view arkgate@4.8.22 version` to confirm the package is
119
+ available (#314).
120
+
121
+ ### Fixed
122
+ - Test-title coverage accepts a `describe`/`it` title that contains the other
123
+ quote character, such as `it("… <input type='file'> …")`
124
+ ([#324](https://github.com/pedroknigge/arkgate/pull/324) /
125
+ [#323](https://github.com/pedroknigge/arkgate/issues/323)).
126
+ - Const-declaration coverage accepts a type annotation between the name and
127
+ `=`, including `=>` inside a function type (`export const X: ReadonlyArray<…> =`,
128
+ `export const f: (a: A) => B =`). When that declaration does not match and the
129
+ only comment is in a different file, the message is `no declaration matched`,
130
+ not "appears only in a comment"
131
+ ([#324](https://github.com/pedroknigge/arkgate/pull/324) /
132
+ [#322](https://github.com/pedroknigge/arkgate/issues/322)).
133
+
134
+ ### Known limitation
135
+ - `coverage.symbol` still does not recognize a declaration exported through
136
+ an export list (`const X = …` plus `export { X }`). Declare it with
137
+ `export const X` (or point `coverage.symbol` at a function, class, type,
138
+ interface, or enum declaration) until that form is supported.
139
+
140
+ ### Changed
141
+ - Internal: packed journey matrix (`journey(fixture, steps)`) installs the
142
+ npm tarball into a vendored realistic fixture (`ledgerline`) and compares
143
+ a JSON subset to a committed golden. CI runs one job per fixture. Unit tests and coverage
144
+ floors are unchanged. No product behavior change
145
+ ([#324](https://github.com/pedroknigge/arkgate/pull/324)).
146
+
147
+ ## 4.8.21 — 2026-09-26
148
+
149
+ **Patch** over **4.8.20**. Daily accumulate (2026-09-26 ART) of the ships
150
+ that landed after 4.8.20 published: a bare invariant-id mention is not
151
+ coverage and `coverage.symbol` accepts `type` / `interface` / `enum` again
152
+ ([#319](https://github.com/pedroknigge/arkgate/pull/319) /
153
+ [#310](https://github.com/pedroknigge/arkgate/issues/310),
154
+ [#307](https://github.com/pedroknigge/arkgate/issues/307)), one explained
155
+ `arkgate upgrade --apply` outcome with exit `3` for applied but red
156
+ ([#320](https://github.com/pedroknigge/arkgate/pull/320) /
157
+ [#311](https://github.com/pedroknigge/arkgate/issues/311),
158
+ [#312](https://github.com/pedroknigge/arkgate/issues/312)), optional
159
+ `sliceIdentity: "stars"`
160
+ ([#318](https://github.com/pedroknigge/arkgate/pull/318) /
161
+ [#308](https://github.com/pedroknigge/arkgate/issues/308)), grouped
162
+ `SHARED_IMPORTS_SLICE` human output
163
+ ([#316](https://github.com/pedroknigge/arkgate/pull/316) /
164
+ [#313](https://github.com/pedroknigge/arkgate/issues/313)), pilot loop sees
165
+ reshape pilots
166
+ ([#317](https://github.com/pedroknigge/arkgate/pull/317) /
167
+ [#309](https://github.com/pedroknigge/arkgate/issues/309)), README
168
+ first-contact rewrite
169
+ ([#306](https://github.com/pedroknigge/arkgate/pull/306)), and docs fixes
170
+ ([#315](https://github.com/pedroknigge/arkgate/pull/315)).
171
+ **Write. Check. Ship.** **Behavior change:** some repos that are green
172
+ today can turn red, and scripts that compare `arkgate upgrade --apply`
173
+ against exit `1` must compare non-zero. See the two notes under Changed.
174
+ No `schemaVersion` bump. Does not close `K01` / `Z09`. This mother
175
+ `ark.config.json` still does **not** turn `arkOrder` on.
176
+
177
+ **Status: released** (tag `v4.8.21`). This file does not assert registry
178
+ state; run `npm view arkgate@4.8.21 version` to confirm the package is
179
+ available (#314).
180
+
181
+ ### Changed
182
+ - **Behavior change.** A comment, a string, a test body, or an import that merely
183
+ mentions an invariant id no longer counts as coverage. Only a `describe` /
184
+ `it` / `test` / `context` title does. Repos that were green because a comment
185
+ or a string contained the id will turn red. One-line fix: move the id into
186
+ the `it()` title.
187
+ ([#319](https://github.com/pedroknigge/arkgate/pull/319) /
188
+ [#310](https://github.com/pedroknigge/arkgate/issues/310))
189
+ - **Behavior change for scripts.** `arkgate upgrade --apply` reports one
190
+ outcome. Exit `0` means applied and the architecture check is green (or
191
+ there was nothing to apply). Exit `3` means applied but red, so scripts
192
+ that compare against exit `1` must compare non-zero. Exit `2` means
193
+ blocked until you consent. Exit `1` means error, including a stale `--plan-digest` (that path was exit `2`). A stale CLI
194
+ outside the project still refuses with exit `2` before any plan. JSON stays
195
+ additive: `outcome`, `postUpgrade.verdict`, `postUpgrade.failing`
196
+ (`ruleId`, `count`, `sample`), `postUpgrade.behaviorChanges`, and on each
197
+ blocked asset `reason` plus `nextCommand`. A recorded file that is missing
198
+ and gitignored is `absent-local` and is recreated without consent (a
199
+ per-machine `.mcp.json` in a fresh worktree). A deleted file that is not
200
+ gitignored still needs `--accept-conflicts`. Behavior-change lines come from
201
+ the shipped per-version table (same sentences as these notes):
202
+ - 4.8.20: coverage.symbol now requires a real declaration (some green repos turn red)
203
+ - 4.8.21: a bare mention of an invariant id no longer counts as coverage (only describe/it titles or declarations, incl. type/interface/enum)
204
+ - 4.8.21: upgrade exit code 3 = applied but red. Scripts comparing against 1 must switch to 'non-zero'
205
+ ([#320](https://github.com/pedroknigge/arkgate/pull/320) /
206
+ [#311](https://github.com/pedroknigge/arkgate/issues/311),
207
+ [#312](https://github.com/pedroknigge/arkgate/issues/312)).
208
+ - README first screen is the one-minute story: what (**Contener · Guiar · Ordenar**),
209
+ why, `npx arkgate@<version> start`, and one honest red check (fail-open named).
210
+ Host matrix, not-that line, and release index sit below `## Appendix`.
211
+ Release history points at CHANGELOG.md, the site changelog, and the docs hub.
212
+ ([#306](https://github.com/pedroknigge/arkgate/pull/306))
213
+
214
+ ### Added
215
+ - Optional per-rule `sliceIdentity`: `path` (default) or `stars`.
216
+ Absent and `path` keep today's slice ids byte for byte, so baselines and
217
+ `allowedCrossSlice` need no migration. `stars` names a starred
218
+ `sliceFolders` prefix as the last literal plus the star bindings
219
+ (`lib/features/*/*` and `lib/repositories/features/*/*` both yield
220
+ `features/projects/rfi`). Doctor warns when two prefixes collapse onto one
221
+ id and names both paths. Additive. No `schemaVersion` bump.
222
+ ([#318](https://github.com/pedroknigge/arkgate/pull/318) /
223
+ [#308](https://github.com/pedroknigge/arkgate/issues/308)).
224
+
225
+ ### Fixed
226
+ - `coverage.symbol` accepts `type`, `interface`, and `enum` declarations
227
+ again (a `function`, `class`, `const`, or method still counts).
228
+ `INVARIANT_UNCOVERED` names what the scan found — for example found `type X`
229
+ in a file, or that the id appears only in a comment or a test body — instead
230
+ of saying no symbol was declared when one was.
231
+ ([#319](https://github.com/pedroknigge/arkgate/pull/319) /
232
+ [#307](https://github.com/pedroknigge/arkgate/issues/307)).
233
+ - Human `ark-check` groups `SHARED_IMPORTS_SLICE` advisories into one line per
234
+ rule and layer edge (the count and three examples) instead of one line per
235
+ import. The line names `ark-check --json` and `ark-check --doctor` for the
236
+ full list. `--json` is unchanged: one warning object per edge. Doctor prints
237
+ every edge. No engine change
238
+ ([#316](https://github.com/pedroknigge/arkgate/pull/316) /
239
+ [#313](https://github.com/pedroknigge/arkgate/issues/313)).
240
+ - Doctor `pilotLoop` turns on when a pilot is proposed, including a
241
+ physical-cohesion reshape card on a tree that is not design-weak.
242
+ `summarizePilotLoop` takes one candidate list and is active only when
243
+ that list is non-empty. It still names **one** extraction card
244
+ (`nextPilot` / `extractionCard`, same fields). Further candidates stay
245
+ queued. Inactive reason is `no-pilot-candidates` (replaces
246
+ `not-design-weak` and `no-pattern-bets`). Skill completion contracts
247
+ derive **Incomplete?** from `doctor.productHonesty.finished`: when
248
+ `finished` is false, **Incomplete? no** is disallowed and the agent
249
+ writes `yes — <pilotLoop.extractionCard.move or residual>`
250
+ ([#317](https://github.com/pedroknigge/arkgate/pull/317) /
251
+ [#309](https://github.com/pedroknigge/arkgate/issues/309)).
252
+ - Docs: the 4.8.20 header states its behavior change instead of "no
253
+ required config migration", and starred anchored `sliceFolders` wording
254
+ matches the code (the slice id includes the literal prefix plus the star
255
+ bindings) in configuration, the agent guide, and the adopt skill
256
+ ([#315](https://github.com/pedroknigge/arkgate/pull/315)).
257
+
99
258
  ## 4.8.20 — 2026-09-25
100
259
 
101
260
  **Patch** over **4.8.19**. Daily accumulate (2026-09-25 ART) of the ships
@@ -123,15 +282,20 @@ vitest 5 ignore
123
282
  ([#304](https://github.com/pedroknigge/arkgate/pull/304)), and docs
124
283
  ([#244](https://github.com/pedroknigge/arkgate/pull/244),
125
284
  [#234](https://github.com/pedroknigge/arkgate/pull/234)).
126
- **Write. Check. Ship.** **No required config migration.** No
285
+ **Write. Check. Ship.** **Behavior change:** some repos that are green
286
+ today can turn red. See the migration note under Changed. No
127
287
  `schemaVersion` bump. Does not close `K01` / `Z09`. This mother
128
288
  `ark.config.json` still does **not** turn `arkOrder` on.
129
289
 
130
290
  **Status: published** (npm `latest` is **4.8.20**).
131
291
 
132
292
  ### Changed
133
- - This is a behavior change. Some repos that are green today will turn red
134
- when `coverage.symbol` only appeared in tests or imports.
293
+ - **Migration.** This is a behavior change. Some repos that are green today
294
+ will turn red when `coverage.symbol` only appeared in tests or imports.
295
+ Move the invariant id into a `describe`/`it` title, or point
296
+ `coverage.symbol` at a function, class, or const declaration; `type` and
297
+ `interface` symbols are currently rejected
298
+ ([#307](https://github.com/pedroknigge/arkgate/issues/307)).
135
299
  `symbolEvidenceFile` is the non-test file that declares the symbol.
136
300
  Discard counters (`depthLimited`, the per-file byte cap, and the other
137
301
  existing reasons) are printed on green doctor and `--rules-inventory`
@@ -139,8 +303,11 @@ vitest 5 ignore
139
303
  ([#301](https://github.com/pedroknigge/arkgate/pull/301) /
140
304
  [#291](https://github.com/pedroknigge/arkgate/issues/291)).
141
305
  - `sliceFolders` accepts a starred prefix (`lib/features/*/*`), anchored
142
- like `sharedRoots`. The slice id is the directories the stars bind
143
- (`lib/features/projects/rfi`). A star never binds a filename; a file
306
+ like `sharedRoots`. For a starred anchored pattern the slice id includes
307
+ the literal prefix plus the directories the stars bind
308
+ (`lib/features/projects/rfi`), so parallel trees get different ids
309
+ (tracked in [#308](https://github.com/pedroknigge/arkgate/issues/308)).
310
+ A star never binds a filename; a file
144
311
  directly under that prefix stays in the last directory
145
312
  (`lib/features/projects`). Bare `sliceFolders` names no longer treat a
146
313
  filename as the slice child segment.
package/README.md CHANGED
@@ -4,53 +4,59 @@
4
4
 
5
5
  **When the agent writes a bad import, the write doesn’t land. The same check fails the pull request.**
6
6
 
7
- Not an API Gateway. Not a folder linter. If the check is not required on the PR, the config
8
- is just documentation.
7
+ [![Website](https://img.shields.io/badge/website-arkgate.online-0a0a0a)](https://www.arkgate.online/)
8
+ [![CI](https://github.com/pedroknigge/arkgate/actions/workflows/ci.yml/badge.svg)](https://github.com/pedroknigge/arkgate/actions/workflows/ci.yml)
9
+ [![npm](https://img.shields.io/npm/v/arkgate?color=cb3837&label=npm)](https://www.npmjs.com/package/arkgate)
10
+ [![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
11
+ ![Node](https://img.shields.io/badge/node-%3E%3D18-339933?logo=node.js)
12
+ ![TS 5–7](https://img.shields.io/badge/TypeScript-5%20%7C%206%20%7C%207-3178c6?logo=typescript)
9
13
 
10
- AI can build fast—and make a mess just as fast.
14
+ </div>
11
15
 
12
- Keep the product easy to understand, change, and trust.
16
+ ArkGate is import rules for AI-written TypeScript. **Contener · Guiar · Ordenar**: contain what the AI may write, and in what shape. Guide the next step. Order leftover mess toward a clean tree, a little at a time.
13
17
 
14
- Contain what the AI may write, and in what shape. Guide you with proven patterns and one next step. Order leftover mess toward a clean tree, a little at a time.
18
+ <a id="less-spaghetti-after-the-gate-is-green"></a>
15
19
 
16
- Safer changes, fewer surprises, and extra protection only when you choose it.
20
+ ## Why
17
21
 
18
- That is **Contener · Guiar · Ordenar**.
22
+ AI takes the shortest path. One bad import lands, then another, and the product gets harder to change. A linter that runs only after the agent finishes sees the mess too late.
19
23
 
20
- Works with Cursor, Claude, Codex, and Grok.
24
+ Design the boundary before you implement. Put a small interface in front of the work and keep the detail behind it. When leftover mess remains, the honest light is **needs a refactor**. Weakening the rules to paint the check green leaves that design unfinished.
21
25
 
22
- [![Website](https://img.shields.io/badge/website-arkgate.online-0a0a0a)](https://www.arkgate.online/)
23
- [![CI](https://github.com/pedroknigge/arkgate/actions/workflows/ci.yml/badge.svg)](https://github.com/pedroknigge/arkgate/actions/workflows/ci.yml)
24
- [![npm](https://img.shields.io/npm/v/arkgate?color=cb3837&label=npm)](https://www.npmjs.com/package/arkgate)
25
- [![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
26
- ![Node](https://img.shields.io/badge/node-%3E%3D18-339933?logo=node.js)
27
- ![TS 5–7](https://img.shields.io/badge/TypeScript-5%20%7C%206%20%7C%207-3178c6?logo=typescript)
26
+ ## Try it
27
+
28
+ One command. Preview only — no files change. Current release is **4.8.22**
29
+ (check npm `latest` with `npm view arkgate version`):
30
+
31
+ ```bash
32
+ npx arkgate@4.8.22 start
33
+ ```
34
+
35
+ ## What a red result looks like
36
+
37
+ After a rules file exists, a domain file that imports infrastructure fails the check (exit 1). This is real output from `arkgate-check` on arkgate@4.8.20:
28
38
 
29
39
  ```text
30
- ┌─────────┐ ┌─────────┐ ┌─────────┐
31
- │ WRITE │────▶│ CHECK │────▶│ SHIP │
32
- │ agent │ │ block │ │ merge │
33
- └─────────┘ └────┬────┘ └─────────┘
34
- │
35
- ▼
36
- bad import
37
- doesn't land
40
+ ✖ LAYER_IMPORT_VIOLATION src/domain/order.ts:1
41
+ DomainModel → Infrastructure (src/infra/db.ts)
42
+ DomainModel must not import Infrastructure.
43
+ Next action: Classify the import: if it is constants/types/pure, adopt into DomainModel or SharedKernel; define a port only if the target is a real use-case. Then preflight again.
44
+
45
+ ✖ 1 violation(s).
38
46
  ```
39
47
 
40
- </div>
48
+ Do that next action. Classify the import, or introduce a port when the dependency is a real use case. Then run the check again.
49
+
50
+ That red line is the check. It does not stop every write. On Cursor, a hook without `failClosed: true` is fail-open: if the checker cannot run, the write still lands. Shell writes, hosted tools, and human edits are outside the local hook. The hard line for every path is a **required** GitHub status running `arkgate-check --strict-merge`. Until that status is required, the rules file is just documentation.
41
51
 
42
- > **ArkGate 4.8.20** is on npm `latest`.
43
- > Write. Check. Ship. Adopted = required GitHub
44
- > status running `arkgate-check --strict-merge`, or an explicit `advisory-only` stance.
45
- > Status is compact (`arkgate-check --doctor`; `--all` for Details). Optional **ArkRun**
46
- > (`arkgate/runtime`) is an in-memory runtime — not Postgres. Optional **ArkOrder**
47
- > (`arkgate/order`) stops rewriting a big product choice — like the billing plan —
48
- > as if it were a seat count. Change those choices through a valve, not a generic update.
49
- > `@arkgate/runtime` is deprecated.
50
- > [4.8.20](CHANGELOG.md) · [4.8.11](docs/releases/4.8.11.md) · [4.8.10](docs/releases/4.8.10.md) · [4.8.9](docs/releases/4.8.9.md) · [4.8.8](docs/releases/4.8.8.md) · [4.8.7](docs/releases/4.8.7.md) · [4.8.6](docs/releases/4.8.6.md) · [4.8.5](docs/releases/4.8.5.md) · [4.8.4](docs/releases/4.8.4.md) · [4.8.3](docs/releases/4.8.3.md) · [4.8.2](docs/releases/4.8.2.md) · [4.8.1](docs/releases/4.8.1.md) · [4.8.0](docs/releases/4.8.0.md) · [Docs hub](docs/README.md) · [Voice](docs/product-voice.md)
52
+ Anyone: [Use ArkGate](docs/use.md) · Developers: [Develop](docs/develop.md) · This library: [CONTRIBUTING](CONTRIBUTING.md)
51
53
 
52
54
  ---
53
55
 
56
+ ## Appendix
57
+
58
+ The minute above is the product. Below is reference: the longer introduction, what this is not, hosts, commands, extras, and where release history lives.
59
+
54
60
  ## Choose your path
55
61
 
56
62
  | You are… | Go here |
@@ -61,47 +67,26 @@ Works with Cursor, Claude, Codex, and Grok.
61
67
 
62
68
  Full map: **[docs/README.md](docs/README.md)**
63
69
 
64
- ---
65
-
66
- ## Start in one minute
70
+ ## The longer introduction
67
71
 
68
- ```bash
69
- npx arkgate start # preview files + commands
70
- npx arkgate start --apply # compact config + host router + CI plan
71
- npx --package=arkgate arkgate-check --doctor # status — one next step
72
- npx --package=arkgate arkgate-check --doctor --all # full details
73
- ```
72
+ AI can build fast—and make a mess just as fast.
74
73
 
75
- `start --apply` pins arkgate with this repo's package manager (`pnpm add -w` / `yarn add -W` at a workspace root). Do not run `npm install -D arkgate` at a `workspace:*` root — npm rejects that protocol. After a local install, `npx arkgate-check --doctor` also works. `arkgate-check` is a command in the `arkgate` package, not its own npm package. If pnpm Age (`minimumReleaseAge`) blocks a brand-new release, keep using `npx --package=arkgate@<version>` — do not re-run the same add. Put arkgate on `minimumReleaseAgeExclude` in pnpm config or `pnpm-workspace.yaml` (a CLI flag is not enough), or wait until the package is mature.
74
+ Keep the product easy to understand, change, and trust.
76
75
 
77
- `start --apply` refuses when projected governed coverage is below 50% or
78
- shape confidence is weak (below 0.6 with coverage under 80%), or when the
79
- planned write is too big for compact start (more than 8 gate files or 32 KB).
80
- That lock is deliberate. Coverage/shape: lock with `--archetype <id>`,
81
- `--preset <name>`, or `--force`. Size: `--force` does not unlock. Next:
82
- `npx arkgate-check --init`. Or inspect ranked shapes with
83
- `npx arkgate-check --recommend`.
76
+ Contain what the AI may write, and in what shape. Guide you with proven patterns and one next step. Order leftover mess toward a clean tree, a little at a time.
84
77
 
85
- That is the product. Stuck? Run status (`--doctor`) and do action **#1**.
78
+ Safer changes, fewer surprises, and extra protection only when you choose it.
86
79
 
87
- ```text
88
- start → doctor → new files in the right folder
89
- ↘ leftover mess: map, then one small refactor
90
- ```
80
+ That is **Contener · Guiar · Ordenar**.
91
81
 
92
- Keep the rules file out of product PRs. Local check:
93
- `ark-check --local --base origin/dev` (same as `--changed`; refused with
94
- `--strict-merge`). Changing the rules themselves uses `--contract-session`.
82
+ ## What this is not
95
83
 
96
- Aliases `ark` / `ark-check` / `ark-mcp` still work. npm / pnpm / yarn. No install lifecycle scripts
97
- — and none on pack or prepare either, so `pnpm add git+https://github.com/pedroknigge/arkgate`
98
- installs at a pinned commit with no `allowBuilds` entry. A git install gives you the CLIs and the
99
- schemas; the library, MCP and ESLint entry points live in the built `dist/` and come from npm.
100
- See [docs/package-surface.md](docs/package-surface.md#installing-from-git).
84
+ Not an API Gateway. Not a folder linter. If the check is not required on the PR, the config
85
+ is just documentation.
101
86
 
102
- ![Write gate: agent blocked, then self-corrects](docs/assets/ark-write-gate.svg)
87
+ ArkGate is not a web framework, ORM, or job runner. The npm package is `arkgate` — not affiliated with the separate Archgate CLI project.
103
88
 
104
- ---
89
+ ArkRun is an optional experimental runtime. In-memory. Not Postgres. `@arkgate/runtime` is deprecated. ArkOrder does not replace import rules: layers can be green while the agent still rewrites the billing plan like a seat count.
105
90
 
106
91
  ## What it is
107
92
 
@@ -133,12 +118,20 @@ inter-layer verdict when absent. Label leftovers **`[Layer]`** vs **`[ArkRules]`
133
118
  **`[ArkRun]`** vs **`[ArkOrder]`**.
134
119
  Details: [configuration](docs/configuration.md) · [use](docs/use.md).
135
120
 
136
- **Not** an API Gateway, a folder linter, a web framework, ORM, or job runner.
137
- ArkRun is in-memory — local and tests, not Postgres. ArkOrder does not replace
138
- import rules: layers can be green while the agent still PATCHes the billing plan
139
- like a seat count.
121
+ ```text
122
+ ┌─────────┐ ┌─────────┐ ┌─────────┐
123
+ │ WRITE │────▶│ CHECK │────▶│ SHIP │
124
+ │ agent │ │ block │ │ merge │
125
+ └─────────┘ └────┬────┘ └─────────┘
126
+ │
127
+ ▼
128
+ bad import
129
+ doesn't land
130
+ ```
131
+
132
+ ![Write gate: agent blocked, then self-corrects](docs/assets/ark-write-gate.svg)
140
133
 
141
- **Name note:** npm package `arkgate` — not affiliated with the separate Archgate CLI project.
134
+ Adopted means a required GitHub status running `arkgate-check --strict-merge`, or an explicit `advisory-only` stance. Status is compact (`arkgate-check --doctor`; `--all` for details).
142
135
 
143
136
  ### When not to adopt
144
137
 
@@ -152,18 +145,6 @@ check: [4.3.0 — What ArkGate is / isn't](docs/releases/4.3.0.md#what-arkgate-i
152
145
 
153
146
  ---
154
147
 
155
- ## Why it exists
156
-
157
- AI takes the shortest path. Contain the write so a bad import never lands. Guide
158
- the next step so a non-expert is not stuck. Order leftover mess toward a clean
159
- tree, one small refactor at a time.
160
-
161
- Traditional linters catch this only in CI after the agent finished. ArkGate
162
- checks at write time and again on the PR. Green imports are not elegant design —
163
- leftover mess is **needs a refactor**, not “done”.
164
-
165
- ---
166
-
167
148
  ## Status lights (not settings)
168
149
 
169
150
  ```text
@@ -183,6 +164,44 @@ Details: [docs/use.md](docs/use.md).
183
164
 
184
165
  ---
185
166
 
167
+ ## Start in one minute
168
+
169
+ ```bash
170
+ npx arkgate start # preview files + commands
171
+ npx arkgate start --apply # compact config + host router + CI plan
172
+ npx --package=arkgate arkgate-check --doctor # status — one next step
173
+ npx --package=arkgate arkgate-check --doctor --all # full details
174
+ ```
175
+
176
+ `start --apply` pins arkgate with this repo's package manager (`pnpm add -w` / `yarn add -W` at a workspace root). Do not run `npm install -D arkgate` at a `workspace:*` root — npm rejects that protocol. After a local install, `npx arkgate-check --doctor` also works. `arkgate-check` is a command in the `arkgate` package, not its own npm package. If pnpm Age (`minimumReleaseAge`) blocks a brand-new release, keep using `npx --package=arkgate@<version>` — do not re-run the same add. Put arkgate on `minimumReleaseAgeExclude` in pnpm config or `pnpm-workspace.yaml` (a CLI flag is not enough), or wait until the package is mature.
177
+
178
+ `start --apply` refuses when projected governed coverage is below 50% or
179
+ shape confidence is weak (below 0.6 with coverage under 80%), or when the
180
+ planned write is too big for compact start (more than 8 gate files or 32 KB).
181
+ That lock is deliberate. Coverage/shape: lock with `--archetype <id>`,
182
+ `--preset <name>`, or `--force`. Size: `--force` does not unlock. Next:
183
+ `npx arkgate-check --init`. Or inspect ranked shapes with
184
+ `npx arkgate-check --recommend`.
185
+
186
+ That is the fuller path. Stuck? Run status (`--doctor`) and do action **#1**.
187
+
188
+ ```text
189
+ start → doctor → new files in the right folder
190
+ ↘ leftover mess: map, then one small refactor
191
+ ```
192
+
193
+ Keep the rules file out of product PRs. Local check:
194
+ `ark-check --local --base origin/dev` (same as `--changed`; refused with
195
+ `--strict-merge`). Changing the rules themselves uses `--contract-session`.
196
+
197
+ Aliases `ark` / `ark-check` / `ark-mcp` still work. npm / pnpm / yarn. No install lifecycle scripts
198
+ — and none on pack or prepare either, so `pnpm add git+https://github.com/pedroknigge/arkgate`
199
+ installs at a pinned commit with no `allowBuilds` entry. A git install gives you the CLIs and the
200
+ schemas; the library, MCP and ESLint entry points live in the built `dist/` and come from npm.
201
+ See [docs/package-surface.md](docs/package-surface.md#installing-from-git).
202
+
203
+ ---
204
+
186
205
  ## Host enforcement support
187
206
 
188
207
  <!-- arkgate-host-support:start -->
@@ -271,6 +290,10 @@ npx arkgate-check --install-agent-gates --tools claude,cursor,codex,grok,antigra
271
290
 
272
291
  More: [docs/develop.md](docs/develop.md) · skills install: [docs/agent-guide.md](docs/agent-guide.md#install-skills-ark-and-ecosystem) · enthusiast track: [docs/enthusiast/](docs/enthusiast/README.md)
273
292
 
293
+ ## Other skills, only when you need them
294
+
295
+ Day-to-day work uses the compact router and status. The full `/ark-*` pack is expert depth: install it when you want a guided next step, not as the first action. Catalog and install paths: [Install skills — Ark and ecosystem](docs/agent-guide.md#install-skills-ark-and-ecosystem).
296
+
274
297
  ---
275
298
 
276
299
  ## Optional ArkRun
@@ -346,44 +369,11 @@ Compact starters leave the extra off. Details: [ArkOrder](docs/arkorder.md).
346
369
  | Config · package surface · TS | [configuration](docs/configuration.md) · [package-surface](docs/package-surface.md) · [typescript-support](docs/typescript-support.md) |
347
370
  | Brownfield | [docs/brownfield-adoption.md](docs/brownfield-adoption.md) |
348
371
  | Security | [SECURITY.md](SECURITY.md) |
349
- | Current published (4.8.20 on npm `latest`) | [CHANGELOG](CHANGELOG.md) |
350
- | Prior published (4.8.11) | [docs/releases/4.8.11.md](docs/releases/4.8.11.md) · [CHANGELOG](CHANGELOG.md) |
351
- | Prior published (4.8.10) | [docs/releases/4.8.10.md](docs/releases/4.8.10.md) · [CHANGELOG](CHANGELOG.md) |
352
- | Prior published (4.8.9) | [docs/releases/4.8.9.md](docs/releases/4.8.9.md) · [CHANGELOG](CHANGELOG.md) |
353
- | Prior published (4.8.7) | [docs/releases/4.8.7.md](docs/releases/4.8.7.md) · [CHANGELOG](CHANGELOG.md) |
354
- | Prior published (4.8.6) | [docs/releases/4.8.6.md](docs/releases/4.8.6.md) |
355
- | Prior published (4.8.5) | [docs/releases/4.8.5.md](docs/releases/4.8.5.md) |
356
- | Prior published (4.8.4) | [docs/releases/4.8.4.md](docs/releases/4.8.4.md) |
357
- | Prior published (4.8.3) | [docs/releases/4.8.3.md](docs/releases/4.8.3.md) |
358
- | Prior published (4.8.2) | [docs/releases/4.8.2.md](docs/releases/4.8.2.md) |
359
- | Prior published (4.8.1) | [docs/releases/4.8.1.md](docs/releases/4.8.1.md) |
360
- | Prior published (4.8.0) | [docs/releases/4.8.0.md](docs/releases/4.8.0.md) |
361
- | Prior published (4.7.6) | [docs/releases/4.7.6.md](docs/releases/4.7.6.md) |
362
- | Prior published (4.7.5) | [docs/releases/4.7.5.md](docs/releases/4.7.5.md) |
363
- | Prior published (4.7.3) | [docs/releases/4.7.3.md](docs/releases/4.7.3.md) |
364
- | Prior published (4.7.2) | [docs/releases/4.7.2.md](docs/releases/4.7.2.md) |
365
- | Prior published (4.7.1) | [docs/releases/4.7.1.md](docs/releases/4.7.1.md) |
366
- | Prior published (4.7.0) | [docs/releases/4.7.0.md](docs/releases/4.7.0.md) |
367
- | Prior published (4.6.7) | [docs/releases/4.6.7.md](docs/releases/4.6.7.md) |
368
- | Prior published (4.6.6) | [docs/releases/4.6.6.md](docs/releases/4.6.6.md) |
369
- | Prior published (4.6.5) | [docs/releases/4.6.5.md](docs/releases/4.6.5.md) |
370
- | Prior published (4.6.3) | [docs/releases/4.6.3.md](docs/releases/4.6.3.md) |
371
- | Prior (4.6.2) | [docs/releases/4.6.2.md](docs/releases/4.6.2.md) |
372
- | Prior (4.6.1) | [docs/releases/4.6.1.md](docs/releases/4.6.1.md) |
373
- | Prior (4.6.0) | [docs/releases/4.6.0.md](docs/releases/4.6.0.md) |
374
- | Prior (4.5.7) | [docs/releases/4.5.7.md](docs/releases/4.5.7.md) |
375
- | Prior (4.5.0) | [docs/releases/4.5.0.md](docs/releases/4.5.0.md) |
376
- | Prior (4.4.0) | [docs/releases/4.4.0.md](docs/releases/4.4.0.md) |
377
- | Prior (4.3.0) | [docs/releases/4.3.0.md](docs/releases/4.3.0.md) |
378
- | Prior (4.2.1) | [docs/releases/4.2.1.md](docs/releases/4.2.1.md) |
379
- | Previous (4.2.0) | [docs/releases/4.2.0.md](docs/releases/4.2.0.md) |
380
- | Previous (4.1.1) | [docs/releases/4.1.1.md](docs/releases/4.1.1.md) |
381
- | Previous (4.1.0) | [docs/releases/4.1.0.md](docs/releases/4.1.0.md) |
382
- | Previous patch (4.0.1) | [docs/releases/4.0.1.md](docs/releases/4.0.1.md) |
383
- | Previous (4.0.0) | [docs/releases/4.0.0.md](docs/releases/4.0.0.md) |
384
- | Previous (3.9.2) | [docs/releases/3.9.2.md](docs/releases/3.9.2.md) |
372
+ | Release history | [CHANGELOG.md](CHANGELOG.md) · [site changelog](https://www.arkgate.online/changelog/) · [docs hub index](docs/README.md#history-and-maintainer-material) |
385
373
  | History / maintainer evidence | [docs/archive/](docs/archive/README.md) |
386
374
 
375
+ Version notes live in [CHANGELOG.md](CHANGELOG.md) and on the [site changelog](https://www.arkgate.online/changelog/). The docs hub keeps the per-version index: [History and maintainer material](docs/README.md#history-and-maintainer-material).
376
+
387
377
  ---
388
378
 
389
379
  ## Contribute to this library
@@ -74,7 +74,7 @@ import {
74
74
  writeBaseline,
75
75
  printViolation,
76
76
  printViolationBreakdown,
77
- printWarning,
77
+ printHumanWarnings,
78
78
  CONCENTRATION_MIN_VIOLATIONS,
79
79
  } from './lib/violations.mjs';
80
80
  import {
@@ -1503,6 +1503,7 @@ async function main() {
1503
1503
  safety, designDelta,
1504
1504
  ts, parseHealth, completeness,
1505
1505
  all: args.all === true, requireGates: args.requireGates === true,
1506
+ warnings,
1506
1507
  });
1507
1508
  if (designDelta) process.exitCode = !designDelta.complete ? 2 : designDelta.valid ? 0 : 1; return;
1508
1509
  }
@@ -1956,9 +1957,7 @@ async function main() {
1956
1957
  ...(teamParliament ? { teamParliament } : {}),
1957
1958
  }, null, 2));
1958
1959
  } else {
1959
- for (const warning of warnings) {
1960
- printWarning(warning);
1961
- }
1960
+ printHumanWarnings(warnings);
1962
1961
  for (const violation of activeViolations) {
1963
1962
  printViolation(violation);
1964
1963
  }