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
|
@@ -28,5 +28,18 @@
|
|
|
28
28
|
"description": "Prefer rich domain types over data-only bags (advisory only)."
|
|
29
29
|
}
|
|
30
30
|
],
|
|
31
|
-
"invariants": [
|
|
31
|
+
"invariants": [
|
|
32
|
+
{
|
|
33
|
+
"id": "INV-ALWAYS-VALID",
|
|
34
|
+
"description": "A domain object is never stored in an invalid state",
|
|
35
|
+
"mode": "advisory",
|
|
36
|
+
"coverage": { "test": false }
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"id": "INV-ONE-DECISION",
|
|
40
|
+
"description": "Each business fact has one place that decides it",
|
|
41
|
+
"mode": "advisory",
|
|
42
|
+
"coverage": { "test": false }
|
|
43
|
+
}
|
|
44
|
+
]
|
|
32
45
|
}
|
|
@@ -5,6 +5,10 @@ description: Session 0 — write the rules file (ark.config.json) to match the r
|
|
|
5
5
|
|
|
6
6
|
# /ark-adopt — Mark the path (session 0)
|
|
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 path so the tree
|
|
10
|
+
has honest houses. Skills never enforce — CLI / hooks / CI do.
|
|
11
|
+
|
|
8
12
|
**When:** empty tree, or the rules file does not match the real folders (session 0).
|
|
9
13
|
**Not when:** a single new file (`/ark-place`) or leftover design after the path is honest (`/ark-explore` then `/ark-autopilot`).
|
|
10
14
|
|
|
@@ -17,11 +21,33 @@ description: Session 0 — write the rules file (ark.config.json) to match the r
|
|
|
17
21
|
## Checklist
|
|
18
22
|
|
|
19
23
|
- Existing tree: propose **SharedKernel** (types/constants) + **CompositionRoot** (wiring) + `src/**/domain/**`. Never dump bare `src/lib/**` into Application.
|
|
24
|
+
- Every `include` path must land in a layer. Include that classifies no file is the
|
|
25
|
+
same as an empty check — not a pass. Fix globs here; do not leave a loose gap.
|
|
20
26
|
- Generate `.ark/golden-pattern.json` (load-bearing for `/ark-place`).
|
|
21
27
|
- Future houses: mark unused layer globs `reserved` / `allowEmpty` so `--strict-config` does not fail.
|
|
22
28
|
- When the product map or glossary names a house, write `layers[].description` as
|
|
23
29
|
app-context copy (what this folder is *in the product*). Compact starter may omit.
|
|
24
30
|
Do not invent captions. Do not invent `/ark-describe`.
|
|
31
|
+
- When the product map names who a folder is for, write `layers[].trustBoundary`
|
|
32
|
+
(`public` | `auth` | `admin` | `internal`). Compact starter may omit. Do not
|
|
33
|
+
invent tags. Absence is silent. No `/ark-trust`.
|
|
34
|
+
- When the product map names who owns a folder, write `layers[].owners`
|
|
35
|
+
(GitHub handle or email). Compact starter may omit. Do not invent people.
|
|
36
|
+
Absence is silent unless the user asked for required owners — then write
|
|
37
|
+
`requireLayerOwners: true` after the live houses have names. No `/ark-owners`.
|
|
38
|
+
- When the user wants required gates (`--require-gates` / `--strict-merge` /
|
|
39
|
+
required GitHub check) and there is no `docs/adr/` (or `docs/decisions/`),
|
|
40
|
+
leave a short decision note there — only if they loosen a rule or add a real
|
|
41
|
+
gate. Not every change. Doctor residual is soft. No `/ark-adr`.
|
|
42
|
+
- When a product-domain doc is already in play (`docs/domain.md` or a sibling)
|
|
43
|
+
and doctor JSON has `statesTransitions` or `statusTransitionCatalog`, add a
|
|
44
|
+
short states → transitions table (or one link) there. Use catalog names when
|
|
45
|
+
present. No flag soup. Soft residual. Silent when that doc is absent or
|
|
46
|
+
Domain has no status vocabulary. No `/ark-states`.
|
|
47
|
+
- When doctor JSON has `noDomainFrontend`, keep the empty Domain house — do not
|
|
48
|
+
delete it to “clean” empty layers. Next is one Domain file (`/ark-place`), not
|
|
49
|
+
a weaker contract. Soft. Silent when there is no frontend or Domain already
|
|
50
|
+
has files. No `/ark-domain`.
|
|
25
51
|
- CLI-first: if `arkgate-check` already resolved the root, do not wait on MCP.
|
|
26
52
|
- Do not add `arkRun` or `arkOrder` unless the user wants that extra. When they do, write
|
|
27
53
|
**advisory** extra in this turn (`arkRun` schema `1.2+`; `arkOrder` schema `1.3+`).
|
|
@@ -102,6 +128,46 @@ received."), not architecture jargon. Compact starter / `ark start` may omit the
|
|
|
102
128
|
field. Absence is silent — never fail `--strict-config` for a missing caption.
|
|
103
129
|
Do **not** invent captions. Do not invent `/ark-describe`.
|
|
104
130
|
|
|
131
|
+
## Layer trust (process)
|
|
132
|
+
|
|
133
|
+
Optional `layers[].trustBoundary`: `public` | `auth` | `admin` | `internal`.
|
|
134
|
+
Marks who this folder is for (anyone, signed-in users, operators, or only
|
|
135
|
+
other code). Write it when the product map already names that door. Compact
|
|
136
|
+
starter / `ark start` may omit it. Absence is silent — never fail
|
|
137
|
+
`--strict-config`, never invent a doctor residual. Do **not** invent tags.
|
|
138
|
+
This is not host/CI TLS and does not add import-rule teeth. No `/ark-trust`.
|
|
139
|
+
|
|
140
|
+
## Layer owners (process)
|
|
141
|
+
|
|
142
|
+
Optional `layers[].owners`: GitHub handles or emails (same identity as
|
|
143
|
+
`stewards` — not a display name). Write them when the product map already
|
|
144
|
+
names who owns the house. Compact starter / `ark start` may omit. Absence is
|
|
145
|
+
silent unless the user asked for required owners. Then write
|
|
146
|
+
`requireLayerOwners: true` only after every live (non-reserved) layer has
|
|
147
|
+
at least one owner. Do **not** invent people. No `/ark-owners`. The require
|
|
148
|
+
flag is the fail-closed switch; owners themselves are metadata.
|
|
149
|
+
|
|
150
|
+
## Decision notes (process)
|
|
151
|
+
|
|
152
|
+
When gates are required (`--require-gates` / `--strict-merge` / required merge
|
|
153
|
+
status) and there is no short decision-note home yet, doctor may ask for one
|
|
154
|
+
under `docs/adr/` or `docs/decisions/`. Write a note when you loosen a rule or
|
|
155
|
+
add a real gate — not on every file. Absence is silent unless that demand is
|
|
156
|
+
on. The hint does not fail the check. Do **not** invent `/ark-adr`. Policy
|
|
157
|
+
weaken still uses `--policy-ack`; this is only a place to write the why.
|
|
158
|
+
|
|
159
|
+
## States and transitions (process)
|
|
160
|
+
|
|
161
|
+
When a product-domain / domain-model doc is already on disk (`docs/domain.md`,
|
|
162
|
+
`docs/data-model.md`, or a dedicated `docs/states.md`) and there is no short
|
|
163
|
+
states → transitions table (or one link), doctor may ask for one. Write the
|
|
164
|
+
table on that home — entity · states · allowed from → to. Names from the
|
|
165
|
+
code or the captain. When doctor JSON has `statusTransitionCatalog`, use those
|
|
166
|
+
entity · states names — Domain already opted in by having that vocabulary.
|
|
167
|
+
Do **not** invent states or flag soup. Absence of the domain doc, or Domain
|
|
168
|
+
with no status union/enum, stays silent. The hint does not fail the check.
|
|
169
|
+
Do **not** invent `/ark-states`. Do not walk the tree to invent a roster.
|
|
170
|
+
|
|
105
171
|
## When / not when
|
|
106
172
|
|
|
107
173
|
| Use `/ark-adopt` when… | Do **not** use it when… |
|
|
@@ -111,7 +177,7 @@ Do **not** invent captions. Do not invent `/ark-describe`.
|
|
|
111
177
|
| Mine loose business rules into Domain / advisory ArkRules | Apply leftover design after the path is honest → `/ark-autopilot` |
|
|
112
178
|
| Freeze **real** debt after the config is honest | User said map only |
|
|
113
179
|
| Turn **advisory** ArkRun on (`arkRun` extra, schema `1.2+`; **`kernelRoots` preferred**) | Evaluate / wire a hand-rolled bus → `/ark-runtime`; new kernel-managed file → `/ark-place` |
|
|
114
|
-
| Turn **advisory** ArkOrder on (`arkOrder` extra, schema `1.3+`, `planeRoots`) |
|
|
180
|
+
| Turn **advisory** ArkOrder on (`arkOrder` extra, schema `1.3+`, `planeRoots`) | Wire one plane candidate after extra is on → `/ark-order`; new plane-root file → `/ark-place`; grind skip clusters → `/ark-autopilot` |
|
|
115
181
|
|
|
116
182
|
## Dual engine (mandatory)
|
|
117
183
|
|
|
@@ -147,14 +213,15 @@ ArkGate has **always-on Layers** plus opt-in extras. The user chooses extras; yo
|
|
|
147
213
|
2. Never call an import-edge violation an “invariant” or an aggregate sensor a “layer deny.”
|
|
148
214
|
3. Absence of `arkRules` is **valid** — do not force ArkRules unless the user wants them or residual inventory clearly wants a pilot.
|
|
149
215
|
4. Editing `arkrules/*` or promoting modes is **this skill** (session 0) or **`/ark-autopilot`** later; never invent `mechanical-safe`.
|
|
150
|
-
5. CLI helpers: `ark-check --rules-inventory --json`, doctor JSON `rulesUnderContract`, sensors emit `ARKRULE_*` / `INVARIANT_UNCOVERED` with `evidence.arkruleId`.
|
|
216
|
+
5. CLI helpers: `ark-check --rules-inventory --json`, doctor JSON `rulesUnderContract`, sensors emit `ARKRULE_*` / `INVARIANT_UNCOVERED` / `INVARIANT_CATALOG_EMPTY` with `evidence.arkruleId`.
|
|
151
217
|
6. Absence of `arkRun` is **valid**. Write it only when the user wants the extra. Skills never enforce.
|
|
152
|
-
7. Absence of `arkOrder` is **valid**. Write it only when the user wants the extra.
|
|
218
|
+
7. Absence of `arkOrder` is **valid**. Write it only when the user wants the extra. After the extra is honest: handoff **`/ark-order`** to wire one candidate. Skills never enforce.
|
|
153
219
|
|
|
154
220
|
|
|
155
221
|
### Adopt + ArkRules
|
|
156
222
|
- After classify: emit or refresh `arkRules` for matched layers (exact names; generic mold for unknowns).
|
|
157
223
|
- Mine rules → inventory + write advisory invariants/structure into `arkrules/<Layer>.json` **in this turn**.
|
|
224
|
+
- Empty `invariants[]` on a populated Domain while `arkRules` is on is residual (`INVARIANT_CATALOG_EMPTY`), not done. Fill 1–2 short phrases. Advisory until a domain structure rule is `enforced`.
|
|
158
225
|
- Application / Features templates include advisory `writes-via-aggregate`: driver import + write token in a use case is the skip. Do not copy `Externals/` / `admission.ts` folder religion.
|
|
159
226
|
- Freeze baseline is **[Layer]** debt; inventory residual is **[ArkRules]** — report both.
|
|
160
227
|
|
|
@@ -191,9 +258,9 @@ ArkGate has **always-on Layers** plus opt-in extras. The user chooses extras; yo
|
|
|
191
258
|
- 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`.
|
|
192
259
|
|
|
193
260
|
- Do **not** put `arkOrder` on the compact starter / `ark start` scaffold. Domain stays plane-free. Import `createOrderPlane` from `arkgate/order` (same npm package).
|
|
194
|
-
- Absence is valid and **silent** — never force the extra.
|
|
261
|
+
- Absence is valid and **silent** — never force the extra.
|
|
195
262
|
- Demoting enforced → advisory or deleting the extra is policy-delta **weakening**.
|
|
196
|
-
- After the extra is honest: handoff `/ark-place` for new plane-root files; grind skip via `/ark-autopilot`. Skills never enforce.
|
|
263
|
+
- After the extra is honest: handoff **`/ark-order`** to wire one candidate, `/ark-place` for new plane-root files; grind skip via `/ark-autopilot`. Skills never enforce.
|
|
197
264
|
|
|
198
265
|
## Subagent fan-out (optional, host-dependent)
|
|
199
266
|
|
|
@@ -218,6 +285,9 @@ feature dirs, plan clusters), you **may** dispatch **subagents**:
|
|
|
218
285
|
- **Brownfield:** this skill — match config to reality; do not force a starter preset.
|
|
219
286
|
- **Deep map only:** `/ark-explore`.
|
|
220
287
|
- **Default path:** `ark start` → **`/ark-adopt`** → `/ark-place` / `/ark-autopilot`.
|
|
288
|
+
`start --apply` may refuse (coverage below 50% or weak shape) — that lock is
|
|
289
|
+
deliberate. Lock the shape with `--archetype`, `--preset`, or `--force`, or
|
|
290
|
+
inspect ranked shapes with `ark-check --recommend`.
|
|
221
291
|
|
|
222
292
|
## Anti-wrapper rule (mandatory)
|
|
223
293
|
|
|
@@ -244,6 +314,9 @@ Ark protects the **boundary around** a framework, not its internals. Nest/DI pub
|
|
|
244
314
|
If `src/contexts` or `src/bounded-contexts` exists, prefer `ddd-bounded-contexts`.
|
|
245
315
|
**Next.js:** `app/api/**` / `pages/api/**` (and route-group `app/(…)/api/**`) default to
|
|
246
316
|
**ApplicationOrchestration**, not Presentation — do not reclassify API shells as UI.
|
|
317
|
+
Write Next-flavored `layers[].description` only when Next is actually present
|
|
318
|
+
(`next` dependency, `next.config.*`, or `app/page` / `pages/*` routes). Library and
|
|
319
|
+
package monorepos keep framework-free captions — `ark start` already does this.
|
|
247
320
|
User wants the ArkRun extra → write **advisory** `arkRun` (schema `1.2+`, real
|
|
248
321
|
`kernelRoots` preferred — `compositionRoots` alias, existing `managedLayers`) **in this turn**.
|
|
249
322
|
User wants the ArkOrder extra → write **advisory** `arkOrder` (schema `1.3+`, real
|
|
@@ -251,6 +324,12 @@ Ark protects the **boundary around** a framework, not its internals. Nest/DI pub
|
|
|
251
324
|
to a compact starter. Do not promote to enforced as the session-0 default.
|
|
252
325
|
When the product map or glossary names a house, write `layers[].description` on that
|
|
253
326
|
layer (app-context sentence). Compact starter may omit. Do not invent captions.
|
|
327
|
+
When the product map names who a folder is for, write `layers[].trustBoundary`
|
|
328
|
+
(`public` | `auth` | `admin` | `internal`). Do not invent tags.
|
|
329
|
+
When the product map names who owns a folder, write `layers[].owners`
|
|
330
|
+
(GitHub handle or email). Do not invent people. Write `requireLayerOwners`
|
|
331
|
+
only when the user asked for required owners and the live houses already
|
|
332
|
+
have names.
|
|
254
333
|
2. **Check + diagnose** — `summary.concentrated` / dominant edge → fix contract first, don’t freeze.
|
|
255
334
|
Cross-slice / cross-context `peerIsolation` hits are judgment: extract shared or events.
|
|
256
335
|
The denial names its reason. `unclassifiable path` in bulk means shared code lives outside
|
|
@@ -264,6 +343,8 @@ Ark protects the **boundary around** a framework, not its internals. Nest/DI pub
|
|
|
264
343
|
3. **Classify ungoverned** — use coverage `suggestions` **plus** dirs you discovered by reading;
|
|
265
344
|
add layers/patterns **here** (write `ark.config.json`). When adding a layer the product map
|
|
266
345
|
or glossary already names, write `layers[].description` on it (do not invent filler).
|
|
346
|
+
Write `layers[].trustBoundary` only when the product map already names that door.
|
|
347
|
+
Write `layers[].owners` only when the product map already names who owns the house.
|
|
267
348
|
4. **Mine business rules → manifiesto** (model job — this is why the skill exists):
|
|
268
349
|
- Scan for loose domain: validators, pricing/policy functions, `can*`/`calculate*`, magic business constants, publish/intent strings, logic in UI/hooks that belongs in Domain.
|
|
269
350
|
- **ArkRules inventory (AR13):** run `ark-check --rules-inventory --json` for deterministic candidates
|
|
@@ -301,8 +382,12 @@ proposals applied or deferred, **phase**, **top Shape / design-weak opportunitie
|
|
|
301
382
|
- Force runtime kernel over existing Nest/DI.
|
|
302
383
|
- Put `arkRun` or `arkOrder` on the compact starter / `ark start` scaffold.
|
|
303
384
|
- Claim in-memory kernel stores are production durability.
|
|
304
|
-
- Invent `/ark-run
|
|
385
|
+
- Invent `/ark-run`. Use `/ark-order` after this door turns the extra on.
|
|
305
386
|
- Invent `layers[].description` filler or a `/ark-describe` skill.
|
|
387
|
+
- Invent `layers[].trustBoundary` tags or a `/ark-trust` skill.
|
|
388
|
+
- Invent `layers[].owners` names or a `/ark-owners` skill.
|
|
389
|
+
- Invent `/ark-adr` or require a decision note on every change.
|
|
390
|
+
- Invent `/ark-states` or invent entity states / flag soup.
|
|
306
391
|
- Claim Enforce while governed% is low, cores empty with I/O in Application, or core bags ungoverned.
|
|
307
392
|
- End adopt with only “baseline written” when design-weak residual is visible in files you opened.
|
|
308
393
|
|
|
@@ -5,13 +5,8 @@ description: Shortcut to /ark-adopt for a new tree. Deprecated as a first-class
|
|
|
5
5
|
|
|
6
6
|
# /ark-architect — Shortcut to /ark-adopt
|
|
7
7
|
|
|
8
|
-
**Not a first-
|
|
9
|
-
Do that job now.
|
|
10
|
-
|
|
11
|
-
## Autonomy contract
|
|
12
|
-
|
|
13
|
-
Invoking this skill **is** the approval to mark the path. Write `ark.config.json` and
|
|
14
|
-
phase-1 dirs in this turn. Then `ark-check`.
|
|
8
|
+
**Not a first-class door.** One-release redirect. Session 0 is **`/ark-adopt`**.
|
|
9
|
+
Do that job now. Contener · Guiar · Ordenar — this leftover name is not a star.
|
|
15
10
|
|
|
16
11
|
## When / not when
|
|
17
12
|
|
|
@@ -40,25 +35,17 @@ restart/retargeting is required. `ark://manifest` never satisfies this preflight
|
|
|
40
35
|
|
|
41
36
|
Then call **`ark_recommend`** with the same bound `project` envelope (or `ark-check --recommend`).
|
|
42
37
|
|
|
43
|
-
## Dual plane — layers + extras (mandatory, except /ark-runtime)
|
|
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`**. 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
|
-
|
|
47
38
|
## Subagent fan-out (optional, host-dependent)
|
|
48
39
|
|
|
49
40
|
If the host supports **parallel subagents**, fan out read-only scouts; otherwise
|
|
50
41
|
**fall back to sequential**. Never weaken the gate.
|
|
51
42
|
|
|
52
|
-
## Related onboarding
|
|
53
|
-
|
|
54
|
-
- **Greenfield:** this shortcut → **`/ark-adopt`** + `ark-check --recommend` / `ark start`.
|
|
55
|
-
- **Brownfield:** `/ark-adopt` — do not force a starter preset.
|
|
56
|
-
|
|
57
43
|
## Steps
|
|
58
44
|
|
|
59
45
|
1. Bind MCP (`ark_identity` then `ark_recommend`) or run `ark-check --recommend`.
|
|
60
|
-
2. Execute **`/ark-adopt`**
|
|
61
|
-
3.
|
|
46
|
+
2. Execute **`/ark-adopt`** now (write the path, optional advisory extras).
|
|
47
|
+
3. New file → `/ark-place`. Map → `/ark-explore`. Apply → `/ark-autopilot`.
|
|
48
|
+
Wire ArkRun → `/ark-runtime`. Wire ArkOrder → `/ark-order`.
|
|
62
49
|
|
|
63
50
|
## Completion contract (skill incomplete if missing)
|
|
64
51
|
|
|
@@ -5,6 +5,10 @@ description: Fix illegal imports and one leftover-design refactor. CLI is a sens
|
|
|
5
5
|
|
|
6
6
|
# /ark-autopilot — Apply the path
|
|
7
7
|
|
|
8
|
+
**Contener · Guiar · Ordenar.** In plain words: contain the write, guide the next
|
|
9
|
+
step, order leftover mess. This door is **Guiar**: apply leftover design and illegal
|
|
10
|
+
imports, one small change at a time. Skills never enforce — CLI / hooks / CI do.
|
|
11
|
+
|
|
8
12
|
**When:** the user wants architecture cleaned end-to-end, or leftover design after a map.
|
|
9
13
|
**Not when:** map only (`/ark-explore`), session 0 / config lying (`/ark-adopt`), or one new file (`/ark-place`).
|
|
10
14
|
|
|
@@ -12,6 +16,8 @@ description: Fix illegal imports and one leftover-design refactor. CLI is a sens
|
|
|
12
16
|
|
|
13
17
|
1. Read `arkgate-check --doctor` (do #1).
|
|
14
18
|
2. Fix import-rule debt; if leftover design remains, apply **one** small refactor.
|
|
19
|
+
When doctor JSON has `noDomainFrontend`, that refactor is one pure rule into
|
|
20
|
+
Domain — not another UI helper. Soft. Silent when Domain already has files.
|
|
15
21
|
3. Re-run doctor. Never weaken `ark.config.json`.
|
|
16
22
|
|
|
17
23
|
**This is the apply door.** Invoking it **is** the approval. Run `arkgate-check --doctor` for the next step.
|
|
@@ -28,7 +34,9 @@ Apply plan A (`mechanical-safe` **and** judgment). If leftover design work remai
|
|
|
28
34
|
Composes **explore → sensors → dual plan → write**. Validate with ark-check; never weaken the gate.
|
|
29
35
|
**Team lock:** do not edit `ark.config.json`, `arkrules/*`, or `.ark-baseline.json` in this
|
|
30
36
|
turn unless the user invoked a steward contract session. Feature diffs use
|
|
31
|
-
`ark-check --
|
|
37
|
+
`ark-check --local --base <merge-ref>` or `ark-check --changed --base <merge-ref>`.
|
|
38
|
+
`--local` is the optional cheap path for many worktrees; it cannot combine with
|
|
39
|
+
`--strict-merge`. Growing the baseline is steward-only.
|
|
32
40
|
|
|
33
41
|
**Not a plan grinder.** Empty `--plan` does **not** mean “architecture is healthy” without
|
|
34
42
|
the explore pass and dual-plan section B (pattern / Shape bets).
|
|
@@ -60,7 +68,7 @@ patterns are **out-of-scope** lenses — say so; do not invent Ark enforcement f
|
|
|
60
68
|
| Brownfield or greenfield with apply | Session 0 / config lying → `/ark-adopt` first, then return |
|
|
61
69
|
| User wants A + B planned and **applied** | New file only → `/ark-place` |
|
|
62
70
|
| **Apply** leftover design (one Shape refactor) | User said map only |
|
|
63
|
-
| Extra skip cluster (`ARKRUN_*` / `ARKORDER_*`) after extra is on | Extra off → `/ark-adopt` (advisory); evaluate one bus → `/ark-runtime` |
|
|
71
|
+
| Extra skip cluster (`ARKRUN_*` / `ARKORDER_*`) after extra is on | Extra off → `/ark-adopt` (advisory); evaluate one bus → `/ark-runtime`; evaluate one order-plane candidate → `/ark-order` |
|
|
64
72
|
| Spaghetti under ENFORCE: Shape work (invoke = apply one pilot) | — |
|
|
65
73
|
|
|
66
74
|
**Post-green door:** `/ark-explore` shape-focus → dual-plan B, **then this skill applies one
|
|
@@ -127,8 +135,8 @@ ArkGate has **always-on Layers** plus opt-in extras. The user chooses extras; yo
|
|
|
127
135
|
2. Never call an import-edge violation an “invariant” or an aggregate sensor a “layer deny.”
|
|
128
136
|
3. Absence of `arkRules` is **valid** — do not force ArkRules unless the user wants them or residual inventory clearly wants a pilot.
|
|
129
137
|
4. Editing `arkrules/*` or promoting modes and fixing structure sensors is **this skill** (judgment, never invent `mechanical-safe`).
|
|
130
|
-
5. CLI helpers: `ark-check --rules-inventory --json`, doctor JSON `rulesUnderContract`, sensors emit `ARKRULE_*` / `INVARIANT_UNCOVERED` with `evidence.arkruleId`.
|
|
131
|
-
6. Absence of extras is **valid**. Extra skip clusters grind **here** after the extra is on.
|
|
138
|
+
5. CLI helpers: `ark-check --rules-inventory --json`, doctor JSON `rulesUnderContract`, sensors emit `ARKRULE_*` / `INVARIANT_UNCOVERED` / `INVARIANT_CATALOG_EMPTY` with `evidence.arkruleId`.
|
|
139
|
+
6. Absence of extras is **valid**. Extra skip clusters grind **here** after the extra is on. Evaluate one bus → `/ark-runtime`; evaluate one order-plane candidate → `/ark-order`. Do not invent `/ark-run`. Skills never enforce.
|
|
132
140
|
|
|
133
141
|
|
|
134
142
|
### Autopilot + ArkRules
|
|
@@ -148,7 +156,7 @@ When `arkRun` is present:
|
|
|
148
156
|
### Autopilot + ArkOrder
|
|
149
157
|
When `arkOrder` is present:
|
|
150
158
|
- 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
|
-
- Extra off → `/ark-adopt` (advisory).
|
|
159
|
+
- Extra off → `/ark-adopt` (advisory). Wire one candidate → `/ark-order`.
|
|
152
160
|
- Skills never enforce.
|
|
153
161
|
|
|
154
162
|
## Subagent fan-out (optional, host-dependent)
|
|
@@ -266,7 +274,7 @@ Status lights from doctor — not settings you choose. Rank residual honestly:
|
|
|
266
274
|
- Claim ENFORCE / “done” when doctor reports `contract-false-green-io-under-application` (adopt first).
|
|
267
275
|
- Claim “done” solely because plan A is empty while explore/B residual remains unlisted.
|
|
268
276
|
- Replace host Nest/DI with the runtime kernel unasked.
|
|
269
|
-
- Invent `/ark-run
|
|
277
|
+
- Invent `/ark-run`. Use `/ark-order` to wire one plane candidate.
|
|
270
278
|
- Auto-apply pattern (B) bets as if they were mechanical-safe.
|
|
271
279
|
- Create origin only after a long cleanup (freezes a polished “before” that never was).
|
|
272
280
|
|
|
@@ -5,21 +5,18 @@ description: Shortcut — edit the rules file or extra rules. Use /ark-adopt or
|
|
|
5
5
|
|
|
6
6
|
# /ark-contract — Shortcut to adopt / autopilot
|
|
7
7
|
|
|
8
|
-
**Not a first-
|
|
8
|
+
**Not a first-class door.** One-release redirect. Writing `ark.config.json` is
|
|
9
9
|
**`/ark-adopt`** at session 0 and **`/ark-autopilot`** afterward. Do that job now.
|
|
10
|
-
|
|
11
|
-
## Autonomy contract
|
|
12
|
-
|
|
13
|
-
Invoking this leftover name **is** the approval to write an honest config. Do not
|
|
14
|
-
preview-only. Never weaken the architecture config.
|
|
10
|
+
Contener · Guiar · Ordenar — this leftover name is not a star.
|
|
15
11
|
|
|
16
12
|
## When / not when
|
|
17
13
|
|
|
18
14
|
| Use this leftover name when… | Prefer instead |
|
|
19
15
|
|------------------------------|----------------|
|
|
20
|
-
| Layers / include / ArkRules /
|
|
16
|
+
| Layers / include / ArkRules / first extra need an edit | **`/ark-adopt`** (path, first `arkRun` / first `arkOrder`) or **`/ark-autopilot`** (tighten) |
|
|
21
17
|
| False-green / concentrated edge | **`/ark-adopt`** — write the honest config |
|
|
22
|
-
|
|
|
18
|
+
| One kernel candidate | **`/ark-runtime`** |
|
|
19
|
+
| One order-plane candidate | **`/ark-order`** |
|
|
23
20
|
|
|
24
21
|
## Dual engine (mandatory)
|
|
25
22
|
|
|
@@ -39,14 +36,6 @@ retain `projectIdentity.projectId`, then pass both `expectedRoot` and `expectedP
|
|
|
39
36
|
uncertain, do not consume MCP analysis: use the workspace-local CLI and report that MCP
|
|
40
37
|
restart/retargeting is required. `ark://manifest` never satisfies this preflight.
|
|
41
38
|
|
|
42
|
-
## Dual plane — layers + extras (mandatory, except /ark-runtime)
|
|
43
|
-
|
|
44
|
-
Label findings **`[Layer]`** vs **`[ArkRules]`** vs **`[ArkRun]`** vs **`[ArkOrder]`**. Absence of extras is valid and silent. First-time extra is **`/ark-adopt`** (advisory). Wire one kernel candidate with **`/ark-runtime`**. New kernel-managed / plane-root file with **`/ark-place`**. Grind skip clusters with **`/ark-autopilot`**. Do not invent `/ark-run` or `/ark-order`. Skills never enforce.
|
|
45
|
-
|
|
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
|
-
|
|
48
|
-
When `arkOrder` is on, name **`xiKeys`** (3–5 slow product decisions). Membership ids and recomputable statuses are not keys: derive a status on read or fold it from ingest instead. A use-case that persists those keys is `ARKORDER_XI_FIELD_WRITE`. First freeze is `release()`; later ξ is `proposeRelease` then `apply`; `refreshSigma`; ingest residual `absorb | escalate_up | hold` + `reasonCode`; capacity pack as data; in-memory `ReleaseStore`; ArkRun `decisionTape`. The billing gallery lives on GitHub, not in the npm tarball: [examples/arkorder-billing](https://github.com/pedroknigge/arkgate/tree/main/examples/arkorder-billing). Rename the three keys. The check remains silent on semantic entailment.
|
|
49
|
-
|
|
50
39
|
## Subagent fan-out (optional, host-dependent)
|
|
51
40
|
|
|
52
41
|
If the host supports **parallel subagents**, fan out read-only scouts; otherwise
|
|
@@ -59,9 +48,9 @@ If the host supports **parallel subagents**, fan out read-only scouts; otherwise
|
|
|
59
48
|
|
|
60
49
|
## Steps
|
|
61
50
|
|
|
62
|
-
1.
|
|
63
|
-
2.
|
|
64
|
-
3. One kernel candidate
|
|
51
|
+
1. Path missing or lying → execute **`/ark-adopt`** (including first advisory `arkRun` / first advisory `arkOrder`).
|
|
52
|
+
2. Path honest and tightening → execute **`/ark-autopilot`**.
|
|
53
|
+
3. One kernel candidate → **`/ark-runtime`**. One order-plane candidate → **`/ark-order`**.
|
|
65
54
|
|
|
66
55
|
## Completion contract (skill incomplete if missing)
|
|
67
56
|
|
|
@@ -73,5 +62,5 @@ Skill incomplete if missing any field below.
|
|
|
73
62
|
- **Result:** one-line outcome
|
|
74
63
|
- **Planes:** one-line split of residual **[Layer]** vs **[ArkRules]** vs **[ArkRun]** vs **[ArkOrder]** (or `n/a` if unused)
|
|
75
64
|
- **Compass:** top residual lenses | `n/a`
|
|
76
|
-
- **Handoff:** `/ark-adopt` / `/ark-autopilot` / `none`
|
|
65
|
+
- **Handoff:** `/ark-adopt` / `/ark-autopilot` / `/ark-order` / `none`
|
|
77
66
|
- **Incomplete?** `no` | `yes — <what is missing>`
|
|
@@ -5,9 +5,13 @@ description: How much of the tree the rules file covers. CLI is a sensor; read t
|
|
|
5
5
|
|
|
6
6
|
# /ark-coverage — Ark adoption fitness (not full recon)
|
|
7
7
|
|
|
8
|
+
**Contener · Guiar · Ordenar.** In plain words: contain the write, guide the next
|
|
9
|
+
step, order leftover mess. This door is **Guiar**: adoption fitness numbers, not a full map.
|
|
10
|
+
Skills never enforce — CLI / hooks / CI do.
|
|
11
|
+
|
|
8
12
|
**Not a first-run door.** Fitness numbers only (governed files, gates, baseline).
|
|
9
13
|
Session 0 → **`/ark-adopt`**. Leftover design → **`/ark-explore`**. Apply → **`/ark-autopilot`**.
|
|
10
|
-
|
|
14
|
+
Wire ArkRun → **`/ark-runtime`**. Wire ArkOrder → **`/ark-order`**.
|
|
11
15
|
|
|
12
16
|
You audit **how this repo uses ArkGate** (coverage, gates, baseline, host write path) and
|
|
13
17
|
what adoption gaps remain. Work autonomously. End with a ranked fitness report.
|
|
@@ -41,7 +45,7 @@ patterns are **out-of-scope** lenses — say so; do not invent Ark enforcement f
|
|
|
41
45
|
| “How adopted is Ark?” governed%, gates, baseline, skills stale | Full product map / what-next architecture → `/ark-explore` |
|
|
42
46
|
| Capability gaps (CI, write path, ESLint, optional layers) | Apply fixes end-to-end → `/ark-autopilot` |
|
|
43
47
|
| Ranked *adoption* opportunities (install, ratchet, contract classify) | Spaghetti pattern plan / golden pattern → `/ark-explore` dual-plan seed |
|
|
44
|
-
| Quick honesty before a release checklist | One design trade-off → `/ark-
|
|
48
|
+
| Quick honesty before a release checklist | One design trade-off → `/ark-explore` (one decision, 2–3 options) |
|
|
45
49
|
|
|
46
50
|
## Dual engine (mandatory)
|
|
47
51
|
|
|
@@ -90,10 +94,10 @@ ArkGate has **always-on Layers** plus opt-in extras. The user chooses extras; yo
|
|
|
90
94
|
1. Prefix each finding or next step with **`[Layer]`** or **`[ArkRules]`** or **`[ArkRun]`** or **`[ArkOrder]`** (or a table with those headers).
|
|
91
95
|
2. Never call an import-edge violation an “invariant” or an aggregate sensor a “layer deny.”
|
|
92
96
|
3. Absence of `arkRules` is **valid** — do not force ArkRules unless the user wants them or residual inventory clearly wants a pilot.
|
|
93
|
-
4. Editing `arkrules/*` or promoting modes is **`/ark-adopt
|
|
94
|
-
5. CLI helpers: `ark-check --rules-inventory --json`, doctor JSON `rulesUnderContract`, sensors emit `ARKRULE_*` / `INVARIANT_UNCOVERED` with `evidence.arkruleId`.
|
|
97
|
+
4. Editing `arkrules/*` or promoting modes is **`/ark-adopt`**; fixing code under a structure sensor is **`/ark-autopilot`** (judgment, never invent mechanical-safe).
|
|
98
|
+
5. CLI helpers: `ark-check --rules-inventory --json`, doctor JSON `rulesUnderContract`, sensors emit `ARKRULE_*` / `INVARIANT_UNCOVERED` / `INVARIANT_CATALOG_EMPTY` with `evidence.arkruleId`.
|
|
95
99
|
5b. Invariant coverage is a **text match, never an execution**: a file walk plus the invariant id in a `describe`/`it` title. Never report `INVARIANT_UNCOVERED: 0` as “the tests pass” or “the tests run” — ArkGate does not run tests and reads no runner config. When the project declares `coverage.coverageRoots`, a covering test found outside them raises the advisory `INVARIANT_COVERAGE_OUTSIDE_ROOTS`; without that declaration ArkGate makes no claim about where tests run.
|
|
96
|
-
6. Extras silent when off. Doctor `arkRun` is `notAScore`. Do not force extras.
|
|
100
|
+
6. Extras silent when off. Doctor `arkRun` / `arkOrder` is `notAScore`. Do not force extras. Wire one kernel candidate via `/ark-runtime`; one order-plane candidate via `/ark-order`. Do not invent `/ark-run`.
|
|
97
101
|
|
|
98
102
|
|
|
99
103
|
### Coverage + ArkRules
|
|
@@ -143,10 +147,10 @@ because governed% is 100% and plan is empty.
|
|
|
143
147
|
|
|
144
148
|
## Related onboarding
|
|
145
149
|
|
|
146
|
-
- **Greenfield:** low governed% → `/ark-
|
|
150
|
+
- **Greenfield:** low governed% → `/ark-adopt` or `ark-check --recommend`.
|
|
147
151
|
- **Brownfield:** `/ark-adopt` for action; this skill for fitness metrics.
|
|
148
152
|
- **Pattern / spaghetti residual:** `/ark-explore` dual-plan seed / shape-focus.
|
|
149
|
-
- **Business rules loose:** note in table; mining action → `/ark-adopt
|
|
153
|
+
- **Business rules loose:** note in table; mining action → `/ark-adopt`.
|
|
150
154
|
|
|
151
155
|
## Checklist (sensor + light code)
|
|
152
156
|
|
|
@@ -159,8 +163,8 @@ because governed% is 100% and plan is empty.
|
|
|
159
163
|
7. **Governed%** + unclassified + `suggestions` from `--coverage --json`.
|
|
160
164
|
8. Concentrated edges in check `summary` → contract smell, not N freezes.
|
|
161
165
|
9. `layersWithoutRules` + empty cores with I/O under Application (false-green).
|
|
162
|
-
On false-green: **STOP — do not continue this skill as complete.** **STOP — false-green: invoke /ark-adopt
|
|
163
|
-
On one-edge wall: **STOP — do not continue this skill as complete.** **STOP — concentrated edge: invoke /ark-
|
|
166
|
+
On false-green: **STOP — do not continue this skill as complete.** **STOP — false-green: invoke /ark-adopt before claiming ENFORCE.** Do not claim goal.met / ENFORCE from type-only cleanup while doctor reports `contract-false-green-io-under-application`.
|
|
167
|
+
On one-edge wall: **STOP — do not continue this skill as complete.** **STOP — concentrated edge: invoke /ark-adopt with source evidence** (do not freeze a wrong contract or grind N freezes).
|
|
164
168
|
10. Runtime kernel / Nest only if deps prove it — never force-fit.
|
|
165
169
|
|
|
166
170
|
## Output format
|
|
@@ -5,9 +5,13 @@ description: Explain the rules file in plain language and generate the HTML repo
|
|
|
5
5
|
|
|
6
6
|
# /ark-explain — Understand this project's architecture
|
|
7
7
|
|
|
8
|
+
**Contener · Guiar · Ordenar.** In plain words: contain the write, guide the next
|
|
9
|
+
step, order leftover mess. This door is **Guiar**: teach the path in plain language.
|
|
10
|
+
Skills never enforce — CLI / hooks / CI do.
|
|
11
|
+
|
|
8
12
|
**Not a first-run door.** Teach / HTML tour only. Session 0 → **`/ark-adopt`**.
|
|
9
13
|
Map → **`/ark-explore`**. Apply → **`/ark-autopilot`**.
|
|
10
|
-
|
|
14
|
+
Wire ArkRun → **`/ark-runtime`**. Wire ArkOrder → **`/ark-order`**.
|
|
11
15
|
|
|
12
16
|
The user wants to understand the architecture, a specific rule, or why the gate blocked them.
|
|
13
17
|
|
|
@@ -75,15 +79,17 @@ ArkGate has **always-on Layers** plus opt-in extras. The user chooses extras; yo
|
|
|
75
79
|
2. Never call an import-edge violation an “invariant” or an aggregate sensor a “layer deny.”
|
|
76
80
|
3. Absence of `arkRules` is **valid** — do not force ArkRules unless the user wants them or residual inventory clearly wants a pilot.
|
|
77
81
|
4. Editing `arkrules/*` or applying structure fixes is **`/ark-adopt`** / **`/ark-autopilot`** (never invent `mechanical-safe`).
|
|
78
|
-
5. CLI helpers: `ark-check --rules-inventory --json`, doctor JSON `rulesUnderContract`, sensors emit `ARKRULE_*` / `INVARIANT_UNCOVERED` with `evidence.arkruleId`.
|
|
79
|
-
6. Extras silent when off. Doctor `arkRun` is `notAScore`. Do not force extras.
|
|
82
|
+
5. CLI helpers: `ark-check --rules-inventory --json`, doctor JSON `rulesUnderContract`, sensors emit `ARKRULE_*` / `INVARIANT_UNCOVERED` / `INVARIANT_CATALOG_EMPTY` with `evidence.arkruleId`.
|
|
83
|
+
6. Extras silent when off. Doctor `arkRun` / `arkOrder` is `notAScore`. Do not force extras. Wire one kernel candidate via `/ark-runtime`; one order-plane candidate via `/ark-order`. Do not invent `/ark-run`.
|
|
80
84
|
|
|
81
85
|
|
|
82
86
|
### Explain + ArkRules
|
|
83
87
|
- HTML/plain tour: section **Layers** and section **Rules under contract (ArkRules)** —
|
|
84
88
|
when `arkRules` is active the showcase lists **per-layer counts**, **structure sensors**
|
|
85
89
|
(id / sensor / mode), **uncovered** invariants (call them out), and a **covered sample**.
|
|
86
|
-
|
|
90
|
+
Compact doctor names ArkRules only when the map is on; absence stays silent.
|
|
91
|
+
Empty `invariants[]` on a populated Domain is residual (`INVARIANT_CATALOG_EMPTY`), not “all covered”.
|
|
92
|
+
Inactive HTML map stays a short opt-in note. Counts are never a score.
|
|
87
93
|
- Spoken tour: name 2–4 real invariant IDs and one structure sensor from this repo’s
|
|
88
94
|
`arkrules/*` (open the files — do not invent). Residual candidates → `--rules-inventory`.
|
|
89
95
|
- **Teach the product model (required when arkRules is active):**
|
|
@@ -217,7 +223,7 @@ when residual signals remain.
|
|
|
217
223
|
|
|
218
224
|
## Related
|
|
219
225
|
|
|
220
|
-
- Onboarding: `/ark-adopt
|
|
226
|
+
- Onboarding: `/ark-adopt`, `ark-check --recommend`, `docs/enthusiast/README.md`
|
|
221
227
|
- Brownfield: `/ark-adopt`, `docs/brownfield-adoption.md`
|
|
222
228
|
- Autopilot: `/ark-autopilot` after the user understands the contract
|
|
223
229
|
|
|
@@ -5,7 +5,12 @@ description: Map import rules and leftover design. No apply. CLI is a sensor; yo
|
|
|
5
5
|
|
|
6
6
|
# /ark-explore — Recon the real project (map only)
|
|
7
7
|
|
|
8
|
-
**
|
|
8
|
+
**Contener · Guiar · Ordenar.** In plain words: contain the write, guide the next
|
|
9
|
+
step, order leftover mess. This door is **Guiar**: map leftover design so you can
|
|
10
|
+
order a messy tree. Do not apply. Skills never enforce — CLI / hooks / CI do.
|
|
11
|
+
|
|
12
|
+
**When:** you need a map, leftover design work remains after imports look green, or
|
|
13
|
+
one bounded decision needs 2–3 enforceable options.
|
|
9
14
|
**Not when:** the user wants edits applied (`/ark-autopilot`) or session 0 (`/ark-adopt`).
|
|
10
15
|
|
|
11
16
|
## Steps
|
|
@@ -17,6 +22,18 @@ description: Map import rules and leftover design. No apply. CLI is a sensor; yo
|
|
|
17
22
|
## Checklist
|
|
18
23
|
|
|
19
24
|
- Doctor #1: if ENFORCE + empty plan A and gates are already installed → **Shape** (`/ark-explore` then `/ark-autopilot`). Do not say install-agent-gates.
|
|
25
|
+
- When `--require-gates` / adopted-strict is on and doctor JSON has `adrPresence`,
|
|
26
|
+
the next step is a short note under `docs/adr/` (or `docs/decisions/`). Soft.
|
|
27
|
+
Not every change. Off when require-gates is off. No `/ark-adr`.
|
|
28
|
+
- When doctor JSON has `statesTransitions` or `statusTransitionCatalog`, the
|
|
29
|
+
next step is a short states → transitions table (or one link) on the domain
|
|
30
|
+
doc already in play. Use catalog names when present. Soft. Silent when that
|
|
31
|
+
doc is absent or Domain has no status vocabulary. No `/ark-states`. Do not
|
|
32
|
+
invent states.
|
|
33
|
+
- When doctor JSON has `noDomainFrontend`, Domain is empty and the UI holds the
|
|
34
|
+
rules. Next: one Domain file (`/ark-place`) then one small refactor
|
|
35
|
+
(`/ark-autopilot`). Soft. Silent when there is no frontend or Domain already
|
|
36
|
+
has files. No `/ark-domain`. Do not invent a Domain house.
|
|
20
37
|
- Distinguish **missing** skills vs **stale** catalog. Installed ≠ stale.
|
|
21
38
|
- Hook green is not tree green (scripted edits bypass PreToolUse).
|
|
22
39
|
- Bug / false green / false red / missing doc / improvable behavior **in ArkGate itself** → draft one upstream GitHub issue (`pedroknigge/arkgate` or the installed package `repository.url`), **ask the human to confirm send**, then `gh issue create`. Never auto-file. Never file ArkGate defects on the consumer product repo.
|
|
@@ -102,7 +119,8 @@ If the consumer tree has a **domain glossary**, prefer its terms for layer/slice
|
|
|
102
119
|
| Map / “what next?” / residual after ENFORCE | User wants edits applied → `/ark-autopilot` |
|
|
103
120
|
| **Primary post-green door:** messy / leftover design work / “clarify for AI” | Skill-shopping coverage or think for the same leftover work |
|
|
104
121
|
| Spaghetti brownfield: patterns concurrent, design-weak under green check | Only “governed% + gates installed?” numbers → `/ark-coverage` |
|
|
105
|
-
| Dual-plan **seed** (A remediation + B pattern bets) without applying |
|
|
122
|
+
| Dual-plan **seed** (A remediation + B pattern bets) without applying | Apply the chosen option → `/ark-autopilot`; new file → `/ark-place` |
|
|
123
|
+
| One bounded decision: 2–3 enforceable options (folded from leftover `/ark-think`) | Full apply → `/ark-autopilot`; extra off → `/ark-adopt`; one kernel candidate → `/ark-runtime`; one order-plane candidate → `/ark-order` |
|
|
106
124
|
| Path-correct vs design-correct honesty | Plain-language tour / HTML report → `/ark-explain` |
|
|
107
125
|
|
|
108
126
|
**Post-green single path:** when doctor `postGreenPath` / ENFORCE · leftover design work is active, **this skill
|
|
@@ -173,20 +191,36 @@ ArkGate has **always-on Layers** plus opt-in extras. The user chooses extras; yo
|
|
|
173
191
|
2. Never call an import-edge violation an “invariant” or an aggregate sensor a “layer deny.”
|
|
174
192
|
3. Absence of `arkRules` is **valid** — do not force ArkRules unless the user wants them or residual inventory clearly wants a pilot.
|
|
175
193
|
4. Editing `arkrules/*` or applying structure fixes is **`/ark-adopt`** / **`/ark-autopilot`** — explore does not write (never invent `mechanical-safe`).
|
|
176
|
-
5. CLI helpers: `ark-check --rules-inventory --json`, doctor JSON `rulesUnderContract`, sensors emit `ARKRULE_*` / `INVARIANT_UNCOVERED` with `evidence.arkruleId`.
|
|
177
|
-
6. Never write `arkRun` or `arkOrder` from this skill. When extras are present, label residual **`[ArkRun]`** / **`[ArkOrder]`**.
|
|
194
|
+
5. CLI helpers: `ark-check --rules-inventory --json`, doctor JSON `rulesUnderContract`, sensors emit `ARKRULE_*` / `INVARIANT_UNCOVERED` / `INVARIANT_CATALOG_EMPTY` with `evidence.arkruleId`.
|
|
195
|
+
6. Never write `arkRun` or `arkOrder` from this skill. When extras are present, label residual **`[ArkRun]`** / **`[ArkOrder]`**. Wire one kernel candidate via `/ark-runtime`; one order-plane candidate via `/ark-order`. Do not invent `/ark-run`.
|
|
178
196
|
|
|
179
197
|
|
|
180
198
|
### Explore + ArkRules
|
|
181
199
|
- Always run sensors for **both** planes when present: coverage/doctor **and** `--rules-inventory` if `arkRules` exists or brownfield may hide spaghetti rules.
|
|
182
200
|
- Ranked table kinds may include `arkrules-opportunity` and `invariant-gap`.
|
|
201
|
+
- Empty `invariants[]` on a populated Domain while `arkRules` is on is residual (`INVARIANT_CATALOG_EMPTY`), not done. Point at `arkrules/<Domain>.json`.
|
|
183
202
|
- Dual-plan **B** may include: place advisory structure rules, extract one inventory candidate to Domain + `arkrules` entry, promote one covered invariant.
|
|
184
203
|
- Field path: note whether starters emit `arkrules/*`.
|
|
185
204
|
|
|
186
205
|
### Explore + extras
|
|
187
206
|
- Map extras when present; never write `arkRun` / `arkOrder`. Extra off → residual `n/a` / silent.
|
|
188
207
|
- 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 }`.
|
|
189
|
-
- Field path may name the ArkOrder gallery on GitHub (`https://github.com/pedroknigge/arkgate/tree/main/examples/arkorder-billing`; not in the npm tarball — map only). First extra write is `/ark-adopt`; grind is `/ark-autopilot`.
|
|
208
|
+
- Field path may name the ArkOrder gallery on GitHub (`https://github.com/pedroknigge/arkgate/tree/main/examples/arkorder-billing`; not in the npm tarball — map only). First extra write is `/ark-adopt`; wire one candidate is `/ark-order`; grind is `/ark-autopilot`.
|
|
209
|
+
|
|
210
|
+
## One decision (2–3 options)
|
|
211
|
+
|
|
212
|
+
When the job is **one** bounded import-rule or ArkRules choice (not a full map), stay here.
|
|
213
|
+
Leftover `/ark-think` redirects here. Do not invent a third door.
|
|
214
|
+
|
|
215
|
+
1. Open ≥5 source files on the decision surface. Name paths.
|
|
216
|
+
2. Propose **2–3 options** that stay enforceable today. Label each by lens impact
|
|
217
|
+
(what residual improves / what stays out-of-scope). Always `notAScore`.
|
|
218
|
+
3. Recommend one option + why it is enforceable. Pilot + kill-switch if the choice
|
|
219
|
+
adds a layer or wall.
|
|
220
|
+
4. Hand off: apply → `/ark-autopilot`; new file → `/ark-place`; extra off → `/ark-adopt`;
|
|
221
|
+
one kernel candidate → `/ark-runtime`; one order-plane candidate → `/ark-order`.
|
|
222
|
+
|
|
223
|
+
Never weaken `ark.config.json` to pass. Never silent judgment auto-apply.
|
|
190
224
|
|
|
191
225
|
## Output mode (pick one — do not invent a fourth)
|
|
192
226
|
|