arkgate 2.4.0 → 2.5.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.
@@ -338,7 +338,7 @@ layers, unclassified included files, unmatched layer patterns, duplicate layers,
338
338
  that reference unknown layers. These are advisory by default. Use `--strict-config` once a
339
339
  project is ready to fail CI on coverage gaps.
340
340
 
341
- Use the optional ESLint plugin for fast local feedback:
341
+ Use the optional ESLint plugin for fast local feedback aligned with CI:
342
342
 
343
343
  ```js
344
344
  import ark from 'arkgate/eslint';
@@ -348,8 +348,9 @@ export default [
348
348
  ];
349
349
  ```
350
350
 
351
- Rules: `ark/no-domain-infra-imports`, `ark/no-raw-event-publish`, and
352
- `ark/require-publish-source`.
351
+ Rules: `ark/no-domain-infra-imports` (layer edges from `ark.config.json`, same semantics as
352
+ `arkgate-check`), `ark/no-forbidden-globals` (per-layer `forbiddenGlobals`),
353
+ `ark/no-raw-event-publish`, and `ark/require-publish-source`. See [ai-gates.md](ai-gates.md).
353
354
 
354
355
  ## Runtime Observability
355
356
 
package/docs/ai-gates.md CHANGED
@@ -283,47 +283,33 @@ If your runtime can run a shell command before file writes and pass the tool pay
283
283
  - Grok payloads also get `{ "decision": "deny", "reason": "…" }` on stdout when blocked
284
284
  - plumbing problems (no stdin, non-source files, files outside `--root`) never block
285
285
 
286
- ## ESLint (editor feedback)
286
+ ## ESLint (editor feedback) — same contract as CI
287
287
 
288
- For in-editor red squiggles on layer violations, add the ESLint plugin. It ships a
289
- flat-config preset you can spread directly:
288
+ For in-editor red squiggles that match **`arkgate-check`**, add the ESLint plugin.
289
+ Layer imports and purity globals are driven by **`ark.config.json`** (walk-up from the
290
+ linted file): same layer globs, specificity, `exclude`, and `rules[]` edges as the CI gate.
290
291
 
291
292
  ```js
292
293
  // eslint.config.js (flat config)
293
294
  import ark from 'arkgate/eslint';
294
295
 
295
296
  export default [
296
- ark.configs.recommended, // ark/no-domain-infra-imports, no-raw-event-publish, require-publish-source
297
+ ark.configs.recommended,
298
+ // no-domain-infra-imports → config-driven layer edges (type-only + value)
299
+ // no-forbidden-globals → layer.forbiddenGlobals from ark.config.json
300
+ // no-raw-event-publish + require-publish-source → runtime event hygiene
297
301
  ];
298
302
  ```
299
303
 
300
- `recommended` deliberately omits **`ark/no-forbidden-globals`** (domain purity: no
301
- `fetch`, `Date.now`, `Math.random`, …). That rule is only correct when scoped to your
302
- domain directories — a global block would flag legitimate infrastructure code. Add it
303
- as its own block with a `files` glob matching your `DomainModel` layer:
304
-
305
- ```js
306
- import ark from 'arkgate/eslint';
304
+ **Parity notes (2.5+):**
307
305
 
308
- export default [
309
- ark.configs.recommended,
310
- {
311
- files: ['packages/*/domain/**', 'src/**/domain/**'], // your DomainModel layer paths
312
- plugins: { ark },
313
- rules: {
314
- 'ark/no-forbidden-globals': [
315
- 'error',
316
- { globals: ['fetch', 'process', 'Date.now', 'Math.random'] }, // match ark.config.json
317
- ],
318
- },
319
- },
320
- ];
321
- ```
306
+ - Relative imports are resolved to on-disk TS/JS targets; package bare imports are left to CI/TS.
307
+ - Type-only and value forbidden edges both error (same pass/fail as `arkgate-check`).
308
+ - `no-forbidden-globals` only applies when the file’s layer declares `forbiddenGlobals` (or you pass a `globals` option). Layers without a purity list are not inventively restricted.
309
+ - Without `ark.config.json`, `no-domain-infra-imports` falls back to a domain→infra path heuristic.
322
310
 
323
- Rule ids are `ark/<kebab-name>`. Keep the `globals` list in sync with the
324
- `forbiddenGlobals` on your `DomainModel` layer in `ark.config.json` so the editor and
325
- `ark-check` agree. All four rules are exported individually too (`ark.rules`) if you
326
- prefer to wire them by hand.
311
+ Rule ids are `ark/<kebab-name>`. Individual rules are also on `ark.rules` if you wire them by hand.
312
+ Prefer keeping editor + CI on the same `ark.config.json` do not maintain a parallel globals list unless you intentionally override.
327
313
 
328
314
  ## CI backstop
329
315
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "arkgate",
3
- "version": "2.4.0",
3
+ "version": "2.5.0",
4
4
  "description": "ArkGate — architecture co-pilot for AI TypeScript (write gate, CI gate, plan/loop)",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
package/server.json CHANGED
@@ -6,12 +6,12 @@
6
6
  "url": "https://github.com/pedroknigge/arkgate",
7
7
  "source": "github"
8
8
  },
9
- "version": "2.4.0",
9
+ "version": "2.5.0",
10
10
  "packages": [
11
11
  {
12
12
  "registryType": "npm",
13
13
  "identifier": "arkgate",
14
- "version": "2.4.0",
14
+ "version": "2.5.0",
15
15
  "runtimeHint": "npx",
16
16
  "transport": {
17
17
  "type": "stdio"