arkgate 4.5.5 → 4.5.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/docs/README.md CHANGED
@@ -53,13 +53,12 @@ These are **not** the day-to-day product path. They stay in the repo for evidenc
53
53
  | Area | Path |
54
54
  |------|------|
55
55
  | Release notes (by version) | [releases/](releases/) · [CHANGELOG.md](../CHANGELOG.md) |
56
- | Epic plans (seeded + shipped) | [plans/](plans/) — maintainer seeds (e.g. deep-module coach post-4.5 **implemented, not published**; domain fitness & session truth for **4.5.0**; improvement compass for **4.4.0**; agent contract surface for **4.3.0**). Product how-to stays in use/develop/agent-guide; plans are not required reading to use the package. |
56
+ | Epic plans (seeded + shipped) | [plans/](plans/) — maintainer seeds (e.g. [field-upgrade-mcp-truth](plans/field-upgrade-mcp-truth/README.md) **in progress → 4.5.6 prepared**; deep-module coach **shipped in 4.5.5**; domain fitness & session truth for **4.5.0**; improvement compass for **4.4.0**; agent contract surface for **4.3.0**). Product how-to stays in use/develop/agent-guide; plans are not required reading to use the package. |
57
57
  | Claims audit | [audit/claims-matrix.md](audit/claims-matrix.md) |
58
58
  | Field adoption kit (scaffolding, not closed) | [field/](field/) |
59
59
  | Runtime hardening (experimental) | [production-hardening.md](production-hardening.md) |
60
60
 
61
- Current published: [releases/4.5.0.md](releases/4.5.0.md) (`arkgate@4.5.0` on npm `latest`).
62
- Prepared next: [releases/4.5.5.md](releases/4.5.5.md) (`arkgate@4.5.5` — not on `latest` until publish).
61
+ Current published: [releases/4.5.5.md](releases/4.5.5.md) (`arkgate@4.5.5` on npm `latest`).
63
62
  Prior: [releases/4.4.0.md](releases/4.4.0.md) (`arkgate@4.4.0`).
64
63
  Previous: [releases/4.3.0.md](releases/4.3.0.md) · [releases/4.2.1.md](releases/4.2.1.md) · [releases/4.2.0.md](releases/4.2.0.md) · [releases/4.1.1.md](releases/4.1.1.md).
65
64
  Previous major: [releases/4.0.0.md](releases/4.0.0.md) (`arkgate@4.0.0`).
@@ -83,6 +83,27 @@ npx ark-check --doctor --json
83
83
 
84
84
  Product path: [use.md — Session recipe](use.md#session-recipe-agent-turn).
85
85
 
86
+ ### Multi-project MCP and upgrade honesty (4.5.6)
87
+
88
+ One human often has **N checkouts** and **N package pins**. Product rules:
89
+
90
+ | Rule | Why |
91
+ |------|-----|
92
+ | One checkout = one `project.expectedRoot` | Identity (WI01) fail-closes cross-project evidence when used correctly |
93
+ | After `npm install arkgate@…`, restart/retarget Ark MCP | Process `arkgateVersion` is startup-loaded; long-lived MCP can lag install |
94
+ | Read `processPackage` on every tool response | `processPackageMismatch` / `processStale` + `nextAction` when process ≠ project install |
95
+ | Prefer project-local CLI until versions align | CLI always available; MCP analysis is not “fully current” while process is stale |
96
+ | Upgrade each package that pins arkgate | Monorepo “done” is not one package’s pin |
97
+ | Registry-aware `ark upgrade --apply` | Does not false-skip when CLI == pin but registry is ahead; skip JSON has `reasonCode` + `suggestedInstallCmd` |
98
+ | Skills: `skillDrift` + optional `--refresh-skills` | Customized skill bodies stay preserved unless you opt in; never silent overwrite of true edits |
99
+
100
+ ```bash
101
+ npx arkgate upgrade --json # skillDrift, whatsNew, hostSelection
102
+ npx arkgate upgrade --apply # registry-aware package step, then re-preview
103
+ # digest-bound apply + optional skill refresh:
104
+ npx arkgate upgrade --apply --no-install --plan-digest sha256:… --refresh-skills
105
+ ```
106
+
86
107
  ### Two-axis done recipe
87
108
 
88
109
  Architecture residual and feature residual are **separate axes**. Never collapse them:
@@ -20,7 +20,9 @@ hardening guide remains repository-hosted rather than duplicated in the gate tar
20
20
  | **Programmatic gate API** | `import { analyzeProject, loadContract, createAICodeGate, ... } from 'arkgate'` | The root export is the static gate/config/analysis contract listed below. It intentionally contains no runtime-kernel implementation. |
21
21
  | **Improvement compass (4.4; status honesty 4.5)** | `ark-check --doctor --json` → `doctor.improvementCompass`; human doctor section **Improvement compass (not a score)**; HTML report `data-advisory="improvementCompass"`. **`ark status --json` / MCP `ark_status`** project a thin `improvementCompass` residual map with explicit honesty **`mode`**: `full` \| `subset` \| `unavailable` (always `notAScore: true`). When `mode` is `full`, status residual lens **ids** are a **subset of** doctor residual for the same facts (report snapshot stores the thin slice after `--report`). Incomplete or missing session facts → `subset` / `unavailable` + `reasonCode` / `reason` — **never invent green residual**. Residual never flips `valid` / strict-merge / `goal.met`. When status mode ≠ full, run doctor for full 15-lens detail. | Additive schema `1.0`. Closed **15** lens ids (`soc`, `cohesion`, `coupling`, `srp`, `dip`, `ocp`, `encapsulation`, `modularity`, `scalability`, `resilience`, `security`, `maintainability`, `testability`, `domain`, `stack`) with status `ok` \| `residual` \| `not-instrumented` \| `out-of-scope`, evidence refs, optional `nextAction`, capped `topResidual`, always **`notAScore: true`**. Projection from existing smells / walls / cohesion / ArkRules / design-weak only — **never** a gate input. Out-of-scope locked for scalability, resilience, and app security (no residual invent from missing SAST/APM). Root API: `buildImprovementCompass` / `IMPROVEMENT_LENS_IDS`; status: `projectStatusImprovementCompass` / `STATUS_COMPASS_MODES`. |
22
22
  | **Deep-module coach (post-4.5 advisory)** | `ark-check --doctor --json` → `doctor.deepModuleCoach`; human doctor section **Deep-module coach (advisory — not a score)** always when doctor runs (empty candidates / hot-path `unavailable` are honesty, not omission); HTML `data-advisory="deepModuleCoach"`. | Additive schema `1.0`. Always **`notAScore: true`**. **`hotPaths`**: recent-churn heuristic from bounded git log; `available` + `status` `ok` \| `unavailable`; empty `paths` when history missing/incomplete — **never invent**. **`deepeningCandidates`**: cards projected only from existing design smells / physical cohesion / reshape pilot / pilotLoop / residual compass lenses — **empty when no evidence** (no fake candidates). Never flips `valid`, strict-merge, completeness green, or `goal.met`. Prefer deep modules / named seams / test-at-public-interface process language in skills. Domain pure + CLI gen mirror (`deepeningCoach.ts` / `bin/lib/deepening-coach.mjs`); **not** a root package export — consume via `doctor.deepModuleCoach` (or the gen mirror in Tooling). |
23
- | **Upgrade what’s new (4.5.5)** | `ark upgrade --json` → `whatsNew` (+ human **Suggested improvements** block). | Always **`notAScore: true`**, **`neverGateInput: true`**. Closed try/inspect list: deep-module coach, improvement compass, session/status honesty, two-axis done, self-service honesty. Never invents residual or flips gates. |
23
+ | **Upgrade what’s new (4.5.5+)** | `ark upgrade --json` → `whatsNew` (+ human **Suggested improvements** block; also on preview). | Always **`notAScore: true`**, **`neverGateInput: true`**. Closed try/inspect list: deep-module coach, improvement compass, session/status honesty, two-axis done, self-service honesty, registry-aware upgrade, skill drift/refresh, multi-project MCP. Never invents residual or flips gates. |
24
+ | **Field upgrade truth (4.5.6)** | `ark upgrade` registry-aware install; JSON `reasonCode` / `suggestedInstallCmd`; `skillDrift`; `--refresh-skills`; `postUpgradeChecks`; `hostSelection`. | No false-skip when registry ahead; offline honesty; customized skills preserved unless opt-in refresh; checks are advisory only. |
25
+ | **MCP process package honesty (4.5.6)** | Every MCP tool context → `processPackage` (`processPackageMismatch` / `processStale`, versions, `nextAction`). | Multi-checkout users: restart MCP after pin bump; prefer project-local CLI until identity matched and versions align. Fail-closed identity (WI01) unchanged. |
24
26
  | **Doctor design fitness** | `ark-check --doctor --json` → `doctor.designFitness`, `doctor.designSmells[]` | Additive. Stable smell `id`s: `io-under-application`, `handler-in-persistence`, `god-module`, `domain-logic-in-ui`, `facade-sql-in-routes`, `mixed-pattern-cluster`, `soft-contract`. `handler-in-persistence` covers static ES imports/re-exports of framework HTTP surfaces (`next/server`), `defineRoute` calls, and existing handler bodies inside Persistence-role layers or specific persistence paths; `require()` and dynamic `import()` are outside this narrow advisory, and a generic `Infrastructure` role alone is not Persistence. Persistence candidates are filtered and sorted before the bounded content scan so large application prefixes cannot hide the advisory. The detector inspects the first 800 sorted Persistence candidates; later candidates are uninspected, so **absence of a smell is not full-tree proof** above that envelope (incomplete/`partial` analysis also never proves “no smells”). **4.2 feedback hardening:** mode labels preserve the observed SUGGEST/ADAPT/ENFORCE state; a local permission/UI-state `canEdit` name alone is not a domain smell; real UI business rules route Domain → Application → UI; seed/fixture/demo/migration/generated files are not god-module pilots. Each smell has `evidence[]`, `fix`, technical `message`, and plain-language **`outcome`**. Does **not** fail the gate by itself. |
25
27
  | **Post-green Shape door** | `doctor.postGreenPath`, `doctor.primaryNextAction`, `doctor.healthyFinishedForbidden` | Additive when `designFitness.designWeak`. Single Shape door (`id: clarify-for-ai`): explore shape-focus → dual-plan B → autopilot only with OK. Never empty plan A = healthy finished. |
26
28
  | **Golden pattern (new code)** | Optional `.ark/golden-pattern.json`; doctor JSON `doctor.goldenPattern`; MCP `ark_place` / `ark_prepare_write` → `goldenPattern` | Additive, **advisory for NEW code only**. Required fields: `name`, `norm`; optional `newCodeHome`, `examplePath`, `schemaVersion`. **Absent is normal** (no claim). Never ENFORCE; never clears design-weak. Malformed → `invalid: true`, not silent guidance. |
@@ -207,8 +209,8 @@ production deployment would need to satisfy; it is not a readiness certification
207
209
  ## Release notes (maintainers)
208
210
 
209
211
  Ship notes for a version live under [releases/](https://github.com/pedroknigge/arkgate/tree/main/docs/releases)
210
- (current published: [4.5.0.md](https://github.com/pedroknigge/arkgate/blob/main/docs/releases/4.5.0.md); prepared: [4.5.5.md](https://github.com/pedroknigge/arkgate/blob/main/docs/releases/4.5.5.md);
211
- prior published: [4.4.0.md](https://github.com/pedroknigge/arkgate/blob/main/docs/releases/4.4.0.md), [4.3.0.md](https://github.com/pedroknigge/arkgate/blob/main/docs/releases/4.3.0.md),
212
+ (current published: [4.5.5.md](https://github.com/pedroknigge/arkgate/blob/main/docs/releases/4.5.5.md);
213
+ prior published: [4.5.0.md](https://github.com/pedroknigge/arkgate/blob/main/docs/releases/4.5.0.md), [4.4.0.md](https://github.com/pedroknigge/arkgate/blob/main/docs/releases/4.4.0.md), [4.3.0.md](https://github.com/pedroknigge/arkgate/blob/main/docs/releases/4.3.0.md),
212
214
  [4.2.1.md](https://github.com/pedroknigge/arkgate/blob/main/docs/releases/4.2.1.md);
213
215
  previous: [4.2.0.md](https://github.com/pedroknigge/arkgate/blob/main/docs/releases/4.2.0.md),
214
216
  [4.1.1.md](https://github.com/pedroknigge/arkgate/blob/main/docs/releases/4.1.1.md),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "arkgate",
3
- "version": "4.5.5",
3
+ "version": "4.5.6",
4
4
  "description": "ArkGate — architecture co-pilot for AI TypeScript (write gate, CI gate, plan/loop; optional ArkRules)",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
package/server.json CHANGED
@@ -6,12 +6,12 @@
6
6
  "url": "https://github.com/pedroknigge/arkgate",
7
7
  "source": "github"
8
8
  },
9
- "version": "4.5.5",
9
+ "version": "4.5.6",
10
10
  "packages": [
11
11
  {
12
12
  "registryType": "npm",
13
13
  "identifier": "arkgate",
14
- "version": "4.5.5",
14
+ "version": "4.5.6",
15
15
  "runtimeHint": "npx",
16
16
  "transport": {
17
17
  "type": "stdio"
@@ -7,7 +7,7 @@
7
7
  This directory is the **Agent Skills–compatible** packaging of the same **13**
8
8
  `/ark-*` skills shipped as flat templates for Ark install. **No new skill names.**
9
9
 
10
- Package version when last generated context: **arkgate@4.5.0**
10
+ Package version when last generated context: **arkgate@4.5.6**
11
11
  Schema: agent-skills package contract `1.0`
12
12
 
13
13
  ## Skills (frozen catalog)
@@ -35,16 +35,34 @@ patterns are **out-of-scope** lenses — say so; do not invent Ark enforcement f
35
35
  ## Suggested improvements (what to try next)
36
36
 
37
37
  After `ark upgrade` (preview or apply), read JSON **`whatsNew`** or the human **Suggested improvements**
38
- block. It lists concrete try/inspect actions for this package line (advisory only — not a score):
38
+ block (also on preview when nothing to apply). It lists concrete try/inspect actions for this package
39
+ line (advisory only — not a score):
39
40
 
40
41
  1. **Deep-module coach** — `ark-check --doctor` → `doctor.deepModuleCoach` (hot paths + deepening)
41
42
  2. **Improvement compass** — residual lenses on doctor/HTML (not a score)
42
43
  3. **Session recipe** — `ark status --json` honesty modes; doctor when mode is not full
43
44
  4. **Two-axis done** — architecture residual vs feature/ticket residual (Enforce green ≠ feature done)
44
45
  5. **Self-service honesty** — upgrade `selfService` write-path labels + customized preserve
46
+ 6. **Registry-aware upgrade** — `reasonCode` / `suggestedInstallCmd` when package install is skipped or needed
47
+ 7. **Skill drift + refresh** — `skillDrift`; opt-in `--refresh-skills` for customized skill rewrite
48
+ 8. **Multi-project MCP** — `processPackage` mismatch/stale on every MCP tool; restart after package bump
45
49
 
46
50
  Never invent gate verdicts from these suggestions. Missing residual is honest empty, not green.
47
51
 
52
+ ## Field truth (package install + skills + multi-project MCP)
53
+
54
+ | Situation | Honest product behavior |
55
+ |-----------|-------------------------|
56
+ | CLI version == `node_modules` but npm registry is ahead | `--apply` **installs** (does not false-skip). Inspect `reasonCode: BEHIND_REGISTRY`. |
57
+ | Offline / `npm view` failed | May skip with `REGISTRY_UNAVAILABLE` + `suggestedInstallCmd` — do not invent a version. |
58
+ | Skills customized after install | Preserved by default. Preview `skillDrift` shows counts. **`--refresh-skills`** rewrites customized *skills* only with consent. |
59
+ | Conflicted managed assets | Still need `--accept-conflicts`. Never silent overwrite of true edits. |
60
+ | Multiple checkouts / monorepo packages | One `expectedRoot` per project; upgrade **each** pin; restart MCP after bump; prefer project-local CLI until identity matched **and** process version aligns. |
61
+ | Active host not in `--tools` / manifest | Preview `hostSelection` notes it and suggests `--tools` expansion. |
62
+
63
+ **Post-apply:** read `postUpgradeChecks` (advisory). Confirm pin↔CLI, run doctor (compass + deepModuleCoach),
64
+ `agents-md --check`, `ark status --json`, and MCP version note if MCP was used.
65
+
48
66
 
49
67
  ## Dual engine (mandatory)
50
68
 
@@ -62,6 +80,11 @@ retain `projectIdentity.projectId`, then pass both `expectedRoot` and `expectedP
62
80
  uncertain, do not consume MCP analysis: use the workspace-local CLI and report that MCP
63
81
  restart/retargeting is required. `ark://manifest` never satisfies this preflight.
64
82
 
83
+ **Process package honesty:** every tool response includes `processPackage` (`processArkgateVersion`,
84
+ `projectInstalledVersion`, `processPackageMismatch` / `processStale`, `nextAction`). After
85
+ `npm install arkgate@…`, **restart/retarget MCP** so process version matches install. Until then,
86
+ prefer project-local CLI and do not treat MCP analysis as fully current.
87
+
65
88
  ## Dual plane — layers + ArkRules (mandatory, except /ark-runtime)
66
89
 
67
90
  ArkGate has **two opt-in planes**. The user chooses which to use; you **always label** findings so they never blur.
@@ -111,8 +134,8 @@ ArkGate has **two opt-in planes**. The user chooses which to use; you **always l
111
134
  | `current` | Content identity matches the candidate. | Record/adopt safely; metadata-only stamps may refresh. |
112
135
  | `stale` | Recorded managed content still matches its old identity. | Safe candidate replacement. |
113
136
  | `missing` | Candidate is absent. | Create if new; require consent if a recorded asset was deleted. |
114
- | `customized` | User content diverged without a competing managed base. | Preserve it. |
115
- | `conflicted` | Both managed base and user content diverged. | Preserve and require explicit consent. |
137
+ | `customized` | User content diverged without a competing managed base. | Preserve it. Opt-in rewrite for **skills only**: `--refresh-skills`. |
138
+ | `conflicted` | Both managed base and user content diverged. | Preserve and require explicit consent (`--accept-conflicts`). |
116
139
  | `retired` | A recorded asset is no longer selected by the candidate. | Preserve its file and manifest identity; take no action. |
117
140
 
118
141
  ## Procedure
@@ -172,16 +195,18 @@ ArkGate has **two opt-in planes**. The user chooses which to use; you **always l
172
195
  that customized files remain non-applying and that any deletion/conflict is
173
196
  blocked.
174
197
 
175
- 3. **Update and re-preview.** If the registry is newer, run (project-local CLI):
198
+ 3. **Update and re-preview.** If the registry is newer **or** CLI == pin but registry is ahead
199
+ (field false-skip is fixed), run (project-local CLI):
176
200
 
177
201
  ```bash
178
202
  npx arkgate upgrade --apply
179
203
  ```
180
204
 
181
- This updates through the detected package manager and hands control to the new
182
- package for a fresh preview. Review that new preview; do not assume the old
183
- candidate and new candidate are identical. If already on the latest package,
184
- retain the current read-only preview.
205
+ This updates through the detected package manager (registry-aware) and hands control to the new
206
+ package for a fresh preview. On skip, read `reasonCode` / `suggestedInstallCmd` agents must not
207
+ invent recovery. Review the new preview; do not assume old and new candidates are identical.
208
+ If already current (`ALREADY_CURRENT`), retain the read-only preview and still read `whatsNew`
209
+ + `skillDrift`.
185
210
 
186
211
  For pnpm repositories with `minimumReleaseAge`, use the repository's existing
187
212
  trusted first-party exception mechanism when the new release is still cooling
@@ -199,18 +224,25 @@ ArkGate has **two opt-in planes**. The user chooses which to use; you **always l
199
224
  ```
200
225
 
201
226
  If recorded deletion/conflict recovery is desired, ask first and then add
202
- `--accept-conflicts`. Never add it merely to make the run green. Run a second
203
- preview and require `summary.changed: 0`.
227
+ `--accept-conflicts`. Never add it merely to make the run green.
228
+
229
+ If customized **skills** should match package templates after pin bump, ask first and add
230
+ `--refresh-skills` on the digest-bound apply (or a new preview that includes the flag). Never
231
+ add it merely to make the run green. Run a second preview and require `summary.changed: 0`
232
+ (unless more deliberate refreshes remain).
204
233
 
205
- 5. **Verify enforcement and architecture.** Run
234
+ 5. **Verify enforcement and architecture (post-upgrade checks).** Read apply JSON
235
+ `postUpgradeChecks` when present. Also run:
206
236
  `npx arkgate-check --doctor --json` (or the project-local `ark-check`) and
207
237
  the same fail-closed architecture command used by managed apply (normally
208
238
  `npx arkgate-check --root . --config ark.config.json --strict-merge --json`).
209
- Require `completeness: "complete"` and `ok: true`. Treat provider-unavailable CI
210
- required-check evidence as `unverified`, never as proof that merges are
211
- blocked. If new violations appear, hand off to `/ark-fix` for a small set or
212
- `/ark-loop` / `/ark-autopilot` for residual debt; do not regenerate a baseline
213
- without explicit approval.
239
+ Require `completeness: "complete"` and `ok: true`. Confirm `doctor.improvementCompass` and
240
+ `doctor.deepModuleCoach` honesty. Run `npx arkgate agents-md --check` and
241
+ `npx arkgate status --json`. If MCP was used, restart MCP after package bump and re-bind
242
+ identity. Treat provider-unavailable CI required-check evidence as `unverified`, never as proof
243
+ that merges are blocked. If new violations appear, hand off to `/ark-fix` for a small set or
244
+ `/ark-loop` / `/ark-autopilot` for residual debt; do not regenerate a baseline without explicit
245
+ approval.
214
246
 
215
247
  ## Active host vs deferred hosts
216
248
 
@@ -35,16 +35,34 @@ patterns are **out-of-scope** lenses — say so; do not invent Ark enforcement f
35
35
  ## Suggested improvements (what to try next)
36
36
 
37
37
  After `ark upgrade` (preview or apply), read JSON **`whatsNew`** or the human **Suggested improvements**
38
- block. It lists concrete try/inspect actions for this package line (advisory only — not a score):
38
+ block (also on preview when nothing to apply). It lists concrete try/inspect actions for this package
39
+ line (advisory only — not a score):
39
40
 
40
41
  1. **Deep-module coach** — `ark-check --doctor` → `doctor.deepModuleCoach` (hot paths + deepening)
41
42
  2. **Improvement compass** — residual lenses on doctor/HTML (not a score)
42
43
  3. **Session recipe** — `ark status --json` honesty modes; doctor when mode is not full
43
44
  4. **Two-axis done** — architecture residual vs feature/ticket residual (Enforce green ≠ feature done)
44
45
  5. **Self-service honesty** — upgrade `selfService` write-path labels + customized preserve
46
+ 6. **Registry-aware upgrade** — `reasonCode` / `suggestedInstallCmd` when package install is skipped or needed
47
+ 7. **Skill drift + refresh** — `skillDrift`; opt-in `--refresh-skills` for customized skill rewrite
48
+ 8. **Multi-project MCP** — `processPackage` mismatch/stale on every MCP tool; restart after package bump
45
49
 
46
50
  Never invent gate verdicts from these suggestions. Missing residual is honest empty, not green.
47
51
 
52
+ ## Field truth (package install + skills + multi-project MCP)
53
+
54
+ | Situation | Honest product behavior |
55
+ |-----------|-------------------------|
56
+ | CLI version == `node_modules` but npm registry is ahead | `--apply` **installs** (does not false-skip). Inspect `reasonCode: BEHIND_REGISTRY`. |
57
+ | Offline / `npm view` failed | May skip with `REGISTRY_UNAVAILABLE` + `suggestedInstallCmd` — do not invent a version. |
58
+ | Skills customized after install | Preserved by default. Preview `skillDrift` shows counts. **`--refresh-skills`** rewrites customized *skills* only with consent. |
59
+ | Conflicted managed assets | Still need `--accept-conflicts`. Never silent overwrite of true edits. |
60
+ | Multiple checkouts / monorepo packages | One `expectedRoot` per project; upgrade **each** pin; restart MCP after bump; prefer project-local CLI until identity matched **and** process version aligns. |
61
+ | Active host not in `--tools` / manifest | Preview `hostSelection` notes it and suggests `--tools` expansion. |
62
+
63
+ **Post-apply:** read `postUpgradeChecks` (advisory). Confirm pin↔CLI, run doctor (compass + deepModuleCoach),
64
+ `agents-md --check`, `ark status --json`, and MCP version note if MCP was used.
65
+
48
66
 
49
67
  ## Dual engine (mandatory)
50
68
 
@@ -62,6 +80,11 @@ retain `projectIdentity.projectId`, then pass both `expectedRoot` and `expectedP
62
80
  uncertain, do not consume MCP analysis: use the workspace-local CLI and report that MCP
63
81
  restart/retargeting is required. `ark://manifest` never satisfies this preflight.
64
82
 
83
+ **Process package honesty:** every tool response includes `processPackage` (`processArkgateVersion`,
84
+ `projectInstalledVersion`, `processPackageMismatch` / `processStale`, `nextAction`). After
85
+ `npm install arkgate@…`, **restart/retarget MCP** so process version matches install. Until then,
86
+ prefer project-local CLI and do not treat MCP analysis as fully current.
87
+
65
88
  ## Dual plane — layers + ArkRules (mandatory, except /ark-runtime)
66
89
 
67
90
  ArkGate has **two opt-in planes**. The user chooses which to use; you **always label** findings so they never blur.
@@ -111,8 +134,8 @@ ArkGate has **two opt-in planes**. The user chooses which to use; you **always l
111
134
  | `current` | Content identity matches the candidate. | Record/adopt safely; metadata-only stamps may refresh. |
112
135
  | `stale` | Recorded managed content still matches its old identity. | Safe candidate replacement. |
113
136
  | `missing` | Candidate is absent. | Create if new; require consent if a recorded asset was deleted. |
114
- | `customized` | User content diverged without a competing managed base. | Preserve it. |
115
- | `conflicted` | Both managed base and user content diverged. | Preserve and require explicit consent. |
137
+ | `customized` | User content diverged without a competing managed base. | Preserve it. Opt-in rewrite for **skills only**: `--refresh-skills`. |
138
+ | `conflicted` | Both managed base and user content diverged. | Preserve and require explicit consent (`--accept-conflicts`). |
116
139
  | `retired` | A recorded asset is no longer selected by the candidate. | Preserve its file and manifest identity; take no action. |
117
140
 
118
141
  ## Procedure
@@ -172,16 +195,18 @@ ArkGate has **two opt-in planes**. The user chooses which to use; you **always l
172
195
  that customized files remain non-applying and that any deletion/conflict is
173
196
  blocked.
174
197
 
175
- 3. **Update and re-preview.** If the registry is newer, run (project-local CLI):
198
+ 3. **Update and re-preview.** If the registry is newer **or** CLI == pin but registry is ahead
199
+ (field false-skip is fixed), run (project-local CLI):
176
200
 
177
201
  ```bash
178
202
  npx arkgate upgrade --apply
179
203
  ```
180
204
 
181
- This updates through the detected package manager and hands control to the new
182
- package for a fresh preview. Review that new preview; do not assume the old
183
- candidate and new candidate are identical. If already on the latest package,
184
- retain the current read-only preview.
205
+ This updates through the detected package manager (registry-aware) and hands control to the new
206
+ package for a fresh preview. On skip, read `reasonCode` / `suggestedInstallCmd` agents must not
207
+ invent recovery. Review the new preview; do not assume old and new candidates are identical.
208
+ If already current (`ALREADY_CURRENT`), retain the read-only preview and still read `whatsNew`
209
+ + `skillDrift`.
185
210
 
186
211
  For pnpm repositories with `minimumReleaseAge`, use the repository's existing
187
212
  trusted first-party exception mechanism when the new release is still cooling
@@ -199,18 +224,25 @@ ArkGate has **two opt-in planes**. The user chooses which to use; you **always l
199
224
  ```
200
225
 
201
226
  If recorded deletion/conflict recovery is desired, ask first and then add
202
- `--accept-conflicts`. Never add it merely to make the run green. Run a second
203
- preview and require `summary.changed: 0`.
227
+ `--accept-conflicts`. Never add it merely to make the run green.
228
+
229
+ If customized **skills** should match package templates after pin bump, ask first and add
230
+ `--refresh-skills` on the digest-bound apply (or a new preview that includes the flag). Never
231
+ add it merely to make the run green. Run a second preview and require `summary.changed: 0`
232
+ (unless more deliberate refreshes remain).
204
233
 
205
- 5. **Verify enforcement and architecture.** Run
234
+ 5. **Verify enforcement and architecture (post-upgrade checks).** Read apply JSON
235
+ `postUpgradeChecks` when present. Also run:
206
236
  `npx arkgate-check --doctor --json` (or the project-local `ark-check`) and
207
237
  the same fail-closed architecture command used by managed apply (normally
208
238
  `npx arkgate-check --root . --config ark.config.json --strict-merge --json`).
209
- Require `completeness: "complete"` and `ok: true`. Treat provider-unavailable CI
210
- required-check evidence as `unverified`, never as proof that merges are
211
- blocked. If new violations appear, hand off to `/ark-fix` for a small set or
212
- `/ark-loop` / `/ark-autopilot` for residual debt; do not regenerate a baseline
213
- without explicit approval.
239
+ Require `completeness: "complete"` and `ok: true`. Confirm `doctor.improvementCompass` and
240
+ `doctor.deepModuleCoach` honesty. Run `npx arkgate agents-md --check` and
241
+ `npx arkgate status --json`. If MCP was used, restart MCP after package bump and re-bind
242
+ identity. Treat provider-unavailable CI required-check evidence as `unverified`, never as proof
243
+ that merges are blocked. If new violations appear, hand off to `/ark-fix` for a small set or
244
+ `/ark-loop` / `/ark-autopilot` for residual debt; do not regenerate a baseline without explicit
245
+ approval.
214
246
 
215
247
  ## Active host vs deferred hosts
216
248