arkgate 4.8.11 → 4.8.14

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 (93) hide show
  1. package/CHANGELOG.md +125 -2
  2. package/README.md +39 -46
  3. package/SECURITY.md +5 -3
  4. package/bin/ark-check-runtime.mjs +11 -9
  5. package/bin/lib/agent-projection-formatters.mjs +2 -0
  6. package/bin/lib/agent-skills-package.mjs +63 -8
  7. package/bin/lib/analysis-engine.mjs +4 -4
  8. package/bin/lib/architecture-scan.mjs +8 -2
  9. package/bin/lib/ark-order-doctor.mjs +160 -0
  10. package/bin/lib/ark-order-report.mjs +65 -0
  11. package/bin/lib/ark-order-sensors.mjs +1 -1
  12. package/bin/lib/ci-and-commands.mjs +7 -2
  13. package/bin/lib/design-smells.mjs +21 -1
  14. package/bin/lib/diagnostic-catalog.mjs +4 -4
  15. package/bin/lib/doctor-advisories.mjs +99 -18
  16. package/bin/lib/doctor-human.mjs +4 -11
  17. package/bin/lib/doctor-plan.mjs +4 -3
  18. package/bin/lib/extra-merge-teeth.mjs +32 -4
  19. package/bin/lib/first-run-help.mjs +11 -2
  20. package/bin/lib/gate-files.mjs +40 -3
  21. package/bin/lib/html-report-advisories.mjs +2 -0
  22. package/bin/lib/html-report-depth.mjs +8 -18
  23. package/bin/lib/html-report.mjs +16 -0
  24. package/bin/lib/install-migrate.mjs +23 -0
  25. package/bin/lib/mcp-hook-payload.mjs +1 -1
  26. package/bin/lib/product-copy.mjs +4 -0
  27. package/bin/lib/remediation.mjs +7 -7
  28. package/bin/lib/resolved-candidate-facts.mjs +144 -36
  29. package/bin/lib/rules-under-contract.mjs +14 -0
  30. package/bin/lib/scan-files.mjs +39 -0
  31. package/bin/lib/start-preview.mjs +4 -0
  32. package/bin/lib/status-command.mjs +28 -0
  33. package/bin/lib/status-manifest.mjs +23 -0
  34. package/bin/lib/upgrade-whats-new.mjs +3 -3
  35. package/bin/lib/violations.mjs +40 -1
  36. package/dist/{diagnosticCatalog-DiflIock.d.ts → diagnosticCatalog-DVx_2RmF.d.ts} +1 -1
  37. package/dist/eslint/index.cjs +4 -4
  38. package/dist/eslint/index.js +4 -4
  39. package/dist/index.cjs +31 -31
  40. package/dist/index.d.ts +129 -15
  41. package/dist/index.js +31 -31
  42. package/dist/nestjs/index.cjs +1 -1
  43. package/dist/nestjs/index.js +1 -1
  44. package/dist/runtime/index.cjs +15 -15
  45. package/dist/runtime/index.d.ts +1 -1
  46. package/dist/runtime/index.js +15 -15
  47. package/docs/README.md +11 -8
  48. package/docs/agent-guide.md +30 -13
  49. package/docs/ai-gates.md +3 -1
  50. package/docs/arkorder.md +35 -10
  51. package/docs/configuration.md +7 -6
  52. package/docs/develop.md +3 -1
  53. package/docs/diagnostics.md +7 -7
  54. package/docs/enthusiast/README.md +6 -1
  55. package/docs/enthusiast/how-to-gallery-starter.md +2 -1
  56. package/docs/package-surface.md +8 -5
  57. package/docs/product-voice.md +40 -13
  58. package/docs/threat-model.md +2 -2
  59. package/docs/typescript-support.md +3 -3
  60. package/docs/use.md +18 -11
  61. package/package.json +1 -1
  62. package/schemas/ark.status-manifest.schema.json +47 -0
  63. package/server.json +2 -2
  64. package/templates/agent-skills/README.md +7 -4
  65. package/templates/agent-skills/ark-adopt/SKILL.md +9 -5
  66. package/templates/agent-skills/ark-architect/SKILL.md +5 -18
  67. package/templates/agent-skills/ark-autopilot/SKILL.md +8 -4
  68. package/templates/agent-skills/ark-contract/SKILL.md +9 -20
  69. package/templates/agent-skills/ark-coverage/SKILL.md +12 -8
  70. package/templates/agent-skills/ark-explain/SKILL.md +7 -3
  71. package/templates/agent-skills/ark-explore/SKILL.md +25 -4
  72. package/templates/agent-skills/ark-fix/SKILL.md +15 -20
  73. package/templates/agent-skills/ark-loop/SKILL.md +14 -20
  74. package/templates/agent-skills/ark-order/SKILL.md +200 -0
  75. package/templates/agent-skills/ark-place/SKILL.md +11 -8
  76. package/templates/agent-skills/ark-runtime/SKILL.md +17 -4
  77. package/templates/agent-skills/ark-think/SKILL.md +24 -126
  78. package/templates/agent-skills/ark-upgrade/SKILL.md +13 -2
  79. package/templates/skills/ark-adopt.md +9 -5
  80. package/templates/skills/ark-architect.md +5 -18
  81. package/templates/skills/ark-autopilot.md +8 -4
  82. package/templates/skills/ark-contract.md +9 -20
  83. package/templates/skills/ark-coverage.md +12 -8
  84. package/templates/skills/ark-explain.md +7 -3
  85. package/templates/skills/ark-explore.md +25 -4
  86. package/templates/skills/ark-fix.md +15 -20
  87. package/templates/skills/ark-loop.md +14 -20
  88. package/templates/skills/ark-order.md +200 -0
  89. package/templates/skills/ark-place.md +11 -8
  90. package/templates/skills/ark-runtime.md +17 -4
  91. package/templates/skills/ark-think.md +24 -126
  92. package/templates/skills/ark-upgrade.md +13 -2
  93. package/templates/tests/ark-adoption-gaps.test.ts +5 -4
package/CHANGELOG.md CHANGED
@@ -3,6 +3,130 @@
3
3
  All notable changes to ArkGate (`arkgate`; formerly `ark-runtime-kernel`) are documented here or
4
4
  in the immutable pre-2.0 archive linked below.
5
5
 
6
+ ## Unreleased
7
+
8
+ ## 4.8.14 — 2026-09-06
9
+
10
+ **Patch** over **4.8.13**. Catch npm `latest` up to `main`: first-class
11
+ `/ark-order` (#217 / #216) and the other ships that landed after tag
12
+ `v4.8.13`. **Write. Check. Ship.** **No required config migration.** No
13
+ `schemaVersion` bump. Does not close `K01` / `Z09`. This mother
14
+ `ark.config.json` still does **not** turn `arkOrder` on.
15
+
16
+ **Status: prepared** (npm `latest` remains **4.8.13** until Actions `publish-npm`
17
+ runs with `tag=v4.8.14` and `dry_run=false`).
18
+
19
+ ### Added
20
+ - Skill catalog covers 100% of product capacity (issue [#216](https://github.com/pedroknigge/arkgate/issues/216) /
21
+ [ADR 0036](docs/adr/0036-skill-catalog-product-capacity.md) / [#217](https://github.com/pedroknigge/arkgate/pull/217)).
22
+ First-class `/ark-order` mirrors `/ark-runtime` for ArkOrder. Leftover
23
+ `/ark-architect` / `/ark-contract` / `/ark-fix` / `/ark-loop` / `/ark-think`
24
+ stay as one-release redirect stubs. Remaining doors speak Contener · Guiar ·
25
+ Ordenar and name the sibling for each job. ACS05 “no new skill names” freeze
26
+ opened; the catalog stays closed in Domain (`ARK_SKILL_NAMES`). Leftover
27
+ `/ark-fix` / `/ark-loop` stubs keep the Y04 mechanical-edit hygiene outcomes.
28
+ Skills never enforce.
29
+
30
+ ### Changed
31
+ - First-contact leftovers after the north-star / billing / one-breath ships
32
+ ([#225](https://github.com/pedroknigge/arkgate/pull/225)): gallery index and
33
+ the hexagonal demo open in ordinary English; `arkgate-check --help` leads with
34
+ the deny; the write-gate fallback and the two newcomer deny codes
35
+ (`LAYER_IMPORT_VIOLATION`, `ARKORDER_UNVALVED_RELEASE`) drop ξ /
36
+ “architecture contract” from the first line.
37
+ - Doctor / start first-contact always tell the ArkOrder one-breath (what it
38
+ is, when to use it, next step) even when the extra is off ([#224](https://github.com/pedroknigge/arkgate/pull/224)).
39
+ Reuses `/ark-order` and `examples/arkorder-billing`. Verdicts stay silent (not a
40
+ score; Layers unchanged).
41
+ - First-contact now names **Contener · Guiar · Ordenar** in ordinary English
42
+ (contain the write, guide the next step, order leftover mess)
43
+ ([#222](https://github.com/pedroknigge/arkgate/pull/222)). README, doctor
44
+ one-light, CLI help, host projections, and first-class skills share the same
45
+ breath. Write. Check. Ship. stays the deny.
46
+ - Billing gallery is the undeniable ArkOrder proof path
47
+ ([#223](https://github.com/pedroknigge/arkgate/pull/223)): site/docs
48
+ (`docs/use.md`, docs hub, enthusiast) →
49
+ [examples/README.md](https://github.com/pedroknigge/arkgate/blob/main/examples/README.md)
50
+ → [examples/arkorder-billing](https://github.com/pedroknigge/arkgate/tree/main/examples/arkorder-billing)
51
+ (first freeze `release()`, later `proposeRelease` then `apply`). Still GitHub-only;
52
+ not added to the npm tarball or `GALLERY_STARTERS`.
53
+ - Living docs (AGENTS hub, claims matrix, agent-guide skill install, product-voice
54
+ filter) restate the catalog after `#217`: first-class `/ark-order`, leftover
55
+ shortcuts as one-release stubs, ACS05 freeze opened, Domain still closes
56
+ `ARK_SKILL_NAMES`. The skill *set* covers Layers + ArkRules + ArkRun + ArkOrder
57
+ (Contener · Guiar · Ordenar). Historical 14/14 100% and last 4.8.3 C-020 stay
58
+ Planned.
59
+ - Pre-adoption publish is the thin path: slim CI on prepare PRs (no `release`
60
+ label or branch-name full-matrix), annotated tags (unsigned allowed),
61
+ CHANGELOG + `publish-npm` provenance. MCP registry, site, companion republish,
62
+ and `docs/releases/` notes stay optional.
63
+
64
+ ### Fixed
65
+ - `--changed` no longer builds facts for the whole include tree (issue
66
+ [#205](https://github.com/pedroknigge/arkgate/issues/205) /
67
+ [#221](https://github.com/pedroknigge/arkgate/pull/221)). The check now
68
+ resolves touched sources plus their import closure, skips the unused
69
+ tsconfig file walk, and does not list every governed file just to filter
70
+ the diff. File-local ArkRules sensors stay on the touched set. Full-tree
71
+ `ark-check` is unchanged. Dual gate (write + PR) stays the merge line.
72
+ - Short `arkgate-check --help` now names `--changed --base <ref>` as the local /
73
+ pre-push fast path (issue [#204](https://github.com/pedroknigge/arkgate/issues/204) /
74
+ [#220](https://github.com/pedroknigge/arkgate/pull/220)).
75
+ Encyclopedia `--help --all` is unchanged.
76
+ - `ark-check` human warnings now print `path:line` the way denies already do
77
+ (ArkOrder / ArkRun advisory findings already carried the location; the
78
+ printer dropped it). Findings with no file say so — they are about the
79
+ project rules, not a line you just edited. The green `--plan` pointer names
80
+ the first evidence path next to each design smell (issue #203).
81
+ - `start --apply` / `--install-agent-gates` now merge the Ark write-path
82
+ contract into a project-owned `AGENTS.md` and upsert `mcpServers.ark` in
83
+ existing `.mcp.json` (and host copies) without `--force`. Doctor no longer
84
+ reports `gatesMissing: ["AGENTS.md", ".mcp.json"]` after the stranger happy
85
+ path on a repo that already had those files (issue #210).
86
+
87
+ ## 4.8.13 — 2026-09-06
88
+
89
+ **Patch** over **4.8.12**. Publish gate: remaining ArkOrder doctor/deny branches so
90
+ `test:confidence` / `release:npm` clears the 81% floor. Tag `v4.8.12` stands;
91
+ this is the ship. **Write. Check. Ship.** **No required config migration.** No
92
+ `schemaVersion` bump. Does not close `K01` / `Z09`. No new skill names. This
93
+ mother `ark.config.json` still does **not** turn `arkOrder` on.
94
+
95
+ **Status: prepared** (tag `v4.8.13` and the GitHub Release already exist;
96
+ npm `latest` remains **4.8.11** until Actions `publish-npm` runs with
97
+ `tag=v4.8.13` and `dry_run=false`).
98
+
99
+ ### Fixed
100
+ - Confidence coverage: remaining ArkOrder doctor/deny `Next:` and HTML/doctor
101
+ residual paths so the publish job is not blocked by a 0.03-point branch miss.
102
+
103
+ ## 4.8.12 — 2026-09-05
104
+
105
+ **Patch** over **4.8.11**. First-contact honesty for the optional ArkOrder extra.
106
+ Sensors, valve, and `arkgate/order` already shipped on 4.8.11; this projects
107
+ them through doctor / start / status / the check label, in plain words.
108
+ **Write. Check. Ship.** **No required config migration.** No `schemaVersion` bump.
109
+ Does not close `K01` / `Z09`. No new skill names. This mother `ark.config.json`
110
+ still does **not** turn `arkOrder` on.
111
+
112
+ **Status: tagged, not published** (tag `v4.8.12` stands; `publish-npm` failed
113
+ the 81% branch floor at 80.97%. Do not retag. Do not ship this version to npm.
114
+ Consumers stay on **4.8.11** until **4.8.13** is published.
115
+ npm `latest` remains **4.8.11**).
116
+
117
+ ### Added
118
+ - Doctor / HTML / status `arkOrder` section (`notAScore`), same envelope as
119
+ ArkRun. Absence is a silent row. When on: one-breath + named choices + leftover count.
120
+ - Check prints `[ArkOrder]` on `ARKORDER_*` denies (and `[ArkRun]` on
121
+ `ARKRUN_*`) so rewriting `plan` like a seat count reads as clearly as a bad import.
122
+ - `ark start` preview says extras stay off — layers only, they stop bad imports.
123
+
124
+ ### Changed
125
+ - Merge-planes honesty now names enforced ArkOrder skip findings. The stamp
126
+ already claimed this plane; `failMergeWhen` now matches.
127
+ - First-contact copy (README, use, doctor, deny `Next:`, start, gallery) uses
128
+ the one-minute breath. No ξ / Haken / slaving on the first screen.
129
+
6
130
  ## 4.8.11 — 2026-09-02
7
131
 
8
132
  **Patch** over **4.8.10**. Nested `--config` with `--root` stays inside that
@@ -10,8 +134,7 @@ tree. Library Shape splits `adapterContract` and `agentProjection` so the AI
10
134
  edits one concern at a time. **Write. Check. Ship.** **No required config migration.**
11
135
  No `schemaVersion` bump. Does not close `K01` / `Z09`. No new skill names.
12
136
 
13
- **Status: prepared** (tree candidate; npm `latest` remains **4.8.10** until the
14
- signed-tag provenance workflow succeeds).
137
+ **Status: published** (on npm `latest`; see `docs/releases/4.8.11.md`).
15
138
 
16
139
  ### Fixed
17
140
  - Nested `--config` is a file path: `ark-check --root examples/app --config
package/README.md CHANGED
@@ -11,10 +11,12 @@ AI can build fast—and make a mess just as fast.
11
11
 
12
12
  Keep the product easy to understand, change, and trust.
13
13
 
14
- ArkGate stops bad shortcuts. ArkRules protects how each part should behave. ArkRun keeps work moving. ArkOrder protects the few big choices that should not change by accident.
14
+ Contain what the AI may write, and in what shape. Guide you with proven patterns and one next step. Order leftover mess toward a clean tree, a little at a time.
15
15
 
16
16
  Safer changes, fewer surprises, and extra protection only when you choose it.
17
17
 
18
+ That is **Contener · Guiar · Ordenar**.
19
+
18
20
  Works with Cursor, Claude, Codex, and Grok.
19
21
 
20
22
  [![Website](https://img.shields.io/badge/website-arkgate.online-0a0a0a)](https://www.arkgate.online/)
@@ -37,15 +39,15 @@ Works with Cursor, Claude, Codex, and Grok.
37
39
 
38
40
  </div>
39
41
 
40
- > **ArkGate 4.8.11** is prepared on this tree; npm `latest` remains **4.8.10**.
42
+ > **ArkGate 4.8.14** is prepared on this tree; npm `latest` remains **4.8.13** until `publish-npm` for `v4.8.14`.
41
43
  > Write. Check. Ship. Adopted = required GitHub
42
44
  > status running `arkgate-check --strict-merge`, or an explicit `advisory-only` stance.
43
45
  > Status is compact (`arkgate-check --doctor`; `--all` for Details). Optional **ArkRun**
44
46
  > (`arkgate/runtime`) is an in-memory runtime — not Postgres. Optional **ArkOrder**
45
- > (`arkgate/order`) stops the agent rewriting the few slow product decisions as CRUD;
46
- > later pattern change is `proposeRelease` then `apply`.
47
+ > (`arkgate/order`) stops rewriting a big product choice like the billing plan —
48
+ > as if it were a seat count. Change those choices through a valve, not a generic update.
47
49
  > `@arkgate/runtime` is deprecated.
48
- > [4.8.11 prepared](docs/releases/4.8.11.md) · [4.8.10 published](docs/releases/4.8.10.md) · [4.8.9](docs/releases/4.8.9.md) · [4.8.8](docs/releases/4.8.8.md) · [4.8.7](docs/releases/4.8.7.md) · [4.8.6](docs/releases/4.8.6.md) · [4.8.5](docs/releases/4.8.5.md) · [4.8.4](docs/releases/4.8.4.md) · [4.8.3](docs/releases/4.8.3.md) · [4.8.2](docs/releases/4.8.2.md) · [4.8.1](docs/releases/4.8.1.md) · [4.8.0](docs/releases/4.8.0.md) · [Docs hub](docs/README.md) · [Voice](docs/product-voice.md)
50
+ > [4.8.14 prepared](CHANGELOG.md) · [4.8.11 published](docs/releases/4.8.11.md) · [4.8.10](docs/releases/4.8.10.md) · [4.8.9](docs/releases/4.8.9.md) · [4.8.8](docs/releases/4.8.8.md) · [4.8.7](docs/releases/4.8.7.md) · [4.8.6](docs/releases/4.8.6.md) · [4.8.5](docs/releases/4.8.5.md) · [4.8.4](docs/releases/4.8.4.md) · [4.8.3](docs/releases/4.8.3.md) · [4.8.2](docs/releases/4.8.2.md) · [4.8.1](docs/releases/4.8.1.md) · [4.8.0](docs/releases/4.8.0.md) · [Docs hub](docs/README.md) · [Voice](docs/product-voice.md)
49
51
 
50
52
  ---
51
53
 
@@ -106,15 +108,15 @@ See [docs/package-surface.md](docs/package-surface.md#installing-from-git).
106
108
 
107
109
  When the agent writes a bad import, the write doesn’t land.
108
110
  The same check fails the pull request. That is **ArkGate** — import rules, always on
109
- once you adopt. The other three are optional.
111
+ once you adopt (**Contener**). The other three are optional.
110
112
 
111
113
  | | Role | When |
112
114
  |--|------|------|
113
115
  | **While the agent writes** | The write doesn’t land on supported hosts; warning only elsewhere | Always (ArkGate) |
114
116
  | **Before merge** | `arkgate-check` as a **required** CI status | Always (ArkGate) |
115
- | **ArkRules** | Optional policies *inside* a layer | When you ask |
116
- | **ArkRun** | Optional experimental runtime (`arkgate/runtime`) | Off unless you turn it on |
117
- | **ArkOrder** | Stops the agent rewriting the few slow product decisions as CRUD (`arkgate/order`). Valve: first `release()`, later ξ is `proposeRelease` then `apply` | Off unless you turn it on |
117
+ | **ArkRules** | Optional policies *inside* a layer (**Contener** — shape) | When you ask |
118
+ | **ArkRun** | Optional experimental runtime (`arkgate/runtime`) (**Guiar**) | Off unless you turn it on |
119
+ | **ArkOrder** | Extra for the few big choices billing plan, not seat counts (`arkgate/order`) (**Ordenar**) | Off unless you turn it on |
118
120
 
119
121
  Layers (who may import whom) always run. ArkRules, ArkRun, and ArkOrder change no
120
122
  inter-layer verdict when absent. Label leftovers **`[Layer]`** vs **`[ArkRules]`** vs
@@ -142,15 +144,13 @@ check: [4.3.0 — What ArkGate is / isn't](docs/releases/4.3.0.md#what-arkgate-i
142
144
 
143
145
  ## Why it exists
144
146
 
145
- AI coding agents generate code at unprecedented speeds. However, 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.
146
-
147
- Traditional linters catch these architectural violations in CI *after* the agent has finished its work, breaking the flow.
148
-
149
- ArkGate solves this by shifting the check to the exact moment of writing:
147
+ AI takes the shortest path. Contain the write so a bad import never lands. Guide
148
+ the next step so a non-expert is not stuck. Order leftover mess toward a clean
149
+ tree, one small refactor at a time.
150
150
 
151
- 1. **Fail fast at the write boundary.** Through IDE hooks and MCP, ArkGate intercepts the file write. If the agent writes a bad import, the write doesn't land. The agent gets immediate feedback and can self-correct before saving to disk.
152
- 2. **The check is the single source of truth.** A simple `ark.config.json` defines your layers and allowed edges.
153
- 3. **Honest reporting.** Green imports do not equal elegant design. ArkGate separates structural correctness from design smells, providing an improvement compass to guide leftover design work without blocking the PR.
151
+ Traditional linters catch this only in CI after the agent finished. ArkGate
152
+ checks at write time and again on the PR. Green imports are not elegant design
153
+ leftover mess is **needs a refactor**, not “done”.
154
154
 
155
155
  ---
156
156
 
@@ -231,7 +231,7 @@ expectation.
231
231
  | Placement + preflight for multi-file changes | ✅ | ❌ |
232
232
  | Honest governed % + dual plan (edges vs shape) | ✅ | ❌ |
233
233
  | Opt-in intra-layer ArkRules (structure + invariants) | ✅ | ❌ |
234
- | Stops agents rewriting slow product decisions as CRUD (ArkOrder) | ✅ | ❌ |
234
+ | Stops rewriting a big product choice like billing plan (ArkOrder) | ✅ | ❌ |
235
235
  | Incomplete analysis cannot look green | ✅ | varies |
236
236
 
237
237
  ---
@@ -251,7 +251,7 @@ npx arkgate-check --strict-merge # CI / required status
251
251
  npx arkgate-check --install-agent-gates --tools claude,cursor,codex,grok,antigravity
252
252
  # optional: refresh shared home skills (Claude/Grok/Antigravity/Codex; never downgrades)
253
253
  # npx arkgate-check --install-agent-gates --skills-only --agent-homes --force
254
- # optional: same 13 skills via Agent Skills ecosystem (no new names)
254
+ # optional: closed skill catalog via Agent Skills ecosystem (ARK_SKILL_NAMES)
255
255
  # npx skills add ./node_modules/arkgate/templates/agent-skills
256
256
  # optional ArkRun: poll the loopback inspector (ANSI TUI — not a gate)
257
257
  # npx ark-dashboard --url http://127.0.0.1:<port>/snapshot
@@ -302,31 +302,23 @@ interfaces for production. Details: [docs/production-hardening.md](docs/producti
302
302
 
303
303
  ## Optional ArkOrder
304
304
 
305
- Layers stop a bad import. They do not stop a *legal* import that overwrites the
306
- billing plan.
307
-
308
- If the product can name a few slow decisions in an afternoon — plan, cycle,
309
- tenancy; a clinical protocol; match rules an agent will still ship one PUT
310
- that changes them together with seats and invoices. The write gate stays green
311
- because “what may be the plan” was never a rule.
312
-
313
- **ArkOrder** (`arkgate/order`) is that rule. Off unless you add `arkOrder`.
314
- Name the slow keys (`xiKeys`: plan, protocol, cost-code bound — not `projectId`).
315
- A status you can recompute from data you already have is not a slow decision. Derive it. Do not freeze it.
316
- Posting an invoice is absorbed. Changing plan is `proposeRelease` then `apply`.
317
- `refreshSigma`; ingest residual `absorb | escalate_up | hold` + `reasonCode`;
318
- capacity pack as data; in-memory `ReleaseStore`; `ingestTravelAction`; ArkRun
319
- `decisionTape`. A generic `update` of the plan does not land. A use-case that
320
- PATCHes those keys through Prisma is named. Same npm package.
321
- In-memory. Not durable. Does not replace ArkRun.
322
- **ArkOrder freezes the pattern through a valve. ArkRun is how the residual travels.**
323
-
324
- The billing gallery (`plan` / `cycle` / `tenancy`) lives on GitHub, not in the
325
- npm tarball:
326
- [examples/arkorder-billing](https://github.com/pedroknigge/arkgate/tree/main/examples/arkorder-billing).
327
- Rename the three keys. Compact starters leave it off. Details:
328
- [ArkOrder](docs/arkorder.md) · [configuration](docs/configuration.md) ·
329
- [package surface](docs/package-surface.md).
305
+ Layers stop a bad import. ArkOrder stops rewriting a big product choice like
306
+ the billing plan — as if it were a seat count. Change those choices through a
307
+ valve, not a generic update.
308
+
309
+ Off unless you add `arkOrder`. Same npm package (`arkgate/order`). In-memory.
310
+ Not a service. Does not replace ArkGate or ArkRun.
311
+
312
+ Name the few choices (`xiKeys`: plan, cycle, tenancy — not seat counts). First
313
+ freeze is `release()`. Later change is `proposeRelease` then `apply`. A generic
314
+ `update` does not land.
315
+
316
+ Proof path (GitHub, not the npm tarball):
317
+ [examples/arkorder-billing](https://github.com/pedroknigge/arkgate/tree/main/examples/arkorder-billing)
318
+ first freeze is `release()`; later plan change is `proposeRelease` then `apply`.
319
+ Gallery index:
320
+ [examples/README.md](https://github.com/pedroknigge/arkgate/blob/main/examples/README.md).
321
+ Compact starters leave the extra off. Details: [ArkOrder](docs/arkorder.md).
330
322
 
331
323
  ---
332
324
 
@@ -342,8 +334,9 @@ Rename the three keys. Compact starters leave it off. Details:
342
334
  | Config · package surface · TS | [configuration](docs/configuration.md) · [package-surface](docs/package-surface.md) · [typescript-support](docs/typescript-support.md) |
343
335
  | Brownfield | [docs/brownfield-adoption.md](docs/brownfield-adoption.md) |
344
336
  | Security | [SECURITY.md](SECURITY.md) |
345
- | Prepared (4.8.11; not published) | [docs/releases/4.8.11.md](docs/releases/4.8.11.md) · [CHANGELOG](CHANGELOG.md) |
346
- | Current published (4.8.10 on npm `latest`) | [docs/releases/4.8.10.md](docs/releases/4.8.10.md) · [CHANGELOG](CHANGELOG.md) |
337
+ | Prepared (4.8.14; not published) | [CHANGELOG](CHANGELOG.md) |
338
+ | Current published (4.8.11 on npm `latest`) | [docs/releases/4.8.11.md](docs/releases/4.8.11.md) · [CHANGELOG](CHANGELOG.md) |
339
+ | Prior published (4.8.10) | [docs/releases/4.8.10.md](docs/releases/4.8.10.md) · [CHANGELOG](CHANGELOG.md) |
347
340
  | Prior published (4.8.9) | [docs/releases/4.8.9.md](docs/releases/4.8.9.md) · [CHANGELOG](CHANGELOG.md) |
348
341
  | Prior published (4.8.7) | [docs/releases/4.8.7.md](docs/releases/4.8.7.md) · [CHANGELOG](CHANGELOG.md) |
349
342
  | Prior published (4.8.6) | [docs/releases/4.8.6.md](docs/releases/4.8.6.md) |
package/SECURITY.md CHANGED
@@ -28,9 +28,11 @@ a private security contact without including exploit details.
28
28
  ArkGate releases are GitHub-first:
29
29
 
30
30
  1. Changes land on GitHub and must pass CI plus the dedicated security workflow.
31
- 2. A GitHub Release is created from a signed `vX.Y.Z` tag (`git tag -s`). The publish
32
- workflow verifies the signature and fails closed for unsigned tags. The local override
33
- exists only for explicit emergency use and is not enabled in CI.
31
+ 2. A GitHub Release is created from an **annotated** `vX.Y.Z` tag (`git tag -a` is
32
+ enough). The publish workflow checks that the tag matches `package.json` and is
33
+ annotated. Unsigned annotated tags are allowed. Signed tags still verify when
34
+ present. Set `ARK_REQUIRE_SIGNED_RELEASE_TAG=true` on the publish job only if
35
+ you want signed-only again.
34
36
  3. The manual `Publish npm` workflow verifies the tag, requires the GitHub Release to
35
37
  exist, reruns release checks, publishes npm with provenance, and uploads a SHA-256
36
38
  checksum for the npm tarball to the GitHub Release.
@@ -77,6 +77,7 @@ import {
77
77
  writeBaseline,
78
78
  printViolation,
79
79
  printViolationBreakdown,
80
+ printWarning,
80
81
  CONCENTRATION_MIN_VIOLATIONS,
81
82
  } from './lib/violations.mjs';
82
83
  import {
@@ -102,6 +103,8 @@ import {
102
103
  UNGOVERNED_PROBE_CAP,
103
104
  collectGovernedFiles,
104
105
  countUngovernedSourceFiles,
106
+ governedFilesFromRelativePaths,
107
+ isGovernedSourcePath,
105
108
  normalize,
106
109
  walk,
107
110
  } from './lib/scan-files.mjs';
@@ -123,7 +126,6 @@ import {
123
126
  applyAgainstRatchet,
124
127
  bindTeamBaseRefs,
125
128
  contractSessionFrom,
126
- filterChangedGovernedFiles,
127
129
  runTeamPreflight,
128
130
  ungovernedDumpMessage,
129
131
  } from './lib/team-parliament-io.mjs';
@@ -1405,8 +1407,7 @@ async function main() {
1405
1407
  }
1406
1408
  const manifest = readManifest(root, args.manifest);
1407
1409
  const rules = manifest?.architecture?.rules ?? config.rules;
1408
- const allGovernedFiles = loadGovernedFiles();
1409
- if (verdictPath) {
1410
+ if (verdictPath && !args.changed) {
1410
1411
  const refusal = emptyAnalysisRefusalNow();
1411
1412
  if (refusal) {
1412
1413
  reportEmptyAnalysis(refusal);
@@ -1414,10 +1415,9 @@ async function main() {
1414
1415
  }
1415
1416
  }
1416
1417
  if (args.failUngoverned && teamParliament?.changeSet?.productPaths?.length) {
1417
- const governedRel = new Set(
1418
- allGovernedFiles.map((abs) => normalize(path.relative(root, abs)))
1418
+ const dumped = teamParliament.changeSet.productPaths.filter(
1419
+ (rel) => !isGovernedSourcePath(root, rel, config)
1419
1420
  );
1420
- const dumped = teamParliament.changeSet.productPaths.filter((rel) => !governedRel.has(rel));
1421
1421
  if (dumped.length > 0) {
1422
1422
  const message = ungovernedDumpMessage(dumped);
1423
1423
  if (args.json) {
@@ -1430,8 +1430,8 @@ async function main() {
1430
1430
  }
1431
1431
  }
1432
1432
  const files = args.changed
1433
- ? filterChangedGovernedFiles(allGovernedFiles, root, changedPaths, normalize)
1434
- : allGovernedFiles;
1433
+ ? governedFilesFromRelativePaths(root, changedPaths, config)
1434
+ : loadGovernedFiles();
1435
1435
 
1436
1436
  // --coverage is a pure glob/report view (no TypeScript resolver), so serve it BEFORE the
1437
1437
  // TS import: the report must work — and exit 0 — even when typescript isn't installed.
@@ -1821,6 +1821,7 @@ async function main() {
1821
1821
  mode: fitness.mode,
1822
1822
  improvementCompass: reportCompass,
1823
1823
  arkRun: designDepth?.arkRun ?? null,
1824
+ arkOrder: designDepth?.arkOrder ?? null,
1824
1825
  }),
1825
1826
  leftoverDesignWork: designDepth?.designFitness?.designWeak === true,
1826
1827
  };
@@ -1863,6 +1864,7 @@ async function main() {
1863
1864
  ? { deepModuleCoach: designDepth.deepModuleCoach }
1864
1865
  : {}),
1865
1866
  ...(designDepth?.arkRun ? { arkRun: designDepth.arkRun } : {}),
1867
+ ...(designDepth?.arkOrder ? { arkOrder: designDepth.arkOrder } : {}),
1866
1868
  },
1867
1869
  };
1868
1870
  const html = args.beginner
@@ -1964,7 +1966,7 @@ async function main() {
1964
1966
  }, null, 2));
1965
1967
  } else {
1966
1968
  for (const warning of warnings) {
1967
- console.error(`${color.yellow('warning')} ${warning.ruleId} ${warning.message}`);
1969
+ printWarning(warning);
1968
1970
  }
1969
1971
  for (const violation of activeViolations) {
1970
1972
  printViolation(violation);
@@ -105,6 +105,8 @@ export function buildAgentProjectionBody(facts) {
105
105
  '',
106
106
  AGENT_PROJECTION_NON_ENFORCEMENT_LABEL,
107
107
  '',
108
+ 'Contener · Guiar · Ordenar — contain the write, guide the next step, order leftover mess. Skills never enforce.',
109
+ '',
108
110
  `- **arkgateVersion:** \`${version}\` (must match the installed package; regenerate with \`ark agents-md --write\` after upgrade)`,
109
111
  `- **projectionSchema:** \`${ARK_AGENT_PROJECTION_SCHEMA_VERSION}\``,
110
112
  `- **profile:** \`${profile}\`${host ? ` · **host:** \`${host}\`` : ''}`,
@@ -19,7 +19,51 @@ export const FLAT_SKILL_TEMPLATES_RELATIVE_ROOT = 'templates/skills';
19
19
  /** Required entry filename inside each skill directory (Agent Skills standard). */
20
20
  export const AGENT_SKILL_ENTRY_FILENAME = 'SKILL.md';
21
21
  /**
22
- * Closed skill-name freeze (ACS / ADR skill freeze). Exactly these 13 names ship.
22
+ * North-star filter for first-class doors. Not a score. Not enforcement.
23
+ * Skills speak these so an agent picks the right sibling.
24
+ */
25
+ export const ARK_SKILL_NORTH_STAR = Object.freeze(['Contener', 'Guiar', 'Ordenar']);
26
+ /**
27
+ * First-class doors. Each must have crisp when / not when / handoff.
28
+ * Sorted alphabetically.
29
+ */
30
+ export const ARK_FIRST_CLASS_SKILL_NAMES = Object.freeze([
31
+ 'ark-adopt',
32
+ 'ark-autopilot',
33
+ 'ark-coverage',
34
+ 'ark-explain',
35
+ 'ark-explore',
36
+ 'ark-order',
37
+ 'ark-place',
38
+ 'ark-runtime',
39
+ 'ark-upgrade',
40
+ ]);
41
+ /**
42
+ * One-release redirect stubs. Muscle memory / old docs still resolve.
43
+ * Values are first-class doors. Capability surface must stay zero-loss.
44
+ */
45
+ export const ARK_SKILL_STUB_REDIRECTS = Object.freeze({
46
+ 'ark-architect': 'ark-adopt',
47
+ 'ark-contract': 'ark-adopt',
48
+ 'ark-fix': 'ark-autopilot',
49
+ 'ark-loop': 'ark-autopilot',
50
+ 'ark-think': 'ark-explore',
51
+ });
52
+ /**
53
+ * Product surface → first-class doors that exercise it.
54
+ * Standing check: every surface has at least one first-class door.
55
+ */
56
+ export const ARK_SKILL_CAPACITY = Object.freeze({
57
+ Layers: ['ark-adopt', 'ark-place', 'ark-explore', 'ark-autopilot', 'ark-coverage', 'ark-explain'],
58
+ ArkRules: ['ark-adopt', 'ark-explore', 'ark-autopilot'],
59
+ ArkRun: ['ark-adopt', 'ark-runtime', 'ark-place', 'ark-autopilot'],
60
+ ArkOrder: ['ark-adopt', 'ark-order', 'ark-place', 'ark-autopilot'],
61
+ Contener: ['ark-adopt', 'ark-place', 'ark-upgrade'],
62
+ Guiar: ['ark-explore', 'ark-autopilot', 'ark-explain', 'ark-coverage', 'ark-runtime'],
63
+ Ordenar: ['ark-order'],
64
+ });
65
+ /**
66
+ * Closed shipped catalog (first-class + one-release stubs).
23
67
  * Sorted alphabetically for deterministic inventory diffs.
24
68
  */
25
69
  export const ARK_SKILL_NAMES = Object.freeze([
@@ -32,12 +76,13 @@ export const ARK_SKILL_NAMES = Object.freeze([
32
76
  'ark-explore',
33
77
  'ark-fix',
34
78
  'ark-loop',
79
+ 'ark-order',
35
80
  'ark-place',
36
81
  'ark-runtime',
37
82
  'ark-think',
38
83
  'ark-upgrade',
39
84
  ]);
40
- /** Count of frozen skill names (must stay 13 until a ROADMAP item lifts the freeze). */
85
+ /** Count of shipped skill names (first-class + stubs). */
41
86
  export const ARK_SKILL_NAME_COUNT = ARK_SKILL_NAMES.length;
42
87
  const AGENT_SKILL_NAME_PATTERN = /^[a-z0-9]+(?:-[a-z0-9]+)*$/;
43
88
  /**
@@ -51,10 +96,20 @@ export function isValidAgentSkillName(name) {
51
96
  return false;
52
97
  return AGENT_SKILL_NAME_PATTERN.test(name);
53
98
  }
54
- /** True when `name` is one of the frozen 13 Ark skill names. */
99
+ /** True when `name` is in the closed shipped catalog. */
55
100
  export function isArkSkillName(name) {
56
101
  return ARK_SKILL_NAMES.includes(name);
57
102
  }
103
+ /** True when `name` is a first-class door (not a redirect stub). */
104
+ export function isFirstClassArkSkillName(name) {
105
+ return ARK_FIRST_CLASS_SKILL_NAMES.includes(name);
106
+ }
107
+ /** First-class door a leftover name redirects to, or null. */
108
+ export function arkSkillStubRedirect(name) {
109
+ if (!(name in ARK_SKILL_STUB_REDIRECTS))
110
+ return null;
111
+ return ARK_SKILL_STUB_REDIRECTS[name];
112
+ }
58
113
  /**
59
114
  * Parse a skill markdown document with optional YAML frontmatter.
60
115
  * Supports the simple `key: value` / `key: "quoted"` form used by Ark templates
@@ -135,7 +190,7 @@ export function validateAgentSkillDocument(input) {
135
190
  else if (requireArk && !isArkSkillName(name)) {
136
191
  issues.push({
137
192
  code: 'UNKNOWN_SKILL_NAME',
138
- message: `Skill name "${name}" is not in the frozen Ark 13-skill catalog (no new skill names).`,
193
+ message: `Skill name "${name}" is not in the closed Ark skill catalog (ARK_SKILL_NAMES).`,
139
194
  skillName: name,
140
195
  });
141
196
  }
@@ -163,7 +218,7 @@ export function validateAgentSkillDocument(input) {
163
218
  return issues;
164
219
  }
165
220
  /**
166
- * Validate a full Agent Skills package inventory against the frozen 13-name catalog.
221
+ * Validate a full Agent Skills package inventory against the closed catalog.
167
222
  * Detects missing, extra, duplicate, invalid, and (when supplied) flat-template drift.
168
223
  */
169
224
  export function validateAgentSkillsPackage(entries) {
@@ -201,7 +256,7 @@ export function validateAgentSkillsPackage(entries) {
201
256
  if (!seen.has(expected)) {
202
257
  issues.push({
203
258
  code: 'MISSING_SKILL',
204
- message: `Missing frozen skill "${expected}" from Agent Skills package.`,
259
+ message: `Missing catalog skill "${expected}" from Agent Skills package.`,
205
260
  skillName: expected,
206
261
  });
207
262
  }
@@ -212,14 +267,14 @@ export function validateAgentSkillsPackage(entries) {
212
267
  if (!issues.some((i) => i.code === 'UNKNOWN_SKILL_NAME' && i.skillName === name)) {
213
268
  issues.push({
214
269
  code: 'EXTRA_SKILL',
215
- message: `Extra skill "${name}" is not in the frozen Ark 13-skill catalog.`,
270
+ message: `Extra skill "${name}" is not in the closed Ark skill catalog.`,
216
271
  skillName: name,
217
272
  });
218
273
  }
219
274
  else {
220
275
  issues.push({
221
276
  code: 'EXTRA_SKILL',
222
- message: `Extra skill "${name}" is not in the frozen Ark 13-skill catalog.`,
277
+ message: `Extra skill "${name}" is not in the closed Ark skill catalog.`,
223
278
  skillName: name,
224
279
  });
225
280
  }