arkgate 4.7.1 → 4.7.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +38 -1
- package/README.md +43 -34
- package/bin/lib/agent-projection.mjs +1 -1
- package/bin/lib/ci-and-commands.mjs +3 -3
- package/bin/lib/enforcement-honesty.mjs +1 -1
- package/bin/lib/first-run-help.mjs +3 -3
- package/bin/lib/html-report-depth.mjs +1 -1
- package/bin/lib/html-report.mjs +4 -4
- package/dist/index.cjs +2 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -2
- package/docs/README.md +9 -5
- package/docs/agent-guide.md +6 -5
- package/docs/ai-gates.md +3 -2
- package/docs/develop.md +10 -6
- package/docs/enthusiast/README.md +11 -8
- package/docs/package-surface.md +6 -3
- package/docs/product-voice.md +151 -38
- package/docs/use.md +21 -14
- package/package.json +3 -4
- package/server.json +4 -4
- package/templates/agent-skills/README.md +1 -1
- package/templates/agent-skills/ark-adopt/SKILL.md +2 -2
- package/templates/agent-skills/ark-architect/SKILL.md +1 -1
- package/templates/agent-skills/ark-autopilot/SKILL.md +2 -2
- package/templates/agent-skills/ark-contract/SKILL.md +1 -1
- package/templates/agent-skills/ark-coverage/SKILL.md +1 -1
- package/templates/agent-skills/ark-explain/SKILL.md +1 -1
- package/templates/agent-skills/ark-explore/SKILL.md +1 -1
- package/templates/agent-skills/ark-fix/SKILL.md +1 -1
- package/templates/agent-skills/ark-loop/SKILL.md +1 -1
- package/templates/agent-skills/ark-place/SKILL.md +1 -1
- package/templates/agent-skills/ark-runtime/SKILL.md +1 -1
- package/templates/agent-skills/ark-think/SKILL.md +1 -1
- package/templates/agent-skills/ark-upgrade/SKILL.md +1 -1
- package/templates/skills/ark-adopt.md +2 -2
- package/templates/skills/ark-architect.md +1 -1
- package/templates/skills/ark-autopilot.md +2 -2
- package/templates/skills/ark-contract.md +1 -1
- package/templates/skills/ark-coverage.md +1 -1
- package/templates/skills/ark-explain.md +1 -1
- package/templates/skills/ark-explore.md +1 -1
- package/templates/skills/ark-fix.md +1 -1
- package/templates/skills/ark-loop.md +1 -1
- package/templates/skills/ark-place.md +1 -1
- package/templates/skills/ark-runtime.md +1 -1
- package/templates/skills/ark-think.md +1 -1
- package/templates/skills/ark-upgrade.md +1 -1
package/docs/product-voice.md
CHANGED
|
@@ -11,32 +11,125 @@ 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
|
-
- **
|
|
20
|
-
supports it + required CI. Deterministic. Don’t show green if we could
|
|
21
|
-
Two
|
|
22
|
-
inside a layer) opt-in.
|
|
23
|
-
`@arkgate/runtime` — not a durability claim.
|
|
24
|
-
- **
|
|
25
|
-
design work; one small refactor at a time; never silent auto-reshape; never weaken the
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
111
|
+
- **Reject the write. Fail the PR.** Rules file (`ark.config.json`) + the hook rejects listed
|
|
112
|
+
writes where the host supports it + required CI. Deterministic. Don’t show green if we could
|
|
113
|
+
not verify. Two kinds of rules: **import rules** (who may import whom) always; **ArkRules**
|
|
114
|
+
(extra rules inside a layer) opt-in. Optional extra: **ArkRun** (kernel usage + declarations)
|
|
115
|
+
via companion `@arkgate/runtime` — not a durability claim. Not a Gateway.
|
|
116
|
+
- **Where code belongs:** who talks to whom, and how; fix illegal imports first, then leftover
|
|
117
|
+
design work; one small refactor at a time; never silent auto-reshape; never weaken the rules
|
|
118
|
+
file.
|
|
119
|
+
- **Five doors:** invoking `/ark-adopt`, `/ark-place`, `/ark-autopilot`, `/ark-explore`,
|
|
120
|
+
or `/ark-upgrade` **is** the approval. The agent writes or maps in that turn. CLI/MCP check;
|
|
121
|
+
they do not silently rewrite. Silent reshape from the compact router (unasked) stays forbidden.
|
|
122
|
+
- **Team:** the rules file is a different change type than product code. A product change must
|
|
123
|
+
not 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
|
|
32
125
|
the whole tree. Humans who never hit the write hook are allowed to ignore Ark.
|
|
33
|
-
- **Agent
|
|
34
|
-
they **
|
|
35
|
-
pass/fail
|
|
36
|
-
- **Improvement compass (4.4.0):**
|
|
126
|
+
- **Agent surface (4.3.0):** agents read **guardrail catalogs** and **scan** evidence;
|
|
127
|
+
they **judge** outside the package. Projection and skills never become the
|
|
128
|
+
pass/fail check.
|
|
129
|
+
- **Improvement compass (4.4.0):** leftover architecture work is named as **lenses** (SoC, DIP,
|
|
37
130
|
domain alignment, …) projected from existing sensors — **never** a 0–10 score or Excellent/Good
|
|
38
131
|
rank. Out-of-scope lenses (perf, app security tooling, full resilience) stay honest.
|
|
39
|
-
- **
|
|
132
|
+
- **Dual depth:** human doctor and skills lead with plain outcomes and one next move;
|
|
40
133
|
experts keep full JSON. Full-AI workflows get the same single door — not a skill menu exam.
|
|
41
134
|
- **False done is forbidden:** “Rules on” ≠ elegant design. Leftover design work must not
|
|
42
135
|
read as “healthy finished.” Empty ArkRules inventory is not a score. MCP configuration on
|
|
@@ -73,29 +166,31 @@ stay stable unless a change explicitly adds an alias.
|
|
|
73
166
|
|
|
74
167
|
| Prefer (human) | Was / JSON | Use for |
|
|
75
168
|
|----------------|------------|---------|
|
|
76
|
-
| **
|
|
169
|
+
| **rules file** (`ark.config.json`) | contract / architecture config | Layers, rules, include. Never the first noun. Without required CI, this reader hears **manifesto** |
|
|
170
|
+
| **manifesto** (honesty only) | advisory-only / no required CI | What the file is until the write is rejected and CI is required. Never the product name |
|
|
77
171
|
| **import rules** / **allowed dependencies** | Layers plane / edges | Who may import whom; placement, purity, isolation |
|
|
78
|
-
| **ArkRules** (opt-in; gloss:
|
|
79
|
-
| **ArkRun** (opt-in; gloss: kernel usage + complete declarations) | arkRun |
|
|
80
|
-
| **advisory ArkRules** | advisory ArkRules | Default sensor mode —
|
|
172
|
+
| **ArkRules** (opt-in; gloss: extra rules inside a layer) | ArkRules | Structure sensors + domain invariant catalogs (`arkrules/*`). Off unless you turn it on. |
|
|
173
|
+
| **ArkRun** (opt-in; gloss: kernel usage + complete declarations) | arkRun | Optional extra; companion kernel is `@arkgate/runtime`; factory `createStrictArkKernel` (per instance, no singleton). Never a score. |
|
|
174
|
+
| **advisory ArkRules** | advisory ArkRules | Default sensor mode — does not fail CI/merge alone |
|
|
81
175
|
| **extra merge checks** | extraMergeTeeth | Only when enforced structure/invariant rules exist **and** classification is honest |
|
|
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` |
|
|
85
|
-
| **
|
|
86
|
-
| **
|
|
179
|
+
| **the write is rejected** / **required CI check** | write checkpoint / gate (as first noun) | Pass/fail: hook rejects the write + required CI. **Not** Fowler Gateway, not a resource wrapper, not a layer in the app |
|
|
180
|
+
| **the hook rejects the write** | hard write / pre-write block | Host actually blocks listed edit ops (installed + trusted) |
|
|
181
|
+
| **warning only (not blocked)** | advisory write | MCP/rules warn; not a hard block |
|
|
87
182
|
| **import graph** | edges | Allowed imports (fix these first) |
|
|
88
183
|
| **baseline** | baseline | Frozen known debt; does not make a wrong config honest |
|
|
89
184
|
| **fix** | remediation | Fixing violations against the config |
|
|
90
185
|
| **one small refactor** | pilot | One extraction / reshape cluster at a time |
|
|
91
186
|
| **shape / leftover design work** | **design-weak** / residual | Imports clean under Enforce, but design smells remain — not “done” |
|
|
92
|
-
| **
|
|
187
|
+
| **doctor** / **next step** | coach / co-pilot | Guidance that proposes order without silent auto-reshape |
|
|
93
188
|
| **don’t show green if unverified** | fail-closed | Incomplete analysis or unproven enforcement never looks green |
|
|
94
189
|
| **honest coverage** | honest coverage | Governed % and empty scope that cannot false-green |
|
|
95
190
|
| **safe to auto-apply** | mechanical-safe | Deterministic auto-apply class only |
|
|
96
191
|
| **your judgment** | judgment | Human/agent design work; invoke of an apply door is the approval — not silent compact-router reshape |
|
|
97
192
|
| **five doors** | skill menu of 13 | adopt · place · autopilot · explore · upgrade — other names are shortcuts |
|
|
98
|
-
| **law / constitution
|
|
193
|
+
| **rules file + ArkRules files** (different change type than product) | law / constitution / contract + baseline | `ark.config.json`, `arkrules/*`, `.ark-baseline.json` — a product PR must not amend them |
|
|
99
194
|
| **steward** | contract owner | GitHub handle or email in `stewards`; only they may loosen the law or grow the baseline |
|
|
100
195
|
| **several hands** | multi-author / CODEOWNERS | Doctor asks for stewards or shows list drift; empty `stewards[]` is unfinished ENFORCE (not Adapt); adopt proposes handles or emails, never invents names |
|
|
101
196
|
| **contract session** | `--contract-session` | Explicit “this diff is a law change”; required to loosen or grow the baseline even with an empty steward list; still never mixed with product files |
|
|
@@ -112,7 +207,7 @@ stay stable unless a change explicitly adds an alias.
|
|
|
112
207
|
| **host limitation** | environment residual | Soft-write or uncovered host path (e.g. OpenCode, hosted/specialized tools) — do not paint the whole project unfinished |
|
|
113
208
|
| **allowed rule ids** | guardrail catalog | Closed vocabulary of sensors, capabilities, `ruleId`s, skill roles |
|
|
114
209
|
| **check (tool)** | scan | Deterministic engine / CLI / MCP. Same inputs → same verdict. No LLM. |
|
|
115
|
-
| **
|
|
210
|
+
| **your judgment** | process / coaching | Skill- or agent-side. **Never** package pass/fail |
|
|
116
211
|
| **diagnostic code** / **ruleId** | ruleId | Stable public violation id — catalog-linked ([diagnostics.md](diagnostics.md)) |
|
|
117
212
|
| **agent summary** | agent projection | Version-matched AGENTS/CLAUDE block; **non-authoritative** |
|
|
118
213
|
| **finding id** | finding ref | Stable id (ruleId + target key) across turns |
|
|
@@ -170,7 +265,7 @@ gate → same binary verdict on every parity-capable adapter
|
|
|
170
265
|
| Surface | Language to use | Language to avoid |
|
|
171
266
|
|---------|-----------------|-------------------|
|
|
172
267
|
| CLI / MCP / CI | “Scan found…”, “Checked edges…”, “Verdict: pass/fail/incomplete” | “The model decided…”, “AI validated architecture” |
|
|
173
|
-
| Skills / doctor
|
|
268
|
+
| Skills / doctor | “Next: one small refactor…”, “Judgment: Shape door…” | “Process mode enforces…”, “Skill pass/fail” |
|
|
174
269
|
| Catalog / codes | “ruleId from the diagnostic catalog”, “closed capability set” | Open-ended “any rule string”, free-generated sensors |
|
|
175
270
|
| Projection / AGENTS.md | “Agent-facing summary; not the gate” | “Follow AGENTS.md to pass CI” |
|
|
176
271
|
|
|
@@ -178,21 +273,23 @@ 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 rules 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.” |
|
|
184
281
|
| State host write honesty | “Cursor blocks trusted Write/StrReplace. Codex blocks complete trusted local `apply_patch` after runtime observation. Required GitHub status covers every path.” |
|
|
185
|
-
| Soft/unverified write ≠ unfinished project | “
|
|
282
|
+
| Soft/unverified write ≠ unfinished project | “Rules file ready; this host operation is a warning, not a block, or unverified.” Keep environment residual in evidence; reserve **Not finished** for config/project debt. |
|
|
186
283
|
| Keep Suggest on start → doctor | New-here primary is finish `start`, not a competing recommend/architect curriculum |
|
|
187
284
|
| Qualify import-clean under leftover design | “None on checked imports … leftover design work remains. Not healthy finished.” |
|
|
188
|
-
| Prefer unverified-as-not-green | Incomplete analysis, unobserved hooks, and soft MCP never paint as a hard green
|
|
285
|
+
| Prefer unverified-as-not-green | Incomplete analysis, unobserved hooks, and soft MCP never paint as a hard green “write rejected” |
|
|
189
286
|
| 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.” |
|
|
190
287
|
| Keep inventory claims evidence-bound | “Possible rule candidate in the configured Application layer.” A filename or technical constant alone is not Domain evidence. |
|
|
191
288
|
| 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**. |
|
|
192
289
|
| Separate CI runtime from provider policy | Successful CI run ≠ required status; GitHub Free plan 403 → `unavailable-plan`, not “CI never ran.” |
|
|
193
290
|
| Prefer catalog language for agent DX | “Stable `ruleId` with why/fix anchors.” Not a free-form list of “things that might be wrong.” |
|
|
194
291
|
| Name the check before coaching | “Check: two layer import violations. Next: fix the Application→Domain import first.” |
|
|
195
|
-
| Label projection non-enforcing | “Regenerated agent
|
|
292
|
+
| Label projection non-enforcing | “Regenerated agent summary for this package version. The check remains ark-check / hooks / required CI.” |
|
|
196
293
|
| Keep status counts honest | “Inventory and residual counts are evidence — not a health score.” |
|
|
197
294
|
| Prefer deep modules | “Small interface, hide the complexity. Name the seam; test at the public interface.” |
|
|
198
295
|
| Apply the deletion test | “If deleting this extract would vanish the complexity, skip the pass-through; if callers re-absorb it, keep the module.” |
|
|
@@ -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 check rejects the write |
|
|
306
|
+
| “Access resources”, “extend without touching what it represents” | Wrapper-family verbs. The rules file is 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 |
|
|
@@ -237,10 +340,10 @@ gate → same binary verdict on every parity-capable adapter
|
|
|
237
340
|
## Progressive disclosure (product rule)
|
|
238
341
|
|
|
239
342
|
1. **One primary path** — newcomer does not skill-shop among thirteen `/ark-*` skills.
|
|
240
|
-
2. **Doctor
|
|
343
|
+
2. **Doctor shows what's wrong and what to do first** — one status light, one next action (human-grade + technical).
|
|
241
344
|
3. **Compact router / default install first** — full skill pack is **expert depth**, not onboarding UI.
|
|
242
345
|
4. **Post-green shape** is a first-class single door when edges are clean but residual remains.
|
|
243
|
-
5. **Day-to-day** — place +
|
|
346
|
+
5. **Day-to-day** — place + check protect; guided organize via `/ark-autopilot` when needed.
|
|
244
347
|
|
|
245
348
|
```text
|
|
246
349
|
npx arkgate start → start --apply → ark-check --doctor
|
|
@@ -253,16 +356,19 @@ Skills table in docs = **escapes / expert**, not a second onboarding track.
|
|
|
253
356
|
|
|
254
357
|
## Hero phrases (approved)
|
|
255
358
|
|
|
256
|
-
-
|
|
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.
|
|
260
366
|
- A clean import check is not “architecture healthy” when leftover design work remains.
|
|
261
367
|
- One small refactor at a time. Pattern bets are never auto-applied.
|
|
262
|
-
- Doctor
|
|
263
|
-
- The check is deterministic.
|
|
368
|
+
- Doctor shows what's wrong and what to do first: status light + next action.
|
|
369
|
+
- The check is deterministic. Your judgment is not. Only the check decides pass/fail.
|
|
264
370
|
- Guardrails are a catalog, not free generation.
|
|
265
|
-
- Agent docs summarize the
|
|
371
|
+
- Agent docs summarize the rules file; they never replace the check.
|
|
266
372
|
- **ArkGate** and **ArkRules** are product names — gloss them; don’t invent a second brand.
|
|
267
373
|
|
|
268
374
|
## Hero phrases (forbidden)
|
|
@@ -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
|
|
|
@@ -353,7 +463,7 @@ Invoking a five-door skill **is** the approval. Write or map in the same turn.
|
|
|
353
463
|
then check. Forbidden as the deliverable: dumping `--plan` JSON, “approve?”, or
|
|
354
464
|
`STOP — invoke /ark-X` for work that door absorbs.
|
|
355
465
|
|
|
356
|
-
**Still never:** weaken the
|
|
466
|
+
**Still never:** weaken the rules file; invent `mechanical-safe` kinds; claim finished
|
|
357
467
|
while leftover design work remains; batch every Shape bet in one turn.
|
|
358
468
|
|
|
359
469
|
---
|
|
@@ -363,10 +473,13 @@ while leftover design work remains; batch every Shape bet in one turn.
|
|
|
363
473
|
- [ ] One next action is obvious.
|
|
364
474
|
- [ ] Status light is not a mode picker.
|
|
365
475
|
- [ ] No false done under design-weak / incomplete analysis.
|
|
366
|
-
- [ ] Technical terms present (
|
|
476
|
+
- [ ] Technical terms present (rules file, import rules, ArkGate, ArkRules) without slang.
|
|
367
477
|
- [ ] Leftover design work is never called “done”.
|
|
368
478
|
- [ ] Expert skills are labeled expert — not the default curriculum.
|
|
369
479
|
- [ ] Scan vs process is not blurred with package LLM pass/fail.
|
|
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 the write is rejected / the hook rejects the write / 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
|
-
**
|
|
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
|
|
15
|
-
npx arkgate-check --doctor #
|
|
16
|
-
npx arkgate-check --doctor --all #
|
|
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.
|
|
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,
|
|
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,23 +52,24 @@ 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 |
|
|
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
|
|
|
53
|
-
**Cursor:**
|
|
54
|
-
**Codex CLI / local Desktop:**
|
|
59
|
+
**Cursor:** the hook rejects Write/StrReplace when `.cursor/hooks.json` is trusted.
|
|
60
|
+
**Codex CLI / local Desktop:** the hook rejects a complete `apply_patch` when
|
|
55
61
|
`.codex/hooks.json` is trusted and the operation is observed. Hosted/specialized paths,
|
|
56
62
|
shell/direct writes, and incomplete patches still rely on CI. **OpenCode:** local write stays
|
|
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.
|
|
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
|
+
### Two kinds of rules (you choose)
|
|
63
70
|
|
|
64
|
-
|
|
|
65
|
-
|
|
71
|
+
| Kind | Plain English | Config | Enforces |
|
|
72
|
+
|------|---------------|--------|----------|
|
|
66
73
|
| **Layers** | Who may talk to whom | `layers[]` + `rules[]` | Import direction, purity, forbidden globals, capabilities, peer isolation |
|
|
67
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) |
|
|
68
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**. |
|
|
@@ -76,7 +83,7 @@ Start always gives you **layers**. ArkRules templates may ship with start/init;
|
|
|
76
83
|
**Happy path:** put a new module under an existing layer directory/glob (`layers[].patterns`). Usually
|
|
77
84
|
**no** `ark.config.json` edit — the file classifies and the existing rules apply.
|
|
78
85
|
|
|
79
|
-
**Touch the
|
|
86
|
+
**Touch the rules file only when** you invent a new boundary (new layer or allow/deny edge), leave an
|
|
80
87
|
ungoverned path under `include`, or need a capability / forbidden-global exception. Optional ArkRules
|
|
81
88
|
`appliesTo` globs narrow invariants inside a layer; empty `appliesTo: []` fails closed. Full field
|
|
82
89
|
list: [configuration.md](configuration.md).
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "arkgate",
|
|
3
|
-
"version": "4.7.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "4.7.3",
|
|
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",
|
|
@@ -200,14 +200,13 @@
|
|
|
200
200
|
"architecture-gate",
|
|
201
201
|
"ai-agents",
|
|
202
202
|
"mcp",
|
|
203
|
-
"
|
|
203
|
+
"import-check",
|
|
204
204
|
"hexagonal",
|
|
205
205
|
"clean-architecture",
|
|
206
206
|
"layered-architecture",
|
|
207
207
|
"import-rules",
|
|
208
208
|
"dependency-rules",
|
|
209
209
|
"boundaries",
|
|
210
|
-
"co-pilot",
|
|
211
210
|
"governance",
|
|
212
211
|
"typescript",
|
|
213
212
|
"eslint",
|
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": "
|
|
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.
|
|
9
|
+
"version": "4.7.3",
|
|
10
10
|
"packages": [
|
|
11
11
|
{
|
|
12
12
|
"registryType": "npm",
|
|
13
13
|
"identifier": "arkgate",
|
|
14
|
-
"version": "4.7.
|
|
14
|
+
"version": "4.7.3",
|
|
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
|
|
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.
|
|
10
|
+
Package version when last generated context: **arkgate@4.7.3**
|
|
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 —
|
|
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
|
|
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
|
|
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:
|
|
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.
|
|
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
|
|
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
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: ark-coverage
|
|
3
|
-
description:
|
|
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
|
|
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
|
|
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-loop
|
|
3
|
-
description: Shortcut to /ark-autopilot for
|
|
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
|
|
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:
|
|
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:
|
|
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)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: ark-upgrade
|
|
3
|
-
description: Upgrade ArkGate
|
|
3
|
+
description: Upgrade ArkGate. Preview first, keep customized files, then apply.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# /ark-upgrade — managed ArkGate upgrade
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: ark-adopt
|
|
3
|
-
description: Session 0 —
|
|
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
|
|
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
|