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
package/docs/README.md CHANGED
@@ -53,15 +53,15 @@ 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. [team-parliament](plans/team-parliament/README.md) **4.6.1 prepared**; [five-door-autonomy](plans/five-door-autonomy/README.md) **4.6.1 prepared**; [understandable-ark-4.6](plans/understandable-ark-4.6/README.md) **4.6.0**; [field-upgrade-mcp-truth](plans/field-upgrade-mcp-truth/README.md) **shipped in 4.5.6**; 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. |
56
+ | Epic plans (seeded + shipped) | [plans/](plans/) — maintainer seeds (e.g. [team-parliament](plans/team-parliament/README.md) **shipped in 4.6.1**; [five-door-autonomy](plans/five-door-autonomy/README.md) **shipped in 4.6.1**; [understandable-ark-4.6](plans/understandable-ark-4.6/README.md) **4.6.0**; [field-upgrade-mcp-truth](plans/field-upgrade-mcp-truth/README.md) **shipped in 4.5.6**; 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
- Prepared: [releases/4.6.1.md](releases/4.6.1.md) (`arkgate@4.6.1` not yet npm `latest`).
62
- Current published: [releases/4.6.0.md](releases/4.6.0.md) (`arkgate@4.6.0` on npm `latest`).
63
- Prior: [releases/4.5.7.md](releases/4.5.7.md) (`arkgate@4.5.7`).
64
- Previous: [releases/4.5.6.md](releases/4.5.6.md) · [releases/4.5.5.md](releases/4.5.5.md) · [releases/4.5.0.md](releases/4.5.0.md) · [releases/4.4.0.md](releases/4.4.0.md) · [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).
61
+ Current published: [releases/4.6.2.md](releases/4.6.2.md) (`arkgate@4.6.2` on npm `latest`).
62
+ Prepared: [releases/4.6.3.md](releases/4.6.3.md) (Codex operation-scoped hard write; not yet published).
63
+ Prior: [releases/4.6.1.md](releases/4.6.1.md) (`arkgate@4.6.1`).
64
+ Previous: [releases/4.6.0.md](releases/4.6.0.md) · [releases/4.5.7.md](releases/4.5.7.md) · [releases/4.5.6.md](releases/4.5.6.md) · [releases/4.5.5.md](releases/4.5.5.md) · [releases/4.5.0.md](releases/4.5.0.md) · [releases/4.4.0.md](releases/4.4.0.md) · [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
65
  Previous major: [releases/4.0.0.md](releases/4.0.0.md) (`arkgate@4.0.0`).
66
66
  Config: [configuration.md](configuration.md) · Agent skills dual-plane: [agent-guide.md](agent-guide.md).
67
67
 
@@ -8,9 +8,9 @@ reference for agents and codegen: write hooks, advisory MCP tools, CI, and `/ark
8
8
  - Docs hub: [README.md](README.md)
9
9
 
10
10
  Guarantees differ by host; start with the
11
- [canonical host support matrix](../README.md#host-enforcement-support). The advisory-local /
12
- hard-CI split is a deliberate trade-off, not a gap: local hooks and MCP coach at write time,
13
- while a required merge status is the one boundary a repository can make every write path share.
11
+ [canonical host support matrix](../README.md#host-enforcement-support). The operation-scoped
12
+ local / all-path CI split is a deliberate trade-off, not a gap: covered local hooks block early,
13
+ MCP coaches, and a required merge status is the one boundary every write path can share.
14
14
 
15
15
  CLI names: prefer **`arkgate` / `arkgate-check` / `arkgate-mcp`**; aliases `ark` / `ark-check` /
16
16
  `ark-mcp` still work for one major. **arkgate@3.8.0+** tests packed project TypeScript
@@ -41,17 +41,20 @@ npx ark-check --install-agent-gates --skills-only --force
41
41
  ### Write-path honesty
42
42
 
43
43
  Claude/Grok/Antigravity/Cursor can hard-block listed PreToolUse / preToolUse ops when installed
44
- and trusted (Cursor: `Write` / `StrReplace` via `.cursor/hooks.json`). Codex/OpenCode remain
45
- **advisory at write**. For every host, the repository-wide hard boundary is a **required GitHub
46
- status context** that runs `arkgate-check --strict-merge` (alias `ark-check --strict-merge`)
47
- the CLI name is not the status context name. Never claim Codex/OpenCode hard write; never claim
48
- Cursor hard write without the trusted hooks file covering Write|StrReplace. Soft-write alone does
49
- not mean the project is unfinished; doctor keeps it as an environment residual. See
44
+ and trusted (Cursor: `Write` / `StrReplace` via `.cursor/hooks.json`). Codex CLI and local
45
+ ChatGPT Desktop/App Server can hard-block a complete `apply_patch` through a trusted
46
+ `.codex/hooks.json`; installed files stay unverified until a fresh covered invocation. Hosted
47
+ tools, specialized opt-out paths, shell/direct writes, incomplete patch reconstruction, and
48
+ OpenCode remain CI-backed or advisory. For every host, the repository-wide hard boundary is a
49
+ **required GitHub status context** that runs `arkgate-check --strict-merge` (alias
50
+ `ark-check --strict-merge`) — the CLI name is not the status context name. Soft-write or
51
+ unverified-hook evidence alone does not mean the project is unfinished. See
50
52
  [ai-gates.md](ai-gates.md) and the README host matrix.
51
53
 
52
54
  Surface the same plane from the CLI: pair **`ark status --json`** (activation facts) with
53
- **`ark-check --doctor`** (`doctor.writePath`) — advisory local write on soft hosts → **required**
54
- merge status as the hard boundary. Product path: [use.md — What you get](use.md#what-you-get) ·
55
+ **`ark-check --doctor`** (`doctor.writePath`) — operation-scoped local hard evidence where
56
+ observed, then **required** merge status as the all-path boundary. Product path:
57
+ [use.md — What you get](use.md#what-you-get) ·
55
58
  [README host matrix](../README.md#host-enforcement-support).
56
59
 
57
60
  **MCP project identity (4.2.0):** before trusting project-specific MCP evidence, call
@@ -493,7 +496,7 @@ generating project structure on greenfield or early-adoption repos.
493
496
  coverage is low or the config is fresh:
494
497
 
495
498
  ```
496
- New to Ark? Run /ark-adopt (or /ark-architect) or: ark-check --recommend
499
+ New to Ark? /ark-adopt or: arkgate-check --doctor
497
500
  ```
498
501
 
499
502
  The `/ark-adopt` skill ships in `templates/skills/ark-adopt.md` (leftover
@@ -1187,8 +1190,10 @@ Register the server itself in `.mcp.json` so the agent can handshake with `ark_i
1187
1190
  }
1188
1191
  ```
1189
1192
 
1190
- On Claude/Grok, the installed PreToolUse hook makes matched writes an enforced checkpoint. MCP
1191
- registration by itself remains advisory on every host because the agent must call the tool.
1193
+ On Claude/Grok, the installed PreToolUse hook makes matched writes an enforced checkpoint. Cursor
1194
+ does the same for Write/StrReplace, and Codex CLI/local Desktop does so for complete
1195
+ `apply_patch` calls after trust and runtime observation. MCP registration by itself remains
1196
+ advisory on every host because the agent must call the tool.
1192
1197
 
1193
1198
  Decision rationale: [ADR 0017 — MCP verdicts require explicit project identity](adr/0017-mcp-project-identity-binding.md).
1194
1199
 
package/docs/ai-gates.md CHANGED
@@ -12,15 +12,17 @@ overview: [develop.md](develop.md) · hub: [README.md](README.md).
12
12
  | **Claude Code** | Hard PreToolUse for listed ops when installed + trusted + (for `hard:true`) runtime-observed | Required `arkgate-check --strict-merge` status |
13
13
  | **Grok Build** | Hard PreToolUse for listed ops when installed + trusted + (for `hard:true`) runtime-observed | Required `arkgate-check --strict-merge` status |
14
14
  | **Google Antigravity** | Hard PreToolUse for listed write tools when installed + trusted + (for `hard:true`) runtime-observed | Required `arkgate-check --strict-merge` status |
15
- | **Cursor** | **Advisory only** (MCP/rules) no hard PreToolUse | Required CI status (same check) |
16
- | **OpenAI Codex** | **Advisory / best-effort** (MCP + optional hooks.json) **not** equivalent to Claude/Grok hard block | Required CI status (same check) |
15
+ | **Cursor** | Hard preToolUse for Write/StrReplace when installed + trusted + runtime-observed | Required CI status (same check) |
16
+ | **OpenAI Codex** | Hard PreToolUse for complete local `apply_patch` in CLI/Desktop when installed + trusted + runtime-observed | Required CI status (same check) |
17
17
  | **OpenCode** | **Advisory / best-effort** (MCP + optional experimental plugin) — **not** a hard boundary | Required CI status (same check) |
18
18
 
19
- On Claude Code, Grok Build, and Google Antigravity, an installed and trusted PreToolUse hook can
20
- block matched writes before they land on disk. Cursor, OpenAI Codex, and OpenCode use advisory MCP
21
- validation at write time; CI is their hard repository check. Codex 0.123+ dispatches hooks for its
22
- native `apply_patch` handler, but Code Mode hosts can execute deferred nested writes without that
23
- project hook event. OpenCode `tool.execute.before` plugins have known subagent bypass holes. See
19
+ On Claude Code, Grok Build, Google Antigravity, Cursor, and Codex, an installed and trusted
20
+ PreToolUse hook can block the listed local operation before it lands on disk. Codex’s claim is
21
+ intentionally narrow: Ark must reconstruct the complete `apply_patch`, and a fresh hook invocation
22
+ must prove the operation. Current Codex CLI and local ChatGPT Desktop/App Server send the patch in
23
+ `tool_input.command`; hosted tools, specialized opt-out paths, shell/direct writes, and incomplete
24
+ patches remain outside that local claim. OpenCode `tool.execute.before` plugins have known subagent
25
+ bypass holes. See
24
26
  the [canonical host support matrix](../README.md#host-enforcement-support) before installing. The
25
27
  advisory-local / hard-CI split is a deliberate trade-off: local surfaces optimize feedback speed,
26
28
  while a required merge status is the one boundary a repository can make every write path share.
@@ -327,29 +329,34 @@ Your repository backstop remains CI: `ark-check` fails its check on anything tha
327
329
  through (Shell bypass, Tab, incomplete coverage). It blocks the merge only when that status
328
330
  is required by repository policy.
329
331
 
330
- ## OpenAI Codex CLI
332
+ ## OpenAI Codex CLI and local Desktop
331
333
 
332
334
  Recommended for Ark projects.
333
335
 
336
+ Platform authority: [Codex Hooks](https://developers.openai.com/codex/hooks) ·
337
+ [Advanced configuration](https://developers.openai.com/codex/config-advanced) ·
338
+ [App Server](https://developers.openai.com/codex/app-server). Project-local hooks run only after
339
+ the project and exact hook definition are trusted.
340
+
334
341
  Codex 0.123+ dispatches `PreToolUse` for the native `apply_patch` handler. Ark installs
335
342
  `.codex/hooks.json` with `ApplyPatch|apply_patch|Write|Edit|MultiEdit` aliases and reconstructs
336
343
  every added or updated file in a multi-file patch before allowing it. The hook passes
337
344
  `--root . --root-env CODEX_PROJECT_DIR`: ArkGate reads the environment directly without
338
345
  POSIX shell expansion and safely falls back to the hook working directory.
339
346
 
340
- This hook is best-effort in Codex Code Mode: some hosts execute deferred nested `apply_patch`
341
- calls without dispatching the project `PreToolUse` event. ArkGate therefore does not treat the
342
- presence of `.codex/hooks.json` as a universal hard-write guarantee; MCP remains advisory and the
343
- required CI status is the hard repository boundary.
347
+ The trusted hook is a hard boundary for the covered local operation, not a universal Codex
348
+ guarantee. ArkGate claims `hard:true` only while processing a complete runtime-observed
349
+ `apply_patch`; `.codex/hooks.json` on disk is merely configured/unverified. Hosted tools,
350
+ specialized opt-out paths, shell/direct writes, and incomplete reconstruction remain CI-backed.
344
351
 
345
352
  ```bash
346
353
  npx ark-check --install-agent-gates --tools codex
347
354
  ```
348
355
 
349
356
  The generated hook includes `--hook-repair`, so a rejected patch **may emit** a structured
350
- repair envelope (same JSON shape as Claude/Grok). **Reinjection is not guaranteed** on Codex
351
- local write stays advisory/bypassable; the host must re-apply any fix, and required CI remains
352
- the hard merge boundary. Codex still needs hook trust enabled for the project.
357
+ repair envelope (same JSON shape as Claude/Grok). **Reinjection is not guaranteed** on Codex:
358
+ the host must re-apply any fix. Exit `2` is the supported deny, and required CI remains the
359
+ all-path hard merge boundary. Codex still needs hook trust enabled for the project.
353
360
 
354
361
  Modern Codex resolves MCP servers from the active project's `.codex/config.toml`. Ark writes
355
362
  that file with relative paths, so every repository owns its primary `ark` binding without
@@ -409,8 +416,9 @@ observe a later MCP conversation from files alone. The matched `ark_identity` re
409
416
  runtime observation for that caller and live process; it does not mutate the setup JSON.
410
417
  `.codex/config.toml` by itself never upgrades `runtimeObserved` or `active`.
411
418
 
412
- Codex uses the best-effort local patch hook plus advisory MCP for discovery/validation and
413
- `ark-check` as the hard merge backstop. Register all three as soon as the repo is adopted.
419
+ Codex uses an operation-scoped hard local patch hook plus advisory MCP for discovery/validation
420
+ and `ark-check` as the all-path hard merge backstop. Register all three as soon as the repo is
421
+ adopted.
414
422
 
415
423
  ### Legacy Codex home fallback
416
424
 
@@ -501,9 +509,10 @@ released from Ark ownership.
501
509
  home (`$CODEX_HOME/skills`). Home debt is **deferred** when the session host is not Codex.
502
510
  - Legacy flat prompts alone are reported as non-loadable skill debt with a
503
511
  `--skills-only --tools codex --force` (repo) or `--codex-home --force` (home) fix.
504
- - Codex **write path is advisory**: MCP + best-effort `.codex/hooks.json` is **not** a hard
505
- write boundary and is **not** equivalent to Claude/Grok PreToolUse hard-write + repair.
506
- The hard merge backstop is CI `--strict-merge` (or `--strict`) as a **required GitHub status context** (not “workflow file present”).
512
+ - Codex **complete local `apply_patch` is hard** when `.codex/hooks.json` is trusted and the
513
+ invocation is runtime-observed. MCP remains advisory; incomplete, hosted, specialized, shell,
514
+ and direct-write paths rely on CI `--strict-merge` (or `--strict`) as a **required GitHub status
515
+ context** (not “workflow file present”).
507
516
  - CI workflows that run ark-check without the fail-closed profile (or with only
508
517
  `--strict-config`) surface gap `enforcement-ci-not-fail-closed`.
509
518
 
package/docs/develop.md CHANGED
@@ -36,8 +36,9 @@ Local write hardness **differs by host**. CI required status is the shared hard
36
36
  | Host | Local write | MCP | Merge |
37
37
  |------|-------------|-----|-------|
38
38
  | Claude · Grok · Antigravity | Pre-write block when installed + trusted | Advisory | Required status context |
39
- | Codex · OpenCode | Warning only (not blocked) | Advisory | Required status context |
40
39
  | Cursor | Pre-write block for Write/StrReplace when `.cursor/hooks.json` is trusted | Advisory | Required status context |
40
+ | Codex CLI · local Desktop/App Server | Pre-write block for complete `apply_patch` when `.codex/hooks.json` is trusted | Advisory | Required status context |
41
+ | OpenCode | Warning only (not blocked) | Advisory | Required status context |
41
42
 
42
43
  Full matrix and install commands: [ai-gates.md](ai-gates.md) · canonical table in [README](../README.md#host-enforcement-support).
43
44
 
@@ -52,6 +53,8 @@ npx arkgate-check --install-agent-gates --skills-only --force
52
53
 
53
54
  Doctor reports what is actually installed and observed (`writePath` / enforcement state). Installed
54
55
  files alone do not imply `hard:true` without runtime evidence where the product requires it.
56
+ Codex hosted tools, specialized opt-out paths, shell/direct filesystem writes, and incomplete
57
+ patch reconstruction remain outside the local hard claim and rely on required CI.
55
58
 
56
59
  **Evidence split (Phase EH):** soft-write hosts keep `soft-write-host` in evidence without forcing
57
60
  global **Not finished** when the contract is ready. With `ARK_DOCTOR_GITHUB=1`, successful CI runs
@@ -9,7 +9,7 @@ npx arkgate-check --install-agent-gates --tools claude,cursor,codex,grok
9
9
  Installs:
10
10
 
11
11
  - Write-path configuration (Claude/Grok/Antigravity/Cursor hard PreToolUse when covered;
12
- Codex advisory MCP)
12
+ Codex hard complete local `apply_patch`; OpenCode advisory)
13
13
  — PreToolUse / Cursor `preToolUse` uses **`--hook-repair`** (W4): on deny, stderr may include
14
14
  `ARK_REPAIR_JSON` / `ARK_AUTOPATCH_JSON` for hosts that re-inject a patch.
15
15
  Still exit 2 / hard block; never silent write. Drop `--hook-repair` for
@@ -33,7 +33,7 @@ local, MCP, CI, and repair guarantees. The table above only lists installed path
33
33
  `arkgate-mcp --session-context` appends when governed coverage is low:
34
34
 
35
35
  ```
36
- New to Ark? Run /ark-adopt (or /ark-architect) or: ark-check --recommend
36
+ New to Ark? /ark-adopt or: arkgate-check --doctor
37
37
  ```
38
38
 
39
39
  ## Verify gates
@@ -17,6 +17,7 @@ hardening guide remains repository-hosted rather than duplicated in the gate tar
17
17
  | Surface | How you use it | Stability notes |
18
18
  |---------|----------------|-----------------|
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
+ | **Host write boundaries** | Generated trusted PreToolUse/preToolUse hooks + `ark-mcp --hook`; inspect with doctor/status | Hard is always operation-scoped and runtime-evidenced. From 4.6.3, Codex CLI and local ChatGPT Desktop/App Server can hard-block a complete `apply_patch` sent as `tool_input.command`; `.codex/hooks.json` on disk remains unverified until a fresh covered invocation. Hosted tools, specialized hook opt-outs, shell/direct writes, incomplete reconstruction, and humans rely on required CI. Repair envelopes may emit, but Codex reinjection is not guaranteed. |
20
21
  | **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
22
  | **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
23
  | **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). |
@@ -210,9 +211,9 @@ production deployment would need to satisfy; it is not a readiness certification
210
211
  ## Release notes (maintainers)
211
212
 
212
213
  Ship notes for a version live under [releases/](https://github.com/pedroknigge/arkgate/tree/main/docs/releases)
213
- (prepared: [4.6.1.md](https://github.com/pedroknigge/arkgate/blob/main/docs/releases/4.6.1.md);
214
- current published: [4.6.0.md](https://github.com/pedroknigge/arkgate/blob/main/docs/releases/4.6.0.md);
215
- prior published: [4.5.7.md](https://github.com/pedroknigge/arkgate/blob/main/docs/releases/4.5.7.md), [4.5.6.md](https://github.com/pedroknigge/arkgate/blob/main/docs/releases/4.5.6.md), [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),
214
+ (prepared: [4.6.3.md](https://github.com/pedroknigge/arkgate/blob/main/docs/releases/4.6.3.md);
215
+ current published: [4.6.2.md](https://github.com/pedroknigge/arkgate/blob/main/docs/releases/4.6.2.md);
216
+ prior published: [4.6.1.md](https://github.com/pedroknigge/arkgate/blob/main/docs/releases/4.6.1.md), [4.6.0.md](https://github.com/pedroknigge/arkgate/blob/main/docs/releases/4.6.0.md), [4.5.7.md](https://github.com/pedroknigge/arkgate/blob/main/docs/releases/4.5.7.md), [4.5.6.md](https://github.com/pedroknigge/arkgate/blob/main/docs/releases/4.5.6.md), [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),
216
217
  [4.2.1.md](https://github.com/pedroknigge/arkgate/blob/main/docs/releases/4.2.1.md);
217
218
  previous: [4.2.0.md](https://github.com/pedroknigge/arkgate/blob/main/docs/releases/4.2.0.md),
218
219
  [4.1.1.md](https://github.com/pedroknigge/arkgate/blob/main/docs/releases/4.1.1.md),
@@ -106,7 +106,7 @@ stay stable unless a change explicitly adds an alias.
106
106
  | **runtime observed** | runtime observed | A live `ark_identity` matched this workspace |
107
107
  | **required CI status** | required CI / status context | Merge hard boundary: required GitHub status running `arkgate-check --strict-merge` |
108
108
  | **config ready** | contract ready | Project/import-rules/ArkRules honesty clear — not the same as a local pre-write block |
109
- | **host limitation** | environment residual | Permanent soft-write host (e.g. Codex) — do not paint the whole project unfinished |
109
+ | **host limitation** | environment residual | Soft-write or uncovered host path (e.g. OpenCode, hosted/specialized tools) — do not paint the whole project unfinished |
110
110
  | **allowed rule ids** | guardrail catalog | Closed vocabulary of sensors, capabilities, `ruleId`s, skill roles |
111
111
  | **check (tool)** | scan | Deterministic engine / CLI / MCP. Same inputs → same verdict. No LLM. |
112
112
  | **coaching / your judgment** | process | Skill- or agent-side. **Never** package pass/fail |
@@ -178,8 +178,8 @@ gate → same binary verdict on every parity-capable adapter
178
178
  | Name the status light + plain fact + next action | “Enforce · leftover design work. Import rules check out; design smells remain. Next: one Shape door — explore → plan B → autopilot with OK.” |
179
179
  | Rank one primary door under residual | Doctor **Primary next action** #1; **Also** only for secondary |
180
180
  | Label expert skills as escapes | “Install skill pack only when doctor or a STOP handoff names a skill.” |
181
- | State host write honesty | “Cursor: pre-write block for Write/StrReplace when hooks are trusted. Codex: warning only (not blocked). Required GitHub status is the merge boundary.” |
182
- | Soft-write ≠ unfinished project | “Architecture contract ready; Codex local writes are advisory.” Keep `soft-write-host` in evidence; reserve **Not finished** for contract/project debt. |
181
+ | State host write honesty | “Cursor blocks trusted Write/StrReplace. Codex blocks complete trusted local `apply_patch` after runtime observation. Required GitHub status covers every path.” |
182
+ | Soft/unverified write ≠ unfinished project | “Architecture config ready; this host operation is advisory or unverified.” Keep environment residual in evidence; reserve **Not finished** for config/project debt. |
183
183
  | Keep Suggest on start → doctor | New-here primary is finish `start`, not a competing recommend/architect curriculum |
184
184
  | Qualify import-clean under leftover design | “None on checked imports … leftover design work remains. Not healthy finished.” |
185
185
  | Prefer unverified-as-not-green | Incomplete analysis, unobserved hooks, and soft MCP never paint as a hard green pre-write block |
@@ -208,7 +208,7 @@ gate → same binary verdict on every parity-capable adapter
208
208
  | Skill-shopping lists as the default curriculum | Progressive disclosure: one door first |
209
209
  | “Healthy / done” while leftover design work remains | False done |
210
210
  | “Honesty clear” as “architecture finished” | Honesty clear only means residual honesty sensors are quiet; graph/mode debt is separate |
211
- | “Not finished” solely because host is Codex/Cursor | Soft-write is environment residual; do not paint a green whole-tree project as unfinished architecture |
211
+ | “Not finished” solely because a host hook is unverified or one host path is advisory | Environment residual is not architecture debt; do not paint a green whole-tree project as unfinished architecture |
212
212
  | “MCP installed / active” because a config file exists | Say **configured on disk · runtime unverified** until `ark_identity` matches the expected root |
213
213
  | Treating an unverified legacy MCP call as authoritative | Compatibility is not proof; require `binding.status: "matched"` and `authoritative: true` |
214
214
  | “Handler means controller” / “every constant is a business rule” | ArkRules inventory uses configured layer context and suppresses narrow technical/test evidence; candidates remain prompts for judgment |
@@ -44,13 +44,17 @@ infrastructure beyond how this package is published.
44
44
 
45
45
  ```
46
46
  Claude/Grok host --PreToolUse--> arkgate-mcp (hard only for observed covered operation)
47
- Codex ApplyPatch --PreToolUse--> arkgate-mcp (atomic feedback; bypassable/non-hard host profile)
47
+ Codex apply_patch --PreToolUse--> arkgate-mcp (hard for complete trusted + observed local operation)
48
48
  Any MCP host --tool call----> arkgate-mcp (advisory validation)
49
49
  Human IDE --disk/git-----> working tree
50
50
  working tree --PR-----------> CI ark-check --strict-merge
51
51
  npm publish <-- signed tag --- GitHub Release + provenance
52
52
  ```
53
53
 
54
+ Codex hosted tools, specialized hook opt-outs, shell/direct writes, and incomplete patch
55
+ reconstruction do not inherit the local `apply_patch` claim; required CI remains the shared
56
+ all-path merge boundary.
57
+
54
58
  ## Residual risk (accepted)
55
59
 
56
60
  - Branch protection is **external GitHub state** — doctor reports honestly when unavailable.
package/docs/use.md CHANGED
@@ -49,9 +49,14 @@ In those cases a boundary linter or editor rules may be enough; see [README —
49
49
  | Before merge | Make the Ark job a **required GitHub status context** running `arkgate-check --strict-merge` (alias `ark-check`) |
50
50
  | Anytime | Doctor: Suggest / Adapt / Enforce (+ leftover design work if the design is still messy) |
51
51
 
52
- **Codex / Cursor / OpenCode:** local write stays advisory forever that is not unfinished architecture. Doctor may say **contract ready** while still reminding you that local writes are advisory; **Not finished** is reserved for real project/contract debt.
52
+ **Cursor:** pre-write block for Write/StrReplace when `.cursor/hooks.json` is trusted.
53
+ **Codex CLI / local Desktop:** pre-write block for a complete `apply_patch` when
54
+ `.codex/hooks.json` is trusted and the operation is observed. Hosted/specialized paths,
55
+ shell/direct writes, and incomplete patches still rely on CI. **OpenCode:** local write stays
56
+ advisory (warning only, not blocked). An unverified host hook is environment evidence, not
57
+ unfinished architecture; **Not finished** is reserved for real project/config debt.
53
58
 
54
- ArkGate is **not** a web framework, ORM, or app runtime. It is architecture enforcement + co-pilot for AI TypeScript.
59
+ ArkGate is **not** a web framework, ORM, or app runtime. It is architecture enforcement + a coach for AI TypeScript.
55
60
 
56
61
  ### Two planes (you choose)
57
62
 
@@ -83,7 +88,7 @@ list: [configuration.md](configuration.md).
83
88
  | **Suggest** | New or thin project | Finish `start`, re-run doctor |
84
89
  | **Adapt** | Not fully protected yet | Doctor action #1 until clean |
85
90
  | **Enforce** | Edges honest under the contract | Keep write path + CI |
86
- | **Enforce · design-weak** | Edges clean; design still messy | Shape door — not “done” |
91
+ | **Enforce · leftover design work** | Edges clean; design still messy | Shape door — not “done” |
87
92
 
88
93
  **Green edges ≠ elegant design.** Empty remediation plan is not “architecture finished” if design residual remains.
89
94
 
@@ -175,7 +180,7 @@ Human doctor prints the short section above.
175
180
  | **Stabilize** | Edges under Enforce | Real debt only in baseline; write path + CI honest |
176
181
  | **Shape** | One golden pattern + pilots | Residual lenses shrink pilot by pilot — never silent multi-pilot |
177
182
 
178
- Green edges under **Enforce · design-weak** mean Align/Stabilize may be fine while Shape remains open.
183
+ Green edges under **Enforce · leftover design work** mean Align/Stabilize may be fine while Shape remains open.
179
184
  Empty plan A is **not** “architecture finished.”
180
185
 
181
186
  ---
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "arkgate",
3
- "version": "4.6.1",
4
- "description": "ArkGate architecture co-pilot for AI TypeScript (write gate, CI gate, plan/loop; optional ArkRules)",
3
+ "version": "4.6.3",
4
+ "description": "One architecture config. One check. One coach.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
7
7
  "module": "./dist/index.js",
package/server.json CHANGED
@@ -1,17 +1,17 @@
1
1
  {
2
2
  "$schema": "https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json",
3
3
  "name": "io.github.pedroknigge/arkgate",
4
- "description": "ArkGate architecture co-pilot for AI TypeScript (write gate, CI, plan/loop)",
4
+ "description": "When your agent writes TypeScript, ArkGate stops it from breaking the layers.",
5
5
  "repository": {
6
6
  "url": "https://github.com/pedroknigge/arkgate",
7
7
  "source": "github"
8
8
  },
9
- "version": "4.6.1",
9
+ "version": "4.6.3",
10
10
  "packages": [
11
11
  {
12
12
  "registryType": "npm",
13
13
  "identifier": "arkgate",
14
- "version": "4.6.1",
14
+ "version": "4.6.3",
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.6.1**
10
+ Package version when last generated context: **arkgate@4.6.2**
11
11
  Schema: agent-skills package contract `1.0`
12
12
 
13
13
  ## Skills (frozen catalog)
@@ -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