arkgate 4.8.6 → 4.8.8
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 +55 -4
- package/README.md +37 -4
- package/bin/ark-dashboard.mjs +423 -0
- package/bin/ark-mcp-runtime.mjs +8 -2
- package/bin/ark.mjs +51 -3
- package/bin/lib/analysis-engine.mjs +5 -5
- package/bin/lib/doctor-human.mjs +9 -0
- package/bin/lib/doctor-plan.mjs +5 -1
- package/bin/lib/html-report.mjs +4 -2
- package/bin/lib/layer-description.mjs +27 -0
- package/bin/lib/prepare-write.mjs +7 -1
- package/dist/{configTypes-dy5PfTqS.d.ts → configTypes-0eHpocR3.d.ts} +4 -0
- package/dist/{diagnosticCatalog-D_DI7qrZ.d.ts → diagnosticCatalog-DxKCTBbp.d.ts} +3 -3
- package/dist/eslint/index.d.ts +1 -1
- package/dist/index.cjs +19 -19
- package/dist/index.d.ts +5 -4
- package/dist/index.js +20 -20
- package/dist/nestjs/index.cjs +5 -5
- package/dist/nestjs/index.d.ts +3 -3
- package/dist/nestjs/index.js +5 -5
- package/dist/runtime/index.cjs +15 -15
- package/dist/runtime/index.d.ts +6 -6
- package/dist/runtime/index.js +15 -15
- package/dist/{types-BuM8WNqe.d.ts → types-BK47clMl.d.ts} +1 -1
- package/dist/{types-DrqsOiTY.d.ts → types-DxvmJO-D.d.ts} +106 -2
- package/docs/README.md +12 -4
- package/docs/agent-guide.md +36 -1
- package/docs/ai-gates.md +13 -1
- package/docs/arkorder.md +11 -1
- package/docs/configuration.md +25 -3
- package/docs/develop.md +13 -6
- package/docs/enthusiast/README.md +13 -2
- package/docs/package-surface.md +21 -5
- package/docs/product-voice.md +25 -2
- package/docs/use.md +11 -3
- package/package.json +3 -1
- package/server.json +2 -2
- package/templates/agent-skills/ark-adopt/SKILL.md +19 -1
- package/templates/agent-skills/ark-autopilot/SKILL.md +1 -1
- package/templates/agent-skills/ark-contract/SKILL.md +1 -1
- package/templates/agent-skills/ark-place/SKILL.md +18 -4
- package/templates/skills/ark-adopt.md +19 -1
- package/templates/skills/ark-autopilot.md +1 -1
- package/templates/skills/ark-contract.md +1 -1
- package/templates/skills/ark-place.md +18 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "arkgate",
|
|
3
|
-
"version": "4.8.
|
|
3
|
+
"version": "4.8.8",
|
|
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",
|
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.
|
|
9
|
+
"version": "4.8.8",
|
|
10
10
|
"packages": [
|
|
11
11
|
{
|
|
12
12
|
"registryType": "npm",
|
|
13
13
|
"identifier": "arkgate",
|
|
14
|
-
"version": "4.8.
|
|
14
|
+
"version": "4.8.8",
|
|
15
15
|
"runtimeHint": "npx",
|
|
16
16
|
"transport": {
|
|
17
17
|
"type": "stdio"
|
|
@@ -19,6 +19,9 @@ description: Session 0 — write the rules file (ark.config.json) to match the r
|
|
|
19
19
|
- Existing tree: propose **SharedKernel** (types/constants) + **CompositionRoot** (wiring) + `src/**/domain/**`. Never dump bare `src/lib/**` into Application.
|
|
20
20
|
- Generate `.ark/golden-pattern.json` (load-bearing for `/ark-place`).
|
|
21
21
|
- Future houses: mark unused layer globs `reserved` / `allowEmpty` so `--strict-config` does not fail.
|
|
22
|
+
- When the product map or glossary names a house, write `layers[].description` as
|
|
23
|
+
app-context copy (what this folder is *in the product*). Compact starter may omit.
|
|
24
|
+
Do not invent captions. Do not invent `/ark-describe`.
|
|
22
25
|
- CLI-first: if `arkgate-check` already resolved the root, do not wait on MCP.
|
|
23
26
|
- Do not add `arkRun` or `arkOrder` unless the user wants that extra. When they do, write
|
|
24
27
|
**advisory** extra in this turn (`arkRun` schema `1.2+`; `arkOrder` schema `1.3+`).
|
|
@@ -88,6 +91,16 @@ When present, prefer the consumer **domain glossary** for layer names, slice fol
|
|
|
88
91
|
- Prefer glossary terms over inventing parallel vocabulary.
|
|
89
92
|
- Call out conflicts between glossary language and code reality (process judgment).
|
|
90
93
|
- **Missing glossary is normal** — continue without warning spam. Never treat glossary prose as enforcement.
|
|
94
|
+
- When the glossary (or product map) names a house, that name is the `layers[].description` source — write it; do not invent a parallel caption.
|
|
95
|
+
|
|
96
|
+
## Layer captions (process)
|
|
97
|
+
|
|
98
|
+
When the **product map** (anti-wrapper) or **glossary** names a house, write
|
|
99
|
+
`layers[].description` on that layer in this turn. One sentence of **app context**
|
|
100
|
+
(what this folder is *in the product* — e.g. "Purchase requests — from asked to
|
|
101
|
+
received."), not architecture jargon. Compact starter / `ark start` may omit the
|
|
102
|
+
field. Absence is silent — never fail `--strict-config` for a missing caption.
|
|
103
|
+
Do **not** invent captions. Do not invent `/ark-describe`.
|
|
91
104
|
|
|
92
105
|
## When / not when
|
|
93
106
|
|
|
@@ -174,6 +187,7 @@ ArkGate has **always-on Layers** plus opt-in extras. The user chooses extras; yo
|
|
|
174
187
|
```
|
|
175
188
|
|
|
176
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.
|
|
177
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`.
|
|
178
192
|
|
|
179
193
|
- Do **not** put `arkOrder` on the compact starter / `ark start` scaffold. Domain stays plane-free. Import `createOrderPlane` from `arkgate/order` (same npm package).
|
|
@@ -235,6 +249,8 @@ Ark protects the **boundary around** a framework, not its internals. Nest/DI pub
|
|
|
235
249
|
User wants the ArkOrder extra → write **advisory** `arkOrder` (schema `1.3+`, real
|
|
236
250
|
`planeRoots`, existing `managedLayers`, `maxXiKeys` 7) **in this turn**. Do not add extras
|
|
237
251
|
to a compact starter. Do not promote to enforced as the session-0 default.
|
|
252
|
+
When the product map or glossary names a house, write `layers[].description` on that
|
|
253
|
+
layer (app-context sentence). Compact starter may omit. Do not invent captions.
|
|
238
254
|
2. **Check + diagnose** — `summary.concentrated` / dominant edge → fix contract first, don’t freeze.
|
|
239
255
|
Cross-slice / cross-context `peerIsolation` hits are judgment: extract shared or events.
|
|
240
256
|
The denial names its reason. `unclassifiable path` in bulk means shared code lives outside
|
|
@@ -246,7 +262,8 @@ Ark protects the **boundary around** a framework, not its internals. Nest/DI pub
|
|
|
246
262
|
Empty Domain/Persistence + I/O under Application → false-green.
|
|
247
263
|
**STOP — do not continue this skill as complete.** **STOP — false-green:** fix the config **in this turn** before claiming ENFORCE. Do not claim goal.met / ENFORCE from type-only cleanup while doctor reports `contract-false-green-io-under-application`.
|
|
248
264
|
3. **Classify ungoverned** — use coverage `suggestions` **plus** dirs you discovered by reading;
|
|
249
|
-
add layers/patterns **here** (write `ark.config.json`).
|
|
265
|
+
add layers/patterns **here** (write `ark.config.json`). When adding a layer the product map
|
|
266
|
+
or glossary already names, write `layers[].description` on it (do not invent filler).
|
|
250
267
|
4. **Mine business rules → manifiesto** (model job — this is why the skill exists):
|
|
251
268
|
- Scan for loose domain: validators, pricing/policy functions, `can*`/`calculate*`, magic business constants, publish/intent strings, logic in UI/hooks that belongs in Domain.
|
|
252
269
|
- **ArkRules inventory (AR13):** run `ark-check --rules-inventory --json` for deterministic candidates
|
|
@@ -285,6 +302,7 @@ proposals applied or deferred, **phase**, **top Shape / design-weak opportunitie
|
|
|
285
302
|
- Put `arkRun` or `arkOrder` on the compact starter / `ark start` scaffold.
|
|
286
303
|
- Claim in-memory kernel stores are production durability.
|
|
287
304
|
- Invent `/ark-run` or `/ark-order`.
|
|
305
|
+
- Invent `layers[].description` filler or a `/ark-describe` skill.
|
|
288
306
|
- Claim Enforce while governed% is low, cores empty with I/O in Application, or core bags ungoverned.
|
|
289
307
|
- End adopt with only “baseline written” when design-weak residual is visible in files you opened.
|
|
290
308
|
|
|
@@ -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`. Copy [examples/arkorder-billing/](../../../examples/arkorder-billing/) and rename the three keys. The check remains silent on semantic entailment.
|
|
49
49
|
|
|
50
50
|
## Subagent fan-out (optional, host-dependent)
|
|
51
51
|
|
|
@@ -19,6 +19,8 @@ description: "Where does new code go? Names the folder from the rules file and w
|
|
|
19
19
|
- `filePath` is known before the call. Description alone is not a path.
|
|
20
20
|
- Golden pattern is load-bearing when present. Adopt generates it.
|
|
21
21
|
- Do not default a repository to Presentation.
|
|
22
|
+
- When the matched layer has `layers[].description`, print that caption next to the
|
|
23
|
+
layer name and globs. Omit when absent — do not invent a caption or `/ark-describe`.
|
|
22
24
|
- When `arkRun` is on: scaffold through the kernel (no `new` of managed types; declare
|
|
23
25
|
`uses` / `reactsTo` / `raises` / `sends`; factory only in `arkRun.kernelRoots`,
|
|
24
26
|
`compositionRoots` alias). Extra off → do not introduce the kernel. Enable it
|
|
@@ -57,6 +59,12 @@ patterns are **out-of-scope** lenses — say so; do not invent Ark enforcement f
|
|
|
57
59
|
|
|
58
60
|
**Where so the AI doesn’t mess up next time** — golden pattern + layer home before the write.
|
|
59
61
|
|
|
62
|
+
## Layer captions (process)
|
|
63
|
+
|
|
64
|
+
When `ark_place` / the contract includes `layers[].description`, print that caption
|
|
65
|
+
next to the layer name and globs. Omit it when the field is absent. Do **not** invent
|
|
66
|
+
a caption or `/ark-describe`.
|
|
67
|
+
|
|
60
68
|
## Deep modules (process)
|
|
61
69
|
|
|
62
70
|
- Place so new code stays **deep**: one small public surface per concern; hide implementation details.
|
|
@@ -80,7 +88,8 @@ and — if they asked to build it — scaffold it there correctly.
|
|
|
80
88
|
**No artifact given?** If the skill is invoked with nothing to place, don't error
|
|
81
89
|
and don't guess — the artifact is the one thing only the user knows. Read the
|
|
82
90
|
contract (step 1) and print the placement map from it: one row per declared layer
|
|
83
|
-
with
|
|
91
|
+
with layer name, globs, and `layers[].description` when present (omit when absent),
|
|
92
|
+
what belongs there, its directory, and which layers it may/may not import,
|
|
84
93
|
plus the not-yet-adopted `suggestedLayers` as a footnote. Then ask what they want
|
|
85
94
|
to place. That map is derived entirely from the repo, so producing it is real work,
|
|
86
95
|
not a stalling question.
|
|
@@ -148,6 +157,7 @@ When `arkOrder` is present on the architecture config:
|
|
|
148
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`.
|
|
149
158
|
- Call the factory only inside `arkOrder.planeRoots`. Empty roots in `enforced` mode is `ARKORDER_MISSING_PLANE`.
|
|
150
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.
|
|
151
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`.
|
|
152
162
|
- Absence of the extra is valid. Do not invent `/ark-order`. Skills never enforce.
|
|
153
163
|
|
|
@@ -164,7 +174,9 @@ the same files or weaken the gate.
|
|
|
164
174
|
the mandatory `ark_identity` preflight first, then call **`ark_place`** with the target file
|
|
165
175
|
path and bound `project` envelope — it returns the layer,
|
|
166
176
|
its forbidden globals, and exactly which layers the file may / must not import,
|
|
167
|
-
straight from the contract (no guessing). When
|
|
177
|
+
straight from the contract (no guessing). When the matched layer has
|
|
178
|
+
`layers[].description`, print that caption next to the layer name and globs;
|
|
179
|
+
omit it when absent. When present, also honor optional
|
|
168
180
|
**`goldenPattern`** (from `.ark/golden-pattern.json`) for **NEW code only** —
|
|
169
181
|
advisory layout norm; never overrides the gate and never clears design-weak.
|
|
170
182
|
Absent golden is normal. Otherwise load `ark.config.json`; after the matched preflight,
|
|
@@ -197,7 +209,8 @@ the same files or weaken the gate.
|
|
|
197
209
|
same technical layer are peerIsolation violations.
|
|
198
210
|
3. **Answer concretely**: layer name, target directory (from the layer's
|
|
199
211
|
`patterns`), intent-name prefix if the layer declares `intentPrefixes`, and
|
|
200
|
-
which layers it may/may not import (from `rules`).
|
|
212
|
+
which layers it may/may not import (from `rules`). When present, print
|
|
213
|
+
`layers[].description` next to the layer name and globs; omit when absent.
|
|
201
214
|
4. **If the layer isn't adopted yet** (suggested but no directory): write the
|
|
202
215
|
layer into `ark.config.json` (session-0 honesty — same as `/ark-adopt` for
|
|
203
216
|
that glob) **then** write the file. Don't silently drop the code into a
|
|
@@ -242,7 +255,8 @@ the same files or weaken the gate.
|
|
|
242
255
|
## Verify and report
|
|
243
256
|
|
|
244
257
|
If you created files, run `ark-check --root . --config ark.config.json
|
|
245
|
-
--strict-config` and make it pass. Report: placement + why
|
|
258
|
+
--strict-config` and make it pass. Report: placement + why (include the caption
|
|
259
|
+
next to layer name and globs when present; omit when absent), files created (if
|
|
246
260
|
any), and the import rules the new code must respect going forward.
|
|
247
261
|
|
|
248
262
|
## Completion contract (skill incomplete if missing)
|
|
@@ -19,6 +19,9 @@ description: Session 0 — write the rules file (ark.config.json) to match the r
|
|
|
19
19
|
- Existing tree: propose **SharedKernel** (types/constants) + **CompositionRoot** (wiring) + `src/**/domain/**`. Never dump bare `src/lib/**` into Application.
|
|
20
20
|
- Generate `.ark/golden-pattern.json` (load-bearing for `/ark-place`).
|
|
21
21
|
- Future houses: mark unused layer globs `reserved` / `allowEmpty` so `--strict-config` does not fail.
|
|
22
|
+
- When the product map or glossary names a house, write `layers[].description` as
|
|
23
|
+
app-context copy (what this folder is *in the product*). Compact starter may omit.
|
|
24
|
+
Do not invent captions. Do not invent `/ark-describe`.
|
|
22
25
|
- CLI-first: if `arkgate-check` already resolved the root, do not wait on MCP.
|
|
23
26
|
- Do not add `arkRun` or `arkOrder` unless the user wants that extra. When they do, write
|
|
24
27
|
**advisory** extra in this turn (`arkRun` schema `1.2+`; `arkOrder` schema `1.3+`).
|
|
@@ -88,6 +91,16 @@ When present, prefer the consumer **domain glossary** for layer names, slice fol
|
|
|
88
91
|
- Prefer glossary terms over inventing parallel vocabulary.
|
|
89
92
|
- Call out conflicts between glossary language and code reality (process judgment).
|
|
90
93
|
- **Missing glossary is normal** — continue without warning spam. Never treat glossary prose as enforcement.
|
|
94
|
+
- When the glossary (or product map) names a house, that name is the `layers[].description` source — write it; do not invent a parallel caption.
|
|
95
|
+
|
|
96
|
+
## Layer captions (process)
|
|
97
|
+
|
|
98
|
+
When the **product map** (anti-wrapper) or **glossary** names a house, write
|
|
99
|
+
`layers[].description` on that layer in this turn. One sentence of **app context**
|
|
100
|
+
(what this folder is *in the product* — e.g. "Purchase requests — from asked to
|
|
101
|
+
received."), not architecture jargon. Compact starter / `ark start` may omit the
|
|
102
|
+
field. Absence is silent — never fail `--strict-config` for a missing caption.
|
|
103
|
+
Do **not** invent captions. Do not invent `/ark-describe`.
|
|
91
104
|
|
|
92
105
|
## When / not when
|
|
93
106
|
|
|
@@ -174,6 +187,7 @@ ArkGate has **always-on Layers** plus opt-in extras. The user chooses extras; yo
|
|
|
174
187
|
```
|
|
175
188
|
|
|
176
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.
|
|
177
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`.
|
|
178
192
|
|
|
179
193
|
- Do **not** put `arkOrder` on the compact starter / `ark start` scaffold. Domain stays plane-free. Import `createOrderPlane` from `arkgate/order` (same npm package).
|
|
@@ -235,6 +249,8 @@ Ark protects the **boundary around** a framework, not its internals. Nest/DI pub
|
|
|
235
249
|
User wants the ArkOrder extra → write **advisory** `arkOrder` (schema `1.3+`, real
|
|
236
250
|
`planeRoots`, existing `managedLayers`, `maxXiKeys` 7) **in this turn**. Do not add extras
|
|
237
251
|
to a compact starter. Do not promote to enforced as the session-0 default.
|
|
252
|
+
When the product map or glossary names a house, write `layers[].description` on that
|
|
253
|
+
layer (app-context sentence). Compact starter may omit. Do not invent captions.
|
|
238
254
|
2. **Check + diagnose** — `summary.concentrated` / dominant edge → fix contract first, don’t freeze.
|
|
239
255
|
Cross-slice / cross-context `peerIsolation` hits are judgment: extract shared or events.
|
|
240
256
|
The denial names its reason. `unclassifiable path` in bulk means shared code lives outside
|
|
@@ -246,7 +262,8 @@ Ark protects the **boundary around** a framework, not its internals. Nest/DI pub
|
|
|
246
262
|
Empty Domain/Persistence + I/O under Application → false-green.
|
|
247
263
|
**STOP — do not continue this skill as complete.** **STOP — false-green:** fix the config **in this turn** before claiming ENFORCE. Do not claim goal.met / ENFORCE from type-only cleanup while doctor reports `contract-false-green-io-under-application`.
|
|
248
264
|
3. **Classify ungoverned** — use coverage `suggestions` **plus** dirs you discovered by reading;
|
|
249
|
-
add layers/patterns **here** (write `ark.config.json`).
|
|
265
|
+
add layers/patterns **here** (write `ark.config.json`). When adding a layer the product map
|
|
266
|
+
or glossary already names, write `layers[].description` on it (do not invent filler).
|
|
250
267
|
4. **Mine business rules → manifiesto** (model job — this is why the skill exists):
|
|
251
268
|
- Scan for loose domain: validators, pricing/policy functions, `can*`/`calculate*`, magic business constants, publish/intent strings, logic in UI/hooks that belongs in Domain.
|
|
252
269
|
- **ArkRules inventory (AR13):** run `ark-check --rules-inventory --json` for deterministic candidates
|
|
@@ -285,6 +302,7 @@ proposals applied or deferred, **phase**, **top Shape / design-weak opportunitie
|
|
|
285
302
|
- Put `arkRun` or `arkOrder` on the compact starter / `ark start` scaffold.
|
|
286
303
|
- Claim in-memory kernel stores are production durability.
|
|
287
304
|
- Invent `/ark-run` or `/ark-order`.
|
|
305
|
+
- Invent `layers[].description` filler or a `/ark-describe` skill.
|
|
288
306
|
- Claim Enforce while governed% is low, cores empty with I/O in Application, or core bags ungoverned.
|
|
289
307
|
- End adopt with only “baseline written” when design-weak residual is visible in files you opened.
|
|
290
308
|
|
|
@@ -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`. Copy [examples/arkorder-billing/](../../../examples/arkorder-billing/) and rename the three keys. The check remains silent on semantic entailment.
|
|
49
49
|
|
|
50
50
|
## Subagent fan-out (optional, host-dependent)
|
|
51
51
|
|
|
@@ -19,6 +19,8 @@ description: "Where does new code go? Names the folder from the rules file and w
|
|
|
19
19
|
- `filePath` is known before the call. Description alone is not a path.
|
|
20
20
|
- Golden pattern is load-bearing when present. Adopt generates it.
|
|
21
21
|
- Do not default a repository to Presentation.
|
|
22
|
+
- When the matched layer has `layers[].description`, print that caption next to the
|
|
23
|
+
layer name and globs. Omit when absent — do not invent a caption or `/ark-describe`.
|
|
22
24
|
- When `arkRun` is on: scaffold through the kernel (no `new` of managed types; declare
|
|
23
25
|
`uses` / `reactsTo` / `raises` / `sends`; factory only in `arkRun.kernelRoots`,
|
|
24
26
|
`compositionRoots` alias). Extra off → do not introduce the kernel. Enable it
|
|
@@ -57,6 +59,12 @@ patterns are **out-of-scope** lenses — say so; do not invent Ark enforcement f
|
|
|
57
59
|
|
|
58
60
|
**Where so the AI doesn’t mess up next time** — golden pattern + layer home before the write.
|
|
59
61
|
|
|
62
|
+
## Layer captions (process)
|
|
63
|
+
|
|
64
|
+
When `ark_place` / the contract includes `layers[].description`, print that caption
|
|
65
|
+
next to the layer name and globs. Omit it when the field is absent. Do **not** invent
|
|
66
|
+
a caption or `/ark-describe`.
|
|
67
|
+
|
|
60
68
|
## Deep modules (process)
|
|
61
69
|
|
|
62
70
|
- Place so new code stays **deep**: one small public surface per concern; hide implementation details.
|
|
@@ -80,7 +88,8 @@ and — if they asked to build it — scaffold it there correctly.
|
|
|
80
88
|
**No artifact given?** If the skill is invoked with nothing to place, don't error
|
|
81
89
|
and don't guess — the artifact is the one thing only the user knows. Read the
|
|
82
90
|
contract (step 1) and print the placement map from it: one row per declared layer
|
|
83
|
-
with
|
|
91
|
+
with layer name, globs, and `layers[].description` when present (omit when absent),
|
|
92
|
+
what belongs there, its directory, and which layers it may/may not import,
|
|
84
93
|
plus the not-yet-adopted `suggestedLayers` as a footnote. Then ask what they want
|
|
85
94
|
to place. That map is derived entirely from the repo, so producing it is real work,
|
|
86
95
|
not a stalling question.
|
|
@@ -148,6 +157,7 @@ When `arkOrder` is present on the architecture config:
|
|
|
148
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`.
|
|
149
158
|
- Call the factory only inside `arkOrder.planeRoots`. Empty roots in `enforced` mode is `ARKORDER_MISSING_PLANE`.
|
|
150
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.
|
|
151
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`.
|
|
152
162
|
- Absence of the extra is valid. Do not invent `/ark-order`. Skills never enforce.
|
|
153
163
|
|
|
@@ -164,7 +174,9 @@ the same files or weaken the gate.
|
|
|
164
174
|
the mandatory `ark_identity` preflight first, then call **`ark_place`** with the target file
|
|
165
175
|
path and bound `project` envelope — it returns the layer,
|
|
166
176
|
its forbidden globals, and exactly which layers the file may / must not import,
|
|
167
|
-
straight from the contract (no guessing). When
|
|
177
|
+
straight from the contract (no guessing). When the matched layer has
|
|
178
|
+
`layers[].description`, print that caption next to the layer name and globs;
|
|
179
|
+
omit it when absent. When present, also honor optional
|
|
168
180
|
**`goldenPattern`** (from `.ark/golden-pattern.json`) for **NEW code only** —
|
|
169
181
|
advisory layout norm; never overrides the gate and never clears design-weak.
|
|
170
182
|
Absent golden is normal. Otherwise load `ark.config.json`; after the matched preflight,
|
|
@@ -197,7 +209,8 @@ the same files or weaken the gate.
|
|
|
197
209
|
same technical layer are peerIsolation violations.
|
|
198
210
|
3. **Answer concretely**: layer name, target directory (from the layer's
|
|
199
211
|
`patterns`), intent-name prefix if the layer declares `intentPrefixes`, and
|
|
200
|
-
which layers it may/may not import (from `rules`).
|
|
212
|
+
which layers it may/may not import (from `rules`). When present, print
|
|
213
|
+
`layers[].description` next to the layer name and globs; omit when absent.
|
|
201
214
|
4. **If the layer isn't adopted yet** (suggested but no directory): write the
|
|
202
215
|
layer into `ark.config.json` (session-0 honesty — same as `/ark-adopt` for
|
|
203
216
|
that glob) **then** write the file. Don't silently drop the code into a
|
|
@@ -242,7 +255,8 @@ the same files or weaken the gate.
|
|
|
242
255
|
## Verify and report
|
|
243
256
|
|
|
244
257
|
If you created files, run `ark-check --root . --config ark.config.json
|
|
245
|
-
--strict-config` and make it pass. Report: placement + why
|
|
258
|
+
--strict-config` and make it pass. Report: placement + why (include the caption
|
|
259
|
+
next to layer name and globs when present; omit when absent), files created (if
|
|
246
260
|
any), and the import rules the new code must respect going forward.
|
|
247
261
|
|
|
248
262
|
## Completion contract (skill incomplete if missing)
|