arkgate 3.7.0 → 3.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +113 -1145
- package/README.md +59 -19
- package/bin/ark-check-runtime.mjs +1598 -0
- package/bin/ark-check.mjs +32 -1565
- package/bin/ark-layer-match.mjs +9 -4
- package/bin/ark-mcp-runtime.mjs +1976 -0
- package/bin/ark-mcp.mjs +84 -1495
- package/bin/ark-shared.mjs +34 -38
- package/bin/ark.mjs +33 -66
- package/bin/lib/adapter-contract.mjs +161 -9
- package/bin/lib/agent-gates.mjs +1 -0
- package/bin/lib/analysis-completeness.mjs +28 -0
- package/bin/lib/analysis-engine.mjs +8 -8
- package/bin/lib/analysis-policy.mjs +27 -0
- package/bin/lib/architecture-scan.mjs +70 -357
- package/bin/lib/auto-patch.mjs +76 -8
- package/bin/lib/ci-and-commands.mjs +1 -1
- package/bin/lib/codex-home.mjs +43 -16
- package/bin/lib/design-delta.mjs +4 -0
- package/bin/lib/doctor-advisories.mjs +4 -3
- package/bin/lib/doctor-plan.mjs +40 -41
- package/bin/lib/enforcement-state.mjs +2 -0
- package/bin/lib/github-enforcement.mjs +443 -0
- package/bin/lib/hook-templates.mjs +12 -148
- package/bin/lib/html-report-advisories.mjs +1 -1
- package/bin/lib/html-report-depth.mjs +9 -0
- package/bin/lib/html-report.mjs +5 -5
- package/bin/lib/install-migrate.mjs +83 -79
- package/bin/lib/managed-upgrade.mjs +622 -0
- package/bin/lib/mcp-adoption.mjs +3 -1
- package/bin/lib/parse-health.mjs +6 -5
- package/bin/lib/port-proof.mjs +2 -2
- package/bin/lib/prepare-change.mjs +68 -38
- package/bin/lib/prepare-write.mjs +7 -1
- package/bin/lib/resident-doctor-client.mjs +55 -0
- package/bin/lib/resident-hook.mjs +247 -0
- package/bin/lib/resolved-candidate-facts.mjs +1160 -0
- package/bin/lib/scan-files.mjs +19 -6
- package/bin/lib/snippet-analysis.mjs +119 -0
- package/bin/lib/source-policy.mjs +24 -0
- package/bin/lib/typescript-host.mjs +15 -18
- package/bin/lib/unavailable-analysis.mjs +76 -0
- package/bin/lib/upgrade-command.mjs +115 -0
- package/bin/lib/weakest-link.mjs +21 -179
- package/bin/lib/write-path-capabilities.mjs +167 -16
- package/bin/lib/write-path-detect.mjs +3 -2
- package/dist/eslint/index.cjs +3 -3
- package/dist/eslint/index.d.ts +4 -1
- package/dist/eslint/index.js +3 -3
- package/dist/index.cjs +6 -6
- package/dist/index.d.ts +1111 -151
- package/dist/index.js +7 -7
- package/docs/agent-guide.md +106 -62
- package/docs/ai-gates.md +97 -16
- package/docs/configuration.md +3 -0
- package/docs/demos/01-write-gate-self-correction.md +2 -2
- package/docs/enthusiast/README.md +10 -10
- package/docs/enthusiast/how-to-gallery-starter.md +2 -2
- package/docs/enthusiast/reference-commands.md +18 -1
- package/docs/enthusiast/tutorial-first-project.md +2 -2
- package/docs/package-surface.md +98 -12
- package/docs/typescript-support.md +108 -37
- package/package.json +32 -4
- package/schemas/ark.analysis-result.schema.json +159 -2
- package/schemas/ark.design-delta.schema.json +1 -0
- package/schemas/ark.enforcement-state.schema.json +84 -0
- package/schemas/ark.resolved-candidate-facts.schema.json +1 -0
- package/server.json +2 -2
- package/templates/skills/ark-explore.md +5 -5
- package/templates/skills/ark-fix.md +1 -1
- package/templates/skills/ark-runtime.md +15 -8
- package/templates/skills/ark-upgrade.md +122 -182
- package/bin/lib/ai-velocity.mjs +0 -293
- package/bin/lib/graph-cycles.mjs +0 -6
- package/bin/lib/safety-diagnostics.mjs +0 -284
- package/bin/lib/ts-resolve.mjs +0 -228
- package/dist/configTypes-DAPvBqK6.d.cts +0 -61
- package/dist/eslint/index.d.cts +0 -146
- package/dist/index.d.cts +0 -986
package/CHANGELOG.md
CHANGED
|
@@ -1,9 +1,104 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
All notable changes to ArkGate (`arkgate`; formerly `ark-runtime-kernel`) are documented here
|
|
3
|
+
All notable changes to ArkGate (`arkgate`; formerly `ark-runtime-kernel`) are documented here or
|
|
4
|
+
in the immutable pre-2.0 archive linked below.
|
|
4
5
|
|
|
5
6
|
## Unreleased
|
|
6
7
|
|
|
8
|
+
## 3.8.1 — 2026-07-22
|
|
9
|
+
|
|
10
|
+
Corrective **patch** over 3.8.0. Closes silent fail-open on peerIsolation incomplete evidence,
|
|
11
|
+
improves pure-IR type-only and relative-`require` graph accuracy, and splits the Domain analysis
|
|
12
|
+
vocabulary pilot without changing public gate import paths. **No required config migration.**
|
|
13
|
+
Z09 / residual `RB-11` remain open for retained adoption and independent close.
|
|
14
|
+
|
|
15
|
+
### Fixed
|
|
16
|
+
|
|
17
|
+
- **peerIsolation fail-closed (S1):** when `peerIsolation: true` is configured, missing paths, no
|
|
18
|
+
slice folders, or unclassifiable slices **deny** (cannot prove same-slice). No silent fail-open.
|
|
19
|
+
Incomplete path evidence can surface new denials; that is intentional safety, not a config
|
|
20
|
+
migration.
|
|
21
|
+
- **Pure IR type-only named bindings (S5):** all-type lists (`import { type A }`,
|
|
22
|
+
`export { type A } from '…'`) are type-only for capability evidence; mixed lists and
|
|
23
|
+
default+named imports stay value.
|
|
24
|
+
- **Relative `require` edges (S4):** pure module graph emits dependency edges for relative
|
|
25
|
+
`require(...)` like relative import; package require remains capability evidence only.
|
|
26
|
+
|
|
27
|
+
### Changed
|
|
28
|
+
|
|
29
|
+
- **Plan-B god-module pilot:** split `src/domain/analysis.ts` by concern into a DomainModel pilot
|
|
30
|
+
cluster — Analysis IR + facade in `analysis.ts`; `stableHash.ts`; `resolvedCandidateFactsTypes.ts`;
|
|
31
|
+
create/load in `resolvedCandidateFacts.ts`; import-free `resolvedCandidateFactsSchema.ts` for
|
|
32
|
+
`generate:cli-pure`. Public root/gate import paths unchanged. Judgment-only hygiene; no contract
|
|
33
|
+
or gate weakening.
|
|
34
|
+
|
|
35
|
+
### Documentation
|
|
36
|
+
|
|
37
|
+
- **Queue hygiene:** Phase Z engineering slices remain closed in 3.8.0+; `Z09` is a parked claim
|
|
38
|
+
gate (residual `RB-11` = retained adoption + independent close only). No engineering `doing`.
|
|
39
|
+
Y06/Y09 stay parked; Y07 low priority; Y10 archived until field demand + ADR; K01 runtime-only.
|
|
40
|
+
After the analysis pilot, self-hosted design-weak residual is package barrel `src/index.ts`
|
|
41
|
+
only (plan-B judgment; never mechanical-safe).
|
|
42
|
+
- **Pin honesty:** migration guide, claims matrix, and TS support pin current stable as
|
|
43
|
+
**arkgate@3.8.1** (not 3.7.0 / unpublished corrective).
|
|
44
|
+
|
|
45
|
+
## 3.8.0 — 2026-07-21
|
|
46
|
+
|
|
47
|
+
This corrective minor makes complete analysis fail closed, restores one resolved architecture
|
|
48
|
+
verdict across parity-capable adapters, hardens clean install and managed upgrade flows, and adds
|
|
49
|
+
an opt-in base-relative design-delta gate. **No required config migration.** Retained adoption and
|
|
50
|
+
independent close remain open under Z09, so this release does not claim Phase Z completion.
|
|
51
|
+
|
|
52
|
+
### Added
|
|
53
|
+
|
|
54
|
+
- **Z10:** add the opt-in base/candidate `domain-logic-in-ui` ratchet with hook/MCP/CLI parity and
|
|
55
|
+
fail-closed bases. Enforcement-state `1.1` adds runtime/operation proof for `hard`; assets and MCP
|
|
56
|
+
alone remain non-hard.
|
|
57
|
+
- **Analysis completeness (Z02):** CLI, MCP, hook, and public schema/type envelopes now carry
|
|
58
|
+
required `complete | partial | unavailable` evidence. Incomplete analysis cannot satisfy a
|
|
59
|
+
remediation goal; governed parse diagnostics fail `--strict-merge`, and a missing analysis host
|
|
60
|
+
exits `2` instead of producing a clean-looking plan.
|
|
61
|
+
- **Resolved candidate facts (Z04):** the stable root API now exposes a versioned, serializable
|
|
62
|
+
facts contract plus `analyzeResolvedProject` and `preflightResolvedChange`. Tooling resolves one
|
|
63
|
+
complete virtual create/update/delete candidate; the pure Kernel and generated CLI bundle
|
|
64
|
+
evaluate the same policy, resolver, facts, and tree identities.
|
|
65
|
+
- **Differential adapter corpus (Z04):** API, generated bundle, atomic preflight, CLI, MCP,
|
|
66
|
+
complete-patch hook, final strict check, and ESLint within its bounded envelope are compared over
|
|
67
|
+
relative and configured paths, packages/workspaces, symlinks, supported import forms,
|
|
68
|
+
unresolved/parse evidence, exclusions, unclassified paths, and create/update/delete batches.
|
|
69
|
+
- **Managed-content upgrade (Z06):** `ark upgrade` is now a read-only identity preview. Package
|
|
70
|
+
update/re-preview and managed-file application are separate confirmations; the latter requires
|
|
71
|
+
the preview's SHA-256 `planDigest`. `ark.managed.json` distinguishes current, stale, missing,
|
|
72
|
+
customized, and conflicted assets without touching unrelated source, similar files, or global
|
|
73
|
+
Codex state. Recorded deletions/conflicts require explicit consent.
|
|
74
|
+
- **Enforcement-state contract (Z06):** doctor JSON publishes schema-backed
|
|
75
|
+
`writePath.enforcementState` plus stable public TypeScript types and schema subpaths. Local write,
|
|
76
|
+
advisory MCP, and CI merge boundaries independently report supported, analyzed, configured,
|
|
77
|
+
installed, active, bypassable, required, and structured evidence values.
|
|
78
|
+
- **Packed managed-upgrade matrix (Z06):** all 11 supported hosts install and execute one
|
|
79
|
+
checksum-verified candidate tarball through 132 fail-closed journey stages in CI.
|
|
80
|
+
|
|
81
|
+
### Fixed
|
|
82
|
+
|
|
83
|
+
- **Packed TypeScript 7 analysis:** ArkGate now ships an exact, separately named TypeScript 6
|
|
84
|
+
JS-API host that package-manager deduplication cannot replace with TS7's version-only export.
|
|
85
|
+
The consumer's own TypeScript remains preferred when usable and its selected `tsc` is unchanged.
|
|
86
|
+
Packed Yarn cells record strict PnP for TS5/6 and the normal `node-modules` linker for native TS7.
|
|
87
|
+
- **One architecture verdict:** complete-candidate CLI/MCP/hook paths now consume resolved facts
|
|
88
|
+
instead of a compiler-free relative-only graph. A contract-allowed same-layer edge is no longer
|
|
89
|
+
rejected by AICodeGate's former path heuristic. Retained lexical/single-snippet compatibility
|
|
90
|
+
paths report `partial` and non-green, while legacy pre-Z04 cache snapshots are ignored until the
|
|
91
|
+
identity-keyed Z07 warm path is proven.
|
|
92
|
+
- **Required-status honesty:** workflow text records CI configuration only. Required merge status
|
|
93
|
+
remains `unverified` without opt-in provider evidence, which is read from the repository's
|
|
94
|
+
default branch rather than the caller's current branch.
|
|
95
|
+
|
|
96
|
+
### Changed
|
|
97
|
+
|
|
98
|
+
- The npm changelog retains complete 2.x/current-major notes and links pre-2.0 detail to the
|
|
99
|
+
immutable pre-Z06 canonical history, keeping the frozen package-size ceiling while preserving
|
|
100
|
+
later corrections to those historical notes.
|
|
101
|
+
|
|
7
102
|
## 3.7.0 — 2026-07-17
|
|
8
103
|
|
|
9
104
|
Phase Y turns field feedback into explicit decision memory, more honest design/parse advisories,
|
|
@@ -202,13 +297,15 @@ changes. **No gate weaken.**
|
|
|
202
297
|
globals (bare `process` covers `environment` too), surface-ownership dedup rule, and the
|
|
203
298
|
W02 governance-weight reconciliation. Backed by a 25-case executable fixture corpus
|
|
204
299
|
(`tests/fixtures/capability-corpus/`) with a content-aware structural guard.
|
|
205
|
-
- **Effect capabilities in the canonical analysis (U03):**
|
|
206
|
-
composes the existing symbol-aware collectors
|
|
207
|
-
precision; no second scanner); the Domain
|
|
208
|
-
`CAPABILITY_IDS` / `capabilityForModuleSpecifier` /
|
|
209
|
-
`lowerForbiddenGlobal
|
|
210
|
-
|
|
211
|
-
|
|
300
|
+
- **Effect capabilities in the canonical analysis (U03):** the internal
|
|
301
|
+
`collectCapabilityUses(ts, sourceFile)` composes the existing symbol-aware collectors
|
|
302
|
+
(shadowing / type-only / `globalThis`-alias precision; no second scanner); the internal Domain
|
|
303
|
+
vocabulary is `CAPABILITY_IDS` / `capabilityForModuleSpecifier` /
|
|
304
|
+
`capabilityForAmbientName` / `lowerForbiddenGlobal`. These names were never root `arkgate`
|
|
305
|
+
exports. The supported public surface is `analyzeProject(...).ir.capabilityUses`, populated
|
|
306
|
+
with import-based evidence by the compiler-free IR engine (exact module/subpath matching —
|
|
307
|
+
never substring; textual `import type` / `export type` erasure). Additive within IR `1.0`;
|
|
308
|
+
evidence only.
|
|
212
309
|
|
|
213
310
|
### Changed
|
|
214
311
|
|
|
@@ -217,7 +314,7 @@ changes. **No gate weaken.**
|
|
|
217
314
|
`src/domain/configTypes.ts` — zero consumer import changes, byte-identical generated
|
|
218
315
|
config artifacts, identical hashes and verdicts (verified by execution old-vs-new). ArkGate's
|
|
219
316
|
own doctor now reports **zero design smells** on this repository.
|
|
220
|
-
- The experimental `@arkgate/runtime` distribution is minified with `keepNames` (stable
|
|
317
|
+
- The experimental `@arkgate/runtime` built distribution artifact is minified with `keepNames` (stable
|
|
221
318
|
class/function names for reflection and Nest diagnostics) and stays well inside its
|
|
222
319
|
release-artifact budget.
|
|
223
320
|
|
|
@@ -1134,7 +1231,7 @@ Templates under `templates/skills/` (and project `.grok/skills` copies) for at l
|
|
|
1134
1231
|
### Documentation
|
|
1135
1232
|
|
|
1136
1233
|
- **Migration guide** for the ~4.5k installs still on `ark-runtime-kernel`:
|
|
1137
|
-
[docs/migrate-from-ark-runtime-kernel.md](docs/migrate-from-ark-runtime-kernel.md)
|
|
1234
|
+
[docs/migrate-from-ark-runtime-kernel.md](https://github.com/pedroknigge/arkgate/blob/main/docs/migrate-from-ark-runtime-kernel.md)
|
|
1138
1235
|
+ README section *Upgrading from ark-runtime-kernel?*
|
|
1139
1236
|
- `/ark-upgrade` skill points rename-aware projects at `arkgate`.
|
|
1140
1237
|
|
|
@@ -1155,7 +1252,7 @@ Templates under `templates/skills/` (and project `.grok/skills` copies) for at l
|
|
|
1155
1252
|
|
|
1156
1253
|
### Migration
|
|
1157
1254
|
|
|
1158
|
-
Full guide: [docs/migrate-from-ark-runtime-kernel.md](docs/migrate-from-ark-runtime-kernel.md).
|
|
1255
|
+
Full guide: [docs/migrate-from-ark-runtime-kernel.md](https://github.com/pedroknigge/arkgate/blob/main/docs/migrate-from-ark-runtime-kernel.md).
|
|
1159
1256
|
|
|
1160
1257
|
```bash
|
|
1161
1258
|
npm uninstall ark-runtime-kernel && npm install -D arkgate
|
|
@@ -1250,1138 +1347,9 @@ are **retained** to avoid surprising consumers. Upgrade with `npx ark upgrade`.
|
|
|
1250
1347
|
- The intermittent CI "onTaskUpdate" vitest flake is fixed (single-fork test run).
|
|
1251
1348
|
- Field matrix harness (not shipped in the package): `../beta-field-test/run-matrix.mjs`.
|
|
1252
1349
|
|
|
1253
|
-
## 1.19.0
|
|
1254
|
-
|
|
1255
|
-
Co-pilot Phase H — the safe apply loop (the `loop` primitive).
|
|
1256
|
-
|
|
1257
|
-
### Added
|
|
1258
|
-
|
|
1259
|
-
- **`/ark-loop` skill** — drives the remediation plan toward the goal, one step at a time, in a
|
|
1260
|
-
discardable git worktree: auto-applies only the changes Ark classed `mechanical-safe`
|
|
1261
|
-
(validating each with `ark-check` and rolling back any regression), PROPOSES the `judgment`
|
|
1262
|
-
ones for a human decision, and never weakens the gate. Loops until the goal is met or a round
|
|
1263
|
-
makes no progress, then reports what was auto-applied vs proposed vs deferred. Honors the
|
|
1264
|
-
principle: the agent edits, Ark validates — code only, never DB/schema. Installed for every
|
|
1265
|
-
detected agent CLI like the other `/ark-*` skills.
|
|
1266
|
-
- **`goal.met`** in `ark-check --plan --json` — the loop's termination signal (true when there
|
|
1267
|
-
are no active violations left). **Note (2.0.0):** `goal.met` was tightened to also require
|
|
1268
|
-
meaningful governed coverage — see 2.0 field-hardening above.
|
|
1269
|
-
|
|
1270
|
-
## 1.18.0 — 2026-07-08
|
|
1271
|
-
|
|
1272
|
-
Co-pilot Phase G — a guided front door for newcomers (`ark start`).
|
|
1273
|
-
|
|
1274
|
-
### Added
|
|
1275
|
-
|
|
1276
|
-
- **`ark start`** — one guided command that takes a newcomer from "I have a project" to
|
|
1277
|
-
"governed, with a plan," in plain language and without knowing any preset or skill name. It
|
|
1278
|
-
looks at the repo and describes the shape in everyday terms, sets up the config + agent/CI
|
|
1279
|
-
gates, and finishes with the classified plan (`safe to auto-fix` vs `your call`) plus plain
|
|
1280
|
-
next steps. On an established codebase (≥150 files) it adopts your real structure via
|
|
1281
|
-
detection instead of imposing a preset; on a fresh project it uses the recommended shape.
|
|
1282
|
-
Interactive by default; `--yes` runs non-interactively. It only orchestrates existing steps
|
|
1283
|
-
(recommend → init → `--plan`) and changes no source code. This is the co-pilot's guided-entry
|
|
1284
|
-
and plain-language layer (Phase G).
|
|
1285
|
-
|
|
1286
|
-
## 1.17.0 — 2026-07-08
|
|
1287
|
-
|
|
1288
|
-
Co-pilot Phase F — a classified remediation plan (the `plan` + `goal` primitives).
|
|
1289
|
-
|
|
1290
|
-
### Added
|
|
1291
|
-
|
|
1292
|
-
- **`ark-check --plan [--json]`** — reads your active violations and sorts each into
|
|
1293
|
-
`mechanical-safe` (behavior-preserving and gate-verifiable — safe for an agent to auto-apply),
|
|
1294
|
-
`judgment` (real coupling or a design choice — Ark proposes, you decide), or `deferred`, with a
|
|
1295
|
-
`confidence` and a plain-language `rationale`, ordered auto-first, wrapped in a `goal` block
|
|
1296
|
-
(active violations → 0 without weakening the contract). Report-only — it changes no files.
|
|
1297
|
-
This is the **plan** primitive of Ark's co-pilot; the coming worktree-safe apply-loop consumes
|
|
1298
|
-
it. The classifier (`classifyRemediation`) is shared in `ark-shared.mjs` so the CLI, the MCP
|
|
1299
|
-
gate, and the future loop classify identically. `--doctor` now points at it. The v1 classifier
|
|
1300
|
-
is biased toward `judgment` — only a provably-safe type-only import move earns `mechanical-safe`.
|
|
1301
|
-
|
|
1302
|
-
## 1.16.0 — 2026-07-08
|
|
1303
|
-
|
|
1304
|
-
One command to update Ark.
|
|
1305
|
-
|
|
1306
|
-
### Added
|
|
1307
|
-
|
|
1308
|
-
- **`ark upgrade`** (alias **`ark update`**) — a single command that replaces the multi-step
|
|
1309
|
-
update chain: bumps the package to `@latest` (via the detected package manager), refreshes
|
|
1310
|
-
gate templates + `/ark-*` skills (and Codex home prompts when `~/.codex` exists), migrates
|
|
1311
|
-
command runners to the project's package manager, and runs the strict architecture check.
|
|
1312
|
-
`--no-install` refreshes gates/skills against the installed version; `--no-strict` skips the
|
|
1313
|
-
final check. Each step reruns as a fresh process, so the refresh runs from the freshly
|
|
1314
|
-
installed version. The `/ark-upgrade` skill and README now point at it.
|
|
1315
|
-
|
|
1316
|
-
## 1.15.1 — 2026-07-08
|
|
1317
|
-
|
|
1318
|
-
Fix package-manager detection so a stray lockfile can't hijack a project's commands.
|
|
1319
|
-
|
|
1320
|
-
### Fixed
|
|
1321
|
-
|
|
1322
|
-
- **A leftover `pnpm-lock.yaml` (or `yarn.lock`) no longer hijacks an npm project.** Detection
|
|
1323
|
-
now honors the `package.json` `packageManager` field first, and on a lockfile conflict a
|
|
1324
|
-
present `package-lock.json` wins — because `npx` runs fine in a pnpm/yarn repo, but
|
|
1325
|
-
`pnpm exec` / `yarn` in an npm repo breaks (`ERR_PNPM_OUTDATED_LOCKFILE`,
|
|
1326
|
-
`ERR_PNPM_ABORTED_REMOVE_MODULES_DIR_NO_TTY`, a spurious pnpm lock). Previously any
|
|
1327
|
-
`pnpm-lock.yaml` was preferred over `package-lock.json`, so `--migrate-commands` rewrote the
|
|
1328
|
-
`check:architecture` script (and every emitted command) to `pnpm exec`, and `npm run
|
|
1329
|
-
check:architecture` then failed. All emitted commands, the CI workflow, the install hints,
|
|
1330
|
-
and the stale-runner advisory share the one detector.
|
|
1331
|
-
- **Multiple-lockfile warning.** `--install-agent-gates` and `--migrate-commands` now say which
|
|
1332
|
-
package manager they picked when more than one lockfile is present, and how to override it
|
|
1333
|
-
(set `packageManager`, or remove the stray lockfile).
|
|
1334
|
-
|
|
1335
|
-
## 1.15.0 — 2026-07-08
|
|
1336
|
-
|
|
1337
|
-
Brownfield install & onboarding hardening + layer `exclude` — from a real install session
|
|
1338
|
-
on a mature repo.
|
|
1339
|
-
|
|
1340
|
-
### Changed
|
|
1341
|
-
|
|
1342
|
-
- **No install lifecycle scripts.** Removed the `postinstall` banner (and `bin/ark-postinstall.mjs`).
|
|
1343
|
-
It was a pure `console.log`, but its mere presence tripped pnpm's build-script approval gate;
|
|
1344
|
-
in a hardened repo (blocked build scripts + `minimumReleaseAge`) that left `pnpm install` at
|
|
1345
|
-
exit 1 and could take down a dev server. Ark now installs with zero prompts and never runs code
|
|
1346
|
-
on install. The "run `ark init`" guidance lives in the README and npm page instead.
|
|
1347
|
-
- **`ark init` / `ark-check --recommend` route mature repos to adoption.** On an established
|
|
1348
|
-
codebase (≥150 source files) where a starter contract governs a thin slice, both now steer to
|
|
1349
|
-
`ark-check --recommend --write-plan` + `/ark-adopt` — which align the contract to the repo's
|
|
1350
|
-
real structure — instead of leaving a thin or false-red gate from aspirational DDD wildcards.
|
|
1351
|
-
|
|
1352
|
-
### Fixed
|
|
1353
|
-
|
|
1354
|
-
- **`ark --help` / `ark -h` / `ark help`** now print usage and exit 0 (a flag in the command
|
|
1355
|
-
position was reported as `Unknown command: --help`).
|
|
1356
|
-
- **Generated CI** enables corepack **before** `actions/setup-node`, so `cache: pnpm|yarn` can
|
|
1357
|
-
resolve the package manager on a fresh runner instead of failing.
|
|
1358
|
-
|
|
1359
|
-
### Added
|
|
1360
|
-
|
|
1361
|
-
- **Layer `exclude` globs.** A layer may declare `exclude: [...]` to carve subtrees out of a
|
|
1362
|
-
broad `patterns` glob. An excluded file is ungoverned by that layer — removed from its rules
|
|
1363
|
-
and `forbiddenGlobals` too. Resolved in the single `layerForFile` matcher shared by the
|
|
1364
|
-
ark-check CI gate and the ark-mcp write gate, so both classify identically. The wildcard
|
|
1365
|
-
starter presets (hexagonal, layered) now ship `"exclude": ["**/kernel/**"]` on every layer,
|
|
1366
|
-
so `src/**/domain/**` no longer mis-flags framework internals under `src/kernel/domain/`.
|
|
1367
|
-
- **`"./package.json"` export** — tooling can read the installed version without an exports error.
|
|
1368
|
-
|
|
1369
|
-
## 1.14.0 — 2026-07-07
|
|
1370
|
-
|
|
1371
|
-
Architect onboarding Phases A–E: enthusiast-first path from application shape to gated adoption.
|
|
1372
|
-
|
|
1373
|
-
### Added
|
|
1374
|
-
|
|
1375
|
-
- **`templates/architecture-playbook.json`** — ten tool-agnostic application archetypes.
|
|
1376
|
-
- **`ark-check --recommend`** (+ `--json`, **`--write-plan`** → `ark-adoption-plan.json`).
|
|
1377
|
-
- **`ark init` enthusiast wizard** and **`ark init --archetype <id> --yes`**.
|
|
1378
|
-
- **MCP `ark_recommend`**, skill **`/ark-architect`**, session-context enthusiast hint.
|
|
1379
|
-
- **Terminal UX**: doctor "New here?", fix-class / `enthusiastHint`, `--watch`, `--report --beginner`.
|
|
1380
|
-
- **Example gallery** (`examples/*-starter/`), comparative eval (30 prompts), nightly workflow, three public demo scripts.
|
|
1381
|
-
- **Enthusiast policy packs** — `ark-check --list-policy-packs`, `--apply-policy-pack enthusiast-<preset>`.
|
|
1382
|
-
- **Diátaxis enthusiast track** — `docs/enthusiast/`.
|
|
1383
|
-
|
|
1384
|
-
### Fixed
|
|
1385
|
-
|
|
1386
|
-
- **`collectRepoShapeSignals`** — skip unreadable directories instead of crashing `--recommend`.
|
|
1387
|
-
- **Policy pack ids** — reject path-like ids; only canonical `templates/policy-packs/` entries apply.
|
|
1388
|
-
|
|
1389
|
-
## 1.13.0 — 2026-07-06
|
|
1390
|
-
|
|
1391
|
-
### Added
|
|
1392
|
-
|
|
1393
|
-
- **`ark-check --doctor`** — one consolidated adoption health view: governed %, ungoverned
|
|
1394
|
-
directories, empty layers, weak rule coverage, the violation summary (value vs type-only +
|
|
1395
|
-
concentration verdict), installed gates, installed skills, baseline health, and stale command
|
|
1396
|
-
runners — each with the exact fix command, plus a ranked "Top actions" list. `--doctor --json`
|
|
1397
|
-
for tooling.
|
|
1398
|
-
- **Brownfield burn-down playbook** ([docs/brownfield-adoption.md](docs/brownfield-adoption.md))
|
|
1399
|
-
— the end-to-end sequence for a large pre-existing codebase (diagnose → classify → facade
|
|
1400
|
-
split → freeze only real debt → burn down), plus a matching `/ark-fix` fix class for
|
|
1401
|
-
relocating raw infrastructure access (SQL or a DB client imported into a route) **verbatim**
|
|
1402
|
-
into a repository/adapter — the value-import counterpart to the type-only inversion pattern.
|
|
1403
|
-
|
|
1404
|
-
### Changed
|
|
1405
|
-
|
|
1406
|
-
- `/ark-upgrade` now handles the pnpm `minimumReleaseAge` cooling-off: when a freshly-cut
|
|
1407
|
-
version is inside the window, add it to `minimumReleaseAgeExclude` before installing so a
|
|
1408
|
-
loose-mode `pnpm add` can't leave a lockfile that `--frozen-lockfile` (CI) rejects.
|
|
1409
|
-
|
|
1410
|
-
## 1.12.0 — 2026-07-06
|
|
1411
|
-
|
|
1412
|
-
Makes `ark.config.json` authoritative on BOTH gates, and closes the upgrade gap where the
|
|
1413
|
-
package-manager-aware commands didn't reach a repo's existing gate files.
|
|
1414
|
-
|
|
1415
|
-
### Changed
|
|
1416
|
-
|
|
1417
|
-
- **The AI write gate honors the contract over its infra heuristic.** A cross-layer import
|
|
1418
|
-
that resolves to a declared layer is now judged by the config's layer RULES — exactly like
|
|
1419
|
-
`ark-check` — so the write gate and CI can't disagree on a governed edge. An edge the
|
|
1420
|
-
contract allows (a route calling a repository, a repository importing the DB) is no longer
|
|
1421
|
-
blocked, and a denied edge is reported as `LAYER_IMPORT_VIOLATION`. The infrastructure
|
|
1422
|
-
path-heuristic (and `mayImportInfrastructure`) now applies only to **ungoverned** targets —
|
|
1423
|
-
external packages, or paths no declared layer covers. `ark-mcp` resolves the target layer
|
|
1424
|
-
from the config's layer globs + tsconfig path aliases (a barrel import is classified by its
|
|
1425
|
-
directory). Backward-compatible: with no resolver supplied, the gate's behavior is unchanged.
|
|
1426
|
-
|
|
1427
|
-
### Added
|
|
1428
|
-
|
|
1429
|
-
- **`ark-check --install-agent-gates --migrate-commands`** — rewrites only the Ark command
|
|
1430
|
-
runner (`npx` / `pnpm exec` / `yarn`) in existing gate files (`.claude/settings.json`,
|
|
1431
|
-
`.mcp.json`, `AGENTS.md`, rule files, the `check:architecture` script) to match the
|
|
1432
|
-
project's package manager, preserving every customization (no `--force` clobber). For repos
|
|
1433
|
-
that adopted Ark before its emitted commands became package-manager-aware. A normal
|
|
1434
|
-
`ark-check` now advises when a gate file's runner doesn't match the package manager, and
|
|
1435
|
-
`/ark-upgrade` runs the migration as part of its refresh flow.
|
|
1436
|
-
|
|
1437
|
-
## 1.11.0 — 2026-07-06
|
|
1438
|
-
|
|
1439
|
-
Sharpens Ark from "enforce a clean architecture" to **helping a team organize a messy,
|
|
1440
|
-
pre-existing codebase — without presenting a false-green.** The tool now reports what it
|
|
1441
|
-
actually governs, separates real debt from false positives, and guides the cleanup in order.
|
|
1442
|
-
|
|
1443
|
-
### Added
|
|
1444
|
-
|
|
1445
|
-
- **Package-manager-aware commands.** Every command Ark emits — the AGENTS.md contract,
|
|
1446
|
-
`.mcp.json`, the Claude/Codex hooks, the `check:architecture` script, the postinstall hints,
|
|
1447
|
-
the "install TypeScript" hint — now follows the project's package manager
|
|
1448
|
-
(`pnpm exec` / `yarn` / `npx`), not just the CI workflow. A pnpm/yarn repo is never handed
|
|
1449
|
-
an `npx` instruction.
|
|
1450
|
-
- **Honest coverage + layer proposals.** `ark-check --coverage` leads with `Governed: N%`,
|
|
1451
|
-
warns loudly when Ark governs a minority of the tree, and proposes a canonical layer for
|
|
1452
|
-
each ungoverned directory (harvested from the 11-layer profile and the named presets;
|
|
1453
|
-
unrecognized directories are flagged, never guessed). `--init` prints the same proposals.
|
|
1454
|
-
New additive `governed` and `suggestions` fields in `--coverage --json`.
|
|
1455
|
-
- **Violation diagnosis.** `ark-check` groups violations by layer edge and target subtree,
|
|
1456
|
-
ranked (the burn-down order), with a concentration verdict. New additive `summary` field in
|
|
1457
|
-
the check `--json`.
|
|
1458
|
-
- **Type-only vs value violations.** Each `LAYER_IMPORT_VIOLATION` is tagged `typeOnly`
|
|
1459
|
-
(via the TypeScript AST); the summary splits `valueCount` (real runtime coupling) from
|
|
1460
|
-
`typeOnlyCount` (type placement), so a burn-down attacks real coupling first.
|
|
1461
|
-
- **`/ark-*` skills reoriented to organize** around the "protect the border around a
|
|
1462
|
-
framework, not its internals" principle: the facade split (surface/internals + re-export
|
|
1463
|
-
barrel) in `/ark-contract`, the type-only inversion pattern in `/ark-fix`, and honest
|
|
1464
|
-
coverage in `/ark-coverage` and `/ark-explain`.
|
|
1465
|
-
|
|
1466
|
-
### Changed
|
|
1467
|
-
|
|
1468
|
-
- **`--update-baseline` refuses a lopsided freeze.** When a single edge dominates the
|
|
1469
|
-
violations (a likely contract bug, not debt), the freeze is refused with a diagnosis and a
|
|
1470
|
-
pointer to the fix, unless `--force` is passed — so adoption can't bury a wrong contract as
|
|
1471
|
-
frozen "debt".
|
|
1472
|
-
- **Overlapping layer globs resolve by most-specific pattern**, not declaration order, so a
|
|
1473
|
-
facade split (`kernel/app/**` as a public surface over a `kernel/**` catch-all) resolves
|
|
1474
|
-
correctly regardless of layer order. A new `CONFIG_AMBIGUOUS_LAYERS` warning flags genuine
|
|
1475
|
-
equal-specificity overlaps.
|
|
1476
|
-
|
|
1477
|
-
### Fixed
|
|
1478
|
-
|
|
1479
|
-
- **Scan cache invalidates when the cached shape changes** (schema tag v1 → v2). A warm cache
|
|
1480
|
-
written by an older Ark was reused by the new binary, so `typeOnly` reported false for every
|
|
1481
|
-
violation after an upgrade until files changed; the cache now invalidates exactly once on
|
|
1482
|
-
upgrade and re-populates.
|
|
1483
|
-
|
|
1484
|
-
## 1.10.1 — 2026-07-06
|
|
1485
|
-
|
|
1486
|
-
### Fixed — Codex MCP wiring
|
|
1487
|
-
|
|
1488
|
-
- `ark-check --install-agent-gates` now auto-merges the `[mcp_servers.ark]` table into
|
|
1489
|
-
Codex's `$CODEX_HOME/config.toml` (default `~/.codex/config.toml`) whenever Codex is a
|
|
1490
|
-
target (`--tools codex` or `--codex-home`), so `ark://manifest` and the AI write gate are
|
|
1491
|
-
live from the first edit. Previously Codex only received a copy-me sample at
|
|
1492
|
-
`docs/ark-codex-config.toml` — unlike Claude and Cursor, which got machine-readable
|
|
1493
|
-
registrations — so an agent that never hand-merged it fell back to the static
|
|
1494
|
-
`ark.config.json` and the MCP server never started. The merge is idempotent (an existing
|
|
1495
|
-
`ark` table is left untouched unless `--force` replaces it) and preserves other tables.
|
|
1496
|
-
- The Codex `[mcp_servers.ark]` block now uses **absolute** `--root`/`--config` paths
|
|
1497
|
-
(properly escaped for TOML). Because `config.toml` is a global file loaded without the
|
|
1498
|
-
project as the working directory, a relative `--root .` would resolve against Codex's
|
|
1499
|
-
launch directory — this also fixes projects whose path contains spaces. The install
|
|
1500
|
-
output now states the required Codex restart and the expected result (`ark://manifest`
|
|
1501
|
-
plus the `validate_code`, `ark_check`, `ark_coverage`, `ark_place` tools).
|
|
1502
|
-
|
|
1503
|
-
## 1.10.0 — 2026-07-06
|
|
1504
|
-
|
|
1505
|
-
### Added — GitHub-first release hardening
|
|
1506
|
-
|
|
1507
|
-
- Added a manual `Publish npm` GitHub workflow that verifies a signed annotated
|
|
1508
|
-
`vX.Y.Z` tag, requires the GitHub Release to exist first, runs the full release
|
|
1509
|
-
verification suite, publishes to npm with provenance, and uploads the npm tarball
|
|
1510
|
-
SHA-256 checksum back to the GitHub Release.
|
|
1511
|
-
- Added `scripts/verify-release-tag.mjs` so release automation fails before npm when
|
|
1512
|
-
the tag does not match `package.json` or is not annotated; signed-tag enforcement can
|
|
1513
|
-
be enabled with `ARK_REQUIRE_SIGNED_RELEASE_TAG=true` once release signing is configured.
|
|
1514
|
-
- Local `npm run release:npm` now defaults to dry-run/local verification. Real local
|
|
1515
|
-
publish requires `--allow-local`; the normal release path is GitHub Actions provenance.
|
|
1516
|
-
|
|
1517
|
-
### Added — security scanning gates
|
|
1518
|
-
|
|
1519
|
-
- Added a dedicated `Security` workflow with CodeQL, Dependabot dependency review on
|
|
1520
|
-
pull requests, and Semgrep CE scanning on push, PR, schedule, and manual dispatch.
|
|
1521
|
-
- Fixed the CodeQL alerts surfaced by that workflow: removed vulnerable built-in regex
|
|
1522
|
-
heuristics from the AI write gate and replaced shell-interpolated pack test commands
|
|
1523
|
-
with argument-vector process execution.
|
|
1524
|
-
|
|
1525
|
-
### Added — runtime profile from `ark.config.json`
|
|
1526
|
-
|
|
1527
|
-
- Added `createArchitectureProfileFromArkConfig` plus `createArkKernelFromConfig`,
|
|
1528
|
-
`createStrictArkKernelFromConfig`, and `createLenientArkKernelFromConfig` so runtime
|
|
1529
|
-
observed layer-flow enforcement can use the same layer prefixes and rules as the
|
|
1530
|
-
static architecture gate.
|
|
1531
|
-
- `ArchitectureLayerConfig.intentPrefixes` is now optional in the public type, matching
|
|
1532
|
-
real Ark configs where file-only layers do not participate in runtime intent naming.
|
|
1533
|
-
|
|
1534
|
-
### Changed — packaging polish
|
|
1535
|
-
|
|
1536
|
-
- Repositioned package metadata and README around Ark as an AI architecture gate for
|
|
1537
|
-
TypeScript, with the runtime presented as optional.
|
|
1538
|
-
- Removed the CJS build warning for the ESLint subpath while preserving its existing
|
|
1539
|
-
default and named exports.
|
|
1540
|
-
|
|
1541
|
-
## 1.9.1 — 2026-07-06
|
|
1542
|
-
|
|
1543
|
-
### Fixed — custom CI workflows count as installed gates
|
|
1544
|
-
|
|
1545
|
-
- `ark-check --require-gates` no longer requires the generated workflow filename
|
|
1546
|
-
`.github/workflows/ark-check.yml`. It now accepts any GitHub Actions workflow that
|
|
1547
|
-
runs `ark-check` or the `check:architecture` npm script, so projects can keep their
|
|
1548
|
-
existing `ci.yml` while still enforcing gate presence.
|
|
1549
|
-
|
|
1550
|
-
### Added — security policy and runtime audit gate
|
|
1551
|
-
|
|
1552
|
-
- Added `SECURITY.md` with private vulnerability reporting guidance and release
|
|
1553
|
-
verification notes.
|
|
1554
|
-
- Added `npm run security:audit`, currently scoped to the published/runtime surface via
|
|
1555
|
-
`npm audit --omit=dev --audit-level=high`, and wired it into CI.
|
|
1556
|
-
|
|
1557
|
-
### Changed — public roadmap and npm package contents
|
|
1558
|
-
|
|
1559
|
-
- Reworked `ROADMAP.md` into a public `Now / Next / Later` roadmap focused on Ark as an
|
|
1560
|
-
AI architecture gate for TypeScript.
|
|
1561
|
-
- Narrowed the npm `files` list for docs so internal planning notes cannot be packed
|
|
1562
|
-
accidentally, while explicitly including `SECURITY.md`.
|
|
1563
|
-
|
|
1564
|
-
## 1.9.0 — 2026-07-05
|
|
1565
|
-
|
|
1566
|
-
### Added — read-side MCP tools for AI agents
|
|
1567
|
-
|
|
1568
|
-
The MCP server (`ark-mcp`) now exposes three read-side tools alongside `validate_code`,
|
|
1569
|
-
so an agent can query the contract instead of shelling out and parsing:
|
|
1570
|
-
|
|
1571
|
-
- **`ark_place`** — given a target file path, returns its layer, forbidden globals, and
|
|
1572
|
-
which layers it may / must not import. Call it before writing a new file so generated
|
|
1573
|
-
code lands in a governed location. Computed in-process from the contract.
|
|
1574
|
-
- **`ark_check`** — the full architecture check as structured JSON (baseline-aware; a
|
|
1575
|
-
`strict` argument toggles config-warning failures).
|
|
1576
|
-
- **`ark_coverage`** — per-layer file counts, the full list of unclassified (ungoverned)
|
|
1577
|
-
files, layers whose patterns match nothing, and layers with no rule edge.
|
|
1578
|
-
|
|
1579
|
-
`ark_check` and `ark_coverage` reuse the canonical `ark-check` engine (no duplicated
|
|
1580
|
-
logic). Tools appear in the agent's tool list automatically — no skill or doc-reading
|
|
1581
|
-
needed. `/ark-place` and `/ark-coverage` skills now reference the tools (with a CLI fallback).
|
|
1582
|
-
|
|
1583
|
-
### Added — `ark-check --coverage`
|
|
1584
|
-
|
|
1585
|
-
New report mode: per-layer matched-file counts plus the **full** unclassified-file list
|
|
1586
|
-
(vs the 5-sample cap on the config warning), `emptyLayers` (patterns matching nothing),
|
|
1587
|
-
and `layersWithoutRules`. Human-readable, or `--json`. Report-only — always exits 0.
|
|
1588
|
-
|
|
1589
|
-
### Added — monorepo-aware `ark init`
|
|
1590
|
-
|
|
1591
|
-
`ark init` now auto-detects workspace monorepos (npm/yarn/bun `workspaces` and
|
|
1592
|
-
`pnpm-workspace.yaml`) and writes a cross-package profile anchored at the real workspace
|
|
1593
|
-
roots, instead of the `src/**` 11-layer starter that matches nothing in a monorepo. A
|
|
1594
|
-
new `--preset monorepo` does the same explicitly; its layer patterns match by directory
|
|
1595
|
-
name in any package (`**/domain/**`, …).
|
|
1596
|
-
|
|
1597
|
-
### Added — three more agent gates
|
|
1598
|
-
|
|
1599
|
-
`--install-agent-gates` now knows **Roo Code** (`.roo/rules/ark.md`), **Continue**
|
|
1600
|
-
(`.continue/rules/ark.md`), and **Gemini CLI** (`GEMINI.md`), auto-detected from their
|
|
1601
|
-
config dirs — instruction-tier rule files derived from the same contract. `ark init`
|
|
1602
|
-
gained a `--tools` passthrough, and gate installation now prints which tools it targeted
|
|
1603
|
-
and why (detected / from --tools / default).
|
|
1604
|
-
|
|
1605
|
-
### Added — ESLint flat-config recipe
|
|
1606
|
-
|
|
1607
|
-
`docs/ai-gates.md` now documents `ark.configs.recommended` plus a domain-scoped block for
|
|
1608
|
-
`ark/no-forbidden-globals` (which `recommended` deliberately omits, since it needs
|
|
1609
|
-
per-path scoping).
|
|
1610
|
-
|
|
1611
|
-
## 1.8.3 — 2026-07-05
|
|
1612
|
-
|
|
1613
|
-
### Fixed — Codex-home refresh guidance no longer clobbers customized gate files
|
|
1614
|
-
|
|
1615
|
-
- 1.8.2's stale-skill advisory and the `/ark-upgrade` skill recommended
|
|
1616
|
-
`--install-agent-gates --codex-home --force`. Without `--skills-only`, that `--force`
|
|
1617
|
-
also rewrites customized gate files (AGENTS.md, CI workflow, settings, rules) — the exact
|
|
1618
|
-
clobbering `--skills-only` exists to prevent. Both now recommend
|
|
1619
|
-
`--install-agent-gates --skills-only --codex-home --force`, which refreshes the repo skills
|
|
1620
|
-
and the Codex-home prompts while leaving customized gate files untouched. The flag behavior
|
|
1621
|
-
is unchanged; only the recommended command (and skill guidance) is corrected.
|
|
1622
|
-
|
|
1623
|
-
## 1.8.2 — 2026-07-05
|
|
1624
|
-
|
|
1625
|
-
### Added — refresh `/ark-*` skills in the Codex home dir
|
|
1626
|
-
|
|
1627
|
-
- Codex loads slash-command prompts from `$CODEX_HOME/prompts` (`~/.codex/prompts`), not the
|
|
1628
|
-
repo, so a repo refresh never updated them and they silently drifted behind. New:
|
|
1629
|
-
`ark-check --install-agent-gates --codex-home` writes the skills there directly (works even
|
|
1630
|
-
when the repo has no `.codex/`), and a normal `ark-check` now flags stale/missing skills in
|
|
1631
|
-
the Codex home dir by their `arkVersion` stamp — but only when copies already exist, so it
|
|
1632
|
-
never introduces Codex to someone who doesn't use it. `--json` gains `codexHomeGap`.
|
|
1633
|
-
|
|
1634
|
-
### Improved — richer, clearer HTML report
|
|
1635
|
-
|
|
1636
|
-
- `--report` was reworked: layers are ordered innermost → outermost with a **purpose** column
|
|
1637
|
-
and per-layer tags; a readable **dependency-direction** view (what each layer may import)
|
|
1638
|
-
sits above the precise matrix (now in a collapsible `<details>`); violations are grouped by
|
|
1639
|
-
rule with a fix hint each; enforcement points name the file they found; and a stats band and
|
|
1640
|
-
footer show layer/rule counts, gate coverage, the Ark version, and the config path.
|
|
1641
|
-
- Layers accept an optional `"description"` in `ark.config.json`, surfaced as the report's
|
|
1642
|
-
purpose column. The named presets seed sensible descriptions so `ark init --preset` produces
|
|
1643
|
-
a self-documenting config.
|
|
1644
|
-
- After writing a report, ark-check reminds you to add it to `.gitignore` (only when a
|
|
1645
|
-
`.gitignore` exists and doesn't already list it) — it's a generated artifact.
|
|
1646
|
-
|
|
1647
|
-
### Docs — architectural security invariants
|
|
1648
|
-
|
|
1649
|
-
- New README section on using layer rules + `forbiddenGlobals` to enforce security invariants
|
|
1650
|
-
that are architectural (confining secret/env access, outbound network, and weak randomness to
|
|
1651
|
-
the right layers) — without pretending to be a security scanner.
|
|
1652
|
-
|
|
1653
|
-
## 1.8.1 — 2026-07-05
|
|
1654
|
-
|
|
1655
|
-
### Changed — tighter `/ark-*` skill descriptions
|
|
1656
|
-
|
|
1657
|
-
- The eight skill descriptions were trimmed (~30 → ~20 words each), leading with the
|
|
1658
|
-
skill's key concept. Skill descriptions load into an agent's context budget; on
|
|
1659
|
-
hosts with many installed skills the longer descriptions could push some skills out
|
|
1660
|
-
of the model-visible list. Behavior is unchanged — only the frontmatter descriptions.
|
|
1661
|
-
Refresh installed copies with `npx ark-check --install-agent-gates --skills-only --force`.
|
|
1662
|
-
|
|
1663
|
-
## 1.8.0 — 2026-07-05
|
|
1664
|
-
|
|
1665
|
-
### Added — circular dependency detection
|
|
1666
|
-
|
|
1667
|
-
- `ark-check` now reports `CIRCULAR_DEPENDENCY`: files that transitively import each
|
|
1668
|
-
other. The check runs over the import graph Ark already resolves, so it costs
|
|
1669
|
-
almost nothing. One violation per cycle (anchored at the alphabetically-first
|
|
1670
|
-
member, so the baseline key is stable), with a fix hint. Cycles participate in the
|
|
1671
|
-
`--baseline` ratchet like every other rule and appear in the HTML report.
|
|
1672
|
-
|
|
1673
|
-
### Added — named architecture presets
|
|
1674
|
-
|
|
1675
|
-
- `ark init --preset hexagonal|layered|feature-sliced` writes a canonical
|
|
1676
|
-
`ark.config.json` for a known architecture instead of relying on directory
|
|
1677
|
-
detection. Globs use `**` so they fit flat (`src/domain/**`) and modular
|
|
1678
|
-
(`src/modules/x/domain/**`) layouts; every layer is `optional`, so the strict check
|
|
1679
|
-
passes on a greenfield repo and each layer switches on as its directory gains files.
|
|
1680
|
-
`hexagonal` inverts the domain→persistence dependency; `layered` is a relaxed n-tier
|
|
1681
|
-
stack; `feature-sliced` is the FSD import ladder.
|
|
1682
|
-
|
|
1683
|
-
### Added — HTML architecture report
|
|
1684
|
-
|
|
1685
|
-
- `ark-check --report [file.html]` writes a self-contained HTML report (no external
|
|
1686
|
-
assets, works offline, light/dark): the layer map with a real example file per
|
|
1687
|
-
layer, a who-may-import-whom matrix, current violations with fix hints, and which
|
|
1688
|
-
gates are live. A shareable artifact for PRs and onboarding.
|
|
1689
|
-
|
|
1690
|
-
### Added — agent-behavior eval harness
|
|
1691
|
-
|
|
1692
|
-
- `eval/` (dev-only, not shipped in the npm package): runs a live coding agent against
|
|
1693
|
-
seeded architecture violations using Ark's own gate messages, and grades whether the
|
|
1694
|
-
agent resolves the violation *without weakening the contract* (editing config,
|
|
1695
|
-
baseline, CI, or deleting the feature counts as a failure). Run with
|
|
1696
|
-
`npm run eval:agent`.
|
|
1697
|
-
|
|
1698
|
-
## 1.7.6 — 2026-07-05
|
|
1699
|
-
|
|
1700
|
-
_From downstream consumer feedback after a real upgrade + CI-failure session._
|
|
1701
|
-
|
|
1702
|
-
### Changed — generated CI follows the project's Node version
|
|
1703
|
-
|
|
1704
|
-
- The generated GitHub workflow hard-coded `node-version: 20`. If a developer's
|
|
1705
|
-
local npm is newer than the npm that Node ships (e.g. Node 24 / npm 11), CI's
|
|
1706
|
-
`npm ci` fails with "missing from lock file" — the lockfile was written by a
|
|
1707
|
-
newer npm — a red CI unrelated to architecture that blocks the gate before
|
|
1708
|
-
`ark-check` even runs. The workflow now picks the Node version in order:
|
|
1709
|
-
`node-version-file: .nvmrc`/`.node-version` when the project pins one (CI locks
|
|
1710
|
-
to the dev's exact toolchain), else the major from `package.json` `engines.node`,
|
|
1711
|
-
else a current-LTS default (bumped `20` → `22`; defaulting high avoids the
|
|
1712
|
-
"CI npm older than the lockfile" class). Survives regeneration like `--baseline`.
|
|
1713
|
-
|
|
1714
|
-
### Changed — CI steps are named so install failures read correctly
|
|
1715
|
-
|
|
1716
|
-
- The generated workflow's steps were unnamed, so an `npm ci` failure surfaced
|
|
1717
|
-
under the "Ark architecture gate" job with no clear cause — it looked like an
|
|
1718
|
-
architecture violation when it was a dependency/lockfile problem. Steps are now
|
|
1719
|
-
named (`Checkout`, `Setup Node`, `Install dependencies`, `Ark architecture
|
|
1720
|
-
check`), so a red lands on `Install dependencies` and points at the real cause.
|
|
1721
|
-
|
|
1722
|
-
### Changed — `--install-agent-gates` says WHY a skill was skipped
|
|
1723
|
-
|
|
1724
|
-
- A skipped skill printed a bare `skipped <path>`, indistinguishable from "up to
|
|
1725
|
-
date". Skipped skills are now annotated `(up to date)` or `(stale: <old> <
|
|
1726
|
-
<current>)`, and a trailing note gives the exact safe refresh command
|
|
1727
|
-
(`--install-agent-gates --skills-only --force`) — so the user isn't left
|
|
1728
|
-
guessing or reaching for a bare `--force` that would clobber customized gates.
|
|
1729
|
-
|
|
1730
|
-
## 1.7.5 — 2026-07-05
|
|
1731
|
-
|
|
1732
|
-
### Added — outdated-skill detection (version-stamped skills)
|
|
1733
|
-
|
|
1734
|
-
- `--install-agent-gates` now stamps each installed `/ark-*` skill with an
|
|
1735
|
-
`arkVersion:` line in its frontmatter. A normal `ark-check` run then flags
|
|
1736
|
-
skills left behind by an older Ark (stamp behind the current version, or no
|
|
1737
|
-
stamp at all) and points at the refresh command below — distinct from the
|
|
1738
|
-
"not installed" notice, which uses a plain install. The stamp moves with the
|
|
1739
|
-
package, so editing a skill's body does not make it look outdated; only a
|
|
1740
|
-
version gap does. `--json` `skillGaps` entries now carry `{ tool, missing, stale }`.
|
|
1741
|
-
- New `--skills-only` flag for `--install-agent-gates`: restricts the write to
|
|
1742
|
-
just the canonical `/ark-*` skills, so `--install-agent-gates --skills-only
|
|
1743
|
-
--force` refreshes skills to the current version WITHOUT overwriting a
|
|
1744
|
-
customized `AGENTS.md`, `.claude/settings.json`, or CI workflow — which a bare
|
|
1745
|
-
`--force` clobbers with the generic templates. The stale-skill notice and
|
|
1746
|
-
`/ark-upgrade` now recommend this scoped command.
|
|
1747
|
-
|
|
1748
|
-
### Changed — /ark-contract verifies a file move before recommending it
|
|
1749
|
-
|
|
1750
|
-
- `/ark-contract` could suggest moving a file to a more fitting layer (e.g. an
|
|
1751
|
-
HTTP client into an integration layer) without checking that the file's own
|
|
1752
|
-
imports are legal there. If the file also imports a layer the target may not
|
|
1753
|
-
(a client that reads a persistence-layer cache, `Integration → Persistence`
|
|
1754
|
-
denied), the "clean config change" actually breaks the contract. The skill now
|
|
1755
|
-
resolves the file's imports against the target layer's rules first and, when
|
|
1756
|
-
they don't fit, reports it as a refactor (split the file), not a config edit.
|
|
1757
|
-
|
|
1758
|
-
### Fixed — regenerating CI keeps `--baseline`
|
|
1759
|
-
|
|
1760
|
-
- The generated GitHub workflow (and the `--require-gates` command it runs)
|
|
1761
|
-
hard-coded `--strict-config --require-gates`. Re-running `--install-agent-gates
|
|
1762
|
-
--force` on a project that had added `--baseline .ark-baseline.json` silently
|
|
1763
|
-
dropped the flag, so CI would start failing on frozen violations instead of
|
|
1764
|
-
ratcheting. The workflow now includes `--baseline .ark-baseline.json` whenever
|
|
1765
|
-
the project has a baseline file, so regeneration preserves the ratchet.
|
|
1766
|
-
|
|
1767
|
-
## 1.7.4 — 2026-07-05
|
|
1768
|
-
|
|
1769
|
-
### Fixed — `include` accepts single files, not just directories
|
|
1770
|
-
|
|
1771
|
-
- `ark-check` walked every `include` entry with `scandir`, so listing a
|
|
1772
|
-
root-level source file (e.g. Next.js `middleware.ts`, `instrumentation.ts`)
|
|
1773
|
-
crashed with `ENOTDIR: not a directory`. `walk()` now governs a file entry
|
|
1774
|
-
directly (subject to the same source-extension filter) and still recurses into
|
|
1775
|
-
directory entries. This makes `/ark-coverage`'s "govern middleware.ts"
|
|
1776
|
-
recommendation actually applicable.
|
|
1777
|
-
|
|
1778
|
-
### Changed — skill polish
|
|
1779
|
-
|
|
1780
|
-
- `/ark-coverage` now instructs reading files with the Read tool and targeted
|
|
1781
|
-
commands instead of `cat`-ing whole configs to the terminal, so the audit run
|
|
1782
|
-
stays readable.
|
|
1783
|
-
- `/ark-place` and `/ark-contract` document their no-argument path: when invoked
|
|
1784
|
-
with nothing to place / no change described, print the placement map or the
|
|
1785
|
-
contract snapshot + evolution options (derived from the live config) and ask,
|
|
1786
|
-
instead of erroring or guessing. Makes the helpful behavior guaranteed, not
|
|
1787
|
-
emergent.
|
|
1788
|
-
|
|
1789
|
-
## 1.7.3 — 2026-07-05
|
|
1790
|
-
|
|
1791
|
-
### Fixed — /ark-upgrade now checks the registry, and the package ships its CHANGELOG
|
|
1792
|
-
|
|
1793
|
-
- The `/ark-upgrade` skill only read the version already in `node_modules`, so a
|
|
1794
|
-
repo with a pinned lockfile reported "no update available" while a newer
|
|
1795
|
-
version was published. It now checks `npm view ark-runtime-kernel version`,
|
|
1796
|
-
updates the dependency (`npm install -D …@latest` or the project's package
|
|
1797
|
-
manager) so the lockfile moves too, and still refreshes gates/skills when
|
|
1798
|
-
already on the latest (a prior version may have shipped skills the repo never
|
|
1799
|
-
installed).
|
|
1800
|
-
- `CHANGELOG.md` is now included in the published package (`files`). The
|
|
1801
|
-
`/ark-upgrade` changelog-triage step referenced it, but it wasn't shipped, so
|
|
1802
|
-
consumers had to `npm pack` and diff tarballs to see what changed. The skill
|
|
1803
|
-
falls back to `npm view` / GitHub release notes if an older release is missing it.
|
|
1804
|
-
|
|
1805
|
-
## 1.7.2 — 2026-07-05
|
|
1806
|
-
|
|
1807
|
-
### Changed — blocked infra imports point at the exemption
|
|
1808
|
-
|
|
1809
|
-
- When the write-gate blocks an infrastructure import and the file has a known
|
|
1810
|
-
layer, the fix hint now names the escape hatch: mark the layer in
|
|
1811
|
-
`ark.config.json` with `"mayImportInfrastructure": true` (or name it with an
|
|
1812
|
-
infra token). Previously the message only said "remove the import", so a
|
|
1813
|
-
legitimately-infra layer with an unconventional name looked like a hard block
|
|
1814
|
-
and required reading internals to discover the exemption. Zero-config
|
|
1815
|
-
projects (no layer context) keep the plain hint — the flag doesn't apply there.
|
|
1816
|
-
- The PreToolUse hook (`ark-mcp --hook`) now prints the gate's fix hints under a
|
|
1817
|
-
`fix:` block. It was building the block message from the rule id and message
|
|
1818
|
-
only, silently dropping every `suggestion` — so the port/adapter guidance and
|
|
1819
|
-
the new infra-layer escape hatch never reached the agent. Hints are deduped.
|
|
1820
|
-
|
|
1821
|
-
### Added — `ark-check` surfaces uninstalled skills
|
|
1822
|
-
|
|
1823
|
-
- A normal `ark-check` run now advises when a project that has adopted Ark agent
|
|
1824
|
-
gates (`AGENTS.md` present) is missing `/ark-*` skills this version ships for a
|
|
1825
|
-
detected tool (`.claude/`, `.cursor/`, `.codex/`, `.windsurf/`, `.clinerules/`),
|
|
1826
|
-
pointing at `--install-agent-gates`. The `--json` output gains a `skillGaps`
|
|
1827
|
-
field. Rationale: the postinstall message was the only discovery path for new
|
|
1828
|
-
skills, and modern npm blocks postinstall scripts by default — so the most
|
|
1829
|
-
careful users (and CI) never saw it. `ark-check` runs everywhere, so the notice
|
|
1830
|
-
now actually lands. Advisory only; never affects the exit code.
|
|
1831
|
-
|
|
1832
|
-
## 1.7.1 — 2026-07-05
|
|
1833
|
-
|
|
1834
|
-
### Fixed — write-gate infra heuristics now respect the layer's role
|
|
1835
|
-
|
|
1836
|
-
- The AI write-gate's built-in infrastructure-import heuristics
|
|
1837
|
-
(`FORBIDDEN_PATTERN` / `FORBIDDEN_IMPORT` for `/infra`, `/adapters`,
|
|
1838
|
-
`/persistence`, `/db`, and ORMs) fired on **every** file regardless of its
|
|
1839
|
-
layer. A persistence- or adapter-layer file that legitimately imports the
|
|
1840
|
-
database was blocked by the PreToolUse hook even though `ark-check` (CI)
|
|
1841
|
-
passed it — the gate contradicted the project's own `ark.config.json`.
|
|
1842
|
-
- The heuristics are now suppressed for layers whose name declares an
|
|
1843
|
-
infrastructure role (`adapter`, `infra`, `persistence`, `repository`,
|
|
1844
|
-
`integration`, `database`), so those layers may import infrastructure as the
|
|
1845
|
-
contract intends. The pure core (domain/application) and zero-config projects
|
|
1846
|
-
(no layer context) are unchanged — infra imports there are still blocked.
|
|
1847
|
-
User-supplied `forbiddenPatterns` are an explicit opt-in and always apply,
|
|
1848
|
-
in every layer.
|
|
1849
|
-
- For an infrastructure layer with an unconventional name (`Storage`, `Gateway`,
|
|
1850
|
-
…), flag it in `ark.config.json` with `"mayImportInfrastructure": true` and the
|
|
1851
|
-
gate exempts it too. `createAICodeGate` gained an `infrastructureLayers` option
|
|
1852
|
-
carrying these names. This makes the fix universal: any project, any layer
|
|
1853
|
-
naming, without losing domain-purity protection.
|
|
1854
|
-
|
|
1855
|
-
## 1.7.0 — 2026-07-05
|
|
1856
|
-
|
|
1857
|
-
### Added — /ark-* agent skills, installed for every detected CLI
|
|
1858
|
-
|
|
1859
|
-
- New `templates/skills/` set of eight autonomous slash-command skills:
|
|
1860
|
-
`ark-coverage` (audit which Ark capabilities the project is NOT using, ranked
|
|
1861
|
-
with the exact command to enable each), `ark-fix` (resolve violations at the
|
|
1862
|
-
root cause — ports/moves, never weaken the contract), `ark-adopt` (baseline
|
|
1863
|
-
freeze + ratchet onboarding), `ark-place` ("where does X go?" answered from
|
|
1864
|
-
the contract), `ark-contract` (safe `ark.config.json` evolution), `ark-explain`
|
|
1865
|
-
(plain-language architecture tour for newcomers), `ark-runtime` (migrate
|
|
1866
|
-
hand-rolled event bus/outbox/sagas to the runtime kernel), and `ark-upgrade`
|
|
1867
|
-
(refresh gates + skills after a package update).
|
|
1868
|
-
- `ark-check --install-agent-gates` now installs the skills into each detected
|
|
1869
|
-
tool's command location: `.claude/skills/<name>/SKILL.md`,
|
|
1870
|
-
`.cursor/commands/`, `.codex/prompts/`, `.windsurf/workflows/`, and
|
|
1871
|
-
`.clinerules/workflows/` (plus `.github/prompts/` for Copilot, which is
|
|
1872
|
-
explicit-only via `--tools copilot`). Kiro has no command mechanism, so it
|
|
1873
|
-
keeps only its steering rule file. One canonical markdown per skill; existing
|
|
1874
|
-
files are never overwritten without `--force`, so re-running after an update
|
|
1875
|
-
only adds what's missing.
|
|
1876
|
-
- The skills are written to work unattended: they gather everything from the
|
|
1877
|
-
repo, take documented defaults instead of asking, finish with a strict
|
|
1878
|
-
`ark-check`, and report what they did — usable both by advanced users and by
|
|
1879
|
-
developers new to architecture governance (plain-language explanations are
|
|
1880
|
-
part of each skill's contract).
|
|
1881
|
-
- Postinstall message now tells existing Ark projects to re-run
|
|
1882
|
-
`npx ark-check --install-agent-gates` after updating, so new templates and
|
|
1883
|
-
skills reach every configured agent CLI, not just one.
|
|
1884
|
-
|
|
1885
|
-
## 1.6.0 — 2026-07-04
|
|
1886
|
-
|
|
1887
|
-
### Changed — bounded in-memory retention by default
|
|
1888
|
-
|
|
1889
|
-
- `createArkKernel` now defaults `maxHistorySize` to `DEFAULT_MAX_HISTORY_SIZE`
|
|
1890
|
-
(1000), capping event history, trace, and audit records with oldest-first
|
|
1891
|
-
eviction. Previously these grew without bound in long-running processes.
|
|
1892
|
-
Pass `maxHistorySize: Infinity` to restore the old unbounded behavior.
|
|
1893
|
-
|
|
1894
|
-
### Added — custom layer matchers
|
|
1895
|
-
|
|
1896
|
-
- `ArchitectureLayer` accepts an optional `match: (name) => boolean` for teams
|
|
1897
|
-
whose intent names don't follow prefix conventions. Matchers are checked
|
|
1898
|
-
before prefixes, in layer declaration order, and can be combined with or
|
|
1899
|
-
replace `prefixes` (use `prefixes: []` for match-only layers).
|
|
1900
|
-
|
|
1901
|
-
## 1.5.0 — 2026-07-04
|
|
1902
|
-
|
|
1903
|
-
### Added — ark-check scan cache
|
|
1904
|
-
|
|
1905
|
-
- `ark-check` caches per-file scan results in `node_modules/.cache/ark-check.json`,
|
|
1906
|
-
keyed by each file's mtime+size and the config/manifest contents. Only unchanged
|
|
1907
|
-
files skip the TypeScript parse; import edges are ALWAYS re-resolved against the
|
|
1908
|
-
live filesystem, so the cache can never hide a violation introduced by adding,
|
|
1909
|
-
moving, or deleting other files. `--no-cache` disables it.
|
|
1910
|
-
|
|
1911
|
-
### Added — monorepo per-package tsconfig resolution
|
|
1912
|
-
|
|
1913
|
-
- Without `--tsconfig`, `ark-check` now resolves each file's path aliases against the
|
|
1914
|
-
NEAREST `tsconfig.json` above it (like `tsc`), so a monorepo can run under a single
|
|
1915
|
-
`--root` with per-package alias maps. `--tsconfig` still forces one config for all files.
|
|
1916
|
-
|
|
1917
|
-
### Deprecations (removal planned for 2.0)
|
|
1918
|
-
|
|
1919
|
-
- `AIGateViolation.code` (`src/kernel/ai-gate/types.ts`) — use `ruleId`.
|
|
1920
|
-
- `layeredArchitectureRules()` (`src/kernel/policy/builtins.ts`) — use `cleanArchitectureMatrix()`.
|
|
1921
|
-
|
|
1922
|
-
## 1.4.0 — 2026-07-03
|
|
1923
|
-
|
|
1924
|
-
### Changed — the write gate now ratchets like the CI gate
|
|
1925
|
-
|
|
1926
|
-
- `ark-mcp --hook` blocks an edit only when it ADDS violations relative to the file's
|
|
1927
|
-
current on-disk state. Previously any pre-existing violation (frozen in a baseline or
|
|
1928
|
-
predating Ark adoption) made every subsequent edit to that file un-writable while CI
|
|
1929
|
-
passed — with the new auto-seeded `forbiddenGlobals`, that would have hit ordinary
|
|
1930
|
-
brownfield upgrades. New files still block on every violation.
|
|
1931
|
-
|
|
1932
|
-
### Added — SessionStart contract injection (`ark-mcp --session-context`)
|
|
1933
|
-
|
|
1934
|
-
- `ark-mcp --session-context` prints a compact contract summary — layers, forbidden
|
|
1935
|
-
globals, denied-edge count, baseline state, and the check command — for a Claude Code
|
|
1936
|
-
`SessionStart` hook, so the agent knows the architecture from the first token instead
|
|
1937
|
-
of learning it by rejection. `--install-agent-gates` now includes the hook in the
|
|
1938
|
-
generated `.claude/settings.json`.
|
|
1939
|
-
- Project-scoped by design and safe even in global settings: without an
|
|
1940
|
-
`ark.config.json`, `--session-context` prints nothing and exits 0 (before loading
|
|
1941
|
-
`dist/`), so non-Ark projects are untouched.
|
|
1942
|
-
|
|
1943
|
-
### Added — instruction-tier agent gates (Windsurf, Cline, Copilot, Kiro)
|
|
1944
|
-
|
|
1945
|
-
- `ark-check --install-agent-gates` now knows four more tools: `windsurf`
|
|
1946
|
-
(`.windsurf/rules/ark.md`), `cline` (`.clinerules/ark.md`), `copilot`
|
|
1947
|
-
(`.github/copilot-instructions.md`), and `kiro` (`.kiro/steering/ark.md`).
|
|
1948
|
-
All derive from the same canonical agent contract as `AGENTS.md` and the
|
|
1949
|
-
Cursor rule, so the steps cannot drift between hosts.
|
|
1950
|
-
- Windsurf, Cline, and Kiro are auto-detected from their config directories;
|
|
1951
|
-
Copilot is explicit-only via `--tools` (`.github/` is too weak a signal).
|
|
1952
|
-
Gemini CLI needs no template — it reads the generated `AGENTS.md`.
|
|
1953
|
-
|
|
1954
|
-
### Added — forbidden ambient globals per layer (`forbiddenGlobals`)
|
|
1955
|
-
|
|
1956
|
-
- Layers in `ark.config.json` can declare `forbiddenGlobals` (e.g.
|
|
1957
|
-
`["fetch", "process", "Date.now", "Math.random"]`). Import rules can't see code that
|
|
1958
|
-
reaches for an ambient global; this closes that hole for domain purity.
|
|
1959
|
-
- Enforced identically at all three moments: `ark-check` reports `FORBIDDEN_GLOBAL`
|
|
1960
|
-
in CI (baseline-ratchet compatible), the `ark-mcp` write gate blocks the write, and
|
|
1961
|
-
the new `ark/no-forbidden-globals` ESLint rule gives in-editor feedback (scope it to
|
|
1962
|
-
layer directories via `files`; it takes a `{ globals: [...] }` option).
|
|
1963
|
-
- Detection is positional, not scope-aware: dotted entries (`"Date.now"`) flag that
|
|
1964
|
-
property access; bare entries (`"console"`) flag member access, calls, and
|
|
1965
|
-
constructions. Types, import names, and shadowed locals are never flagged.
|
|
1966
|
-
- `ark init` and `ark-check --init` seed the DomainModel layer with
|
|
1967
|
-
`["fetch", "process", "Date.now", "Math.random"]`.
|
|
1968
|
-
- The `ark://manifest` MCP resource now exposes the configured `forbiddenGlobals`
|
|
1969
|
-
map so agents see the constraint before generating code.
|
|
1970
|
-
- `createAICodeGate` accepts a `forbiddenGlobals` option (layer → globals), checked
|
|
1971
|
-
when a `typescript` module is provided.
|
|
1972
|
-
|
|
1973
|
-
## 1.3.0 — 2026-07-03
|
|
1974
|
-
|
|
1975
|
-
### Added — the 11-layer division is now suggested, to humans and agents
|
|
1976
|
-
|
|
1977
|
-
- `ark-check --init` on a project with no conventional layer directories now generates
|
|
1978
|
-
the complete 11-layer starter profile (all layers `optional`) instead of failing:
|
|
1979
|
-
the strict check passes immediately and each layer starts being enforced as soon as
|
|
1980
|
-
its directory gains source files.
|
|
1981
|
-
- `ark-check --init` on a partially-layered project prints the undetected profile
|
|
1982
|
-
layers with their conventional directories, so the full division is visible before
|
|
1983
|
-
deciding what to adopt.
|
|
1984
|
-
- The `ark://manifest` MCP resource now includes `suggestedLayers` (undeclared default
|
|
1985
|
-
layers with intent prefixes and conventional directories), so agents know where a
|
|
1986
|
-
new saga, job, or read model belongs before improvising an ungoverned location.
|
|
1987
|
-
- The generated `AGENTS.md` includes a "Where new code belongs" placement table for
|
|
1988
|
-
the same purpose in runtimes without MCP.
|
|
1989
|
-
|
|
1990
|
-
### Added — gate presence enforcement (`ark-check --require-gates`)
|
|
1991
|
-
|
|
1992
|
-
- `ark-check --require-gates` fails the check when `AGENTS.md`, `.mcp.json`, or the
|
|
1993
|
-
generated CI workflow is missing, so "installed but never configured" is a red CI.
|
|
1994
|
-
JSON mode reports `{ ok: false, error: 'missing-gates', missing: [...] }`.
|
|
1995
|
-
- `--install-agent-gates --tools claude,cursor,codex` selects which tool templates to
|
|
1996
|
-
write; without the flag, tools are auto-detected from `.claude/`, `.cursor/`, and
|
|
1997
|
-
`.codex/` (all templates are written when nothing is detected).
|
|
1998
|
-
|
|
1999
|
-
### Changed
|
|
2000
|
-
|
|
2001
|
-
- The generated CI workflow now runs `ark-check` with `--require-gates`.
|
|
2002
|
-
- AGENTS.md and the Cursor rule derive from a single agent contract, so the
|
|
2003
|
-
enforcement steps can no longer drift between the two files.
|
|
2004
|
-
|
|
2005
|
-
### Fixed
|
|
2006
|
-
|
|
2007
|
-
- `--install-agent-gates` now reports failed template writes and exits non-zero
|
|
2008
|
-
instead of always claiming success.
|
|
2009
|
-
- `--tools` no longer swallows a following flag as a tool name (`--tools --force`),
|
|
2010
|
-
and rejects empty or unknown tool names with exit 2 instead of silently ignoring them.
|
|
2011
|
-
- `suggestedLayers` skips default layers whose intent prefixes the project already
|
|
2012
|
-
claims under another name (e.g. a `core` layer owning `Domain.`), so agents are never
|
|
2013
|
-
told to create a second layer for an already-governed prefix.
|
|
2014
|
-
- Greenfield `--init` warns when existing source files live outside `src/` (and are
|
|
2015
|
-
therefore not governed by the generated starter config) instead of staying silent.
|
|
2016
|
-
- The suggested `check:architecture` npm alias now uses `npx ark-check` (the previous
|
|
2017
|
-
snippet only worked inside Ark's own repository).
|
|
2018
|
-
- `createElevenLayerArkConfig({ rootDir: '.' })` no longer emits broken `./`-prefixed
|
|
2019
|
-
patterns that matched nothing.
|
|
2020
|
-
|
|
2021
|
-
## 1.2.0 — 2026-07-03
|
|
2022
|
-
|
|
2023
|
-
### Added — agent gate installer (`ark-check --install-agent-gates`)
|
|
2024
|
-
|
|
2025
|
-
- One command writes the agent-enforcement starter set: `AGENTS.md`, `.mcp.json`,
|
|
2026
|
-
Cursor rule + MCP config, Claude settings, a Codex config snippet, and a GitHub
|
|
2027
|
-
Actions workflow that runs `ark-check --strict-config`. Existing files are
|
|
2028
|
-
skipped unless `--force` is passed.
|
|
2029
|
-
- The generated workflow detects the project's package manager (npm / pnpm / yarn)
|
|
2030
|
-
from its lockfile and uses matching setup, cache, and run commands.
|
|
2031
|
-
|
|
2032
|
-
### CI
|
|
2033
|
-
|
|
2034
|
-
- Workflows updated to the node24 runtime; MCP tests isolated from concurrent builds.
|
|
2035
|
-
|
|
2036
|
-
## 1.1.0
|
|
2037
|
-
|
|
2038
|
-
### Added — baseline ratchet for existing codebases (`ark-check --baseline`)
|
|
2039
|
-
|
|
2040
|
-
- `ark-check --update-baseline [file]` freezes the current violations into
|
|
2041
|
-
`.ark-baseline.json` (line-insensitive keys, so unrelated edits don't resurrect them).
|
|
2042
|
-
- `ark-check --baseline [file]` suppresses frozen violations: only NEW violations fail,
|
|
2043
|
-
and stale baseline entries are reported so the ratchet can be tightened with a re-run
|
|
2044
|
-
of `--update-baseline`. JSON output gains `suppressedViolations` and `staleBaselineKeys`.
|
|
2045
|
-
|
|
2046
|
-
### Added — Standard Schema support in event contracts
|
|
2047
|
-
|
|
2048
|
-
- `EventContract.standardSchema` accepts any [Standard Schema](https://standardschema.dev)
|
|
2049
|
-
validator (zod, valibot, arktype, ...) alongside — or instead of — Ark's own schema
|
|
2050
|
-
format. Issues (including paths) map to regular contract issues. Validation stays
|
|
2051
|
-
synchronous; async validators produce an explicit contract issue. Ark remains
|
|
2052
|
-
zero-dependency: the spec interface is vendored as types only.
|
|
2053
|
-
|
|
2054
|
-
### Added — NestJS adapter (`ark-runtime-kernel/nestjs`)
|
|
2055
|
-
|
|
2056
|
-
- `ArkModule.forRoot()` / `forRoot(kernel | options)` / `forRootAsync({ useFactory })`
|
|
2057
|
-
register a global kernel under the `ARK_KERNEL` token; `@InjectArk()` injects it.
|
|
2058
|
-
- `@nestjs/common` is an optional peer dependency; the core stays zero-dependency.
|
|
2059
|
-
|
|
2060
|
-
### Added — GitHub Action
|
|
2061
|
-
|
|
2062
|
-
- Composite action at the repo root: `uses: pedroknigge/arkgate@main` runs
|
|
2063
|
-
`ark-check`, writes the result to the step summary, and (with `github-token`) comments
|
|
2064
|
-
violations on the PR. Inputs: `root`, `config`, `strict-config`, `baseline`, `version`.
|
|
2065
|
-
|
|
2066
|
-
### Added — docs, examples, and distribution
|
|
2067
|
-
|
|
2068
|
-
- `docs/ai-gates.md`: copy-paste write-gate setups for Claude Code (hook + MCP), Cursor,
|
|
2069
|
-
OpenAI Codex, any hook-capable runtime, plus the CI backstop.
|
|
2070
|
-
- `examples/hexagonal-order-api/`: a full hexagonal order API governed by Ark with a
|
|
2071
|
-
"break it on purpose" walkthrough.
|
|
2072
|
-
- `server.json` for the official MCP registry; `CONTRIBUTING.md`; `ROADMAP.md`.
|
|
2073
|
-
- README rewritten adoption-first: 2-minute CI setup, honest comparison vs
|
|
2074
|
-
dependency-cruiser / eslint-plugin-boundaries / Nx boundaries, write-gate demo, and the
|
|
2075
|
-
runtime kernel repositioned as the opt-in layer.
|
|
2076
|
-
|
|
2077
|
-
### Changed — actionable ark-check output
|
|
2078
|
-
|
|
2079
|
-
- Human output now shows the rule, `file:line`, the layer edge with the resolved target,
|
|
2080
|
-
and a fix hint per rule, with color when attached to a TTY (`NO_COLOR` respected).
|
|
2081
|
-
`--json` output is unchanged (plus the new baseline fields).
|
|
2082
|
-
|
|
2083
|
-
### Changed — single package.json
|
|
2084
|
-
|
|
2085
|
-
- Removed the `package.dev.json` / `package.publish.json` swap workflow and its scripts;
|
|
2086
|
-
the checked-in `package.json` is the only manifest and `npm publish` ships it as-is
|
|
2087
|
-
(`prepack` builds). Internal working documents removed from `docs/`.
|
|
2088
|
-
|
|
2089
|
-
## 1.0.0 — 2026-07-02 (as published to npm)
|
|
2090
|
-
|
|
2091
|
-
### Added — working pre-write hook mode (`ark-mcp --hook`)
|
|
2092
|
-
|
|
2093
|
-
- `ark-mcp --hook` runs one-shot instead of serving: it reads a Claude Code PreToolUse
|
|
2094
|
-
payload from stdin, validates the file content a Write/Edit/MultiEdit is about to
|
|
2095
|
-
produce, and exits `2` with the violations on stderr to block the write (`0` to allow).
|
|
2096
|
-
- Edits are validated against the post-edit file state (current file with the edit applied
|
|
2097
|
-
in memory), not the edit snippet in isolation.
|
|
2098
|
-
- Fail-open plumbing: non-source files, other tools, files outside `--root`, and malformed
|
|
2099
|
-
payloads never block the agent.
|
|
2100
|
-
- Fixed the Claude Code integration examples in README and the agent guide: they showed a
|
|
2101
|
-
hook `"type": "mcp"` that does not exist in Claude Code. The documented configuration now
|
|
2102
|
-
uses a real `"type": "command"` hook running `ark-mcp --hook`, plus `.mcp.json` for the
|
|
2103
|
-
manifest resource and `validate_code` tool.
|
|
2104
|
-
|
|
2105
|
-
### Added — one-command onboarding (`ark-check --init`)
|
|
2106
|
-
|
|
2107
|
-
- `ark-check --init` scans the project for the built-in layer directory conventions
|
|
2108
|
-
(`src/domain`, `src/application`, `src/adapters/persistence`, ...) and writes an
|
|
2109
|
-
`ark.config.json` covering only the layers that actually contain source files, with the
|
|
2110
|
-
default rule matrix filtered to those layers.
|
|
2111
|
-
- The generated config passes `--strict-config` out of the box; `--init` also lists the
|
|
2112
|
-
top-level directories left uncovered so governance gaps are explicit from day one.
|
|
2113
|
-
- `--init` refuses to overwrite an existing config unless `--force` is passed, and fails
|
|
2114
|
-
with guidance (instead of writing a useless config) when no conventional directories
|
|
2115
|
-
are found.
|
|
2116
|
-
|
|
2117
|
-
### Changed — real dogfooding and less warning noise
|
|
2118
|
-
|
|
2119
|
-
- Ark's own `ark.config.json` now classifies 100% of `src/` (DomainModel, Kernel, and
|
|
2120
|
-
Tooling layers with real boundary rules) instead of a symbolic two-layer config, and
|
|
2121
|
-
`npm run check:architecture` / CI run with `--strict-config` so coverage can never
|
|
2122
|
-
silently rot.
|
|
2123
|
-
- Removed the `CONFIG_PARTIAL_LAYER_MAP` warning: it flagged every project with fewer
|
|
2124
|
-
than 11 layers even at 100% file coverage. `CONFIG_UNCLASSIFIED_FILES` already reports
|
|
2125
|
-
the real coverage gap.
|
|
2126
|
-
|
|
2127
|
-
### Added — broader static governance checks
|
|
2128
|
-
|
|
2129
|
-
- `ark-check` now checks dynamic `import()` and `require()` module edges against configured
|
|
2130
|
-
layer rules.
|
|
2131
|
-
- `ark-check` now flags raw `publish()` calls that pass an intent string or raw event
|
|
2132
|
-
object.
|
|
2133
|
-
- `ark-check` now flags publish calls missing `metadata.source`.
|
|
2134
|
-
- `ark-check` now flags source intent literals whose resolved layer does not match the
|
|
2135
|
-
publishing file's configured layer.
|
|
2136
|
-
|
|
2137
|
-
### Added — source-bound publishers
|
|
2138
|
-
|
|
2139
|
-
- Event buses now expose `createPublisher(sourceIntent)` to create a source-bound
|
|
2140
|
-
publishing capability.
|
|
2141
|
-
- Ark kernels expose `ark.publisher(sourceIntent)` as the recommended strict runtime path.
|
|
2142
|
-
- Source-bound publishers stamp `metadata.source` internally and throw
|
|
2143
|
-
`SourceMetadataOverrideError` when callers try to publish as a different source.
|
|
2144
|
-
|
|
2145
|
-
### Added — operational 11-layer profile config
|
|
2146
|
-
|
|
2147
|
-
- Added `createElevenLayerArkConfig()` to generate an `ark-check` configuration from the
|
|
2148
|
-
built-in runtime 11-layer profile.
|
|
2149
|
-
- Added `ark-check --print-config eleven-layer` for CLI bootstrap of `ark.config.json`.
|
|
2150
|
-
- Generated layers are optional by default so teams can adopt the full profile
|
|
2151
|
-
incrementally without warnings for unused folders.
|
|
2152
|
-
|
|
2153
|
-
### Added — AST-backed AI publish checks
|
|
2154
|
-
|
|
2155
|
-
- `createAICodeGate()` can now run built-in TypeScript AST checks when the caller passes
|
|
2156
|
-
the `typescript` module.
|
|
2157
|
-
- AST checks flag raw publish calls, publish calls missing `metadata.source`, and source
|
|
2158
|
-
intent literals whose layer differs from the target file layer.
|
|
2159
|
-
- `ark-mcp` passes TypeScript into AICodeGate when available so the write-path gate blocks
|
|
2160
|
-
the same publish misuse patterns earlier.
|
|
2161
|
-
|
|
2162
|
-
### Added — ports and adapters governance metadata
|
|
2163
|
-
|
|
2164
|
-
- `definePort()` now accepts optional ownership metadata, intent identity, and an
|
|
2165
|
-
`allowedAdapters` list.
|
|
2166
|
-
- `createAdapter()` accepts adapter metadata and rejects adapters that are not allowed by
|
|
2167
|
-
the port.
|
|
2168
|
-
- Added `checkAdapterGovernance()` for non-throwing adapter allowlist checks.
|
|
2169
|
-
|
|
2170
|
-
### Added — production hardening
|
|
2171
|
-
|
|
2172
|
-
- Event contracts now support nested object fields, typed array items, and enum values.
|
|
2173
|
-
- Added `docs/production-hardening.md` with store-interface guidance for durable audit,
|
|
2174
|
-
outbox, projection, and workflow implementations.
|
|
2175
|
-
|
|
2176
|
-
## 1.0.0 — 2026-07-01
|
|
2177
|
-
|
|
2178
|
-
### Changed — strict runtime baseline and governance roadmap
|
|
2179
|
-
|
|
2180
|
-
- `createArkKernel()` now uses hardened defaults: strict event contracts, known-source
|
|
2181
|
-
enforcement, and hard observed layer-flow enforcement unless explicitly relaxed.
|
|
2182
|
-
- Added `createLenientArkKernel()` for migration and legacy paths that need the previous
|
|
2183
|
-
relaxed behavior.
|
|
2184
|
-
- The built-in 11-layer profile now uses a strict cross-layer deny matrix with explicit
|
|
2185
|
-
allowed flows.
|
|
2186
|
-
- `ark-check` reports advisory config warnings for missing/partial layer maps,
|
|
2187
|
-
unclassified included files, unmatched layer patterns, duplicate layers, and rules that
|
|
2188
|
-
reference unknown layers. `--strict-config` turns those warnings into a failing check.
|
|
2189
|
-
- Documentation now states the runtime/static/AI governance boundaries explicitly and
|
|
2190
|
-
tracks the seven-phase roadmap for expanding Ark's enforcement scope.
|
|
2191
|
-
|
|
2192
|
-
## 0.8.4 — 2026-07-01
|
|
2193
|
-
|
|
2194
|
-
### Fixed — CI/MCP intent-classification parity
|
|
2195
|
-
|
|
2196
|
-
`ark-check` classified intent names with declaration-order first-match + raw `startsWith`,
|
|
2197
|
-
while the MCP write-gate classifies via the library's `ArchitectureProfile.resolveLayer`
|
|
2198
|
-
(longest-prefix-first + prefixes normalized to a trailing `.`). For configs with
|
|
2199
|
-
overlapping prefixes (`Adapter.` vs `Adapter.Persistence.`) or dotless prefixes (`Domain`),
|
|
2200
|
-
the two gates disagreed. Both now share `resolveIntentLayer` (in `bin/ark-shared.mjs`),
|
|
2201
|
-
which mirrors the library semantics exactly — a regression test asserts the shared resolver
|
|
2202
|
-
and `profile.resolveLayer` return identical results across overlapping/dotless configs.
|
|
2203
|
-
|
|
2204
|
-
## 0.8.3 — 2026-07-01
|
|
2205
|
-
|
|
2206
|
-
### Fixed — third code-review pass (glob robustness + latent fallback bug)
|
|
2207
|
-
|
|
2208
|
-
- **Unbalanced-brace crash.** A glob with an unbalanced `{` produced an invalid regex, so
|
|
2209
|
-
`new RegExp` threw — crashing the CI gate (exit 2) and every MCP `validate_code` call.
|
|
2210
|
-
`globToRegExp` now only treats braces as alternation when they're balanced, otherwise
|
|
2211
|
-
literal; it also honors backslash-escaped braces (`\{` → literal).
|
|
2212
|
-
- **`layerForIntent` default fallback (latent since v0.4).** The `DEFAULT_INTENT_PREFIXES`
|
|
2213
|
-
fallback read `item.prefix` (singular) off `{ layer, prefixes: [...] }` entries, so it
|
|
2214
|
-
matched nothing — a project with layers but no `intentPrefixes` got no intent-reference
|
|
2215
|
-
enforcement in CI while the MCP gate blocked the same reference. Now flattened to the
|
|
2216
|
-
right shape; the two gates agree.
|
|
2217
|
-
- **Out-of-root over-reach.** After dropping the hard root boundary in 0.8.1, a relative
|
|
2218
|
-
import escaping `--root` (`../../…`) could be classified by a catch-all pattern and
|
|
2219
|
-
false-flagged. `resolveImport` now skips targets whose root-relative path leads with `..`
|
|
2220
|
-
(and still skips `node_modules` segments) — projects under a `node_modules` segment stay
|
|
2221
|
-
governed; monorepos should run ark-check per package.
|
|
2222
|
-
- **Accurate MCP warning.** The "no layers configured" stderr note no longer claims layer
|
|
2223
|
-
checks are disabled; with no config layers the gate uses the default 11-layer profile and
|
|
2224
|
-
layer-reference checks still run when the caller passes an explicit `layer`.
|
|
2225
|
-
|
|
2226
|
-
## 0.8.2 — 2026-07-01
|
|
2227
|
-
|
|
2228
|
-
### Fixed — second code-review pass (parity + glob correctness)
|
|
2229
|
-
|
|
2230
|
-
A re-review of the v0.8.1 fixes found that a couple of them introduced new divergences.
|
|
2231
|
-
This closes them and unifies the two gates so they provably can't disagree:
|
|
2232
|
-
|
|
2233
|
-
- **ark-mcp / ark-check rule parity.** The write-path gate built its profile with
|
|
2234
|
-
`rules: config.rules ?? []`, so a config that declared layers but omitted `rules` got
|
|
2235
|
-
zero enforcement while CI still applied the default matrix. Both CLIs now share
|
|
2236
|
-
`DEFAULT_RULES` + `DEFAULT_INTENT_PREFIXES` (in `bin/ark-shared.mjs`) and the gate uses
|
|
2237
|
-
`config.rules ?? DEFAULT_RULES` with the same intent-prefix fallback ark-check uses. No
|
|
2238
|
-
layer is built with empty prefixes (which had made it unresolvable).
|
|
2239
|
-
- **node_modules exclusion, done right.** `ark-check` now excludes a resolved target only
|
|
2240
|
-
when its path *relative to root* contains a `node_modules` segment — so a broad catch-all
|
|
2241
|
-
pattern (`**`) no longer false-flags third-party imports, while projects living under a
|
|
2242
|
-
`node_modules` segment and monorepo siblings are still governed.
|
|
2243
|
-
- **Resolver directory shadowing.** The `.mts`/`.cts` relative fallback now requires the
|
|
2244
|
-
candidate to be a file (`statSync().isFile()`), so a directory named like the specifier
|
|
2245
|
-
can't shadow the real module file.
|
|
2246
|
-
- **Brace globs.** `globToRegExp` now supports `{ts,tsx}` alternation (previously treated
|
|
2247
|
-
as literals, silently matching nothing) and caches each compiled pattern.
|
|
2248
|
-
- **Docs/CI polish.** Corrected the observed-flow enforcement comment (edge is recorded
|
|
2249
|
-
*after* the check now); scoped the CI `push` trigger to `main` so PR branches don't run
|
|
2250
|
-
the job twice (all PRs are still gated via `pull_request`, any base branch).
|
|
2251
|
-
|
|
2252
|
-
## 0.8.1 — 2026-07-01
|
|
2253
|
-
|
|
2254
|
-
### Fixed — enforcement-defeating bugs found in the v0.8 code review
|
|
2255
|
-
|
|
2256
|
-
A workflow-backed review of v0.6–v0.8 surfaced a cluster of bugs that silently defeated the
|
|
2257
|
-
very gates they added. All fixed with regression tests (including a nested-directory fixture
|
|
2258
|
-
so the gate can never be vacuously green again):
|
|
2259
|
-
|
|
2260
|
-
- **Broken `**` glob (critical).** A chained `.replace()` corrupted `**` into `.[^/]*`, so
|
|
2261
|
-
`src/kernel/**` stopped matching nested paths — every file in a subdirectory was silently
|
|
2262
|
-
unclassified and skipped. This neutered both `ark-check` (CI) and `ark-mcp` layer
|
|
2263
|
-
inference for any real project. Fixed with a single-pass glob compiler shared by both
|
|
2264
|
-
CLIs (`bin/ark-shared.mjs`), removing the duplicated (and independently buggy) copies.
|
|
2265
|
-
- **`ark-check` import filters.** Replaced the `node_modules` path-substring test (which
|
|
2266
|
-
discarded an entire project living under a `node_modules` segment) with TS's own
|
|
2267
|
-
`isExternalLibraryImport` flag; removed the out-of-root filter so monorepo cross-package
|
|
2268
|
-
imports are governed; restored `.mts`/`.cts` extensionless resolution via a relative
|
|
2269
|
-
fallback.
|
|
2270
|
-
- **`ark-mcp` write-path gate.** It now builds the enforcement profile from the project's
|
|
2271
|
-
`ark.config.json` (layer names **and** rules), so it agrees with `ark-check` instead of
|
|
2272
|
-
always using the built-in `elevenLayerProfile` — projects with custom layer names/rules
|
|
2273
|
-
were getting zero layer enforcement. Malformed config now throws instead of silently
|
|
2274
|
-
falling back to a no-op; empty-layer configs warn on stderr. Manifest resource reflects
|
|
2275
|
-
the effective profile. Guarded a null-intent crash and gave a clear message on broken
|
|
2276
|
-
builds. Notifications never receive a response.
|
|
2277
|
-
- **EventBus phantom edge.** In `enforceObservedLayerFlow: 'hard'`, a rejected event no
|
|
2278
|
-
longer records an `observed` graph edge (the check now runs before `registerEventFlow`),
|
|
2279
|
-
so drift/manifest/observability reports don't show flows that never happened.
|
|
2280
|
-
- **CI gate coverage.** The workflow now triggers on every push and pull request, not only
|
|
2281
|
-
those based on `main`, so non-main PR topologies can't bypass the gate.
|
|
2282
|
-
|
|
2283
|
-
## 0.8.0 — 2026-07-01
|
|
2284
|
-
|
|
2285
|
-
### Added — mandatory CI architecture gate + AI write-path gate (MCP)
|
|
2286
|
-
|
|
2287
|
-
Two chokepoints that make Ark's enforcement unavoidable where it matters, closing the last
|
|
2288
|
-
two "kernel-earning" gaps from the strategic audit.
|
|
2289
|
-
|
|
2290
|
-
**1. Mandatory CI gate.**
|
|
2291
|
-
- `.github/workflows/ci.yml` runs typecheck, tests, build, and `ark-check` on every push/PR.
|
|
2292
|
-
`ark-check` exits non-zero on any layer violation, so a violation **fails the job and
|
|
2293
|
-
blocks the merge** — the honest architecture chokepoint for TypeScript.
|
|
2294
|
-
- `ark.config.json` dogfoods Ark on itself: `src/domain/**` must not import the kernel
|
|
2295
|
-
(a real, currently-green invariant — Ark's domain types are dependency-free).
|
|
2296
|
-
- `check:architecture` script now runs the gate explicitly with the config.
|
|
2297
|
-
|
|
2298
|
-
**2. AI write-path gate — `ark-mcp` MCP server (new `bin`).**
|
|
2299
|
-
- A **zero-dependency** MCP server (hand-rolled JSON-RPC 2.0 over stdio — no SDK dependency,
|
|
2300
|
-
honoring the zero-dep rule) exposing:
|
|
2301
|
-
- resource `ark://manifest` — the architectural contract (layers + rules, or a project
|
|
2302
|
-
manifest via `--manifest`) for agent contract discovery.
|
|
2303
|
-
- tool `validate_code` — runs Ark's AI code gate on a source snippet and returns
|
|
2304
|
-
`{ valid, violations }`, setting `isError` when invalid.
|
|
2305
|
-
- Designed to bind to `PreToolUse` on Write/Edit so architecturally-invalid generated code
|
|
2306
|
-
is blocked **before it lands** — turning the manifest + AI gate from an ignorable library
|
|
2307
|
-
into an enforced checkpoint on the operation that matters for AI agents.
|
|
2308
|
-
- Run with `npx ark-mcp` (or `npm run mcp`). See `docs/agent-guide.md` for wiring.
|
|
2309
|
-
|
|
2310
|
-
## 0.7.0 — 2026-07-01
|
|
2311
|
-
|
|
2312
|
-
### Changed — `ark-check` resolves all imports, not just relative ones
|
|
2313
|
-
|
|
2314
|
-
`ark-check` previously resolved only relative (`./`, `../`) import specifiers, so
|
|
2315
|
-
path-alias and package imports — the majority in real TypeScript repos — were invisible
|
|
2316
|
-
to it. It now resolves every import specifier through the TypeScript module resolver
|
|
2317
|
-
(`ts.resolveModuleName`) using the project's `tsconfig.json`, so:
|
|
2318
|
-
|
|
2319
|
-
- **tsconfig path aliases** (e.g. `@domain/*`, `@infra/db`) resolve to their real files and
|
|
2320
|
-
cross-layer violations through aliases are now caught.
|
|
2321
|
-
- **package/absolute imports** resolve via node resolution; external `node_modules` and
|
|
2322
|
-
`.d.ts`-only targets are correctly ignored.
|
|
2323
|
-
- **relative imports** keep working exactly as before.
|
|
2324
|
-
|
|
2325
|
-
New `--tsconfig <path>` flag (defaults to the nearest `tsconfig.json` from `--root`). When
|
|
2326
|
-
no tsconfig is found, aliases are unavailable but relative/package imports still resolve.
|
|
2327
|
-
Layer identity is still derived from file location (glob `patterns`), per the audit's
|
|
2328
|
-
"derive layer from code, not just the intent-name prefix" recommendation.
|
|
2329
|
-
|
|
2330
|
-
This closes the top-ranked remaining gap from both the v0.5 strategic audit and the
|
|
2331
|
-
external v0.6 review: the honest chokepoint for TypeScript architecture enforcement is the
|
|
2332
|
-
CI merge gate, and it must see the imports that actually exist.
|
|
2333
|
-
|
|
2334
|
-
## 0.6.0 — 2026-07-01
|
|
2335
|
-
|
|
2336
|
-
### Added — runtime enforcement of observed layer flows
|
|
2337
|
-
|
|
2338
|
-
Ark now enforces architecture over **what the system actually does**, not only over what
|
|
2339
|
-
was declared. On every publish, the event bus already recorded the real producer→event
|
|
2340
|
-
flow (`metadata.source → intent`); v0.6 wires that observed edge into enforcement.
|
|
2341
|
-
|
|
2342
|
-
- `EventBusOptions.enforceObservedLayerFlow: 'off' | 'soft' | 'hard'` (with
|
|
2343
|
-
`architectureProfile`) checks the resolved producer layer → event layer against the
|
|
2344
|
-
profile's rule matrix at publish time.
|
|
2345
|
-
- `hard` throws `ObservedLayerFlowViolationError` **before** the event reaches history,
|
|
2346
|
-
outbox, or subscribers.
|
|
2347
|
-
- `soft` records a `layer.observedViolation` trace + audit record and proceeds.
|
|
2348
|
-
- `off` (default for `createEventBus`/`createArkKernel`) preserves prior behavior.
|
|
2349
|
-
- `createStrictArkKernel()` defaults `enforceObservedLayerFlow` to `hard`. The recommended
|
|
2350
|
-
strict path now rejects, e.g., a persistence adapter driving a Domain event
|
|
2351
|
-
(PersistenceAdapters → DomainModel) or a Domain source emitting an Application event.
|
|
2352
|
-
- New exports: `ObservedLayerFlowViolationError`, `ObservedLayerFlowMode`.
|
|
2353
|
-
- New trace/audit record type: `layer.observedViolation`.
|
|
2354
|
-
|
|
2355
|
-
This closes the highest-leverage gap identified in the v0.5 strategic audit: the observed
|
|
2356
|
-
flow was previously collected only for the drift *report*, never for enforcement — making
|
|
2357
|
-
"runtime layer governance" a check over the declared model rather than the running system.
|
|
2358
|
-
|
|
2359
|
-
### Docs
|
|
2360
|
-
|
|
2361
|
-
- README now states the enforcement scope explicitly (hard-failed / observable / out of
|
|
2362
|
-
runtime scope) and frames Ark as the runtime kernel for the event/intent layer plus a
|
|
2363
|
-
machine-readable contract, not an OS-style choke point over all code.
|
|
2364
|
-
|
|
2365
|
-
## 0.5.0
|
|
2366
|
-
|
|
2367
|
-
Add-only event interceptors, interceptor audit/trace records, contract-safe interceptor
|
|
2368
|
-
failure behavior, kernel instance id stamping, observability drift report (declared vs
|
|
2369
|
-
observed), runtime graph observed flows, `createArkTestHarness()`, and the
|
|
2370
|
-
`ark-runtime-kernel/eslint` plugin.
|
|
2371
|
-
|
|
2372
|
-
## 0.4.0
|
|
2373
|
-
|
|
2374
|
-
`createStrictArkKernel()`, event contract registry, known-source enforcement, basic
|
|
2375
|
-
outbox store, `ark-check` CLI (AST import + intent-string checks), and policy lifecycle
|
|
2376
|
-
metadata.
|
|
2377
|
-
|
|
2378
|
-
## 0.3.0
|
|
2379
|
-
|
|
2380
|
-
11-layer architecture profile, `createArkKernel()`, native audit trail, workflow/saga
|
|
2381
|
-
engine, projection/read-model registry, metadata validation, and layer-grouped graph views.
|
|
1350
|
+
## 1.19.0 and earlier
|
|
2382
1351
|
|
|
2383
|
-
|
|
2384
|
-
|
|
2385
|
-
|
|
2386
|
-
|
|
2387
|
-
validation, and the package rename to `ark-runtime-kernel`.
|
|
1352
|
+
Detailed 0.x/1.x history remains available in the immutable
|
|
1353
|
+
[`1.x` CHANGELOG](https://github.com/pedroknigge/arkgate/blob/5e9d6745170a7b144015e718d0aed854c4bcd662/CHANGELOG.md#1190--2026-07-08).
|
|
1354
|
+
The published package keeps complete 2.x and current-major notes so upgrade triage stays local
|
|
1355
|
+
without making every install carry the full pre-2.0 development log.
|