arkgate 4.8.7 → 4.8.9

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 (59) hide show
  1. package/CHANGELOG.md +92 -3
  2. package/README.md +41 -6
  3. package/bin/ark-check-runtime.mjs +22 -0
  4. package/bin/ark-dashboard.mjs +423 -0
  5. package/bin/ark-layer-match.mjs +25 -10
  6. package/bin/ark.mjs +51 -3
  7. package/bin/lib/agent-homes.mjs +1 -1
  8. package/bin/lib/analysis-engine.mjs +8 -8
  9. package/bin/lib/ark-order-sensors.mjs +103 -3
  10. package/bin/lib/config-extras.mjs +1 -0
  11. package/bin/lib/contract-smells.mjs +12 -6
  12. package/bin/lib/doctor-human.mjs +32 -7
  13. package/bin/lib/doctor-next-actions.mjs +21 -2
  14. package/bin/lib/gate-files.mjs +108 -22
  15. package/bin/lib/managed-upgrade.mjs +9 -1
  16. package/bin/lib/upgrade-command.mjs +17 -4
  17. package/dist/{configTypes-0eHpocR3.d.ts → configTypes-j7so8B4O.d.ts} +12 -0
  18. package/dist/{diagnosticCatalog-wDAH08gH.d.ts → diagnosticCatalog-BrkOiwCk.d.ts} +3 -3
  19. package/dist/eslint/index.cjs +5 -5
  20. package/dist/eslint/index.d.ts +6 -4
  21. package/dist/eslint/index.js +5 -5
  22. package/dist/index.cjs +30 -30
  23. package/dist/index.d.ts +13 -4
  24. package/dist/index.js +31 -31
  25. package/dist/nestjs/index.cjs +5 -5
  26. package/dist/nestjs/index.d.ts +3 -3
  27. package/dist/nestjs/index.js +5 -5
  28. package/dist/order/index.cjs +1 -1
  29. package/dist/order/index.d.ts +6 -2
  30. package/dist/order/index.js +1 -1
  31. package/dist/runtime/index.cjs +15 -15
  32. package/dist/runtime/index.d.ts +6 -6
  33. package/dist/runtime/index.js +15 -15
  34. package/dist/{types-BK47clMl.d.ts → types-Djbs3KjE.d.ts} +1 -1
  35. package/dist/{types-CwZ_oz1N.d.ts → types-tGhZUiGX.d.ts} +106 -2
  36. package/docs/README.md +13 -4
  37. package/docs/agent-guide.md +38 -2
  38. package/docs/ai-gates.md +13 -1
  39. package/docs/arkorder.md +41 -8
  40. package/docs/configuration.md +47 -12
  41. package/docs/develop.md +17 -8
  42. package/docs/enthusiast/README.md +13 -2
  43. package/docs/package-surface.md +20 -6
  44. package/docs/product-voice.md +25 -2
  45. package/docs/use.md +11 -3
  46. package/package.json +3 -1
  47. package/schemas/ark.config.schema.json +9 -0
  48. package/server.json +2 -2
  49. package/templates/agent-skills/README.md +1 -1
  50. package/templates/agent-skills/ark-adopt/SKILL.md +1 -0
  51. package/templates/agent-skills/ark-autopilot/SKILL.md +1 -1
  52. package/templates/agent-skills/ark-contract/SKILL.md +1 -1
  53. package/templates/agent-skills/ark-explore/SKILL.md +2 -2
  54. package/templates/agent-skills/ark-place/SKILL.md +1 -0
  55. package/templates/skills/ark-adopt.md +1 -0
  56. package/templates/skills/ark-autopilot.md +1 -1
  57. package/templates/skills/ark-contract.md +1 -1
  58. package/templates/skills/ark-explore.md +2 -2
  59. package/templates/skills/ark-place.md +1 -0
@@ -2,6 +2,18 @@
2
2
 
3
3
  **Write. Check. Ship.**
4
4
  **When the agent writes a bad import, the write doesn’t land. The same check fails the pull request.**
5
+
6
+ Not an API Gateway. Not a folder linter. If the check is not required on the PR, the config
7
+ is just documentation.
8
+
9
+ AI can build fast—and make a mess just as fast.
10
+
11
+ Keep the product easy to understand, change, and trust.
12
+
13
+ ArkGate stops bad shortcuts. ArkRules protects how each part should behave. ArkRun keeps work moving. ArkOrder protects the few big choices that should not change by accident.
14
+
15
+ Safer changes, fewer surprises, and extra protection only when you choose it.
16
+
5
17
  That is the product wedge (host hook + required CI). Skills name the next step after that.
6
18
  **Not the wedge:** the optional in-process **ArkRun** runtime (`arkgate/runtime`) and the
7
19
  optional **ArkOrder** pattern extra (`arkgate/order`).
@@ -25,7 +37,7 @@ hardening guide remains repository-hosted rather than duplicated in the gate tar
25
37
 
26
38
  | Surface | How you use it | Stability notes |
27
39
  |---------|----------------|-----------------|
28
- | **CLI** | `arkgate` / `arkgate-check` (aliases `ark` / `ark-check`) | Flags and human text may improve; **JSON output shapes** for `--json` (check, doctor, plan, coverage, recommend, **status**, **agents-md**) are stable within a major. Additive fields OK; removals/renames are major. From 4.2, `--require-gates` implies strict config and verifies semantic Ark AGENTS, project-rooted MCP/compact Codex registration, and fail-closed CI rather than file presence alone. `ark status --json` is the unified status snapshot. `ark agents-md` is the version-matched agent projection (non-authoritative). |
40
+ | **CLI** | `arkgate` / `arkgate-check` (aliases `ark` / `ark-check`); optional ArkRun **`ark-dashboard`** / **`arkgate-dashboard`** | Flags and human text may improve; **JSON output shapes** for `--json` (check, doctor, plan, coverage, recommend, **status**, **agents-md**) are stable within a major. Additive fields OK; removals/renames are major. From 4.2, `--require-gates` implies strict config and verifies semantic Ark AGENTS, project-rooted MCP/compact Codex registration, and fail-closed CI rather than file presence alone. `ark status --json` is the unified status snapshot. `ark agents-md` is the version-matched agent projection (non-authoritative). **Dashboard bins** poll an ArkRun inspector snapshot (ANSI + interval polling; `--url` / `--interval`); they are not a gate verdict. The main CLI also accepts `ark dashboard` / `arkgate dashboard` as a passthrough to those bins. |
29
41
  | **Host write boundaries** | Generated trusted PreToolUse/preToolUse hooks + `ark-mcp --hook`; inspect with doctor/status | Hard is always operation-scoped and runtime-evidenced. From 4.6.3, Codex CLI and local ChatGPT Desktop/App Server can hard-block a complete `apply_patch` sent as `tool_input.command`; `.codex/hooks.json` on disk remains unverified until a fresh covered invocation. Hosted tools, specialized hook opt-outs, shell/direct writes, incomplete reconstruction, and humans rely on required CI. Repair envelopes may emit, but Codex reinjection is not guaranteed. |
30
42
  | **Programmatic gate API** | `import { analyzeProject, loadContract, createAICodeGate, ... } from 'arkgate'` | The root export is the static gate/config/analysis contract listed below. It intentionally contains no runtime-kernel implementation. |
31
43
  | **Improvement compass (4.4; status honesty 4.5)** | `ark-check --doctor --json` → `doctor.improvementCompass`; human doctor section **Improvement compass (not a score)**; HTML report `data-advisory="improvementCompass"`. **`ark status --json` / MCP `ark_status`** project a thin `improvementCompass` residual map with explicit honesty **`mode`**: `full` \| `subset` \| `unavailable` (always `notAScore: true`). When `mode` is `full`, status residual lens **ids** are a **subset of** doctor residual for the same facts (report snapshot stores the thin slice after `--report`). Incomplete or missing session facts → `subset` / `unavailable` + `reasonCode` / `reason` — **never invent green residual**. Residual never flips `valid` / strict-merge / `goal.met`. When status mode ≠ full, run doctor for full 15-lens detail. | Additive schema `1.0`. Closed **15** lens ids (`soc`, `cohesion`, `coupling`, `srp`, `dip`, `ocp`, `encapsulation`, `modularity`, `scalability`, `resilience`, `security`, `maintainability`, `testability`, `domain`, `stack`) with status `ok` \| `residual` \| `not-instrumented` \| `out-of-scope`, evidence refs, optional `nextAction`, capped `topResidual`, always **`notAScore: true`**. Projection from existing smells / walls / cohesion / ArkRules / design-weak only — **never** a gate input. Out-of-scope locked for scalability, resilience, and app security (no residual invent from missing SAST/APM). Root API: `buildImprovementCompass` / `IMPROVEMENT_LENS_IDS`; status: `projectStatusImprovementCompass` / `STATUS_COMPASS_MODES`. |
@@ -177,9 +189,9 @@ claims. Static architecture enforcement does not depend on them.
177
189
 
178
190
  | Surface | Import path | Notes |
179
191
  |---------|-------------|--------|
180
- | **ArkRun kernel** | **`arkgate/runtime`** | Public brand **ArkRun**. Same npm package `arkgate` (ADR 0031). Factory `createStrictArkKernel` (each call is an isolated instance; no process-wide `getKernel()` singleton). Root export does **not** include the factory. Optional extra `arkRun` on schema `1.2+`. Event bus, intents, policies, sagas, event buffer, projections, and strict helpers. Managed components declare `uses` / `reactsTo` / `raises` / `sends` on `register()`; `getDependencyInformationPackage()` is a JSON snapshot of ids, lifetime, and declarations and never includes factories, live instances, or input DTOs (ADR 0023). `requestGraph()` slices that snapshot into **process** or **technical** graphs with optional `nodeIds`, `degreesOfSeparation`, and include/exclude query; `formatArkRunGraphMermaid()` (also `graph.mermaid`) is a helper string, never a score. `send()` is the transport port (local / localBlocking / broker); missing broker falls back to in-process local delivery, `ephemeral` defaults true, and **no cloud SDKs ship** in the package (ADR 0024). Opt-in `startInspector()` / `startArkRunInspector()` binds **`127.0.0.1` only**, refuses `NODE_ENV=production`, lazy-loads HTTP, and serves JSON snapshots, SSE, and `/graph` slices of the information package (no public / authless bind). **Shadow / replay / compare** (`shadowInformationPackage`, `compareInformationPackages`, `replayInformationPackages`) are in-memory helpers on that snapshot — not durable, not a second bus (ADR 0033). **Decision tape** `decisionTape` `{ xiHash, event, residual }` via `appendDecisionTape` (ADR 0034). Built-in stores are **InMemory reference only**. Branding ArkRun is not a production-durability claim. **`@arkgate/runtime` is deprecated** leftover 0.x (`experimental` dist-tag). |
192
+ | **ArkRun kernel** | **`arkgate/runtime`** | Public brand **ArkRun**. Same npm package `arkgate` (ADR 0031). Factory `createStrictArkKernel` (each call is an isolated instance; no process-wide `getKernel()` singleton). Root export does **not** include the factory. Optional extra `arkRun` on schema `1.2+`. Event bus, intents, policies, sagas, event buffer, projections, and strict helpers. Managed components declare `uses` / `reactsTo` / `raises` / `sends` on `register()`; `getDependencyInformationPackage()` is a JSON snapshot of ids, lifetime, and declarations and never includes factories, live instances, or input DTOs (ADR 0023). `requestGraph()` slices that snapshot into **process** or **technical** graphs with optional `nodeIds`, `degreesOfSeparation`, and include/exclude query; `formatArkRunGraphMermaid()` (also `graph.mermaid`) is a helper string, never a score. `send()` is the transport port (local / localBlocking / broker); missing broker falls back to in-process local delivery, `ephemeral` defaults true, and **no cloud SDKs ship** in the package (ADR 0024). Opt-in `startInspector()` / `startArkRunInspector()` binds **`127.0.0.1` only**, refuses `NODE_ENV=production`, lazy-loads HTTP, and serves JSON snapshots, SSE, `/graph` slices of the information package, plus queue monitors **`GET /outbox`** and **`GET /workflows`** (full counts + sanitized samples capped at 32; no full event payloads; missing ports are unavailable; no public / authless bind). Snapshot `hardening.durability` classifies the explicit outbox/audit/workflow store ports; default `InMemory*` stores stay visibly `memory`, never durable. Dual bins **`ark-dashboard`** / **`arkgate-dashboard`** poll those JSON facts (ANSI TUI in `bin/` only — presentation is not in the kernel); `ark dashboard` / `arkgate dashboard` dispatch to the same executable. **Shadow / replay / compare** (`shadowInformationPackage`, `compareInformationPackages`, `replayInformationPackages`) are in-memory helpers on that snapshot — not durable, not a second bus (ADR 0033). **Decision tape** `decisionTape` `{ xiHash, event, residual }` via `appendDecisionTape` (ADR 0034). Built-in stores are **InMemory reference only**. Branding ArkRun is not a production-durability claim. **`@arkgate/runtime` is deprecated** leftover 0.x (`experimental` dist-tag). |
181
193
  | **NestJS adapter** | **`arkgate/nestjs`** | Experimental optional peer `@nestjs/common` for the ArkRun kernel. Same npm package. `@arkgate/runtime/nestjs` is deprecated. |
182
- | **ArkOrder plane** | **`arkgate/order`** | Public brand **ArkOrder**. Same npm package `arkgate` (ADR 0030) — not `@arkgate/order`. Factory `createOrderPlane`. Valved verbs: `release` / `project` / `ingest` / `proposeRelease` / `apply` / `refreshSigma`. No `update`. First freeze is `release()`; later ξ change is `apply` (`ARKORDER_UNVALVED_RELEASE`). Haken: few slow keys; ingest residual `absorb | escalate_up | hold` + closed `reasonCode`; empty blast fails closed. Capacity pack as data (`kind` / `sigmaKey` / `payloadKey` / `op`). Factory options (not config keys): `informationBudget.cannotObserve`, `sigmaMaxAgeMs`, `store` (`ReleaseStore` / `createMemoryReleaseStore`), `catalogDigest`. Thin travel: `ingestTravelAction` absorb→`send` / escalate_up human→`raises`. `IngestEscalate.target` includes `human`. Root `arkgate` export does **not** include the factory. Optional extra `arkOrder` on schema `1.3`. In-memory; not durable; does not close K01. Does not replace ArkRun. Runtime half (shadow/replay/compare + `decisionTape` / `appendDecisionTape`) is ArkRun (ADR 0033 / 0034). Canonical: [ArkOrder](arkorder.md). |
194
+ | **ArkOrder plane** | **`arkgate/order`** | Public brand **ArkOrder**. Same npm package `arkgate` (ADR 0030) — not `@arkgate/order`. Factory `createOrderPlane`. Valved verbs: `release` / `project` / `ingest` / `proposeRelease` / `apply` / `refreshSigma` / `restore`. No `update`. First freeze is `release()`; later ξ change is `apply` (`ARKORDER_UNVALVED_RELEASE`). `restore(release)` installs a previously frozen `Release` (hash remains identity; not durable). `hashOf` / `hashReleasePayload` verify a stored hash without a second freeze. Default Kernel clock is `Date.now()`. Optional `arkOrder.appliesTo` globs; `maxXiKeys` caps one `release()`, not `xiKeys.length`. Haken: few slow keys; ingest residual `absorb | escalate_up | hold` + closed `reasonCode`; empty blast fails closed. Capacity pack as data (`kind` / `sigmaKey` / `payloadKey` / `op`). Factory options (not config keys): `informationBudget.cannotObserve`, `sigmaMaxAgeMs`, `store` (`ReleaseStore` / `createMemoryReleaseStore`), `catalogDigest`. Thin travel: `ingestTravelAction` absorb→`send` / escalate_up human→`raises`. `IngestEscalate.target` includes `human`. Root `arkgate` export does **not** include the factory. Optional extra `arkOrder` on schema `1.3`. In-memory; not durable; does not close K01. Does not replace ArkRun. Runtime half (shadow/replay/compare + `decisionTape` / `appendDecisionTape`) is ArkRun (ADR 0033 / 0034). Billing gallery is git-only: [examples/arkorder-billing](https://github.com/pedroknigge/arkgate/tree/main/examples/arkorder-billing) (not in the npm tarball). Canonical: [ArkOrder](arkorder.md). |
183
195
 
184
196
  ---
185
197
 
@@ -189,7 +201,7 @@ claims. Static architecture enforcement does not depend on them.
189
201
  import { createAICodeGate } from 'arkgate';
190
202
  import { createStrictArkKernel, createStrictArkKernelFromConfig } from 'arkgate/runtime';
191
203
  import { ArkModule, InjectArk } from 'arkgate/nestjs';
192
- import { createOrderPlane } from 'arkgate/order';
204
+ import { createOrderPlane, hashOf } from 'arkgate/order';
193
205
  ```
194
206
 
195
207
  One install: `npm install arkgate`. `@arkgate/runtime` is deprecated.
@@ -253,8 +265,10 @@ production deployment would need to satisfy; it is not a readiness certification
253
265
  ## Release notes (maintainers)
254
266
 
255
267
  Ship notes for a version live under [releases/](https://github.com/pedroknigge/arkgate/tree/main/docs/releases)
256
- (current tree prepared: [4.8.7.md](https://github.com/pedroknigge/arkgate/blob/main/docs/releases/4.8.7.md);
257
- current published: [4.8.6.md](https://github.com/pedroknigge/arkgate/blob/main/docs/releases/4.8.6.md);
268
+ (current tree candidate: [4.8.9.md](https://github.com/pedroknigge/arkgate/blob/main/docs/releases/4.8.9.md), prepared and not published;
269
+ current published: [4.8.8.md](https://github.com/pedroknigge/arkgate/blob/main/docs/releases/4.8.8.md);
270
+ prior published: [4.8.7.md](https://github.com/pedroknigge/arkgate/blob/main/docs/releases/4.8.7.md);
271
+ prior published: [4.8.6.md](https://github.com/pedroknigge/arkgate/blob/main/docs/releases/4.8.6.md);
258
272
  prior published: [4.8.5.md](https://github.com/pedroknigge/arkgate/blob/main/docs/releases/4.8.5.md);
259
273
  prior published: [4.8.4.md](https://github.com/pedroknigge/arkgate/blob/main/docs/releases/4.8.4.md);
260
274
  prior published: [4.8.3.md](https://github.com/pedroknigge/arkgate/blob/main/docs/releases/4.8.3.md);
@@ -45,12 +45,15 @@ human copy says **status**.
45
45
 
46
46
  ## Locked first-contact
47
47
 
48
- On README, use, develop, the docs hub, and the product site:
48
+ On the eight canonical public openings `README.md`, `docs/use.md`,
49
+ `docs/develop.md`, `docs/README.md`, `docs/enthusiast/README.md`,
50
+ `docs/agent-guide.md`, `docs/ai-gates.md`, and `docs/package-surface.md` — use:
49
51
 
50
52
  1. **Verbs:** `Write. Check. Ship.`
51
53
  2. **Deny:** `When the agent writes a bad import, the write doesn’t land. The same check fails the pull request.`
52
54
  3. **Not-that (below the fold, one line):** `Not an API Gateway. Not a folder linter. If the check is not required on the PR, the config is just documentation.`
53
- 4. **Nouns (once, below the deny):** ArkGate is import rules. ArkRules is optional policies. ArkRun is an optional experimental runtime. ArkOrder is the extra that stops the agent from rewriting the few slow product decisions (plan, protocol) as CRUD named when the consumer opts in, never as the first noun.
55
+ 4. **Story:** the exact four-paragraph introduction below, with no visible heading or labels.
56
+ 5. **Technical nouns (below the introduction):** ArkGate is import rules. ArkRules is optional policies. ArkRun is an optional experimental runtime. ArkOrder is the extra that stops the agent from rewriting the few slow product decisions (plan, protocol) as CRUD — named when the consumer opts in, never as the first noun.
54
57
 
55
58
  Do not lead with folders, `ark.config.json`, “contract”, “gate”, “house”, or “doctor”
56
59
  as the first noun. Historical: `If the AI writes an illegal import, the write is rejected`
@@ -61,6 +64,26 @@ ADR 0001 keeps the public name **ArkGate**.
61
64
 
62
65
  ---
63
66
 
67
+ ## Unlabeled four-paragraph introduction
68
+
69
+ STAR is an internal writing method only. Public openings never print the formula's
70
+ name, a heading for this block, bullets, or Situation/Task/Action/Result labels.
71
+ Use these exact four paragraphs and put technical precision below them.
72
+
73
+ AI can build fast—and make a mess just as fast.
74
+
75
+ Keep the product easy to understand, change, and trust.
76
+
77
+ ArkGate stops bad shortcuts. ArkRules protects how each part should behave. ArkRun keeps work moving. ArkOrder protects the few big choices that should not change by accident.
78
+
79
+ Safer changes, fewer surprises, and extra protection only when you choose it.
80
+
81
+ Do not add technical terms to these four paragraphs. In the next section, explain that
82
+ ArkGate checks imports, ArkRules is optional, ArkRun is experimental and in-memory,
83
+ and ArkOrder is optional and for a few slow product decisions.
84
+
85
+ ---
86
+
64
87
  ## How it sounds
65
88
 
66
89
  Short. Product nouns. Scene English (Vercel / Supabase / GitHub Checks).
package/docs/use.md CHANGED
@@ -2,13 +2,21 @@
2
2
 
3
3
  **Write. Check. Ship.**
4
4
 
5
- For **anyone** shipping TypeScript with an AI coding agent.
6
-
7
5
  **When the agent writes a bad import, the write doesn’t land. The same check fails the pull request.**
8
6
 
9
7
  Not an API Gateway. Not a folder linter. If the check is not required on the PR, the config
10
8
  is just documentation.
11
9
 
10
+ AI can build fast—and make a mess just as fast.
11
+
12
+ Keep the product easy to understand, change, and trust.
13
+
14
+ ArkGate stops bad shortcuts. ArkRules protects how each part should behave. ArkRun keeps work moving. ArkOrder protects the few big choices that should not change by accident.
15
+
16
+ Safer changes, fewer surprises, and extra protection only when you choose it.
17
+
18
+ For **anyone** shipping TypeScript with an AI coding agent.
19
+
12
20
  ---
13
21
 
14
22
  ## In one minute
@@ -81,7 +89,7 @@ The config only binds when the write doesn’t land and CI is required.
81
89
  | **ArkGate** (layers) | Import rules. The write doesn’t land. The PR fails. | Always — this is the product |
82
90
  | **ArkRules** | Optional policies *inside* a layer. | Off until you turn it on (start may ship advisory templates) |
83
91
  | **ArkRun** | Optional experimental runtime (`arkgate/runtime`) | Off. In-memory. Not Postgres. |
84
- | **ArkOrder** | Stops the agent rewriting the few slow product decisions as CRUD (`arkgate/order`). Library + sensors, [not a service](arkorder.md). Valve: `proposeRelease` then `apply`; `refreshSigma`; ingest residual; capacity pack; `ReleaseStore`; ArkRun `decisionTape`. ArkOrder freezes the pattern through a valve. ArkRun is how the residual travels. | Off. Name `xiKeys` (plan / protocol, not `projectId`). Invoices and seats still flow. In-memory. Not durable. |
92
+ | **ArkOrder** | Stops the agent rewriting the few slow product decisions as CRUD (`arkgate/order`). Library + sensors, [not a service](arkorder.md). Valve: `proposeRelease` then `apply`; `refreshSigma`; ingest residual; capacity pack; `ReleaseStore`; ArkRun `decisionTape`. ArkOrder freezes the pattern through a valve. ArkRun is how the residual travels. | Off. Name `xiKeys` (plan / protocol, not `projectId`). Derive recomputable statuses; invoices and seats still flow. In-memory. Not durable. |
85
93
 
86
94
  Start always gives you **layers**. Compact starters do **not** turn on ArkRun or
87
95
  ArkOrder. No extras is fine — only ArkGate runs. Leftovers are labeled
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "arkgate",
3
- "version": "4.8.7",
3
+ "version": "4.8.9",
4
4
  "description": "When the agent writes a bad import, the write doesn’t land. The same check fails the pull request.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -55,9 +55,11 @@
55
55
  "bin": {
56
56
  "arkgate": "bin/ark.mjs",
57
57
  "arkgate-check": "bin/ark-check.mjs",
58
+ "arkgate-dashboard": "bin/ark-dashboard.mjs",
58
59
  "arkgate-mcp": "bin/ark-mcp.mjs",
59
60
  "ark": "bin/ark.mjs",
60
61
  "ark-check": "bin/ark-check.mjs",
62
+ "ark-dashboard": "bin/ark-dashboard.mjs",
61
63
  "ark-mcp": "bin/ark-mcp.mjs"
62
64
  },
63
65
  "mcpName": "io.github.pedroknigge/arkgate",
@@ -954,6 +954,15 @@
954
954
  },
955
955
  "uniqueItems": true,
956
956
  "default": []
957
+ },
958
+ "appliesTo": {
959
+ "type": "array",
960
+ "items": {
961
+ "type": "string",
962
+ "minLength": 1
963
+ },
964
+ "uniqueItems": true,
965
+ "default": []
957
966
  }
958
967
  }
959
968
  }
package/server.json CHANGED
@@ -6,12 +6,12 @@
6
6
  "url": "https://github.com/pedroknigge/arkgate",
7
7
  "source": "github"
8
8
  },
9
- "version": "4.8.7",
9
+ "version": "4.8.9",
10
10
  "packages": [
11
11
  {
12
12
  "registryType": "npm",
13
13
  "identifier": "arkgate",
14
- "version": "4.8.7",
14
+ "version": "4.8.9",
15
15
  "runtimeHint": "npx",
16
16
  "transport": {
17
17
  "type": "stdio"
@@ -7,7 +7,7 @@
7
7
  This directory is the **Agent Skills–compatible** packaging of the same **13**
8
8
  `/ark-*` skills shipped as flat templates for Ark install. **No new skill names.**
9
9
 
10
- Package version when last generated context: **arkgate@4.8.6**
10
+ Package version when last generated context: **arkgate@4.8.9**
11
11
  Schema: agent-skills package contract `1.0`
12
12
 
13
13
  ## Skills (frozen catalog)
@@ -187,6 +187,7 @@ ArkGate has **always-on Layers** plus opt-in extras. The user chooses extras; yo
187
187
  ```
188
188
 
189
189
  - `xiKeys` are meaning, not membership. `projectId` / `orgId` do not belong. If `proposeRelease` throws empty blast, that key does not order anything. After the first `release()`, change ξ with `proposeRelease` then `apply` — not a second `release()` (`ARKORDER_UNVALVED_RELEASE`). `refreshSigma`; ingest residual `absorb | escalate_up | hold` + `reasonCode`; capacity pack as data; `createMemoryReleaseStore`; `ingestTravelAction`; ArkRun `decisionTape`.
190
+ - Before writing a name, drop the candidate and ask: can current σ and s reconstruct it uniquely? Then ask direction: does the key slave ingest, or does ingest determine the status? If it is recomputable or ingest determines it (`paid`, `overdue`, `atCapacity`, or `approved` folded from signatures), derive it as a projection or ingest fold; invoices and seats stay on ingest. The check remains silent on semantic entailment.
190
191
  - A use-case that `prisma.*.update({ plan })` while `plan` is in `xiKeys` is **[ArkOrder]** `ARKORDER_XI_FIELD_WRITE`. Invoices and seats still flow through `ingest`.
191
192
 
192
193
  - Do **not** put `arkOrder` on the compact starter / `ark start` scaffold. Domain stays plane-free. Import `createOrderPlane` from `arkgate/order` (same npm package).
@@ -147,7 +147,7 @@ When `arkRun` is present:
147
147
 
148
148
  ### Autopilot + ArkOrder
149
149
  When `arkOrder` is present:
150
- - Grind skip clusters with judgment: `ARKORDER_MISSING_PLANE` / `ARKORDER_KERNEL_IN_DOMAIN` / `ARKORDER_GENERIC_UPDATE` / `ARKORDER_TOO_MANY_PARAMS` / `ARKORDER_INGEST_WRITES_XI` / `ARKORDER_XI_FIELD_WRITE` / `ARKORDER_UNVALVED_RELEASE`. First freeze with `release()`; later ξ change is `proposeRelease` then `apply`. `refreshSigma`; ingest residual `absorb | escalate_up | hold` + `reasonCode`; capacity pack; `createMemoryReleaseStore`; `ingestTravelAction`; ArkRun `decisionTape`. Never `update`/`patch`/`set`. Name `xiKeys`; do not persist those keys from a use-case. Doctor / status `arkOrder` is `notAScore`.
150
+ - Grind skip clusters with judgment: `ARKORDER_MISSING_PLANE` / `ARKORDER_KERNEL_IN_DOMAIN` / `ARKORDER_GENERIC_UPDATE` / `ARKORDER_TOO_MANY_PARAMS` / `ARKORDER_INGEST_WRITES_XI` / `ARKORDER_XI_FIELD_WRITE` / `ARKORDER_UNVALVED_RELEASE`. First freeze with `release()`; later ξ change is `proposeRelease` then `apply`. `refreshSigma`; ingest residual `absorb | escalate_up | hold` + `reasonCode`; capacity pack; `createMemoryReleaseStore`; `ingestTravelAction`; ArkRun `decisionTape`. Never `update`/`patch`/`set`. Name `xiKeys`; do not persist those keys from a use-case. Do not “fix” a derived status by adding it to `xiKeys`; that institutionalizes the skip, so derive it on read or fold it from ingest. Doctor / status `arkOrder` is `notAScore`.
151
151
  - Extra off → `/ark-adopt` (advisory). Do not invent `/ark-order`.
152
152
  - Skills never enforce.
153
153
 
@@ -45,7 +45,7 @@ Label findings **`[Layer]`** vs **`[ArkRules]`** vs **`[ArkRun]`** vs **`[ArkOrd
45
45
 
46
46
  Application / Features may declare advisory **`writes-via-aggregate`**: a use-case that imports a persistence driver and calls `.insert` / `.create` / `INSERT INTO` is the skip. Persistence adapters stay the write edge. Do not add `Externals/` or `admission.ts` as contract law.
47
47
 
48
- When `arkOrder` is on, name **`xiKeys`** (3–5 slow product decisions). Membership ids are not keys. A use-case that persists those keys is `ARKORDER_XI_FIELD_WRITE`. First freeze is `release()`; later ξ is `proposeRelease` then `apply`; `refreshSigma`; ingest residual `absorb | escalate_up | hold` + `reasonCode`; capacity pack as data; in-memory `ReleaseStore`; ArkRun `decisionTape`. Copy [examples/arkorder-billing/](../../../examples/arkorder-billing/) and rename the three keys.
48
+ When `arkOrder` is on, name **`xiKeys`** (3–5 slow product decisions). Membership ids and recomputable statuses are not keys: derive a status on read or fold it from ingest instead. A use-case that persists those keys is `ARKORDER_XI_FIELD_WRITE`. First freeze is `release()`; later ξ is `proposeRelease` then `apply`; `refreshSigma`; ingest residual `absorb | escalate_up | hold` + `reasonCode`; capacity pack as data; in-memory `ReleaseStore`; ArkRun `decisionTape`. The billing gallery lives on GitHub, not in the npm tarball: [examples/arkorder-billing](https://github.com/pedroknigge/arkgate/tree/main/examples/arkorder-billing). Rename the three keys. The check remains silent on semantic entailment.
49
49
 
50
50
  ## Subagent fan-out (optional, host-dependent)
51
51
 
@@ -168,7 +168,7 @@ ArkGate has **always-on Layers** plus opt-in extras. The user chooses extras; yo
168
168
  ### Explore + extras
169
169
  - Map extras when present; never write `arkRun` / `arkOrder`. Extra off → residual `n/a` / silent.
170
170
  - When `arkOrder` is on, name the valve: first freeze `release()`; later ξ is `proposeRelease` then `apply`; `refreshSigma`; ingest residual `absorb | escalate_up | hold` + `reasonCode`; capacity pack as data; in-memory `ReleaseStore` (`createMemoryReleaseStore`); thin travel `ingestTravelAction`. ArkRun residual may include information package `decisionTape` `{ xiHash, event, residual }`.
171
- - Field path may name `examples/arkorder-billing/` (ArkOrder fixture — map only). First extra write is `/ark-adopt`; grind is `/ark-autopilot`.
171
+ - Field path may name the ArkOrder gallery on GitHub (`https://github.com/pedroknigge/arkgate/tree/main/examples/arkorder-billing`; not in the npm tarball — map only). First extra write is `/ark-adopt`; grind is `/ark-autopilot`.
172
172
 
173
173
  ## Output mode (pick one — do not invent a fourth)
174
174
 
@@ -297,7 +297,7 @@ When `examples/`, `templates/`, gallery starters, eval fixtures, or docs claim
297
297
  3. Diff **rule strength** across archetypes (missing denies = soft false-green for consumers).
298
298
  4. Note import style vs package surface docs (`arkgate` root barrel vs preferred subpath).
299
299
  5. Flag **false promises**: demo fails under its own check, or green with a hollow contract.
300
- 6. When extras are on, label residual `[ArkRun]` / `[ArkOrder]`. Field path may name `examples/arkorder-billing/`. Never write extras from this skill.
300
+ 6. When extras are on, label residual `[ArkRun]` / `[ArkOrder]`. Field path may name the ArkOrder gallery on GitHub (`https://github.com/pedroknigge/arkgate/tree/main/examples/arkorder-billing`; not in the npm tarball). Never write extras from this skill.
301
301
 
302
302
  If the repo is a **pure app** (no examples): state **Field path: internal** and do one of:
303
303
  - Name the **norm for new code** that the residual implies (e.g. “no new `platform/db` in routes”), or
@@ -157,6 +157,7 @@ When `arkOrder` is present on the architecture config:
157
157
  - First freeze ξ with `release()`; later ξ change is `proposeRelease` then `apply` (`ARKORDER_UNVALVED_RELEASE`). `refreshSigma` for saldo. Field `ingest()` returns `absorb | escalate_up | hold` bound to `xiHash` + `reasonCode`; never a Release. Capacity pack as data; `createMemoryReleaseStore`; `ingestTravelAction`; ArkRun `decisionTape`. No `update`/`patch`/`set`.
158
158
  - Call the factory only inside `arkOrder.planeRoots`. Empty roots in `enforced` mode is `ARKORDER_MISSING_PLANE`.
159
159
  - Named slow keys live in `arkOrder.xiKeys`. A managed-layer Prisma/pg write of those keys is `ARKORDER_XI_FIELD_WRITE` — absorb with `ingest` or change the pattern with `proposeRelease` then `apply`.
160
+ - A recomputable status is not a new `xiKeys` entry or a `proposeRelease`: place it as a read projection or an ingest fold. If slow-key naming remains unresolved, return to `/ark-adopt` and run the elimination test before writing the config.
160
161
  - Skip clusters (`ARKORDER_MISSING_PLANE` / `ARKORDER_KERNEL_IN_DOMAIN` / `ARKORDER_GENERIC_UPDATE` / `ARKORDER_TOO_MANY_PARAMS` / `ARKORDER_INGEST_WRITES_XI` / `ARKORDER_XI_FIELD_WRITE`): place this artifact, then grind via `/ark-autopilot`. Extra not on → `/ark-adopt`. Do not invent `/ark-order`.
161
162
  - Absence of the extra is valid. Do not invent `/ark-order`. Skills never enforce.
162
163
 
@@ -187,6 +187,7 @@ ArkGate has **always-on Layers** plus opt-in extras. The user chooses extras; yo
187
187
  ```
188
188
 
189
189
  - `xiKeys` are meaning, not membership. `projectId` / `orgId` do not belong. If `proposeRelease` throws empty blast, that key does not order anything. After the first `release()`, change ξ with `proposeRelease` then `apply` — not a second `release()` (`ARKORDER_UNVALVED_RELEASE`). `refreshSigma`; ingest residual `absorb | escalate_up | hold` + `reasonCode`; capacity pack as data; `createMemoryReleaseStore`; `ingestTravelAction`; ArkRun `decisionTape`.
190
+ - Before writing a name, drop the candidate and ask: can current σ and s reconstruct it uniquely? Then ask direction: does the key slave ingest, or does ingest determine the status? If it is recomputable or ingest determines it (`paid`, `overdue`, `atCapacity`, or `approved` folded from signatures), derive it as a projection or ingest fold; invoices and seats stay on ingest. The check remains silent on semantic entailment.
190
191
  - A use-case that `prisma.*.update({ plan })` while `plan` is in `xiKeys` is **[ArkOrder]** `ARKORDER_XI_FIELD_WRITE`. Invoices and seats still flow through `ingest`.
191
192
 
192
193
  - Do **not** put `arkOrder` on the compact starter / `ark start` scaffold. Domain stays plane-free. Import `createOrderPlane` from `arkgate/order` (same npm package).
@@ -147,7 +147,7 @@ When `arkRun` is present:
147
147
 
148
148
  ### Autopilot + ArkOrder
149
149
  When `arkOrder` is present:
150
- - Grind skip clusters with judgment: `ARKORDER_MISSING_PLANE` / `ARKORDER_KERNEL_IN_DOMAIN` / `ARKORDER_GENERIC_UPDATE` / `ARKORDER_TOO_MANY_PARAMS` / `ARKORDER_INGEST_WRITES_XI` / `ARKORDER_XI_FIELD_WRITE` / `ARKORDER_UNVALVED_RELEASE`. First freeze with `release()`; later ξ change is `proposeRelease` then `apply`. `refreshSigma`; ingest residual `absorb | escalate_up | hold` + `reasonCode`; capacity pack; `createMemoryReleaseStore`; `ingestTravelAction`; ArkRun `decisionTape`. Never `update`/`patch`/`set`. Name `xiKeys`; do not persist those keys from a use-case. Doctor / status `arkOrder` is `notAScore`.
150
+ - Grind skip clusters with judgment: `ARKORDER_MISSING_PLANE` / `ARKORDER_KERNEL_IN_DOMAIN` / `ARKORDER_GENERIC_UPDATE` / `ARKORDER_TOO_MANY_PARAMS` / `ARKORDER_INGEST_WRITES_XI` / `ARKORDER_XI_FIELD_WRITE` / `ARKORDER_UNVALVED_RELEASE`. First freeze with `release()`; later ξ change is `proposeRelease` then `apply`. `refreshSigma`; ingest residual `absorb | escalate_up | hold` + `reasonCode`; capacity pack; `createMemoryReleaseStore`; `ingestTravelAction`; ArkRun `decisionTape`. Never `update`/`patch`/`set`. Name `xiKeys`; do not persist those keys from a use-case. Do not “fix” a derived status by adding it to `xiKeys`; that institutionalizes the skip, so derive it on read or fold it from ingest. Doctor / status `arkOrder` is `notAScore`.
151
151
  - Extra off → `/ark-adopt` (advisory). Do not invent `/ark-order`.
152
152
  - Skills never enforce.
153
153
 
@@ -45,7 +45,7 @@ Label findings **`[Layer]`** vs **`[ArkRules]`** vs **`[ArkRun]`** vs **`[ArkOrd
45
45
 
46
46
  Application / Features may declare advisory **`writes-via-aggregate`**: a use-case that imports a persistence driver and calls `.insert` / `.create` / `INSERT INTO` is the skip. Persistence adapters stay the write edge. Do not add `Externals/` or `admission.ts` as contract law.
47
47
 
48
- When `arkOrder` is on, name **`xiKeys`** (3–5 slow product decisions). Membership ids are not keys. A use-case that persists those keys is `ARKORDER_XI_FIELD_WRITE`. First freeze is `release()`; later ξ is `proposeRelease` then `apply`; `refreshSigma`; ingest residual `absorb | escalate_up | hold` + `reasonCode`; capacity pack as data; in-memory `ReleaseStore`; ArkRun `decisionTape`. Copy [examples/arkorder-billing/](../../../examples/arkorder-billing/) and rename the three keys.
48
+ When `arkOrder` is on, name **`xiKeys`** (3–5 slow product decisions). Membership ids and recomputable statuses are not keys: derive a status on read or fold it from ingest instead. A use-case that persists those keys is `ARKORDER_XI_FIELD_WRITE`. First freeze is `release()`; later ξ is `proposeRelease` then `apply`; `refreshSigma`; ingest residual `absorb | escalate_up | hold` + `reasonCode`; capacity pack as data; in-memory `ReleaseStore`; ArkRun `decisionTape`. The billing gallery lives on GitHub, not in the npm tarball: [examples/arkorder-billing](https://github.com/pedroknigge/arkgate/tree/main/examples/arkorder-billing). Rename the three keys. The check remains silent on semantic entailment.
49
49
 
50
50
  ## Subagent fan-out (optional, host-dependent)
51
51
 
@@ -168,7 +168,7 @@ ArkGate has **always-on Layers** plus opt-in extras. The user chooses extras; yo
168
168
  ### Explore + extras
169
169
  - Map extras when present; never write `arkRun` / `arkOrder`. Extra off → residual `n/a` / silent.
170
170
  - When `arkOrder` is on, name the valve: first freeze `release()`; later ξ is `proposeRelease` then `apply`; `refreshSigma`; ingest residual `absorb | escalate_up | hold` + `reasonCode`; capacity pack as data; in-memory `ReleaseStore` (`createMemoryReleaseStore`); thin travel `ingestTravelAction`. ArkRun residual may include information package `decisionTape` `{ xiHash, event, residual }`.
171
- - Field path may name `examples/arkorder-billing/` (ArkOrder fixture — map only). First extra write is `/ark-adopt`; grind is `/ark-autopilot`.
171
+ - Field path may name the ArkOrder gallery on GitHub (`https://github.com/pedroknigge/arkgate/tree/main/examples/arkorder-billing`; not in the npm tarball — map only). First extra write is `/ark-adopt`; grind is `/ark-autopilot`.
172
172
 
173
173
  ## Output mode (pick one — do not invent a fourth)
174
174
 
@@ -297,7 +297,7 @@ When `examples/`, `templates/`, gallery starters, eval fixtures, or docs claim
297
297
  3. Diff **rule strength** across archetypes (missing denies = soft false-green for consumers).
298
298
  4. Note import style vs package surface docs (`arkgate` root barrel vs preferred subpath).
299
299
  5. Flag **false promises**: demo fails under its own check, or green with a hollow contract.
300
- 6. When extras are on, label residual `[ArkRun]` / `[ArkOrder]`. Field path may name `examples/arkorder-billing/`. Never write extras from this skill.
300
+ 6. When extras are on, label residual `[ArkRun]` / `[ArkOrder]`. Field path may name the ArkOrder gallery on GitHub (`https://github.com/pedroknigge/arkgate/tree/main/examples/arkorder-billing`; not in the npm tarball). Never write extras from this skill.
301
301
 
302
302
  If the repo is a **pure app** (no examples): state **Field path: internal** and do one of:
303
303
  - Name the **norm for new code** that the residual implies (e.g. “no new `platform/db` in routes”), or
@@ -157,6 +157,7 @@ When `arkOrder` is present on the architecture config:
157
157
  - First freeze ξ with `release()`; later ξ change is `proposeRelease` then `apply` (`ARKORDER_UNVALVED_RELEASE`). `refreshSigma` for saldo. Field `ingest()` returns `absorb | escalate_up | hold` bound to `xiHash` + `reasonCode`; never a Release. Capacity pack as data; `createMemoryReleaseStore`; `ingestTravelAction`; ArkRun `decisionTape`. No `update`/`patch`/`set`.
158
158
  - Call the factory only inside `arkOrder.planeRoots`. Empty roots in `enforced` mode is `ARKORDER_MISSING_PLANE`.
159
159
  - Named slow keys live in `arkOrder.xiKeys`. A managed-layer Prisma/pg write of those keys is `ARKORDER_XI_FIELD_WRITE` — absorb with `ingest` or change the pattern with `proposeRelease` then `apply`.
160
+ - A recomputable status is not a new `xiKeys` entry or a `proposeRelease`: place it as a read projection or an ingest fold. If slow-key naming remains unresolved, return to `/ark-adopt` and run the elimination test before writing the config.
160
161
  - Skip clusters (`ARKORDER_MISSING_PLANE` / `ARKORDER_KERNEL_IN_DOMAIN` / `ARKORDER_GENERIC_UPDATE` / `ARKORDER_TOO_MANY_PARAMS` / `ARKORDER_INGEST_WRITES_XI` / `ARKORDER_XI_FIELD_WRITE`): place this artifact, then grind via `/ark-autopilot`. Extra not on → `/ark-adopt`. Do not invent `/ark-order`.
161
162
  - Absence of the extra is valid. Do not invent `/ark-order`. Skills never enforce.
162
163