arkgate 4.5.7 → 4.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/docs/README.md CHANGED
@@ -53,12 +53,13 @@ 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. [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. [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
- Current published: [releases/4.5.6.md](releases/4.5.6.md) (`arkgate@4.5.6` on npm `latest`).
61
+ Current published: [releases/4.5.7.md](releases/4.5.7.md) (`arkgate@4.5.7` on npm `latest`).
62
+ Prepared: [releases/4.6.0.md](releases/4.6.0.md) (`arkgate@4.6.0`).
62
63
  Prior: [releases/4.4.0.md](releases/4.4.0.md) (`arkgate@4.4.0`).
63
64
  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).
64
65
  Previous major: [releases/4.0.0.md](releases/4.0.0.md) (`arkgate@4.0.0`).
@@ -607,10 +607,10 @@ npx arkgate-check --install-agent-gates --tools claude,cursor,codex,grok,antigra
607
607
 
608
608
  | Host | Installed paths | Skills path |
609
609
  |------|-----------------|-------------|
610
- | Claude Code | `.claude/settings.json` hook + `.mcp.json` / `claude mcp add` | `.claude/skills/<name>/SKILL.md` |
611
- | Cursor | `.cursor/mcp.json` + `.cursor/rules/ark.mdc` | `.cursor/commands/` |
610
+ | Claude Code | `.claude/settings.json` hook + `.mcp.json` / `claude mcp add` | **Repo:** `.claude/skills/<name>/SKILL.md`; **home:** `$CLAUDE_HOME/skills` (default `~/.claude/skills`, `--claude-home`) |
611
+ | Cursor | `.cursor/mcp.json` + `.cursor/rules/ark.mdc` | `.cursor/commands/` (Cursor also loads Claude **home** skills from `~/.claude/skills`) |
612
612
  | OpenAI Codex | `.codex/config.toml` (project primary, relative `--root .`; configured on disk is not runtime-active until restart + `ark_identity` match); optional legacy `$CODEX_HOME/config.toml` fallback uses absolute roots and scoped secondaries — see [ai-gates.md](ai-gates.md) | **Repo:** `.agents/skills/<name>/SKILL.md`; **home:** `$CODEX_HOME/skills/<name>/SKILL.md` (`--codex-home`) |
613
- | **Grok Build** | `.grok/hooks/ark-write-gate.json` + `.grok/config.toml` / `.mcp.json` | `.grok/skills/<name>/SKILL.md` |
613
+ | **Grok Build** | `.grok/hooks/ark-write-gate.json` + `.grok/config.toml` / `.mcp.json` | **Repo:** `.grok/skills/<name>/SKILL.md`; **home:** `$GROK_HOME/skills` (default `~/.grok/skills`, `--grok-home`) |
614
614
  | Google Antigravity | `.agents/hooks.json` (+ `GEMINI.md` for shared Gemini consumers) | `.agents/skills/<name>/SKILL.md` |
615
615
  | OpenCode | `opencode.json` MCP (`type: local`; advisory) | `.opencode/skills/<name>/SKILL.md` |
616
616
 
@@ -618,10 +618,13 @@ This is a path reference, not a guarantee table. Full copy-paste setups:
618
618
  [ai-gates.md](ai-gates.md). Skill inventory: main
619
619
  [README](../README.md#other-skills-only-when-you-need-them).
620
620
  When several repositories share one machine, repo catalogs stay pinned and isolated; unchanged
621
- skill bodies are not rewritten for a version stamp. The optional `$CODEX_HOME/skills` catalog is
622
- monotonic across ArkGate 4.2.0+ installers. Pre-4.2 binaries ignore its metadata and lock, so
623
- upgrade legacy repos before they write the optional home catalog. See
624
- [AI gatesCodex skill catalog](ai-gates.md#codex-skill-catalog-skillmd-not-flat-prompts).
621
+ skill bodies are not rewritten for a version stamp. Shared **home** catalogs (Codex since 4.2;
622
+ Claude/Grok since 4.6) are the machine floor: always latest additive, never downgrade. Refresh
623
+ with `--agent-homes` (or `--claude-home` / `--grok-home` / `--codex-home`). Absent home trees
624
+ are normaldoctor stays quiet until `ark-*` skills exist there. Pre-4.2 binaries ignore Codex
625
+ home metadata and lock, so upgrade legacy repos before they write the optional Codex home
626
+ catalog. See [AI gates — Codex skill catalog](ai-gates.md#codex-skill-catalog-skillmd-not-flat-prompts)
627
+ and [shared Claude/Grok homes](ai-gates.md#shared-claude--grok-home-skills).
625
628
 
626
629
  ### Install skills — Ark and ecosystem {#install-skills-ark-and-ecosystem}
627
630
 
package/docs/ai-gates.md CHANGED
@@ -446,6 +446,25 @@ severity **info**, marked `deferred: true`, and omitted from doctor **Primary ne
446
446
  `/ark-upgrade` on Grok/Claude is not Incomplete because of them. **Temp/upgrade primary roots**
447
447
  stay fail-closed urgent (rewritten, not multi-project).
448
448
 
449
+ ### Shared Claude / Grok home skills {#shared-claude--grok-home-skills}
450
+
451
+ Project catalogs follow that checkout’s ArkGate pin (they may lag). Shared user-home catalogs
452
+ are the **machine floor**:
453
+
454
+ | Scope | Path | Flag |
455
+ |-------|------|------|
456
+ | Claude home | `$CLAUDE_HOME/skills` (default `~/.claude/skills`) | `--claude-home` |
457
+ | Grok home | `$GROK_HOME/skills` (default `~/.grok/skills`) | `--grok-home` |
458
+ | All three + Codex | same monotonic protocol | `--agent-homes` |
459
+
460
+ Doctor reports `agentHomeGaps` only when those catalogs already contain `ark-*` skills and
461
+ lag the installed package. Temp/upgrade `--root` never mutates default user homes. Cursor
462
+ sessions treat a stale Claude home as urgent because Cursor loads `~/.claude/skills`.
463
+
464
+ ```bash
465
+ npx arkgate-check --install-agent-gates --skills-only --agent-homes --force
466
+ ```
467
+
449
468
  ### Codex skill catalog (SKILL.md, not flat prompts)
450
469
 
451
470
  Codex discovers skills as directories containing `SKILL.md` (Agent Skills standard):
package/docs/develop.md CHANGED
@@ -35,9 +35,9 @@ Local write hardness **differs by host**. CI required status is the shared hard
35
35
 
36
36
  | Host | Local write | MCP | Merge |
37
37
  |------|-------------|-----|-------|
38
- | Claude · Grok · Antigravity | Hard PreToolUse when installed + trusted | Advisory | Required status context |
39
- | Codex · OpenCode | Best-effort / advisory | Advisory | Required status context |
40
- | Cursor | Advisory only | Advisory | Required status context |
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
+ | Cursor | Pre-write block for Write/StrReplace when `.cursor/hooks.json` is trusted | Advisory | Required status context |
41
41
 
42
42
  Full matrix and install commands: [ai-gates.md](ai-gates.md) · canonical table in [README](../README.md#host-enforcement-support).
43
43
 
@@ -209,8 +209,8 @@ production deployment would need to satisfy; it is not a readiness certification
209
209
  ## Release notes (maintainers)
210
210
 
211
211
  Ship notes for a version live under [releases/](https://github.com/pedroknigge/arkgate/tree/main/docs/releases)
212
- (current published: [4.5.6.md](https://github.com/pedroknigge/arkgate/blob/main/docs/releases/4.5.6.md);
213
- prior published: [4.5.0.md](https://github.com/pedroknigge/arkgate/blob/main/docs/releases/4.5.0.md), [4.4.0.md](https://github.com/pedroknigge/arkgate/blob/main/docs/releases/4.4.0.md), [4.3.0.md](https://github.com/pedroknigge/arkgate/blob/main/docs/releases/4.3.0.md),
212
+ (current published: [4.5.7.md](https://github.com/pedroknigge/arkgate/blob/main/docs/releases/4.5.7.md);
213
+ prior published: [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
214
  [4.2.1.md](https://github.com/pedroknigge/arkgate/blob/main/docs/releases/4.2.1.md);
215
215
  previous: [4.2.0.md](https://github.com/pedroknigge/arkgate/blob/main/docs/releases/4.2.0.md),
216
216
  [4.1.1.md](https://github.com/pedroknigge/arkgate/blob/main/docs/releases/4.1.1.md),
@@ -16,11 +16,12 @@ deliberately in the same change). Voice is product surface, not marketing decora
16
16
  A track so simple a newcomer enters, so strict a senior trusts — and the AI ships faster
17
17
  because the design space is small and honest.
18
18
 
19
- - **Gate side:** machine-readable contract + write gate + CI. Deterministic. Fail-closed.
20
- Green must mean something real. Two planes: **Layers** (inter) always; **ArkRules** (intra)
21
- opt-in.
22
- - **Co-pilot side:** where code belongs, who talks to whom, how; dual plan **A** (edges) +
23
- **B** (shape); one pilot at a time; never silent judgment codemod; never weaken the contract.
19
+ - **Gate side:** architecture config (`ark.config.json`) + pre-write block where the host
20
+ supports it + required CI. Deterministic. Don’t show green if we could not verify.
21
+ Two planes: **import rules** (who may import whom) always; **ArkRules** (structure rules
22
+ inside a layer) opt-in.
23
+ - **Coach side:** where code belongs, who talks to whom, how; fix imports first, then leftover
24
+ design work; one small refactor at a time; never silent auto-reshape; never weaken the config.
24
25
  - **Agent contract surface (4.3.0):** agents read **guardrail catalogs** and **scan** evidence;
25
26
  they **process** (judge / coach) outside the package. Projection and skills never become the
26
27
  pass/fail gate.
@@ -29,7 +30,7 @@ because the design space is small and honest.
29
30
  rank. Out-of-scope lenses (perf, app security tooling, full resilience) stay honest.
30
31
  - **Vibe-coder dual depth:** human doctor and skills lead with plain outcomes and one next move;
31
32
  experts keep full JSON. Full-AI workflows get the same single door — not a skill menu exam.
32
- - **False done is forbidden:** Enforce ≠ elegant design. `design-weak` / residual must not
33
+ - **False done is forbidden:** “Rules on” ≠ elegant design. Leftover design work must not
33
34
  read as “healthy finished.” Empty ArkRules inventory is not a score. MCP configuration on
34
35
  disk is not proof that the current process belongs to this project.
35
36
 
@@ -47,57 +48,60 @@ Examples:
47
48
 
48
49
  | Bad | Good |
49
50
  |-----|------|
50
- | Ship it 🚀 your architecture is crushed! | Checked edges are clean. Residual design smells mean the tree is still design-weak. Next: `/ark-explore` shape-focus. |
51
+ | Ship it 🚀 your architecture is crushed! | Import rules check out. Leftover design smells mean the tree is still messy. Next: `/ark-explore` shape-focus. |
51
52
  | You don’t need to understand anything. | Doctor reports one status light and one primary next action. Run `ark-check --doctor`. |
52
- | Become an architect in 60 seconds. | Install pins the contract and compact router. Full guided cleanup is `/ark-autopilot` after skills install. |
53
+ | Become an architect in 60 seconds. | Install pins `ark.config.json` and a short agent router. Full guided cleanup is `/ark-autopilot` after skills install. |
53
54
 
54
55
  ---
55
56
 
56
- ## Lexicon (prefer)
57
-
58
- | Term | Use for |
59
- |------|---------|
60
- | **contract** | `ark.config.json` layers, rules, include — the machine-readable architecture file |
61
- | **Layers plane** | Inter-layer edges: imports, placement, purity, isolation |
62
- | **ArkRules** (opt-in) | Intra-layer structure sensors + domain invariant catalogs as data (`arkrules/*`) |
63
- | **advisory ArkRules** | Default sensor mode — **not** merge teeth; does not fail CI/merge alone (FG-ARKRULES-ADVISORY-ONLY) |
64
- | **extraMergeTeeth** | Only when enforced structure/invariant rules exist **and** classification is honest (≥50% governed, ≥1 populated layer) |
65
- | **dual-plane residual** | Label findings **`[Layer]`** vs **`[ArkRules]`** — never blur them |
66
- | **rulesUnderContract** | Doctor/inventory counts for ArkRules **never a score** |
67
- | **type-only placement debt** | `import type` edges on the violations list with `failsStrict:false` prefer SharedTypes / owning layer; not runtime coupling |
68
- | **gate** / **write gate** | Host boundary that blocks or advises on invalid writes |
69
- | **edges** | Allowed import graph (plan **A** / remediation) |
70
- | **baseline** | Frozen known debt; does not make a wrong contract honest |
71
- | **remediation** | Fixing violations against the contract |
72
- | **pilot** | One extraction / reshape cluster at a time |
73
- | **shape** | Design residual after edges are clean (plan **B**) |
74
- | **design-weak** | Edges clean under Enforce, but design smells / pattern residual remain not “done” |
75
- | **residual** | Work still open after a green edge check (usually Shape / plan **B**) |
76
- | **co-pilot** | Guidance that proposes order and pilots without silent codemod |
77
- | **fail-closed** | Incomplete analysis or unproven enforcement never looks green |
78
- | **honest coverage** | Governed % and empty scope that cannot false-green |
79
- | **mechanical-safe** | Deterministic auto-apply class only |
80
- | **judgment** | Human/agent design work; never silent auto-apply as mechanical-safe |
81
- | **doctor** | Control plane: status light + next action |
82
- | **compact router** | Default onboarding agent instructions (not the full skill pack) |
83
- | **hard write** | Non-bypassable PreToolUse block for listed ops (Claude/Grok when installed + trusted) |
84
- | **advisory write** | MCP/rules coach only (Cursor/Codex at write time) — not a hard block |
85
- | **project identity** | Stable canonical root + config identity returned by `ark_identity`; separate from contract and process identity |
86
- | **matched binding** | Live MCP answered for the exact project root, or for a contained descendant together with the matching project id; only this binding is authoritative |
87
- | **authoritative manifest** | Contract returned by `ark_manifest` after a matched identity handshake |
88
- | **compatibility manifest resource** | `ark://manifest` through standard `resources/read`; always unverified/non-authoritative because the request cannot portably carry a project expectation |
89
- | **configured on disk** | Host files name an Ark MCP command; says nothing about which process is currently running |
90
- | **runtime observed** | A live `ark_identity` response matched this workspace; never infer it from `.codex/config.toml` or hook files |
91
- | **required CI / status context** | Merge hard boundary when the repository makes the Ark job a **required GitHub status context** (CLI: `arkgate-check --strict-merge` / `ark-check --strict-merge`) |
92
- | **contract ready** | Project/layers/ArkRules honesty residual clear not the same as “hard local write” |
93
- | **environment residual** | Permanent host/provider posture (e.g. soft-write Codex) kept in evidence without forcing global **Not finished** |
94
- | **guardrail catalog** | Closed vocabulary of allowed sensors, capabilities, diagnostic `ruleId`s, and skill roles agents and copy choose from the catalog; they do not invent free-form enforcement claims |
95
- | **scan** | Deterministic engine / CLI / MCP evidence pass (layers, ArkRules sensors, status facts, prepare-write). Same inputs same verdict. No LLM. |
96
- | **process** (agent judgment) | Skill- or agent-side coaching: placement, dual-plan, pilot choice, remediation order. Improves prevention; **never** package pass/fail |
97
- | **diagnostic code** / **ruleId** | Stable public violation id (e.g. `LAYER_IMPORT_VIOLATION`) with shared why/fix anchors catalog-linked, not prose-only ([diagnostics.md](diagnostics.md)) |
98
- | **agent projection** | Version-matched AGENTS/CLAUDE (or equivalent) block generated from package + contract; **non-authoritative** enforcement is ark-check / hooks / CI |
99
- | **finding ref** | Stable id for a finding across turns (ruleId + target key), so agents re-address without fuzzy message match |
100
- | **status snapshot** | One machine-readable project/session manifest (`ark status --json` shape): identity, activation honesty, last check, residual counts, thin compass residual map — not a numeric score |
57
+ ## Lexicon (prefer) — 4.6 common words
58
+
59
+ **Brands (keep):** **ArkGate** (product / npm `arkgate`) and **ArkRules** (opt-in structure rules
60
+ inside a layer). Gloss on first mention; do not rebrand.
61
+
62
+ Human copy prefers the **common** column. JSON field names (`designWeak`, `ruleId`, MCP tools)
63
+ stay stable unless a change explicitly adds an alias.
64
+
65
+ | Prefer (human) | Was / JSON | Use for |
66
+ |----------------|------------|---------|
67
+ | **architecture config** | contract | `ark.config.json` layers, rules, include |
68
+ | **import rules** / **allowed dependencies** | Layers plane / edges | Who may import whom; placement, purity, isolation |
69
+ | **ArkRules** (opt-in; gloss: structure rules inside a layer) | ArkRules | Intra-layer sensors + domain invariant catalogs (`arkrules/*`) |
70
+ | **advisory ArkRules** | advisory ArkRules | Default sensor mode — **not** merge teeth; does not fail CI/merge alone |
71
+ | **extra merge checks** | extraMergeTeeth | Only when enforced structure/invariant rules exist **and** classification is honest |
72
+ | **label `[Layer]` vs `[ArkRules]`** | dual-plane residual | Never blur import-rule findings with ArkRules findings |
73
+ | **ArkRules counts** | rulesUnderContract | Doctor/inventory counts **never a score** |
74
+ | **type-only import debt** | type-only placement debt | `import type` on the violations list with `failsStrict:false` |
75
+ | **pre-write block** | hard write | Host actually blocks listed edit ops (installed + trusted) |
76
+ | **warning only (not blocked)** | advisory write | MCP/rules coach; not a hard block |
77
+ | **import graph** | edges | Allowed imports (fix these first) |
78
+ | **baseline** | baseline | Frozen known debt; does not make a wrong config honest |
79
+ | **fix** | remediation | Fixing violations against the config |
80
+ | **one small refactor** | pilot | One extraction / reshape cluster at a time |
81
+ | **shape / leftover design work** | **design-weak** / residual | Imports clean under Enforce, but design smells remain not “done” |
82
+ | **coach** | co-pilot | Guidance that proposes order without silent auto-reshape |
83
+ | **don’t show green if unverified** | fail-closed | Incomplete analysis or unproven enforcement never looks green |
84
+ | **honest coverage** | honest coverage | Governed % and empty scope that cannot false-green |
85
+ | **safe to auto-apply** | mechanical-safe | Deterministic auto-apply class only |
86
+ | **your judgment** | judgment | Human/agent design work; never silent auto-apply |
87
+ | **doctor** | doctor | Status light + next action |
88
+ | **short agent router** | compact router | Default onboarding agent instructions (not the full skill pack) |
89
+ | **right project?** | matched binding / project identity | Live MCP answered for this exact project root (+ id). `ark_identity` |
90
+ | **authoritative config read** | authoritative manifest | `ark_manifest` after a matched identity handshake |
91
+ | **compatibility manifest** | `ark://manifest` | Always unverified request cannot carry a project expectation |
92
+ | **configured on disk** | configured on disk | Host files name an Ark MCP command; not proof of the live process |
93
+ | **runtime observed** | runtime observed | A live `ark_identity` matched this workspace |
94
+ | **required CI status** | required CI / status context | Merge hard boundary: required GitHub status running `arkgate-check --strict-merge` |
95
+ | **config ready** | contract ready | Project/import-rules/ArkRules honesty clearnot the same as a local pre-write block |
96
+ | **host limitation** | environment residual | Permanent soft-write host (e.g. Codex) do not paint the whole project unfinished |
97
+ | **allowed rule ids** | guardrail catalog | Closed vocabulary of sensors, capabilities, `ruleId`s, skill roles |
98
+ | **check (tool)** | scan | Deterministic engine / CLI / MCP. Same inputs same verdict. No LLM. |
99
+ | **coaching / your judgment** | process | Skill- or agent-side. **Never** package pass/fail |
100
+ | **diagnostic code** / **ruleId** | ruleId | Stable public violation id catalog-linked ([diagnostics.md](diagnostics.md)) |
101
+ | **agent summary** | agent projection | Version-matched AGENTS/CLAUDE block; **non-authoritative** |
102
+ | **finding id** | finding ref | Stable id (ruleId + target key) across turns |
103
+ | **status snapshot** | status snapshot | `ark status --json`: identity, activation, last check, leftover counts — not a score |
104
+ | **shared agent skills (home)** | Codex/Claude/Grok home catalog | Machine floor: always latest additive; never downgrade |
101
105
  | **session recipe** | Agent loop: bind identity → read status → act on residual / findingRef; run doctor when status compass mode is not `full` |
102
106
  | **compass mode** | Status honesty label for the projected residual map: `full` \| `subset` \| `unavailable` — never invent green residual |
103
107
  | **improvement compass** | Closed projection of residual architecture work across fixed **lenses** (aligned to 15 common principles). Always `notAScore`. Never a gate input. |
@@ -158,20 +162,20 @@ gate → same binary verdict on every parity-capable adapter
158
162
 
159
163
  | Do | Example |
160
164
  |----|---------|
161
- | Name the status light + plain fact + term + next action | “Enforce · design-weak. Checked edges are honest; design smells remain. Next: one Shape door — explore → dual-plan B → autopilot with OK.” |
165
+ | 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.” |
162
166
  | Rank one primary door under residual | Doctor **Primary next action** #1; **Also** only for secondary |
163
167
  | Label expert skills as escapes | “Install skill pack only when doctor or a STOP handoff names a skill.” |
164
- | State host write honesty | “Cursor/Codex: advisory write. Required GitHub status context is the hard merge boundary.” |
168
+ | 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.” |
165
169
  | 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. |
166
170
  | Keep Suggest on start → doctor | New-here primary is finish `start`, not a competing recommend/architect curriculum |
167
- | Qualify edge-clean under design-weak | “None on checked edges … design residual remains. Not healthy finished.” |
168
- | Prefer fail-closed over fake hard | Incomplete analysis, unobserved hooks, and soft MCP never paint as hard green |
169
- | State project binding before verdict | “Ark MCP matched this workspace; `ark_manifest` evidence is authoritative.” Otherwise: “Ark MCP is configured, but runtime identity is unverified. Restart and call `ark_identity` with the exact project root.” |
171
+ | Qualify import-clean under leftover design | “None on checked importsleftover design work remains. Not healthy finished.” |
172
+ | Prefer unverified-as-not-green | Incomplete analysis, unobserved hooks, and soft MCP never paint as a hard green pre-write block |
173
+ | State project binding before verdict | “Ark MCP matched this workspace; `ark_manifest` evidence is for this project.” Otherwise: “Ark MCP is configured, but we have not proven this is the right project. Restart and call `ark_identity` with the exact project root.” |
170
174
  | Keep inventory claims evidence-bound | “Possible rule candidate in the configured Application layer.” A filename or technical constant alone is not Domain evidence. |
171
175
  | Honesty clear ≠ architecture healthy | `productHonesty.finished` means residual **architecture** honesty sensors are clear — not a green graph score. Open blocking violations, ADAPT/SUGGEST with debt, dual-truth pin, or design residual keep `unfinished: true`. Permanent soft-write alone does **not**. |
172
176
  | Separate CI runtime from provider policy | Successful CI run ≠ required status; GitHub Free plan 403 → `unavailable-plan`, not “CI never ran.” |
173
177
  | Prefer catalog language for agent DX | “Stable `ruleId` with why/fix anchors.” Not a free-form list of “things that might be wrong.” |
174
- | Name scan before process | “Scan: two layer import violations. Process: fix the Application→Domain edge first.” |
178
+ | Name the check before coaching | “Check: two layer import violations. Next: fix the Application→Domain import first.” |
175
179
  | Label projection non-enforcing | “Regenerated agent contract for this package version. Enforcement remains ark-check / hooks / required CI.” |
176
180
  | Keep status counts honest | “Inventory and residual counts are evidence — not a health score.” |
177
181
  | Prefer deep modules | “Small interface, hide the complexity. Name the seam; test at the public interface.” |
@@ -189,7 +193,7 @@ gate → same binary verdict on every parity-capable adapter
189
193
  | “auto-refactor your whole app” / magic codemod claims | We never silent-apply plan B |
190
194
  | “modes you pick” for Suggest/Adapt/Enforce | Those are **status lights**, not settings |
191
195
  | Skill-shopping lists as the default curriculum | Progressive disclosure: one door first |
192
- | “Healthy / done” while design-weak | False done |
196
+ | “Healthy / done” while leftover design work remains | False done |
193
197
  | “Honesty clear” as “architecture finished” | Honesty clear only means residual honesty sensors are quiet; graph/mode debt is separate |
194
198
  | “Not finished” solely because host is Codex/Cursor | Soft-write is environment residual; do not paint a green whole-tree project as unfinished architecture |
195
199
  | “MCP installed / active” because a config file exists | Say **configured on disk · runtime unverified** until `ark_identity` matches the expected root |
@@ -233,16 +237,17 @@ Skills table in docs = **escapes / expert**, not a second onboarding track.
233
237
 
234
238
  ## Hero phrases (approved)
235
239
 
236
- - One contract. One gate. One co-pilot.
240
+ - One architecture config. One check. One coach.
237
241
  - Green must mean something real.
238
242
  - You arrive at Enforce; you never turn it on.
239
- - Enforce does not mean the design is elegant — only that checked edges are honest.
240
- - Empty plan A is not “architecture healthy” when design residual remains.
241
- - One pilot at a time. Pattern bets are never mechanical-safe.
243
+ - Enforce does not mean the design is elegant — only that checked imports are honest.
244
+ - A clean import check is not “architecture healthy” when leftover design work remains.
245
+ - One small refactor at a time. Pattern bets are never auto-applied.
242
246
  - Doctor is the control plane: status light + next action.
243
- - Scan is deterministic. Process is judgment. Only the gate decides pass/fail.
247
+ - The check is deterministic. Coaching is judgment. Only the gate decides pass/fail.
244
248
  - Guardrails are a catalog, not free generation.
245
- - Agent docs project the contract; they never replace the gate.
249
+ - Agent docs summarize the config; they never replace the gate.
250
+ - **ArkGate** and **ArkRules** are product names — gloss them; don’t invent a second brand.
246
251
 
247
252
  ## Hero phrases (forbidden)
248
253
 
@@ -263,15 +268,15 @@ Each model line follows the sentence template: **plain fact · term · next acti
263
268
 
264
269
  | Light | Model line |
265
270
  |-------|------------|
266
- | **Suggest** | Thin or new tree. Contract is not yet the control plane. Next: `ark start` preview, then `--apply`; re-run doctor. |
267
- | **Adapt** | Contract and tree still disagree, or debt is open. Write path does not fully protect you yet. Next: doctor top action #1. |
268
- | **Enforce** | Honest coverage and clean checked edges. Keep host write path + required CI. |
269
- | **Enforce · design-weak** | Checked edges are honest; design smells remain. Green is not elegant design. Next: one Shape door — map (`/ark-explore` shape-focus) → dual-plan B → apply B only with `/ark-autopilot` and OK. |
271
+ | **Suggest** | Thin or new tree. Architecture config is not yet in charge. Next: `ark start` preview, then `--apply`; re-run doctor. |
272
+ | **Adapt** | Config and tree still disagree, or debt is open. The write path does not fully protect you yet. Next: doctor top action #1. |
273
+ | **Enforce** | Honest coverage and clean checked imports. Keep the host write path + required CI. |
274
+ | **Enforce · leftover design work** | Import rules check out; design smells remain. Green is not elegant design. Next: one Shape door — map (`/ark-explore` shape-focus) → plan B → apply B only with `/ark-autopilot` and OK. |
270
275
 
271
276
  ### Primary next action
272
277
 
273
278
  - Lead with the **outcome**, then the **skill or command**, then the **constraint** (never mechanical-safe / never skill-shop).
274
- - When design-weak, rank the single Shape path first; do not list explore / coverage / think as equal first choices.
279
+ - When leftover design work remains, rank the single Shape path first; do not list explore / coverage / think as equal first choices.
275
280
 
276
281
  ### Deny / gate failure
277
282
 
@@ -283,8 +288,8 @@ Never: mock the user, imply the gate is optional, or suggest disabling rules to
283
288
 
284
289
  ### Healthy finished
285
290
 
286
- Print “Healthy — nothing to do” **only** when there is no design-weak residual and no open top actions.
287
- Otherwise name the residual.
291
+ Print “Healthy — nothing to do” **only** when there is no leftover design work and no open top actions.
292
+ Otherwise name the leftover work.
288
293
 
289
294
  ---
290
295
 
@@ -315,7 +320,8 @@ Keep dual-engine rules and **STOP** handoffs. Never claim silent full-tree resha
315
320
  - [ ] One next action is obvious.
316
321
  - [ ] Status light is not a mode picker.
317
322
  - [ ] No false done under design-weak / incomplete analysis.
318
- - [ ] Technical terms present (contract, gate, edges, pilot) without slang.
323
+ - [ ] Technical terms present (architecture config, import rules, ArkGate, ArkRules) without slang.
324
+ - [ ] Leftover design work is never called “done”.
319
325
  - [ ] Expert skills are labeled expert — not the default curriculum.
320
326
  - [ ] Scan vs process is not blurred with package LLM pass/fail.
321
327
  - [ ] Codes, sensors, and capabilities stay inside the guardrail catalog.
package/docs/use.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  For **anyone** shipping TypeScript with an AI coding agent. You do not need to study clean architecture first.
4
4
 
5
- **One contract. One gate. One co-pilot.**
5
+ **One architecture config. One check. One coach.**
6
6
 
7
7
  ---
8
8
 
@@ -21,7 +21,7 @@ Then keep working with your agent. The doctor is the **control plane**: when stu
21
21
  |-----------|---------|
22
22
  | Unsure | `npx arkgate-check --doctor` |
23
23
  | Agent broke architecture | Fix the edge doctor names (or re-run check) |
24
- | Code is green but still a mess | Shape residual — see below |
24
+ | Code is green but still a mess | Leftover design work — see below |
25
25
  | New ArkGate version | Follow doctor / upgrade guidance |
26
26
 
27
27
  Full skill pack is **optional** (expert depth). Day-to-day: compact router + doctor is enough.
@@ -47,7 +47,7 @@ In those cases a boundary linter or editor rules may be enough; see [README —
47
47
  |------|----------------|
48
48
  | While the AI writes | Host write gate or advisory MCP (depends on host) |
49
49
  | Before merge | Make the Ark job a **required GitHub status context** running `arkgate-check --strict-merge` (alias `ark-check`) |
50
- | Anytime | Doctor: Suggest / Adapt / Enforce (+ design-weak if residual) |
50
+ | Anytime | Doctor: Suggest / Adapt / Enforce (+ leftover design work if the design is still messy) |
51
51
 
52
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.
53
53
 
@@ -96,14 +96,16 @@ outside the package. **Enforce green ≠ feature done.**
96
96
 
97
97
  That is **Shape** work (plan B) — suggested, never auto-applied as silent magic.
98
98
 
99
- 1. Doctor confirms design-weak (and residual lenses on the improvement compass)
99
+ 1. Doctor confirms leftover design work (and residual lenses on the improvement compass)
100
100
  2. Guided map / dual plan (skill pack: `/ark-explore` then `/ark-autopilot` with your OK)
101
- 3. One pilot at a time · re-run doctor
101
+ 3. One small refactor at a time · re-run doctor
102
102
 
103
103
  Install skills only when you want that guided path:
104
104
 
105
105
  ```bash
106
106
  npx arkgate-check --install-agent-gates --skills-only --force
107
+ # optional: refresh shared Claude/Grok/Codex home skills (never downgrades)
108
+ # npx arkgate-check --install-agent-gates --skills-only --agent-homes --force
107
109
  ```
108
110
 
109
111
  ---
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "arkgate",
3
- "version": "4.5.7",
4
- "description": "ArkGate architecture co-pilot for AI TypeScript (write gate, CI gate, plan/loop; optional ArkRules)",
3
+ "version": "4.6.0",
4
+ "description": "ArkGate \u2014 architecture co-pilot for AI TypeScript (write gate, CI gate, plan/loop; optional ArkRules)",
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": "ArkGate \u2014 architecture co-pilot for AI TypeScript (write gate, CI, plan/loop)",
5
5
  "repository": {
6
6
  "url": "https://github.com/pedroknigge/arkgate",
7
7
  "source": "github"
8
8
  },
9
- "version": "4.5.7",
9
+ "version": "4.6.0",
10
10
  "packages": [
11
11
  {
12
12
  "registryType": "npm",
13
13
  "identifier": "arkgate",
14
- "version": "4.5.7",
14
+ "version": "4.6.0",
15
15
  "runtimeHint": "npx",
16
16
  "transport": {
17
17
  "type": "stdio"
@@ -7,7 +7,7 @@
7
7
  This directory is the **Agent Skills–compatible** packaging of the same **13**
8
8
  `/ark-*` skills shipped as flat templates for Ark install. **No new skill names.**
9
9
 
10
- Package version when last generated context: **arkgate@4.5.6**
10
+ Package version when last generated context: **arkgate@4.6.0**
11
11
  Schema: agent-skills package contract `1.0`
12
12
 
13
13
  ## Skills (frozen catalog)
@@ -190,7 +190,7 @@ Status lights from doctor — not settings you choose. Rank residual honestly:
190
190
  | **Suggest** | Thin/new tree; contract not control plane | Finish `ark start` → re-doctor; do not skill-shop |
191
191
  | **Adapt** | Contract/tree disagree or debt open | Explore + adopt/loop/contract; do not claim guarded |
192
192
  | **Enforce** | Honest coverage + clean checked **edges** | Confirm gates + CI; emit dual-plan B only if residual found |
193
- | **Enforce · design-weak** | Edges clean; design smells remain | **Primary Shape door:** explore shape-focus → dual-plan **B** → apply **one** pilot with user OK. Empty plan A ≠ done. Never mechanical-safe B. False-done forbidden. |
193
+ | **Enforce · leftover design work** | Imports clean; design still messy | **Primary Shape door:** explore shape-focus → dual-plan **B** → apply **one** small refactor with user OK. Empty plan A ≠ done. Never mechanical-safe B. False-done forbidden. |
194
194
 
195
195
  - **Setup (Suggest):** no config → `ark start` (start freezes origin after config, before gates).
196
196
  - **Align (Adapt):** open debt, low honesty, or false-green → explore + adopt/loop; do not claim “guarded”.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: ark-explore
3
- description: Specialized map skill — decision-grade recon of layers + ArkRules opportunities + dual-plan seed (no apply). Primary post-green door when design-weak. Not the default day-to-day path (use doctor + place/gate; guided apply is /ark-autopilot). CLI is a sensor; you read the tree. No gate bypass.
3
+ description: Specialized map skill — decision-grade recon of layers + ArkRules opportunities + dual-plan seed (no apply). Primary post-green door when leftover design work remains. Not the default day-to-day path (use doctor + place/gate; guided apply is /ark-autopilot). CLI is a sensor; you read the tree. No gate bypass.
4
4
  ---
5
5
 
6
6
  # /ark-explore — Recon the real project (map only)
@@ -23,7 +23,7 @@ Name 1–3 **residual** lenses in plain language before skill-shopping. Always `
23
23
 
24
24
  **What the user should feel next:** fewer blocked AI writes, clearer folders, safer domain — then jargon.
25
25
 
26
- **Anti false-done:** empty plan A + residual lenses / design-weak → **Incomplete? yes**. Green edges alone
26
+ **Anti false-done:** empty plan A + leftover design work → **Incomplete? yes**. Green imports alone
27
27
  are not “architecture finished.”
28
28
 
29
29
  **AI-easy architecture:** ports over concrete I/O in domain; one concern per module; golden pattern for
@@ -59,12 +59,12 @@ If the consumer tree has a **domain glossary**, prefer its terms for layer/slice
59
59
  | Use `/ark-explore` when… | Do **not** use it when… |
60
60
  |--------------------------|-------------------------|
61
61
  | Map / “what next?” / residual after ENFORCE | User wants edits applied → `/ark-autopilot` or `/ark-fix` |
62
- | **Primary post-green door:** messy / spaghetti / design-weak / “clarify for AI” | Skill-shopping coverage or think for the same residual |
62
+ | **Primary post-green door:** messy / leftover design work / “clarify for AI” | Skill-shopping coverage or think for the same leftover work |
63
63
  | Spaghetti brownfield: patterns concurrent, design-weak under green check | Only “governed% + gates installed?” numbers → `/ark-coverage` |
64
64
  | Dual-plan **seed** (A remediation + B pattern bets) without applying | One design trade-off between 2–3 options already mapped → `/ark-think` |
65
65
  | Path-correct vs design-correct honesty | Plain-language tour / HTML report → `/ark-explain` |
66
66
 
67
- **Post-green single path:** when doctor `postGreenPath` / ENFORCE · design-weak is active, **this skill
67
+ **Post-green single path:** when doctor `postGreenPath` / ENFORCE · leftover design work is active, **this skill
68
68
  (shape-focus / dual-plan seed) is the map half of the one door** — then `/ark-autopilot` only
69
69
  to apply B with user OK. Do not send the user to coverage or think as equal first choices.
70
70
 
@@ -75,7 +75,7 @@ to apply B with user OK. Do not send the user to coverage or think as equal firs
75
75
  | **Suggest** | Point at `ark start` → doctor; map only if user insists on recon before setup |
76
76
  | **Adapt** | Map false-green / ungoverned / concentrated edge; hand off adopt/contract before Shape vanity |
77
77
  | **Enforce** | Confirm edges; if residual smells/patterns appear, auto-upgrade to dual-plan seed / shape-focus |
78
- | **Enforce · design-weak** | **Primary post-green map door** — shape-focus + dual-plan B + extraction cards. False-done forbidden. Never claim healthy because plan A is empty. |
78
+ | **Enforce · leftover design work** | **Primary post-green map door** — shape-focus + dual-plan B + extraction cards. False-done forbidden. Never claim healthy because plan A is empty. |
79
79
 
80
80
  `/ark-autopilot`, `/ark-adopt`, and `/ark-coverage` embed a **lighter** version of this pass.
81
81
  **You** are the full recon + pattern-planning skill.
@@ -21,7 +21,7 @@ Name 1–3 **residual** lenses in plain language before skill-shopping. Always `
21
21
 
22
22
  **What the user should feel next:** fewer blocked AI writes, clearer folders, safer domain — then jargon.
23
23
 
24
- **Anti false-done:** empty plan A + residual lenses / design-weak → **Incomplete? yes**. Green edges alone
24
+ **Anti false-done:** empty plan A + leftover design work → **Incomplete? yes**. Green imports alone
25
25
  are not “architecture finished.”
26
26
 
27
27
  **AI-easy architecture:** ports over concrete I/O in domain; one concern per module; golden pattern for
@@ -58,6 +58,7 @@ Never invent gate verdicts from these suggestions. Missing residual is honest em
58
58
  | Skills customized after install | Preserved by default. Preview `skillDrift` shows counts. **`--refresh-skills`** rewrites customized *skills* only with consent. |
59
59
  | Conflicted managed assets | Still need `--accept-conflicts`. Never silent overwrite of true edits. |
60
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
+ | Stale `~/.claude/skills` or `~/.grok/skills` | Shared homes should be the newest ArkGate on the machine (additive; never downgrade). Refresh: `--install-agent-gates --skills-only --agent-homes --force`. Project skills may lag with the pin. |
61
62
  | Active host not in `--tools` / manifest | Preview `hostSelection` notes it and suggests `--tools` expansion. |
62
63
 
63
64
  **Post-apply:** read `postUpgradeChecks` (advisory). Confirm pin↔CLI, run doctor (compass + deepModuleCoach),
@@ -190,7 +190,7 @@ Status lights from doctor — not settings you choose. Rank residual honestly:
190
190
  | **Suggest** | Thin/new tree; contract not control plane | Finish `ark start` → re-doctor; do not skill-shop |
191
191
  | **Adapt** | Contract/tree disagree or debt open | Explore + adopt/loop/contract; do not claim guarded |
192
192
  | **Enforce** | Honest coverage + clean checked **edges** | Confirm gates + CI; emit dual-plan B only if residual found |
193
- | **Enforce · design-weak** | Edges clean; design smells remain | **Primary Shape door:** explore shape-focus → dual-plan **B** → apply **one** pilot with user OK. Empty plan A ≠ done. Never mechanical-safe B. False-done forbidden. |
193
+ | **Enforce · leftover design work** | Imports clean; design still messy | **Primary Shape door:** explore shape-focus → dual-plan **B** → apply **one** small refactor with user OK. Empty plan A ≠ done. Never mechanical-safe B. False-done forbidden. |
194
194
 
195
195
  - **Setup (Suggest):** no config → `ark start` (start freezes origin after config, before gates).
196
196
  - **Align (Adapt):** open debt, low honesty, or false-green → explore + adopt/loop; do not claim “guarded”.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: ark-explore
3
- description: Specialized map skill — decision-grade recon of layers + ArkRules opportunities + dual-plan seed (no apply). Primary post-green door when design-weak. Not the default day-to-day path (use doctor + place/gate; guided apply is /ark-autopilot). CLI is a sensor; you read the tree. No gate bypass.
3
+ description: Specialized map skill — decision-grade recon of layers + ArkRules opportunities + dual-plan seed (no apply). Primary post-green door when leftover design work remains. Not the default day-to-day path (use doctor + place/gate; guided apply is /ark-autopilot). CLI is a sensor; you read the tree. No gate bypass.
4
4
  ---
5
5
 
6
6
  # /ark-explore — Recon the real project (map only)
@@ -23,7 +23,7 @@ Name 1–3 **residual** lenses in plain language before skill-shopping. Always `
23
23
 
24
24
  **What the user should feel next:** fewer blocked AI writes, clearer folders, safer domain — then jargon.
25
25
 
26
- **Anti false-done:** empty plan A + residual lenses / design-weak → **Incomplete? yes**. Green edges alone
26
+ **Anti false-done:** empty plan A + leftover design work → **Incomplete? yes**. Green imports alone
27
27
  are not “architecture finished.”
28
28
 
29
29
  **AI-easy architecture:** ports over concrete I/O in domain; one concern per module; golden pattern for
@@ -59,12 +59,12 @@ If the consumer tree has a **domain glossary**, prefer its terms for layer/slice
59
59
  | Use `/ark-explore` when… | Do **not** use it when… |
60
60
  |--------------------------|-------------------------|
61
61
  | Map / “what next?” / residual after ENFORCE | User wants edits applied → `/ark-autopilot` or `/ark-fix` |
62
- | **Primary post-green door:** messy / spaghetti / design-weak / “clarify for AI” | Skill-shopping coverage or think for the same residual |
62
+ | **Primary post-green door:** messy / leftover design work / “clarify for AI” | Skill-shopping coverage or think for the same leftover work |
63
63
  | Spaghetti brownfield: patterns concurrent, design-weak under green check | Only “governed% + gates installed?” numbers → `/ark-coverage` |
64
64
  | Dual-plan **seed** (A remediation + B pattern bets) without applying | One design trade-off between 2–3 options already mapped → `/ark-think` |
65
65
  | Path-correct vs design-correct honesty | Plain-language tour / HTML report → `/ark-explain` |
66
66
 
67
- **Post-green single path:** when doctor `postGreenPath` / ENFORCE · design-weak is active, **this skill
67
+ **Post-green single path:** when doctor `postGreenPath` / ENFORCE · leftover design work is active, **this skill
68
68
  (shape-focus / dual-plan seed) is the map half of the one door** — then `/ark-autopilot` only
69
69
  to apply B with user OK. Do not send the user to coverage or think as equal first choices.
70
70
 
@@ -75,7 +75,7 @@ to apply B with user OK. Do not send the user to coverage or think as equal firs
75
75
  | **Suggest** | Point at `ark start` → doctor; map only if user insists on recon before setup |
76
76
  | **Adapt** | Map false-green / ungoverned / concentrated edge; hand off adopt/contract before Shape vanity |
77
77
  | **Enforce** | Confirm edges; if residual smells/patterns appear, auto-upgrade to dual-plan seed / shape-focus |
78
- | **Enforce · design-weak** | **Primary post-green map door** — shape-focus + dual-plan B + extraction cards. False-done forbidden. Never claim healthy because plan A is empty. |
78
+ | **Enforce · leftover design work** | **Primary post-green map door** — shape-focus + dual-plan B + extraction cards. False-done forbidden. Never claim healthy because plan A is empty. |
79
79
 
80
80
  `/ark-autopilot`, `/ark-adopt`, and `/ark-coverage` embed a **lighter** version of this pass.
81
81
  **You** are the full recon + pattern-planning skill.