arkgate 4.8.13 → 4.8.15
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 +219 -4
- package/README.md +33 -22
- package/SECURITY.md +5 -3
- package/bin/ark-check-runtime.mjs +25 -57
- package/bin/ark-mcp-runtime.mjs +111 -2
- package/bin/ark-shared.mjs +140 -11
- package/bin/ark.mjs +7 -25
- package/bin/lib/adr-presence.mjs +97 -0
- package/bin/lib/agent-projection-formatters.mjs +2 -0
- package/bin/lib/agent-skills-package.mjs +241 -8
- package/bin/lib/analysis-completeness.mjs +38 -2
- package/bin/lib/analysis-engine.mjs +6 -6
- package/bin/lib/architecture-scan.mjs +33 -5
- package/bin/lib/ark-order-doctor.mjs +7 -1
- package/bin/lib/ark-order-report.mjs +2 -1
- package/bin/lib/ark-run-doctor.mjs +6 -0
- package/bin/lib/ark-run-report.mjs +6 -2
- package/bin/lib/arkrules-sensors.mjs +81 -0
- package/bin/lib/baseline-key.mjs +4 -1
- package/bin/lib/check-args.mjs +52 -2
- package/bin/lib/ci-and-commands.mjs +7 -2
- package/bin/lib/config-contract.mjs +64 -1
- package/bin/lib/design-smells.mjs +21 -1
- package/bin/lib/diagnostic-catalog.mjs +5 -3
- package/bin/lib/doctor-advisories.mjs +109 -17
- package/bin/lib/doctor-human.mjs +20 -6
- package/bin/lib/doctor-next-actions.mjs +14 -0
- package/bin/lib/doctor-plan.mjs +32 -2
- package/bin/lib/enforcement-honesty.mjs +47 -2
- package/bin/lib/first-run-help.mjs +19 -3
- package/bin/lib/gate-files.mjs +40 -3
- package/bin/lib/host-support-matrix.mjs +9 -1
- package/bin/lib/html-report-depth.mjs +2 -0
- package/bin/lib/html-report.mjs +13 -2
- package/bin/lib/import-resolve.mjs +74 -13
- package/bin/lib/improvement-compass-doctor.mjs +6 -1
- package/bin/lib/improvement-compass-map.mjs +3 -1
- package/bin/lib/install-migrate.mjs +23 -0
- package/bin/lib/layer-description.mjs +90 -8
- package/bin/lib/mcp-hook-payload.mjs +57 -1
- package/bin/lib/no-domain-frontend.mjs +91 -0
- package/bin/lib/presets.mjs +3 -4
- package/bin/lib/product-copy.mjs +19 -0
- package/bin/lib/projected-governed-coverage.mjs +114 -0
- package/bin/lib/recommend-cli.mjs +54 -0
- package/bin/lib/remediation.mjs +6 -2
- package/bin/lib/resolved-candidate-facts.mjs +225 -100
- package/bin/lib/rules-under-contract.mjs +117 -2
- package/bin/lib/scan-files.mjs +39 -0
- package/bin/lib/snippet-analysis.mjs +14 -8
- package/bin/lib/start-preview.mjs +8 -2
- package/bin/lib/states-transitions-presence.mjs +212 -0
- package/bin/lib/status-command.mjs +2 -0
- package/bin/lib/status-transition-catalog.mjs +410 -0
- package/bin/lib/team-parliament-io.mjs +10 -0
- package/bin/lib/upgrade-whats-new.mjs +3 -3
- package/bin/lib/violations.mjs +43 -1
- package/bin/lib/write-path-capabilities.mjs +20 -5
- package/bin/lib/write-path-detect.mjs +27 -2
- package/dist/{configTypes-j7so8B4O.d.ts → configTypes-Dt3DpVbd.d.ts} +19 -0
- package/dist/{diagnosticCatalog-DA565Lja.d.ts → diagnosticCatalog-BEg85XlE.d.ts} +3 -3
- package/dist/eslint/index.cjs +4 -4
- package/dist/eslint/index.d.ts +1 -1
- package/dist/eslint/index.js +4 -4
- package/dist/index.cjs +31 -31
- package/dist/index.d.ts +126 -19
- package/dist/index.js +31 -31
- 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-Djbs3KjE.d.ts → types-CN9tVMPz.d.ts} +3 -1
- package/dist/{types-tGhZUiGX.d.ts → types-TBiv0WHL.d.ts} +1 -1
- package/docs/README.md +8 -6
- package/docs/agent-guide.md +35 -17
- package/docs/ai-gates.md +13 -4
- package/docs/arkorder.md +11 -4
- package/docs/brownfield-adoption.md +4 -1
- package/docs/configuration.md +63 -14
- package/docs/develop.md +4 -1
- package/docs/diagnostics.md +30 -10
- package/docs/enthusiast/README.md +6 -1
- package/docs/enthusiast/how-to-agent-gates.md +5 -0
- package/docs/enthusiast/how-to-gallery-starter.md +2 -1
- package/docs/enthusiast/how-to-pick-shape.md +1 -1
- package/docs/package-surface.md +10 -6
- package/docs/product-voice.md +32 -6
- package/docs/threat-model.md +2 -2
- package/docs/typescript-support.md +3 -3
- package/docs/use.md +23 -11
- package/package.json +1 -1
- package/schemas/ark.config.schema.json +23 -2
- package/server.json +2 -2
- package/templates/agent-skills/README.md +7 -4
- package/templates/agent-skills/ark-adopt/SKILL.md +91 -6
- package/templates/agent-skills/ark-architect/SKILL.md +5 -18
- package/templates/agent-skills/ark-autopilot/SKILL.md +14 -6
- package/templates/agent-skills/ark-contract/SKILL.md +9 -20
- package/templates/agent-skills/ark-coverage/SKILL.md +13 -9
- package/templates/agent-skills/ark-explain/SKILL.md +11 -5
- package/templates/agent-skills/ark-explore/SKILL.md +39 -5
- package/templates/agent-skills/ark-fix/SKILL.md +15 -20
- package/templates/agent-skills/ark-loop/SKILL.md +14 -20
- package/templates/agent-skills/ark-order/SKILL.md +200 -0
- package/templates/agent-skills/ark-place/SKILL.md +49 -11
- package/templates/agent-skills/ark-runtime/SKILL.md +21 -6
- package/templates/agent-skills/ark-think/SKILL.md +24 -126
- package/templates/agent-skills/ark-upgrade/SKILL.md +14 -3
- package/templates/arkrules/DomainModel.json +14 -1
- package/templates/skills/ark-adopt.md +91 -6
- package/templates/skills/ark-architect.md +5 -18
- package/templates/skills/ark-autopilot.md +14 -6
- package/templates/skills/ark-contract.md +9 -20
- package/templates/skills/ark-coverage.md +13 -9
- package/templates/skills/ark-explain.md +11 -5
- package/templates/skills/ark-explore.md +39 -5
- package/templates/skills/ark-fix.md +15 -20
- package/templates/skills/ark-loop.md +14 -20
- package/templates/skills/ark-order.md +200 -0
- package/templates/skills/ark-place.md +49 -11
- package/templates/skills/ark-runtime.md +21 -6
- package/templates/skills/ark-think.md +24 -126
- package/templates/skills/ark-upgrade.md +14 -3
- package/templates/tests/ark-adoption-gaps.test.ts +5 -4
|
@@ -5,28 +5,25 @@ description: Shortcut to /ark-autopilot for a small illegal-import cluster.
|
|
|
5
5
|
|
|
6
6
|
# /ark-fix — Shortcut to /ark-autopilot
|
|
7
7
|
|
|
8
|
-
**Not a first-
|
|
8
|
+
**Not a first-class door.** One-release redirect. Gate violations are
|
|
9
9
|
**`/ark-autopilot`**. Do that job now. CLI only validates.
|
|
10
|
-
|
|
11
|
-
## Autonomy contract
|
|
12
|
-
|
|
13
|
-
Invoking this leftover name **is** the approval to write the fix. Open importers,
|
|
14
|
-
design the port/move, apply, `ark-check`. Never weaken the config. Never invent
|
|
15
|
-
`mechanical-safe` kinds.
|
|
10
|
+
Contener · Guiar · Ordenar — this leftover name is not a star.
|
|
16
11
|
|
|
17
12
|
## When / not when
|
|
18
13
|
|
|
19
14
|
| Use this leftover name when… | Prefer instead |
|
|
20
15
|
|------------------------------|----------------|
|
|
21
16
|
| One change / small cluster just failed the gate | **`/ark-autopilot`** |
|
|
22
|
-
|
|
|
17
|
+
| Session 0 / false-green | **`/ark-adopt`** |
|
|
18
|
+
| One kernel candidate | **`/ark-runtime`** |
|
|
19
|
+
| One order-plane candidate | **`/ark-order`** |
|
|
23
20
|
|
|
24
21
|
## Plan B one-pilot checklist (when leftover design, not a single edge)
|
|
25
22
|
|
|
26
23
|
Empty plan A + leftover design work is **not** architecture finished. One pilot only.
|
|
27
24
|
Write an **extraction card** (`docs/brownfield-adoption.md` §6) — never mechanical-safe,
|
|
28
25
|
never silent B apply. **Kill-switch** required. `multiPilotBatchForbidden` — never
|
|
29
|
-
multi-pilot batch.
|
|
26
|
+
multi-pilot batch. Execute that work on **`/ark-autopilot`**.
|
|
30
27
|
|
|
31
28
|
## Dual engine (mandatory)
|
|
32
29
|
|
|
@@ -46,10 +43,6 @@ retain `projectIdentity.projectId`, then pass both `expectedRoot` and `expectedP
|
|
|
46
43
|
uncertain, do not consume MCP analysis: use the workspace-local CLI and report that MCP
|
|
47
44
|
restart/retargeting is required. `ark://manifest` never satisfies this preflight.
|
|
48
45
|
|
|
49
|
-
## Dual plane — layers + extras (mandatory, except /ark-runtime)
|
|
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`**. 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
|
-
|
|
53
46
|
## Subagent fan-out (optional, host-dependent)
|
|
54
47
|
|
|
55
48
|
If the host supports **parallel subagents**, fan out read-only scouts; otherwise
|
|
@@ -60,6 +53,15 @@ If the host supports **parallel subagents**, fan out read-only scouts; otherwise
|
|
|
60
53
|
- **Greenfield:** `/ark-adopt` or `ark-check --recommend` / `ark start`.
|
|
61
54
|
- **Brownfield:** `/ark-adopt`.
|
|
62
55
|
|
|
56
|
+
## Mechanical-edit hygiene (outcome gate)
|
|
57
|
+
|
|
58
|
+
Leftover name, same edit bar as `/ark-autopilot` if you still land here.
|
|
59
|
+
|
|
60
|
+
- Header injection must **merge into the existing doc comment**; the kept result has one `/**`, not stacked headers.
|
|
61
|
+
- Route completion or movement must **preserve the original typed `defineRoute<…>(opts, handler)` call**; reconstruct that call instead of extracting untyped opts/handler constants that drop generics or contextual typing.
|
|
62
|
+
- A convention-only `*-data.ts` stub is not a fix: move the real code or **leave the placeholder file uncreated**; never write `import "server-only"; export {}` as an empty naming token.
|
|
63
|
+
- Keep the edit only when the **previously clean file stays typecheck-clean**. Otherwise roll it back and treat the change as judgment.
|
|
64
|
+
|
|
63
65
|
## Steps
|
|
64
66
|
|
|
65
67
|
1. Sensor: `ark-check` / `--plan --json`.
|
|
@@ -68,13 +70,6 @@ If the host supports **parallel subagents**, fan out read-only scouts; otherwise
|
|
|
68
70
|
3. Otherwise execute **`/ark-autopilot`** for the cluster (extraction card if Shape).
|
|
69
71
|
4. Re-check.
|
|
70
72
|
|
|
71
|
-
## Mechanical-edit hygiene (outcome gate)
|
|
72
|
-
|
|
73
|
-
- Header injection must **merge into the existing doc comment**; the kept result has one `/**`, not stacked headers.
|
|
74
|
-
- Route completion or movement must **preserve the original typed `defineRoute<…>(opts, handler)` call**; reconstruct that call instead of extracting untyped opts/handler constants that drop generics or contextual typing.
|
|
75
|
-
- A convention-only `*-data.ts` stub is not a fix: move the real code or **leave the placeholder file uncreated**; never write `import "server-only"; export {}` as an empty naming token.
|
|
76
|
-
- Keep the edit only when the **previously clean file stays typecheck-clean**. Otherwise roll it back and treat the change as judgment.
|
|
77
|
-
|
|
78
73
|
## Completion contract (skill incomplete if missing)
|
|
79
74
|
|
|
80
75
|
Skill incomplete if missing any field below.
|
|
@@ -5,21 +5,17 @@ description: Shortcut to /ark-autopilot for illegal-import fixes. CLI validates
|
|
|
5
5
|
|
|
6
6
|
# /ark-loop — Shortcut to /ark-autopilot
|
|
7
7
|
|
|
8
|
-
**Not a first-
|
|
9
|
-
Do that job now.
|
|
10
|
-
|
|
11
|
-
## Autonomy contract
|
|
12
|
-
|
|
13
|
-
Invoking this leftover name **is** the approval to apply plan A. Open every step file.
|
|
14
|
-
Write. Re-check. Empty plan A + leftover design → **`/ark-explore`** then **`/ark-autopilot`**
|
|
15
|
-
for one extraction card (never mechanical-safe B).
|
|
8
|
+
**Not a first-class door.** One-release redirect. Driving `--plan` to `goal.met` is
|
|
9
|
+
**`/ark-autopilot`**. Do that job now.
|
|
10
|
+
Contener · Guiar · Ordenar — this leftover name is not a star.
|
|
16
11
|
|
|
17
12
|
## When / not when
|
|
18
13
|
|
|
19
14
|
| Use this leftover name when… | Prefer instead |
|
|
20
15
|
|------------------------------|----------------|
|
|
21
16
|
| Plan A has steps; drive to `goal.met` | **`/ark-autopilot`** |
|
|
22
|
-
|
|
|
17
|
+
| Map only | `/ark-explore` |
|
|
18
|
+
| Session 0 | `/ark-adopt` |
|
|
23
19
|
|
|
24
20
|
## Dual engine (mandatory)
|
|
25
21
|
|
|
@@ -41,10 +37,6 @@ restart/retargeting is required. `ark://manifest` never satisfies this preflight
|
|
|
41
37
|
|
|
42
38
|
Atomic multi-file work uses **`ark_prepare_change`** with the same matched `project` envelope.
|
|
43
39
|
|
|
44
|
-
## Dual plane — layers + extras (mandatory, except /ark-runtime)
|
|
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`**. 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
|
-
|
|
48
40
|
## Subagent fan-out (optional, host-dependent)
|
|
49
41
|
|
|
50
42
|
If the host supports **parallel subagents**, fan out read-only scouts; otherwise
|
|
@@ -55,6 +47,15 @@ If the host supports **parallel subagents**, fan out read-only scouts; otherwise
|
|
|
55
47
|
- **Greenfield:** `/ark-adopt` or `ark-check --recommend` / `ark start`.
|
|
56
48
|
- **Brownfield:** `/ark-adopt`.
|
|
57
49
|
|
|
50
|
+
## Mechanical-edit hygiene (outcome gate)
|
|
51
|
+
|
|
52
|
+
Leftover name, same edit bar as `/ark-autopilot` if you still land here.
|
|
53
|
+
|
|
54
|
+
- Header injection must **merge into the existing doc comment**; the kept result has one `/**`, not stacked headers.
|
|
55
|
+
- Route completion or movement must **preserve the original typed `defineRoute<…>(opts, handler)` call**; reconstruct that call instead of extracting untyped opts/handler constants that drop generics or contextual typing.
|
|
56
|
+
- A convention-only `*-data.ts` stub is not a fix: move the real code or **leave the placeholder file uncreated**; never write `import "server-only"; export {}` as an empty naming token.
|
|
57
|
+
- Keep the edit only when the **previously clean file stays typecheck-clean**. Otherwise roll it back and treat the change as judgment.
|
|
58
|
+
|
|
58
59
|
## Steps
|
|
59
60
|
|
|
60
61
|
1. `--plan --json`. Open every `steps[]` file.
|
|
@@ -64,13 +65,6 @@ If the host supports **parallel subagents**, fan out read-only scouts; otherwise
|
|
|
64
65
|
**STOP — false-green:** execute **`/ark-adopt`**.
|
|
65
66
|
4. Else execute **`/ark-autopilot`** (mechanical-safe + judgment). Extraction card for Shape B.
|
|
66
67
|
|
|
67
|
-
## Mechanical-edit hygiene (outcome gate)
|
|
68
|
-
|
|
69
|
-
- Header injection must **merge into the existing doc comment**; the kept result has one `/**`, not stacked headers.
|
|
70
|
-
- Route completion or movement must **preserve the original typed `defineRoute<…>(opts, handler)` call**; reconstruct that call instead of extracting untyped opts/handler constants that drop generics or contextual typing.
|
|
71
|
-
- A convention-only `*-data.ts` stub is not a fix: move the real code or **leave the placeholder file uncreated**; never write `import "server-only"; export {}` as an empty naming token.
|
|
72
|
-
- Keep the edit only when the **previously clean file stays typecheck-clean**. Otherwise roll it back and treat the change as judgment.
|
|
73
|
-
|
|
74
68
|
## Completion contract (skill incomplete if missing)
|
|
75
69
|
|
|
76
70
|
Skill incomplete if missing any field below.
|
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ark-order
|
|
3
|
+
description: Wire the optional ArkOrder extra (arkgate/order). One candidate. Extra on via /ark-adopt.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# /ark-order — Evaluate and wire ArkOrder (optional)
|
|
7
|
+
|
|
8
|
+
**Contener · Guiar · Ordenar.** In plain words: contain the write, guide the next
|
|
9
|
+
step, order leftover mess. This door is **Ordenar**: the extra for the few big product
|
|
10
|
+
choices (billing plan, not seat counts). Ordering leftover folders is `/ark-explore`
|
|
11
|
+
then `/ark-autopilot`. Skills never enforce — CLI / hooks / CI do.
|
|
12
|
+
|
|
13
|
+
Layers stop a bad import. ArkOrder stops rewriting a big product choice as if it
|
|
14
|
+
were a seat count. Change those choices through a valve, not a generic update.
|
|
15
|
+
|
|
16
|
+
The ArkOrder extra (`arkgate/order`) is **optional**. It is **not** required for
|
|
17
|
+
ArkGate enforcement and is **not** production durability. Use this skill when the
|
|
18
|
+
user wants to evaluate or wire the extra. **This skill never enforces.** Do **not**
|
|
19
|
+
invent `/ark-run`. `@arkgate/order` is not a package — import `arkgate/order` from
|
|
20
|
+
the same `arkgate` tarball.
|
|
21
|
+
|
|
22
|
+
**When:** evaluate a hand-rolled “PATCH the plan like a seat count” / generic update
|
|
23
|
+
of a slow product choice, or wire an extra that is already on (plane root, named
|
|
24
|
+
keys, valve).
|
|
25
|
+
**Not when:** session 0 / extra not chosen (`/ark-adopt`); one new file (`/ark-place`);
|
|
26
|
+
skip-violation grind (`/ark-autopilot`); wire the runtime kernel (`/ark-runtime`).
|
|
27
|
+
|
|
28
|
+
## When / not when
|
|
29
|
+
|
|
30
|
+
| Use `/ark-order` when… | Do **not** use it when… |
|
|
31
|
+
|------------------------|-------------------------|
|
|
32
|
+
| Wire one ArkOrder candidate after the extra is on | Extra not chosen → `/ark-adopt` |
|
|
33
|
+
| Evaluate a generic update of a named product choice | New plane-root file only → `/ark-place` |
|
|
34
|
+
| Valve: first `release()`, later `proposeRelease` then `apply` | Skip cluster grind → `/ark-autopilot`; one kernel candidate → `/ark-runtime` |
|
|
35
|
+
|
|
36
|
+
## Contener · Guiar · Ordenar
|
|
37
|
+
|
|
38
|
+
| Star | This door | Hand off |
|
|
39
|
+
|------|-----------|----------|
|
|
40
|
+
| **Contener** | `/ark-adopt` path · `/ark-place` new file · `/ark-upgrade` pin | Map → `/ark-explore` · apply → `/ark-autopilot` |
|
|
41
|
+
| **Guiar** | `/ark-explore` map · `/ark-autopilot` apply · `/ark-runtime` wire ArkRun · `/ark-explain` tour · `/ark-coverage` fitness | Session 0 → `/ark-adopt` · this door for the big-choice plane |
|
|
42
|
+
| **Ordenar** | **This skill** — wire ArkOrder | Extra off → `/ark-adopt` · new plane-root file → `/ark-place` · skip grind → `/ark-autopilot` |
|
|
43
|
+
|
|
44
|
+
**Handoff, do not invent a door.** Extra off → `/ark-adopt`. New file → `/ark-place`.
|
|
45
|
+
Skip cluster → `/ark-autopilot`. One kernel candidate → `/ark-runtime`.
|
|
46
|
+
|
|
47
|
+
## Extra vs plane (mandatory)
|
|
48
|
+
|
|
49
|
+
| Piece | What it is | What it is not |
|
|
50
|
+
|-------|------------|----------------|
|
|
51
|
+
| **ArkOrder extra** (`arkOrder` on `ark.config.json`, schema `1.3+`) | Gate contract: plane usage + named slow keys | A score; Layers / ArkRules / ArkRun replacement; merge teeth while `advisory` |
|
|
52
|
+
| **Plane** `arkgate/order` | Library you construct with `createOrderPlane` (one instance per call) | A process-wide singleton; a second npm package; production durability |
|
|
53
|
+
|
|
54
|
+
Absence of the extra is **silent** — Layers and ArkRules verdicts stay identical. Doctor / status
|
|
55
|
+
`arkOrder` is always `notAScore`. Never invent 0–10 scores or pass/fail from this skill.
|
|
56
|
+
|
|
57
|
+
## Improvement compass note
|
|
58
|
+
|
|
59
|
+
This skill is **optional order-plane** only. Do **not** treat ArkOrder adoption as residual on
|
|
60
|
+
the resilience lens unless the user explicitly opts into the extra. Prefer doctor compass
|
|
61
|
+
for static architecture residual; hand static residual to `/ark-explore` / `/ark-autopilot`.
|
|
62
|
+
Doctor `arkOrder` residual is a finding-id count (`ARKORDER_*`), never a compass score.
|
|
63
|
+
|
|
64
|
+
## Dual engine (mandatory)
|
|
65
|
+
|
|
66
|
+
| Engine | Role |
|
|
67
|
+
|--------|------|
|
|
68
|
+
| **Deterministic** | CLI / MCP / contract sensors — exit codes, plan kinds, coverage numbers, install status |
|
|
69
|
+
| **Exploratory** | You open **this** repo's real files and product surface before concluding |
|
|
70
|
+
|
|
71
|
+
The CLI is a **sensor**, never the whole job. Claiming done without the exploratory bar for this skill is **incomplete**.
|
|
72
|
+
|
|
73
|
+
## MCP workspace binding (mandatory)
|
|
74
|
+
|
|
75
|
+
Before any `ark_*` MCP tool, call `ark_identity` with `project.expectedRoot` set to the exact
|
|
76
|
+
workspace root. Continue only when `binding.status === "matched"` and `authoritative === true`;
|
|
77
|
+
retain `projectIdentity.projectId`, then pass both `expectedRoot` and `expectedProjectId` under
|
|
78
|
+
`project` on every later MCP call. If identity is missing, mismatched, unverified, or the root is
|
|
79
|
+
uncertain, do not consume MCP analysis: use the workspace-local CLI and report that MCP
|
|
80
|
+
restart/retargeting is required. `ark://manifest` never satisfies this preflight.
|
|
81
|
+
|
|
82
|
+
## Out of scope for ArkRules and ArkRun
|
|
83
|
+
|
|
84
|
+
This skill is **order-plane only**. Do not mix ArkRules structure/invariants here; do **not**
|
|
85
|
+
turn this skill into an ArkRun skill. Hand off first extras to `/ark-adopt`, new files to
|
|
86
|
+
`/ark-place`, skip clusters to `/ark-autopilot`, one kernel candidate to `/ark-runtime`.
|
|
87
|
+
Label plane residual **`[ArkOrder]`** so it never blurs with **`[Layer]`**, **`[ArkRules]`**,
|
|
88
|
+
or **`[ArkRun]`**.
|
|
89
|
+
|
|
90
|
+
## Subagent fan-out (optional, host-dependent)
|
|
91
|
+
|
|
92
|
+
If the host supports **parallel subagents** and the task splits cleanly (e.g. multiple
|
|
93
|
+
dirs to sample), fan out read-only scouts; otherwise **fall back to sequential**.
|
|
94
|
+
Parent merges and still emits the **### Completion** contract. Never parallel-write
|
|
95
|
+
the same files or weaken the gate.
|
|
96
|
+
|
|
97
|
+
## Steps
|
|
98
|
+
|
|
99
|
+
1. **Inventory** — grep the codebase for hand-rolled equivalents:
|
|
100
|
+
- a use-case that `update` / `patch` / `set` a slow product choice (plan, cycle, tenancy)
|
|
101
|
+
the same way it writes a seat count or invoice
|
|
102
|
+
- Prisma / pg / SQL writes of those names from Application / Features
|
|
103
|
+
- a second `release()` after the first freeze (should be `proposeRelease` then `apply`)
|
|
104
|
+
- membership ids (`projectId`, `orgId`) treated as slow keys
|
|
105
|
+
- recomputable statuses (`paid`, `overdue`, `atCapacity`, `approved`) stored as if they
|
|
106
|
+
were named choices
|
|
107
|
+
Also check whether the billing gallery pattern applies:
|
|
108
|
+
[examples/arkorder-billing](https://github.com/pedroknigge/arkgate/tree/main/examples/arkorder-billing)
|
|
109
|
+
(GitHub tree, not in the npm tarball). Copy billing, **rename the three keys**.
|
|
110
|
+
2. **Read the extra** — open `ark.config.json`. If `arkOrder` is absent and the user wants the extra,
|
|
111
|
+
**STOP — do not continue this skill as complete.** Handoff **`/ark-adopt`** to write **advisory**
|
|
112
|
+
`arkOrder` (schema `1.3+`; real `planeRoots`, existing `managedLayers`, `maxXiKeys` default 7,
|
|
113
|
+
**`xiKeys`** the 3–5 slow names). Do not invent the extra here. If the extra is present, note
|
|
114
|
+
`mode`, `planeRoots`, managed layers, `maxXiKeys`, and `xiKeys`; doctor `arkOrder` is `notAScore`.
|
|
115
|
+
3. **Pick ONE target** — the smallest, most self-contained candidate (fewest call sites).
|
|
116
|
+
Migrating everything at once is how adoptions die. List the rest as follow-ups in the report.
|
|
117
|
+
New files after the extra is on go through **`/ark-place`**.
|
|
118
|
+
4. **Resolve availability** — `npm install arkgate` already ships `arkgate/order`.
|
|
119
|
+
Import `createOrderPlane` from `arkgate/order`. Same npm package. Not a second install.
|
|
120
|
+
5. **Wire through the plane** — read
|
|
121
|
+
[ArkOrder](https://github.com/pedroknigge/arkgate/blob/main/docs/arkorder.md)
|
|
122
|
+
(first-contact breath first; valve tables below the fold).
|
|
123
|
+
- Call `createOrderPlane` **only** inside `arkOrder.planeRoots`. Each call is a new instance —
|
|
124
|
+
no process-wide singleton.
|
|
125
|
+
- Keep Domain-role layers plane-free (`ARKORDER_KERNEL_IN_DOMAIN`).
|
|
126
|
+
- First freeze: `release()`. Later change of a named choice is `proposeRelease` then `apply`
|
|
127
|
+
— not a second `release()` (`ARKORDER_UNVALVED_RELEASE`), not `update` / `patch` / `set`
|
|
128
|
+
(`ARKORDER_GENERIC_UPDATE`).
|
|
129
|
+
- Name **`xiKeys`** (3–5 slow product decisions). Membership ids and recomputable statuses
|
|
130
|
+
are not keys: derive a status on read or fold it from ingest. A use-case that persists
|
|
131
|
+
those keys is `ARKORDER_XI_FIELD_WRITE`. Invoices and seats still flow through `ingest`.
|
|
132
|
+
- Before writing a name, drop the candidate and ask: can current state reconstruct it
|
|
133
|
+
uniquely? If it is recomputable or ingest determines it, derive it. The check remains
|
|
134
|
+
silent on semantic entailment.
|
|
135
|
+
- `refreshSigma`; ingest residual `absorb | escalate_up | hold` + `reasonCode`; capacity
|
|
136
|
+
pack as data; in-memory `ReleaseStore` (`createMemoryReleaseStore`); `ingestTravelAction`.
|
|
137
|
+
ArkRun `decisionTape` is still **`[ArkRun]`** — do not turn the tape into this skill.
|
|
138
|
+
- In-memory stores lose state on restart — **not** production durability. Branding ArkOrder
|
|
139
|
+
is not a durability claim. Doctor / status `arkOrder` is `notAScore`.
|
|
140
|
+
6. **Delete the hand-rolled generic update** once call sites are moved — the point is
|
|
141
|
+
less code, not a second parallel system. Deleting code is a destructive move:
|
|
142
|
+
confirm with the user before removing the old implementation, and never delete
|
|
143
|
+
something the inventory only *suspects* is dead.
|
|
144
|
+
|
|
145
|
+
## Critical handoffs
|
|
146
|
+
|
|
147
|
+
- No static gates yet: **STOP — do not continue this skill as complete.** Run `/ark-adopt` first
|
|
148
|
+
(`ark-check --recommend`).
|
|
149
|
+
- Extra absent and the user wants it: **STOP — do not continue this skill as complete.**
|
|
150
|
+
**`/ark-adopt`** writes advisory `arkOrder`.
|
|
151
|
+
- Skip cluster (`ARKORDER_MISSING_PLANE` / `ARKORDER_KERNEL_IN_DOMAIN` / `ARKORDER_GENERIC_UPDATE`
|
|
152
|
+
/ `ARKORDER_TOO_MANY_PARAMS` / `ARKORDER_INGEST_WRITES_XI` / `ARKORDER_XI_FIELD_WRITE`) after
|
|
153
|
+
the extra is on: **`/ark-autopilot`** — this skill still wires one candidate.
|
|
154
|
+
- New plane-root file after the extra is on: **`/ark-place`**.
|
|
155
|
+
- One kernel / bus candidate: **`/ark-runtime`** — do not mix planes.
|
|
156
|
+
- `arkgate` not installed and no local checkout: **STOP** and report the distribution boundary.
|
|
157
|
+
- Inventory finds nothing: stop; do not introduce the plane speculatively.
|
|
158
|
+
|
|
159
|
+
## Operating rules
|
|
160
|
+
|
|
161
|
+
- If the inventory finds NO hand-rolled equivalents, say so and stop — do not
|
|
162
|
+
introduce ArkOrder speculatively. Static enforcement alone is a complete, valid use of Ark.
|
|
163
|
+
- Keep the migration diff reviewable: one feature per invocation.
|
|
164
|
+
- Skills never enforce; never weaken `ark.config.json` to skip `ARKORDER_*`.
|
|
165
|
+
- Never a process-wide plane singleton. Never a second npm package.
|
|
166
|
+
- Never claim in-memory stores are production-durable.
|
|
167
|
+
- Never force the extra on. Compact starter / `ark start` stays extras-off.
|
|
168
|
+
- Plain-language reporting: one sentence per concept ("the billing plan is a
|
|
169
|
+
named choice — change it through the valve, not a generic update").
|
|
170
|
+
- ξ / Haken / slaving stay **below the fold**. First contact uses the one-minute breath.
|
|
171
|
+
|
|
172
|
+
## Related onboarding
|
|
173
|
+
|
|
174
|
+
- Adopt static gates and application shape **first** (`/ark-adopt` or `ark-check --recommend`).
|
|
175
|
+
Brownfield: same door — advisory extra only until the team promotes; absence is valid.
|
|
176
|
+
- ArkOrder is optional and separate from enthusiast onboarding. Do not put `arkOrder` on the
|
|
177
|
+
compact starter.
|
|
178
|
+
|
|
179
|
+
## Verify and report
|
|
180
|
+
|
|
181
|
+
Run the project's tests plus `ark-check --root . --config ark.config.json
|
|
182
|
+
--strict-config`. Report: what was migrated, lines deleted vs added, remaining
|
|
183
|
+
candidates ranked, behavior differences, and **`[ArkOrder]`** residual
|
|
184
|
+
(`ARKORDER_*` / doctor `arkOrder`, `notAScore`) separately from Layers / ArkRules / ArkRun.
|
|
185
|
+
|
|
186
|
+
## Completion contract (skill incomplete if missing)
|
|
187
|
+
|
|
188
|
+
End with **exactly** these headings (markdown `###`):
|
|
189
|
+
|
|
190
|
+
### Completion
|
|
191
|
+
- **Sensor:** commands/tools run
|
|
192
|
+
- **Opened:** real paths read (or `n/a` only if pure install/upgrade with no source analysis)
|
|
193
|
+
- **Result:** one-line outcome
|
|
194
|
+
- **Planes:** **`[ArkOrder]`** residual (or `n/a` if extra absent) — do not mix with `[Layer]` / `[ArkRules]` / `[ArkRun]`
|
|
195
|
+
- **Compass:** `n/a` (order skill; static residual → explore/autopilot) | top residual if doctor was run
|
|
196
|
+
- **Handoff:** `/ark-…` / CLI / `none`
|
|
197
|
+
- **Incomplete?** `no` | `yes — <what is missing>`
|
|
198
|
+
|
|
199
|
+
If a **STOP** handoff applies and you continued as if done, set **Incomplete?** to `yes`.
|
|
200
|
+
**Skill incomplete if missing** any of the bullets above.
|
|
@@ -5,6 +5,10 @@ description: "Where does new code go? Names the folder from the rules file and w
|
|
|
5
5
|
|
|
6
6
|
# /ark-place — Where does this code go?
|
|
7
7
|
|
|
8
|
+
**Contener · Guiar · Ordenar.** In plain words: contain the write, guide the next
|
|
9
|
+
step, order leftover mess. This door is **Contener**: write the new file in the
|
|
10
|
+
right house. Skills never enforce — CLI / hooks / CI do.
|
|
11
|
+
|
|
8
12
|
**When:** you are adding a new file or artifact and need the layer, folder, and name.
|
|
9
13
|
**Not when:** session 0 / config is missing or lying (`/ark-adopt`) or an existing violation cluster (`/ark-autopilot`).
|
|
10
14
|
|
|
@@ -18,9 +22,21 @@ description: "Where does new code go? Names the folder from the rules file and w
|
|
|
18
22
|
|
|
19
23
|
- `filePath` is known before the call. Description alone is not a path.
|
|
20
24
|
- Golden pattern is load-bearing when present. Adopt generates it.
|
|
25
|
+
- An included file that matches no layer is not a pass. The write gate denies it
|
|
26
|
+
(`CONFIG_UNCLASSIFIED_FILES`). Place it in a layer folder, or send include/layer
|
|
27
|
+
drift to `/ark-adopt`. Do not write into a loose include gap.
|
|
21
28
|
- Do not default a repository to Presentation.
|
|
29
|
+
- When doctor JSON has `noDomainFrontend`, the new file is a Domain rule — not
|
|
30
|
+
another UI helper. Soft. Silent when Domain already has files or there is no
|
|
31
|
+
frontend. No `/ark-domain`.
|
|
22
32
|
- When the matched layer has `layers[].description`, print that caption next to the
|
|
23
33
|
layer name and globs. Omit when absent — do not invent a caption or `/ark-describe`.
|
|
34
|
+
- When the matched layer has `layers[].trustBoundary`, print `trust: <tag>` next
|
|
35
|
+
to the layer name and globs. Omit when absent — do not invent a tag or `/ark-trust`.
|
|
36
|
+
- When the matched layer has `layers[].owners`, print `owner: @handle` next
|
|
37
|
+
to the layer name and globs. Omit when absent — do not invent a person or `/ark-owners`.
|
|
38
|
+
When `requireLayerOwners` is on and the house has no owners, send that gap to
|
|
39
|
+
`/ark-adopt` before writing.
|
|
24
40
|
- When `arkRun` is on: scaffold through the kernel (no `new` of managed types; declare
|
|
25
41
|
`uses` / `reactsTo` / `raises` / `sends`; factory only in `arkRun.kernelRoots`,
|
|
26
42
|
`compositionRoots` alias). Extra off → do not introduce the kernel. Enable it
|
|
@@ -65,6 +81,21 @@ When `ark_place` / the contract includes `layers[].description`, print that capt
|
|
|
65
81
|
next to the layer name and globs. Omit it when the field is absent. Do **not** invent
|
|
66
82
|
a caption or `/ark-describe`.
|
|
67
83
|
|
|
84
|
+
## Layer trust (process)
|
|
85
|
+
|
|
86
|
+
When the matched layer has `layers[].trustBoundary` (`public` | `auth` |
|
|
87
|
+
`admin` | `internal`), print `trust: <tag>` next to the layer name and globs.
|
|
88
|
+
Omit it when the field is absent. Do **not** invent a tag or `/ark-trust`.
|
|
89
|
+
The tag is guidance, not an import-rule deny.
|
|
90
|
+
|
|
91
|
+
## Layer owners (process)
|
|
92
|
+
|
|
93
|
+
When the matched layer has `layers[].owners`, print `owner: @handle` (or
|
|
94
|
+
`owner: name@host`) next to the layer name and globs. Omit when absent.
|
|
95
|
+
Do **not** invent a person or `/ark-owners`. When `requireLayerOwners` is
|
|
96
|
+
on and this house has no owners, do not write — hand off `/ark-adopt` to
|
|
97
|
+
name who owns the folder.
|
|
98
|
+
|
|
68
99
|
## Deep modules (process)
|
|
69
100
|
|
|
70
101
|
- Place so new code stays **deep**: one small public surface per concern; hide implementation details.
|
|
@@ -78,7 +109,7 @@ a caption or `/ark-describe`.
|
|
|
78
109
|
| New artifact: where + **write** under the config | Existing violation cluster → `/ark-autopilot` |
|
|
79
110
|
| Naming / directory for a known kind | Session 0 / config missing or lying → `/ark-adopt` (then come back) |
|
|
80
111
|
| Kernel-managed artifact when `arkRun` is already on | Extra not chosen yet → `/ark-adopt` (advisory `arkRun`); evaluate / migrate a hand-rolled bus → `/ark-runtime` |
|
|
81
|
-
| Plane-root artifact when `arkOrder` is already on | Extra not chosen yet → `/ark-adopt` (advisory `arkOrder`); skip cluster grind → `/ark-autopilot` |
|
|
112
|
+
| Plane-root artifact when `arkOrder` is already on | Extra not chosen yet → `/ark-adopt` (advisory `arkOrder`); evaluate / wire one plane candidate → `/ark-order`; skip cluster grind → `/ark-autopilot` |
|
|
82
113
|
|
|
83
114
|
The user describes something they need to build (a saga, a background job, an
|
|
84
115
|
event handler, a repository, an HTTP client, a use case, a projection, …).
|
|
@@ -88,7 +119,9 @@ and — if they asked to build it — scaffold it there correctly.
|
|
|
88
119
|
**No artifact given?** If the skill is invoked with nothing to place, don't error
|
|
89
120
|
and don't guess — the artifact is the one thing only the user knows. Read the
|
|
90
121
|
contract (step 1) and print the placement map from it: one row per declared layer
|
|
91
|
-
with layer name, globs,
|
|
122
|
+
with layer name, globs, `layers[].description` when present,
|
|
123
|
+
`layers[].trustBoundary` when present, and `layers[].owners` when present
|
|
124
|
+
(omit any when absent),
|
|
92
125
|
what belongs there, its directory, and which layers it may/may not import,
|
|
93
126
|
plus the not-yet-adopted `suggestedLayers` as a footnote. Then ask what they want
|
|
94
127
|
to place. That map is derived entirely from the repo, so producing it is real work,
|
|
@@ -130,9 +163,9 @@ ArkGate has **always-on Layers** plus opt-in extras. The user chooses extras; yo
|
|
|
130
163
|
2. Never call an import-edge violation an “invariant” or an aggregate sensor a “layer deny.”
|
|
131
164
|
3. Absence of `arkRules` is **valid** — do not force ArkRules unless the user wants them or residual inventory clearly wants a pilot.
|
|
132
165
|
4. Missing layer home: add it via **`/ark-adopt`** in this session if needed, then write the file; never invent `mechanical-safe`.
|
|
133
|
-
5. CLI helpers: `ark-check --rules-inventory --json`, doctor JSON `rulesUnderContract`, sensors emit `ARKRULE_*` / `INVARIANT_UNCOVERED` with `evidence.arkruleId`.
|
|
166
|
+
5. CLI helpers: `ark-check --rules-inventory --json`, doctor JSON `rulesUnderContract`, sensors emit `ARKRULE_*` / `INVARIANT_UNCOVERED` / `INVARIANT_CATALOG_EMPTY` with `evidence.arkruleId`.
|
|
134
167
|
6. Absence of `arkRun` is **valid**. Do not introduce the kernel speculatively. Skills never enforce this extra.
|
|
135
|
-
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).
|
|
168
|
+
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). Evaluate / wire one candidate via **`/ark-order`**.
|
|
136
169
|
|
|
137
170
|
|
|
138
171
|
### Place + ArkRules
|
|
@@ -158,8 +191,8 @@ When `arkOrder` is present on the architecture config:
|
|
|
158
191
|
- Call the factory only inside `arkOrder.planeRoots`. Empty roots in `enforced` mode is `ARKORDER_MISSING_PLANE`.
|
|
159
192
|
- 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
193
|
- 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.
|
|
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`.
|
|
162
|
-
- Absence of the extra is valid.
|
|
194
|
+
- 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`. Evaluate / wire one candidate → `/ark-order`.
|
|
195
|
+
- Absence of the extra is valid. Skills never enforce.
|
|
163
196
|
|
|
164
197
|
## Subagent fan-out (optional, host-dependent)
|
|
165
198
|
|
|
@@ -176,7 +209,11 @@ the same files or weaken the gate.
|
|
|
176
209
|
its forbidden globals, and exactly which layers the file may / must not import,
|
|
177
210
|
straight from the contract (no guessing). When the matched layer has
|
|
178
211
|
`layers[].description`, print that caption next to the layer name and globs;
|
|
179
|
-
omit it when absent. When
|
|
212
|
+
omit it when absent. When the matched layer has `layers[].trustBoundary`,
|
|
213
|
+
print `trust: <tag>` next to the layer name and globs; omit it when absent.
|
|
214
|
+
When the matched layer has `layers[].owners`, print `owner: @handle`; omit
|
|
215
|
+
when absent.
|
|
216
|
+
When present, also honor optional
|
|
180
217
|
**`goldenPattern`** (from `.ark/golden-pattern.json`) for **NEW code only** —
|
|
181
218
|
advisory layout norm; never overrides the gate and never clears design-weak.
|
|
182
219
|
Absent golden is normal. Otherwise load `ark.config.json`; after the matched preflight,
|
|
@@ -211,6 +248,8 @@ the same files or weaken the gate.
|
|
|
211
248
|
`patterns`), intent-name prefix if the layer declares `intentPrefixes`, and
|
|
212
249
|
which layers it may/may not import (from `rules`). When present, print
|
|
213
250
|
`layers[].description` next to the layer name and globs; omit when absent.
|
|
251
|
+
Print `layers[].trustBoundary` as `trust: <tag>` when present; omit when absent.
|
|
252
|
+
Print `layers[].owners` as `owner: @handle` when present; omit when absent.
|
|
214
253
|
4. **If the layer isn't adopted yet** (suggested but no directory): write the
|
|
215
254
|
layer into `ark.config.json` (session-0 honesty — same as `/ark-adopt` for
|
|
216
255
|
that glob) **then** write the file. Don't silently drop the code into a
|
|
@@ -229,11 +268,10 @@ the same files or weaken the gate.
|
|
|
229
268
|
hand off **one** pilot via `pilotLoop.nextPilot` / `/ark-explore` shape-focus — never multi-pilot
|
|
230
269
|
batch reshape from this skill.
|
|
231
270
|
- If `arkRun` is on and the user is grinding skip violations (`new` of managed types, homemade
|
|
232
|
-
bus) across many files: place this artifact through the kernel, then
|
|
233
|
-
`/ark-autopilot`. Extra not on → `/ark-adopt` (advisory) or `/ark-runtime` (evaluate).
|
|
271
|
+
bus) across many files: place this artifact through the kernel, then `/ark-autopilot`. Extra not on → `/ark-adopt` (advisory) or `/ark-runtime` (evaluate).
|
|
234
272
|
- If `arkOrder` is on and the user is grinding skip violations (`ARKORDER_*`) across many files:
|
|
235
|
-
place this artifact on a plane root, then
|
|
236
|
-
→ `/ark-adopt` (advisory).
|
|
273
|
+
place this artifact on a plane root, then `/ark-autopilot`. Extra not on
|
|
274
|
+
→ `/ark-adopt` (advisory). Evaluate / wire one candidate → `/ark-order`.
|
|
237
275
|
|
|
238
276
|
## Operating rules
|
|
239
277
|
|
|
@@ -5,6 +5,10 @@ description: Wire the optional ArkRun extra (arkgate/runtime). One candidate. Ex
|
|
|
5
5
|
|
|
6
6
|
# /ark-runtime — Evaluate and wire ArkRun (experimental opt-in)
|
|
7
7
|
|
|
8
|
+
**Contener · Guiar · Ordenar.** In plain words: contain the write, guide the next
|
|
9
|
+
step, order leftover mess. This door is **Guiar**: wire the optional runtime so work
|
|
10
|
+
keeps moving. Skills never enforce — CLI / hooks / CI do.
|
|
11
|
+
|
|
8
12
|
The ArkRun kernel (`arkgate/runtime`) is currently **experimental**. It is **not** required
|
|
9
13
|
for ArkGate enforcement and is **not** production durability. Use this skill when the user wants
|
|
10
14
|
to evaluate or wire the kernel. **This skill never enforces** — the write / CI / ESLint plane
|
|
@@ -13,7 +17,15 @@ does when the `arkRun` extra is on. Do **not** invent `/ark-run`. `@arkgate/runt
|
|
|
13
17
|
**When:** evaluate a hand-rolled bus / outbox / saga / projection / policy / Nest adapter against
|
|
14
18
|
the kernel, or wire an extra that is already on (kernel root, declarations, transport).
|
|
15
19
|
**Not when:** session 0 / extra not chosen (`/ark-adopt`); one new file (`/ark-place`); skip-violation
|
|
16
|
-
grind (`/ark-autopilot`
|
|
20
|
+
grind (`/ark-autopilot`); wire the order plane (`/ark-order`).
|
|
21
|
+
|
|
22
|
+
## When / not when
|
|
23
|
+
|
|
24
|
+
| Use `/ark-runtime` when… | Do **not** use it when… |
|
|
25
|
+
|--------------------------|-------------------------|
|
|
26
|
+
| Wire one ArkRun candidate after the extra is on | Extra not chosen → `/ark-adopt` |
|
|
27
|
+
| Evaluate a hand-rolled bus / outbox / saga | New kernel-managed file only → `/ark-place` |
|
|
28
|
+
| Declarations / transport / Nest adapter | Skip cluster grind → `/ark-autopilot`; one order-plane candidate → `/ark-order` |
|
|
17
29
|
|
|
18
30
|
## Extra vs kernel (mandatory)
|
|
19
31
|
|
|
@@ -22,8 +34,10 @@ grind (`/ark-autopilot` / leftover `/ark-fix`).
|
|
|
22
34
|
| **ArkRun extra** (`arkRun` on `ark.config.json`, schema `1.2+`) | Gate contract: kernel usage + complete declarations | A score; Layers / ArkRules replacement; merge teeth while `advisory` |
|
|
23
35
|
| **Kernel** `arkgate/runtime` | Kernel you construct with `createStrictArkKernel` (one instance per call) | A process-wide `getKernel()`; shipped cloud broker SDKs; production durability |
|
|
24
36
|
|
|
25
|
-
Absence of the extra is **silent** — Layers and ArkRules verdicts stay identical.
|
|
26
|
-
|
|
37
|
+
Absence of the extra is **silent** — Layers and ArkRules verdicts stay identical. Compact
|
|
38
|
+
doctor names ArkRun only when the extra is on (experimental, in-memory, not Postgres;
|
|
39
|
+
`/ark-runtime` when residual remains). Doctor / status `arkRun` is always `notAScore`.
|
|
40
|
+
Never invent 0–10 scores or pass/fail from this skill.
|
|
27
41
|
|
|
28
42
|
## Improvement compass note
|
|
29
43
|
|
|
@@ -52,7 +66,7 @@ restart/retargeting is required. `ark://manifest` never satisfies this preflight
|
|
|
52
66
|
|
|
53
67
|
## Out of scope for ArkRules and ArkOrder
|
|
54
68
|
|
|
55
|
-
This skill is **runtime-kernel only**. Do not mix ArkRules structure/invariants here; do **not** turn this skill into an ArkOrder skill. Hand off first extras to `/ark-adopt`, new files to `/ark-place`, skip clusters to `/ark-autopilot`. Label kernel-usage residual **`[ArkRun]`** so it never blurs with **`[Layer]`**, **`[ArkRules]`**, or **`[ArkOrder]`**.
|
|
69
|
+
This skill is **runtime-kernel only**. Do not mix ArkRules structure/invariants here; do **not** turn this skill into an ArkOrder skill. Hand off first extras to `/ark-adopt`, new files to `/ark-place`, skip clusters to `/ark-autopilot`, one order-plane candidate to `/ark-order`. Label kernel-usage residual **`[ArkRun]`** so it never blurs with **`[Layer]`**, **`[ArkRules]`**, or **`[ArkOrder]`**.
|
|
56
70
|
|
|
57
71
|
## Subagent fan-out (optional, host-dependent)
|
|
58
72
|
|
|
@@ -119,9 +133,10 @@ the same files or weaken the gate.
|
|
|
119
133
|
|
|
120
134
|
## Critical handoffs
|
|
121
135
|
|
|
122
|
-
- No static gates yet: **STOP — do not continue this skill as complete.** Run `/ark-adopt` first (`ark-check --recommend`
|
|
136
|
+
- No static gates yet: **STOP — do not continue this skill as complete.** Run `/ark-adopt` first (`ark-check --recommend`).
|
|
123
137
|
- Extra absent and the user wants it: **STOP — do not continue this skill as complete.** **`/ark-adopt`** writes advisory `arkRun`.
|
|
124
|
-
- Skip cluster (`new` of managed types, homemade bus, kernel in Domain) after the extra is on:
|
|
138
|
+
- Skip cluster (`new` of managed types, homemade bus, kernel in Domain) after the extra is on: **`/ark-autopilot`** — this skill still wires one candidate.
|
|
139
|
+
- One order-plane candidate: **`/ark-order`** — do not mix planes.
|
|
125
140
|
- `arkgate` not installed and no local checkout: **STOP** and report the distribution boundary.
|
|
126
141
|
- Inventory finds nothing: stop; do not introduce kernel speculatively.
|
|
127
142
|
|