arkgate 2.6.1 → 2.8.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 (55) hide show
  1. package/CHANGELOG.md +62 -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/agent-gates.mjs +48 -228
  7. package/bin/lib/architecture-scan.mjs +299 -0
  8. package/bin/lib/ast-scan.mjs +427 -0
  9. package/bin/lib/baseline-key.mjs +23 -0
  10. package/bin/lib/codex-home.mjs +320 -0
  11. package/bin/lib/config-warnings.mjs +228 -0
  12. package/bin/lib/doctor-plan.mjs +2 -0
  13. package/bin/lib/graph-cycles.mjs +56 -0
  14. package/bin/lib/remediation.mjs +182 -0
  15. package/bin/lib/scan-files.mjs +69 -0
  16. package/bin/lib/ts-resolve.mjs +216 -0
  17. package/bin/lib/violations.mjs +3 -9
  18. package/dist/eslint/index.cjs +21 -3
  19. package/dist/eslint/index.cjs.map +1 -1
  20. package/dist/eslint/index.d.cts +5 -3
  21. package/dist/eslint/index.d.ts +5 -3
  22. package/dist/eslint/index.js +21 -3
  23. package/dist/eslint/index.js.map +1 -1
  24. package/dist/index.cjs +1 -1
  25. package/dist/index.cjs.map +1 -1
  26. package/dist/index.d.cts +3 -3
  27. package/dist/index.d.ts +3 -3
  28. package/dist/index.js +1 -1
  29. package/dist/index.js.map +1 -1
  30. package/dist/nestjs/index.cjs +1 -1
  31. package/dist/nestjs/index.cjs.map +1 -1
  32. package/dist/nestjs/index.d.cts +1 -1
  33. package/dist/nestjs/index.d.ts +1 -1
  34. package/dist/nestjs/index.js +1 -1
  35. package/dist/nestjs/index.js.map +1 -1
  36. package/dist/runtime/index.cjs +3080 -0
  37. package/dist/runtime/index.cjs.map +1 -0
  38. package/dist/runtime/index.d.cts +2 -0
  39. package/dist/runtime/index.d.ts +2 -0
  40. package/dist/runtime/index.js +2998 -0
  41. package/dist/runtime/index.js.map +1 -0
  42. package/dist/{types-DpdVN7Lm.d.cts → types-CP3KkwZt.d.cts} +1 -1
  43. package/dist/{types-DpdVN7Lm.d.ts → types-CP3KkwZt.d.ts} +1 -1
  44. package/docs/agent-guide.md +5 -2
  45. package/docs/ai-gates.md +41 -7
  46. package/docs/brownfield-adoption.md +7 -0
  47. package/docs/demos/03-copilot-autopilot.md +3 -2
  48. package/docs/enthusiast/reference-commands.md +2 -2
  49. package/docs/migrate-from-ark-runtime-kernel.md +4 -2
  50. package/docs/package-surface.md +72 -0
  51. package/docs/production-hardening.md +3 -0
  52. package/package.json +12 -1
  53. package/server.json +2 -2
  54. package/templates/skills/ark-explain.md +3 -2
  55. package/templates/skills/ark-loop.md +2 -1
package/CHANGELOG.md CHANGED
@@ -2,6 +2,68 @@
2
2
 
3
3
  All notable changes to ArkGate (`arkgate`; formerly `ark-runtime-kernel`) are documented here.
4
4
 
5
+ ## 2.8.0 — 2026-07-09
6
+
7
+ Co-pilot quality release (roadmap **R5–R7**): labeled eval corpus, fourth mechanical-safe kind,
8
+ and Codex multi-project MCP without silent primary overwrite. **No intentional CLI flag or JSON
9
+ shape breaks** for the gate/co-pilot path.
10
+
11
+ ### Added
12
+
13
+ - **R5 — labeled eval corpus:** 16 cases under `eval/cases/` (themes + labels).
14
+ `npm run eval:corpus` / `evalCorpus.test.ts` gate without a live agent.
15
+ - **R6 — `import-type-of-type-exports`:** named type-only exports from mixed modules →
16
+ `import type` / `export type`. Dual-space names and targets with top-level side effects stay
17
+ **judgment**. Scan flags `namedBindingsTypeOnly` (+ `hasTopLevelSideEffects`).
18
+ - **R7 — Codex multi-project MCP DX:** no silent primary steal; scoped
19
+ `[mcp_servers.ark_<slug>_<hash>]`; doctor gap `codex-home-multi-project`. Codex home logic in
20
+ `bin/lib/codex-home.mjs`.
21
+
22
+ ### Changed
23
+
24
+ - Scan cache schema **v6** (typeOnlyExportNames, namedBindings, hasTopLevelSideEffects;
25
+ invalidates v5 after non-export side-effect honesty fix).
26
+ - Classifier: single early judgment for `require` / `dynamic-import` on layer edges.
27
+ - R6 honesty: impure value-export initializers (`export const db = connect()`) count as
28
+ top-level side effects — named type imports of those modules stay **judgment**.
29
+ - R6 honesty: non-exported impure top-level initializers (`const boot = setup()`) and
30
+ non-exported class static field calls also count as side effects (same skip-on-import-type risk).
31
+ - Codex home: single `upsertCodexMcpTable` path for primary and secondary MCP tables.
32
+
33
+ ## 2.7.0 — 2026-07-09
34
+
35
+ Maintainability release (roadmap **R1–R4**): single-source layer matching, package surface policy,
36
+ `ark-check` orchestration split, and typed pure CLI helpers. **No intentional CLI flag or JSON
37
+ shape breaks** for the gate/co-pilot path.
38
+
39
+ ### Added
40
+
41
+ - **`arkgate/runtime`** package subpath (ESM/CJS + types) — preferred entry for the optional
42
+ runtime kernel. Root `arkgate` still re-exports kernel symbols for this major (compat).
43
+ - **`docs/package-surface.md`** — stable surfaces (CLI JSON, MCP, `ark.config`) vs opt-in runtime.
44
+ - **Generated pure CLI helpers:** `bin/lib/remediation.mjs`, `bin/lib/baseline-key.mjs` from
45
+ Domain TS (`npm run generate:cli-pure` / `check:cli-pure`).
46
+ - **`ark-check` scan pipeline modules** under `bin/lib/`: `scan-files`, `config-warnings`,
47
+ `ts-resolve`, `ast-scan`, `graph-cycles`, `architecture-scan`.
48
+
49
+ ### Changed
50
+
51
+ - **R1 — layer globs SoT:** canonical `src/domain/layerMatch.ts` → generated
52
+ `bin/ark-layer-match.mjs`; `npm run check:layer-match` drift guard in CI.
53
+ `normalizeGlobSeparators` keeps Windows path seps without eating glob escapes.
54
+ - **R2 — package surface = product wedge:** README / agent-guide / migrate / production-hardening
55
+ recommend `arkgate/runtime` for kernel usage.
56
+ - **R3 — `ark-check` entry slim-down:** entry is orchestration-only (~2.4k → ~1.4k LOC);
57
+ `runArchitectureScan` owns the check pipeline. Flags and JSON shapes unchanged.
58
+ - **R4 — typed pure core:** `classifyRemediation`, `enrichViolationWithFixClass`, and
59
+ `baselineKey` live in `src/domain/*` with generated CLI load paths; unit tests import Domain
60
+ sources without spawning the CLI.
61
+
62
+ ### Docs / CI
63
+
64
+ - CI steps for layer-match and cli-pure drift guards.
65
+ - CONTRIBUTING / AGENTS: regenerate commands after editing pure Domain algorithms.
66
+
5
67
  ## 2.6.1 — 2026-07-09
6
68
 
7
69
  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) |