arkgate 4.7.4 → 4.7.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/docs/use.md CHANGED
@@ -1,13 +1,13 @@
1
1
  # Use ArkGate
2
2
 
3
- For **anyone** shipping TypeScript with an AI coding agent. You do not need to study clean architecture first.
3
+ **Write. Check. Ship.**
4
4
 
5
- **If the AI writes an illegal import, the write is rejected. The same check fails the pull request.**
5
+ For **anyone** shipping TypeScript with an AI coding agent.
6
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.
7
+ **When the agent writes a bad import, the write doesn’t land. The same check fails the pull request.**
9
8
 
10
- **One rules file. One check. One next step.**
9
+ Not an API Gateway. Not a folder linter. If the check is not required on the PR, the config
10
+ is just documentation.
11
11
 
12
12
  ---
13
13
 
@@ -17,7 +17,7 @@ file is just documentation.
17
17
  npm install -D arkgate typescript
18
18
  npx arkgate start # preview what will change
19
19
  npx arkgate start --apply # install compact config + host router + CI plan
20
- npx arkgate-check --doctor # what's wrong, what to do first
20
+ npx arkgate-check --doctor # status one next step
21
21
  npx arkgate-check --doctor --all # full details
22
22
  ```
23
23
 
@@ -46,15 +46,23 @@ Skip ArkGate (or treat it as overkill) when:
46
46
 
47
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)).
48
48
 
49
+ ### Why it exists
50
+
51
+ AI coding agents write code at unprecedented speeds, but they tend to take the shortest path to solve a problem. If an agent needs data in a Domain layer, it might directly import a database adapter. Left unchecked, this creates spaghetti code and technical debt at light speed.
52
+
53
+ Traditional linters catch these architectural violations in CI *after* the agent has finished its work, breaking the flow and requiring manual intervention.
54
+
55
+ ArkGate solves this by shifting the check to the exact moment of writing. By intercepting file writes, it ensures that if the agent writes a bad import, the write doesn't land. The agent gets immediate feedback and can self-correct before the code even touches your disk.
56
+
49
57
  ---
50
58
 
51
59
  ## What you get
52
60
 
53
61
  | When | What happens |
54
62
  |------|----------------|
55
- | While the AI writes | The write is rejected, or you get a warning (depends on the host) |
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. |
57
- | Anytime | Doctor: Suggest / Adapt / Enforce (+ leftover design work if the design is still messy) |
63
+ | While the agent writes | The write doesn’t land, or you get a warning (depends on the host) |
64
+ | 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"` — status will not call the tree adopted. |
65
+ | Anytime | Status: Setup / In progress / Ready (+ needs a refactor if leftover design work remains) |
58
66
 
59
67
  **Cursor:** the hook rejects Write/StrReplace when `.cursor/hooks.json` is trusted.
60
68
  **Codex CLI / local Desktop:** the hook rejects a complete `apply_patch` when
@@ -64,19 +72,19 @@ advisory (warning only, not blocked). An unverified host hook is environment evi
64
72
  unfinished architecture; **Not finished** is reserved for real project/config debt.
65
73
 
66
74
  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.
68
-
69
- ### Two kinds of rules (you choose)
75
+ The config only binds when the write doesn’t land and CI is required.
70
76
 
71
- | Kind | Plain English | Config | Enforces |
72
- |------|---------------|--------|----------|
73
- | **Layers** | Who may talk to whom | `layers[]` + `rules[]` | Import direction, purity, forbidden globals, capabilities, peer isolation |
74
- | **ArkRules** (optional extra) | Habits *inside* a layer + named policies | `arkRules` + `arkrules/<Layer>.json` | Structure **heuristics** (module shape); invariant **catalog + coverage evidence** (not full business proof) |
75
- | **ArkRun** (optional extra) | Kernel usage + complete declarations | `arkRun` on schema `1.2` | Only `mode: "enforced"` when the tree is classified. Absence is silent. Doctor `arkRun` is **not a score**. |
77
+ ### The product (you choose the extras)
76
78
 
77
- Start always gives you **layers**. ArkRules templates may ship with start/init; they begin **advisory** until you promote them. Compact starters do **not** turn on ArkRun — add it only if the project uses `@arkgate/runtime`. Doctor / HTML show `rulesUnderContract` (catalog, **not a score**). No `arkRules` / `arkRun` map is fine — only Layers run. In-memory kernel stores are **not** production durability.
79
+ | | Plain English | Default |
80
+ |--|---------------|---------|
81
+ | **ArkGate** (layers) | Import rules. The write doesn’t land. The PR fails. | Always — this is the product |
82
+ | **ArkRules** | Optional policies *inside* a layer. | Off until you turn it on (start may ship advisory templates) |
83
+ | **ArkRun** | Optional experimental runtime | Off. In-memory. Not Postgres. |
78
84
 
79
- **Do not confuse:** green Layers ≠ perfect design (Shape residual can remain). Covered invariants ≠ “the business always does the right thing” they mean the named policy is declared and has symbol/test evidence. ArkRun branding ≠ durable stores.
85
+ Start always gives you **layers**. Compact starters do **not** turn on ArkRun.
86
+ No ArkRules / ArkRun is fine — only ArkGate runs. Leftovers are labeled
87
+ **`[Layer]`** vs **`[ArkRules]`**. Green imports ≠ elegant design. ArkRun ≠ durable stores.
80
88
 
81
89
  ### New modules vs config edits
82
90
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "arkgate",
3
- "version": "4.7.4",
4
- "description": "If the AI writes an illegal import, the write is rejected. The same check fails the pull request.",
3
+ "version": "4.7.6",
4
+ "description": "When the agent writes a bad import, the write doesn’t land. 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": "If the AI writes an illegal import, the write is rejected. The same check fails the pull request.",
4
+ "description": "When the agent writes a bad import, the write doesn’t land. 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.4",
9
+ "version": "4.7.6",
10
10
  "packages": [
11
11
  {
12
12
  "registryType": "npm",
13
13
  "identifier": "arkgate",
14
- "version": "4.7.4",
14
+ "version": "4.7.6",
15
15
  "runtimeHint": "npx",
16
16
  "transport": {
17
17
  "type": "stdio"
@@ -7,7 +7,7 @@
7
7
  This directory is the **Agent Skills–compatible** packaging of the same **13**
8
8
  `/ark-*` skills shipped as flat templates for Ark install. **No new skill names.**
9
9
 
10
- Package version when last generated context: **arkgate@4.7.4**
10
+ Package version when last generated context: **arkgate@4.7.5**
11
11
  Schema: agent-skills package contract `1.0`
12
12
 
13
13
  ## Skills (frozen catalog)