arkgate 4.6.5 → 4.6.7

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 (51) hide show
  1. package/CHANGELOG.md +72 -2106
  2. package/README.md +11 -9
  3. package/bin/ark-check-runtime.mjs +36 -332
  4. package/bin/ark-mcp-runtime.mjs +7 -323
  5. package/bin/ark-shared.mjs +24 -158
  6. package/bin/ark.mjs +13 -3
  7. package/bin/lib/adoption-stance.mjs +104 -0
  8. package/bin/lib/check-args.mjs +173 -0
  9. package/bin/lib/check-config-detect.mjs +101 -0
  10. package/bin/lib/check-watch.mjs +80 -0
  11. package/bin/lib/ci-merge-boundary.mjs +4 -2
  12. package/bin/lib/deep-module-coach.mjs +3 -0
  13. package/bin/lib/design-delta.mjs +2 -2
  14. package/bin/lib/design-smells.mjs +1 -1
  15. package/bin/lib/diagnostic-catalog.mjs +1 -1
  16. package/bin/lib/doctor-advisories.mjs +2 -2
  17. package/bin/lib/doctor-human.mjs +509 -0
  18. package/bin/lib/doctor-next-actions.mjs +20 -2
  19. package/bin/lib/doctor-plan.mjs +86 -456
  20. package/bin/lib/enforcement-honesty.mjs +70 -0
  21. package/bin/lib/first-run-help.mjs +8 -7
  22. package/bin/lib/github-enforcement.mjs +22 -9
  23. package/bin/lib/html-report-advisories.mjs +10 -2
  24. package/bin/lib/html-report.mjs +26 -9
  25. package/bin/lib/mcp-adoption.mjs +19 -0
  26. package/bin/lib/mcp-hook-payload.mjs +328 -0
  27. package/bin/lib/package-manager.mjs +174 -0
  28. package/bin/lib/policy-delta-io.mjs +5 -1
  29. package/bin/lib/post-green-path.mjs +5 -1
  30. package/bin/lib/product-copy.mjs +6 -3
  31. package/bin/lib/start-preview.mjs +12 -22
  32. package/bin/lib/status-command.mjs +16 -0
  33. package/bin/lib/status-manifest.mjs +8 -2
  34. package/bin/lib/team-parliament-io.mjs +66 -2
  35. package/bin/lib/team-parliament.mjs +25 -5
  36. package/bin/lib/unavailable-analysis.mjs +1 -0
  37. package/dist/index.cjs +2 -2
  38. package/dist/index.d.ts +10 -2
  39. package/dist/index.js +2 -2
  40. package/docs/README.md +6 -10
  41. package/docs/ai-gates.md +12 -5
  42. package/docs/configuration.md +9 -1
  43. package/docs/diagnostics.md +2 -2
  44. package/docs/package-surface.md +6 -4
  45. package/docs/product-voice.md +6 -4
  46. package/docs/threat-model.md +2 -2
  47. package/docs/use.md +5 -4
  48. package/package.json +1 -1
  49. package/schemas/ark.design-delta.schema.json +1 -1
  50. package/server.json +2 -2
  51. package/templates/agent-skills/README.md +1 -1
package/CHANGELOG.md CHANGED
@@ -5,12 +5,79 @@ in the immutable pre-2.0 archive linked below.
5
5
 
6
6
  ## Unreleased
7
7
 
8
+ ## 4.6.7 — 2026-08-24
9
+
10
+ **Patch** over **4.6.6**. Production-hardening: CODEOWNERS, eval/pack honesty, CLI extracts,
11
+ spawn timeouts, and HTML list cap. **No required config migration.** Does not close Z09.
12
+
13
+ **Status: published** (on npm `latest`; see `docs/releases/4.6.7.md`).
14
+
15
+ ### Changed
16
+
17
+ - **CODEOWNERS:** `/src/`, `/bin/`, and `/schemas/` owned by `@pedroknigge`. GitHub still
18
+ needs `require_code_owner_reviews` (or an approving-review count) for that file to
19
+ enforce; the in-tree list is the product control.
20
+
21
+ - **Eval comparative fixture:** `saas-dashboard/without-ark` is a real Presentation→Domain
22
+ **value** import. Type-only was non-blocking and made the nightly oracle go false-green.
23
+
24
+ - **npm pack JSON:** `scripts/npm-pack-report.mjs` strips ANSI and parses JSON lines that
25
+ actually have `filename`. Empty `[]` / `{}` stay empty; missing filename still throws.
26
+
27
+ - **CLI extracts:** hook payload, package-manager helpers, and check args/config/watch live
28
+ in `bin/lib/`. Module-budget maxima were not raised.
29
+
30
+ - **git/gh timeouts:** `SPAWN_TIMEOUT_MS = 8000` on git/gh `spawnSync`. Timeout is
31
+ fail-closed (`status !== 0`).
32
+
33
+ - **HTML violation cap:** beginner and full showcase lists share a cap of 12 plus
34
+ `+N more (T total)`. KPI tiles still use the full array.
35
+
36
+ ## 4.6.6 — 2026-08-22
37
+
38
+ **Patch** over **4.6.5**. Phase AL corrective honesty plus a slimmer public docs surface.
39
+ **No required config migration.** Does not close Z09. AL05 stays parked.
40
+
41
+ **Status: published** (see `docs/releases/4.6.6.md`).
42
+
43
+ ### Changed
44
+
45
+ - **D0 adopted (AL01):** a tree is adopted only when a required GitHub status runs
46
+ `arkgate-check --strict-merge`, or `.ark/adoption-stance.json` records explicit
47
+ `stance: "advisory-only"`. Doctor / start / status no longer sound like success from
48
+ `AGENTS.md` or a workflow file alone. `operatingMode: enforce` stays contract-fit
49
+ (`ok` / `goal.met` / `--strict-merge` unchanged). Does not close Z09.
50
+
51
+ - **`--strict-merge` / `--strict` created-path design delta (AL02):** the advertised merge
52
+ command now evaluates `domain-logic-in-ui` for **created** files versus the Git merge
53
+ base (`--base-ref`, then `ARK_POLICY_BASE_REF`, then `origin/$GITHUB_BASE_REF`, then
54
+ local discovery). Historical residual and a stronger rule in an **existing** UI file
55
+ stay green. Missing base skips the check (does not exit 2), matching Action first-push
56
+ / EH04. `--fail-on-new-smells --base-ref` remains the full new+worsened-on-touched-paths
57
+ ratchet (Z10 unchanged). The GitHub Action needs no extra flags: `--strict` inherits
58
+ `ARK_POLICY_BASE_REF`.
59
+
60
+ - **Stewards or Adapt (AL03):** empty `stewards[]` cannot print Healthy ENFORCE (doctor
61
+ unfinished residual `empty-stewards`; `operatingMode` stays `enforce`). T4 weakening
62
+ and T5 `--update-baseline` require `--contract-session` even with an empty list;
63
+ `--policy-ack` remains the hash tooth. `--force` does not skip the session. Does not
64
+ flip all `--strict-merge` to team preflight when the list is empty.
65
+
66
+ - **First-run noun cut (AL04):** `ark start --help`, `ark start` preview, and the first
67
+ doctor screen each stay at **≤12** product nouns. Default `arkgate-check --doctor` is
68
+ compact; `--doctor --all` prints Details. Compass and deep-module coach stay in JSON and
69
+ drop from human output. No new skill names, scores, or LLM verdicts.
70
+
71
+ - **Docs surface:** npm `CHANGELOG.md` keeps Unreleased + 4.6.x (pre-4.6 in
72
+ `docs/archive/CHANGELOG-pre-4.6.md`). Live `ROADMAP.md` is the current queue; full
73
+ history is archived. README / use lead with adopted = required merge status.
74
+
8
75
  ## 4.6.5 — 2026-08-19
9
76
 
10
77
  **Patch** over **4.6.4**. Adoption, placement, doctor, upgrade, and write-path honesty for
11
78
  existing Next.js trees and multi-host teams. **No required config migration.**
12
79
 
13
- **Status: current** (shipping as `arkgate@4.6.5`; see `docs/releases/4.6.5.md`).
80
+ **Status: published** (see `docs/releases/4.6.5.md`).
14
81
 
15
82
  ### Changed
16
83
 
@@ -46,7 +113,7 @@ existing Next.js trees and multi-host teams. **No required config migration.**
46
113
  trust the exact hook definition, and verify `doctor.writePath` after a governed patch.
47
114
  **No required config migration.**
48
115
 
49
- **Status: published** (on npm `latest` until 4.6.5 lands; see `docs/releases/4.6.4.md`).
116
+ **Status: published** (see `docs/releases/4.6.4.md`).
50
117
 
51
118
  ### Changed
52
119
 
@@ -160,2108 +227,7 @@ and `ruleId`s stay stable. No new skill names, sensors, or scores.
160
227
  common terms. Leftover design work replaces “design-weak” in human copy; JSON `designWeak`
161
228
  is unchanged.
162
229
 
163
- ## 4.5.7 2026-08-12
164
-
165
- **Patch** over **4.5.6**. Cursor hard write path: project `.cursor/hooks.json` `preToolUse`
166
- gate for `Write` / `StrReplace` (failClosed), host matrix + doctor honesty, payload mapping
167
- (`contents` / `StrReplace`), install/merge without wiping sibling hooks. Repair envelope may
168
- emit; Write `updated_input` reinjection is **not** claimed. Codex/OpenCode stay advisory at
169
- write. Shell/Tab/human edits still rely on required CI. **No required config migration.**
170
-
171
- **Status: published** (on npm `latest`; see `docs/releases/4.5.7.md`).
172
-
173
- ### Added
174
-
175
- - **Cursor hard write (CH01):** install writes `.cursor/hooks.json` with
176
- `preToolUse` matcher `Write|StrReplace`, `failClosed: true`, `--hook --hook-repair`,
177
- `--root-env CURSOR_PROJECT_DIR`. Merge preserves sibling Cursor hooks.
178
- - **Hook runtime:** Cursor payload normalization (`contents` → `content`, `StrReplace` → Edit)
179
- and stdout `{ permission: "deny", agent_message, user_message }` on block.
180
-
181
- ### Changed
182
-
183
- - Host support matrix: Cursor `hard-write: true` for listed ops; soft hosts are Codex/OpenCode.
184
- - Docs: `docs/ai-gates.md`, agent guide, README matrix, CLI help.
185
-
186
- ## 4.5.6 — 2026-08-11
187
-
188
- **Patch** over **4.5.5**. Field upgrade & multi-project MCP truth (Phase FX): registry-aware
189
- package install, structured skip recovery, skill drift + opt-in refresh, post-upgrade checks,
190
- MCP process package honesty, host selection notes, early whatsNew, inventory UX-copy quieting.
191
- **No required config migration.** No new skill names, sensors, or scores. Freezes held.
192
-
193
- **Status: published** (on npm `latest`; see
194
- `docs/releases/4.5.6.md`).
195
-
196
- ### Added
197
-
198
- - **Registry-aware upgrade (FX01–FX02):** `ark upgrade --apply` no longer skips package install
199
- solely because CLI version equals `node_modules/arkgate`. When the registry (injectable for
200
- tests) is ahead, install runs. Skip paths emit structured JSON (`reasonCode`,
201
- `installedVersion`, `cliVersion`, `registryLatest`, `suggestedInstallCmd`) plus human
202
- recovery. Offline / registry-unknown stays honest (`REGISTRY_UNAVAILABLE`) without inventing
203
- a bump.
204
- - **Skill content drift honesty (FX03):** upgrade preview/JSON `skillDrift` counts
205
- current/stale/customized/missing skills with sample paths and preserve notes.
206
- - **Opt-in skill refresh (FX04):** `--refresh-skills` rewrites customized managed *skills* to
207
- package templates with explicit consent. Conflicted assets still need `--accept-conflicts`.
208
- Never silent overwrite of true user edits by default.
209
- - **Post-upgrade verification block (FX05):** after apply, advisory `postUpgradeChecks` (pin↔CLI,
210
- architecture verification, dual-truth, doctor/status/MCP notes). Always `notAScore`.
211
- - **MCP multi-project process honesty (FX06):** every MCP tool context includes
212
- `processPackage` (`processArkgateVersion`, `projectInstalledVersion`,
213
- `processPackageMismatch` / `processStale`, `nextAction`). Prefer project-local CLI until
214
- identity matched and versions align; multi-checkout recipe in agent-guide + `/ark-upgrade`.
215
- - **Host selection honesty (FX07):** upgrade notes when detected active host ∉ managed
216
- `--tools`/manifest hosts and suggests `--tools` expansion.
217
- - **whatsNew early path (FX08):** suggested improvements on preview even when nothing to apply;
218
- includes FX field-truth try/inspect items.
219
- - **Inventory UX message quieting (FX09):** rules inventory downranks pure UX/error-message
220
- string constants so they do not crowd business-rule pilots (no new sensors).
221
-
222
- ### Changed
223
-
224
- - `/ark-upgrade` skill + upgrade help document registry-aware install, `--refresh-skills`,
225
- skill drift, post-upgrade checks, and multi-project MCP restart guidance.
226
-
227
- **Freezes held:** no principle scores/ranks; no new skill names; no silent customized overwrite;
228
- no silent multi-project MCP retarget; soft hosts stay advisory; no fake published claims.
229
-
230
- ## 4.5.5 — 2026-08-11
231
-
232
- **Patch** over **4.5.0**. Deep-module coach train plus upgrade **suggested improvements /
233
- what’s new** so consumers know what to try after install. **No required config migration.**
234
- No new skill names, sensors, or scores. Freezes held.
235
-
236
- **Status: published** (`arkgate@4.5.5` on npm `latest`; see `docs/releases/4.5.5.md`).
237
-
238
- ### Added
239
-
240
- - **Deep-module coach (advisory):** `ark-check --doctor` JSON `doctor.deepModuleCoach` + human
241
- section + HTML `data-advisory="deepModuleCoach"`. Hot paths from bounded git history
242
- (`unavailable` + empty when history missing — never invent). Deepening candidates projected
243
- only from existing design smells / physical cohesion / pilot / residual compass evidence —
244
- empty when no evidence. Always `notAScore: true`; never flips gate verdicts. Pure helper
245
- `buildDeepeningCandidates` (+ CLI gen mirror).
246
- - **Product voice + skills:** lexicon for depth / seam / deletion test / test-at-public-interface
247
- / domain glossary / two-axis done. Existing skills (explore, think, place, fix, loop, adopt)
248
- deepened; agent-skills 1:1. Compact router + agent-guide **two-axis done** (Enforce green ≠
249
- feature done). Remediation port/inject `nextAction` prose includes test at the public interface.
250
- - **Upgrade suggested improvements / what’s new:** `ark upgrade` JSON `whatsNew` + human block
251
- lists concrete try/inspect actions (deep-module coach, improvement compass, session/status
252
- honesty, two-axis done, self-service honesty). Always `notAScore`; never a gate input.
253
-
254
- ## 4.5.0 — 2026-08-10
255
-
256
- **Minor** over 4.4.0. Session control-plane honesty (status/MCP improvement compass with explicit
257
- modes), domain module fitness (split oversized pure modules), selective pure verification ratchet,
258
- self-service upgrade activation honesty, and a short session recipe in product docs. **No required
259
- config migration.** Codex remains advisory at write time. Skills and AGENTS projection never
260
- enforce. **Status: published** (`arkgate@4.5.0` on npm `latest`; see `docs/releases/4.5.0.md`).
261
-
262
- ### Added
263
-
264
- - **Status / MCP improvement compass honesty:** `ark status --json` and MCP `ark_status` always
265
- project `improvementCompass` with explicit mode `full` \| `subset` \| `unavailable`, residual
266
- lens ids, and `notAScore: true`. Incomplete or missing session facts never invent green residual.
267
- When mode is `full`, residual ids are a subset of doctor residual for the same facts (report
268
- snapshots store the thin slice). Residual never flips `valid` / strict-merge / `goal.met`.
269
- Root helpers: `projectStatusImprovementCompass`, `STATUS_COMPASS_MODES`.
270
- - **Session recipe (product docs):** identity bind → `ark status` → act on residual / `findingRef`;
271
- run doctor when status compass mode is not `full`. Documented in use / agent-guide / develop —
272
- no new skill names.
273
- - **Managed upgrade self-service honesty:** `ark upgrade [--json]` surfaces `selfService` with
274
- per-host write-path activation labels (`hard` \| `advisory` \| `unavailable`) and customized
275
- content-identity preserve (`customizedPaths` / `customizedContentPreserved`). Soft hosts never
276
- hard; upgrade never invents `hardWriteActive` from disk alone. Always `notAScore: true`. Human
277
- output: “Self-service honesty” lines.
278
-
279
- ### Changed
280
-
281
- - **Domain module fitness:** pure Domain `improvementCompass` monolith split into
282
- `improvementCompassTypes` + `improvementCompassMap` + facade `improvementCompass` (public
283
- re-exports unchanged). All three tracked in `check:module-budgets`; over-ceiling domain modules
284
- require a behavior-preserving split — raising max alone is not done. CLI pure mirrors:
285
- `improvement-compass-types.mjs`, `improvement-compass-map.mjs`, `improvement-compass.mjs`.
286
- - **Critical pure verification ratchet:** selective verification islands on
287
- `layerMatch` peerIsolation fail-closed (missing paths/slices),
288
- `policyDeltaAcknowledgementMatches` (hash + finding-id set), and
289
- `canPromoteInvariant` promote honesty. Property suites under `tests/property/` plus unit fixtures;
290
- Stryker mutate ranges + critical groups `peer-isolation-fail-closed`,
291
- `policy-delta-ack-match`, `invariant-promote-honesty`. Mutation remains cost-gated to full-matrix
292
- CI / publish (`npm run test:mutation` via `test:confidence`) — **not** a whole-repo mutation claim.
293
- Strict semantics unchanged.
294
-
295
- **Freezes held:** no principle scores/ranks; no new skill names; no new ArkRules sensors; no LLM
296
- verdict; projection never enforces; no false hard-write for soft hosts.
297
-
298
- ## 4.4.0 — 2026-08-09
299
-
300
- **Minor** over 4.3.0. Improvement compass (architecture lenses as a `notAScore` projection of
301
- existing sensors), doctor/HTML residual coaching, deeper skills + compact router for vibe-coder
302
- and full-AI workflows, and product-only public docs. **No required config migration.** Codex remains
303
- advisory at write time. Skills and AGENTS projection never enforce. **Status: published**
304
- (`arkgate@4.4.0` on npm `latest`; see `docs/releases/4.4.0.md`).
305
-
306
- ### Added
307
-
308
- - **Improvement compass:** doctor human section + `doctor.improvementCompass` JSON — closed set of
309
- architecture **lenses** (SoC, DIP, domain alignment, …) with status `ok` / `residual` /
310
- `not-instrumented` / `out-of-scope`, evidence refs, optional next action, capped `topResidual`,
311
- always **`notAScore: true`**. Projected from existing smells, walls, cohesion, ArkRules, and
312
- design-weak signals. Residual lenses never flip `valid`, strict-merge, or `goal.met`.
313
- Out-of-scope locked for scalability, app security tooling, and full resilience. Type-only
314
- placement debt (`failsStrict: false`) maps to **modularity** residual only (not coupling).
315
- - **Optional status slice:** thin `improvementCompass.topResidual` on the status manifest schema for
316
- Tooling pass-through — **`ark status` does not compute lenses yet**; agents should read doctor.
317
- - **HTML report:** advisory section `data-advisory="improvementCompass"` (report parity with doctor).
318
- - **Skills + compact router:** same **13** skill names deepened for vibe-coder outcomes — compass
319
- preflight, anti false-done, AI-easy placement cues, out-of-scope honesty, Completion **Compass**
320
- bullet. Compact start router surfaces residual lenses and forbids “done” on green edges alone.
321
- - **Docs:** use / develop / agent-guide describe compass + Align/Stabilize/Shape in product language.
322
-
323
- **Freezes held:** no principle scores/ranks; no new skill names; no new ArkRules sensors; no LLM
324
- verdict; projection never enforces.
325
-
326
- ## 4.3.0 — 2026-08-09
327
-
328
- **Minor** over 4.2.1. Agent contract surface: diagnostic code catalog, unified status snapshot,
329
- version-matched agent projection, Agent Skills packaging of the existing 13 skills, stable finding
330
- refs, and maintainer placement A/B eval. **No required config migration.** Codex remains advisory
331
- at write time. Skills and AGENTS projection never enforce. **Status: published**
332
- (`arkgate@4.3.0` on npm `latest`).
333
-
334
- ### Added
335
-
336
- - **Diagnostic code catalog (ACS02):** closed public `ruleId` vocabulary with why/fix text and
337
- docs anchors (`docs/diagnostics.md#RULE_ID`). Domain source `src/domain/diagnosticCatalog.ts`,
338
- generated CLI mirror `bin/lib/diagnostic-catalog.mjs`, root exports (`DIAGNOSTIC_CATALOG`,
339
- `getDiagnosticCatalogEntry`, `diagnosticDocsPath`, …). Remediation/parity fixtures forbid
340
- unknown production codes. No new rule semantics — cataloguing only.
341
- - **Unified status manifest (ACS03):** `ark status --json` (+ MCP `ark_status`) returns one
342
- session/project snapshot — identity binding, honest write-path activation, last-check summary,
343
- ArkRules residual counts, primary next action. Domain `src/domain/statusManifest.ts`, generated
344
- pure `bin/lib/status-manifest.mjs`, schema `arkgate/schema/status-manifest`, root exports
345
- (`buildStatusManifest`, `ARK_STATUS_MANIFEST_SCHEMA`, …). Never prompts; `CI=1` forces JSON.
346
- Optional `--expected-root` / `--expected-project-id` for matched vs stale identity. Not a score.
347
- - **Version-matched agent projection (ACS04):** `ark agents-md` regenerates a managed
348
- AGENTS.md projection block stamped with the installed package version + contract summary
349
- (layers, diagnostic short list). Install/upgrade templates (`agentInstructions` /
350
- `compactAgentInstructions`) embed the same block. Content-identity merge preserves customized
351
- regions outside markers. Explicitly **non-authoritative** — enforcement remains ark-check /
352
- hooks / CI; projection is never a gate input. Domain `src/domain/agentProjection.ts`, generated
353
- pure `bin/lib/agent-projection.mjs`, root exports (`buildAgentProjectionBlock`,
354
- `mergeAgentProjectionDocument`, …). Drift: `ark agents-md --check`.
355
- - **Agent Skills packaging (ACS05):** the existing **13** `/ark-*` skills ship in an Agent
356
- Skills–compatible layout at `templates/agent-skills/<name>/SKILL.md` (1:1 with flat
357
- `templates/skills/*.md`). Ecosystem install: `npx skills add ./node_modules/arkgate/templates/agent-skills`
358
- (or the GitHub tree). Ark install path unchanged (`--install-agent-gates` / `--skills-only`).
359
- Domain `src/domain/agentSkillsPackage.ts` (frozen `ARK_SKILL_NAMES`, frontmatter/layout
360
- validation), generated pure `bin/lib/agent-skills-package.mjs`, `npm run generate:agent-skills` /
361
- `check:agent-skills`. **No new skill names.** Skills remain non-enforcing.
362
- - **Stable finding refs (ACS06):** analysis-result schema **`1.5`** — every factory-emitted
363
- diagnostic (CLI JSON, MCP, opt-in `ARK_REPAIR_JSON` repair payload) includes `findingRef`
364
- (`fnv1a-…`), baseline-compatible `targetKey`, and `docsCodePath`. `targetKey` is exactly the
365
- baseline (occurrence) freeze key so multi-turn agent loops never orphan baselined debt.
366
- Domain helpers on `adapterContract` / `baselineKey`; multi-turn fixture
367
- `tests/fixtures/finding-refs/multi-turn-stability.json`.
368
- - **Maintainer placement A/B eval (ACS07):** under `eval/placement-ab/`, fixture pairs compare
369
- agent placement **with** Ark gates+skills (`ark-place` / `ark-architect` markers) vs
370
- **without**. CI-safe dry mode (`npm run eval:placement-ab`) measures real `ark-check` on both
371
- arms; results path `eval/placement-ab-report.json` + template
372
- `eval/placement-ab/results/RESULTS.template.json`. Live mode optional and never fails when no
373
- agent/API key is present. **Not a product score.**
374
-
375
- ### Docs / claims (ACS08)
376
-
377
- - Claims matrix refreshed for 4.3.0 agent-contract statements (**0 Contradicted** on public
378
- lanes). Release notes at `docs/releases/4.3.0.md` (**Status: published**). npm `latest` is **4.3.0**.
379
-
380
- ## 4.2.1 — 2026-08-08 (published)
381
-
382
- **Patch** over 4.2.0. Next.js **16.3** field compatibility: root `proxy.ts` (Next 16 network-boundary
383
- rename of middleware) is scanned and classified; eval fixtures and release-surface pins track
384
- `next@16.3.0`. **No required config migration.** Codex remains advisory at write time.
385
- **Status: published** (`arkgate@4.2.1`; superseded by 4.3.0 on `latest`).
386
-
387
- ### Fixed
388
-
389
- - **Next 16 root `proxy.ts` include:** Next overlay adds existing root (and `src/`)
390
- `proxy.ts` / `proxy.js` / classic `middleware.ts` / `middleware.js` to `include` so layer
391
- patterns actually scan them. Patterns alone left package-root `proxy.ts` outside
392
- `include: ['src','app']` and therefore ungoverned on typical App Router trees.
393
- - **Physical-cohesion framework names:** treat `proxy` like `middleware` / `route` / `page` as
394
- framework-owned (Next 16 rename).
395
-
396
- ### Changed
397
-
398
- - **Eval Next pins:** `eval/cases/next-core-imports-db` and monorepo frontend fixture use
399
- **next@16.3.0** (was 15.5.21); q06 release-surface pin accepts 16.x or patched 15.5.21+.
400
-
401
- ### Security (carried from main)
402
-
403
- - Transitive overrides remain: `fast-uri` **3.1.5**, `brace-expansion` **2.1.4** / **5.0.9**,
404
- `nanoid` **3.3.18**.
405
-
406
- ## 4.2.0 — 2026-07-31 (published)
407
-
408
- **Minor** over 4.1.1. Phase WI — workspace identity, activation truth, and safe multi-repository
409
- skill installation. Adds a stable MCP project-identity contract, exact-root `ark_identity`
410
- handshake, and project-bound `ark_manifest`; cross-project/config paths fail before Layers or
411
- ArkRules analysis; Codex setup distinguishes files configured on disk from a runtime observed
412
- after restart. **No required config migration.** Legacy MCP calls remain callable but explicitly
413
- non-authoritative until bound. Codex remains advisory at write time. **Status: published**
414
- (`arkgate@4.2.0`; superseded by 4.2.1 on `latest`).
415
-
416
- ### Added
417
-
418
- - **Project identity contract:** public `ark.project-identity` JSON schema, root API exports,
419
- stable `projectId`, independent contract/runtime identities, and package-isolation coverage.
420
- - **MCP handshake and manifest:** `ark_identity` plus shared `project.expectedRoot` /
421
- `expectedProjectId` input on every tool. The initial handshake requires the exact project root;
422
- descendants require the matching project id. Project-bound `ark_manifest` is authoritative
423
- after binding; compatibility `ark://manifest` reads are always unverified/non-authoritative.
424
- Project-bound results and errors carry identity, binding state, and `authoritative`.
425
- - **Verdict facets:** `ark_check.verdict` separates identity, analysis completeness, graph,
426
- coverage, active gates, and overall result without removing legacy `ok`.
427
- - **Portable evidence:** focused Linux, macOS, and Windows CI for native canonical paths,
428
- activation, and multi-repo skill behavior.
429
- - **Report provenance:** architecture snapshots record the Git `HEAD`, branch when attached, and
430
- dirty-worktree state with a shell-free, best-effort probe.
431
-
432
- ### Fixed
433
-
434
- - **Wrong-project MCP reuse:** a process bound to project A rejects project B, config/manifest/
435
- tsconfig escapes, nested Ark roots, and external write/change paths before returning placement,
436
- golden-pattern, Layers, or ArkRules analysis.
437
- - **Skill MCP ordering:** every shipped `/ark-*` skill now requires a matched `ark_identity`
438
- preflight before consuming any MCP analysis and carries the exact root plus returned project id
439
- on each later call; stale/mismatched hosts fall back to the workspace-local CLI.
440
- - **Codex activation truth:** install/start/doctor say configured + restart required until a live
441
- identity match; compact setup reports partial installs and removes only exact ArkGate-owned
442
- project TOML.
443
- - **Gate-presence false green:** `--require-gates` now implies strict config validation and checks
444
- semantic Ark content in AGENTS, project-rooted MCP/Codex compact registrations, and fail-closed
445
- CI instead of accepting placeholder files. Backgrounded `ark-check ... &` is not accepted as
446
- merge enforcement. Native Windows launcher paths are recognized.
447
- - **Same-machine skill churn:** managed upgrades no longer rewrite an unchanged skill only to
448
- refresh `arkVersion`; repo catalogs remain isolated.
449
- - **Shared Codex downgrade:** ArkGate 4.2.0+ installers cannot replace a newer managed
450
- `$CODEX_HOME/skills` entry with an older bundle, including with `--force`; identical installs
451
- are idempotent and report why they were skipped. Pre-4.2 binaries do not understand this
452
- protocol, so legacy repos must be upgraded before they write the optional home catalog.
453
- Versioned catalog metadata + an install lock prevent
454
- reintroducing retired skills and serialize concurrent repos. A durable pending-catalog journal
455
- preserves that version floor across interrupted writes; same/newer retries recover it, while
456
- corrupt metadata fails safe before skill mutation.
457
- - **Path aliases and junctions:** hook paths retain the caller spelling while MCP/resident
458
- identities canonicalize root, config, manifest, tsconfig, launcher, and missing-tail import
459
- paths. macOS `/var` → `/private/var` aliases and Windows junctions therefore reach the same
460
- resident endpoint without turning in-project writes into external paths or losing import edges.
461
- Windows cross-drive import targets are rejected as external even though `path.relative()`
462
- returns an absolute drive-qualified path for them.
463
- - **ArkRules inventory noise:** actual governed layer, generated/test/fixture context, technical
464
- constants, and error-constructor metadata suppress false business-rule pilots while preserving
465
- eligible Domain/controller candidates.
466
- - **Design guidance truth:** UI business-rule pilots now route Domain → Application → UI; local
467
- permission/UI-state `canEdit` helpers are not flagged by name alone; god-module pilots exclude
468
- seed/fixture/demo/migration/generated files; design-weak labels retain the observed
469
- SUGGEST/ADAPT/ENFORCE mode.
470
- - **Cross-version report deltas:** evolution reports no longer present an Ark score delta when the
471
- origin and current snapshots were produced by different ArkGate versions. Raw coverage, file,
472
- violation, layer, rule, and gate facts remain visible.
473
-
474
- ### Compatibility
475
-
476
- - No required `ark.config.json` migration and no new ArkRules sensor family.
477
- - Existing MCP clients continue to work with `binding.status = "unverified"` and
478
- `authoritative = false`; generated instructions require `ark_identity` followed by
479
- `ark_manifest`. Standard `ark://manifest` resource reads remain compatibility-only and
480
- non-authoritative.
481
- - `projectId` is stable for one canonical local checkout across process restarts and contract
482
- edits. It is intentionally not a cross-machine or cross-operating-system content id.
483
-
484
- ## 4.1.1 — 2026-07-25 (published)
485
-
486
- **Patch** over 4.1.0. Phase EH — enforcement evidence modeling + documentation truth (field Codex
487
- feedback + public-lane claims audit). Honesty and doctor/CI evidence taxonomy; first-push-safe CI
488
- base-ref; report `.gitignore` coverage without defeating `!` exceptions. **No required config
489
- migration.** Does not invent hard-write for Codex/Cursor/OpenCode. Does not close Z09 / RB-11.
490
- **Status: published** (`arkgate@4.1.1`; superseded by 4.2.0 on `latest`).
491
-
492
- ### Added
493
-
494
- - **Doctor readiness split (EH05):** `productHonesty` separates contract/project readiness from
495
- permanent soft-write host posture. Soft-write alone no longer forces global `Not finished`;
496
- evidence keeps `soft-write-host` under `environmentResidualIds` with composite headline
497
- (e.g. “Architecture contract ready; Codex local writes are advisory”) and an actionable
498
- `primaryNextAction` pointing at the required GitHub status context.
499
- - **Fields:** `contractReadiness`, `localWriteBoundary`, `architectureReasonIds`,
500
- `environmentResidualIds` / `environmentResiduals` on `productHonesty` (additive JSON).
501
- - **Provider policy reason (EH06):** GitHub Free/private branch-protection HTTP 403 →
502
- `provider-policy-unavailable-plan` / `unavailable-plan` (not only generic
503
- `provider-enforcement-unverified`).
504
- - **CI runtime observation (EH06):** successful Actions runs can set `runtimeObserved: true`
505
- independent of branch-protection API; `hard: false` when status is not required.
506
- - **Repair envelope vs reinjection (EH07):** host matrix capabilities
507
- `repair-envelope-emitted` / `repair-reinjection-guaranteed`; Codex emits envelope
508
- (`--hook-repair`) without reinjection guarantee; minimum ops coverage
509
- (`apply_patch` / `shell` / `pre-commit` → hard=false).
510
- - **Claims matrix refresh (EH01):** `docs/audit/claims-matrix.md` dated 2026-07-25.
511
-
512
- ### Fixed
513
-
514
- - **Report `.gitignore` (EH03):** recognizes `.ark/*`, `/.ark/*`, `.ark/reports/` as coverage;
515
- never appends broad `.ark/` after a narrower policy with `!` exceptions
516
- (e.g. `!/.ark/golden-pattern.json`).
517
- - **First-push CI base-ref (EH04):** generated workflow + Action clear all-zero
518
- `github.event.before` and only pass `--fail-on-new-smells --base-ref` when
519
- `git cat-file -e "${REF}^{commit}"` succeeds; otherwise full `--strict-merge` without delta.
520
-
521
- ### Improved
522
-
523
- - **CLI vs status context copy (EH07):** user-facing text distinguishes `arkgate-check` /
524
- `ark-check` CLI from the GitHub **required status context** name.
525
- - **Public lanes (EH02/EH08):** README host matrix, product-voice, ai-gates CI snippet, use/develop
526
- honesty wording aligned with EH behavior; 0 Contradicted on public lanes.
527
-
528
- ## 4.1.0 — 2026-07-25 (published)
529
-
530
- **Minor** over 4.0.1. Single ship train: field product phases + field-gap closure (S0–S7) +
531
- maintainer CI PR-slim / full-matrix speed work. Field product phases from Next monorepo dogfood +
532
- objective review, plus field-gap lab re-verify:
533
- Next API shell classification, anti false-green doctor packaging, monorepo config walk-up with
534
- write-root split, SPA/lib classification vacuum fixes, ESLint path-alias parity, structure-sensor
535
- false-positive tuning, ArkRules merge-plane honesty, type-edge placement debt, rules-inventory
536
- UI noise reduction, migrate-contract retrofit, and config write containment.
537
- **No required config migration.** Does not weaken write gate or CI value edges. Does not close
538
- Z09 / RB-11 field claims. **Status: published** (`arkgate@4.1.0`; superseded by 4.1.1 on `latest`).
539
-
540
- ### Added
541
-
542
- - **Next API = Application shell (P0-A):** Framework overlay, `ui-surface`, and `monorepo`
543
- presets classify `app/api/**`, `src/app/api/**`, `pages/api/**` as
544
- **ApplicationOrchestration** (higher specificity than Presentation `**/app/**`). UI routes
545
- stay Presentation. Docs: brownfield + configuration honesty.
546
- - **Product honesty surface (P0-B):** Doctor JSON `productHonesty` consolidates design-weak,
547
- weak/partial coverage, dirty freeze, package dual-truth, residual pilots, and soft write hosts
548
- into one unfinished/not-whole-tree message (`notAScore`). Human doctor section + HTML card
549
- (`data-product-honesty`). Never a numeric architecture score. **Anti false-green:** never
550
- `finished: true` when active **blocking** violations remain, mode is ADAPT/SUGGEST with debt,
551
- dual-truth pin, or residual pilots are open.
552
- - **ArkRules mergePlanes (P1-M):** `rulesUnderContract.mergePlanes` states which plane can fail
553
- merge (layers vs enforced structure sensors vs invariants) and dual-plane stamp (heuristics vs
554
- catalog+coverage; never one score).
555
- - **Type-edge policy fields (P1-type):** Doctor `violations.typeEdgePolicy` + SharedTypes
556
- guidance; type-only denied edges stay on the **violations** list with `failsStrict: false`
557
- and diagnostics **severity: warning** (non-blocking for merge/exit/library `valid`). Value
558
- edges still block. **Exception:** `peerIsolation` type-only edges stay hard.
559
- - **`--migrate-contract`:** Retrofit existing configs with Next API shell patterns
560
- (Application) without full re-init — field path for brownfield Next App Router / Pages API.
561
- - **Monorepo discovery walk-up:** Doctor/check from a nested package cwd find the monorepo
562
- `ark.config.json` (no invented ADAPT 0%). Mutative install/start write under the **write root**
563
- (cwd/`--root`) unless `--follow-config-root` is set — does not clobber monorepo AGENTS/skills
564
- from a nested package by accident.
565
- - **SPA / vacuum classification (S3):** SPA preset + adopt/start heuristics reduce
566
- Application-empty / lib-as-Presentation lies on Vite SPA and similar client trees; Domain
567
- specificity keeps nested `**/domain/**` on DomainModel when patterns compete.
568
- - **Config write containment:** Mutative commands refuse `--config` paths outside project root
569
- (fail closed; no silent escape write).
570
-
571
- ### Improved
572
-
573
- - **ESLint path aliases (P0-C):** `ark/no-domain-infra-imports` resolves tsconfig `paths` /
574
- `baseUrl` (including simple relative `extends`) so `@/*` forbidden edges match CLI inside the
575
- documented envelope. Residual honestly documented in ai-gates (no project refs / multi-target
576
- / bare packages claim). Dual-driver parity tests lock type-only vs value.
577
- - **Structure sensors prefer false negatives (P1-L):** `aggregate-private-state` ignores
578
- readonly-only public props; `always-valid-factory` requires mutable surface evidence; anemic
579
- bar needs ≥2 public fields. Intentional DDD private aggregates stay quiet; true positives
580
- retained. Defaults remain advisory for noisy sensors.
581
- - **Rules inventory UI noise (P2-N):** Magic-constant inventory skips route/theme/UI label noise
582
- and pure UI/Next page surfaces; still finds controller validation and domain constants.
583
- - **Force-gates / upgrade digest (S4):** Force-install preserves content-identity digests so
584
- managed upgrade does not falsely report unbound/clobber after intentional force refresh.
585
- - **Doctor / HTML honesty (S1/S0):** Type-only edges excluded from blocking counts in planMet,
586
- HTML banners, and adapter `valid` parity; dual-truth pin and package-pin-absent surface on
587
- `productHonesty.reasonIds`.
588
- - **Field dogfood smoke:** Offline gap-assertion scaffold under `scripts/field-dogfood/` for
589
- regression before minors (7-repo lab re-verify 15/15 critical assertions).
590
- - **CI PR slim vs full matrix:** composable `ci-profile` (`scripts/ci-profile.mjs` +
591
- `.github/workflows/ci.yml`) — ordinary PRs use coverage-only build, 1 packed-TS cell, 1
592
- gallery PM, onboarding `*/small`, and path-filtered performance budgets; full matrix (main,
593
- labels `full-matrix`/`release`, release-prep branches `feat/4.1*`) keeps `test:confidence`
594
- (mutation) and complete product matrices with `fail-fast: false`. Documented in CONTRIBUTING.
595
- Does not weaken publish-path confidence.
596
-
597
- ### Fixed
598
-
599
- - Presentation→Persistence baselining pressure from Next API routes mis-layered as UI (field
600
- dogfood on App Router monorepos).
601
- - False “finished / whole-tree guarantee” packaging when the graph still has blocking debt.
602
- - Nested monorepo package cwd inventing ungoverned ADAPT world.
603
- - Type-only ESLint/CLI/HTML/adapter parity drift (blocking counts and exit codes).
604
- - Config path outside `--root` accepted on mutative write paths.
605
- - Greenfield `ark start --yes --apply` refused on empty trees (vacuous 0% coverage) and residual
606
- `src/**` Application catch-all restored for non-Next layered presets.
607
- - Presentation `src/**/api/**` no longer swallows Application bags like `src/core/api/**`.
608
-
609
- ### Coverage floors (internal)
610
-
611
- - Statement/line **80 → 79.5**, branch **82.5 → 82.0**, function **85 → 76.5** after field-gap
612
- surface growth (measured clean candidate ~79.95% / ~82.3% / ~77.0%). Per-file write-path
613
- floors recalibrated to measured honesty (not a silent weaken of architecture gates).
614
- - Mutation break threshold **90 → 87** (measured ~88–89 on the same candidate).
615
- Critical mutation groups drop managed-upgrade line window for 4.1.0 (S4 force-preserve
616
- remains unit-tested; NoCoverage noise on toml-section residual).
617
-
618
- ## 4.0.1 — 2026-07-24
619
-
620
- **Patch** over 4.0.0. Field footgun fix for stale global CLI on upgrade, ArkRules HTML/doctor
621
- catalog honesty, dual-plane product wording, and internal coverage attribution.
622
- **No required config migration.** Does not weaken write gate or CI. Does not close Z09 / RB-11.
623
-
624
- ### Improved
625
-
626
- - **HTML / doctor ArkRules showcase:** `rulesUnderContract` is no longer counts-only.
627
- When `arkRules` is active, the report lists **per-layer** structure/invariant totals,
628
- **structure sensors** (id · sensor · mode · description), **uncovered** invariants,
629
- and a **covered sample** — so `/ark-explain` has real [ArkRules] content to walk.
630
- Skill text updated to open `arkrules/*` and name real IDs.
631
- - **HTML advisory cards:** doctor advisory blocks (contract health, ambient, cohesion,
632
- parse health, graph blind spots, ArkRules) render with `class="section card"` so they
633
- match the white panel styling of Layers / Violations / Enforcement (were bare
634
- `<section data-advisory>` on the page background).
635
- - **Dual-plane honesty in product surfaces:** configuration / use / product-voice /
636
- `/ark-explain` and the ArkRules HTML strip state that structure sensors are heuristics,
637
- invariants are catalog + coverage evidence (not a business runtime), and the two planes
638
- never merge into one architecture score.
639
- - **Coverage floors (internal):** branch threshold 83.0 → **82.5** after Fase 0 surface
640
- growth (measured ~83% clean candidate); unit tests for upgrade refuse/HTML catalog use
641
- ESM imports so V8 attributes hits (createRequire was under-counting).
642
-
643
- ### Fixed
644
-
645
- - **Stale global CLI vs project `arkgate` (upgrade footgun):** `ark upgrade` /
646
- `ark update` now **fail closed** when the running CLI package root is outside
647
- the project's `node_modules/arkgate` **and** the running version is older than
648
- the installed project package. Recovery prefers the package-manager runner
649
- (`npx` / `pnpm exec` / `yarn` + `arkgate`) so hoisted monorepos without a
650
- nested shallow path still work; shallow
651
- `node node_modules/arkgate/bin/ark.mjs` is install-root secondary advice.
652
- With `--json`, refuse also emits a machine-readable
653
- `{ refused, reason, message, cliVersion, projectVersion, nextCommand }` on
654
- stdout (exit 2). Does not block project-local CLI, newer globals, or projects
655
- with no local install yet. Field context: global Homebrew **2.x** mutative
656
- upgrade next to 3.8+/4.0 projects (see
657
- [4.0.0 release notes](docs/releases/4.0.0.md#field-footgun--global-arkgate-2x-on-path)).
658
- - **`/ark-upgrade` skill:** procedure step 1 resolves the **project-local** CLI
659
- first, probes for managed upgrade (`--plan-digest`), and aborts when only an
660
- old PATH binary is available.
661
- - **Doctor `rulesUnderContract` catalog caps:** structure sensors and uncovered
662
- invariants are truncated in doctor JSON (with `structureTruncated` /
663
- `uncoveredTruncated`) the same way as the covered sample — HTML announces
664
- overflow instead of implying the full catalog is always embedded.
665
-
666
- ## 4.0.0 — 2026-07-24
667
-
668
- **Major** over 3.9.2. **Breaking:** deprecated root subpaths `arkgate/runtime` and `arkgate/nestjs`
669
- are removed (use `@arkgate/runtime`). **ArkRules (opt-in):** intra-layer structural sensors,
670
- invariant catalogs, coverage evidence, brownfield rules inventory, and modular `arkrules/*.json`
671
- on the same enforcement plane (CLI, MCP, PreToolUse, CI, doctor). Absence of `arkRules` changes no
672
- inter-layer verdict. **Not field-cohort proven:** Z09/RB-11 retained adoption remains open; AR16
673
- case-study docs are scaffolding, not a closed field gate.
674
-
675
- ### Breaking (AR04)
676
-
677
- - **Removed** deprecated root package subpaths `arkgate/runtime` and `arkgate/nestjs`
678
- (and the `compat/` forwarders). Import `@arkgate/runtime` / `@arkgate/runtime/nestjs`
679
- instead. See [migration note](docs/migrate-from-ark-runtime-kernel.md#arkgate-4--ar04--root-runtime-forwarders-removed).
680
-
681
- ### Added — ArkRules foundations + sensors (AR01–AR08)
682
-
683
- - **AR01 — ArkRules foundations (ADR 0012):** optional `arkRules` map on `ark.config.json`
684
- (`schemaVersion` `1.0→1.1` additive migration), sibling schema
685
- `schemas/ark.arkrules.schema.json` (`arkgate/schema/arkrules`), pure
686
- `loadArkRulesContract` / `resolveEffectiveContract` with per-rule provenance, and fail-closed
687
- diagnostics for missing/invalid referenced files. Absence of `arkRules` changes no inter-layer
688
- verdict. Zero-match `appliesTo` emits `ARKRULE_SCOPE_EMPTY` (advisory warn / enforced fail).
689
- - **AR02 — Effective Contract policyHash + policy-delta:** `loadContract` folds non-empty
690
- ArkRules into `policyHash` (absent → historical hash preserved); policy-delta classifies
691
- arkrule add/remove/promote/demote; CLI loads referenced files via
692
- `bin/lib/effective-contract-load.mjs` and observes them for resident invalidation.
693
- - **AR03 — Adapter contract 1.4:** diagnostics carry optional `evidence.arkruleId` +
694
- `evidence.arkruleSource`; remediation/nextAction for `ARKRULE_*` / `INVARIANT_UNCOVERED`
695
- is judgment-only with provenance on every surface.
696
- - **ADR 0013** + resolved facts schema `1.1` optional `classShapes[]` (class-shape evidence)
697
- produced on the write/CI path via `extractClassShapesFromSource`.
698
- - **Tier-1 sensors:** `aggregate-private-state`, `always-valid-factory`,
699
- `domain-event-on-mutation`, `orchestration-only`, `thin-adapter`.
700
- - **Tier-2 advisory:** `no-anemic-model` (never promotable).
701
- - **fileHints:** Tooling derives conservative `orchestrationHeavy` / `adapterThick` hints
702
- (`deriveArkRuleFileHints`) and feeds the write/CI scan path (prefer false negatives;
703
- default templates stay advisory).
704
- - **Templates:** `templates/arkrules/*.json` + presets/init emit lean `arkRules` refs and
705
- copy editable starter files.
706
-
707
- ### Added — invariants, inventory, migration surfaces (shipped in package; progressive opt-in)
708
-
709
- - **ADR 0014–0016:** invariant catalog + coverage evidence + promotion ladder; migration
710
- routes through existing skills; no executable evaluator in core.
711
- - **Invariant coverage:** test-title + symbol evidence; `INVARIANT_UNCOVERED`; partial when
712
- test globs missing; `canPromoteInvariant` refuses uncovered promotions. Write path loads real
713
- test contents via `bin/lib/invariant-coverage-io.mjs`. CLI policy-delta loads Effective ArkRules
714
- + coverage so covered promotions can auto-strengthen.
715
- - **Doctor/HTML** `rulesUnderContract` (counts, not a score); report parity key.
716
- - **Rules inventory:** `ark-check --rules-inventory` + MCP `ark_rules_inventory`; extraction
717
- cards for pilotLoop; freeze residual reuses baseline keys.
718
- - Skills deepen (`ark-adopt`, `ark-contract`, `ark-place`) without new skill names.
719
- - Pre-release field dogfood workflow: `.grok/workflows/pre-release-field-dogfood.rhai`.
720
-
721
- ### Confidence / package budgets (4.0.0)
722
-
723
- - **Branch floor** recalibrated **84.5% → 83.0%** after ArkRules dual-plane growth (measured
724
- ~83.3% on the clean candidate). Statement / function / line floors and mutation gates unchanged.
725
- - **Module LOC budgets** raised for `ark-check-runtime`, `doctor-plan`, `presets`,
726
- `html-report-advisories` (evidence in `scripts/check-module-budgets.mjs`).
727
- - **Package pack budgets** remeasured for 4.0.0 (≥10% headroom in `release/package-budgets.v1.json`).
728
-
729
- ### Honesty / not claimed in 4.0.0
730
-
731
- - No claim that Z09 / RB-11 retained field adoption is closed.
732
- - No claim that a consented multi-adopter field pilot (AR16 gate) is complete — case-study docs
733
- are present; cohort evidence is not.
734
- - No numeric trust score; green with frozen residual still says so.
735
- - **Dual-truth residual:** `ark upgrade --no-install` can refresh managed assets while leaving
736
- package.json on an older pin — doctor exposes `packageVersionTruth` and upgrade JSON/human notes
737
- when the pin is behind the CLI.
738
- - **Field note — global 2.x PATH:** bare `ark upgrade` from a global **arkgate 2.x** install is
739
- mutative (pre managed content-identity) and unsafe next to 3.8+/4.0 projects — prefer
740
- `npx arkgate upgrade …`. Documented in [4.0.0 release notes](docs/releases/4.0.0.md#field-footgun--global-arkgate-2x-on-path);
741
- CLI fail-closed guard ships under Unreleased.
742
-
743
- ## 3.9.2 — 2026-07-23
744
-
745
- **Patch** over 3.9.1. Product honesty for post-validity coaching, coverage/host write paths, and
746
- advisory analysis precision — **no required config migration**, no gate weakening, no hard-write
747
- claims on soft hosts. Y07 / Y09 remain **parked** (not promoted).
748
-
749
- ### Added
750
-
751
- - **Enforcement honesty helpers** (`bin/lib/enforcement-honesty.mjs`): coverage honesty
752
- (empty / weak &lt;50% worse-than-no-gate / partial / strong; `greenIsNotEnforcement` until 100%;
753
- `wholeTreeGoverned`), baseline dirty-freeze risk, write-path honesty with soft hosts derived from
754
- `HOST_SUPPORT_MATRIX` (fail-closed: soft never `hardWriteActive`).
755
- - **Graph blind spots** (`bin/lib/graph-blind.mjs`): advisory scan for unresolvable dynamic
756
- import/require edges (template-interpolation + non-literals + import-equals). Never a hard
757
- architecture verdict; Y09 direction only.
758
- - Doctor / plan JSON: `coverageHonesty`, `baseline.honesty`, `writePath.honesty`,
759
- `graphBlindSpots`, design-weak honesty flags (`healthyFinishedForbidden`,
760
- `multiPilotBatchForbidden`, `autoApplyForbidden` / `autoApplyPlanBForbidden`).
761
- - Focused unit suite `tests/unit/static-check/enforcementHonesty.test.ts`.
762
-
763
- ### Changed
764
-
765
- - **Post-green path:** placement coaching + shared design-weak honesty flags.
766
- - **Pilot loop:** one-at-a-time queue (`queuedBets` / `queueNote`); multi-pilot batch and silent
767
- plan-B auto-apply forbidden on all return paths.
768
- - **Ambient sensor (Y07 honesty only):** status vocabulary (`idle` / `active-clean` /
769
- `active-findings` / `unavailable`), `blockerGrade: false`, `strictDiagnostics: 'parked-Y07'`;
770
- idle/clean/unavailable print honesty lines (not silence-as-done).
771
- - **Skills** (`ark-coverage`, `ark-explore`, `ark-place`): deepen honesty / one-pilot routing
772
- without new skill basenames.
773
- - **HTML advisories:** graphBlindSpots X01 parity; ambient h2 parked-Y07 wording.
774
-
775
- ### Notes
776
-
777
- - Soft write hosts (Cursor / Codex / OpenCode) remain advisory at write; required CI status is the
778
- hard merge boundary.
779
- - Z09 / residual `RB-11` remain open. Y07 / Y09 not marked done.
780
-
781
- ## 3.9.1 — 2026-07-23
782
-
783
- **Patch** over 3.9.0. Repo hygiene and CI honesty only — **no required config migration**, no gate
784
- weakening, no product API changes.
785
-
786
- ### Fixed
787
-
788
- - **Onboarding matrix (`o04`):** `ark start --install` may rewrite package-manager lockfiles when the
789
- published package is installed; tests compare product mutation paths only (lockfile drift allowed).
790
- - **Docs post-3.9.0 publish:** CONTRIBUTING / README / release notes / migrate guide match npm truth
791
- for the published line (updated again for this patch after 3.9.1 lands on `latest`).
792
- - **Supply-chain hygiene:** `fast-uri` **3.1.4** (transitive via `ajv`) closes host-confusion advisory
793
- GHSA-v2hh-gcrm-f6hx. Eval fixtures pin **Next.js 15.5.21** (patched) so Dependabot Next alerts on
794
- `eval/cases/**` corpus close without shipping Next in the `arkgate` npm tarball.
795
-
796
- ### Notes
797
-
798
- - Next bumps are **eval fixture hygiene**, not a consumer-runtime CVE in the published package.
799
- - Z09 / residual `RB-11` remain open.
800
-
801
- ## 3.9.0 — 2026-07-23
802
-
803
- **Beautiful Path** minor: one primary flow, doctor as control plane, progressive disclosure, and
804
- senior-grade product voice — plus residual beauty, write-path honesty, Shape coach depth, and
805
- field-claim scaffolding. **No required config migration.** Does not weaken write gate or CI.
806
- Z09 / residual `RB-11` remain open (longitudinal claim gate; field kit is scaffolding only).
807
- Not a rewrite of the analysis engine. No plan-B silent codemod. No fake hard write on Cursor/Codex.
808
-
809
- ### Added
810
-
811
- - **Product voice canon:** `docs/product-voice.md` — lexicon (including **design-weak** / **residual**
812
- / hard vs advisory write), **Do** table, doctor/deny microcopy models, progressive-disclosure rule.
813
- Linked from README and Agents knowledge map.
814
- - **Field program kit (not closed):** `docs/field/` — Z09 preregistration template, cohort D30/D90
815
- checklist, independent-reviewer manifesto + open signed-identity decision. Explicit **status: not
816
- closed**; does not invent adopter counts or close `RB-11` / C-028 residual.
817
- - **Release notes:** `docs/releases/3.9.0.md`.
818
- - **Docs information architecture:** three public lanes — [docs/use.md](docs/use.md) (anyone),
819
- [docs/develop.md](docs/develop.md) (integrate), [CONTRIBUTING.md](CONTRIBUTING.md) (library);
820
- hub [docs/README.md](docs/README.md); history under [docs/archive/](docs/archive/README.md).
821
- Historical release notes and epic plans remain in-repo but are not the product front door.
822
- - **Maintainer workflow:** `.grok/workflows/product-beauty-audit.rhai` — read-only parallel audit of
823
- product surfaces against product-voice criteria (report-only by default).
824
- - **Host enforcement expansion (prepared, not npm-published as a separate release):**
825
- - **Google Antigravity** (`antigravity` / alias `agy`): `.agents/hooks.json` PreToolUse install,
826
- `ark-mcp --hook` adapter for `toolCall` + write tools (`write_to_file`,
827
- `replace_file_content`, `multi_replace_file_content`), doctor inventory, hard-write when
828
- installed + trusted (same ladder as Claude/Grok).
829
- - **OpenCode** (`opencode`): merge/write `opencode.json` MCP (`type: local`), advisory-only
830
- write path, optional experimental plugin template
831
- `templates/hooks/opencode-ark-write-gate.mjs` (never claimed hard).
832
- - Canonical host matrix + README/`docs/ai-gates.md` honesty rows updated.
833
-
834
- ### Changed
835
-
836
- - **README first-run narrative:** one door (`start` → doctor → optional `/ark-autopilot`); skills
837
- section reframed as expert escapes, not a second curriculum; status lights language tightened;
838
- host matrix states **required CI status** as the merge hard boundary and labels
839
- Cursor/Codex/OpenCode advisory at write (Antigravity hard when covered).
840
- - **Compact router** (`compactAgentInstructions`): primary path = doctor + place/validate/check;
841
- full `/ark-*` pack documented as optional expert depth with install command.
842
- - **Doctor human surface:** status-light copy matches product voice; top block is **Primary next
843
- action** (#1) plus optional **Also** list; design-weak mode uses warn `!` (not green `✓`);
844
- edge-clean under design-weak no longer claims absolute “matches the contract”; New-here primary
845
- is finish `start` → doctor (not a competing recommend/architect curriculum); Cursor/Codex write
846
- path lines state advisory + required CI. JSON ids (`postGreenPath`, `primaryNextAction`,
847
- `clarify-for-ai`) unchanged.
848
- - **Post-green primary action string:** senior-grade Shape residual wording; same skill chain.
849
- - **Agent install messaging:** install-agent-gates prints compact vs expert-skill-pack profile hints.
850
- - **Skill frontmatter / mode tables:** `/ark-autopilot` = guided end-to-end; ranks **Enforce ·
851
- design-weak** Shape door; `/ark-explore` = specialized map / post-green door with status-light
852
- table and smell-envelope honesty (absence ≠ full-tree proof).
853
- - **Agent guide / AI gates / package surface:** default path and host write honesty aligned; design
854
- smell envelope documented; no “default = full skill pack.”
855
-
856
- ### Tests
857
-
858
- - `q01PostGreenPath` — primary-action wording, design-weak mode mark `!`, no absolute contract-match
859
- under residual.
860
- - `skillsSurface` — autopilot/explore Shape door ranking; compact router progressive disclosure.
861
- - `q06ReleaseSurfaces` — 3.9.0 notes, product-voice Do/lexicon, field kit not-closed.
862
- - Compact-start / adoption-gaps / codex residual honesty expectations updated for voice.
863
-
864
- ## 3.8.3 — 2026-07-22
865
-
866
- Corrective **patch** over 3.8.2 from multi-repo field evidence (pnpm workspace upgrade;
867
- greenfield `start`). **No required config migration.** Z09 / residual `RB-11` remain open.
868
-
869
- ### Fixed
870
-
871
- - **pnpm workspace upgrade install:** `packageInstallArgv` emits `pnpm add -D arkgate@… -w` on
872
- workspace roots (`pnpm-workspace.yaml`). Yarn workspaces get `-W`. npm single-package path
873
- unchanged.
874
- - **Upgrade re-install when already current:** skip package-manager install when
875
- `node_modules/arkgate` already matches this CLI version; go straight to managed preview.
876
- - **Install failure recovery copy:** prints the exact failed install command and a
877
- `--no-install` re-run path.
878
- - **`start` package pin by default:** `start --apply` pins `arkgate` in `devDependencies`
879
- unless `--no-install` (was: only with explicit `--install`).
880
- - **Compact start always writes `.mcp.json`:** every host gets project MCP registration;
881
- setup budget raised to 8 files / 32 KB so MCP fits with host hooks.
882
- - **Unbound upgrade apply when content matches:** `--apply` without `--plan-digest` is a
883
- successful no-op when `wouldWrite` is 0 (optional stamp refresh still needs the digest).
884
- - **Upgrade applied copy:** distinguishes content writes vs stamp/metadata refresh instead of
885
- a single “Applied N changes” when only stamps moved.
886
-
887
- ### Tests
888
-
889
- - `tests/unit/static-check/fieldJourney383.test.ts` — workspace argv, skip-when-current, start pin.
890
- - Z06 / O03 / installFieldFixes expectations updated for default pin and MCP-in-compact.
891
-
892
- ## 3.8.2 — 2026-07-22
893
-
894
- Corrective **patch** over 3.8.1 from field Next.js evidence. Aligns doctor skill freshness with
895
- managed upgrade content identity, hardens upgrade preview honesty, clarifies doctor writePath
896
- inventory vs this-invocation, ships the Y06 pure-layer opt-in advisory, and treats complete-catalog
897
- Codex leftover prompts as safe-to-delete. **No required config migration.** Z09 / residual `RB-11`
898
- remain open.
899
-
900
- ### Fixed
901
-
902
- - **Doctor skill “stale” vs managed upgrade (field DX):** skill gap detection now uses the same
903
- content-identity rules as `ark upgrade` (stamp-normalized). A skill whose body matches the
904
- package template is not stale when only `arkVersion` lags. Stale copy says content-behind-package.
905
- - **Upgrade preview phantom apply:** summary reports `managedAssets` / `wouldWrite` /
906
- `customizedPreserved`; when `wouldWrite` is 0, prints “Nothing to apply” instead of urging
907
- `--apply` as the primary next step (optional stamp-only apply remains digest-bound).
908
- - **Doctor writePath honesty:** with `activeHost: unknown`, a `sessionNote` separates on-disk
909
- inventory from this-invocation hardness; package `installed` is independent of host support.
910
- Hard still requires runtime proof (Z10).
911
- - **Codex legacy prompts:** complete `.agents/skills` with leftover `.codex/prompts` is an
912
- advisory safe-to-delete signal (CLI, doctor, HTML), not an install-agent-gates gap.
913
-
914
- ### Added
915
-
916
- - **Y06 pure-layer opt-in nudge:** when a golden pattern names pure modules and no layer sets
917
- `pure: true`, doctor emits one advisory line (`doctor.pureLayerOptIn`). Never a blocker; never
918
- auto-writes `pure: true`. Promoted from field evidence (a Next.js app).
919
-
920
- ## 3.8.1 — 2026-07-22
921
-
922
- Corrective **patch** over 3.8.0. Closes silent fail-open on peerIsolation incomplete evidence,
923
- improves pure-IR type-only and relative-`require` graph accuracy, and splits the Domain analysis
924
- vocabulary pilot without changing public gate import paths. **No required config migration.**
925
- Z09 / residual `RB-11` remain open for retained adoption and independent close.
926
-
927
- ### Fixed
928
-
929
- - **peerIsolation fail-closed (S1):** when `peerIsolation: true` is configured, missing paths, no
930
- slice folders, or unclassifiable slices **deny** (cannot prove same-slice). No silent fail-open.
931
- Incomplete path evidence can surface new denials; that is intentional safety, not a config
932
- migration.
933
- - **Pure IR type-only named bindings (S5):** all-type lists (`import { type A }`,
934
- `export { type A } from '…'`) are type-only for capability evidence; mixed lists and
935
- default+named imports stay value.
936
- - **Relative `require` edges (S4):** pure module graph emits dependency edges for relative
937
- `require(...)` like relative import; package require remains capability evidence only.
938
-
939
- ### Changed
940
-
941
- - **Plan-B god-module pilot:** split `src/domain/analysis.ts` by concern into a DomainModel pilot
942
- cluster — Analysis IR + facade in `analysis.ts`; `stableHash.ts`; `resolvedCandidateFactsTypes.ts`;
943
- create/load in `resolvedCandidateFacts.ts`; import-free `resolvedCandidateFactsSchema.ts` for
944
- `generate:cli-pure`. Public root/gate import paths unchanged. Judgment-only hygiene; no contract
945
- or gate weakening.
946
-
947
- ### Documentation
948
-
949
- - **Queue hygiene:** Phase Z engineering slices remain closed in 3.8.0+; `Z09` is a parked claim
950
- gate (residual `RB-11` = retained adoption + independent close only). No engineering `doing`.
951
- Y06/Y09 stay parked; Y07 low priority; Y10 archived until field demand + ADR; K01 runtime-only.
952
- After the analysis pilot, self-hosted design-weak residual is package barrel `src/index.ts`
953
- only (plan-B judgment; never mechanical-safe).
954
- - **Pin honesty:** migration guide, claims matrix, and TS support pin current stable as
955
- **arkgate@3.8.1** (not 3.7.0 / unpublished corrective).
956
-
957
- ## 3.8.0 — 2026-07-21
958
-
959
- This corrective minor makes complete analysis fail closed, restores one resolved architecture
960
- verdict across parity-capable adapters, hardens clean install and managed upgrade flows, and adds
961
- an opt-in base-relative design-delta gate. **No required config migration.** Retained adoption and
962
- independent close remain open under Z09, so this release does not claim Phase Z completion.
963
-
964
- ### Added
965
-
966
- - **Z10:** add the opt-in base/candidate `domain-logic-in-ui` ratchet with hook/MCP/CLI parity and
967
- fail-closed bases. Enforcement-state `1.1` adds runtime/operation proof for `hard`; assets and MCP
968
- alone remain non-hard.
969
- - **Analysis completeness (Z02):** CLI, MCP, hook, and public schema/type envelopes now carry
970
- required `complete | partial | unavailable` evidence. Incomplete analysis cannot satisfy a
971
- remediation goal; governed parse diagnostics fail `--strict-merge`, and a missing analysis host
972
- exits `2` instead of producing a clean-looking plan.
973
- - **Resolved candidate facts (Z04):** the stable root API now exposes a versioned, serializable
974
- facts contract plus `analyzeResolvedProject` and `preflightResolvedChange`. Tooling resolves one
975
- complete virtual create/update/delete candidate; the pure Kernel and generated CLI bundle
976
- evaluate the same policy, resolver, facts, and tree identities.
977
- - **Differential adapter corpus (Z04):** API, generated bundle, atomic preflight, CLI, MCP,
978
- complete-patch hook, final strict check, and ESLint within its bounded envelope are compared over
979
- relative and configured paths, packages/workspaces, symlinks, supported import forms,
980
- unresolved/parse evidence, exclusions, unclassified paths, and create/update/delete batches.
981
- - **Managed-content upgrade (Z06):** `ark upgrade` is now a read-only identity preview. Package
982
- update/re-preview and managed-file application are separate confirmations; the latter requires
983
- the preview's SHA-256 `planDigest`. `ark.managed.json` distinguishes current, stale, missing,
984
- customized, and conflicted assets without touching unrelated source, similar files, or global
985
- Codex state. Recorded deletions/conflicts require explicit consent.
986
- - **Enforcement-state contract (Z06):** doctor JSON publishes schema-backed
987
- `writePath.enforcementState` plus stable public TypeScript types and schema subpaths. Local write,
988
- advisory MCP, and CI merge boundaries independently report supported, analyzed, configured,
989
- installed, active, bypassable, required, and structured evidence values.
990
- - **Packed managed-upgrade matrix (Z06):** all 11 supported hosts install and execute one
991
- checksum-verified candidate tarball through 132 fail-closed journey stages in CI.
992
-
993
- ### Fixed
994
-
995
- - **Packed TypeScript 7 analysis:** ArkGate now ships an exact, separately named TypeScript 6
996
- JS-API host that package-manager deduplication cannot replace with TS7's version-only export.
997
- The consumer's own TypeScript remains preferred when usable and its selected `tsc` is unchanged.
998
- Packed Yarn cells record strict PnP for TS5/6 and the normal `node-modules` linker for native TS7.
999
- - **One architecture verdict:** complete-candidate CLI/MCP/hook paths now consume resolved facts
1000
- instead of a compiler-free relative-only graph. A contract-allowed same-layer edge is no longer
1001
- rejected by AICodeGate's former path heuristic. Retained lexical/single-snippet compatibility
1002
- paths report `partial` and non-green, while legacy pre-Z04 cache snapshots are ignored until the
1003
- identity-keyed Z07 warm path is proven.
1004
- - **Required-status honesty:** workflow text records CI configuration only. Required merge status
1005
- remains `unverified` without opt-in provider evidence, which is read from the repository's
1006
- default branch rather than the caller's current branch.
1007
-
1008
- ### Changed
1009
-
1010
- - The npm changelog retains complete 2.x/current-major notes and links pre-2.0 detail to the
1011
- immutable pre-Z06 canonical history, keeping the frozen package-size ceiling while preserving
1012
- later corrections to those historical notes.
1013
-
1014
- ## 3.7.0 — 2026-07-17
1015
-
1016
- Phase Y turns field feedback into explicit decision memory, more honest design/parse advisories,
1017
- safer skill-driven edits, and one confirmed purity-bypass closure. **No breaking** CLI, MCP tool,
1018
- analysis IR, or `ark.config.json` changes. **No product-policy gate weakening. No automatic
1019
- reshape or codemod.**
1020
-
1021
- ### Added
1022
-
1023
- - **Recorded reshape decisions (Y01):** `.ark/reshape-decisions.json` can explicitly accept,
1024
- defer, or reject a physical-cohesion pilot with a required reason and optional `reviewBy`.
1025
- Current deferred/rejected decisions suppress only repeated pilot pressure; the underlying
1026
- facts remain visible. Stale, expired, malformed, duplicate, or oversized records suppress
1027
- nothing, and doctor/HTML surfaces render the lifecycle.
1028
- - **Hollow-persistence advisory (Y02):** the existing `handler-in-persistence` smell now sees
1029
- static framework HTTP imports/re-exports, route definitions, and handler shapes inside
1030
- Persistence-role modules. It stays advisory and judgment-only, with a bounded and explicit
1031
- inspection envelope.
1032
- - **Parse-health honesty (Y03):** doctor JSON/human output and the HTML report expose governed
1033
- files with parser diagnostics through additive `parseHealth` totals and a deterministic,
1034
- overflow-aware file list. The existing AST is reused; the verdict and exit code are unchanged.
1035
- - **Exact `process` module dual (Y08):** `forbiddenGlobals: ["process"]` now owns exact value
1036
- imports of `process` and `node:process` across CLI cold/warm cache, pure IR, atomic preflight,
1037
- AICodeGate/MCP, and ESLint. It emits one `FORBIDDEN_GLOBAL` voice; type-only forms within the
1038
- documented TypeScript envelope, subpaths, and `child_process` remain excluded.
1039
-
1040
- ### Changed
1041
-
1042
- - **Mechanical-edit hygiene (Y04):** `ark-fix`, `ark-autopilot`, and `ark-loop` now require
1043
- injected headers to merge into an existing doc block, typed `defineRoute<…>` calls to retain
1044
- their generics/shape, and convention-only placeholder modules to remain uncreated. A
1045
- deterministic eval guards all three outcomes.
1046
- - **Cycle budgets (Y05):** package and Linux hook/doctor p95 ceilings were re-measured once from
1047
- clean 3.6.1 candidates with evidence-backed headroom, preserving fixed release guardrails.
1048
- - **Confidence budget:** Y08 adds multi-form ESLint regressions while the full-suite branch floor
1049
- is recalibrated from 85% to 84.5%; statement/function/line floors and mutation gates are
1050
- unchanged.
1051
-
1052
- ### Fixed
1053
-
1054
- - **Portable peer isolation:** slice identities are case-normalized, so mixed-case paths do not
1055
- produce a false cross-slice violation on case-insensitive filesystems. Repositories that differ
1056
- only by path case intentionally share the portable identity.
1057
- - **Convergence remediation direction:** an unplanned removed dependency now tells the user to
1058
- restore it; an unplanned added dependency still tells the user to remove it.
1059
-
1060
- ## 3.6.1 — 2026-07-17
1061
-
1062
- Codex project-scoped MCP fix. **No breaking** CLI, MCP tool, or `ark.config.json` changes.
1063
- **No gate weaken.**
1064
-
1065
- ### Fixed
1066
-
1067
- - **Codex MCP follows the active repository:** `--install-agent-gates --tools codex` now writes
1068
- `.codex/config.toml` with relative project paths. Each repository owns its primary `ark`
1069
- binding, so `ark upgrade` no longer leaves Codex resolving `ark://manifest` through another
1070
- permanent project registered in the global home config.
1071
- - **Doctor effective-config honesty:** Codex advisory-MCP capability and adoption checks prefer
1072
- a valid project `.codex/config.toml`; an unrelated `$CODEX_HOME` primary no longer produces a
1073
- false `write-path-none` or `codex-home-multi-project` warning.
1074
- - **Ephemeral worktree cleanup:** roots under `.claude/worktrees`, `.codex/worktrees`, or
1075
- `.grok/worktrees` are treated as temporary instead of permanent global MCP owners.
1076
-
1077
- ### Changed
1078
-
1079
- - `$CODEX_HOME/config.toml` remains an explicit compatibility fallback via `--codex-home`.
1080
- Normal `--tools codex` installs no longer mutate the global MCP registry, and skills-only
1081
- home refreshes cannot accidentally rebind its primary server.
1082
-
1083
- ## 3.6.0 — 2026-07-17
1084
-
1085
- Phase X closes: the doctor learns to see **physical shape** and agents get a governed way to
1086
- execute reorganizations, plus three field warm-ups from the 3.5.0 the field adopter validation.
1087
- Everything remains **advisory** — no verdict, exit-code, `designFitness`, or `patternBets`
1088
- change. **No breaking** CLI or `ark.config.json` changes. **No gate weaken. No apply path.**
1089
-
1090
- ### Added
1091
-
1092
- - **Physical cohesion sensor (X04, ADR 0010):** `doctor.physicalCohesion` reports domain
1093
- concepts exploded across mirrored directory clusters — concentration, not volume (dispersed
1094
- `use-*` hooks never fire). Deterministic path/name tokenization (framework filenames take the
1095
- topmost meaningful path segment; monorepo scaffold roots are never a concept); fixed
1096
- corpus-calibrated thresholds (`maxCluster ≥ 40` OR ≥2 anchors ≥ 20); findings ranked and
1097
- capped honestly; anchors under `app/`/`pages/` are `fixedByConvention`. `notAScore` — facts,
1098
- never a score or gate input.
1099
- - **Reshape pilot (X04):** `physicalCohesion.reshapePilot.nextPilot` is a **proposed, never
1100
- applied** card — one at a time, smallest convention-free anchor, `moveSample`/`movesTotal`,
1101
- `successSignal`, `killSwitch`, hard `doNot[]`. Real moves run only through the write gate and
1102
- atomic preflight via `/ark-loop`; merges are `/ark-architect` **merge cards** (domain
1103
- modeling, **never a codemod**); `/ark-fix` never folds reshapes into a fix batch. The
1104
- consolidation target subtree is never re-proposed as a source — the loop converges (validated
1105
- end to end: pilot → gate → kill switch → judgment → convergence).
1106
- - **Stale acknowledgments (X05):** ack entries matching no detected edge (orphaned, unknown id,
1107
- typo) land in `contractHealth.ackLifecycle` as `staleCount` + `stale[]` (sorted, capped);
1108
- doctor and report name the exact entries to fix or delete, even at zero visible smells.
1109
-
1110
- ### Changed
1111
-
1112
- - **Mid-name families (X06):** the family-infra carve-out matches the target's family token
1113
- against ANY source token (`HoursPersistenceAdapters -> PersistenceInfrastructure` goes
1114
- quiet); generic role words (`adapter(s)`/`gateway(s)`) never count as a family, so
1115
- `AdaptersCore` is not every `*Adapters` layer's base.
1116
- - **Report evidence overflow (X07):** per-finding evidence lists announce their 6-item cap with
1117
- an honest `(+N more)` marker; expired/stale lifecycle notes carry the same honesty.
1118
-
1119
- ## 3.5.0 — 2026-07-16
1120
-
1121
- Field-feedback release (Phase X, from an internal field-adoption session): the HTML report reaches
1122
- parity with the doctor and stays there by an executable rule, contract-smell acknowledgments gain
1123
- a lifecycle so migration acks cannot fossilize, and the lateral-adapter smell stops firing on a
1124
- family's own infrastructure base. Everything remains **advisory** — no verdict, `designFitness`,
1125
- or gate behavior changes. **No breaking** CLI or `ark.config.json` changes. **No gate weaken.**
1126
-
1127
- ### Added
1128
-
1129
- - **Report parity (X01):** `ark-check --report` now renders every doctor advisory — contract
1130
- health (smells with evidence/fix, acknowledgment honesty, invalid-sidecar warning), governance
1131
- weight, ambient state (idle/clean/findings with honest overflow), and capability-wall badges
1132
- (`pure` / `walls: …`) in the layers table. The rule is **executable**: `reportParity.test.ts`
1133
- enumerates the advisory keys `computeDoctorAdvisories` returns and fails CI when any key lacks
1134
- a `data-advisory` section — the report can never silently fall behind the product again.
1135
- - **Acknowledgment lifecycle (X02):** a contract-smell ack may carry an optional `reviewBy`
1136
- (`YYYY-MM-DD`, strict round-trip validation). Past that date the ack **stops applying** and the
1137
- smell returns with `(ack expired …)` annotated evidence; a re-ack with a fresh date wins over a
1138
- dead entry, and once any dated ack exists for an edge the dated entries govern — a leftover
1139
- undated duplicate cannot resurrect an expired exception.
1140
- Undated acks keep applying (backward compatible) but are counted and surfaced —
1141
- doctor line, report note — even when every smell is suppressed. Malformed dates never apply
1142
- (fail-loud, like a sloppy edge); non-string `reviewBy` invalidates the file. Doctor JSON gains
1143
- `contractHealth.ackLifecycle` (`{ undated, malformed, expiredCount, expired[] }`).
1144
-
1145
- ### Changed
1146
-
1147
- - **Lateral-adapter smell (X03):** `contract-lateral-adapter-allow` no longer fires when an
1148
- adapter layer reaches its **own family's infra base** (same leading name token and every
1149
- remaining target token an infra word — `Infra`/`Base`/`Core`/`Shared`/`Common`/`Kernel`/
1150
- `Platform`/`Foundation` — e.g. `PaymentsAdapters -> PaymentsInfra`; `PaymentsCoreAdapters` is
1151
- still a sibling). Cross-family edges, same-family non-infra siblings, and the reverse
1152
- direction (base → member) still fire.
1153
-
1154
- ## 3.4.0 — 2026-07-16
1155
-
1156
- Understandable execution, second slice (Phase U: U04–U07): the capability evidence shipped in
1157
- 3.3 becomes **opt-in enforcement** across every adapter, plus the advisory ambient-state sensor
1158
- and the measured pre-tool path. Everything remains opt-in — a config without `capabilities` /
1159
- `pure` keys behaves exactly as before. **No breaking** CLI or `ark.config.json` changes.
1160
- **No gate weaken.**
1161
-
1162
- ### Added
1163
-
1164
- - **Capability walls (U04):** a layer may declare `capabilities: { deny: [...] }` (seven-id enum
1165
- in the versioned schema) or the casual shorthand `pure: true` (denies all seven). Enforcement
1166
- is judgment-class `CAPABILITY_VIOLATION` — never mechanical-safe, never auto-patched — with a
1167
- port-injection `nextAction`, across the CLI scan (ambient + import evidence), the pure IR
1168
- engine and atomic preflight (a multi-file batch cannot hide a denied capability), the real
1169
- PreToolUse hook and MCP gate (`capabilityWalls`), and ESLint
1170
- (`ark/no-denied-capabilities`, import dimension, in the recommended config). One violation,
1171
- one voice: an ambient use covered by the layer's `forbiddenGlobals` reports only
1172
- `FORBIDDEN_GLOBAL`.
1173
- - **Coverage-atom policy delta (U04/D6):** T01 classifies the ambient/wall surface on coverage
1174
- atoms (`ambient:<entry>` prefix-expanded + `import:<capability>`): any lost atom is weakening
1175
- (`fetch`→`XMLHttpRequest`, `Date`→`Date.now`, wall→`forbiddenGlobals` all require the
1176
- hash-bound acknowledgment); migrating `forbiddenGlobals` to an equivalent-or-stronger wall
1177
- never needs one.
1178
- - **Ambient-state sensor (U05, advisory + opt-in):** `doctor.ambientState` flags module-scope
1179
- `let`/`var` in `pure: true` layers only, with bounded sidecar acknowledgments at
1180
- `.ark/ambient-state-acks.json`. `declare` ambients and `using` bindings never count; skipped
1181
- oversized files are reported. No strict mode exists.
1182
- - **Measured pre-tool path (U06):** `npm run bench:hook-path` measures the complete
1183
- hook/doctor child-process paths; `eval/performance/hook-budgets.v1.json` locks the D5 method
1184
- (Linux baseline first, ceilings = baseline + fixed headroom, recording mode until then); CI
1185
- runs the bench. Dual-depth remediation everywhere: plain port hints for casual users, stable
1186
- `ruleId`/`capability`/`fixClass`/`nextAction` JSON for tooling.
1187
-
1188
- ### Fixed
1189
-
1190
- - The scan cache is version-bumped (v8) so a warm cache from an older ArkGate cannot miss wall
1191
- verdicts; template-literal text and `require()` handling in the pure scanner are
1192
- capability-correct (templates skipped; require counts as evidence, never as a graph edge).
1193
-
1194
- ## 3.3.0 — 2026-07-16
1195
-
1196
- Understandable execution, first slice (Phase U: U01–U03): typed effect capabilities as
1197
- **evidence-only** architecture facts, a locked ADR boundary, and a legibility dogfood of the
1198
- engine itself. Nothing blocks on capabilities in this release — walls arrive with the second
1199
- slice (U04+) after the corpus matures in the field. **No breaking** CLI or `ark.config.json`
1200
- changes. **No gate weaken.**
1201
-
1202
- ### Added
1203
-
1204
- - **ADR 0009 (U01):** the accepted architecture-vs-style boundary — seven closed capability ids
1205
- (`network`, `filesystem`, `clock`, `randomness`, `environment`, `process`, `persistence`),
1206
- direct-evidence-only blocking threshold (transitive inference never blocks), config lowering
1207
- design (`forbiddenGlobals` and future capability policy lower to one semantic space;
1208
- `pure: true` planned as the casual surface), coverage-faithful lowering for prefix-matched
1209
- globals (bare `process` covers `environment` too), surface-ownership dedup rule, and the
1210
- W02 governance-weight reconciliation. Backed by a 25-case executable fixture corpus
1211
- (`tests/fixtures/capability-corpus/`) with a content-aware structural guard.
1212
- - **Effect capabilities in the canonical analysis (U03):** the internal
1213
- `collectCapabilityUses(ts, sourceFile)` composes the existing symbol-aware collectors
1214
- (shadowing / type-only / `globalThis`-alias precision; no second scanner); the internal Domain
1215
- vocabulary is `CAPABILITY_IDS` / `capabilityForModuleSpecifier` /
1216
- `capabilityForAmbientName` / `lowerForbiddenGlobal`. These names were never root `arkgate`
1217
- exports. The supported public surface is `analyzeProject(...).ir.capabilityUses`, populated
1218
- with import-based evidence by the compiler-free IR engine (exact module/subpath matching —
1219
- never substring; textual `import type` / `export type` erasure). Additive within IR `1.0`;
1220
- evidence only.
1221
-
1222
- ### Changed
1223
-
1224
- - **Engine legibility dogfood (U02):** `src/kernel/analysis.ts` is now a pure facade over six
1225
- cohesive kernel modules and the `ark.config.json` contract types moved to
1226
- `src/domain/configTypes.ts` — zero consumer import changes, byte-identical generated
1227
- config artifacts, identical hashes and verdicts (verified by execution old-vs-new). ArkGate's
1228
- own doctor now reports **zero design smells** on this repository.
1229
- - The experimental `@arkgate/runtime` built distribution artifact is minified with `keepNames` (stable
1230
- class/function names for reflection and Nest diagnostics) and stays well inside its
1231
- release-artifact budget.
1232
-
1233
- ## 3.2.0 — 2026-07-15
1234
-
1235
- Contract health (Phase W): ArkGate now also meta-lints the contract itself and describes its
1236
- governance weight, and the docs name the enforcement-boundary trade-off explicitly. Everything in
1237
- this release is **advisory only** — no verdict, `designFitness`, `patternBets`, or gate result
1238
- changes. **No breaking** CLI or `ark.config.json` changes. **No gate weaken.**
1239
-
1240
- ### Added
1241
-
1242
- - **W01 contract smells:** `ark-check --doctor --json` gains `doctor.contractHealth` with four
1243
- stable, deterministic smell ids that lint the contract rather than the code:
1244
- `contract-bidirectional-allow` (both directions explicitly allowed between two layers),
1245
- `contract-peripheral-depends-core` (audit/observability layer allowed into
1246
- orchestration/persistence), `contract-lateral-adapter-allow` (adapter layer allowed into a
1247
- sibling adapter layer), and `contract-dead-rule` (rule referencing an unknown or empty layer, or
1248
- a same-layer no-op; `optional: true` layers are exempt). Each smell carries `severity`,
1249
- sorted `evidence[]` with honest `…(+N more)` truncation, technical `message`, plain-language
1250
- `outcome`, and `fix`. Human doctor prints a "Contract health (advisory)" section.
1251
- - **Acknowledgment sidecar:** deliberate edges are recorded in an optional
1252
- `.ark/contract-smell-acks.json` (`{ acks: [{ id, edge, reason }] }`; bidirectional edges
1253
- order-insensitive) — the versioned `ark.config.json` schema is untouched. The file is bounded
1254
- (≤64 KB, ≤200 entries); a malformed file or edge grammar is reported via `ackFile.invalid` and
1255
- never suppresses a smell. `contractHealth.acknowledged` counts applied acks only.
1256
- - **W02 governance weight:** `doctor.contractHealth.governanceWeight` reports raw facts
1257
- (declared/populated layers, governed files, rules, denied/allowed edges, files-per-layer,
1258
- rules-per-layer) plus a fixed comparative band — `heavy` (fewer than 25 governed files per layer
1259
- AND 6+ layers or 4+ rules per layer), `light` (≤2 layers over 150+ governed files), `typical`,
1260
- or `unknown` — with fixed wording and an explicit `notAScore: true`. Banding uses raw ratios;
1261
- reported ratios are rounded for display. The heavy note asks to justify NEW layers with
1262
- demonstrated pressure and never suggests deleting working ones.
1263
- - **W03 enforcement-boundary positioning:** README explains why the hard guarantee lives at the
1264
- required merge status ("deliberate trade-off, not a gap"; the contract doubles as a pressure
1265
- sensor), and `docs/ai-gates.md` / `docs/agent-guide.md` carry the same framing next to the
1266
- canonical host support matrix. A docs regression pins the wording without strengthening any
1267
- guarantee claim.
1268
-
1269
- ### Fixed
1270
-
1271
- - Contract meta-lint reads the rules actually in force (manifest-aware), not only `config.rules`.
1272
- - Hostile ack-file inputs (FIFO/symlink targets, oversized files, sloppy edge strings) can no
1273
- longer hang `--doctor`, exhaust memory, or silently suppress findings; null rule entries and
1274
- malformed coverage rows no longer throw.
1275
- - Governance-weight banding is size-relative in both clauses: a large tree with a proportionate
1276
- dense rule matrix never reads `heavy`, and NaN/negative counts read `unknown`.
1277
-
1278
- ## 3.1.0 — 2026-07-15
1279
-
1280
- Deterministic change integrity. **No breaking** CLI or `ark.config.json` changes. **No gate
1281
- weaken.**
1282
-
1283
- ### Added
1284
-
1285
- - **T01 policy-transition guard:** the public analysis API and generated CLI engine classify
1286
- `ark.config.json` changes as `strengthening`, `neutral`, `judgment-required`, or `weakening`.
1287
- `--strict-merge` compares the Git merge-base contract when available; explicit
1288
- `--policy-base` / `--policy-base-ref` inputs are also supported.
1289
- - **Hash-bound acknowledgement:** weakening and judgment-required findings fail until
1290
- `--policy-ack` supplies the exact base/candidate policy hashes, complete finding-id set, and a
1291
- non-empty reason. Any later contract edit invalidates the acknowledgement.
1292
- - **CI base provenance:** generated workflows fetch full history and the composite Action passes
1293
- the PR/push base SHA through `ARK_POLICY_BASE_REF`.
1294
- - **MCP parity:** `ark_policy_delta` exposes the same read-only classifier for explicit base and
1295
- candidate contracts and returns blocking transitions as tool errors.
1296
- - **T02 atomic change preflight:** public `preflightChange(...)`, CLI
1297
- `ark preflight --changes <change-set.json>`, and MCP `ark_prepare_change` evaluate one complete
1298
- create/update/delete candidate without writing. Schema `1.0` includes per-file content
1299
- fingerprints plus policy, compiler, base-tree, and candidate-tree fingerprints.
1300
- - **Batch safety:** duplicate normalized paths, stale delete targets, lexical root escapes, and
1301
- symlink escapes fail closed; cross-file forbidden edges and cycles are reported before commit.
1302
- - **T03 optional architecture change map:** strict schema `1.0` describes canonical operations,
1303
- resolved layers, and local edges. CLI/MCP preflight binds its deterministic hash; no map is
1304
- installed by default. Both published schema subpaths are parity-checked with the Domain contract.
1305
- - **T04 honest structural convergence:** map-enabled preflight compares the explicit complete
1306
- candidate with the current supplied base through the shared analysis IR. Stable findings separate
1307
- satisfied, missing, contradictory, and unplanned file/edge work; structural drift rejects the
1308
- batch without writes, while every result states behavioral completion was not evaluated.
1309
- - **T05 actionable, context-independent enforcement:** blocking diagnostics expose one deterministic
1310
- `nextAction` across JSON and human output. Doctor and hook repair JSON separate supported,
1311
- installed, active, and bypassable enforcement with evidence and operation coverage; MCP-only and
1312
- locally unverifiable required-status state remain labeled honestly.
1313
- - **Complete-patch hook parity:** governed Codex `ApplyPatch` create/update/delete sets use the same
1314
- atomic preflight as CLI/MCP before per-file safety checks, catching batch-only edges and cycles.
1315
- Codex remains advisory/bypassable at the host level.
1316
- - **Fixed Phase T evaluation:** `npm run eval:change-integrity` proves identical no-context hashes and
1317
- verdicts, CLI/MCP/hook/final diagnostic parity, one concise casual denial, prewritten feature
1318
- acceptance, and strict Ark green without a live LLM or required planning file.
1319
- ### Fixed
1320
-
1321
- - **Compatibility/release:** analysis-result `1.1` preserves `1.0` TypeScript values; first-push
1322
- zero SHAs and resumable npm release assets are handled safely.
1323
-
1324
- Release note: `docs/releases/3.1.0.md`.
1325
-
1326
- ## 3.0.5 — 2026-07-14
1327
-
1328
- Codex host skill catalog + residual honesty. **No breaking** CLI or `ark.config.json`
1329
- changes. **No gate weaken.**
1330
-
1331
- ### Fixed
1332
-
1333
- - **Codex `/ark-*` skills not invocable:** install wrote flat `.codex/prompts/*.md`, which
1334
- Codex does not load as skills. Repo catalog is now `.agents/skills/<name>/SKILL.md`
1335
- (Agent Skills REPO scope); optional home catalog is `$CODEX_HOME/skills/<name>/SKILL.md`
1336
- via `--codex-home`. Post-install verifies AGENTS.md `/ark-*` refs against each selected
1337
- host catalog.
1338
- - **Temp-root MCP footgun:** `--codex-home` no longer rebinds primary `[mcp_servers.ark]` in
1339
- the default `~/.codex/config.toml` when the project root is a temp/upgrade path (skills may
1340
- still refresh under an isolated or real home).
1341
- - **Multi-host skill hints:** Codex legacy-prompts-only debt no longer suppresses missing/stale
1342
- skill reports for Claude/Cursor/other hosts in doctor and `ark-check` human output.
1343
- - **Deferred Codex home debt severity:** outside a Codex session, home skill gaps are dim/info
1344
- (not warn) and are not Top actions; when the session host is Codex they stay warn + fix.
1345
-
1346
- ### Added
1347
-
1348
- - **Skill parity sensors:** missing / stale / legacy-prompts-only for repo and home catalogs,
1349
- with package `arkVersion` stamps; doctor and JSON expose concrete refresh fixes
1350
- (`--skills-only --tools codex` and/or `--codex-home`).
1351
- - **CI fail-closed detection:** workflows with ark-check but only `--strict-config` (or no
1352
- strict flags) surface `enforcement-ci-not-fail-closed` (warn) with a `--strict-merge` fix.
1353
- `--strict` / `--strict-merge` / `--require-gates` count as fail-closed. Merge-gate inventory
1354
- evidence requires that fail-closed profile.
1355
- - **Codex write-path honesty:** install and doctor state local Codex write is advisory (MCP +
1356
- best-effort hooks; not Claude/Grok hard-write + repair); CI `--strict-merge` + required
1357
- status is the hard merge backstop.
1358
-
1359
- Release note: `docs/releases/3.0.5.md`.
1360
-
1361
- ## 3.0.4 — 2026-07-14
1362
-
1363
- Report honesty + showcase depth patch. **No breaking** CLI or `ark.config.json` changes.
1364
- **No gate weaken.**
1365
-
1366
- ### Fixed
1367
-
1368
- - **HTML report false ADAPT:** `computeReportFitness` counted *any* `optional: true` layer
1369
- with files as `coreOptionalWithFiles`, so doctor could report **ENFORCE** while
1370
- `ark-report.html` / `latest.json` mode stayed **ADAPT** (secondary layers like
1371
- SharedKernel / Integration / Workflow). Report now uses the same `CORE_LAYER_NAMES`
1372
- filter as doctor adoption (`DomainModel`, `ApplicationOrchestration`,
1373
- `PresentationAdapters`, `PersistenceAdapters`).
1374
- - **False adoption gap `write-path-none` on report/CI:** when `activeHost` is `unknown`
1375
- (plain `npx ark-check --report` outside an agent session) but the repo inventory already
1376
- has hard-write hooks or advisory MCP for Claude/Grok/Cursor/Codex, doctor/report no longer
1377
- open a `write-path-none` adoption gap. Session projection still reports `mode: none` for
1378
- honesty (other hosts' hooks are not a guarantee for this process). `detectActiveAgentHost`
1379
- also recognizes `GROK_AGENT`.
1380
-
1381
- ### Added
1382
-
1383
- - **Report metric hints:** HTML showcase KPIs (hero, adoption, contract density, debt) show
1384
- plain-language micro-copy under each tile plus native tooltips; PASS/mode badges and score
1385
- parts (Coverage/Clean/Gates/Rules) explain what they mean for newcomers.
1386
- - **Report design-depth strip:** `ark-check --report` includes doctor-parity Shape residual
1387
- (design-weak badge, smell outcomes, one next pilot, post-green door, optional golden pattern).
1388
- Clean ENFORCE with no smells shows a short “Design depth · OK” note (only when sensors ran).
1389
- - **Report adoption extras:** write-path line (active host · mode · inventory on disk) and a
1390
- fixed baseline-policy legend (`keep-empty` / `active-ratchet` / `absent`).
1391
-
1392
- Release note: `docs/releases/3.0.4.md`.
1393
-
1394
- ## 3.0.3 — 2026-07-13
1395
-
1396
- ### Added
1397
-
1398
- - **Post-green path (Q01):** when design residual remains under edge-clean ENFORCE, doctor
1399
- JSON exposes `postGreenPath` / `primaryNextAction` / `healthyFinishedForbidden` for a single
1400
- “clarify for AI / Shape” door (`clarify-for-ai`). Skill routing maps messy/design-weak work
1401
- to that path — no skill shopping.
1402
- - **Smell outcomes (Q02):** each stable `designSmells[]` id carries plain-language `outcome`
1403
- for newbies; technical `message` retained; doctor human prints outcome first.
1404
- - **Golden pattern (Q03):** optional `.ark/golden-pattern.json` (`name` + `norm`, optional
1405
- `newCodeHome` / `examplePath`). Surfaced on `ark_place`, `ark_prepare_write`, and
1406
- `doctor.goldenPattern` as **advisory for NEW code only**. Absent is OK; never ENFORCE;
1407
- never clears design-weak; malformed fails closed.
1408
- - **Pilot loop (Q04):** `plan.pilotLoop` / `doctor.pilotLoop` select **one** next extraction
1409
- card (`nextPilot`: pilot target, move, success, kill-switch). One pilot → re-doctor;
1410
- residual outside the pilot may remain; never multi-pilot batch; never mechanical-safe.
1411
- - **AI-velocity eval (Q05):** `npm run eval:ai-velocity` compares the same fixed feature
1412
- scenario on design-weak vs golden-path arms. Metric `placementTurns` (agent-equivalent);
1413
- golden must be strictly better. Fixture-measured (no live LLM); method string lives next
1414
- to the number in `eval/ai-velocity-report.json`.
1415
- - **Skills:** `/ark-place` honors golden; explore/autopilot document pilot loop; `/ark-explain`
1416
- opens `ark-report.html` in the default browser after generating the showcase report.
1417
-
1418
- ### Documentation
1419
-
1420
- - package-surface, agent-guide, brownfield pilot-loop section, eval README, Phase Q ROADMAP
1421
- evidence for Q01–Q05. Release note: `docs/releases/3.0.3.md`.
1422
-
1423
- ## 3.0.2 — 2026-07-13
1424
-
1425
- ### Documentation
1426
-
1427
- - Sync consumer-facing agent docs with 3.0.1 design-depth skills: `designFitness` /
1428
- `patternBets`, extraction cards, dual-plan B honesty in agent-guide, AI gates, and the
1429
- autopilot demo. Release note status for 3.0.1 marked published.
1430
-
1431
- ## 3.0.1 — 2026-07-13
1432
-
1433
- ### Added
1434
-
1435
- - **Design fitness (doctor):** deterministic `designSmells` and `designFitness` on
1436
- `ark-check --doctor --json` / human doctor. Edge-clean ENFORCE can report
1437
- **ENFORCE · design-weak** when lived design residual remains (e.g. facade SQL in routes,
1438
- handlers in persistence, god modules, domain logic in UI, soft contract, mixed patterns).
1439
- - **Plan pattern B:** `ark-check --plan --json` includes `patternBets[]` with pilot, success
1440
- signal, kill-switch, and `neverMechanicalSafe: true`. Never auto-applied by loop/autoPatch;
1441
- `goal.met` remains edge honesty only.
1442
- - **Skills (Phase P):** clearer When/not when routing; explore Shape ladder and dual-plan B;
1443
- coverage narrowed to Ark fitness; adopt/autopilot seed Shape residual; extraction-card
1444
- template in brownfield docs and skills.
1445
- - **Fixture:** `tests/fixtures/design-weak-enforce` for ENFORCE + design-weak honesty.
1446
-
1447
- ### Fixed
1448
-
1449
- - Module budget for `bin/lib/doctor-plan.mjs` raised to match the design-depth surface.
1450
-
1451
- ## 3.0.0 — 2026-07-13
1452
-
1453
- ### Added
1454
-
1455
- - **Compact active-host onboarding:** `ark start` now asks for the active host on a TTY (or
1456
- detects it non-interactively), writes at most five project files / 25 KB, and uses one
1457
- package/MCP-backed router instead of copied per-host skill packs. It does not alter
1458
- `package.json` unless `--install` is explicit; host removal and re-addition are previewed,
1459
- safe, and reversible.
1460
-
1461
- - **Canonical analysis engine bundle:** graph policy, cycle evaluation, and configuration
1462
- diagnostics now have one Kernel implementation shared by the library, CLI, and MCP. A documented
1463
- standalone CLI bundle preserves the package's self-hosted boundary and is protected by a CI drift
1464
- check and Kernel/bundle parity fixtures.
1465
- - **Symbol-aware semantic analysis:** one Kernel extractor now resolves forbidden ambient
1466
- capabilities through local symbols, aliases, `globalThis`, static keys, and destructuring, and
1467
- classifies TS/JS dependency forms across ESM, CommonJS, type-only, and unresolved dynamic edges.
1468
- CLI, safety diagnostics, and AICodeGate consume the same generated implementation. The supported
1469
- soundness envelope is documented and guarded by a labeled adversarial corpus plus TypeScript
1470
- 5/6/7 and mutation matrices.
1471
- - **Versioned adapter parity:** CLI JSON, MCP structured results, write hooks, ESLint, and the
1472
- GitHub Action now expose the same `ark.analysis-result` v1 diagnostics. A generated JSON Schema,
1473
- committed compatibility fixture, exact golden corpus, and mandatory CI parity job prevent
1474
- adapter drift; source-policy decisions no longer live privately inside ESLint.
1475
- - **Runtime package isolation:** the next-major `arkgate` root now contains only gate APIs. The
1476
- optional runtime and NestJS adapter build independently as experimental `@arkgate/runtime`;
1477
- deprecated subpath shims contain no implementation. The non-atomic store is now presented as
1478
- `InMemoryEventBuffer`, with production recovery and durability requirements made explicit.
1479
-
1480
- ### Fixed
1481
-
1482
- - **Deterministic offline setup tests:** `ark start` fixtures that do not exercise installation now
1483
- pass `--no-install`, preventing a published current version from turning unit tests into registry
1484
- installs.
1485
- - **Node 26 watch fallback:** `ark-check --watch` falls back to bounded polling when recursive
1486
- `fs.watch` fails asynchronously with `EMFILE`, instead of crashing the watcher process.
1487
-
1488
- ## 2.13.0 — 2026-07-11
1489
-
1490
- - Added the stable, deterministic analysis IR and public in-memory API: `loadContract`,
1491
- `analyzeProject`, `analyzeChange`, and `explainViolation`.
1492
-
1493
- ### Fixed
1494
-
1495
- - **Temp-worktree release verification:** Codex multi-project fixtures now keep the simulated
1496
- primary project outside temp-root policy even when the repository itself is checked out under
1497
- `/tmp`, so the release confidence gate is reproducible without weakening fail-closed temp MCP
1498
- rewrites.
1499
- - **Test and Codex-home isolation:** Vitest now redirects `CODEX_HOME` to a disposable test home,
1500
- so direct helper calls and spawned CLIs cannot rewrite the developer's real Codex config. Temp
1501
- project installs also recognize an explicitly exported default `~/.codex` as the real home and
1502
- skip implicit MCP rewiring unless `--codex-home` is requested.
1503
- - **Workflow retry boundary:** `RetryPolicy` now retries only `step.execute` failures and
1504
- timeouts. A snapshot-store or completion-audit failure after a successful effect is terminal,
1505
- enters compensation, and never executes the completed effect again.
1506
- - **Scanner bypass corpus:** forbidden-global checks now use single-file TypeScript symbols, so
1507
- local `fetch` / `Date` bindings do not false-positive while ambient aliases and
1508
- `globalThis.Date.now()` remain violations. CLI, AICodeGate, and ESLint share the verdict.
1509
- TypeScript `import x = require('...')` now creates a dependency edge, and direct
1510
- `require(expr)` emits `DYNAMIC_REQUIRE_NOT_ALLOWLISTED` (strict profiles fail unless the file
1511
- is reviewed in `dynamicImportAllowlist`). The scan cache is versioned past the old semantics.
1512
-
1513
- ### Added
1514
-
1515
- - **Versioned configuration contract:** `ark.config.json` now carries `$schema` and
1516
- `schemaVersion: "1.0"`. One canonical loader validates and migrates the contract for CLI, MCP,
1517
- and ESLint with path-specific diagnostics and a fail-closed unknown-key policy. The generated
1518
- JSON Schema ships at the stable `arkgate/schema` subpath; unversioned configs from the previous
1519
- major migrate deterministically in memory.
1520
- - **Active-host enforcement capabilities:** doctor and adoption checks now project
1521
- `hard-write`, `advisory-write`, `merge-gate`, and `repair-payload` from the active host only,
1522
- with evidence paths and a separate repo-wide inventory. Claude/Grok hooks can no longer make
1523
- Codex, Cursor, or an unknown host appear hard-enforced; human doctor output names the host and
1524
- separates advisory MCP checks from the shared CI check and its external required-status policy.
1525
- - **Host-compatible enforcement profiles:** generated CI now uses `--strict-merge`, while
1526
- `--strict` remains a compatibility alias; neither depends on an editor hook. The optional
1527
- `--require-write-hook <host>` check verifies Claude/Grok explicitly, reports Cursor/Codex as
1528
- advisory-write plus the shared CI check only, and makes `ark start` reject impossible,
1529
- mismatched, or preserved-incompatible requests before writing project files.
1530
- - **Executable regression confidence gate:** `npm run test:confidence` now combines the existing
1531
- broad Vitest coverage thresholds with real Stryker mutation testing over write-path detection,
1532
- dependency extraction, forbidden-global detection, baseline keys, and workflow retry logic.
1533
- CI and both npm release paths invoke the same gate; mutation score fails below 90%.
1534
- - **Q2 repair dogfood closed:** deny → `ARK_REPAIR_JSON`/`autoPatch` → host re-inject →
1535
- revalidation allow proven via shipped `bin/ark-mcp.mjs` (Claude/Grok hooks already
1536
- `--hook-repair`; `doctor.writePath.mode = repair`).
1537
- - **Q3 weakest-link sensors:** `bin/lib/weakest-link.mjs` + doctor adoption gaps
1538
- (`enforcement-ci-*`, config drift, pre-commit missing); maintained
1539
- `templates/hooks/pre-commit-ark`; optional `ARK_DOCTOR_GITHUB=1` branch-protection
1540
- report (honest unavailable / not-protected — never fake green).
1541
- - **Q5 scale bench:** `scripts/ark-scale-bench.mjs` / `npm run bench:scale` (real
1542
- ark-check cold/warm p50/p95 on generated trees).
1543
- - **Q6 module budgets:** `scripts/check-module-budgets.mjs` / `npm run check:module-budgets`.
1544
- - **Q8 fault-injection tests:** compensation failure audit, cancellation-ignoring timeout,
1545
- outbox retry attempts + clear (durability boundary).
1546
- - **Q9 threat model + package allowlist:** `docs/threat-model.md`,
1547
- `scripts/verify-package-files.mjs` / `npm run check:package-files`.
1548
-
1549
- ### Changed
1550
-
1551
- - **Product identity retained:** ArkGate, `arkgate`, the `arkgate*` / `ark*` commands,
1552
- `ark.config.json`, `ark://`, `ARK_*`, the existing GitHub repository, and `arkgate.online` remain
1553
- canonical. The unpublished local rename experiment was reversed before any external cutover.
1554
- - **Truthful host support matrix and runtime status:** one capability-backed matrix now drives
1555
- README and generated `AGENTS.md` guarantees for Claude, Grok, Cursor, and Codex. Doctor exposes
1556
- both the supported host profile and repository evidence; public docs distinguish hard local
1557
- hooks, advisory MCP, CI checks, and required-status merge blocking. The optional runtime/Nest
1558
- surface is explicitly experimental and is not required for architecture-gate adoption.
1559
- - **Active host vs deferred Codex on upgrade/doctor:** `/ark-upgrade` greens the
1560
- **session host** first; Codex `$CODEX_HOME` prompts/MCP multi-project debt is
1561
- **deferred** when the session host is **known and not Codex** (Grok/Claude/Cursor).
1562
- Unknown host (CI/plain shell) keeps original severity. Doctor marks deferred gaps
1563
- `deferred: true` (severity `info`), prefixes the message, and omits them from Top
1564
- actions. Temp/upgrade MCP `--root` stays urgent (fail-closed). New helpers:
1565
- `detectActiveAgentHost`, `codexConcernIsActive` (do not treat `CODEX_HOME` alone
1566
- as Codex). `ark-check` advisory for stale Codex-home skills notes the deferral.
1567
- Completion contract adds **Active host** / **Deferred hosts**.
1568
- - **ROADMAP Track Q:** Q2 `done`; Q3/Q5/Q6/Q8/Q9 `doing` with residual external/DoD
1569
- items listed; Q4/Q7/Q10 remain `todo` (no false complete).
1570
-
1571
- ## 2.12.0 — 2026-07-10
1572
-
1573
- ### Fixed
1574
-
1575
- - **Install agent gates on temp roots:** skip rewriting the developer's real
1576
- `~/.codex/config.toml` when the project root is a temp/upgrade scratch and
1577
- `CODEX_HOME` is unset. Home MCP wire failures no longer fail an otherwise
1578
- successful repo gate install (sandbox/EPERM). Explicit `CODEX_HOME` and
1579
- `--codex-home` still wire as before.
1580
- - **Q1 coverage floors (broad include, 80/85/95):** Vitest thresholds statements/lines **≥80%**,
1581
- branches/functions **≥85%** on the **full product unit surface** (`src/**` + `bin/lib/**` +
1582
- `bin/ark-shared.mjs`; only process-entry shells excluded — no cherry-picked enforcement-core
1583
- include). Per-path critical floors: write-path-detect / auto-patch / prepare-write /
1584
- safety-diagnostics / baseline-key / graph-cycles at **≥95%** branch. Real branch-driving tests
1585
- under `tests/unit/static-check/` (critical + surface/topup/seam suites). Two consecutive
1586
- green `npm run test:coverage` captures (stmts/lines **92.71%**, branches **85%**, functions
1587
- **94.76%**; critical modules all **≥95%** branch).
1588
- - **agent-gates modularization:** thin facade (`bin/lib/agent-gates.mjs` ~100 LOC) re-exports
1589
- `gate-files`, `skill-install`, `ci-and-commands`, `mcp-adoption`, `install-migrate`,
1590
- `typescript-host`, `hook-templates`, `write-path-detect`, plus field/codex helpers.
1591
- `detectDeployPathQuality` extracted to `bin/lib/deploy-path.mjs` so `mcp-adoption.mjs` stays
1592
- under the 600 LOC module budget. Import hygiene on extract modules; `loadTypeScript` uses
1593
- `__arkCheckCli` for the nested arkgate TypeScript fallback.
1594
- - **Deny→repair CI proof:** `tests/unit/static-check/writePathDetect.test.ts` drives
1595
- shipped `bin/ark-mcp.mjs --hook --hook-repair` and asserts `ARK_REPAIR_JSON` /
1596
- `ARK_AUTOPATCH_JSON` on deny (exit 2); reject-only without repair flag still supported.
1597
- - **Dogfood write path repair:** local Claude/Grok hooks use `--hook-repair`; doctor
1598
- reports `writePath.mode = repair` on this tree.
1599
- - **Self-hosted AGENTS.md:** `--install-agent-gates --force` no longer overwrites library
1600
- mother-repo Identity (`skipped-self-hosted`).
1601
- - **hexagonal-order-api:** `safety.allowInMemory` for ephemeral demo kernel; prefer
1602
- `arkgate/runtime` imports; `npm run check` green under `--strict-config`.
1603
- - **multi-app / monorepo rules:** deny App→Persistence, Presentation→Domain, and
1604
- Persistence→Presentation (parity with crud-product starter).
1605
- - **Generated CI Node default lags local npm (again):** when a project had no
1606
- `.nvmrc` / `engines.node`, the Ark architecture gate workflow defaulted to
1607
- Node 22. Lockfiles written on Node 24/26 then failed `npm ci` with
1608
- "Missing: … from lock file" before `ark-check` ran — CI green, Ark red.
1609
- Detection order is now `.nvmrc` / `.node-version` → `engines.node` → **highest
1610
- `node-version` from sibling workflows** (excludes `ark-check.yml` so a stale
1611
- gate cannot re-pin itself) → default **24**. Refresh existing gates with
1612
- `ark-check --install-agent-gates --force` (or edit `node-version` in
1613
- `.github/workflows/ark-check.yml`).
1614
-
1615
- ### Changed
1616
-
1617
- - **Hook templates extracted** to `bin/lib/hook-templates.mjs` (agent-gates seam).
1618
- - **Write-path detect extracted** to `bin/lib/write-path-detect.mjs` (doctor W5; re-exported
1619
- from agent-gates).
1620
- - **Coverage thresholds** raised to Q1 floors on the broad include set: statements/lines **≥80**,
1621
- branches/functions **≥85**, critical write/safety modules **≥95%** branch (see Fixed above).
1622
- - **`/ark-explore` skill:** decision-grade recon — field path (run starters/checks),
1623
- installed hooks vs install templates, coupling via fan-in/exports (not LOC alone),
1624
- ranked “así te lo re-soluciono” rows only when residual changes action; ENFORCE /
1625
- empty plan treated as baseline, not the story. **v2.1:** output modes (recon vs
1626
- dual-plan seed, no multi-week roadmaps by default); path-correct vs design-correct
1627
- + semantic false-green; success signals and kill-switches on bets (anti-vanity).
1628
- - **`/ark-autopilot` skill:** explore-first (decision-grade), **dual plan** —
1629
- A remediation from `--plan` + B pattern/evolution bets (never auto-apply B as
1630
- mechanical-safe); empty plan no longer means “healthy” without explore/B.
1631
- - **Day-zero origin first:** `ark start` / `ark init` freeze `.ark/reports/origin.*`
1632
- immediately after `ark.config.json` exists and **before** agent docs, skills, and CI
1633
- templates. Later `--report` still shows evolution vs that snapshot.
1634
-
1635
- ## 2.11.0 — 2026-07-10
1636
-
1637
- Fail-closed enforcement hardening: `--strict` now combines contract coverage, installed-gate
1638
- checks, write-hook presence, and bypass diagnostics in one CI profile. The GitHub Action runs
1639
- the exact checked-out revision by default, and runtime workflows cancel timed-out work
1640
- cooperatively.
1641
-
1642
- ### Added
1643
-
1644
- - **Strict CI profile:** `arkgate-check --strict` enables strict config validation, requires
1645
- generated gates plus a PreToolUse write hook, and fails on configured safety diagnostics.
1646
- - **Bypass diagnostics:** new `dynamicImportAllowlist` and `safety` config fields detect
1647
- non-literal dynamic imports, TypeScript suppression directives, explicit `any` casts,
1648
- production InMemory defaults, and disabled or omitted peer isolation. `--doctor --json`
1649
- exposes the same evidence under `doctor.safety`.
1650
- - **Release-quality CI:** JavaScript syntax validation, enforced coverage thresholds, and a
1651
- Node 18/20/22/24 compatibility matrix now run before merge.
1652
-
1653
- ### Changed
1654
-
1655
- - **Pinned GitHub Action execution:** `uses: pedroknigge/arkgate@<tag-or-SHA>` now runs that
1656
- checked-out ArkGate source. The `version` input remains available only as an explicit exact
1657
- npm compatibility override.
1658
- - **Complete MCP contract:** `ark://manifest` exposes every configured file layer separately
1659
- from runtime intent layers, plus reviewed dynamic-import and safety policy.
1660
- - **Workflow cancellation contract:** workflow steps receive an `AbortSignal` as their third
1661
- argument. `timeoutMs` aborts that signal, clears the active step, and rejects duplicate step
1662
- names before execution can corrupt compensation order.
1663
- - **Filesystem confinement:** source scans follow internal symlinks once and reject symlinks
1664
- that escape the project root.
1665
-
1666
- ### Fixed
1667
-
1668
- - **Baseline duplicate honesty:** repeated violations now receive stable per-occurrence keys,
1669
- so adding a second identical violation is new debt instead of being hidden by one baseline
1670
- entry.
1671
- - **Write-hook duplicate honesty:** proposed writes compare violation counts, preventing a new
1672
- duplicate from being mistaken for an already-existing violation.
1673
- - **CLI argument safety:** unknown flags and missing flag values fail with usage guidance
1674
- instead of silently weakening enforcement or throwing an internal error.
1675
- - **Action gate detection:** repositories using the ArkGate composite Action satisfy the CI
1676
- gate check without needing a separate literal `ark-check` command.
1677
-
1678
- ## 2.10.0 — 2026-07-10
1679
-
1680
- Track W — **Constrained write → verified repair**: write-boundary autoPatch, prepare_write,
1681
- loop-cost measurement, opt-in hook repair payloads, doctor write-path awareness, and a
1682
- proof-gated port-inject transform (judgment for auto-apply).
1683
-
1684
- ### Added
1685
-
1686
- - **W1 write-boundary autoPatch:** `validate_code` and PreToolUse `--hook` may return
1687
- additive `autoPatch: { source, remediationKind, confidence, valid }` for mechanical-safe
1688
- **import type** rewrites (`import-type-from-pure-type-module`, `import-type-of-type-exports`).
1689
- Post-patch revalidation must be green or the patch is discarded (never silent write).
1690
- Implementation: `bin/lib/auto-patch.mjs`.
1691
- - **W2 `ark_prepare_write` MCP tool:** place + constrain + validate + optional autoPatch +
1692
- judgmentBrief + contentHash in one call (`bin/lib/prepare-write.mjs`). Composes
1693
- `ark_place` + write gate — not a second contract.
1694
- - **W3 loop-cost eval harness:** `eval/loop-cost-run.mjs` / `npm run eval:loop-cost`
1695
- records turns-to-green, optional tokens, CHEATED (fixture-measured). Baseline
1696
- `eval/loop-cost-baseline.json` (medianTurnsTypeOnly=1, cheatedRate=0).
1697
- - **W4 opt-in hook repair payload:** `--hook-repair` / `ARK_HOOK_REPAIR=1` on deny emits
1698
- `ARK_REPAIR_JSON` + `ARK_AUTOPATCH_JSON` (stderr) and optional Grok `autoPatch` (stdout).
1699
- Default `--hook` remains hard-block prose only. Install templates (Claude/Grok) include
1700
- `--hook-repair`. Never silent write.
1701
- - **W5 doctor write-path awareness:** `ark-check --doctor` (JSON + human) surfaces
1702
- `writePath.mode` (`repair` | `reject-only` | `mcp-only` | `none`) and
1703
- `prepareWrite` / `autoPatch` flags from installed hooks/MCP. Reject-only gap is
1704
- additive (info) with install fix.
1705
- - **W6 port-proof inject binding (eval-gated):** prove+transform for
1706
- `port-proof-inject-binding` — single named value import used only as
1707
- `binding.method(...)` inside function declarations. Removes the import, emits a
1708
- port type, injects the binding as a parameter (call sites preserved). **Judgment for
1709
- auto-apply** (call arity changes; not write-path autoPatch). Fail-closed static proof;
1710
- rest params refuse apply. Labeled eval case. Implementation: `bin/lib/port-proof.mjs` +
1711
- scan flag `portProofEligible`.
1712
-
1713
- ### Changed
1714
-
1715
- - **Write gate type-only edges:** `import type` / `export type` no longer hard-block
1716
- LAYER_IMPORT / infra heuristics on the write path (erased at runtime). Value imports
1717
- and peerIsolation still deny. ark-check plan continues to surface type placement debt.
1718
- - **`ark_prepare_write` isError:** always `isError` when proposed source is invalid
1719
- (autoPatch is additive recovery, not soft-success).
1720
- - **`resolveImportFileAbs`:** confines disk reads under project root (no path escape).
1721
-
1722
- ## 2.9.2 — 2026-07-09
1723
-
1724
- Skill surface hardening: dual-engine, explore, STOP handoffs, AGENTS routing, subagent fan-out.
1725
- **No intentional CLI flag or JSON shape breaks.**
1726
-
1727
- ### Added
1728
-
1729
- - **`/ark-explore` skill:** exploratory architecture reconnaissance — product map, entry
1730
- points, coupling hotspots, false-green risk, ranked *suggestions* (not only residual
1731
- violations). CLI remains a sensor; host agent reads the real tree.
1732
- - **Skill completion contract:** every `/ark-*` template ends with fixed
1733
- `### Completion` fields (Sensor / Opened / Result / Handoff / Incomplete?) —
1734
- **skill incomplete if missing**.
1735
- - **Hard STOP handoffs:** critical paths (false-green, concentrated edge, bulk debt,
1736
- wrong skill) use `STOP — do not continue this skill as complete` + named next skill.
1737
- - **AGENTS skill routing table:** trigger → skill map in generated `AGENTS.md` while
1738
- keeping `/ark-autopilot` as the default when unsure.
1739
- - **Subagent fan-out protocol:** every `/ark-*` skill documents optional **parallel
1740
- subagents** when the host supports them (disjoint read-only scopes + parent merge);
1741
- otherwise **fall back to sequential**. AGENTS.md repeats the rule.
1742
-
1743
- ### Changed
1744
-
1745
- - **Skills dual-engine (deterministic + exploratory):** **all** shipped skill templates
1746
- require dual-engine behavior (CLI sensor + real source/product pass where applicable).
1747
- Plan empty ≠ architecture healthy without explore. Refresh installed skills with
1748
- `ark-check --install-agent-gates --skills-only --force`.
1749
-
1750
- ## 2.9.1 — 2026-07-09
1751
-
1752
- Field-install honesty: non-TTY start, baseline→CI sync, pin, false-green soft block, Grok defaults.
1753
- **No intentional CLI flag or JSON shape breaks.**
1754
-
1755
- ### Fixed
1756
-
1757
- - **Non-TTY `ark start` / `ark init`:** when stdin/stdout are not a TTY and `--yes` was
1758
- omitted, guided setup no longer throws on a null readline interface. Non-interactive
1759
- sessions use the same defaults as `--yes` (agents never hang on prompts).
1760
- - **Baseline → CI/scripts sync:** after a successful `--update-baseline`, existing
1761
- `package.json` scripts and GitHub Actions workflows that already run `ark-check` gain
1762
- `--baseline .ark-baseline.json` without a full `--force` reinstall of gate templates.
1763
- - **Grok in default agent tools:** no-signal `--install-agent-gates` now installs
1764
- claude + cursor + codex + **grok**; `GROK_BUILD` / `XAI_GROK` env also adds Grok when
1765
- other hosts are detected.
1766
-
1767
- ### Added
1768
-
1769
- - **`start` pins `arkgate` as a devDependency** (opt out with `--no-install`) so CI/`npx`
1770
- are not forced to rely on a stale global install.
1771
- - **False-green contract soft block:** doctor adoption gap
1772
- `contract-false-green-io-under-application` when Domain/Persistence are empty while
1773
- Application globs still cover I/O dirs (airtable/supabase/prisma/…). `ark start`
1774
- wrap-up and `/ark-autopilot` steer to `/ark-adopt` / `/ark-contract` instead of pure
1775
- ENFORCE victory.
1776
- - **`bin/lib/field-install.mjs`:** field-install helpers (baseline sync, pin, false-green)
1777
- extracted from the agent-gates surface for scannability; re-exported from `agent-gates.mjs`.
1778
-
1779
- ### Changed
1780
-
1781
- - **Public ROADMAP:** active backlog is **Track W** (constrained write → verified repair:
1782
- W1–W6). Finished foundation tracks live under Shipped.
1783
-
1784
- ## 2.9.0 — 2026-07-09
1785
-
1786
- Track P: slice isolation, vertical-slice + DDD presets, skill surface, and adoption depth.
1787
- **No intentional CLI flag or JSON shape breaks** for existing presets; new rules/presets are opt-in.
1788
-
1789
- ### Added
1790
-
1791
- - **`peerIsolation` edge rules (P0):** opt-in cross-slice bans
1792
- (e.g. `features/auth` ↛ `features/payments`). Optional `sliceFolders`.
1793
- Wired in `ark-check`, ESLint, write-gate, remediation (`cross-slice-boundary`, judgment).
1794
- - **`vertical-slice` preset (P2):** Features / Shared / Lib / App with peerIsolation on
1795
- Features. `ark init --preset vertical-slice`. CLI help and fit scoring include all
1796
- public presets (`ui-surface` documented).
1797
- - **P3 vertical-slice adoption surface:** playbook archetype `vertical-slice-product`,
1798
- signal `verticalSliceLayout`, policy pack `enthusiast-vertical-slice`, gallery
1799
- `examples/vertical-slice-starter/` (strict-config green).
1800
- - **P4 `ddd-bounded-contexts` preset:** contexts/*/domain|application|presentation|infra +
1801
- SharedKernel; peerIsolation matrix blocks **any** cross-context import (same or
1802
- cross technical layer). Archetype, pack, gallery starter.
1803
- - **Skills (S1/S3):** architect/place/fix/adopt/autopilot know vertical-slice + DDD;
1804
- new host-only `/ark-think` skill (no package LLM). Refresh installs with
1805
- `ark-check --install-agent-gates --skills-only --force`.
1806
- - **Eval corpus (S5):** `eval/cases/vertical-slice-cross-feature` labeled peerIsolation case
1807
- (`cross-slice-boundary` fixClass, judgment).
1808
- - **S2 recommend/doctor:** JSON/human output includes `galleryStarter` + `policyPack`; wizard
1809
- choices for vertical-slice and DDD; doctor new-here lines for Nest modular and monorepo tooling.
1810
- - **P5 monorepo depth:** default include falls back to `packages`/`apps`/`libs`; detect
1811
- `turbo.json` / `nx.json`; playbook boosts multi-app-workspace on monorepo tooling.
1812
- - **P6 FSD patterns:** feature-sliced accepts `src/<layer>/**` and root `<layer>/**` (app/pages).
1813
- - **P7 aliases:** `clean-architecture` and `onion-architecture` → hexagonal factory.
1814
- - **P8 Nest guidance:** agent-guide + doctor tip (hexagonal vs ddd-bounded-contexts).
1815
-
1816
- ### Changed
1817
-
1818
- - **Same-layer deny semantics (locked):** classic `{ allowed: false }` without
1819
- `peerIsolation` never blocks same-layer edges (historical short-circuit restored /
1820
- confirmed). Only `peerIsolation: true` may deny, and only when slice ids differ.
1821
- - **`peerIsolation` applies cross-layer too:** when set, deny only if slices differ
1822
- (enables honest DDD inter-context isolation for e.g. application→domain across contexts).
1823
- - **`FRAMEWORK_INTERNAL_EXCLUDE`:** `src/kernel/**` + `**/src/kernel/**` only — no longer
1824
- `**/kernel/**` (which carved out `src/shared/kernel/**`).
1825
- - **Write-gate import resolve:** single `resolveImportTarget` primitive in
1826
- `bin/lib/import-resolve.mjs`; `ark-mcp` entry stays under 1000 LOC.
1827
- - **Gallery starters:** `npm run check:gallery-starters` fails on factory drift;
1828
- `generate:gallery-starters` rewrites configs from presets.
1829
-
1830
- ## 2.8.3 — 2026-07-09
1831
-
1832
- Field residuals + official site: core ratchet to honest ENFORCE, typecheck bootstrap,
1833
- host-token scrub, arkgate.online homepage. **No intentional CLI flag or JSON shape breaks.**
1834
-
1835
- ### Added
1836
-
1837
- - **`--ratchet-cores`:** when architecture is green (0 active violations, governed ≥ 50%),
1838
- set `optional: false` on **populated** core layers only so doctor can report **ENFORCE**
1839
- honestly. Empty cores stay optional (no false-ENFORCE theatre). Doctor core-optional gaps
1840
- point at this command; `/ark-autopilot` documents the step after goal.met.
1841
- - **Typecheck bootstrap:** `ark start` / `--install-agent-gates` add `"typecheck": "tsc --noEmit"`
1842
- when `tsconfig.json`/`jsconfig.json` exists and no typecheck-like script is present; generated
1843
- CI includes the typecheck step. Existing scripts are never overwritten.
1844
-
1845
- ### Changed
1846
-
1847
- - **Official website:** product homepage is [arkgate.online](https://www.arkgate.online/)
1848
- (`package.json` `homepage`, README badges/footer, ROADMAP identity). npm package page
1849
- and GitHub remain source + distribution links.
1850
- - **Repo hygiene:** scrub named field-probe host identities from docs, comments, tests, and
1851
- historical changelog wording; fixtures stay framework-generic (Nest/Next only).
1852
- - **Maintainability:** `--ratchet-cores` lives in `bin/lib/core-ratchet.mjs` (not the ark-check
1853
- entry); typecheck detection uses shared `packageScriptsHaveTypecheck` (not full deploy-path
1854
- scan); typecheck bootstrap is skipped under `--skills-only`.
1855
-
1856
-
1857
- ## 2.8.2 — 2026-07-09
1858
-
1859
- Field-honesty patch (Next/UI host probe): no Nest false positives, no false ENFORCE on
1860
- ui-surface bags, honest `ark start` mode, Next proxy/middleware classification.
1861
- **No intentional CLI flag or JSON shape breaks.**
1862
-
1863
- ### Fixed
1864
-
1865
- - **Nest detection false positive:** bare `*.service.ts` / similar names no longer set
1866
- `nestFramework` without `@nestjs/*` or controller/module/gateway/resolver files (Next/Node
1867
- apps no longer get a spurious `nestjs+next` overlay).
1868
- - **False ENFORCE on UI bags:** doctor/report mode stays **ADAPT** when Domain+Persistence are
1869
- empty while Presentation dominates, or when core layers with files remain `optional: true`.
1870
- - **ui-surface / Next defaults:** drop whole-`src` and bare `**/lib/**` presentation bags;
1871
- classify conventional data clients (`lib/supabase`, `lib/airtable`, `lib/prisma`, …) as
1872
- **Persistence**; add Application patterns for actions/services.
1873
- - **Generated CI:** when `package.json` has `lint` / `typecheck` scripts, the installed
1874
- GitHub Actions workflow runs them before ark-check (closes deploy-path gaps for Next hosts).
1875
- - **`ark start` wrap-up mode:** prefers `ark-check --doctor` `operatingMode` over plan-only
1876
- `resolveOperatingMode` (default **adapt**, double-lock against false **ENFORCE**).
1877
- - **Next middleware / proxy:** ui-surface + Next overlay classify `src/proxy.ts`, root
1878
- `proxy.ts`, and classic `middleware.ts` as **Presentation** (Next 16 rename no longer
1879
- leaves the edge entry ungoverned).
1880
- - **Idempotent Next overlay:** re-applying framework overlays no longer yields
1881
- `frameworkOverlay: "next+next"`.
1882
-
1883
- ## 2.8.1 — 2026-07-09
1884
-
1885
- Runtime honesty release (roadmap **R8–R9**): EventBus publish pipeline decomposition and
1886
- explicit InMemory durability stance. **No intentional CLI flag or JSON shape breaks.**
1887
-
1888
- ### Changed
1889
-
1890
- - **R8 — EventBus decomposition:** publish pipeline split into cohesive modules under
1891
- `src/kernel/event-bus/` (`payloadPatch`, `publishGuards`, `publishInterceptors`,
1892
- `observedLayerFlow`, `publishPolicy`, `publishRecording`). `EventBus.ts` is
1893
- orchestration + public surface only. **`createEventBus` API and enforcement order
1894
- unchanged.** Snapshot of subscribers still taken before policy hooks.
1895
- - **R9 — Runtime durability stance:** built-in stores are documented as **reference
1896
- InMemory-only** (not production durability) in README, `docs/production-hardening.md`,
1897
- `docs/package-surface.md`, and JSDoc on `OutboxStore` / `AuditStore` /
1898
- `ReadModelStore` / `WorkflowStore` (+ InMemory implementations). No durable adapter
1899
- shipped — inject your own for production.
1900
-
1901
- ## 2.8.0 — 2026-07-09
1902
-
1903
- Co-pilot quality release (roadmap **R5–R7**): labeled eval corpus, fourth mechanical-safe kind,
1904
- and Codex multi-project MCP without silent primary overwrite. **No intentional CLI flag or JSON
1905
- shape breaks** for the gate/co-pilot path.
1906
-
1907
- ### Added
1908
-
1909
- - **R5 — labeled eval corpus:** 16 cases under `eval/cases/` (themes + labels).
1910
- `npm run eval:corpus` / `evalCorpus.test.ts` gate without a live agent.
1911
- - **R6 — `import-type-of-type-exports`:** named type-only exports from mixed modules →
1912
- `import type` / `export type`. Dual-space names and targets with top-level side effects stay
1913
- **judgment**. Scan flags `namedBindingsTypeOnly` (+ `hasTopLevelSideEffects`).
1914
- - **R7 — Codex multi-project MCP DX:** no silent primary steal; scoped
1915
- `[mcp_servers.ark_<slug>_<hash>]`; doctor gap `codex-home-multi-project`. Codex home logic in
1916
- `bin/lib/codex-home.mjs`.
1917
-
1918
- ### Changed
1919
-
1920
- - Scan cache schema **v6** (typeOnlyExportNames, namedBindings, hasTopLevelSideEffects;
1921
- invalidates v5 after non-export side-effect honesty fix).
1922
- - Classifier: single early judgment for `require` / `dynamic-import` on layer edges.
1923
- - R6 honesty: impure value-export initializers (`export const db = connect()`) count as
1924
- top-level side effects — named type imports of those modules stay **judgment**.
1925
- - R6 honesty: non-exported impure top-level initializers (`const boot = setup()`) and
1926
- non-exported class static field calls also count as side effects (same skip-on-import-type risk).
1927
- - Codex home: single `upsertCodexMcpTable` path for primary and secondary MCP tables.
1928
-
1929
- ## 2.7.0 — 2026-07-09
1930
-
1931
- Maintainability release (roadmap **R1–R4**): single-source layer matching, package surface policy,
1932
- `ark-check` orchestration split, and typed pure CLI helpers. **No intentional CLI flag or JSON
1933
- shape breaks** for the gate/co-pilot path.
1934
-
1935
- ### Added
1936
-
1937
- - **`arkgate/runtime`** package subpath (ESM/CJS + types) — preferred entry for the optional
1938
- runtime kernel. Root `arkgate` still re-exports kernel symbols for this major (compat).
1939
- - **`docs/package-surface.md`** — stable surfaces (CLI JSON, MCP, `ark.config`) vs opt-in runtime.
1940
- - **Generated pure CLI helpers:** `bin/lib/remediation.mjs`, `bin/lib/baseline-key.mjs` from
1941
- Domain TS (`npm run generate:cli-pure` / `check:cli-pure`).
1942
- - **`ark-check` scan pipeline modules** under `bin/lib/`: `scan-files`, `config-warnings`,
1943
- `ts-resolve`, `ast-scan`, `graph-cycles`, `architecture-scan`.
1944
-
1945
- ### Changed
1946
-
1947
- - **R1 — layer globs SoT:** canonical `src/domain/layerMatch.ts` → generated
1948
- `bin/ark-layer-match.mjs`; `npm run check:layer-match` drift guard in CI.
1949
- `normalizeGlobSeparators` keeps Windows path seps without eating glob escapes.
1950
- - **R2 — package surface = product wedge:** README / agent-guide / migrate / production-hardening
1951
- recommend `arkgate/runtime` for kernel usage.
1952
- - **R3 — `ark-check` entry slim-down:** entry is orchestration-only (~2.4k → ~1.4k LOC);
1953
- `runArchitectureScan` owns the check pipeline. Flags and JSON shapes unchanged.
1954
- - **R4 — typed pure core:** `classifyRemediation`, `enrichViolationWithFixClass`, and
1955
- `baselineKey` live in `src/domain/*` with generated CLI load paths; unit tests import Domain
1956
- sources without spawning the CLI.
1957
-
1958
- ### Docs / CI
1959
-
1960
- - CI steps for layer-match and cli-pure drift guards.
1961
- - CONTRIBUTING / AGENTS: regenerate commands after editing pure Domain algorithms.
1962
-
1963
- ## 2.6.1 — 2026-07-09
1964
-
1965
- Field-test release: Next/monorepo honesty (frontend monorepo hosts), simplified **one-flow** UX for
1966
- humans and autonomous agents, and skills that require real source remediation—not CLI paraphrase.
1967
-
1968
- ### Fixed — false greens & strict CI noise (Next / monorepo)
1969
-
1970
- - **Next application bag:** framework overlay classifies `src/core/**` and `**/core/**` as
1971
- ApplicationOrchestration so monorepos like `frontend/src/core` are governed on day one
1972
- (not left as dark matter under a “clean” plan).
1973
- - **Nested Next detection:** `collectAggregatedDeps` + scan of `frontend/`/`web`/`client` so
1974
- `next` only under `frontend/package.json` (root arkgate-only) still enables the Next overlay
1975
- and `app/page.tsx` path matching (middle segment optional).
1976
- - **Next noise excludes:** public assets, tool configs, and scripts are excluded by default on
1977
- Next detection so demo JS does not pollute coverage.
1978
- - **Domain `**/types.ts` trap removed** from monorepo and ui-surface presets. Bare
1979
- `core/**/types.ts` no longer becomes Domain and invents Domain→Application edges.
1980
- - **`CONFIG_LAYER_PATTERN_NO_MATCHES` is advisory** (`failsStrict: false`). Dead preset globs
1981
- (`app/**`, `src/layouts/**` when `include` is `frontend`) no longer fail `--strict-config`
1982
- alone while architecture edges are clean.
1983
- - **Empty baseline policy:** `--update-baseline` with zero violations **deletes** an existing
1984
- empty `.ark-baseline.json` instead of leaving an orphan “is the ratchet on?” file.
1985
- - **Monorepo CI install:** generated workflow `npm install` also installs `frontend/` when
1986
- `frontend/package.json` exists (root-only arkgate + app under frontend).
1987
-
1988
- ### Changed — one-flow UX (humans + agents)
1989
-
1990
- - **README:** leads with **The only flow** — `ark start` → `/ark-autopilot` → `doctor`. Skills
1991
- are escapes, not a flat curriculum. Operating modes documented as **status lights**, not
1992
- settings.
1993
- - **`ark start` wrap-up:** always ends with the three next steps (agent autopilot, doctor,
1994
- strict check) instead of a long mode-specific essay.
1995
- - **Generated `AGENTS.md`:** “Default agent flow (if unsure, do only this)” — autopilot first;
1996
- other `/ark-*` skills are optional escapes.
1997
- - **Doctor operating mode copy:** plain-language Setup / Align / Guard and “you do not pick
1998
- this mode”.
1999
-
2000
- ### Changed — skills (deep co-pilot, not CLI wrappers)
2001
-
2002
- Templates under `templates/skills/` (and project `.grok/skills` copies) for at least:
2003
-
2004
- `ark-coverage`, `ark-autopilot`, `ark-loop`, `ark-adopt`, `ark-fix`, `ark-contract`
2005
-
2006
- - **Anti-wrapper rule:** must read real source; CLI is a sensor.
2007
- - **“Así te lo re-soluciono”** remediation deliverable (file-level plans).
2008
- - **Adopt / contract:** mine loose business rules into the Ark **manifest** (layers,
2009
- `intentPrefixes`, Domain placement, intent naming)—not config vibes only.
2010
-
2011
- ### Tests
2012
-
2013
- - Fixture-style unit tests drive real `bin/ark-check.mjs`: Next core governance; frontend monorepo-like
2014
- monorepo (`frontend` + `core/**/types.ts` not Domain); strict-config with dead globs;
2015
- empty baseline removal.
2016
-
2017
- ### Also in 2.6.1 train (from Unreleased product priorities)
2018
-
2019
- - Empty-scope honesty, auto-include TS packages, AGENTS non-clobber, `--adopt-contract`,
2020
- UI surface preset, MCP place/suggest-include, Codex multi-project, deploy-path adoption
2021
- gaps, soft cycle policy, Rush/Lerna monorepo roots, type-only cycle graph, default skip
2022
- `*.gen.ts` / `*.generated.ts`.
2023
-
2024
- ## 2.6.0 — 2026-07-09
2025
-
2026
- ### Changed — maintainability hygiene (#11 / #12)
2027
-
2028
- - **`bin/ark-check.mjs` modularized** (~5.8k → ~2.1k lines of orchestration):
2029
- `bin/lib/agent-gates.mjs`, `html-report.mjs`, `doctor-plan.mjs`, `violations.mjs`,
2030
- `suggestions.mjs`, `presets.mjs`. Entry owns scan/CLI only.
2031
- - **Layer matching single algorithm:** pure matcher in `bin/ark-layer-match.mjs` (CLI) and
2032
- `src/domain/layerMatch.ts` (eslint). Tooling may import DomainModel for that pure helper.
2033
- `tests/unit/static-check/layerMatchParity.test.ts` locks both implementations.
2034
- - Dual-driver ESLint/CI tests retained.
2035
-
2036
- ### Fixed — field test (Codex + Grok on random repos)
2037
-
2038
- - **`--report` path display:** absolute report paths no longer print as brittle
2039
- `../../../../tmp/...` relatives; paths outside the project root print absolute.
2040
- - **`ark-check --help`:** documents dual bins `arkgate-check | ark-check`.
2041
- - **`ark-check --version` / `-V`:** prints package version (no longer runs a full check).
2042
- - **Doctor thin-coverage honesty:** when there are zero violations but governed &lt; 50%
2043
- (or empty scope), doctor no longer claims “code matches the contract”; it warns that
2044
- green is not yet honest enforcement.
2045
- - **Grok write-gate hooks:** root env
2046
- `${GROK_WORKSPACE_ROOT:-${CLAUDE_PROJECT_DIR:-.}}` (Grok → Claude alias → cwd).
2047
- - **AGENTS / package / Cursor check command:** if `.ark-baseline.json` exists, emitted
2048
- `ark-check` commands include `--baseline .ark-baseline.json` (same ratchet as CI).
2049
-
2050
- ## 2.5.0 — 2026-07-09
2051
-
2052
- ### Added — ESLint ↔ CI layer parity
2053
-
2054
- - **`arkgate/eslint`** `no-domain-infra-imports` is **config-driven**: loads
2055
- `ark.config.json` (walk-up from the linted file), classifies layers with the same
2056
- glob specificity + `exclude` semantics as `arkgate-check`, and denies edges from
2057
- `rules[]` — not path-token “domain/infra” heuristics alone.
2058
- - Relative imports resolve to on-disk TS/JS targets; type-only and value imports both
2059
- fail when the edge is denied (same pass/fail as CI).
2060
- - **`no-forbidden-globals`** reads `forbiddenGlobals` from the matched layer in
2061
- `ark.config.json` (no invented defaults for layers without a purity list). Optional
2062
- rule option `globals` still overrides. Domain path heuristic + defaults only when
2063
- no config is found.
2064
- - Dual-driver tests: same fixtures → ESLint rule + `ark-check --json` agree.
2065
- - Recommended config enables `ark/no-forbidden-globals`.
2066
- - Without `ark.config.json`, legacy domain→infra path heuristic remains for bare trees.
2067
- - **ESLint 8–10 filename API:** rules read `physicalFilename` → `filename` → `getFilename()`
2068
- so config walk-up works on ESLint 10 (where `getFilename` was removed).
2069
-
2070
- ## 2.4.0 — 2026-07-08
2071
-
2072
- ### Added — Adoption completeness (P0–P2)
2073
-
2074
- - **`collectAdoptionGaps`** shared classifier: incomplete agent hosts (detected dirs
2075
- without skills/hooks), dual-bin MCP argv, Codex home temp/wrong root, core layers
2076
- still `optional` while populated, missing origin report, baseline policy signal.
2077
- - **`--doctor` / `--doctor --json`**: Adoption section + `doctor.adoption` JSON (separate
2078
- from fitness score); fix commands on each gap.
2079
- - **Codex home fail-closed:** `wireCodexMcp` rewrites temp/`ark-upgrade` roots and stale
2080
- bins to absolute project root + single `arkgate-mcp` even without `--force`.
2081
- - **P1:** `ark start` / `ark init` nudge origin report + doctor; HTML report **Adoption**
2082
- card (hosts, MCP, origin, core optionality, baseline) distinct from score ring.
2083
- - **P2:** Educational presentation-heavy / thin-domain note in senior diagnostics;
2084
- `templates/tests/ark-adoption-gaps.test.ts` structural template for consumers.
2085
-
2086
- ### Fixed — MCP dual-bin on upgrade
2087
-
2088
- - **`--migrate-commands`** stripped only `ark-mcp` then re-prepended a bin while
2089
- `arkgate-mcp` could remain → `args: ["ark-mcp","arkgate-mcp",…]` broke stdio MCP.
2090
- Now strips **all** MCP bin aliases + runner noise and emits a single
2091
- **`arkgate-mcp`**. Fresh `.mcp.json` / hooks / Codex+Grok wiring use the preferred bin.
2092
- - Doctor warns when dual bins are detected; `/ark-upgrade` skill documents the check.
2093
-
2094
- ### Added — TypeScript 5 / 6 / 7 compatibility bar
2095
-
2096
- - **`usableTypescript` / load fallback** shared in `ark-shared.mjs`: reject modules
2097
- without classic JS host (`ts.sys` + AST + resolve). TypeScript **7.0.x** main export is
2098
- version-only — gate falls back to ArkGate’s nested **JS-API** `typescript@^5.9`
2099
- (production dependency) so teams can try project TS 7 without breaking the gate.
2100
- - **CI job `ts-compat`:** matrix `typescript@5.9.3` / `6.0.3` / `7.0.2` on
2101
- `tests/fixtures/ts-consumer` via `scripts/ts-compat-matrix.mjs`.
2102
- - **Docs:** [docs/typescript-support.md](docs/typescript-support.md) (supported ranges,
2103
- TS7 version-only entry, tsconfig 6→7, dual-install 6+7, `ARK_DEBUG_TS`).
2104
- - Optional peer `typescript: >=5 <8` (project compiler); runtime dependency pins JS-API host.
2105
-
2106
- ### Docs & skills — full surface update for 2.4
2107
-
2108
- - Skills (`/ark-loop`, `/ark-fix`, `/ark-autopilot`, `/ark-explain`, `/ark-upgrade`) document
2109
- all three `mechanical-safe` `remediationKind`s and TS7 fallback notes.
2110
- - README / CONTRIBUTING / SECURITY / enthusiast track: **ArkGate** branding, dual CLIs,
2111
- TS 5–7 badge; drop incorrect “zero dependencies” claim.
2112
- - Agent / AI-gates / brownfield / demos / migrate guide aligned with plan classifier + TS7.
2113
-
2114
- ## 2.3.0 — 2026-07-08
2115
-
2116
- ### Added — P0 complete (mechanical-safe depth + release-trust)
2117
-
2118
- - **Third `mechanical-safe` remediation:** pure-type **file** relocate when the whole source
2119
- file is type-surface only (`sourcePureTypeModule` + type-only edge) —
2120
- `remediationKind: pure-type-file-relocate`.
2121
- - Keeps 2.2.0 classes: type-only import move; static import of pure-type target modules.
2122
- - **Deferred:** verbatim infra relocation of value modules (cannot prove behavior-preserving).
2123
- - **Release-trust:** `verify-release-tag` defaults to **fail-closed** on unsigned tags;
2124
- override only via `ARK_ALLOW_UNSIGNED_RELEASE_TAG=true` (publish workflow sets this
2125
- explicitly until GPG signing is wired). Unit tests cover policy + real script path.
2126
- - Corpus: pure-type file, pure-type target, side-effect type file, require/dynamic, value
2127
- import, forbidden global, cycles.
2128
-
2129
- ## 2.2.0 — 2026-07-08
2130
-
2131
- ### Added — co-pilot P0 depth (mechanical-safe expansion)
2132
-
2133
- - **Second `mechanical-safe` class:** static value-syntax imports of **pure type-only modules**
2134
- (only `export type` / `interface` + type-only imports; **no** top-level runtime statements).
2135
- Flagged `targetTypeOnlyExports` → convert to `import type`. Mixed modules, side-effecting
2136
- type files, `require()` / dynamic `import()` stay **judgment** (zero false-safe).
2137
- - **Scan cache v3** carries per-file `exportsOnlyTypes` (two-pass scan so targets resolve).
2138
- - **Classifier corpus** extended: type-only + pure-type static import = 2 auto steps; value
2139
- import, side-effect target, require/dynamic, forbidden global, cycles remain judgment.
2140
-
2141
- ## 2.1.1 — 2026-07-08
2142
-
2143
- ### Documentation
2144
-
2145
- - **Migration guide** for the ~4.5k installs still on `ark-runtime-kernel`:
2146
- [docs/migrate-from-ark-runtime-kernel.md](https://github.com/pedroknigge/arkgate/blob/main/docs/migrate-from-ark-runtime-kernel.md)
2147
- + README section *Upgrading from ark-runtime-kernel?*
2148
- - `/ark-upgrade` skill points rename-aware projects at `arkgate`.
2149
-
2150
- ## 2.1.0 — 2026-07-08
2151
-
2152
- **Identity: ArkGate.** Same product and codebase; honest package name.
2153
-
2154
- ### Changed
2155
-
2156
- - **npm package renamed to [`arkgate`](https://www.npmjs.com/package/arkgate)** (was
2157
- `ark-runtime-kernel`). Product name: **ArkGate** — architecture co-pilot / gate for AI
2158
- TypeScript. The optional runtime API is not the product.
2159
- - **CLI bins:** primary `arkgate`, `arkgate-check`, `arkgate-mcp`. Compat aliases
2160
- `ark` / `ark-check` / `ark-mcp` remain for one major.
2161
- - **MCP / server.json:** identifier `arkgate`, MCP name `io.github.pedroknigge/arkgate`.
2162
- - **GitHub Action** and docs/examples install paths point at `arkgate`.
2163
- - Config file remains `ark.config.json`; skills remain `/ark-*` (contract family).
2164
-
2165
- ### Migration
2166
-
2167
- Full guide: [docs/migrate-from-ark-runtime-kernel.md](https://github.com/pedroknigge/arkgate/blob/main/docs/migrate-from-ark-runtime-kernel.md).
2168
-
2169
- ```bash
2170
- npm uninstall ark-runtime-kernel && npm install -D arkgate
2171
- npx arkgate-check --install-agent-gates --force
2172
- # bins: npx arkgate-check … (aliases ark-check / ark-mcp still work)
2173
- ```
2174
-
2175
- Predecessor `ark-runtime-kernel` is **deprecated** on npm → use `arkgate`.
2176
-
2177
- ## 2.0.1 — 2026-07-08
2178
-
2179
- Docs + agent-host polish on top of the 2.0.0 co-pilot release.
2180
-
2181
- ### Added
2182
-
2183
- - **Grok Build as a first-class agent host** — `ark-check --install-agent-gates --tools grok`
2184
- writes `.grok/config.toml` (MCP), `.grok/hooks/ark-write-gate.json` (SessionStart + PreToolUse),
2185
- and `/ark-*` skills under `.grok/skills/<name>/SKILL.md`. Auto-detected from a project `.grok/` dir.
2186
- - **`ark-mcp --hook` Grok payloads** — accepts camelCase `toolName`/`toolInput` and
2187
- `write`/`search_replace`; emits `{ "decision": "deny", "reason": "…" }` on stdout for Grok.
2188
- - **README skill inventory** — table of all eleven `/ark-*` skills with a one-line summary each.
2189
-
2190
- ### Documentation / positioning
2191
-
2192
- - Public title and framing: **Ark — Architecture Co-pilot for AI TypeScript** (write gate · CI ·
2193
- co-pilot). npm name `ark-runtime-kernel` called out as historical; product is not the optional
2194
- runtime kernel.
2195
- - [docs/ai-gates.md](docs/ai-gates.md), [docs/agent-guide.md](docs/agent-guide.md), enthusiast
2196
- how-to, demos, roadmaps, and hexagonal example updated for Grok + skill list.
2197
-
2198
- ### Also in this train (from the showcase field branch)
2199
-
2200
- - Showcase HTML architecture report + origin/latest/history snapshots under `.ark/reports/`
2201
- - Autopilot before/after report steps; empty-scope false-green fix; monorepo/start TS7 hardening
2202
- - Unit/e2e `*.spec.ts` / `*.test.ts` excluded from architecture scope
2203
-
2204
- ## 2.0.0 — 2026-07-08
2205
-
2206
- **The architecture co-pilot.** This major completes the Gate → Guide → **Co-pilot** arc: Ark can
2207
- now take a non-developer from "I have a project" to "governed, cleaned up, and enforced," with an
2208
- agent doing the work and Ark keeping it honest. It's built on the three primitives every modern
2209
- agent harness uses — **plan**, **goal**, **loop** — composed into a guided, tiered flow.
2210
-
2211
- This is a **milestone** major, not an API break: everything from 1.x keeps working, and the two
2212
- aliases previously earmarked for 2.0 removal (`AIGateViolation.code`, `layeredArchitectureRules()`)
2213
- are **retained** to avoid surprising consumers. Upgrade with `npx ark upgrade`.
2214
-
2215
- ### Added — Phase I (autopilot + tiers)
2216
-
2217
- - **`/ark-autopilot` skill** — the end-to-end co-pilot for non-developers. One flow: guided setup
2218
- (`ark start`) → show the plan (`ark-check --plan`) → drive the fixes (`/ark-loop`) → confirm the
2219
- gates are enforcing → report, all in plain language with approvals. It auto-applies only
2220
- `mechanical-safe` changes (validated, with rollback) and PROPOSES the rest; the agent edits, Ark
2221
- validates; code only, never weakening the gate.
2222
- - **Two tiers, one contract** — documented in `/ark-autopilot`: newbie = the autopilot flow;
2223
- expert = the pieces directly (`ark init` / `/ark-contract` / `ark-check --plan` / `/ark-fix` /
2224
- the gate). `ark start` now points newcomers at the autopilot as the next step.
2225
-
2226
- ### Added — Phase J (proof)
2227
-
2228
- - **Classifier-precision corpus test** — a labeled set (type-only / value / forbidden-global /
2229
- circular) asserting the classifier matches every label and NEVER marks anything but a type-only
2230
- import move as `mechanical-safe` (the zero-false-safe guarantee the autopilot depends on).
2231
- - **End-to-end demo** — `docs/demos/03-copilot-autopilot.md`.
2232
- - **Enforcement-handoff test** — verifies the guided path leaves config + AGENTS.md + the CI gate
2233
- active ("and stays that way").
2234
-
2235
- ### Added — Field-hardened co-pilot (honesty · detection · frameworks)
2236
-
2237
- - **Three operating modes** on one contract: **suggest** (greenfield shape), **adapt** (raise
2238
- coverage / match real layout), **enforce** (gates honestly hold the line). Surfaced by
2239
- `ark start`, `--plan`, and `--doctor` — not just "newbie vs expert" entry styles.
2240
- - **False-green closed.** `ark-check --plan` embeds `governedPercent` and sets `goal.met` only
2241
- when violations are clear *and* coverage is meaningful (≥50%). A 0% governed repo no longer
2242
- prints "meets contract / Done — guards your architecture."
2243
- - **Shape-signal hygiene.** Dot-directories (`.github`, `.claude`, `.codex`, …) are skipped when
2244
- scoring archetypes — CI YAML and Ark's own gates no longer flip recommend to
2245
- "event-coordinator."
2246
- - **Framework layout overlays** on init/start presets: Nest (`*.controller.ts` /
2247
- `*.service.ts` / `*.module.ts`), Next (app/pages/components), express, and library
2248
- conventions are merged into hexagonal/layered globs so starters get real governed% on day one.
2249
- - **Stronger detection:** `@nestjs/*`, Nest filename conventions, `next`, express-like HTTP
2250
- frameworks weighted in the architecture playbook.
2251
- - **pnpm runner reliability:** emitted commands use
2252
- `pnpm --config.verify-deps-before-run=false exec …` so `ERR_PNPM_IGNORED_BUILDS` (sharp,
2253
- esbuild, tailwind oxide, …) no longer blocks Ark on common pnpm apps.
2254
- - **TypeScript resolution:** load TS from the project, then Ark; `--plan` still reports coverage
2255
- honesty when TS is missing (instead of a hard crash mid-start).
2256
-
2257
- ### Note
2258
-
2259
- - The intermittent CI "onTaskUpdate" vitest flake is fixed (single-fork test run).
2260
- - Field matrix harness (not shipped in the package): `../beta-field-test/run-matrix.mjs`.
2261
-
2262
- ## 1.19.0 and earlier
230
+ ## 4.5.7 and earlier
2263
231
 
2264
- Detailed 0.x/1.x history remains available in the immutable
2265
- [`1.x` CHANGELOG](https://github.com/pedroknigge/arkgate/blob/5e9d6745170a7b144015e718d0aed854c4bcd662/CHANGELOG.md#1190--2026-07-08).
2266
- The published package keeps complete 2.x and current-major notes so upgrade triage stays local
2267
- without making every install carry the full pre-2.0 development log.
232
+ Pre-4.6 history lives in the maintainer archive, not the npm changelog:
233
+ [docs/archive/CHANGELOG-pre-4.6.md](docs/archive/CHANGELOG-pre-4.6.md).