arkgate 4.8.5 → 4.8.6
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 +33 -2
- package/README.md +15 -9
- package/bin/lib/analysis-engine.mjs +4 -4
- package/bin/lib/ark-order-invariants.mjs +163 -14
- package/bin/lib/ark-order-types.mjs +3 -0
- package/bin/lib/diagnostic-catalog.mjs +5 -4
- package/bin/lib/remediation.mjs +11 -5
- package/dist/{diagnosticCatalog-DMO30svh.d.ts → diagnosticCatalog-D_DI7qrZ.d.ts} +1 -1
- package/dist/eslint/index.cjs +1 -1
- package/dist/eslint/index.js +1 -1
- package/dist/index.cjs +11 -11
- package/dist/index.d.ts +2 -2
- package/dist/index.js +10 -10
- package/dist/nestjs/index.cjs +5 -5
- package/dist/nestjs/index.d.ts +1 -1
- package/dist/nestjs/index.js +5 -5
- package/dist/order/index.cjs +1 -1
- package/dist/order/index.d.ts +61 -10
- package/dist/order/index.js +1 -1
- package/dist/runtime/index.cjs +11 -11
- package/dist/runtime/index.d.ts +3 -3
- package/dist/runtime/index.js +11 -11
- package/dist/{types-CzE6LMaW.d.ts → types-DrqsOiTY.d.ts} +21 -6
- package/docs/README.md +5 -4
- package/docs/agent-guide.md +2 -0
- package/docs/ai-gates.md +5 -2
- package/docs/arkorder.md +32 -14
- package/docs/configuration.md +5 -3
- package/docs/develop.md +7 -2
- package/docs/diagnostics.md +15 -5
- package/docs/package-surface.md +13 -10
- package/docs/product-voice.md +3 -3
- package/docs/use.md +1 -1
- package/package.json +1 -1
- package/server.json +2 -2
- package/templates/agent-skills/README.md +1 -1
- package/templates/agent-skills/ark-adopt/SKILL.md +4 -4
- package/templates/agent-skills/ark-architect/SKILL.md +1 -1
- package/templates/agent-skills/ark-autopilot/SKILL.md +4 -4
- package/templates/agent-skills/ark-contract/SKILL.md +1 -1
- package/templates/agent-skills/ark-coverage/SKILL.md +3 -2
- package/templates/agent-skills/ark-explain/SKILL.md +3 -2
- package/templates/agent-skills/ark-explore/SKILL.md +3 -2
- package/templates/agent-skills/ark-fix/SKILL.md +1 -1
- package/templates/agent-skills/ark-loop/SKILL.md +1 -1
- package/templates/agent-skills/ark-place/SKILL.md +8 -8
- package/templates/agent-skills/ark-runtime/SKILL.md +3 -0
- package/templates/agent-skills/ark-think/SKILL.md +2 -2
- package/templates/agent-skills/ark-upgrade/SKILL.md +2 -2
- package/templates/skills/ark-adopt.md +4 -4
- package/templates/skills/ark-architect.md +1 -1
- package/templates/skills/ark-autopilot.md +4 -4
- package/templates/skills/ark-contract.md +1 -1
- package/templates/skills/ark-coverage.md +3 -2
- package/templates/skills/ark-explain.md +3 -2
- package/templates/skills/ark-explore.md +3 -2
- package/templates/skills/ark-fix.md +1 -1
- package/templates/skills/ark-loop.md +1 -1
- package/templates/skills/ark-place.md +8 -8
- package/templates/skills/ark-runtime.md +3 -0
- package/templates/skills/ark-think.md +2 -2
- package/templates/skills/ark-upgrade.md +2 -2
|
@@ -147,8 +147,8 @@ ArkGate has **always-on Layers** plus opt-in extras. The user chooses extras; yo
|
|
|
147
147
|
|-------|------------------|----------------|-----------------|
|
|
148
148
|
| **Layers** (inter-layer) | Who may import whom, capabilities, pure/forbiddenGlobals, peerIsolation | `ark.config.json` → `layers[]`, `rules[]` | graph check, baseline edges, doctor coverage % |
|
|
149
149
|
| **ArkRules** (intra-layer) | Structure inside a layer + domain invariants as data | `arkRules` map + `arkrules/<ExactLayerName>.json` | structure sensors, invariant coverage, `--rules-inventory`, doctor `rulesUnderContract` |
|
|
150
|
-
| **ArkRun** (extra) | Kernel usage + complete declarations | `arkRun` on `ark.config.json` (schema `1.2+`); factory `arkgate/runtime`; **`kernelRoots` preferred**, `compositionRoots` alias | `ARKRUN_*`, doctor `arkRun` (`notAScore`) |
|
|
151
|
-
| **ArkOrder** (extra) | Operational pattern (ξ vs s) | `arkOrder` on `ark.config.json` (schema `1.3+`); factory `arkgate/order` | `ARKORDER_*` |
|
|
150
|
+
| **ArkRun** (extra) | Kernel usage + complete declarations; information package `decisionTape` `{ xiHash, event, residual }` | `arkRun` on `ark.config.json` (schema `1.2+`); factory `arkgate/runtime`; **`kernelRoots` preferred**, `compositionRoots` alias | `ARKRUN_*`, doctor `arkRun` (`notAScore`) |
|
|
151
|
+
| **ArkOrder** (extra) | Operational pattern (ξ vs s). Valve: first `release()`, later ξ is `proposeRelease` then `apply`; `refreshSigma`; ingest residual `absorb \| escalate_up \| hold` + `reasonCode`; capacity pack as data; in-memory `ReleaseStore` | `arkOrder` on `ark.config.json` (schema `1.3+`); factory `arkgate/order` | `ARKORDER_*` |
|
|
152
152
|
|
|
153
153
|
**Rules for every report / answer:**
|
|
154
154
|
1. Prefix each finding or next step with **`[Layer]`** or **`[ArkRules]`** or **`[ArkRun]`** or **`[ArkOrder]`** (or a table with those headers).
|
|
@@ -167,6 +167,7 @@ ArkGate has **always-on Layers** plus opt-in extras. The user chooses extras; yo
|
|
|
167
167
|
|
|
168
168
|
### Explore + extras
|
|
169
169
|
- Map extras when present; never write `arkRun` / `arkOrder`. Extra off → residual `n/a` / silent.
|
|
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 }`.
|
|
170
171
|
- Field path may name `examples/arkorder-billing/` (ArkOrder fixture — map only). First extra write is `/ark-adopt`; grind is `/ark-autopilot`.
|
|
171
172
|
|
|
172
173
|
## Output mode (pick one — do not invent a fourth)
|
|
@@ -48,7 +48,7 @@ restart/retargeting is required. `ark://manifest` never satisfies this preflight
|
|
|
48
48
|
|
|
49
49
|
## Dual plane — layers + extras (mandatory, except /ark-runtime)
|
|
50
50
|
|
|
51
|
-
Label findings **`[Layer]`** vs **`[ArkRules]`** vs **`[ArkRun]`** vs **`[ArkOrder]`**. Absence of extras is valid and silent. Extra skip clusters (`ARKRUN_*` / `ARKORDER_*`) are **`/ark-autopilot`**. Do not invent `/ark-run` or `/ark-order`. Skills never enforce.
|
|
51
|
+
Label findings **`[Layer]`** vs **`[ArkRules]`** vs **`[ArkRun]`** vs **`[ArkOrder]`**. Absence of extras is valid and silent. Extra skip clusters (`ARKRUN_*` / `ARKORDER_*`) are **`/ark-autopilot`**. When ArkOrder is on: later ξ is `proposeRelease` then `apply` (not a second `release()`); `refreshSigma`; ingest residual `absorb | escalate_up | hold`; capacity pack as data; in-memory `ReleaseStore`; ArkRun `decisionTape`. Do not invent `/ark-run` or `/ark-order`. Skills never enforce.
|
|
52
52
|
|
|
53
53
|
## Subagent fan-out (optional, host-dependent)
|
|
54
54
|
|
|
@@ -43,7 +43,7 @@ Atomic multi-file work uses **`ark_prepare_change`** with the same matched `proj
|
|
|
43
43
|
|
|
44
44
|
## Dual plane — layers + extras (mandatory, except /ark-runtime)
|
|
45
45
|
|
|
46
|
-
Label findings **`[Layer]`** vs **`[ArkRules]`** vs **`[ArkRun]`** vs **`[ArkOrder]`**. Absence of extras is valid and silent. Extra skip clusters (`ARKRUN_*` / `ARKORDER_*`) are **`/ark-autopilot`**. Never invent `mechanical-safe` kinds. Do not invent `/ark-run` or `/ark-order`. Skills never enforce.
|
|
46
|
+
Label findings **`[Layer]`** vs **`[ArkRules]`** vs **`[ArkRun]`** vs **`[ArkOrder]`**. Absence of extras is valid and silent. Extra skip clusters (`ARKRUN_*` / `ARKORDER_*`) are **`/ark-autopilot`**. When ArkOrder is on: later ξ is `proposeRelease` then `apply`; `refreshSigma`; ingest residual `absorb | escalate_up | hold`; capacity pack as data; in-memory `ReleaseStore`; ArkRun `decisionTape`. Never invent `mechanical-safe` kinds. Do not invent `/ark-run` or `/ark-order`. Skills never enforce.
|
|
47
47
|
|
|
48
48
|
## Subagent fan-out (optional, host-dependent)
|
|
49
49
|
|
|
@@ -24,8 +24,8 @@ description: "Where does new code go? Names the folder from the rules file and w
|
|
|
24
24
|
`compositionRoots` alias). Extra off → do not introduce the kernel. Enable it
|
|
25
25
|
via `/ark-adopt`. Skills never enforce.
|
|
26
26
|
- When `arkOrder` is on: factory only in `arkOrder.planeRoots`; Domain stays plane-free;
|
|
27
|
-
freeze ξ with `release()
|
|
28
|
-
`/ark-adopt`. Skills never enforce.
|
|
27
|
+
first freeze ξ with `release()`; later ξ is `proposeRelease` then `apply`. Extra off
|
|
28
|
+
→ do not introduce the plane. Enable it via `/ark-adopt`. Skills never enforce.
|
|
29
29
|
|
|
30
30
|
## Autonomy contract
|
|
31
31
|
|
|
@@ -113,8 +113,8 @@ ArkGate has **always-on Layers** plus opt-in extras. The user chooses extras; yo
|
|
|
113
113
|
|-------|------------------|----------------|-----------------|
|
|
114
114
|
| **Layers** (inter-layer) | Who may import whom, capabilities, pure/forbiddenGlobals, peerIsolation | `ark.config.json` → `layers[]`, `rules[]` | graph check, baseline edges, doctor coverage % |
|
|
115
115
|
| **ArkRules** (intra-layer) | Structure inside a layer + domain invariants as data | `arkRules` map + `arkrules/<ExactLayerName>.json` | structure sensors, invariant coverage, `--rules-inventory`, doctor `rulesUnderContract` |
|
|
116
|
-
| **ArkRun** (extra) | Kernel usage + complete declarations | `arkRun` on `ark.config.json` (schema `1.2+`); factory `arkgate/runtime`; **`kernelRoots` preferred**, `compositionRoots` alias | `ARKRUN_*`, doctor `arkRun` (`notAScore`) |
|
|
117
|
-
| **ArkOrder** (extra) | Operational pattern (ξ vs s) | `arkOrder` on `ark.config.json` (schema `1.3+`); factory `arkgate/order` | `ARKORDER_*` |
|
|
116
|
+
| **ArkRun** (extra) | Kernel usage + complete declarations; information package `decisionTape` `{ xiHash, event, residual }` | `arkRun` on `ark.config.json` (schema `1.2+`); factory `arkgate/runtime`; **`kernelRoots` preferred**, `compositionRoots` alias | `ARKRUN_*`, doctor `arkRun` (`notAScore`) |
|
|
117
|
+
| **ArkOrder** (extra) | Operational pattern (ξ vs s). Valve: first `release()`, later ξ is `proposeRelease` then `apply`; `refreshSigma`; ingest residual `absorb \| escalate_up \| hold` + `reasonCode`; capacity pack as data; in-memory `ReleaseStore` | `arkOrder` on `ark.config.json` (schema `1.3+`); factory `arkgate/order` | `ARKORDER_*` |
|
|
118
118
|
|
|
119
119
|
**Rules for every report / answer:**
|
|
120
120
|
1. Prefix each finding or next step with **`[Layer]`** or **`[ArkRules]`** or **`[ArkRun]`** or **`[ArkOrder]`** (or a table with those headers).
|
|
@@ -123,7 +123,7 @@ ArkGate has **always-on Layers** plus opt-in extras. The user chooses extras; yo
|
|
|
123
123
|
4. Missing layer home: add it via **`/ark-adopt`** in this session if needed, then write the file; never invent `mechanical-safe`.
|
|
124
124
|
5. CLI helpers: `ark-check --rules-inventory --json`, doctor JSON `rulesUnderContract`, sensors emit `ARKRULE_*` / `INVARIANT_UNCOVERED` with `evidence.arkruleId`.
|
|
125
125
|
6. Absence of `arkRun` is **valid**. Do not introduce the kernel speculatively. Skills never enforce this extra.
|
|
126
|
-
7. Absence of `arkOrder` is **valid**. When on: Domain stays plane-free; freeze ξ with `release()`; never `update`/`patch`/`set` the pattern. Import `createOrderPlane` from `arkgate/order` (same npm package). No `/ark-order` skill.
|
|
126
|
+
7. Absence of `arkOrder` is **valid**. When on: Domain stays plane-free; first freeze ξ with `release()`; later ξ is `proposeRelease` then `apply`; never `update`/`patch`/`set` the pattern. Import `createOrderPlane` from `arkgate/order` (same npm package). No `/ark-order` skill.
|
|
127
127
|
|
|
128
128
|
|
|
129
129
|
### Place + ArkRules
|
|
@@ -138,16 +138,16 @@ When `arkRun` is present on the architecture config:
|
|
|
138
138
|
- Domain-role files stay kernel-free (`ARKRUN_KERNEL_IN_DOMAIN`). Import from `arkgate/runtime` (or `arkgate/nestjs`). `@arkgate/runtime` is deprecated.
|
|
139
139
|
- List `uses` / `reactsTo` / `raises` / `sends` when `requireDeclarations` is on. Adding an existing call-site literal to the declaration list is the only mechanical-safe ArkRun edit; inventing a new emit / handle / depend is judgment.
|
|
140
140
|
- Do not import a homemade bus (`EventEmitter`, queue clients) in `managedLayers` — send on the kernel transport (`local` / `localBlocking` / `broker`; `ephemeral` defaults true). No shipped cloud SDKs.
|
|
141
|
-
- In-memory stores are **not** production durability. Doctor `arkRun` is `notAScore`.
|
|
141
|
+
- In-memory stores are **not** production durability. Doctor `arkRun` is `notAScore`. Information package may carry `decisionTape` `{ xiHash, event, residual }` (`appendDecisionTape`). Not a bus. Not durable.
|
|
142
142
|
- Absence of the extra: place with **[Layer]** + **[ArkRules]** only. Enable advisory extra via `/ark-adopt`; evaluate a hand-rolled bus via `/ark-runtime`. Do not invent `/ark-run`.
|
|
143
143
|
- Skills never enforce.
|
|
144
144
|
|
|
145
145
|
### Place + ArkOrder
|
|
146
146
|
When `arkOrder` is present on the architecture config:
|
|
147
147
|
- Import `createOrderPlane` from `arkgate/order` (same npm package). Domain-role files stay plane-free.
|
|
148
|
-
-
|
|
148
|
+
- 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`.
|
|
149
149
|
- Call the factory only inside `arkOrder.planeRoots`. Empty roots in `enforced` mode is `ARKORDER_MISSING_PLANE`.
|
|
150
|
-
- 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`.
|
|
150
|
+
- 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`.
|
|
151
151
|
- 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`.
|
|
152
152
|
- Absence of the extra is valid. Do not invent `/ark-order`. Skills never enforce.
|
|
153
153
|
|
|
@@ -106,6 +106,9 @@ the same files or weaken the gate.
|
|
|
106
106
|
public bind. Snapshots / `requestGraph` (process or technical + Mermaid) are tooling, not a
|
|
107
107
|
score. `getDependencyInformationPackage()` never includes factories, live instances, or
|
|
108
108
|
input DTOs.
|
|
109
|
+
- Information package may carry `decisionTape` `{ xiHash, event, residual }` via
|
|
110
|
+
`appendDecisionTape`. Shadow / compare / replay that snapshot in-memory (not a bus, not
|
|
111
|
+
durable). This is still **[ArkRun]** — do not turn the tape into an ArkOrder skill.
|
|
109
112
|
- In-memory stores lose state on restart — **not** production durability. Note bounded history
|
|
110
113
|
(`maxHistorySize` 1000) if the hand-rolled version retained everything.
|
|
111
114
|
6. **Delete the hand-rolled version** once call sites are moved — the point is
|
|
@@ -77,8 +77,8 @@ ArkGate has **always-on Layers** plus opt-in extras. The user chooses extras; yo
|
|
|
77
77
|
|-------|------------------|----------------|-----------------|
|
|
78
78
|
| **Layers** (inter-layer) | Who may import whom, capabilities, pure/forbiddenGlobals, peerIsolation | `ark.config.json` → `layers[]`, `rules[]` | graph check, baseline edges, doctor coverage % |
|
|
79
79
|
| **ArkRules** (intra-layer) | Structure inside a layer + domain invariants as data | `arkRules` map + `arkrules/<ExactLayerName>.json` | structure sensors, invariant coverage, `--rules-inventory`, doctor `rulesUnderContract` |
|
|
80
|
-
| **ArkRun** (extra) | Kernel usage + complete declarations | `arkRun` on `ark.config.json` (schema `1.2+`); factory `arkgate/runtime`; **`kernelRoots` preferred**, `compositionRoots` alias | `ARKRUN_*`, doctor `arkRun` (`notAScore`) |
|
|
81
|
-
| **ArkOrder** (extra) | Operational pattern (ξ vs s) | `arkOrder` on `ark.config.json` (schema `1.3+`); factory `arkgate/order` | `ARKORDER_*` |
|
|
80
|
+
| **ArkRun** (extra) | Kernel usage + complete declarations; information package `decisionTape` `{ xiHash, event, residual }` | `arkRun` on `ark.config.json` (schema `1.2+`); factory `arkgate/runtime`; **`kernelRoots` preferred**, `compositionRoots` alias | `ARKRUN_*`, doctor `arkRun` (`notAScore`) |
|
|
81
|
+
| **ArkOrder** (extra) | Operational pattern (ξ vs s). Valve: first `release()`, later ξ is `proposeRelease` then `apply`; `refreshSigma`; ingest residual `absorb \| escalate_up \| hold` + `reasonCode`; capacity pack as data; in-memory `ReleaseStore` | `arkOrder` on `ark.config.json` (schema `1.3+`); factory `arkgate/order` | `ARKORDER_*` |
|
|
82
82
|
|
|
83
83
|
**Rules for every report / answer:**
|
|
84
84
|
1. Prefix each finding or next step with **`[Layer]`** or **`[ArkRules]`** or **`[ArkRun]`** or **`[ArkOrder]`** (or a table with those headers).
|
|
@@ -124,8 +124,8 @@ ArkGate has **always-on Layers** plus opt-in extras. The user chooses extras; yo
|
|
|
124
124
|
|-------|------------------|----------------|-----------------|
|
|
125
125
|
| **Layers** (inter-layer) | Who may import whom, capabilities, pure/forbiddenGlobals, peerIsolation | `ark.config.json` → `layers[]`, `rules[]` | graph check, baseline edges, doctor coverage % |
|
|
126
126
|
| **ArkRules** (intra-layer) | Structure inside a layer + domain invariants as data | `arkRules` map + `arkrules/<ExactLayerName>.json` | structure sensors, invariant coverage, `--rules-inventory`, doctor `rulesUnderContract` |
|
|
127
|
-
| **ArkRun** (extra) | Kernel usage + complete declarations | `arkRun` on `ark.config.json` (schema `1.2+`); factory `arkgate/runtime`; **`kernelRoots` preferred**, `compositionRoots` alias | `ARKRUN_*`, doctor `arkRun` (`notAScore`) |
|
|
128
|
-
| **ArkOrder** (extra) | Operational pattern (ξ vs s) | `arkOrder` on `ark.config.json` (schema `1.3+`); factory `arkgate/order` | `ARKORDER_*` |
|
|
127
|
+
| **ArkRun** (extra) | Kernel usage + complete declarations; information package `decisionTape` `{ xiHash, event, residual }` | `arkRun` on `ark.config.json` (schema `1.2+`); factory `arkgate/runtime`; **`kernelRoots` preferred**, `compositionRoots` alias | `ARKRUN_*`, doctor `arkRun` (`notAScore`) |
|
|
128
|
+
| **ArkOrder** (extra) | Operational pattern (ξ vs s). Valve: first `release()`, later ξ is `proposeRelease` then `apply`; `refreshSigma`; ingest residual `absorb \| escalate_up \| hold` + `reasonCode`; capacity pack as data; in-memory `ReleaseStore` | `arkOrder` on `ark.config.json` (schema `1.3+`); factory `arkgate/order` | `ARKORDER_*` |
|
|
129
129
|
|
|
130
130
|
**Rules for every report / answer:**
|
|
131
131
|
1. Prefix each finding or next step with **`[Layer]`** or **`[ArkRules]`** or **`[ArkRun]`** or **`[ArkOrder]`** (or a table with those headers).
|
|
@@ -126,8 +126,8 @@ ArkGate has **always-on Layers** plus opt-in extras. The user chooses extras; yo
|
|
|
126
126
|
|-------|------------------|----------------|-----------------|
|
|
127
127
|
| **Layers** (inter-layer) | Who may import whom, capabilities, pure/forbiddenGlobals, peerIsolation | `ark.config.json` → `layers[]`, `rules[]` | graph check, baseline edges, doctor coverage % |
|
|
128
128
|
| **ArkRules** (intra-layer) | Structure inside a layer + domain invariants as data | `arkRules` map + `arkrules/<ExactLayerName>.json` | structure sensors, invariant coverage, `--rules-inventory`, doctor `rulesUnderContract` |
|
|
129
|
-
| **ArkRun** (extra) | Kernel usage + complete declarations | `arkRun` on `ark.config.json` (schema `1.2+`); factory `arkgate/runtime`; **`kernelRoots` preferred**, `compositionRoots` alias | `ARKRUN_*`, doctor `arkRun` (`notAScore`) |
|
|
130
|
-
| **ArkOrder** (extra) | Operational pattern (ξ vs s) | `arkOrder` on `ark.config.json` (schema `1.3+`); factory `arkgate/order` | `ARKORDER_*` |
|
|
129
|
+
| **ArkRun** (extra) | Kernel usage + complete declarations; information package `decisionTape` `{ xiHash, event, residual }` | `arkRun` on `ark.config.json` (schema `1.2+`); factory `arkgate/runtime`; **`kernelRoots` preferred**, `compositionRoots` alias | `ARKRUN_*`, doctor `arkRun` (`notAScore`) |
|
|
130
|
+
| **ArkOrder** (extra) | Operational pattern (ξ vs s). Valve: first `release()`, later ξ is `proposeRelease` then `apply`; `refreshSigma`; ingest residual `absorb \| escalate_up \| hold` + `reasonCode`; capacity pack as data; in-memory `ReleaseStore` | `arkOrder` on `ark.config.json` (schema `1.3+`); factory `arkgate/order` | `ARKORDER_*` |
|
|
131
131
|
|
|
132
132
|
**Rules for every report / answer:**
|
|
133
133
|
1. Prefix each finding or next step with **`[Layer]`** or **`[ArkRules]`** or **`[ArkRun]`** or **`[ArkOrder]`** (or a table with those headers).
|
|
@@ -151,7 +151,7 @@ ArkGate has **always-on Layers** plus opt-in extras. The user chooses extras; yo
|
|
|
151
151
|
- Do **not** put `arkRun` on the compact starter / `ark start` scaffold. Brownfield stays advisory until the team promotes.
|
|
152
152
|
- Absence is valid and **silent** — never force the extra. Never force the kernel over existing Nest/DI. Do not invent `/ark-run`.
|
|
153
153
|
- Import from `arkgate/runtime` (factory `createStrictArkKernel`, per instance, no process-wide singleton). `@arkgate/runtime` is deprecated. No shipped cloud broker SDKs.
|
|
154
|
-
- In-memory stores are **not** production durability. Branding ArkRun is not a durability claim. Doctor / status `arkRun` is `notAScore`.
|
|
154
|
+
- In-memory stores are **not** production durability. Branding ArkRun is not a durability claim. Doctor / status `arkRun` is `notAScore`. Information package `decisionTape` / `appendDecisionTape` is in-memory, not a bus.
|
|
155
155
|
- Demoting enforced → advisory or deleting the extra is policy-delta **weakening**.
|
|
156
156
|
- After the extra is honest: handoff `/ark-runtime` to wire one candidate, `/ark-place` for new kernel-managed files. Skills never enforce.
|
|
157
157
|
|
|
@@ -173,7 +173,7 @@ ArkGate has **always-on Layers** plus opt-in extras. The user chooses extras; yo
|
|
|
173
173
|
}
|
|
174
174
|
```
|
|
175
175
|
|
|
176
|
-
- `xiKeys` are meaning, not membership. `projectId` / `orgId` do not belong. If `proposeRelease` throws empty blast, that key does not order anything.
|
|
176
|
+
- `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`.
|
|
177
177
|
- 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`.
|
|
178
178
|
|
|
179
179
|
- Do **not** put `arkOrder` on the compact starter / `ark start` scaffold. Domain stays plane-free. Import `createOrderPlane` from `arkgate/order` (same npm package).
|
|
@@ -42,7 +42,7 @@ Then call **`ark_recommend`** with the same bound `project` envelope (or `ark-ch
|
|
|
42
42
|
|
|
43
43
|
## Dual plane — layers + extras (mandatory, except /ark-runtime)
|
|
44
44
|
|
|
45
|
-
Label findings **`[Layer]`** vs **`[ArkRules]`** vs **`[ArkRun]`** vs **`[ArkOrder]`**. Absence of extras is valid and silent. Session-0 extras (advisory `arkRun` / advisory `arkOrder`) live on **`/ark-adopt`**. Do not invent `/ark-run` or `/ark-order`. Skills never enforce.
|
|
45
|
+
Label findings **`[Layer]`** vs **`[ArkRules]`** vs **`[ArkRun]`** vs **`[ArkOrder]`**. Absence of extras is valid and silent. Session-0 extras (advisory `arkRun` / advisory `arkOrder`) live on **`/ark-adopt`**. When ArkOrder is on: first freeze `release()`, later ξ is `proposeRelease` then `apply`; `refreshSigma`; ingest residual `absorb | escalate_up | hold`; capacity pack as data; in-memory `ReleaseStore`; ArkRun `decisionTape`. Do not invent `/ark-run` or `/ark-order`. Skills never enforce.
|
|
46
46
|
|
|
47
47
|
## Subagent fan-out (optional, host-dependent)
|
|
48
48
|
|
|
@@ -119,8 +119,8 @@ ArkGate has **always-on Layers** plus opt-in extras. The user chooses extras; yo
|
|
|
119
119
|
|-------|------------------|----------------|-----------------|
|
|
120
120
|
| **Layers** (inter-layer) | Who may import whom, capabilities, pure/forbiddenGlobals, peerIsolation | `ark.config.json` → `layers[]`, `rules[]` | graph check, baseline edges, doctor coverage % |
|
|
121
121
|
| **ArkRules** (intra-layer) | Structure inside a layer + domain invariants as data | `arkRules` map + `arkrules/<ExactLayerName>.json` | structure sensors, invariant coverage, `--rules-inventory`, doctor `rulesUnderContract` |
|
|
122
|
-
| **ArkRun** (extra) | Kernel usage + complete declarations | `arkRun` on `ark.config.json` (schema `1.2+`); factory `arkgate/runtime`; **`kernelRoots` preferred**, `compositionRoots` alias | `ARKRUN_*`, doctor `arkRun` (`notAScore`) |
|
|
123
|
-
| **ArkOrder** (extra) | Operational pattern (ξ vs s) | `arkOrder` on `ark.config.json` (schema `1.3+`); factory `arkgate/order` | `ARKORDER_*` |
|
|
122
|
+
| **ArkRun** (extra) | Kernel usage + complete declarations; information package `decisionTape` `{ xiHash, event, residual }` | `arkRun` on `ark.config.json` (schema `1.2+`); factory `arkgate/runtime`; **`kernelRoots` preferred**, `compositionRoots` alias | `ARKRUN_*`, doctor `arkRun` (`notAScore`) |
|
|
123
|
+
| **ArkOrder** (extra) | Operational pattern (ξ vs s). Valve: first `release()`, later ξ is `proposeRelease` then `apply`; `refreshSigma`; ingest residual `absorb \| escalate_up \| hold` + `reasonCode`; capacity pack as data; in-memory `ReleaseStore` | `arkOrder` on `ark.config.json` (schema `1.3+`); factory `arkgate/order` | `ARKORDER_*` |
|
|
124
124
|
|
|
125
125
|
**Rules for every report / answer:**
|
|
126
126
|
1. Prefix each finding or next step with **`[Layer]`** or **`[ArkRules]`** or **`[ArkRun]`** or **`[ArkOrder]`** (or a table with those headers).
|
|
@@ -141,13 +141,13 @@ ArkGate has **always-on Layers** plus opt-in extras. The user chooses extras; yo
|
|
|
141
141
|
### Autopilot + ArkRun
|
|
142
142
|
When `arkRun` is present:
|
|
143
143
|
- Grind skip clusters with judgment: `ARKRUN_DIRECT_NEW` / `ARKRUN_TRANSPORT_BYPASS` / `ARKRUN_KERNEL_IN_DOMAIN` / `ARKRUN_MISSING_ROOT`. Never invent `mechanical-safe` for new emits / homemade buses.
|
|
144
|
-
- Factory only inside `arkRun.kernelRoots` (`compositionRoots` alias). Import `arkgate/runtime`. Doctor `arkRun` is `notAScore`.
|
|
144
|
+
- Factory only inside `arkRun.kernelRoots` (`compositionRoots` alias). Import `arkgate/runtime`. Doctor `arkRun` is `notAScore`. Information package may carry `decisionTape` `{ xiHash, event, residual }` (`appendDecisionTape`). Shadow / compare / replay stay in-memory.
|
|
145
145
|
- Extra off → `/ark-adopt` (advisory) or `/ark-runtime` (evaluate one candidate). Do not invent `/ark-run`.
|
|
146
146
|
- Skills never enforce.
|
|
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`.
|
|
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`.
|
|
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`. 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 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.
|
|
49
49
|
|
|
50
50
|
## Subagent fan-out (optional, host-dependent)
|
|
51
51
|
|
|
@@ -83,8 +83,8 @@ ArkGate has **always-on Layers** plus opt-in extras. The user chooses extras; yo
|
|
|
83
83
|
|-------|------------------|----------------|-----------------|
|
|
84
84
|
| **Layers** (inter-layer) | Who may import whom, capabilities, pure/forbiddenGlobals, peerIsolation | `ark.config.json` → `layers[]`, `rules[]` | graph check, baseline edges, doctor coverage % |
|
|
85
85
|
| **ArkRules** (intra-layer) | Structure inside a layer + domain invariants as data | `arkRules` map + `arkrules/<ExactLayerName>.json` | structure sensors, invariant coverage, `--rules-inventory`, doctor `rulesUnderContract` |
|
|
86
|
-
| **ArkRun** (extra) | Kernel usage + complete declarations | `arkRun` on `ark.config.json` (schema `1.2+`); factory `arkgate/runtime`; **`kernelRoots` preferred**, `compositionRoots` alias | `ARKRUN_*`, doctor `arkRun` (`notAScore`) |
|
|
87
|
-
| **ArkOrder** (extra) | Operational pattern (ξ vs s) | `arkOrder` on `ark.config.json` (schema `1.3+`); factory `arkgate/order` | `ARKORDER_*` |
|
|
86
|
+
| **ArkRun** (extra) | Kernel usage + complete declarations; information package `decisionTape` `{ xiHash, event, residual }` | `arkRun` on `ark.config.json` (schema `1.2+`); factory `arkgate/runtime`; **`kernelRoots` preferred**, `compositionRoots` alias | `ARKRUN_*`, doctor `arkRun` (`notAScore`) |
|
|
87
|
+
| **ArkOrder** (extra) | Operational pattern (ξ vs s). Valve: first `release()`, later ξ is `proposeRelease` then `apply`; `refreshSigma`; ingest residual `absorb \| escalate_up \| hold` + `reasonCode`; capacity pack as data; in-memory `ReleaseStore` | `arkOrder` on `ark.config.json` (schema `1.3+`); factory `arkgate/order` | `ARKORDER_*` |
|
|
88
88
|
|
|
89
89
|
**Rules for every report / answer:**
|
|
90
90
|
1. Prefix each finding or next step with **`[Layer]`** or **`[ArkRules]`** or **`[ArkRun]`** or **`[ArkOrder]`** (or a table with those headers).
|
|
@@ -102,6 +102,7 @@ ArkGate has **always-on Layers** plus opt-in extras. The user chooses extras; yo
|
|
|
102
102
|
|
|
103
103
|
### Coverage + extras
|
|
104
104
|
- Extras silent when off. Doctor `arkRun` is `notAScore`. “No arkRun / arkOrder” is not a failed gate. Do not force extras.
|
|
105
|
+
- When ArkOrder is on, fitness still labels **[ArkOrder]**: valve is `proposeRelease` then `apply`; `refreshSigma`; ingest residual `absorb | escalate_up | hold` + `reasonCode`; capacity pack as data; in-memory `ReleaseStore`. ArkRun residual may include `decisionTape`.
|
|
105
106
|
|
|
106
107
|
## Subagent fan-out (optional, host-dependent)
|
|
107
108
|
|
|
@@ -67,8 +67,8 @@ ArkGate has **always-on Layers** plus opt-in extras. The user chooses extras; yo
|
|
|
67
67
|
|-------|------------------|----------------|-----------------|
|
|
68
68
|
| **Layers** (inter-layer) | Who may import whom, capabilities, pure/forbiddenGlobals, peerIsolation | `ark.config.json` → `layers[]`, `rules[]` | graph check, baseline edges, doctor coverage % |
|
|
69
69
|
| **ArkRules** (intra-layer) | Structure inside a layer + domain invariants as data | `arkRules` map + `arkrules/<ExactLayerName>.json` | structure sensors, invariant coverage, `--rules-inventory`, doctor `rulesUnderContract` |
|
|
70
|
-
| **ArkRun** (extra) | Kernel usage + complete declarations | `arkRun` on `ark.config.json` (schema `1.2+`); factory `arkgate/runtime`; **`kernelRoots` preferred**, `compositionRoots` alias | `ARKRUN_*`, doctor `arkRun` (`notAScore`) |
|
|
71
|
-
| **ArkOrder** (extra) | Operational pattern (ξ vs s) | `arkOrder` on `ark.config.json` (schema `1.3+`); factory `arkgate/order` | `ARKORDER_*` |
|
|
70
|
+
| **ArkRun** (extra) | Kernel usage + complete declarations; information package `decisionTape` `{ xiHash, event, residual }` | `arkRun` on `ark.config.json` (schema `1.2+`); factory `arkgate/runtime`; **`kernelRoots` preferred**, `compositionRoots` alias | `ARKRUN_*`, doctor `arkRun` (`notAScore`) |
|
|
71
|
+
| **ArkOrder** (extra) | Operational pattern (ξ vs s). Valve: first `release()`, later ξ is `proposeRelease` then `apply`; `refreshSigma`; ingest residual `absorb \| escalate_up \| hold` + `reasonCode`; capacity pack as data; in-memory `ReleaseStore` | `arkOrder` on `ark.config.json` (schema `1.3+`); factory `arkgate/order` | `ARKORDER_*` |
|
|
72
72
|
|
|
73
73
|
**Rules for every report / answer:**
|
|
74
74
|
1. Prefix each finding or next step with **`[Layer]`** or **`[ArkRules]`** or **`[ArkRun]`** or **`[ArkOrder]`** (or a table with those headers).
|
|
@@ -97,6 +97,7 @@ ArkGate has **always-on Layers** plus opt-in extras. The user chooses extras; yo
|
|
|
97
97
|
|
|
98
98
|
### Explain + extras
|
|
99
99
|
- Extras silent when off. If `arkRun` is on, doctor `arkRun` is `notAScore` — never a tour score. Do not force extras.
|
|
100
|
+
- If `arkOrder` is on, teach the valve in plain language: first freeze is `release()`; later pattern change is `proposeRelease` then `apply`; `refreshSigma` refreshes saldo; ingest returns `absorb | escalate_up | hold` plus `reasonCode`; capacity is a data pack; `ReleaseStore` is in-memory; ArkRun may carry `decisionTape`. Never `update`.
|
|
100
101
|
|
|
101
102
|
## Subagent fan-out (optional, host-dependent)
|
|
102
103
|
|
|
@@ -147,8 +147,8 @@ ArkGate has **always-on Layers** plus opt-in extras. The user chooses extras; yo
|
|
|
147
147
|
|-------|------------------|----------------|-----------------|
|
|
148
148
|
| **Layers** (inter-layer) | Who may import whom, capabilities, pure/forbiddenGlobals, peerIsolation | `ark.config.json` → `layers[]`, `rules[]` | graph check, baseline edges, doctor coverage % |
|
|
149
149
|
| **ArkRules** (intra-layer) | Structure inside a layer + domain invariants as data | `arkRules` map + `arkrules/<ExactLayerName>.json` | structure sensors, invariant coverage, `--rules-inventory`, doctor `rulesUnderContract` |
|
|
150
|
-
| **ArkRun** (extra) | Kernel usage + complete declarations | `arkRun` on `ark.config.json` (schema `1.2+`); factory `arkgate/runtime`; **`kernelRoots` preferred**, `compositionRoots` alias | `ARKRUN_*`, doctor `arkRun` (`notAScore`) |
|
|
151
|
-
| **ArkOrder** (extra) | Operational pattern (ξ vs s) | `arkOrder` on `ark.config.json` (schema `1.3+`); factory `arkgate/order` | `ARKORDER_*` |
|
|
150
|
+
| **ArkRun** (extra) | Kernel usage + complete declarations; information package `decisionTape` `{ xiHash, event, residual }` | `arkRun` on `ark.config.json` (schema `1.2+`); factory `arkgate/runtime`; **`kernelRoots` preferred**, `compositionRoots` alias | `ARKRUN_*`, doctor `arkRun` (`notAScore`) |
|
|
151
|
+
| **ArkOrder** (extra) | Operational pattern (ξ vs s). Valve: first `release()`, later ξ is `proposeRelease` then `apply`; `refreshSigma`; ingest residual `absorb \| escalate_up \| hold` + `reasonCode`; capacity pack as data; in-memory `ReleaseStore` | `arkOrder` on `ark.config.json` (schema `1.3+`); factory `arkgate/order` | `ARKORDER_*` |
|
|
152
152
|
|
|
153
153
|
**Rules for every report / answer:**
|
|
154
154
|
1. Prefix each finding or next step with **`[Layer]`** or **`[ArkRules]`** or **`[ArkRun]`** or **`[ArkOrder]`** (or a table with those headers).
|
|
@@ -167,6 +167,7 @@ ArkGate has **always-on Layers** plus opt-in extras. The user chooses extras; yo
|
|
|
167
167
|
|
|
168
168
|
### Explore + extras
|
|
169
169
|
- Map extras when present; never write `arkRun` / `arkOrder`. Extra off → residual `n/a` / silent.
|
|
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 }`.
|
|
170
171
|
- Field path may name `examples/arkorder-billing/` (ArkOrder fixture — map only). First extra write is `/ark-adopt`; grind is `/ark-autopilot`.
|
|
171
172
|
|
|
172
173
|
## Output mode (pick one — do not invent a fourth)
|
|
@@ -48,7 +48,7 @@ restart/retargeting is required. `ark://manifest` never satisfies this preflight
|
|
|
48
48
|
|
|
49
49
|
## Dual plane — layers + extras (mandatory, except /ark-runtime)
|
|
50
50
|
|
|
51
|
-
Label findings **`[Layer]`** vs **`[ArkRules]`** vs **`[ArkRun]`** vs **`[ArkOrder]`**. Absence of extras is valid and silent. Extra skip clusters (`ARKRUN_*` / `ARKORDER_*`) are **`/ark-autopilot`**. Do not invent `/ark-run` or `/ark-order`. Skills never enforce.
|
|
51
|
+
Label findings **`[Layer]`** vs **`[ArkRules]`** vs **`[ArkRun]`** vs **`[ArkOrder]`**. Absence of extras is valid and silent. Extra skip clusters (`ARKRUN_*` / `ARKORDER_*`) are **`/ark-autopilot`**. When ArkOrder is on: later ξ is `proposeRelease` then `apply` (not a second `release()`); `refreshSigma`; ingest residual `absorb | escalate_up | hold`; capacity pack as data; in-memory `ReleaseStore`; ArkRun `decisionTape`. Do not invent `/ark-run` or `/ark-order`. Skills never enforce.
|
|
52
52
|
|
|
53
53
|
## Subagent fan-out (optional, host-dependent)
|
|
54
54
|
|
|
@@ -43,7 +43,7 @@ Atomic multi-file work uses **`ark_prepare_change`** with the same matched `proj
|
|
|
43
43
|
|
|
44
44
|
## Dual plane — layers + extras (mandatory, except /ark-runtime)
|
|
45
45
|
|
|
46
|
-
Label findings **`[Layer]`** vs **`[ArkRules]`** vs **`[ArkRun]`** vs **`[ArkOrder]`**. Absence of extras is valid and silent. Extra skip clusters (`ARKRUN_*` / `ARKORDER_*`) are **`/ark-autopilot`**. Never invent `mechanical-safe` kinds. Do not invent `/ark-run` or `/ark-order`. Skills never enforce.
|
|
46
|
+
Label findings **`[Layer]`** vs **`[ArkRules]`** vs **`[ArkRun]`** vs **`[ArkOrder]`**. Absence of extras is valid and silent. Extra skip clusters (`ARKRUN_*` / `ARKORDER_*`) are **`/ark-autopilot`**. When ArkOrder is on: later ξ is `proposeRelease` then `apply`; `refreshSigma`; ingest residual `absorb | escalate_up | hold`; capacity pack as data; in-memory `ReleaseStore`; ArkRun `decisionTape`. Never invent `mechanical-safe` kinds. Do not invent `/ark-run` or `/ark-order`. Skills never enforce.
|
|
47
47
|
|
|
48
48
|
## Subagent fan-out (optional, host-dependent)
|
|
49
49
|
|
|
@@ -24,8 +24,8 @@ description: "Where does new code go? Names the folder from the rules file and w
|
|
|
24
24
|
`compositionRoots` alias). Extra off → do not introduce the kernel. Enable it
|
|
25
25
|
via `/ark-adopt`. Skills never enforce.
|
|
26
26
|
- When `arkOrder` is on: factory only in `arkOrder.planeRoots`; Domain stays plane-free;
|
|
27
|
-
freeze ξ with `release()
|
|
28
|
-
`/ark-adopt`. Skills never enforce.
|
|
27
|
+
first freeze ξ with `release()`; later ξ is `proposeRelease` then `apply`. Extra off
|
|
28
|
+
→ do not introduce the plane. Enable it via `/ark-adopt`. Skills never enforce.
|
|
29
29
|
|
|
30
30
|
## Autonomy contract
|
|
31
31
|
|
|
@@ -113,8 +113,8 @@ ArkGate has **always-on Layers** plus opt-in extras. The user chooses extras; yo
|
|
|
113
113
|
|-------|------------------|----------------|-----------------|
|
|
114
114
|
| **Layers** (inter-layer) | Who may import whom, capabilities, pure/forbiddenGlobals, peerIsolation | `ark.config.json` → `layers[]`, `rules[]` | graph check, baseline edges, doctor coverage % |
|
|
115
115
|
| **ArkRules** (intra-layer) | Structure inside a layer + domain invariants as data | `arkRules` map + `arkrules/<ExactLayerName>.json` | structure sensors, invariant coverage, `--rules-inventory`, doctor `rulesUnderContract` |
|
|
116
|
-
| **ArkRun** (extra) | Kernel usage + complete declarations | `arkRun` on `ark.config.json` (schema `1.2+`); factory `arkgate/runtime`; **`kernelRoots` preferred**, `compositionRoots` alias | `ARKRUN_*`, doctor `arkRun` (`notAScore`) |
|
|
117
|
-
| **ArkOrder** (extra) | Operational pattern (ξ vs s) | `arkOrder` on `ark.config.json` (schema `1.3+`); factory `arkgate/order` | `ARKORDER_*` |
|
|
116
|
+
| **ArkRun** (extra) | Kernel usage + complete declarations; information package `decisionTape` `{ xiHash, event, residual }` | `arkRun` on `ark.config.json` (schema `1.2+`); factory `arkgate/runtime`; **`kernelRoots` preferred**, `compositionRoots` alias | `ARKRUN_*`, doctor `arkRun` (`notAScore`) |
|
|
117
|
+
| **ArkOrder** (extra) | Operational pattern (ξ vs s). Valve: first `release()`, later ξ is `proposeRelease` then `apply`; `refreshSigma`; ingest residual `absorb \| escalate_up \| hold` + `reasonCode`; capacity pack as data; in-memory `ReleaseStore` | `arkOrder` on `ark.config.json` (schema `1.3+`); factory `arkgate/order` | `ARKORDER_*` |
|
|
118
118
|
|
|
119
119
|
**Rules for every report / answer:**
|
|
120
120
|
1. Prefix each finding or next step with **`[Layer]`** or **`[ArkRules]`** or **`[ArkRun]`** or **`[ArkOrder]`** (or a table with those headers).
|
|
@@ -123,7 +123,7 @@ ArkGate has **always-on Layers** plus opt-in extras. The user chooses extras; yo
|
|
|
123
123
|
4. Missing layer home: add it via **`/ark-adopt`** in this session if needed, then write the file; never invent `mechanical-safe`.
|
|
124
124
|
5. CLI helpers: `ark-check --rules-inventory --json`, doctor JSON `rulesUnderContract`, sensors emit `ARKRULE_*` / `INVARIANT_UNCOVERED` with `evidence.arkruleId`.
|
|
125
125
|
6. Absence of `arkRun` is **valid**. Do not introduce the kernel speculatively. Skills never enforce this extra.
|
|
126
|
-
7. Absence of `arkOrder` is **valid**. When on: Domain stays plane-free; freeze ξ with `release()`; never `update`/`patch`/`set` the pattern. Import `createOrderPlane` from `arkgate/order` (same npm package). No `/ark-order` skill.
|
|
126
|
+
7. Absence of `arkOrder` is **valid**. When on: Domain stays plane-free; first freeze ξ with `release()`; later ξ is `proposeRelease` then `apply`; never `update`/`patch`/`set` the pattern. Import `createOrderPlane` from `arkgate/order` (same npm package). No `/ark-order` skill.
|
|
127
127
|
|
|
128
128
|
|
|
129
129
|
### Place + ArkRules
|
|
@@ -138,16 +138,16 @@ When `arkRun` is present on the architecture config:
|
|
|
138
138
|
- Domain-role files stay kernel-free (`ARKRUN_KERNEL_IN_DOMAIN`). Import from `arkgate/runtime` (or `arkgate/nestjs`). `@arkgate/runtime` is deprecated.
|
|
139
139
|
- List `uses` / `reactsTo` / `raises` / `sends` when `requireDeclarations` is on. Adding an existing call-site literal to the declaration list is the only mechanical-safe ArkRun edit; inventing a new emit / handle / depend is judgment.
|
|
140
140
|
- Do not import a homemade bus (`EventEmitter`, queue clients) in `managedLayers` — send on the kernel transport (`local` / `localBlocking` / `broker`; `ephemeral` defaults true). No shipped cloud SDKs.
|
|
141
|
-
- In-memory stores are **not** production durability. Doctor `arkRun` is `notAScore`.
|
|
141
|
+
- In-memory stores are **not** production durability. Doctor `arkRun` is `notAScore`. Information package may carry `decisionTape` `{ xiHash, event, residual }` (`appendDecisionTape`). Not a bus. Not durable.
|
|
142
142
|
- Absence of the extra: place with **[Layer]** + **[ArkRules]** only. Enable advisory extra via `/ark-adopt`; evaluate a hand-rolled bus via `/ark-runtime`. Do not invent `/ark-run`.
|
|
143
143
|
- Skills never enforce.
|
|
144
144
|
|
|
145
145
|
### Place + ArkOrder
|
|
146
146
|
When `arkOrder` is present on the architecture config:
|
|
147
147
|
- Import `createOrderPlane` from `arkgate/order` (same npm package). Domain-role files stay plane-free.
|
|
148
|
-
-
|
|
148
|
+
- 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`.
|
|
149
149
|
- Call the factory only inside `arkOrder.planeRoots`. Empty roots in `enforced` mode is `ARKORDER_MISSING_PLANE`.
|
|
150
|
-
- 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`.
|
|
150
|
+
- 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`.
|
|
151
151
|
- 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`.
|
|
152
152
|
- Absence of the extra is valid. Do not invent `/ark-order`. Skills never enforce.
|
|
153
153
|
|
|
@@ -106,6 +106,9 @@ the same files or weaken the gate.
|
|
|
106
106
|
public bind. Snapshots / `requestGraph` (process or technical + Mermaid) are tooling, not a
|
|
107
107
|
score. `getDependencyInformationPackage()` never includes factories, live instances, or
|
|
108
108
|
input DTOs.
|
|
109
|
+
- Information package may carry `decisionTape` `{ xiHash, event, residual }` via
|
|
110
|
+
`appendDecisionTape`. Shadow / compare / replay that snapshot in-memory (not a bus, not
|
|
111
|
+
durable). This is still **[ArkRun]** — do not turn the tape into an ArkOrder skill.
|
|
109
112
|
- In-memory stores lose state on restart — **not** production durability. Note bounded history
|
|
110
113
|
(`maxHistorySize` 1000) if the hand-rolled version retained everything.
|
|
111
114
|
6. **Delete the hand-rolled version** once call sites are moved — the point is
|
|
@@ -77,8 +77,8 @@ ArkGate has **always-on Layers** plus opt-in extras. The user chooses extras; yo
|
|
|
77
77
|
|-------|------------------|----------------|-----------------|
|
|
78
78
|
| **Layers** (inter-layer) | Who may import whom, capabilities, pure/forbiddenGlobals, peerIsolation | `ark.config.json` → `layers[]`, `rules[]` | graph check, baseline edges, doctor coverage % |
|
|
79
79
|
| **ArkRules** (intra-layer) | Structure inside a layer + domain invariants as data | `arkRules` map + `arkrules/<ExactLayerName>.json` | structure sensors, invariant coverage, `--rules-inventory`, doctor `rulesUnderContract` |
|
|
80
|
-
| **ArkRun** (extra) | Kernel usage + complete declarations | `arkRun` on `ark.config.json` (schema `1.2+`); factory `arkgate/runtime`; **`kernelRoots` preferred**, `compositionRoots` alias | `ARKRUN_*`, doctor `arkRun` (`notAScore`) |
|
|
81
|
-
| **ArkOrder** (extra) | Operational pattern (ξ vs s) | `arkOrder` on `ark.config.json` (schema `1.3+`); factory `arkgate/order` | `ARKORDER_*` |
|
|
80
|
+
| **ArkRun** (extra) | Kernel usage + complete declarations; information package `decisionTape` `{ xiHash, event, residual }` | `arkRun` on `ark.config.json` (schema `1.2+`); factory `arkgate/runtime`; **`kernelRoots` preferred**, `compositionRoots` alias | `ARKRUN_*`, doctor `arkRun` (`notAScore`) |
|
|
81
|
+
| **ArkOrder** (extra) | Operational pattern (ξ vs s). Valve: first `release()`, later ξ is `proposeRelease` then `apply`; `refreshSigma`; ingest residual `absorb \| escalate_up \| hold` + `reasonCode`; capacity pack as data; in-memory `ReleaseStore` | `arkOrder` on `ark.config.json` (schema `1.3+`); factory `arkgate/order` | `ARKORDER_*` |
|
|
82
82
|
|
|
83
83
|
**Rules for every report / answer:**
|
|
84
84
|
1. Prefix each finding or next step with **`[Layer]`** or **`[ArkRules]`** or **`[ArkRun]`** or **`[ArkOrder]`** (or a table with those headers).
|
|
@@ -124,8 +124,8 @@ ArkGate has **always-on Layers** plus opt-in extras. The user chooses extras; yo
|
|
|
124
124
|
|-------|------------------|----------------|-----------------|
|
|
125
125
|
| **Layers** (inter-layer) | Who may import whom, capabilities, pure/forbiddenGlobals, peerIsolation | `ark.config.json` → `layers[]`, `rules[]` | graph check, baseline edges, doctor coverage % |
|
|
126
126
|
| **ArkRules** (intra-layer) | Structure inside a layer + domain invariants as data | `arkRules` map + `arkrules/<ExactLayerName>.json` | structure sensors, invariant coverage, `--rules-inventory`, doctor `rulesUnderContract` |
|
|
127
|
-
| **ArkRun** (extra) | Kernel usage + complete declarations | `arkRun` on `ark.config.json` (schema `1.2+`); factory `arkgate/runtime`; **`kernelRoots` preferred**, `compositionRoots` alias | `ARKRUN_*`, doctor `arkRun` (`notAScore`) |
|
|
128
|
-
| **ArkOrder** (extra) | Operational pattern (ξ vs s) | `arkOrder` on `ark.config.json` (schema `1.3+`); factory `arkgate/order` | `ARKORDER_*` |
|
|
127
|
+
| **ArkRun** (extra) | Kernel usage + complete declarations; information package `decisionTape` `{ xiHash, event, residual }` | `arkRun` on `ark.config.json` (schema `1.2+`); factory `arkgate/runtime`; **`kernelRoots` preferred**, `compositionRoots` alias | `ARKRUN_*`, doctor `arkRun` (`notAScore`) |
|
|
128
|
+
| **ArkOrder** (extra) | Operational pattern (ξ vs s). Valve: first `release()`, later ξ is `proposeRelease` then `apply`; `refreshSigma`; ingest residual `absorb \| escalate_up \| hold` + `reasonCode`; capacity pack as data; in-memory `ReleaseStore` | `arkOrder` on `ark.config.json` (schema `1.3+`); factory `arkgate/order` | `ARKORDER_*` |
|
|
129
129
|
|
|
130
130
|
**Rules for every report / answer:**
|
|
131
131
|
1. Prefix each finding or next step with **`[Layer]`** or **`[ArkRules]`** or **`[ArkRun]`** or **`[ArkOrder]`** (or a table with those headers).
|