arkgate 4.6.1 → 4.6.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. package/CHANGELOG.md +50 -1
  2. package/README.md +17 -11
  3. package/bin/ark-check-runtime.mjs +23 -127
  4. package/bin/ark-mcp-runtime.mjs +75 -49
  5. package/bin/ark.mjs +19 -78
  6. package/bin/lib/ci-and-commands.mjs +4 -3
  7. package/bin/lib/doctor-next-actions.mjs +92 -0
  8. package/bin/lib/doctor-plan.mjs +59 -69
  9. package/bin/lib/first-run-help.mjs +221 -0
  10. package/bin/lib/host-support-matrix.mjs +13 -15
  11. package/bin/lib/start-preview.mjs +17 -10
  12. package/bin/lib/status-command.mjs +6 -1
  13. package/bin/lib/status-manifest.mjs +6 -0
  14. package/bin/lib/write-path-capabilities.mjs +9 -5
  15. package/bin/lib/write-path-detect.mjs +3 -3
  16. package/dist/index.cjs +19 -19
  17. package/dist/index.d.ts +6 -1
  18. package/dist/index.js +22 -22
  19. package/docs/README.md +5 -5
  20. package/docs/agent-guide.md +19 -14
  21. package/docs/ai-gates.md +29 -20
  22. package/docs/develop.md +4 -1
  23. package/docs/enthusiast/how-to-agent-gates.md +2 -2
  24. package/docs/package-surface.md +4 -3
  25. package/docs/product-voice.md +4 -4
  26. package/docs/threat-model.md +5 -1
  27. package/docs/use.md +9 -4
  28. package/package.json +2 -2
  29. package/server.json +3 -3
  30. package/templates/agent-skills/README.md +1 -1
  31. package/templates/agent-skills/ark-adopt/SKILL.md +14 -5
  32. package/templates/agent-skills/ark-architect/SKILL.md +2 -2
  33. package/templates/agent-skills/ark-autopilot/SKILL.md +12 -5
  34. package/templates/agent-skills/ark-contract/SKILL.md +1 -1
  35. package/templates/agent-skills/ark-coverage/SKILL.md +10 -8
  36. package/templates/agent-skills/ark-explain/SKILL.md +3 -2
  37. package/templates/agent-skills/ark-explore/SKILL.md +13 -4
  38. package/templates/agent-skills/ark-fix/SKILL.md +1 -1
  39. package/templates/agent-skills/ark-loop/SKILL.md +1 -1
  40. package/templates/agent-skills/ark-place/SKILL.md +10 -1
  41. package/templates/agent-skills/ark-think/SKILL.md +3 -2
  42. package/templates/agent-skills/ark-upgrade/SKILL.md +10 -3
  43. package/templates/skills/ark-adopt.md +14 -5
  44. package/templates/skills/ark-architect.md +2 -2
  45. package/templates/skills/ark-autopilot.md +12 -5
  46. package/templates/skills/ark-contract.md +1 -1
  47. package/templates/skills/ark-coverage.md +10 -8
  48. package/templates/skills/ark-explain.md +3 -2
  49. package/templates/skills/ark-explore.md +13 -4
  50. package/templates/skills/ark-fix.md +1 -1
  51. package/templates/skills/ark-loop.md +1 -1
  52. package/templates/skills/ark-place.md +10 -1
  53. package/templates/skills/ark-think.md +3 -2
  54. package/templates/skills/ark-upgrade.md +10 -3
@@ -5,6 +5,15 @@ description: Map skill — decision-grade recon of layers + ArkRules opportuniti
5
5
 
6
6
  # /ark-explore — Recon the real project (map only)
7
7
 
8
+ **When:** you need a map, or leftover design work remains after imports look green.
9
+ **Not when:** the user wants edits applied (`/ark-autopilot`) or session 0 (`/ark-adopt`).
10
+
11
+ ## Steps
12
+
13
+ 1. Read `arkgate-check --doctor`.
14
+ 2. Open the real tree (≥12 files across ≥4 dirs). CLI JSON alone is incomplete.
15
+ 3. Rank leftover work. Hand off to `/ark-autopilot` to apply one refactor. Do not write config or product code here.
16
+
8
17
  ## Autonomy contract
9
18
 
10
19
  Invoking this skill **is** the approval to **map**. Open the real tree. CLI JSON alone is
@@ -308,7 +317,7 @@ Prefer bets the user can run next (`command` / skill), not vague “improve DX
308
317
  | **Stabilize** | ENFORCE + honest baseline only for real debt | 0 new edges; doctor not lying about write path/CI |
309
318
  | **Shape** | One **golden** pattern + pilot cluster | Pilot smells cleared; rest is migrate-on-touch; B bets have success signals |
310
319
 
311
- ENFORCE without Shape progress is **`ENFORCE · design-weak`** — say that out loud. It is **not** “healthy finished.”
320
+ ENFORCE without Shape progress is leftover design work — say that out loud. It is **not** “healthy finished.”
312
321
 
313
322
  **Agent-detected design smells** (list any that apply; paths required — these may predate doctor IDs):
314
323
 
@@ -374,16 +383,16 @@ and the ranked **`pilotLoop.nextPilot`**.
374
383
 
375
384
  State **Mode: recon | dual-plan seed | shape-focus** and **Phase: Align | Stabilize | Shape** in the first lines.
376
385
 
377
- 1. **Headline** — product one sentence + honesty (mode, governed%, false-green / semantic false-green / **ENFORCE·design-weak** / false-promise risk). ENFORCE is context, not the story.
386
+ 1. **Headline** — product one sentence + honesty (mode, governed%, false-green / leftover design work / false-promise risk). ENFORCE is context, not the story.
378
387
  2. **Map** — entry points, major dirs, shape name (or “no honest shape yet”). One screen. **Patterns concurrent** table when §B/§G requires it.
379
388
  3. **What I opened** — paths + sensors (include field/hook/origin when used).
380
389
  4. **Ranked table** — **only rows that change a decision**. Prefer **3–6** hard rows.
381
390
 
382
- | # | Kind | Finding | Evidence (path) | Así te lo re-soluciono | Success signal | Next skill / command |
391
+ | # | Kind | Finding | Evidence (path) | How to fix | Success signal | Next skill / command |
383
392
 
384
393
  Kinds: `risk` | `false-green` | `debt` | `opportunity` | `shape` | `manifiesto` | `agent-dx` | `design-weak`
385
394
 
386
- **Así te lo re-soluciono** must be concrete: files to touch, command to run.
395
+ **How to fix** must be concrete: files to touch, command to run.
387
396
  **Success signal** must be falsifiable (see §F).
388
397
 
389
398
  5. **Field path summary**.
@@ -5,7 +5,7 @@ description: Shortcut to /ark-autopilot for a small violation cluster. Deprecate
5
5
 
6
6
  # /ark-fix — Shortcut to /ark-autopilot
7
7
 
8
- **Deprecated as a first-class door.** Gate violations and judgment remediations are
8
+ **Not a first-run door.** This leftover name is a shortcut. Gate violations are
9
9
  **`/ark-autopilot`**. Do that job now. CLI only validates.
10
10
 
11
11
  ## Autonomy contract
@@ -5,7 +5,7 @@ description: Shortcut to /ark-autopilot for driving plan A to zero. Deprecated a
5
5
 
6
6
  # /ark-loop — Shortcut to /ark-autopilot
7
7
 
8
- **Deprecated as a first-class door.** Driving `--plan` to `goal.met` is **`/ark-autopilot`**.
8
+ **Not a first-run door.** This leftover name is a shortcut. Driving `--plan` to `goal.met` is **`/ark-autopilot`**.
9
9
  Do that job now. Auto-apply only the four `mechanical-safe` kinds; judgment you write.
10
10
 
11
11
  ## Autonomy contract
@@ -5,6 +5,15 @@ description: "Where does new code go? Names the layer, directory, and naming for
5
5
 
6
6
  # /ark-place — Where does this code go?
7
7
 
8
+ **When:** you are adding a new file or artifact and need the layer, folder, and name.
9
+ **Not when:** session 0 / config is missing or lying (`/ark-adopt`) or an existing violation cluster (`/ark-autopilot`).
10
+
11
+ ## Steps
12
+
13
+ 1. Bind identity if using MCP (`ark_identity` with the exact project root).
14
+ 2. Place the file (`ark_place` or read `ark.config.json`).
15
+ 3. Write it there. Then `arkgate-check`.
16
+
8
17
  ## Autonomy contract
9
18
 
10
19
  Invoking this skill **is** the approval. If the user described an artifact, **write the
@@ -155,7 +164,7 @@ the same files or weaken the gate.
155
164
 
156
165
  - If the user needs bulk adoption / wrong config, not a single artifact: **STOP — do not continue this skill as complete.** Switch to **`/ark-adopt`** (write the path) instead of ad-hoc multi-file grinding without a plan.
157
166
  - If the config lacks a home for the artifact: add the layer **in this turn**, then write the file.
158
- - If doctor is **ENFORCE · design-weak** and the user is asking to reshape existing structure
167
+ - If doctor shows leftover design work and the user is asking to reshape existing structure
159
168
  (not place one new artifact): place only the new file under the golden/contract home, then
160
169
  hand off **one** pilot via `pilotLoop.nextPilot` / `/ark-explore` shape-focus — never multi-pilot
161
170
  batch reshape from this skill.
@@ -5,8 +5,9 @@ description: Host-side architectural reasoning — 2–3 enforceable options on
5
5
 
6
6
  # /ark-think — Architectural reasoning (host LLM only)
7
7
 
8
- **Shortcut.** One decision only. Full map → **`/ark-explore`**. Apply → **`/ark-autopilot`**.
9
- Session 0 → **`/ark-adopt`**.
8
+ **Not a first-run door.** One decision only. Session 0 → **`/ark-adopt`**.
9
+ Full map → **`/ark-explore`**. Apply → **`/ark-autopilot`**.
10
+ Do not send the user to leftover `/ark-contract` or `/ark-fix`.
10
11
 
11
12
  You are the user's architecture thinking partner **inside** the project's Ark contract.
12
13
  This skill does **not** call any LLM API from the arkgate package. **You** (the host agent)
@@ -5,9 +5,16 @@ description: Upgrade ArkGate through a content-identity preview, preserve custom
5
5
 
6
6
  # /ark-upgrade — managed ArkGate upgrade
7
7
 
8
- Upgrade the published `arkgate` package and its managed gates without treating a
9
- filename, package version, or similar-looking file as proof of ownership. The
10
- preview is the source of truth: inspect it before applying anything.
8
+ **When:** bump the published `arkgate` package and refresh managed gates.
9
+ **Not when:** session 0 (`/ark-adopt`) or leftover design (`/ark-explore`).
10
+
11
+ ## Steps
12
+
13
+ 1. Preview: `arkgate upgrade` (no writes).
14
+ 2. Apply in this turn: `arkgate upgrade --apply` (needs `--plan-digest` when applying managed files).
15
+ 3. Re-run `arkgate-check --doctor`. Customized files stay unless you pass `--accept-conflicts` / `--refresh-skills`.
16
+
17
+ The preview is the source of truth. Do not treat a filename or package version as proof of ownership.
11
18
 
12
19
  ## Autonomy contract
13
20
 
@@ -5,8 +5,17 @@ description: Session 0 — mark the Ark path. Greenfield scaffold or brownfield
5
5
 
6
6
  # /ark-adopt — Mark the path (session 0)
7
7
 
8
+ **When:** empty tree, or the architecture config does not match the real folders (session 0).
9
+ **Not when:** a single new file (`/ark-place`) or leftover design after the path is honest (`/ark-explore` then `/ark-autopilot`).
10
+
11
+ ## Steps
12
+
13
+ 1. Read `arkgate-check --doctor` (one light, one next action).
14
+ 2. Write `ark.config.json` (and a baseline only for genuine debt) in this turn.
15
+ 3. Re-run doctor. Day-to-day new files: `/ark-place`.
16
+
8
17
  Invoking this skill **is** the approval. Write the architecture config in this turn.
9
- Greenfield: scaffold like `--recommend` / today’s architect. Brownfield: match **product
18
+ Greenfield: scaffold like `--recommend`. Brownfield: match **product
10
19
  reality**, freeze only genuine debt. A green check over a wrong config is a **false green**.
11
20
 
12
21
  ## Autonomy contract
@@ -36,7 +45,7 @@ write them in this turn. If they say the list is still right, leave it. Never in
36
45
  or auto-remove stewards.
37
46
 
38
47
  **Adopt is Align + Stabilize, then seed Shape.** Freezing debt without a pattern plan leaves
39
- spaghetti “ENFORCE · design-weak”. Always end with dual-plan **B** seeds (or handoff explore)
48
+ spaghetti leftover design work. Always end with dual-plan **B** seeds (or handoff explore)
40
49
  when design smells remain after the contract is honest.
41
50
 
42
51
  ## Improvement compass (process preflight)
@@ -152,7 +161,7 @@ feature dirs, plan clusters), you **may** dispatch **subagents**:
152
161
  2. **Product map** — what ships, which apps/packages, entry routes/CLIs.
153
162
  3. **Read real source** in largest ungoverned dirs and top import edges (min **12 files**
154
163
  across **≥4 dirs**).
155
- 4. **“Así te lo re-soluciono”** — concrete layer globs, file moves, manifest/intent proposals.
164
+ 4. **“How to fix”** — concrete layer globs, file moves, manifest/intent proposals.
156
165
  5. **Suggestive burn-down** — ranked next steps after adopt (not only “baseline done”).
157
166
  6. Never freeze a concentrated edge without investigating contract smell / false-green.
158
167
 
@@ -182,7 +191,7 @@ Ark protects the **boundary around** a framework, not its internals. Nest/DI pub
182
191
  - Propose: Domain files, `intentPrefixes`, intent names (`Domain.*` / `Application.*`), kernel `defineIntent` stubs if runtime is used;
183
192
  land structure/invariant entries under `arkrules/<Layer>.json` **in this turn** (ADR 0015 routing).
184
193
  - Write the config; move pure rules into Domain when safe; validate with ark-check.
185
- - Deliver section **“Así te lo re-soluciono en el manifiesto”** with before/after contract snippets.
194
+ - Deliver section **How to fix the architecture config** with before/after contract snippets.
186
195
  5. **Freeze only real debt** — `--update-baseline` (zero debt → **no empty baseline file** left behind).
187
196
  6. **Gates + skills** — `--install-agent-gates` (CI monorepo-aware when `frontend/package.json` exists).
188
197
  7. **Ratchet + Shape seed (mandatory exploratory close)** — after freeze/gates:
@@ -197,7 +206,7 @@ Ark protects the **boundary around** a framework, not its internals. Nest/DI pub
197
206
  ## Operating modes
198
207
 
199
208
  Explain modes as **detected stages** (Setup / Align / Guard), not user settings.
200
- **Guard on the contract ≠ Shape done.** Say `ENFORCE · design-weak` when B residual remains.
209
+ **Guard on the contract ≠ Shape done.** Say leftover design work remains when B residual remains.
201
210
 
202
211
  ## Verify
203
212
 
@@ -5,8 +5,8 @@ description: Shortcut to /ark-adopt for greenfield shape. Deprecated as a first-
5
5
 
6
6
  # /ark-architect — Shortcut to /ark-adopt
7
7
 
8
- **Deprecated as a first-class door.** Session 0 is **`/ark-adopt`**. Do that job now
9
- (greenfield scaffold via `ark-check --recommend` / MCP `ark_recommend` after `ark_identity`).
8
+ **Not a first-run door.** This leftover name is a shortcut. Session 0 is **`/ark-adopt`**.
9
+ Do that job now. Do not send the user to `/ark-contract` or `/ark-fix`.
10
10
 
11
11
  ## Autonomy contract
12
12
 
@@ -5,9 +5,16 @@ description: Apply Ark end-to-end — explore first; dual plan A (edges) + B (sh
5
5
 
6
6
  # /ark-autopilot — Apply the path
7
7
 
8
- **This is the apply door.** Invoking it **is** the approval. Prefer it when the user wants
9
- architecture cleaned end-to-end, not when they only need a map (`/ark-explore`). Doctor
10
- remains the control plane: re-check status after each major step.
8
+ **When:** the user wants architecture cleaned end-to-end, or leftover design after a map.
9
+ **Not when:** map only (`/ark-explore`), session 0 / config lying (`/ark-adopt`), or one new file (`/ark-place`).
10
+
11
+ ## Steps
12
+
13
+ 1. Read `arkgate-check --doctor` (do #1).
14
+ 2. Fix import-rule debt; if leftover design remains, apply **one** small refactor.
15
+ 3. Re-run doctor. Never weaken `ark.config.json`.
16
+
17
+ **This is the apply door.** Invoking it **is** the approval. Doctor remains the control plane.
11
18
 
12
19
  ## Autonomy contract
13
20
 
@@ -81,7 +88,7 @@ decision-grade explore pass **and** without opening violating files.
81
88
  2. CLI sensors: `--plan --json`, `--coverage --json` / `--doctor` as needed.
82
89
  3. **Dual plan** always emitted (sections A and B).
83
90
  4. **Open every file** in plan A `steps[]` (and `target` if present) before classifying a fix.
84
- 5. **“Así te lo re-soluciono”** for each A cluster and each B pattern bet.
91
+ 5. **“How to fix”** for each A cluster and each B pattern bet.
85
92
  6. Apply A → re-run ark-check → rollback on regression. **Never auto-apply B** as mechanical-safe.
86
93
  7. **One-pilot loop for B:** when leftover design / design-weak, take **`pilotLoop.nextPilot`** (one extraction card)
87
94
  → apply **only** that pilot **in this turn** → **re-doctor**. Never multi-pilot batch B; residual
@@ -153,7 +160,7 @@ Use the **`/ark-explore` decision-grade bar** (compressed into the autopilot rep
153
160
  Include explore **§G** when spaghetti / design-weak signals fire.
154
161
 
155
162
  1. **Headline** — product one-liner + honesty (mode, governed%, false-green / false-promise /
156
- **ENFORCE·design-weak** risk).
163
+ leftover design work risk).
157
164
  2. **Map** — entry points, lived layout vs globs (one screen). **Concurrent patterns** table when ≥2 styles.
158
165
  3. **Phase ladder** — name **Align | Stabilize | Shape** (explore §G).
159
166
  4. **Field path** — if `examples/` / gallery / starter docs exist: open ≥2, **run** their check when cheap; flag soft-green or broken demos. Else `Field path: n/a` + internal norm.
@@ -5,7 +5,7 @@ description: Shortcut to /ark-adopt (session 0) or /ark-autopilot (later config
5
5
 
6
6
  # /ark-contract — Shortcut to adopt / autopilot
7
7
 
8
- **Deprecated as a first-class door.** Writing `ark.config.json` / `arkrules/*` is
8
+ **Not a first-run door.** This leftover name is a shortcut. Writing `ark.config.json` is
9
9
  **`/ark-adopt`** at session 0 and **`/ark-autopilot`** afterward. Do that job now.
10
10
 
11
11
  ## Autonomy contract
@@ -5,8 +5,9 @@ description: Ark adoption fitness audit — governed%, gates, baseline honesty,
5
5
 
6
6
  # /ark-coverage — Ark adoption fitness (not full recon)
7
7
 
8
- **Shortcut.** Fitness numbers only. Full map / leftover design → **`/ark-explore`**.
9
- Apply → **`/ark-autopilot`**. Session 0 → **`/ark-adopt`**. This is not `/ark-explore`.
8
+ **Not a first-run door.** Fitness numbers only (governed files, gates, baseline).
9
+ Session 0 → **`/ark-adopt`**. Leftover design → **`/ark-explore`**. Apply **`/ark-autopilot`**.
10
+ Do not send the user to leftover `/ark-contract` or `/ark-fix`.
10
11
 
11
12
  You audit **how this repo uses ArkGate** (coverage, gates, baseline, host write path) and
12
13
  what adoption gaps remain. Work autonomously. End with a ranked fitness report.
@@ -56,7 +57,7 @@ patterns are **out-of-scope** lenses — say so; do not invent Ark enforcement f
56
57
  2. **Product surface** — name the app/package(s) in one line (not a full recon).
57
58
  3. **Read real source** in the top ungoverned / high-risk clusters (minimum **10 files**
58
59
  across at least **4 directories**). Prefer domain, features, adapters, routes — not only config.
59
- 4. **“Así te lo re-soluciono”** for adoption gaps (globs, install, baseline, intents).
60
+ 4. **“How to fix”** for adoption gaps (globs, install, baseline, intents).
60
61
  5. If plan A is empty but you see design-weak / concurrent patterns / god modules:
61
62
  list them briefly and **STOP — do not continue this skill as complete** for pattern work —
62
63
  **handoff `/ark-explore` (dual-plan seed or shape-focus)**. Do not invent a second explore report here.
@@ -127,9 +128,10 @@ because governed% is 100% and plan is empty.
127
128
  **Honesty hard lines (doctor JSON):**
128
129
  - `coverageHonesty.worseThanNoGate` / weak coverage (~&lt;50%): green is **worse than no gate**.
129
130
  - `baseline.honesty.dirtyBaselineRisk`: green-via-freeze may hide false-positive debt.
130
- - `writePath.honesty.softWriteHost` (Cursor / Codex / OpenCode): write path is **advisory /
131
- best-effort**, not hard PreToolUse — required CI status is the hard merge boundary.
132
- - Do not invent hard write guarantees for soft hosts.
131
+ - `writePath.honesty.softWriteHost` (OpenCode or another uncovered path): write path is
132
+ **advisory / best-effort**, not hard PreToolUse — required CI status is the hard merge boundary.
133
+ - Cursor hard evidence is limited to trusted Write/StrReplace; Codex is limited to a complete,
134
+ trusted, runtime-observed local `apply_patch`. Do not borrow either claim for other paths.
133
135
 
134
136
  ## Related onboarding
135
137
 
@@ -159,7 +161,7 @@ because governed% is 100% and plan is empty.
159
161
  2. **Adoption map** — clusters you read for *fitness* (paths) — keep short.
160
162
  3. **Ranked table** (adoption residual + install/capability opportunities)
161
163
 
162
- | # | Kind | Gap / opportunity | Evidence (path or CLI) | Así te lo re-soluciono (concrete) | Next |
164
+ | # | Kind | Gap / opportunity | Evidence (path or CLI) | How to fix (concrete) | Next |
163
165
 
164
166
  Kinds: `debt` | `false-green` | `shape` | `manifiesto` | `gates` | `opportunity` | `design-weak`
165
167
 
@@ -169,7 +171,7 @@ Kinds: `debt` | `false-green` | `shape` | `manifiesto` | `gates` | `opportunity`
169
171
  ## Done criteria
170
172
 
171
173
  - ≥10 source files read and cited; product surface named.
172
- - At least one **Así te lo re-soluciono** block with real paths or install commands.
174
+ - At least one **How to fix** block with real paths or install commands.
173
175
  - CLI numbers used as evidence, not as the whole report.
174
176
  - Design residual either absent with evidence or explicitly handed to `/ark-explore`.
175
177
 
@@ -5,8 +5,9 @@ description: Explain this project's architecture in plain language and generate
5
5
 
6
6
  # /ark-explain — Understand this project's architecture
7
7
 
8
- **Shortcut.** Teach / HTML tour only. Map **`/ark-explore`**. Apply → **`/ark-autopilot`**.
9
- Session 0 → **`/ark-adopt`**.
8
+ **Not a first-run door.** Teach / HTML tour only. Session 0 → **`/ark-adopt`**.
9
+ Map **`/ark-explore`**. Apply → **`/ark-autopilot`**.
10
+ Do not send the user to leftover `/ark-contract` or `/ark-fix`.
10
11
 
11
12
  The user wants to understand the architecture, a specific rule, or why the gate blocked them.
12
13
 
@@ -5,6 +5,15 @@ description: Map skill — decision-grade recon of layers + ArkRules opportuniti
5
5
 
6
6
  # /ark-explore — Recon the real project (map only)
7
7
 
8
+ **When:** you need a map, or leftover design work remains after imports look green.
9
+ **Not when:** the user wants edits applied (`/ark-autopilot`) or session 0 (`/ark-adopt`).
10
+
11
+ ## Steps
12
+
13
+ 1. Read `arkgate-check --doctor`.
14
+ 2. Open the real tree (≥12 files across ≥4 dirs). CLI JSON alone is incomplete.
15
+ 3. Rank leftover work. Hand off to `/ark-autopilot` to apply one refactor. Do not write config or product code here.
16
+
8
17
  ## Autonomy contract
9
18
 
10
19
  Invoking this skill **is** the approval to **map**. Open the real tree. CLI JSON alone is
@@ -308,7 +317,7 @@ Prefer bets the user can run next (`command` / skill), not vague “improve DX
308
317
  | **Stabilize** | ENFORCE + honest baseline only for real debt | 0 new edges; doctor not lying about write path/CI |
309
318
  | **Shape** | One **golden** pattern + pilot cluster | Pilot smells cleared; rest is migrate-on-touch; B bets have success signals |
310
319
 
311
- ENFORCE without Shape progress is **`ENFORCE · design-weak`** — say that out loud. It is **not** “healthy finished.”
320
+ ENFORCE without Shape progress is leftover design work — say that out loud. It is **not** “healthy finished.”
312
321
 
313
322
  **Agent-detected design smells** (list any that apply; paths required — these may predate doctor IDs):
314
323
 
@@ -374,16 +383,16 @@ and the ranked **`pilotLoop.nextPilot`**.
374
383
 
375
384
  State **Mode: recon | dual-plan seed | shape-focus** and **Phase: Align | Stabilize | Shape** in the first lines.
376
385
 
377
- 1. **Headline** — product one sentence + honesty (mode, governed%, false-green / semantic false-green / **ENFORCE·design-weak** / false-promise risk). ENFORCE is context, not the story.
386
+ 1. **Headline** — product one sentence + honesty (mode, governed%, false-green / leftover design work / false-promise risk). ENFORCE is context, not the story.
378
387
  2. **Map** — entry points, major dirs, shape name (or “no honest shape yet”). One screen. **Patterns concurrent** table when §B/§G requires it.
379
388
  3. **What I opened** — paths + sensors (include field/hook/origin when used).
380
389
  4. **Ranked table** — **only rows that change a decision**. Prefer **3–6** hard rows.
381
390
 
382
- | # | Kind | Finding | Evidence (path) | Así te lo re-soluciono | Success signal | Next skill / command |
391
+ | # | Kind | Finding | Evidence (path) | How to fix | Success signal | Next skill / command |
383
392
 
384
393
  Kinds: `risk` | `false-green` | `debt` | `opportunity` | `shape` | `manifiesto` | `agent-dx` | `design-weak`
385
394
 
386
- **Así te lo re-soluciono** must be concrete: files to touch, command to run.
395
+ **How to fix** must be concrete: files to touch, command to run.
387
396
  **Success signal** must be falsifiable (see §F).
388
397
 
389
398
  5. **Field path summary**.
@@ -5,7 +5,7 @@ description: Shortcut to /ark-autopilot for a small violation cluster. Deprecate
5
5
 
6
6
  # /ark-fix — Shortcut to /ark-autopilot
7
7
 
8
- **Deprecated as a first-class door.** Gate violations and judgment remediations are
8
+ **Not a first-run door.** This leftover name is a shortcut. Gate violations are
9
9
  **`/ark-autopilot`**. Do that job now. CLI only validates.
10
10
 
11
11
  ## Autonomy contract
@@ -5,7 +5,7 @@ description: Shortcut to /ark-autopilot for driving plan A to zero. Deprecated a
5
5
 
6
6
  # /ark-loop — Shortcut to /ark-autopilot
7
7
 
8
- **Deprecated as a first-class door.** Driving `--plan` to `goal.met` is **`/ark-autopilot`**.
8
+ **Not a first-run door.** This leftover name is a shortcut. Driving `--plan` to `goal.met` is **`/ark-autopilot`**.
9
9
  Do that job now. Auto-apply only the four `mechanical-safe` kinds; judgment you write.
10
10
 
11
11
  ## Autonomy contract
@@ -5,6 +5,15 @@ description: "Where does new code go? Names the layer, directory, and naming for
5
5
 
6
6
  # /ark-place — Where does this code go?
7
7
 
8
+ **When:** you are adding a new file or artifact and need the layer, folder, and name.
9
+ **Not when:** session 0 / config is missing or lying (`/ark-adopt`) or an existing violation cluster (`/ark-autopilot`).
10
+
11
+ ## Steps
12
+
13
+ 1. Bind identity if using MCP (`ark_identity` with the exact project root).
14
+ 2. Place the file (`ark_place` or read `ark.config.json`).
15
+ 3. Write it there. Then `arkgate-check`.
16
+
8
17
  ## Autonomy contract
9
18
 
10
19
  Invoking this skill **is** the approval. If the user described an artifact, **write the
@@ -155,7 +164,7 @@ the same files or weaken the gate.
155
164
 
156
165
  - If the user needs bulk adoption / wrong config, not a single artifact: **STOP — do not continue this skill as complete.** Switch to **`/ark-adopt`** (write the path) instead of ad-hoc multi-file grinding without a plan.
157
166
  - If the config lacks a home for the artifact: add the layer **in this turn**, then write the file.
158
- - If doctor is **ENFORCE · design-weak** and the user is asking to reshape existing structure
167
+ - If doctor shows leftover design work and the user is asking to reshape existing structure
159
168
  (not place one new artifact): place only the new file under the golden/contract home, then
160
169
  hand off **one** pilot via `pilotLoop.nextPilot` / `/ark-explore` shape-focus — never multi-pilot
161
170
  batch reshape from this skill.
@@ -5,8 +5,9 @@ description: Host-side architectural reasoning — 2–3 enforceable options on
5
5
 
6
6
  # /ark-think — Architectural reasoning (host LLM only)
7
7
 
8
- **Shortcut.** One decision only. Full map → **`/ark-explore`**. Apply → **`/ark-autopilot`**.
9
- Session 0 → **`/ark-adopt`**.
8
+ **Not a first-run door.** One decision only. Session 0 → **`/ark-adopt`**.
9
+ Full map → **`/ark-explore`**. Apply → **`/ark-autopilot`**.
10
+ Do not send the user to leftover `/ark-contract` or `/ark-fix`.
10
11
 
11
12
  You are the user's architecture thinking partner **inside** the project's Ark contract.
12
13
  This skill does **not** call any LLM API from the arkgate package. **You** (the host agent)
@@ -5,9 +5,16 @@ description: Upgrade ArkGate through a content-identity preview, preserve custom
5
5
 
6
6
  # /ark-upgrade — managed ArkGate upgrade
7
7
 
8
- Upgrade the published `arkgate` package and its managed gates without treating a
9
- filename, package version, or similar-looking file as proof of ownership. The
10
- preview is the source of truth: inspect it before applying anything.
8
+ **When:** bump the published `arkgate` package and refresh managed gates.
9
+ **Not when:** session 0 (`/ark-adopt`) or leftover design (`/ark-explore`).
10
+
11
+ ## Steps
12
+
13
+ 1. Preview: `arkgate upgrade` (no writes).
14
+ 2. Apply in this turn: `arkgate upgrade --apply` (needs `--plan-digest` when applying managed files).
15
+ 3. Re-run `arkgate-check --doctor`. Customized files stay unless you pass `--accept-conflicts` / `--refresh-skills`.
16
+
17
+ The preview is the source of truth. Do not treat a filename or package version as proof of ownership.
11
18
 
12
19
  ## Autonomy contract
13
20