arkgate 4.5.0 → 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.
Files changed (48) hide show
  1. package/CHANGELOG.md +69 -2
  2. package/README.md +5 -4
  3. package/bin/ark-check-runtime.mjs +4 -0
  4. package/bin/ark-mcp-runtime.mjs +49 -0
  5. package/bin/ark-shared.mjs +8 -29
  6. package/bin/ark.mjs +7 -3
  7. package/bin/lib/adapter-contract.mjs +5 -5
  8. package/bin/lib/analysis-engine.mjs +1 -1
  9. package/bin/lib/ci-and-commands.mjs +5 -0
  10. package/bin/lib/deep-module-coach.mjs +177 -0
  11. package/bin/lib/deepening-coach.mjs +177 -0
  12. package/bin/lib/doctor-plan.mjs +14 -0
  13. package/bin/lib/html-report-advisories.mjs +33 -0
  14. package/bin/lib/html-report-depth.mjs +9 -0
  15. package/bin/lib/managed-upgrade.mjs +215 -1
  16. package/bin/lib/remediation.mjs +5 -5
  17. package/bin/lib/rules-inventory.mjs +23 -0
  18. package/bin/lib/upgrade-command.mjs +132 -11
  19. package/bin/lib/upgrade-package-decision.mjs +241 -0
  20. package/bin/lib/upgrade-whats-new.mjs +135 -0
  21. package/dist/eslint/index.cjs +1 -1
  22. package/dist/eslint/index.js +1 -1
  23. package/dist/index.cjs +27 -27
  24. package/dist/index.d.ts +1 -1
  25. package/dist/index.js +29 -29
  26. package/docs/README.md +4 -5
  27. package/docs/agent-guide.md +36 -0
  28. package/docs/brownfield-adoption.md +12 -0
  29. package/docs/package-surface.md +6 -3
  30. package/docs/product-voice.md +21 -0
  31. package/docs/use.md +3 -0
  32. package/package.json +1 -1
  33. package/server.json +2 -2
  34. package/templates/agent-skills/README.md +2 -2
  35. package/templates/agent-skills/ark-adopt/SKILL.md +13 -0
  36. package/templates/agent-skills/ark-explore/SKILL.md +21 -0
  37. package/templates/agent-skills/ark-fix/SKILL.md +7 -0
  38. package/templates/agent-skills/ark-loop/SKILL.md +7 -0
  39. package/templates/agent-skills/ark-place/SKILL.md +7 -0
  40. package/templates/agent-skills/ark-think/SKILL.md +7 -0
  41. package/templates/agent-skills/ark-upgrade/SKILL.md +61 -15
  42. package/templates/skills/ark-adopt.md +13 -0
  43. package/templates/skills/ark-explore.md +21 -0
  44. package/templates/skills/ark-fix.md +7 -0
  45. package/templates/skills/ark-loop.md +7 -0
  46. package/templates/skills/ark-place.md +7 -0
  47. package/templates/skills/ark-think.md +7 -0
  48. package/templates/skills/ark-upgrade.md +61 -15
package/docs/README.md CHANGED
@@ -53,15 +53,14 @@ 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. domain fitness & session truth for **4.5.0** with honesty modes / mandatory domain split / self-service residual, 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.4.0.md](releases/4.4.0.md) (`arkgate@4.4.0` on npm `latest`).
62
- Next prepare: [releases/4.5.0.md](releases/4.5.0.md) (Status: prepared — not on npm until publish verify).
63
- Prior: [releases/4.3.0.md](releases/4.3.0.md) (`arkgate@4.3.0`).
64
- Previous: [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).
61
+ Current published: [releases/4.5.5.md](releases/4.5.5.md) (`arkgate@4.5.5` on npm `latest`).
62
+ Prior: [releases/4.4.0.md](releases/4.4.0.md) (`arkgate@4.4.0`).
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`).
66
65
  Config: [configuration.md](configuration.md) · Agent skills dual-plane: [agent-guide.md](agent-guide.md).
67
66
 
@@ -83,6 +83,42 @@ 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
+
107
+ ### Two-axis done recipe
108
+
109
+ Architecture residual and feature residual are **separate axes**. Never collapse them:
110
+
111
+ | Axis | Where truth lives | Done means |
112
+ |------|-------------------|------------|
113
+ | **1. Architecture residual** | `ark status` / `ark-check --doctor` / improvement compass (scan) | Edges honest under the contract; residual lenses / design-weak addressed or deliberately deferred |
114
+ | **2. Feature / ticket residual** | User brief, PR, tracker (process **outside** the package) | Requested behavior matches acceptance; product QA |
115
+
116
+ **Enforce green ≠ feature done.** Green edges (or quiet residual lenses) only clear axis 1.
117
+ Axis 2 is never a package LLM verdict or second scoreboard — agents and humans judge the ticket.
118
+
119
+ Optional Completion bullet for skills: **Done axes** — architecture residual | feature residual.
120
+ Compact router restates the same rule for day-zero installs.
121
+
86
122
  ### Improvement compass (doctor + status)
87
123
 
88
124
  `ark-check --doctor` (human + `--json`) projects residual architecture work as a closed set of
@@ -9,6 +9,18 @@ The rule underneath all of it: **`ark.config.json` is authoritative.** A green c
9
9
  governs 40% of the tree, or a baseline full of false positives, is worse than no gate — it
10
10
  looks safe. Report the truth, then fix it.
11
11
 
12
+ ### Domain glossary (process only)
13
+
14
+ If the repo already has a product/domain glossary, prefer those terms when naming layers,
15
+ slices, intents, and Shape pilots. Common root names (detect; none required):
16
+
17
+ - `CONTEXT.md`
18
+ - `docs/glossary.md` · `docs/domain.md` · `docs/ubiquitous-language.md` · `docs/CONTEXT.md`
19
+
20
+ Call out glossary language vs lived code when they disagree. **Missing glossary is normal** —
21
+ do not spam warnings and do not invent a glossary file. Glossary content never enforces; the
22
+ gate remains the contract + scan. Skills: `/ark-adopt`, `/ark-explore`.
23
+
12
24
  ## 1. Config — reflect what exists, propose the rest
13
25
 
14
26
  ```bash
@@ -19,6 +19,10 @@ hardening guide remains repository-hosted rather than duplicated in the gate tar
19
19
  | **CLI** | `arkgate` / `arkgate-check` (aliases `ark` / `ark-check`) | Flags and human text may improve; **JSON output shapes** for `--json` (check, doctor, plan, coverage, recommend, **status**, **agents-md**) are stable within a major. Additive fields OK; removals/renames are major. From 4.2, `--require-gates` implies strict config and verifies semantic Ark AGENTS, project-rooted MCP/compact Codex registration, and fail-closed CI rather than file presence alone. `ark status --json` is the unified status snapshot. `ark agents-md` is the version-matched agent projection (non-authoritative). |
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
+ | **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; 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. |
22
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. |
23
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. |
24
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. |
@@ -205,9 +209,8 @@ production deployment would need to satisfy; it is not a readiness certification
205
209
  ## Release notes (maintainers)
206
210
 
207
211
  Ship notes for a version live under [releases/](https://github.com/pedroknigge/arkgate/tree/main/docs/releases)
208
- (current published: [4.4.0.md](https://github.com/pedroknigge/arkgate/blob/main/docs/releases/4.4.0.md);
209
- next prepare: [4.5.0.md](https://github.com/pedroknigge/arkgate/blob/main/docs/releases/4.5.0.md);
210
- prior published: [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),
211
214
  [4.2.1.md](https://github.com/pedroknigge/arkgate/blob/main/docs/releases/4.2.1.md);
212
215
  previous: [4.2.0.md](https://github.com/pedroknigge/arkgate/blob/main/docs/releases/4.2.0.md),
213
216
  [4.1.1.md](https://github.com/pedroknigge/arkgate/blob/main/docs/releases/4.1.1.md),
@@ -106,6 +106,19 @@ Examples:
106
106
  | **out-of-scope lens** | Principle Ark does not instrument (e.g. scalability APM, SAST) — say so; do not invent residual |
107
107
  | **AI-easy architecture** | Small, pure, placeable modules and a golden pattern so the next agent turn stays ordered under the contract |
108
108
  | **self-service upgrade honesty** | After managed upgrade, consumers can see write-path activation labels and customized-content preserve without asking a maintainer |
109
+ | **module** | Anything with a surface callers depend on and an implementation behind it (function, package, slice) — not only a TypeScript `module` keyword |
110
+ | **interface** (product sense) | Everything a caller must know: types, invariants, errors, ordering, config — not only a TypeScript `interface` keyword |
111
+ | **depth** / **deep module** | Much behavior behind a **small interface** (deep) vs interface almost as complex as the body (shallow). Prefer deep modules. **Never** a 0–10 depth score |
112
+ | **seam** | Place where behavior can be swapped or tested without editing callers (port boundary). Name seams when proposing ports/adapters or Shape pilots |
113
+ | **adapter** | Concrete thing that satisfies an interface at a seam |
114
+ | **leverage** | Capability callers get per unit of interface they must learn |
115
+ | **locality** | Change, bugs, and verification concentrate in one place |
116
+ | **deletion test** | Process heuristic before extracting “just for tests”: if you delete the module and complexity *vanishes*, it was mostly pass-through; if complexity *reappears* across many callers, it was earning its keep. One adapter → seam still hypothetical; two real adapters → seam justified |
117
+ | **test at the public interface** | Prefer verifying behavior through the seam’s public surface, not through private pass-through layers or extraction-for-test-only modules |
118
+ | **hot path** (advisory) | Repo-relative path with elevated **recent change volume** (heuristic from git history when available). Advisory residual only — never a gate input; omit or mark unavailable when history is missing |
119
+ | **deepening candidate** (advisory) | Shape residual card projected only from **existing** smells / cohesion / compass evidence — locality/leverage intent; never invents candidates without evidence; never flips the verdict |
120
+ | **domain glossary** | Optional consumer file of product terms (common roots: `CONTEXT.md`, `docs/glossary.md`, `docs/domain.md`, `docs/ubiquitous-language.md`). Prefer terms for layer/slice/pilot naming when present. Missing glossary is normal — no warning spam; never enforces |
121
+ | **two-axis done** | (1) architecture residual via status/doctor/compass (scan); (2) feature/ticket residual outside the package (process). **Enforce green ≠ feature done** |
109
122
 
110
123
  ## Public docs are product-only (from 4.4.0)
111
124
 
@@ -161,6 +174,10 @@ gate → same binary verdict on every parity-capable adapter
161
174
  | Name scan before process | “Scan: two layer import violations. Process: fix the Application→Domain edge first.” |
162
175
  | Label projection non-enforcing | “Regenerated agent contract for this package version. Enforcement remains ark-check / hooks / required CI.” |
163
176
  | Keep status counts honest | “Inventory and residual counts are evidence — not a health score.” |
177
+ | Prefer deep modules | “Small interface, hide the complexity. Name the seam; test at the public interface.” |
178
+ | Apply the deletion test | “If deleting this extract would vanish the complexity, skip the pass-through; if callers re-absorb it, keep the module.” |
179
+ | Two-axis done | “Edges green and residual lenses quiet is architecture residual; ticket acceptance is a separate axis — Enforce green ≠ feature done.” |
180
+ | Glossary when present | “Prefer `CONTEXT.md` / product glossary terms for pilot and layer names; missing glossary is fine.” |
164
181
 
165
182
  ## Avoid
166
183
 
@@ -190,6 +207,10 @@ gate → same binary verdict on every parity-capable adapter
190
207
  | Treating AGENTS.md / projection / skills as the write gate | Advisory surface; hard path is hooks / MCP prepare / required CI |
191
208
  | Free-generated sensor or rule ids outside the catalog | Guardrail catalog is closed; unknown codes are a bug, not creativity |
192
209
  | Numeric “architecture health” or trust score in status JSON | Counts and residuals yes; scored trust no |
210
+ | Depth score / “deepness rank” / Excellent module bands | Depth is vocabulary for process judgment, not a score surface |
211
+ | Extract “just for tests” without a deletion test | Pass-through modules add interface without locality or leverage |
212
+ | Treat hot paths or deepening candidates as gate failures | Advisory residual only; missing git never invents hot paths |
213
+ | Claim feature done solely because Enforce is green | Two-axis done: architecture residual and ticket residual are separate |
193
214
 
194
215
  ---
195
216
 
package/docs/use.md CHANGED
@@ -87,6 +87,9 @@ list: [configuration.md](configuration.md).
87
87
 
88
88
  **Green edges ≠ elegant design.** Empty remediation plan is not “architecture finished” if design residual remains.
89
89
 
90
+ **Two-axis done:** (1) architecture residual via status/doctor/compass; (2) feature/ticket residual
91
+ outside the package. **Enforce green ≠ feature done.**
92
+
90
93
  ---
91
94
 
92
95
  ## When the gate is green but the code is still messy
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "arkgate",
3
- "version": "4.5.0",
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.0",
9
+ "version": "4.5.6",
10
10
  "packages": [
11
11
  {
12
12
  "registryType": "npm",
13
13
  "identifier": "arkgate",
14
- "version": "4.5.0",
14
+ "version": "4.5.6",
15
15
  "runtimeHint": "npx",
16
16
  "transport": {
17
17
  "type": "stdio"
@@ -1,13 +1,13 @@
1
1
  # ArkGate Agent Skills package
2
2
 
3
- > **Generated layout (Agent Skills packaging).** Do not edit SKILL.md files here by hand.
3
+ > **Generated layout (ACS05).** Do not edit SKILL.md files here by hand.
4
4
  > Author skill bodies in `templates/skills/<name>.md`, then run
5
5
  > `npm run generate:agent-skills`. Drift: `npm run check:agent-skills`.
6
6
 
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.3.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)
@@ -31,6 +31,18 @@ patterns are **out-of-scope** lenses — say so; do not invent Ark enforcement f
31
31
 
32
32
  **Spaghetti → honest contract.** SoC/DIP false-green STOP paths in plain language; residual lenses stay Incomplete until mapped.
33
33
 
34
+ ## Domain glossary (process)
35
+
36
+ When present, prefer the consumer **domain glossary** for layer names, slice folders, intent names, and pilot wording:
37
+
38
+ | Detect (no requirement) |
39
+ |-------------------------|
40
+ | `CONTEXT.md`, `docs/glossary.md`, `docs/domain.md`, `docs/ubiquitous-language.md`, `docs/CONTEXT.md` |
41
+
42
+ - Prefer glossary terms over inventing parallel vocabulary.
43
+ - Call out conflicts between glossary language and code reality (process judgment).
44
+ - **Missing glossary is normal** — continue without warning spam. Never treat glossary prose as enforcement.
45
+
34
46
  ## When / not when
35
47
 
36
48
  | Use `/ark-adopt` when… | Do **not** use it when… |
@@ -184,6 +196,7 @@ End with **exactly** these headings (markdown `###`):
184
196
  - **Result:** one-line outcome
185
197
  - **Planes:** one-line split of residual **[Layer]** vs **[ArkRules]** (or `n/a` if unused)
186
198
  - **Compass:** top residual lenses | `n/a`
199
+ - **Done axes:** architecture residual (status/doctor/compass) | feature/ticket residual (outside package). Enforce green ≠ feature done
187
200
  - **Handoff:** `/ark-…` / CLI / `none`
188
201
  - **Incomplete?** `no` | `yes — <what is missing>`
189
202
 
@@ -34,6 +34,26 @@ patterns are **out-of-scope** lenses — say so; do not invent Ark enforcement f
34
34
 
35
35
  **Map residual lenses → dual-plan B seeds.** Plain Align / Stabilize / Shape from compass + design-weak — not a scorecard.
36
36
 
37
+ ## Deep modules (process)
38
+
39
+ - Prefer **deep modules**: small **interface**, complexity hidden behind it (not a depth score).
40
+ - When proposing a port/adapter or Shape pilot, **name the seam** (callers stay stable; behavior swaps behind it). One adapter → seam still hypothetical; two real adapters → seam justified.
41
+ - Apply the **deletion test** before extracting “just for tests”: if deleting the module makes complexity *vanish*, it was pass-through; if complexity *reappears* across callers, it earned its keep.
42
+ - Prefer verification **at the public interface** of the seam (locality/leverage), not private pass-through layers.
43
+ - When doctor surfaces **hot paths** or **deepening candidates**, treat them as advisory residual only — never as a gate fail; bias dual-plan B pilots toward recent churn when listed.
44
+
45
+ ## Domain glossary (process)
46
+
47
+ If the consumer tree has a **domain glossary**, prefer its terms for layer/slice folders, pilot names, and next-action prose:
48
+
49
+ | Common root names (detect, do not require) |
50
+ |--------------------------------------------|
51
+ | `CONTEXT.md`, `docs/glossary.md`, `docs/domain.md`, `docs/ubiquitous-language.md`, `docs/CONTEXT.md` |
52
+
53
+ - Call out **glossary vs code** conflicts when names disagree with lived folders.
54
+ - **Missing glossary is normal** — do not warn-spam or invent a glossary file.
55
+ - Glossary content never enforces; the gate remains `ark.config.json` + scan.
56
+
37
57
  ## When / not when
38
58
 
39
59
  | Use `/ark-explore` when… | Do **not** use it when… |
@@ -390,6 +410,7 @@ End with **exactly** these headings (markdown `###`):
390
410
  - **Result:** one-line outcome
391
411
  - **Planes:** one-line split of residual **[Layer]** vs **[ArkRules]** (or `n/a` if unused)
392
412
  - **Compass:** top residual lenses | `n/a`
413
+ - **Done axes:** architecture residual (status/doctor/compass) | feature/ticket residual (outside package). Enforce green ≠ feature done
393
414
  - **Handoff:** `/ark-…` / CLI / `none`
394
415
  - **Incomplete?** `no` | `yes — <what is missing>`
395
416
 
@@ -28,6 +28,12 @@ patterns are **out-of-scope** lenses — say so; do not invent Ark enforcement f
28
28
 
29
29
  **Name residual lenses** on each cluster (SoC, DIP, coupling, …). Still no weaken-gate to clear a lens.
30
30
 
31
+ ## Deep modules (process)
32
+
33
+ - Prefer fixes that leave a **deep module** at a named **seam** (port in the owning layer; adapter outside).
34
+ - Apply the **deletion test** before extracting a layer “just so tests can mock it.”
35
+ - After a port/inject fix, **test at the public interface** of the seam (match remediation `nextAction` language), not only private internals.
36
+
31
37
  ## When / not when
32
38
 
33
39
  | Use `/ark-fix` when… | Do **not** use it when… |
@@ -198,6 +204,7 @@ End with **exactly** these headings (markdown `###`):
198
204
  - **Result:** one-line outcome
199
205
  - **Planes:** one-line split of residual **[Layer]** vs **[ArkRules]** (or `n/a` if unused)
200
206
  - **Compass:** top residual lenses | `n/a`
207
+ - **Done axes:** architecture residual (status/doctor/compass) | feature/ticket residual (outside package). Enforce green ≠ feature done
201
208
  - **Handoff:** `/ark-…` / CLI / `none`
202
209
  - **Incomplete?** `no` | `yes — <what is missing>`
203
210
 
@@ -31,6 +31,12 @@ patterns are **out-of-scope** lenses — say so; do not invent Ark enforcement f
31
31
 
32
32
  **Lens language on each cluster** while looping edges; residual shape lenses hand off to explore/autopilot.
33
33
 
34
+ ## Deep modules (process)
35
+
36
+ - Judgment remediations that introduce ports: **name the seam**, prefer deep modules, **test at the public interface**.
37
+ - Do not invent pass-through files that fail the **deletion test** just to clear a plan step.
38
+ - Empty plan A is edge residual only — Shape residual still needs explore/autopilot; green edges ≠ feature done.
39
+
34
40
  ## When / not when
35
41
 
36
42
  | Use `/ark-loop` when… | Do **not** use it when… |
@@ -193,6 +199,7 @@ End with **exactly** these headings (markdown `###`):
193
199
  - **Result:** one-line outcome
194
200
  - **Planes:** one-line split of residual **[Layer]** vs **[ArkRules]** (or `n/a` if unused)
195
201
  - **Compass:** top residual lenses | `n/a`
202
+ - **Done axes:** architecture residual (status/doctor/compass) | feature/ticket residual (outside package). Enforce green ≠ feature done
196
203
  - **Handoff:** `/ark-…` / CLI / `none`
197
204
  - **Incomplete?** `no` | `yes — <what is missing>`
198
205
 
@@ -24,6 +24,12 @@ patterns are **out-of-scope** lenses — say so; do not invent Ark enforcement f
24
24
 
25
25
  **Where so the AI doesn’t mess up next time** — golden pattern + layer home before the write.
26
26
 
27
+ ## Deep modules (process)
28
+
29
+ - Place so new code stays **deep**: one small public surface per concern; hide implementation details.
30
+ - If the artifact is a port or adapter, **name the seam** and put the interface where callers should depend (usually Domain/Application), implementation on the outer side.
31
+ - Do not scaffold empty pass-through modules that fail the **deletion test** (complexity would vanish if deleted).
32
+
27
33
  ## When / not when
28
34
 
29
35
  | Use `/ark-place` when… | Do **not** use it when… |
@@ -175,6 +181,7 @@ End with **exactly** these headings (markdown `###`):
175
181
  - **Result:** one-line outcome
176
182
  - **Planes:** one-line split of residual **[Layer]** vs **[ArkRules]** (or `n/a` if unused)
177
183
  - **Compass:** top residual lenses | `n/a`
184
+ - **Done axes:** architecture residual (status/doctor/compass) | feature/ticket residual (outside package). Enforce green ≠ feature done
178
185
  - **Handoff:** `/ark-…` / CLI / `none`
179
186
  - **Incomplete?** `no` | `yes — <what is missing>`
180
187
 
@@ -28,6 +28,12 @@ patterns are **out-of-scope** lenses — say so; do not invent Ark enforcement f
28
28
 
29
29
  **2–3 options labeled by lens impact** (what residual improves / what stays out-of-scope).
30
30
 
31
+ ## Deep modules (process)
32
+
33
+ - Prefer **deep modules** (small interface, hidden complexity). Never invent a depth score.
34
+ - Label the **seam** on each option that introduces a port/adapter; apply the **deletion test** before pass-through extracts “for testability.”
35
+ - Recommend tests **at the public interface** of the chosen seam.
36
+
31
37
  ## When / not when
32
38
 
33
39
  | Use `/ark-think` when… | Do **not** use it when… |
@@ -146,6 +152,7 @@ End with **exactly** these headings (markdown `###`):
146
152
  - **Result:** one-line outcome
147
153
  - **Planes:** one-line split of residual **[Layer]** vs **[ArkRules]** (or `n/a` if unused)
148
154
  - **Compass:** top residual lenses | `n/a`
155
+ - **Done axes:** architecture residual (status/doctor/compass) | feature/ticket residual (outside package). Enforce green ≠ feature done
149
156
  - **Handoff:** `/ark-…` / CLI / `none`
150
157
  - **Incomplete?** `no` | `yes — <what is missing>`
151
158
 
@@ -32,6 +32,38 @@ patterns are **out-of-scope** lenses — say so; do not invent Ark enforcement f
32
32
 
33
33
  **After upgrade:** refresh projection; re-doctor; compass residual still drives process, not scores.
34
34
 
35
+ ## Suggested improvements (what to try next)
36
+
37
+ After `ark upgrade` (preview or apply), read JSON **`whatsNew`** or the human **Suggested improvements**
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):
40
+
41
+ 1. **Deep-module coach** — `ark-check --doctor` → `doctor.deepModuleCoach` (hot paths + deepening)
42
+ 2. **Improvement compass** — residual lenses on doctor/HTML (not a score)
43
+ 3. **Session recipe** — `ark status --json` honesty modes; doctor when mode is not full
44
+ 4. **Two-axis done** — architecture residual vs feature/ticket residual (Enforce green ≠ feature done)
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
49
+
50
+ Never invent gate verdicts from these suggestions. Missing residual is honest empty, not green.
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
+
66
+
35
67
  ## Dual engine (mandatory)
36
68
 
37
69
  Use the semantic sensor (`ark-check --doctor --json` plus the strict contract
@@ -48,6 +80,11 @@ retain `projectIdentity.projectId`, then pass both `expectedRoot` and `expectedP
48
80
  uncertain, do not consume MCP analysis: use the workspace-local CLI and report that MCP
49
81
  restart/retargeting is required. `ark://manifest` never satisfies this preflight.
50
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
+
51
88
  ## Dual plane — layers + ArkRules (mandatory, except /ark-runtime)
52
89
 
53
90
  ArkGate has **two opt-in planes**. The user chooses which to use; you **always label** findings so they never blur.
@@ -97,8 +134,8 @@ ArkGate has **two opt-in planes**. The user chooses which to use; you **always l
97
134
  | `current` | Content identity matches the candidate. | Record/adopt safely; metadata-only stamps may refresh. |
98
135
  | `stale` | Recorded managed content still matches its old identity. | Safe candidate replacement. |
99
136
  | `missing` | Candidate is absent. | Create if new; require consent if a recorded asset was deleted. |
100
- | `customized` | User content diverged without a competing managed base. | Preserve it. |
101
- | `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`). |
102
139
  | `retired` | A recorded asset is no longer selected by the candidate. | Preserve its file and manifest identity; take no action. |
103
140
 
104
141
  ## Procedure
@@ -158,16 +195,18 @@ ArkGate has **two opt-in planes**. The user chooses which to use; you **always l
158
195
  that customized files remain non-applying and that any deletion/conflict is
159
196
  blocked.
160
197
 
161
- 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):
162
200
 
163
201
  ```bash
164
202
  npx arkgate upgrade --apply
165
203
  ```
166
204
 
167
- This updates through the detected package manager and hands control to the new
168
- package for a fresh preview. Review that new preview; do not assume the old
169
- candidate and new candidate are identical. If already on the latest package,
170
- 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`.
171
210
 
172
211
  For pnpm repositories with `minimumReleaseAge`, use the repository's existing
173
212
  trusted first-party exception mechanism when the new release is still cooling
@@ -185,18 +224,25 @@ ArkGate has **two opt-in planes**. The user chooses which to use; you **always l
185
224
  ```
186
225
 
187
226
  If recorded deletion/conflict recovery is desired, ask first and then add
188
- `--accept-conflicts`. Never add it merely to make the run green. Run a second
189
- 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).
190
233
 
191
- 5. **Verify enforcement and architecture.** Run
234
+ 5. **Verify enforcement and architecture (post-upgrade checks).** Read apply JSON
235
+ `postUpgradeChecks` when present. Also run:
192
236
  `npx arkgate-check --doctor --json` (or the project-local `ark-check`) and
193
237
  the same fail-closed architecture command used by managed apply (normally
194
238
  `npx arkgate-check --root . --config ark.config.json --strict-merge --json`).
195
- Require `completeness: "complete"` and `ok: true`. Treat provider-unavailable CI
196
- required-check evidence as `unverified`, never as proof that merges are
197
- blocked. If new violations appear, hand off to `/ark-fix` for a small set or
198
- `/ark-loop` / `/ark-autopilot` for residual debt; do not regenerate a baseline
199
- 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.
200
246
 
201
247
  ## Active host vs deferred hosts
202
248
 
@@ -31,6 +31,18 @@ patterns are **out-of-scope** lenses — say so; do not invent Ark enforcement f
31
31
 
32
32
  **Spaghetti → honest contract.** SoC/DIP false-green STOP paths in plain language; residual lenses stay Incomplete until mapped.
33
33
 
34
+ ## Domain glossary (process)
35
+
36
+ When present, prefer the consumer **domain glossary** for layer names, slice folders, intent names, and pilot wording:
37
+
38
+ | Detect (no requirement) |
39
+ |-------------------------|
40
+ | `CONTEXT.md`, `docs/glossary.md`, `docs/domain.md`, `docs/ubiquitous-language.md`, `docs/CONTEXT.md` |
41
+
42
+ - Prefer glossary terms over inventing parallel vocabulary.
43
+ - Call out conflicts between glossary language and code reality (process judgment).
44
+ - **Missing glossary is normal** — continue without warning spam. Never treat glossary prose as enforcement.
45
+
34
46
  ## When / not when
35
47
 
36
48
  | Use `/ark-adopt` when… | Do **not** use it when… |
@@ -184,6 +196,7 @@ End with **exactly** these headings (markdown `###`):
184
196
  - **Result:** one-line outcome
185
197
  - **Planes:** one-line split of residual **[Layer]** vs **[ArkRules]** (or `n/a` if unused)
186
198
  - **Compass:** top residual lenses | `n/a`
199
+ - **Done axes:** architecture residual (status/doctor/compass) | feature/ticket residual (outside package). Enforce green ≠ feature done
187
200
  - **Handoff:** `/ark-…` / CLI / `none`
188
201
  - **Incomplete?** `no` | `yes — <what is missing>`
189
202
 
@@ -34,6 +34,26 @@ patterns are **out-of-scope** lenses — say so; do not invent Ark enforcement f
34
34
 
35
35
  **Map residual lenses → dual-plan B seeds.** Plain Align / Stabilize / Shape from compass + design-weak — not a scorecard.
36
36
 
37
+ ## Deep modules (process)
38
+
39
+ - Prefer **deep modules**: small **interface**, complexity hidden behind it (not a depth score).
40
+ - When proposing a port/adapter or Shape pilot, **name the seam** (callers stay stable; behavior swaps behind it). One adapter → seam still hypothetical; two real adapters → seam justified.
41
+ - Apply the **deletion test** before extracting “just for tests”: if deleting the module makes complexity *vanish*, it was pass-through; if complexity *reappears* across callers, it earned its keep.
42
+ - Prefer verification **at the public interface** of the seam (locality/leverage), not private pass-through layers.
43
+ - When doctor surfaces **hot paths** or **deepening candidates**, treat them as advisory residual only — never as a gate fail; bias dual-plan B pilots toward recent churn when listed.
44
+
45
+ ## Domain glossary (process)
46
+
47
+ If the consumer tree has a **domain glossary**, prefer its terms for layer/slice folders, pilot names, and next-action prose:
48
+
49
+ | Common root names (detect, do not require) |
50
+ |--------------------------------------------|
51
+ | `CONTEXT.md`, `docs/glossary.md`, `docs/domain.md`, `docs/ubiquitous-language.md`, `docs/CONTEXT.md` |
52
+
53
+ - Call out **glossary vs code** conflicts when names disagree with lived folders.
54
+ - **Missing glossary is normal** — do not warn-spam or invent a glossary file.
55
+ - Glossary content never enforces; the gate remains `ark.config.json` + scan.
56
+
37
57
  ## When / not when
38
58
 
39
59
  | Use `/ark-explore` when… | Do **not** use it when… |
@@ -390,6 +410,7 @@ End with **exactly** these headings (markdown `###`):
390
410
  - **Result:** one-line outcome
391
411
  - **Planes:** one-line split of residual **[Layer]** vs **[ArkRules]** (or `n/a` if unused)
392
412
  - **Compass:** top residual lenses | `n/a`
413
+ - **Done axes:** architecture residual (status/doctor/compass) | feature/ticket residual (outside package). Enforce green ≠ feature done
393
414
  - **Handoff:** `/ark-…` / CLI / `none`
394
415
  - **Incomplete?** `no` | `yes — <what is missing>`
395
416
 
@@ -28,6 +28,12 @@ patterns are **out-of-scope** lenses — say so; do not invent Ark enforcement f
28
28
 
29
29
  **Name residual lenses** on each cluster (SoC, DIP, coupling, …). Still no weaken-gate to clear a lens.
30
30
 
31
+ ## Deep modules (process)
32
+
33
+ - Prefer fixes that leave a **deep module** at a named **seam** (port in the owning layer; adapter outside).
34
+ - Apply the **deletion test** before extracting a layer “just so tests can mock it.”
35
+ - After a port/inject fix, **test at the public interface** of the seam (match remediation `nextAction` language), not only private internals.
36
+
31
37
  ## When / not when
32
38
 
33
39
  | Use `/ark-fix` when… | Do **not** use it when… |
@@ -198,6 +204,7 @@ End with **exactly** these headings (markdown `###`):
198
204
  - **Result:** one-line outcome
199
205
  - **Planes:** one-line split of residual **[Layer]** vs **[ArkRules]** (or `n/a` if unused)
200
206
  - **Compass:** top residual lenses | `n/a`
207
+ - **Done axes:** architecture residual (status/doctor/compass) | feature/ticket residual (outside package). Enforce green ≠ feature done
201
208
  - **Handoff:** `/ark-…` / CLI / `none`
202
209
  - **Incomplete?** `no` | `yes — <what is missing>`
203
210
 
@@ -31,6 +31,12 @@ patterns are **out-of-scope** lenses — say so; do not invent Ark enforcement f
31
31
 
32
32
  **Lens language on each cluster** while looping edges; residual shape lenses hand off to explore/autopilot.
33
33
 
34
+ ## Deep modules (process)
35
+
36
+ - Judgment remediations that introduce ports: **name the seam**, prefer deep modules, **test at the public interface**.
37
+ - Do not invent pass-through files that fail the **deletion test** just to clear a plan step.
38
+ - Empty plan A is edge residual only — Shape residual still needs explore/autopilot; green edges ≠ feature done.
39
+
34
40
  ## When / not when
35
41
 
36
42
  | Use `/ark-loop` when… | Do **not** use it when… |
@@ -193,6 +199,7 @@ End with **exactly** these headings (markdown `###`):
193
199
  - **Result:** one-line outcome
194
200
  - **Planes:** one-line split of residual **[Layer]** vs **[ArkRules]** (or `n/a` if unused)
195
201
  - **Compass:** top residual lenses | `n/a`
202
+ - **Done axes:** architecture residual (status/doctor/compass) | feature/ticket residual (outside package). Enforce green ≠ feature done
196
203
  - **Handoff:** `/ark-…` / CLI / `none`
197
204
  - **Incomplete?** `no` | `yes — <what is missing>`
198
205
 
@@ -24,6 +24,12 @@ patterns are **out-of-scope** lenses — say so; do not invent Ark enforcement f
24
24
 
25
25
  **Where so the AI doesn’t mess up next time** — golden pattern + layer home before the write.
26
26
 
27
+ ## Deep modules (process)
28
+
29
+ - Place so new code stays **deep**: one small public surface per concern; hide implementation details.
30
+ - If the artifact is a port or adapter, **name the seam** and put the interface where callers should depend (usually Domain/Application), implementation on the outer side.
31
+ - Do not scaffold empty pass-through modules that fail the **deletion test** (complexity would vanish if deleted).
32
+
27
33
  ## When / not when
28
34
 
29
35
  | Use `/ark-place` when… | Do **not** use it when… |
@@ -175,6 +181,7 @@ End with **exactly** these headings (markdown `###`):
175
181
  - **Result:** one-line outcome
176
182
  - **Planes:** one-line split of residual **[Layer]** vs **[ArkRules]** (or `n/a` if unused)
177
183
  - **Compass:** top residual lenses | `n/a`
184
+ - **Done axes:** architecture residual (status/doctor/compass) | feature/ticket residual (outside package). Enforce green ≠ feature done
178
185
  - **Handoff:** `/ark-…` / CLI / `none`
179
186
  - **Incomplete?** `no` | `yes — <what is missing>`
180
187