arkgate 4.7.0 → 4.7.2

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 (55) hide show
  1. package/CHANGELOG.md +53 -2
  2. package/README.md +32 -23
  3. package/bin/lib/agent-projection.mjs +1 -1
  4. package/bin/lib/agent-skills-package.mjs +29 -0
  5. package/bin/lib/check-args.mjs +1 -0
  6. package/bin/lib/ci-and-commands.mjs +3 -3
  7. package/bin/lib/doctor-next-actions.mjs +5 -1
  8. package/bin/lib/enforcement-honesty.mjs +1 -1
  9. package/bin/lib/first-run-help.mjs +5 -5
  10. package/bin/lib/install-migrate.mjs +29 -57
  11. package/bin/lib/managed-upgrade.mjs +2 -7
  12. package/bin/lib/skill-catalog-apply.mjs +126 -0
  13. package/bin/lib/skill-install.mjs +264 -33
  14. package/bin/lib/skill-write.mjs +3 -0
  15. package/dist/index.cjs +25 -25
  16. package/dist/index.d.ts +19 -2
  17. package/dist/index.js +19 -19
  18. package/docs/README.md +8 -5
  19. package/docs/agent-guide.md +6 -5
  20. package/docs/ai-gates.md +4 -3
  21. package/docs/develop.md +4 -0
  22. package/docs/enthusiast/README.md +3 -0
  23. package/docs/enthusiast/how-to-agent-gates.md +1 -1
  24. package/docs/package-surface.md +6 -3
  25. package/docs/product-voice.md +118 -5
  26. package/docs/use.md +15 -8
  27. package/package.json +2 -2
  28. package/server.json +4 -4
  29. package/templates/agent-skills/README.md +1 -1
  30. package/templates/agent-skills/ark-adopt/SKILL.md +2 -2
  31. package/templates/agent-skills/ark-architect/SKILL.md +1 -1
  32. package/templates/agent-skills/ark-autopilot/SKILL.md +2 -2
  33. package/templates/agent-skills/ark-contract/SKILL.md +8 -7
  34. package/templates/agent-skills/ark-coverage/SKILL.md +1 -1
  35. package/templates/agent-skills/ark-explain/SKILL.md +1 -1
  36. package/templates/agent-skills/ark-explore/SKILL.md +1 -1
  37. package/templates/agent-skills/ark-fix/SKILL.md +1 -1
  38. package/templates/agent-skills/ark-loop/SKILL.md +1 -1
  39. package/templates/agent-skills/ark-place/SKILL.md +1 -1
  40. package/templates/agent-skills/ark-runtime/SKILL.md +1 -1
  41. package/templates/agent-skills/ark-think/SKILL.md +1 -1
  42. package/templates/agent-skills/ark-upgrade/SKILL.md +1 -1
  43. package/templates/skills/ark-adopt.md +2 -2
  44. package/templates/skills/ark-architect.md +1 -1
  45. package/templates/skills/ark-autopilot.md +2 -2
  46. package/templates/skills/ark-contract.md +8 -7
  47. package/templates/skills/ark-coverage.md +1 -1
  48. package/templates/skills/ark-explain.md +1 -1
  49. package/templates/skills/ark-explore.md +1 -1
  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 +1 -1
  53. package/templates/skills/ark-runtime.md +1 -1
  54. package/templates/skills/ark-think.md +1 -1
  55. package/templates/skills/ark-upgrade.md +1 -1
package/docs/README.md CHANGED
@@ -1,6 +1,8 @@
1
1
  # ArkGate documentation
2
2
 
3
- **ArkGate** keeps AI-written TypeScript inside an architecture you can trust.
3
+ **If the AI writes an illegal import, the write is rejected. The same check fails the pull request.**
4
+ Not an API Gateway. Not a folder linter. If the check is not required on the PR, the rules
5
+ file is just documentation.
4
6
 
5
7
  Pick your path. Skip everything else.
6
8
 
@@ -53,14 +55,14 @@ These are **not** the day-to-day product path. They stay in the repo for evidenc
53
55
  | Area | Path |
54
56
  |------|------|
55
57
  | Release notes (by version) | [releases/](releases/) · npm [CHANGELOG.md](../CHANGELOG.md) (Unreleased + 4.6.x) · [pre-4.6 archive](archive/CHANGELOG-pre-4.6.md) |
56
- | Epic plans | [plans/](plans/) — maintainer seeds, not required to use the package. Live: [alive-in-six-months](plans/alive-in-six-months/README.md) (`AL01`–`AL04` done; `AL05` parked). [arkrun](plans/arkrun/README.md) (Phase RN; `RN01`–`RN15` done; `RN16` preparing **4.7.0**; ADRs [0020](adr/0020-arkrun-gated-extra-plane.md)–[0024](adr/0024-arkrun-transport-ports.md) accepted). |
58
+ | Epic plans | [plans/](plans/) — maintainer seeds, not required to use the package. Live: [alive-in-six-months](plans/alive-in-six-months/README.md) (`AL01`–`AL04` done; `AL05` parked). [arkrun](plans/arkrun/README.md) (Phase RN; `RN01`–`RN16` done; shipped **4.7.0**; ADRs [0020](adr/0020-arkrun-gated-extra-plane.md)–[0024](adr/0024-arkrun-transport-ports.md) accepted). [one-catalog-one-root](plans/one-catalog-one-root/README.md) (Phase HS; `HS01`–`HS05` done; shipped **4.7.1**). |
57
59
  | Claims audit | [audit/claims-matrix.md](audit/claims-matrix.md) |
58
60
  | Field adoption kit (scaffolding, not closed) | [field/](field/) |
59
61
  | Runtime hardening (experimental) | [production-hardening.md](production-hardening.md) |
60
62
 
61
- Current tree: [releases/4.7.0.md](releases/4.7.0.md) (`arkgate@4.7.0` prepared).
62
- Current published: [releases/4.6.7.md](releases/4.6.7.md) (`arkgate@4.6.7` on npm `latest`).
63
- Prior: [releases/4.6.6.md](releases/4.6.6.md) · [4.6.5](releases/4.6.5.md) · [4.6.4](releases/4.6.4.md) · [4.6.3](releases/4.6.3.md) · [4.6.2](releases/4.6.2.md) · [4.6.1](releases/4.6.1.md) · [4.6.0](releases/4.6.0.md).
63
+ Current tree: [releases/4.7.2.md](releases/4.7.2.md) (`arkgate@4.7.2`, prepared).
64
+ Current published: [releases/4.7.1.md](releases/4.7.1.md) (`arkgate@4.7.1` on npm `latest`).
65
+ Prior: [releases/4.7.0.md](releases/4.7.0.md) · [4.6.7](releases/4.6.7.md) · [4.6.6](releases/4.6.6.md) · [4.6.5](releases/4.6.5.md) · [4.6.4](releases/4.6.4.md) · [4.6.3](releases/4.6.3.md) · [4.6.2](releases/4.6.2.md) · [4.6.1](releases/4.6.1.md) · [4.6.0](releases/4.6.0.md).
64
66
  Older notes: [releases/](releases/). Config: [configuration.md](configuration.md).
65
67
 
66
68
  ---
@@ -71,3 +73,4 @@ Older notes: [releases/](releases/). Config: [configuration.md](configuration.md
71
73
  2. **One primary flow** — `start` → doctor → optional guided work.
72
74
  3. **Honest hardness** — host write guarantees differ; a **required GitHub status context** running the merge CLI is the shared hard boundary.
73
75
  4. **History is not the product** — version archaeology lives under `releases/` and `plans/`, not the front door.
76
+ 5. **Common language** — first-contact copy uses ordinary software words (import rules, rejected write, required CI). Brands are categorical. Voice: [product-voice.md](product-voice.md).
@@ -1,7 +1,8 @@
1
1
  # ArkGate — Agent Integration Guide
2
2
 
3
- **ArkGate** (`arkgate`) architecture co-pilot for AI TypeScript. This guide is the **develop**
4
- reference for agents and codegen: write hooks, advisory MCP tools, CI, and `/ark-*` skills.
3
+ **If the AI writes an illegal import, the write is rejected. The same check fails the pull request.**
4
+ This guide is the **develop** reference for agents and codegen: write hooks, advisory MCP tools,
5
+ CI, and `/ark-*` skills. Not an API Gateway. Not a folder linter.
5
6
 
6
7
  - Product path (anyone): [use.md](use.md)
7
8
  - Integration overview: [develop.md](develop.md)
@@ -28,7 +29,7 @@ ark start → ark start --apply → ark-check --doctor
28
29
  optional: arkRules map + arkrules/*.json (intra-layer; starts advisory)
29
30
  ```
30
31
 
31
- Doctor is the **control plane** (status light + primary next action). From **4.0.0**, doctor may
32
+ `arkgate-check --doctor` shows what's wrong and what to do first. From **4.0.0**, doctor may
32
33
  also report **`rulesUnderContract`** (ArkRules counts) and **`packageVersionTruth`** when the
33
34
  CLI is ahead of the package.json pin. The compact router from `ark start` is enough for normal
34
35
  feature work. Full `/ark-*` skills are **expert depth** and label residual **`[Layer]`** vs
@@ -540,7 +541,7 @@ reference, and explanation for the full path (recommend → init → gallery →
540
541
 
541
542
  ### Agent workflow (before codegen)
542
543
 
543
- **Default path first:** `ark start` → `ark start --apply` → `ark-check --doctor`. Doctor’s primary next action is the control plane; do not skill-shop around it.
544
+ **Default path first:** `ark start` → `ark start --apply` → `ark-check --doctor`. Do action #1; do not skill-shop around it.
544
545
 
545
546
  Greenfield / empty-tree **depth** (only when doctor or a thin tree points here — not a second day-zero curriculum):
546
547
 
@@ -626,7 +627,7 @@ npx arkgate-check --install-agent-gates --tools claude,cursor,codex,grok,antigra
626
627
  | Host | Installed paths | Skills path |
627
628
  |------|-----------------|-------------|
628
629
  | 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`) |
629
- | Cursor | `.cursor/mcp.json` + `.cursor/rules/ark.mdc` | `.cursor/commands/` (Cursor also loads Claude **home** skills from `~/.claude/skills`) |
630
+ | Cursor | `.cursor/mcp.json` + `.cursor/rules/ark.mdc` | **Repo:** `.agents/skills/<name>/SKILL.md` (same catalog as Codex). Do not also copy into `.cursor/commands/` or `$CODEX_HOME/skills` — Cursor lists every path it scans. |
630
631
  | 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`) |
631
632
  | **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`) |
632
633
  | Google Antigravity | `.agents/hooks.json` (+ `GEMINI.md` for shared Gemini consumers) | `.agents/skills/<name>/SKILL.md` |
package/docs/ai-gates.md CHANGED
@@ -1,6 +1,7 @@
1
1
  # Gating AI Agents with ArkGate
2
2
 
3
- **ArkGate** (`arkgate`) is the architecture co-pilot for AI TypeScript (write gate · CI · plan/loop).
3
+ **If the AI writes an illegal import, the write is rejected. The same check fails the pull request.**
4
+ This page is host install depth (hooks / MCP / CI). Not an API Gateway. Not a folder linter.
4
5
 
5
6
  This page is **develop** depth (install hooks/MCP/CI per host). Product path: [use.md](use.md) ·
6
7
  overview: [develop.md](develop.md) · hub: [README.md](README.md).
@@ -449,7 +450,7 @@ writes a scoped secondary table:
449
450
  | Add B to the legacy home fallback | `ark-check --install-agent-gates --codex-home` |
450
451
  | Make B the legacy home primary | `ark-check --install-agent-gates --codex-home --force` |
451
452
  | Doctor: primary points at another permanent project | gap id `codex-home-multi-project` (warn if no secondary yet and session host is unknown/Codex; **info + `deferred`** when the session host is known and not Codex — e.g. Grok/Claude/Cursor; info if a scoped secondary is already present) |
452
- | When using Codex: refresh home skills | `ark-check --install-agent-gates --skills-only --codex-home --force` |
453
+ | When using Codex: refresh home skills | Prefer project `.agents/skills`. If Codex lists `/ark-*` twice, prune home copies: `ark-check --install-agent-gates --skills-only --prune-home-duplicates`. `--codex-home` skips when the project catalog exists. |
453
454
 
454
455
  When a valid project `.codex/config.toml` exists, it is the expected binding, but files alone
455
456
  cannot prove which already-running process answered. Doctor therefore keeps an unrelated home
@@ -488,7 +489,7 @@ Codex discovers skills as directories containing `SKILL.md` (Agent Skills standa
488
489
  | Scope | Path |
489
490
  |-------|------|
490
491
  | **Repo** (written by `--tools codex`) | `.agents/skills/<name>/SKILL.md` |
491
- | **Home** (optional `--codex-home`) | `$CODEX_HOME/skills/<name>/SKILL.md` |
492
+ | **Home** (optional `--codex-home`) | `$CODEX_HOME/skills/<name>/SKILL.md` — skipped when the project catalog exists; Codex lists both otherwise |
492
493
 
493
494
  Flat `.codex/prompts/*.md` files are **not** the invocable skill catalog. Install writes the
494
495
  repo catalog above so AGENTS.md `/ark-*` references match what Codex can load. After install,
package/docs/develop.md CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
  For **developers** integrating ArkGate into a product repo: agents, CI, config, brownfield, and power tools.
4
4
 
5
+ If the AI writes an illegal import, the write is rejected. The same check fails the pull
6
+ request. Not an API Gateway. Not a folder linter. Without a required CI status,
7
+ `ark.config.json` is just documentation.
8
+
5
9
  If you only want the happy path, start at [use.md](use.md).
6
10
 
7
11
  ---
@@ -1,5 +1,8 @@
1
1
  # ArkGate — Architecture Co-pilot (enthusiast track)
2
2
 
3
+ If the AI writes an illegal import, the write is rejected. The same check fails the pull
4
+ request. Not an API Gateway. Not a folder linter.
5
+
3
6
  Plain-language onboarding for builders who use AI agents but are not professional
4
7
  developers. This track follows [Diátaxis](https://diataxis.fr/): tutorial, how-to,
5
8
  reference, and explanation. Package: **`arkgate`** (CLI: `arkgate` / `arkgate-check`;
@@ -21,7 +21,7 @@ Installs:
21
21
  | Host | Extra paths |
22
22
  |------|-------------|
23
23
  | Claude Code | `.claude/settings.json`, `.claude/skills/` |
24
- | Cursor | `.cursor/mcp.json`, `.cursor/hooks.json`, `.cursor/rules/ark.mdc`, `.cursor/commands/` |
24
+ | Cursor | `.cursor/mcp.json`, `.cursor/hooks.json`, `.cursor/rules/ark.mdc`, `.agents/skills/` |
25
25
  | Codex | `.codex/hooks.json`, `.codex/config.toml`, `.agents/skills/` |
26
26
  | **Grok Build** | `.grok/config.toml`, `.grok/hooks/`, `.grok/skills/` |
27
27
 
@@ -1,6 +1,7 @@
1
1
  # ArkGate package surface policy
2
2
 
3
- **Product wedge:** write gate · CI gate · co-pilot (plan / loop / skills).
3
+ **If the AI writes an illegal import, the write is rejected. The same check fails the pull request.**
4
+ That is the product wedge (host hook + required CI). Skills name the next step after that.
4
5
  **Not the wedge:** the optional in-process **ArkRun** kernel (`@arkgate/runtime`).
5
6
 
6
7
  **Public product site:** [arkgate.online](https://www.arkgate.online/) (promise + only flow).
@@ -213,8 +214,10 @@ production deployment would need to satisfy; it is not a readiness certification
213
214
  ## Release notes (maintainers)
214
215
 
215
216
  Ship notes for a version live under [releases/](https://github.com/pedroknigge/arkgate/tree/main/docs/releases)
216
- (current tree: [4.7.0.md](https://github.com/pedroknigge/arkgate/blob/main/docs/releases/4.7.0.md);
217
- current published: [4.6.7.md](https://github.com/pedroknigge/arkgate/blob/main/docs/releases/4.6.7.md);
217
+ (current tree: [4.7.2.md](https://github.com/pedroknigge/arkgate/blob/main/docs/releases/4.7.2.md);
218
+ current published: [4.7.1.md](https://github.com/pedroknigge/arkgate/blob/main/docs/releases/4.7.1.md);
219
+ prior published: [4.7.0.md](https://github.com/pedroknigge/arkgate/blob/main/docs/releases/4.7.0.md);
220
+ prior published: [4.6.7.md](https://github.com/pedroknigge/arkgate/blob/main/docs/releases/4.6.7.md);
218
221
  prior published: [4.6.6.md](https://github.com/pedroknigge/arkgate/blob/main/docs/releases/4.6.6.md);
219
222
  prior published: [4.6.5.md](https://github.com/pedroknigge/arkgate/blob/main/docs/releases/4.6.5.md);
220
223
  prior published: [4.6.4.md](https://github.com/pedroknigge/arkgate/blob/main/docs/releases/4.6.4.md);
@@ -11,13 +11,106 @@ deliberately in the same change). Voice is product surface, not marketing decora
11
11
 
12
12
  ---
13
13
 
14
+ ## Canonical misreader (old-school engineer)
15
+
16
+ First-contact copy has a **named test reader**: a senior who learned Fowler, ESLint, and CI
17
+ quality gates — and does not live in agent hosts. If they can walk away with any of the
18
+ three documented misreads, the line failed. Rewrite it. Do not argue the config at them.
19
+
20
+ This reader is not a junior to educate and not a vibe-coder to simplify for. They are why
21
+ “gate”, “contract”, and “architecture config” in the first sentence lose the room.
22
+
23
+ ### Misread A — “file structure keeper for TypeScript”
24
+
25
+ **Cause:** the first sentence is folders, layers, `ark.config.json`, or “who may import whom.”
26
+ **They hear:** eslint-plugin-boundaries, dependency-cruiser, Nx tags.
27
+
28
+ The layer plane *is* import rules. That is not the product. The product is **when** those
29
+ rules fire: the host blocks the write; required CI blocks the merge.
30
+
31
+ ### Misread B — “a Gateway”
32
+
33
+ **Cause:** bare “gate” as the first unexplained noun; or verbs from the wrapper family:
34
+ access, wrap, abstract, “extend without touching what it represents.”
35
+ **They hear:** Fowler Gateway / API Gateway / facade — an intermediate object that talks
36
+ to a resource so callers do not.
37
+
38
+ A Gateway **lets traffic through and translates**. ArkGate **decides whether the write
39
+ enters**. It is not a layer in the app. It does not wrap Stripe, a database, or HTTP.
40
+
41
+ ### Misread C — “not a contract, a manifesto”
42
+
43
+ **Cause:** calling `ark.config.json` a **contract** (or leading with the file) before the
44
+ deny is visible.
45
+ **They hear:** Agile Manifesto, a principles doc, AGENTS.md — intent you hope people follow.
46
+
47
+ They are right whenever the checkpoint is off. A contract in this reader’s dictionary has
48
+ two parties and a consequence. Ours is: the host blocks the write; required CI blocks the
49
+ merge. Without that, the file **is** a manifesto. Do not win the argument by repeating
50
+ “it is a contract.” Show the teeth. Human copy already prefers **architecture config**
51
+ over contract; **law / constitution** only after the checkpoint is named.
52
+
53
+ Advisory-only adoption (`stance: "advisory-only"`, or no required merge status) is the
54
+ honest manifesto case. Say so. Do not dress it as a binding contract.
55
+
56
+ ### First-contact order (required)
57
+
58
+ On README, `docs/use.md`, develop, enthusiast, the docs hub, and the product site, use
59
+ **common software English**. Do not invent a synonym and then explain it.
60
+
61
+ **Locked sentences:**
62
+
63
+ 1. **Deny:** `If the AI writes an illegal import, the write is rejected. The same check fails the pull request.`
64
+ 2. **Not-that (one line):** `Not an API Gateway. Not a folder linter. If the check is not required on the PR, the rules file is just documentation.`
65
+ 3. **How:** `One rules file. One check. One next step.`
66
+
67
+ The 4.6.2 line `One architecture config. One check. One coach.` is **historical**. Do not
68
+ lead with it. First-run CLI help stays under the AL04 noun budget.
69
+
70
+ ADR 0001 keeps the product title **ArkGate — Architecture Co-pilot for AI TypeScript**.
71
+ That identity line is not a substitute for the deny.
72
+
73
+ ---
74
+
75
+ ## Common language (allowlist)
76
+
77
+ First-contact copy (README hero, use/develop/hub openings, site home / start / how-it-works
78
+ heroes, npm description, `llms.txt` lede) may use **only** these kinds of words:
79
+
80
+ | Say | Do not say on first contact |
81
+ |-----|-----------------------------|
82
+ | illegal import / import rules / who may import whom | architecture config, contract, constitution, law |
83
+ | the write is rejected / the hook rejects the write | write checkpoint, write gate, write firewall, pre-write block |
84
+ | required CI check / fails the pull request / required GitHub status | merge gate, extra merge teeth |
85
+ | rules file (`ark.config.json`) | the contract, the manifesto (except the one honest “just documentation” line) |
86
+ | `arkgate-check --doctor` — shows what's wrong and what to do first | doctor is the control plane, coach, co-pilot |
87
+ | warning, not blocked | advisory write |
88
+ | extra rules inside a layer | dual plane, intra-layer sensors |
89
+ | optional extra (off unless you turn it on) | third extra, gated complement |
90
+
91
+ **Categorical brands** (do not hide, do not replace with a synonym): **ArkGate**, **ArkRules**
92
+ (opt-in extra rules inside a layer), **ArkRun** (opt-in; not required). Gloss once. Then the
93
+ common word.
94
+
95
+ **Command names stay command names:** `arkgate`, `arkgate-check --doctor`, `--strict-merge`.
96
+ Do not nickname them.
97
+
98
+ If a term is not on this allowlist and is not a brand or a command, **cut it** or move it
99
+ below the fold (develop docs, JSON field names, ADRs).
100
+
101
+ Where we cannot use a common word — because the thing is ours — **one sentence, no hedging:**
102
+ “ArkRules is optional. It is extra rules inside a layer. It is off unless you turn it on.”
103
+
104
+ ---
105
+
14
106
  ## North star
15
107
 
16
108
  A track so simple a newcomer enters, so strict a senior trusts — and the AI ships faster
17
109
  because the design space is small and honest.
18
110
 
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.
111
+ - **Checkpoint side (write checkpoint deny / pass; not a Gateway):** architecture
112
+ config (`ark.config.json`) + pre-write block where the host supports it + required CI.
113
+ Deterministic. Don’t show green if we could not verify.
21
114
  Two planes: **import rules** (who may import whom) always; **ArkRules** (structure rules
22
115
  inside a layer) opt-in. Third extra: **ArkRun** (kernel usage + declarations) via companion
23
116
  `@arkgate/runtime` — not a durability claim.
@@ -25,7 +118,7 @@ because the design space is small and honest.
25
118
  design work; one small refactor at a time; never silent auto-reshape; never weaken the config.
26
119
  - **Five-door autonomy:** invoking `/ark-adopt`, `/ark-place`, `/ark-autopilot`, `/ark-explore`,
27
120
  or `/ark-upgrade` **is** the approval. The agent writes or maps in that turn. CLI/MCP are
28
- sensor + gate. Silent reshape from the compact router (unasked) stays forbidden.
121
+ sensor + checkpoint. Silent reshape from the compact router (unasked) stays forbidden.
29
122
  - **Team parliament:** the architecture file is a **constitution**. A product change must not
30
123
  amend it. Stewards own loosen and baseline-grow. The ratchet is **new vs the branch you
31
124
  merge to**, not only the file on this checkout. A small PR pays `--changed --base`, not
@@ -73,7 +166,8 @@ stay stable unless a change explicitly adds an alias.
73
166
 
74
167
  | Prefer (human) | Was / JSON | Use for |
75
168
  |----------------|------------|---------|
76
- | **architecture config** | contract | `ark.config.json` layers, rules, include |
169
+ | **architecture config** | contract | `ark.config.json` layers, rules, include. Never the first noun. Without the checkpoint, this reader hears **manifesto** |
170
+ | **manifesto** (honesty only) | advisory-only / no required CI | What the file is until a write checkpoint binds it. Never the product name |
77
171
  | **import rules** / **allowed dependencies** | Layers plane / edges | Who may import whom; placement, purity, isolation |
78
172
  | **ArkRules** (opt-in; gloss: structure rules inside a layer) | ArkRules | Intra-layer sensors + domain invariant catalogs (`arkrules/*`) |
79
173
  | **ArkRun** (opt-in; gloss: kernel usage + complete declarations) | arkRun | Extra plane on the gate; companion kernel is `@arkgate/runtime`; factory `createStrictArkKernel` (per instance, no singleton). Never a score. |
@@ -82,6 +176,7 @@ stay stable unless a change explicitly adds an alias.
82
176
  | **label `[Layer]` vs `[ArkRules]`** | dual-plane residual | Never blur import-rule findings with ArkRules findings |
83
177
  | **ArkRules counts** | rulesUnderContract | Doctor/inventory counts — **never a score** |
84
178
  | **type-only import debt** | type-only placement debt | `import type` on the violations list with `failsStrict:false` |
179
+ | **write checkpoint** | gate (as first noun) | Pass/fail boundary: pre-write block + required CI. **Not** Fowler Gateway, not a resource wrapper, not a layer in the app |
85
180
  | **pre-write block** | hard write | Host actually blocks listed edit ops (installed + trusted) |
86
181
  | **warning only (not blocked)** | advisory write | MCP/rules coach; not a hard block |
87
182
  | **import graph** | edges | Allowed imports (fix these first) |
@@ -178,6 +273,8 @@ gate → same binary verdict on every parity-capable adapter
178
273
 
179
274
  | Do | Example |
180
275
  |----|---------|
276
+ | Lead first-contact with the deny, then not-that | “If the AI writes an illegal import, the write is rejected. The same check fails the pull request. Not an API Gateway. Not a folder linter.” |
277
+ | Name manifesto only when teeth are off | “No required merge status — the architecture file is advisory (a manifesto). Next: require `arkgate-check --strict-merge`.” |
181
278
  | 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.” |
182
279
  | Rank one primary door under residual | Doctor **Primary next action** #1; **Also** only for secondary |
183
280
  | Label expert skills as escapes | “Install skill pack only when doctor or a STOP handoff names a skill.” |
@@ -203,6 +300,12 @@ gate → same binary verdict on every parity-capable adapter
203
300
 
204
301
  | Avoid | Why |
205
302
  |-------|-----|
303
+ | Leading first-contact with folders, layers, or `ark.config.json` | Old-school SE hears “file structure keeper” |
304
+ | Bare “gate” as the first unexplained noun on README / use / hub / first-run | They load Fowler Gateway / API Gateway / facade |
305
+ | Calling ArkGate a Gateway, facade, adapter, or “abstraction layer” | A Gateway wraps a resource; this checkpoint denies the write |
306
+ | “Access resources”, “extend without touching what it represents” | Wrapper-family verbs. The architecture file is law, not a port |
307
+ | Calling `ark.config.json` a **contract** as the first noun | Old-school SE hears manifesto — intent with no consequence |
308
+ | “Our architecture manifesto” as product copy | Insult when teeth exist; a lie when they do not. Honesty case = advisory-only |
206
309
  | vibes, “crush it,” emoji rain | Cheap; seniors dismiss it |
207
310
  | “eh amigo,” fake familiarity | Condescension |
208
311
  | “you don’t need to understand anything” | Lies about the product |
@@ -253,7 +356,10 @@ Skills table in docs = **escapes / expert**, not a second onboarding track.
253
356
 
254
357
  ## Hero phrases (approved)
255
358
 
256
- - One architecture config. One check. One coach.
359
+ - If the AI writes an illegal import, the write is rejected. The same check fails the pull request.
360
+ - Not an API Gateway. Not a folder linter. If the check is not required on the PR, the rules file is just documentation.
361
+ - One rules file. One check. One next step.
362
+ - One architecture config. One check. One coach. *(historical 4.6.2 — never the first sentence)*
257
363
  - Green must mean something real.
258
364
  - You arrive at Enforce; you never turn it on.
259
365
  - Enforce does not mean the design is elegant — only that checked imports are honest.
@@ -273,6 +379,10 @@ Skills table in docs = **escapes / expert**, not a second onboarding track.
273
379
  - Ship it 🚀 / crush the spaghetti with vibes.
274
380
  - The AI validated your architecture / model pass/fail.
275
381
  - Follow AGENTS.md to pass the architecture gate.
382
+ - Keep your file structure / folders clean.
383
+ - An abstraction layer over your architecture.
384
+ - A Gateway for your architecture / resources.
385
+ - Our architecture manifesto / the contract file.
276
386
 
277
387
  ---
278
388
 
@@ -370,3 +480,6 @@ while leftover design work remains; batch every Shape bet in one turn.
370
480
  - [ ] Codes, sensors, and capabilities stay inside the guardrail catalog.
371
481
  - [ ] Projection / AGENTS.md never claimed as enforcement.
372
482
  - [ ] Seniors would not be embarrassed to paste the line into a PR.
483
+ - [ ] First-contact sentence would not read as Fowler Gateway, a folder linter, or a manifesto of intent.
484
+ - [ ] Bare “gate” is glossed as write checkpoint / pre-write block / required CI on first use.
485
+ - [ ] “Contract” never appears as the first noun; without required CI, the file is named a manifesto.
package/docs/use.md CHANGED
@@ -2,7 +2,12 @@
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 architecture config. One check. One coach.**
5
+ **If the AI writes an illegal import, the write is rejected. The same check fails the pull request.**
6
+
7
+ Not an API Gateway. Not a folder linter. If the check is not required on the PR, the rules
8
+ file is just documentation.
9
+
10
+ **One rules file. One check. One next step.**
6
11
 
7
12
  ---
8
13
 
@@ -11,12 +16,12 @@ For **anyone** shipping TypeScript with an AI coding agent. You do not need to s
11
16
  ```bash
12
17
  npm install -D arkgate typescript
13
18
  npx arkgate start # preview what will change
14
- npx arkgate start --apply # install compact contract + host router + CI plan
15
- npx arkgate-check --doctor # where am I? one status light, one next action
16
- npx arkgate-check --doctor --all # encyclopedia (Details)
19
+ npx arkgate start --apply # install compact config + host router + CI plan
20
+ npx arkgate-check --doctor # what's wrong, what to do first
21
+ npx arkgate-check --doctor --all # full details
17
22
  ```
18
23
 
19
- Then keep working with your agent. The doctor is the **control plane**: when stuck, run doctor and do action **#1**. Compact first; `--all` for Details.
24
+ Then keep working with your agent. Stuck? Run `--doctor` and do action **#1**. Compact first; `--all` for details.
20
25
 
21
26
  | Stuck on… | Do this |
22
27
  |-----------|---------|
@@ -36,7 +41,8 @@ Skip ArkGate (or treat it as overkill) when:
36
41
  - The project has **no AI coding agents** and **no multi-layer integration boundaries** worth pinning.
37
42
  - It is a **single-developer hobby CRUD** with no pressure to keep layers honest over time.
38
43
  - The team will **not** maintain `ark.config.json` layers or make `arkgate-check --strict-merge` a
39
- **required** GitHub status context — without that, local advisory write stays avoidable.
44
+ **required** GitHub status context — without that, the rules file is just documentation and a
45
+ warning at write time can be ignored.
40
46
 
41
47
  In those cases a boundary linter or editor rules may be enough; see [README — Why not only ESLint / Nx / cruiser?](../README.md#why-not-only-eslint--nx--cruiser). When you *do* adopt, day-to-day honesty is still: advisory write on soft hosts → required merge status. Surface that with `npx arkgate-check --doctor` or `npx arkgate status --json` ([agent guide — Write-path honesty](agent-guide.md#write-path-honesty)).
42
48
 
@@ -46,7 +52,7 @@ In those cases a boundary linter or editor rules may be enough; see [README —
46
52
 
47
53
  | When | What happens |
48
54
  |------|----------------|
49
- | While the AI writes | Host write gate or advisory MCP (depends on host) |
55
+ | While the AI writes | The write is rejected, or you get a warning (depends on the host) |
50
56
  | Before merge | Make the Ark job a **required GitHub status context** running `arkgate-check --strict-merge` (alias `ark-check`). Until that status is required — or you write `.ark/adoption-stance.json` with `stance: "advisory-only"` — doctor will not call the tree adopted. |
51
57
  | Anytime | Doctor: Suggest / Adapt / Enforce (+ leftover design work if the design is still messy) |
52
58
 
@@ -57,7 +63,8 @@ shell/direct writes, and incomplete patches still rely on CI. **OpenCode:** loca
57
63
  advisory (warning only, not blocked). An unverified host hook is environment evidence, not
58
64
  unfinished architecture; **Not finished** is reserved for real project/config debt.
59
65
 
60
- ArkGate is **not** a web framework, ORM, or app runtime. It is architecture enforcement + a coach for AI TypeScript.
66
+ ArkGate is **not** an API Gateway, a folder linter, a web framework, ORM, or app runtime.
67
+ The rules file only binds when the write is rejected and CI is required.
61
68
 
62
69
  ### Planes (you choose)
63
70
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "arkgate",
3
- "version": "4.7.0",
4
- "description": "One architecture config. One check. One coach.",
3
+ "version": "4.7.2",
4
+ "description": "If the AI writes an illegal import, the write is rejected. The same check fails the pull request.",
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": "When your agent writes TypeScript, ArkGate stops it from breaking the layers.",
4
+ "description": "If the AI writes an illegal import, the write is rejected. The same check fails the pull request.",
5
5
  "repository": {
6
6
  "url": "https://github.com/pedroknigge/arkgate",
7
7
  "source": "github"
8
8
  },
9
- "version": "4.7.0",
9
+ "version": "4.7.2",
10
10
  "packages": [
11
11
  {
12
12
  "registryType": "npm",
13
13
  "identifier": "arkgate",
14
- "version": "4.7.0",
14
+ "version": "4.7.2",
15
15
  "runtimeHint": "npx",
16
16
  "transport": {
17
17
  "type": "stdio"
@@ -31,7 +31,7 @@
31
31
  "type": "named",
32
32
  "name": "--config",
33
33
  "value": "ark.config.json",
34
- "description": "Path to the ArkGate architecture config"
34
+ "description": "Path to the rules file (ark.config.json)"
35
35
  }
36
36
  ]
37
37
  }
@@ -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.7.0**
10
+ Package version when last generated context: **arkgate@4.7.2**
11
11
  Schema: agent-skills package contract `1.0`
12
12
 
13
13
  ## Skills (frozen catalog)
@@ -1,11 +1,11 @@
1
1
  ---
2
2
  name: ark-adopt
3
- description: Session 0 — mark the Ark path. Greenfield scaffold or brownfield honesty. Write ark.config, optional advisory ArkRules, baseline, and gates in this turn. CLI validates.
3
+ description: Session 0 — write the rules file (ark.config.json) to match the real folders. Optional extra rules inside a layer. CLI validates.
4
4
  ---
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).
8
+ **When:** empty tree, or the rules file does not match the real folders (session 0).
9
9
  **Not when:** a single new file (`/ark-place`) or leftover design after the path is honest (`/ark-explore` then `/ark-autopilot`).
10
10
 
11
11
  ## Steps
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: ark-architect
3
- description: Shortcut to /ark-adopt for greenfield shape. Deprecated as a first-class door. Do adopt’s job.
3
+ description: Shortcut to /ark-adopt for a new tree. Deprecated as a first-class door.
4
4
  ---
5
5
 
6
6
  # /ark-architect — Shortcut to /ark-adopt
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: ark-autopilot
3
- description: Apply Ark end-to-end — explore first; dual plan A (edges) + B (shape); write mechanical-safe and judgment in this turn; one Shape refactor. Empty plan A is not healthy if leftover design remains. CLI is a sensor; you edit files.
3
+ description: Fix illegal imports and one leftover-design refactor. CLI is a sensor; you edit files.
4
4
  ---
5
5
 
6
6
  # /ark-autopilot — Apply the path
@@ -14,7 +14,7 @@ description: Apply Ark end-to-end — explore first; dual plan A (edges) + B (sh
14
14
  2. Fix import-rule debt; if leftover design remains, apply **one** small refactor.
15
15
  3. Re-run doctor. Never weaken `ark.config.json`.
16
16
 
17
- **This is the apply door.** Invoking it **is** the approval. Doctor remains the control plane.
17
+ **This is the apply door.** Invoking it **is** the approval. Run `arkgate-check --doctor` for the next step.
18
18
 
19
19
  ## Autonomy contract
20
20
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: ark-contract
3
- description: Shortcut to /ark-adopt (session 0) or /ark-autopilot (later config tighten). Deprecated as a first-class door.
3
+ description: Shortcut edit the rules file or extra rules. Use /ark-adopt or /ark-autopilot.
4
4
  ---
5
5
 
6
6
  # /ark-contract — Shortcut to adopt / autopilot
@@ -17,8 +17,9 @@ preview-only. Never weaken the architecture config.
17
17
 
18
18
  | Use this leftover name when… | Prefer instead |
19
19
  |------------------------------|----------------|
20
- | Layers / include / ArkRules need an edit | **`/ark-adopt`** (path) or **`/ark-autopilot`** (tighten) |
20
+ | Layers / include / ArkRules / **ArkRun extra** need an edit | **`/ark-adopt`** (path, first `arkRun`) or **`/ark-autopilot`** (tighten) |
21
21
  | False-green / concentrated edge | **`/ark-adopt`** — write the honest config |
22
+ | Companion install / one kernel candidate | **`/ark-runtime`** — this leftover name does not wire `@arkgate/runtime` |
22
23
 
23
24
  ## Dual engine (mandatory)
24
25
 
@@ -40,7 +41,7 @@ restart/retargeting is required. `ark://manifest` never satisfies this preflight
40
41
 
41
42
  ## Dual plane — layers + ArkRules (mandatory, except /ark-runtime)
42
43
 
43
- Label findings **`[Layer]`** vs **`[ArkRules]`**. Absence of `arkRules` is valid.
44
+ Label findings **`[Layer]`** vs **`[ArkRules]`** vs **`[ArkRun]`**. Absence of `arkRules` or `arkRun` is valid. First-time extra is **`/ark-adopt`** (advisory). Wire one candidate with **`/ark-runtime`**. New kernel-managed file with **`/ark-place`**. Do not invent `/ark-run`.
44
45
 
45
46
  ## Subagent fan-out (optional, host-dependent)
46
47
 
@@ -54,9 +55,9 @@ If the host supports **parallel subagents**, fan out read-only scouts; otherwise
54
55
 
55
56
  ## Steps
56
57
 
57
- 1. If the path is missing or lying → execute **`/ark-adopt`**.
58
- 2. If the path is honest and you are tightening rules → execute **`/ark-autopilot`**.
59
- 3. `ark-check --strict-config`.
58
+ 1. If the path is missing or lying → execute **`/ark-adopt`** (including first advisory `arkRun`).
59
+ 2. If the path is honest and you are tightening rules or the ArkRun extra → execute **`/ark-autopilot`**.
60
+ 3. Companion / one candidate → **`/ark-runtime`**. `ark-check --strict-config`.
60
61
 
61
62
  ## Completion contract (skill incomplete if missing)
62
63
 
@@ -66,7 +67,7 @@ Skill incomplete if missing any field below.
66
67
  - **Sensor:** commands/tools run
67
68
  - **Opened:** real paths read (or `n/a` only if pure install/upgrade with no source analysis)
68
69
  - **Result:** one-line outcome
69
- - **Planes:** one-line split of residual **[Layer]** vs **[ArkRules]** (or `n/a` if unused)
70
+ - **Planes:** one-line split of residual **[Layer]** vs **[ArkRules]** vs **[ArkRun]** (or `n/a` if unused)
70
71
  - **Compass:** top residual lenses | `n/a`
71
72
  - **Handoff:** `/ark-adopt` / `/ark-autopilot` / `none`
72
73
  - **Incomplete?** `no` | `yes — <what is missing>`
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: ark-coverage
3
- description: Ark adoption fitness audit governed%, gates, baseline honesty, capability gaps. CLI is a sensor; read enough source to prove gaps. Full product recon and pattern dual-plan belong to /ark-explore.
3
+ description: How much of the tree the rules file covers. CLI is a sensor; read the source.
4
4
  ---
5
5
 
6
6
  # /ark-coverage — Ark adoption fitness (not full recon)
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: ark-explain
3
- description: Explain this project's architecture in plain language and generate the showcase HTML report — layers, rules, coverage, gates, and why the contract exists.
3
+ description: Explain the rules file in plain language and generate the HTML report.
4
4
  ---
5
5
 
6
6
  # /ark-explain — Understand this project's architecture
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: ark-explore
3
- description: Map skill decision-grade recon of layers + ArkRules opportunities + dual-plan seed (no apply). Primary post-green door when leftover design work remains. CLI is a sensor; you read the tree. No gate bypass.
3
+ description: Map import rules and leftover design. No apply. CLI is a sensor; you read the tree.
4
4
  ---
5
5
 
6
6
  # /ark-explore — Recon the real project (map only)
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: ark-fix
3
- description: Shortcut to /ark-autopilot for a small violation cluster. Deprecated as a first-class door.
3
+ description: Shortcut to /ark-autopilot for a small illegal-import cluster.
4
4
  ---
5
5
 
6
6
  # /ark-fix — Shortcut to /ark-autopilot
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: ark-loop
3
- description: Shortcut to /ark-autopilot for driving plan A to zero. Deprecated as a first-class door. CLI validates — you edit code.
3
+ description: Shortcut to /ark-autopilot for illegal-import fixes. CLI validates — you edit code.
4
4
  ---
5
5
 
6
6
  # /ark-loop — Shortcut to /ark-autopilot
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: ark-place
3
- description: "Where does new code go? Names the layer, directory, and naming for a new artifact from the contract, and writes it there. Autonomous."
3
+ description: "Where does new code go? Names the folder from the rules file and writes the file there."
4
4
  ---
5
5
 
6
6
  # /ark-place — Where does this code go?
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: ark-runtime
3
- description: Evaluate and wire the experimental ArkRun companion (@arkgate/runtime) against hand-rolled event bus, outbox, saga, projection, policy, or NestJS code. One candidate. Extra on via /ark-adopt; new files via /ark-place. Skills never enforce.
3
+ description: Wire the optional ArkRun extra (@arkgate/runtime). One candidate. Extra on via /ark-adopt.
4
4
  ---
5
5
 
6
6
  # /ark-runtime — Evaluate and wire ArkRun (experimental opt-in)
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: ark-think
3
- description: Host-side architectural reasoning — 2–3 enforceable options on layer and/or ArkRules planes for ONE decision. Not full recon (use /ark-explore). No gate bypass. No package LLM call.
3
+ description: 2–3 options for one import-rule or ArkRules decision. Not a full map (use /ark-explore).
4
4
  ---
5
5
 
6
6
  # /ark-think — Architectural reasoning (host LLM only)