arkgate 4.8.8 → 4.8.10

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 (65) hide show
  1. package/CHANGELOG.md +141 -3
  2. package/README.md +9 -6
  3. package/bin/ark-check-runtime.mjs +24 -2
  4. package/bin/ark-layer-match.mjs +25 -10
  5. package/bin/ark.mjs +18 -10
  6. package/bin/lib/agent-homes.mjs +1 -1
  7. package/bin/lib/analysis-engine.mjs +8 -8
  8. package/bin/lib/architecture-scan.mjs +91 -4
  9. package/bin/lib/ark-order-facts.mjs +11 -4
  10. package/bin/lib/ark-order-sensors.mjs +103 -3
  11. package/bin/lib/arkrule-file-hints.mjs +255 -20
  12. package/bin/lib/arkrules-sensors.mjs +364 -68
  13. package/bin/lib/baseline-key.mjs +45 -1
  14. package/bin/lib/config-contract.mjs +9 -3
  15. package/bin/lib/config-extras.mjs +1 -0
  16. package/bin/lib/contract-smells.mjs +12 -6
  17. package/bin/lib/diagnostic-catalog.mjs +1 -0
  18. package/bin/lib/doctor-human.mjs +35 -10
  19. package/bin/lib/doctor-next-actions.mjs +24 -3
  20. package/bin/lib/field-install.mjs +23 -2
  21. package/bin/lib/first-run-help.mjs +69 -5
  22. package/bin/lib/gate-files.mjs +108 -22
  23. package/bin/lib/managed-upgrade.mjs +9 -1
  24. package/bin/lib/resolved-candidate-facts.mjs +82 -1
  25. package/bin/lib/rules-inventory.mjs +7 -3
  26. package/bin/lib/upgrade-command.mjs +17 -4
  27. package/bin/lib/upstream-report.mjs +330 -0
  28. package/bin/lib/violations.mjs +51 -15
  29. package/dist/{configTypes-0eHpocR3.d.ts → configTypes-j7so8B4O.d.ts} +12 -0
  30. package/dist/{diagnosticCatalog-DxKCTBbp.d.ts → diagnosticCatalog-biferT4R.d.ts} +11 -5
  31. package/dist/eslint/index.cjs +5 -8
  32. package/dist/eslint/index.d.ts +6 -4
  33. package/dist/eslint/index.js +5 -8
  34. package/dist/index.cjs +30 -33
  35. package/dist/index.d.ts +18 -6
  36. package/dist/index.js +30 -33
  37. package/dist/nestjs/index.cjs +3 -3
  38. package/dist/nestjs/index.d.ts +3 -3
  39. package/dist/nestjs/index.js +2 -2
  40. package/dist/order/index.cjs +1 -1
  41. package/dist/order/index.d.ts +6 -2
  42. package/dist/order/index.js +1 -1
  43. package/dist/runtime/index.cjs +11 -11
  44. package/dist/runtime/index.d.ts +6 -6
  45. package/dist/runtime/index.js +11 -11
  46. package/dist/{types-BK47clMl.d.ts → types-Djbs3KjE.d.ts} +1 -1
  47. package/dist/{types-DxvmJO-D.d.ts → types-tGhZUiGX.d.ts} +1 -1
  48. package/docs/README.md +4 -3
  49. package/docs/agent-guide.md +27 -2
  50. package/docs/ai-gates.md +8 -0
  51. package/docs/arkorder.md +30 -7
  52. package/docs/brownfield-adoption.md +30 -0
  53. package/docs/configuration.md +61 -14
  54. package/docs/develop.md +4 -2
  55. package/docs/diagnostics.md +10 -0
  56. package/docs/package-surface.md +7 -5
  57. package/docs/use.md +11 -0
  58. package/package.json +1 -1
  59. package/schemas/ark.config.schema.json +12 -2
  60. package/server.json +2 -2
  61. package/templates/agent-skills/README.md +1 -1
  62. package/templates/agent-skills/ark-contract/SKILL.md +1 -1
  63. package/templates/agent-skills/ark-explore/SKILL.md +24 -3
  64. package/templates/skills/ark-contract.md +1 -1
  65. package/templates/skills/ark-explore.md +24 -3
@@ -45,7 +45,7 @@ Label findings **`[Layer]`** vs **`[ArkRules]`** vs **`[ArkRun]`** vs **`[ArkOrd
45
45
 
46
46
  Application / Features may declare advisory **`writes-via-aggregate`**: a use-case that imports a persistence driver and calls `.insert` / `.create` / `INSERT INTO` is the skip. Persistence adapters stay the write edge. Do not add `Externals/` or `admission.ts` as contract law.
47
47
 
48
- When `arkOrder` is on, name **`xiKeys`** (3–5 slow product decisions). Membership ids and recomputable statuses are not keys: derive a status on read or fold it from ingest instead. A use-case that persists those keys is `ARKORDER_XI_FIELD_WRITE`. First freeze is `release()`; later ξ is `proposeRelease` then `apply`; `refreshSigma`; ingest residual `absorb | escalate_up | hold` + `reasonCode`; capacity pack as data; in-memory `ReleaseStore`; ArkRun `decisionTape`. Copy [examples/arkorder-billing/](../../../examples/arkorder-billing/) and rename the three keys. The check remains silent on semantic entailment.
48
+ When `arkOrder` is on, name **`xiKeys`** (3–5 slow product decisions). Membership ids and recomputable statuses are not keys: derive a status on read or fold it from ingest instead. A use-case that persists those keys is `ARKORDER_XI_FIELD_WRITE`. First freeze is `release()`; later ξ is `proposeRelease` then `apply`; `refreshSigma`; ingest residual `absorb | escalate_up | hold` + `reasonCode`; capacity pack as data; in-memory `ReleaseStore`; ArkRun `decisionTape`. The billing gallery lives on GitHub, not in the npm tarball: [examples/arkorder-billing](https://github.com/pedroknigge/arkgate/tree/main/examples/arkorder-billing). Rename the three keys. The check remains silent on semantic entailment.
49
49
 
50
50
  ## Subagent fan-out (optional, host-dependent)
51
51
 
@@ -19,6 +19,7 @@ description: Map import rules and leftover design. No apply. CLI is a sensor; yo
19
19
  - Doctor #1: if ENFORCE + empty plan A and gates are already installed → **Shape** (`/ark-explore` then `/ark-autopilot`). Do not say install-agent-gates.
20
20
  - Distinguish **missing** skills vs **stale** catalog. Installed ≠ stale.
21
21
  - Hook green is not tree green (scripted edits bypass PreToolUse).
22
+ - Bug / false green / false red / missing doc / improvable behavior **in ArkGate itself** → draft one upstream GitHub issue (`pedroknigge/arkgate` or the installed package `repository.url`), **ask the human to confirm send**, then `gh issue create`. Never auto-file. Never file ArkGate defects on the consumer product repo.
22
23
 
23
24
  ## Autonomy contract
24
25
 
@@ -27,7 +28,24 @@ incomplete. **Do not write** config or product code (that is `/ark-adopt` / `/ar
27
28
  **CLI budget:** one doctor / coverage; then open ≥12 files across ≥4 dirs; then the map.
28
29
 
29
30
  **Still never:** weaken the config; invent `mechanical-safe` kinds; claim healthy because
30
- plan A is empty while leftover design work remains.
31
+ plan A is empty while leftover design work remains; auto-file GitHub issues; file ArkGate
32
+ defects on the consumer product repo; skip the human confirm step.
33
+
34
+ ## Report ArkGate defects (ask first)
35
+
36
+ This skill maps **this** tree. If recon shows a bug, false green, false red, missing doc, or
37
+ improvable behavior **in ArkGate itself** (the `arkgate` package — not leftover design in the
38
+ consumer app):
39
+
40
+ 1. Draft one GitHub issue for **upstream** (`pedroknigge/arkgate`, or `package.json`
41
+ `repository.url` of the installed `arkgate` package).
42
+ 2. **Ask the human in the loop to confirm send.** Do not create the issue until they say yes.
43
+ 3. If confirmed, `gh issue create` with the logged-in account. One finding per issue. Include
44
+ repro commands, version, and measured evidence.
45
+ 4. Never auto-file, batch-spam, or skip confirm. Never file ArkGate defects on the consumer
46
+ product repo.
47
+
48
+ Reporting is not applying product code. Stay map-only on this tree.
31
49
 
32
50
  Use when you need a decision-grade map or the **Primary post-green door**; hand off to
33
51
  `/ark-autopilot` to apply. Day-to-day place + gate work does not require this skill.
@@ -168,7 +186,7 @@ ArkGate has **always-on Layers** plus opt-in extras. The user chooses extras; yo
168
186
  ### Explore + extras
169
187
  - Map extras when present; never write `arkRun` / `arkOrder`. Extra off → residual `n/a` / silent.
170
188
  - When `arkOrder` is on, name the valve: first freeze `release()`; later ξ is `proposeRelease` then `apply`; `refreshSigma`; ingest residual `absorb | escalate_up | hold` + `reasonCode`; capacity pack as data; in-memory `ReleaseStore` (`createMemoryReleaseStore`); thin travel `ingestTravelAction`. ArkRun residual may include information package `decisionTape` `{ xiHash, event, residual }`.
171
- - Field path may name `examples/arkorder-billing/` (ArkOrder fixture — map only). First extra write is `/ark-adopt`; grind is `/ark-autopilot`.
189
+ - Field path may name the ArkOrder gallery on GitHub (`https://github.com/pedroknigge/arkgate/tree/main/examples/arkorder-billing`; not in the npm tarball — map only). First extra write is `/ark-adopt`; grind is `/ark-autopilot`.
172
190
 
173
191
  ## Output mode (pick one — do not invent a fourth)
174
192
 
@@ -297,7 +315,7 @@ When `examples/`, `templates/`, gallery starters, eval fixtures, or docs claim
297
315
  3. Diff **rule strength** across archetypes (missing denies = soft false-green for consumers).
298
316
  4. Note import style vs package surface docs (`arkgate` root barrel vs preferred subpath).
299
317
  5. Flag **false promises**: demo fails under its own check, or green with a hollow contract.
300
- 6. When extras are on, label residual `[ArkRun]` / `[ArkOrder]`. Field path may name `examples/arkorder-billing/`. Never write extras from this skill.
318
+ 6. When extras are on, label residual `[ArkRun]` / `[ArkOrder]`. Field path may name the ArkOrder gallery on GitHub (`https://github.com/pedroknigge/arkgate/tree/main/examples/arkorder-billing`; not in the npm tarball). Never write extras from this skill.
301
319
 
302
320
  If the repo is a **pure app** (no examples): state **Field path: internal** and do one of:
303
321
  - Name the **norm for new code** that the residual implies (e.g. “no new `platform/db` in routes”), or
@@ -431,6 +449,9 @@ Optional: **Diff vs naive sensor-only read** (what reading the tree changed).
431
449
  - Mode respected: no multi-week roadmap in recon mode; dual-plan seed capped at 3–5 B bets.
432
450
  - Clear handoff: `/ark-adopt` | `/ark-autopilot` | `/ark-place` | CLI | `stop`.
433
451
  - No gate weakening; no false ENFORCE claim; no README echo as primary content.
452
+ - If you found a bug / false green / false red / missing doc / improvable behavior in the
453
+ **ArkGate package**, you drafted one upstream issue, asked the human to confirm, and did not
454
+ `gh issue create` until they said yes. Never filed it on the consumer repo.
434
455
 
435
456
  ## Completion contract (skill incomplete if missing)
436
457