arkgate 4.6.4 → 4.6.6

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