arkgate 2.6.1 → 2.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. package/CHANGELOG.md +36 -0
  2. package/README.md +8 -3
  3. package/bin/ark-check.mjs +19 -993
  4. package/bin/ark-layer-match.mjs +148 -171
  5. package/bin/ark-shared.mjs +9 -159
  6. package/bin/lib/architecture-scan.mjs +279 -0
  7. package/bin/lib/ast-scan.mjs +199 -0
  8. package/bin/lib/baseline-key.mjs +23 -0
  9. package/bin/lib/config-warnings.mjs +228 -0
  10. package/bin/lib/graph-cycles.mjs +56 -0
  11. package/bin/lib/remediation.mjs +150 -0
  12. package/bin/lib/scan-files.mjs +69 -0
  13. package/bin/lib/ts-resolve.mjs +215 -0
  14. package/bin/lib/violations.mjs +3 -9
  15. package/dist/eslint/index.cjs +21 -3
  16. package/dist/eslint/index.cjs.map +1 -1
  17. package/dist/eslint/index.d.cts +5 -3
  18. package/dist/eslint/index.d.ts +5 -3
  19. package/dist/eslint/index.js +21 -3
  20. package/dist/eslint/index.js.map +1 -1
  21. package/dist/index.cjs +1 -1
  22. package/dist/index.cjs.map +1 -1
  23. package/dist/index.d.cts +3 -3
  24. package/dist/index.d.ts +3 -3
  25. package/dist/index.js +1 -1
  26. package/dist/index.js.map +1 -1
  27. package/dist/nestjs/index.cjs +1 -1
  28. package/dist/nestjs/index.cjs.map +1 -1
  29. package/dist/nestjs/index.d.cts +1 -1
  30. package/dist/nestjs/index.d.ts +1 -1
  31. package/dist/nestjs/index.js +1 -1
  32. package/dist/nestjs/index.js.map +1 -1
  33. package/dist/runtime/index.cjs +3080 -0
  34. package/dist/runtime/index.cjs.map +1 -0
  35. package/dist/runtime/index.d.cts +2 -0
  36. package/dist/runtime/index.d.ts +2 -0
  37. package/dist/runtime/index.js +2998 -0
  38. package/dist/runtime/index.js.map +1 -0
  39. package/dist/{types-DpdVN7Lm.d.cts → types-CP3KkwZt.d.cts} +1 -1
  40. package/dist/{types-DpdVN7Lm.d.ts → types-CP3KkwZt.d.ts} +1 -1
  41. package/docs/agent-guide.md +4 -1
  42. package/docs/migrate-from-ark-runtime-kernel.md +4 -2
  43. package/docs/package-surface.md +72 -0
  44. package/docs/production-hardening.md +3 -0
  45. package/package.json +11 -1
  46. package/server.json +2 -2
package/CHANGELOG.md CHANGED
@@ -2,6 +2,42 @@
2
2
 
3
3
  All notable changes to ArkGate (`arkgate`; formerly `ark-runtime-kernel`) are documented here.
4
4
 
5
+ ## Unreleased
6
+
7
+ ## 2.7.0 — 2026-07-09
8
+
9
+ Maintainability release (roadmap **R1–R4**): single-source layer matching, package surface policy,
10
+ `ark-check` orchestration split, and typed pure CLI helpers. **No intentional CLI flag or JSON
11
+ shape breaks** for the gate/co-pilot path.
12
+
13
+ ### Added
14
+
15
+ - **`arkgate/runtime`** package subpath (ESM/CJS + types) — preferred entry for the optional
16
+ runtime kernel. Root `arkgate` still re-exports kernel symbols for this major (compat).
17
+ - **`docs/package-surface.md`** — stable surfaces (CLI JSON, MCP, `ark.config`) vs opt-in runtime.
18
+ - **Generated pure CLI helpers:** `bin/lib/remediation.mjs`, `bin/lib/baseline-key.mjs` from
19
+ Domain TS (`npm run generate:cli-pure` / `check:cli-pure`).
20
+ - **`ark-check` scan pipeline modules** under `bin/lib/`: `scan-files`, `config-warnings`,
21
+ `ts-resolve`, `ast-scan`, `graph-cycles`, `architecture-scan`.
22
+
23
+ ### Changed
24
+
25
+ - **R1 — layer globs SoT:** canonical `src/domain/layerMatch.ts` → generated
26
+ `bin/ark-layer-match.mjs`; `npm run check:layer-match` drift guard in CI.
27
+ `normalizeGlobSeparators` keeps Windows path seps without eating glob escapes.
28
+ - **R2 — package surface = product wedge:** README / agent-guide / migrate / production-hardening
29
+ recommend `arkgate/runtime` for kernel usage.
30
+ - **R3 — `ark-check` entry slim-down:** entry is orchestration-only (~2.4k → ~1.4k LOC);
31
+ `runArchitectureScan` owns the check pipeline. Flags and JSON shapes unchanged.
32
+ - **R4 — typed pure core:** `classifyRemediation`, `enrichViolationWithFixClass`, and
33
+ `baselineKey` live in `src/domain/*` with generated CLI load paths; unit tests import Domain
34
+ sources without spawning the CLI.
35
+
36
+ ### Docs / CI
37
+
38
+ - CI steps for layer-match and cli-pure drift guards.
39
+ - CONTRIBUTING / AGENTS: regenerate commands after editing pure Domain algorithms.
40
+
5
41
  ## 2.6.1 — 2026-07-09
6
42
 
7
43
  Field-test release: Next/monorepo honesty (deer-flow-style hosts), simplified **one-flow** UX for
package/README.md CHANGED
@@ -218,13 +218,17 @@ CI (example):
218
218
 
219
219
  ## Optional: runtime kernel
220
220
 
221
- Gates need **no app code changes**. If you also want runtime intent/event contracts:
221
+ Gates need **no app code changes**. If you also want runtime intent/event contracts,
222
+ use the **opt-in** subpath (preferred):
222
223
 
223
224
  ```ts
224
- import { createStrictArkKernelFromConfig } from 'arkgate';
225
- // see docs/production-hardening.md and package exports
225
+ import { createStrictArkKernelFromConfig } from 'arkgate/runtime';
226
+ // see docs/production-hardening.md and docs/package-surface.md
226
227
  ```
227
228
 
229
+ Root `import { … } from 'arkgate'` still re-exports kernel symbols for compatibility
230
+ in this major; prefer `arkgate/runtime` for new code.
231
+
228
232
  NestJS: `arkgate/nestjs` (optional peer `@nestjs/common`).
229
233
 
230
234
  ---
@@ -234,6 +238,7 @@ NestJS: `arkgate/nestjs` (optional peer `@nestjs/common`).
234
238
  | Audience | Link |
235
239
  |----------|------|
236
240
  | New builders (plain language) | [docs/enthusiast/](docs/enthusiast/README.md) |
241
+ | **Package surface (stable vs opt-in)** | [docs/package-surface.md](docs/package-surface.md) |
237
242
  | Wire Claude / Cursor / Codex / Grok + **ESLint (CI-parity)** | [docs/ai-gates.md](docs/ai-gates.md) |
238
243
  | **TypeScript 5 / 6 / 7 support** | [docs/typescript-support.md](docs/typescript-support.md) |
239
244
  | Migrate from `ark-runtime-kernel` | [docs/migrate-from-ark-runtime-kernel.md](docs/migrate-from-ark-runtime-kernel.md) |