arkgate 4.7.0 → 4.7.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. package/CHANGELOG.md +53 -2
  2. package/README.md +32 -23
  3. package/bin/lib/agent-projection.mjs +1 -1
  4. package/bin/lib/agent-skills-package.mjs +29 -0
  5. package/bin/lib/check-args.mjs +1 -0
  6. package/bin/lib/ci-and-commands.mjs +3 -3
  7. package/bin/lib/doctor-next-actions.mjs +5 -1
  8. package/bin/lib/enforcement-honesty.mjs +1 -1
  9. package/bin/lib/first-run-help.mjs +5 -5
  10. package/bin/lib/install-migrate.mjs +29 -57
  11. package/bin/lib/managed-upgrade.mjs +2 -7
  12. package/bin/lib/skill-catalog-apply.mjs +126 -0
  13. package/bin/lib/skill-install.mjs +264 -33
  14. package/bin/lib/skill-write.mjs +3 -0
  15. package/dist/index.cjs +25 -25
  16. package/dist/index.d.ts +19 -2
  17. package/dist/index.js +19 -19
  18. package/docs/README.md +8 -5
  19. package/docs/agent-guide.md +6 -5
  20. package/docs/ai-gates.md +4 -3
  21. package/docs/develop.md +4 -0
  22. package/docs/enthusiast/README.md +3 -0
  23. package/docs/enthusiast/how-to-agent-gates.md +1 -1
  24. package/docs/package-surface.md +6 -3
  25. package/docs/product-voice.md +118 -5
  26. package/docs/use.md +15 -8
  27. package/package.json +2 -2
  28. package/server.json +4 -4
  29. package/templates/agent-skills/README.md +1 -1
  30. package/templates/agent-skills/ark-adopt/SKILL.md +2 -2
  31. package/templates/agent-skills/ark-architect/SKILL.md +1 -1
  32. package/templates/agent-skills/ark-autopilot/SKILL.md +2 -2
  33. package/templates/agent-skills/ark-contract/SKILL.md +8 -7
  34. package/templates/agent-skills/ark-coverage/SKILL.md +1 -1
  35. package/templates/agent-skills/ark-explain/SKILL.md +1 -1
  36. package/templates/agent-skills/ark-explore/SKILL.md +1 -1
  37. package/templates/agent-skills/ark-fix/SKILL.md +1 -1
  38. package/templates/agent-skills/ark-loop/SKILL.md +1 -1
  39. package/templates/agent-skills/ark-place/SKILL.md +1 -1
  40. package/templates/agent-skills/ark-runtime/SKILL.md +1 -1
  41. package/templates/agent-skills/ark-think/SKILL.md +1 -1
  42. package/templates/agent-skills/ark-upgrade/SKILL.md +1 -1
  43. package/templates/skills/ark-adopt.md +2 -2
  44. package/templates/skills/ark-architect.md +1 -1
  45. package/templates/skills/ark-autopilot.md +2 -2
  46. package/templates/skills/ark-contract.md +8 -7
  47. package/templates/skills/ark-coverage.md +1 -1
  48. package/templates/skills/ark-explain.md +1 -1
  49. package/templates/skills/ark-explore.md +1 -1
  50. package/templates/skills/ark-fix.md +1 -1
  51. package/templates/skills/ark-loop.md +1 -1
  52. package/templates/skills/ark-place.md +1 -1
  53. package/templates/skills/ark-runtime.md +1 -1
  54. package/templates/skills/ark-think.md +1 -1
  55. package/templates/skills/ark-upgrade.md +1 -1
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: ark-upgrade
3
- description: Upgrade ArkGate through a content-identity preview, preserve customized files, and verify the active host and architecture contract.
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 — mark the Ark path. Greenfield scaffold or brownfield honesty. Write ark.config, optional advisory ArkRules, baseline, and gates in this turn. CLI validates.
3
+ description: Session 0 — write the rules file (ark.config.json) to match the real folders. Optional extra rules inside a layer. CLI validates.
4
4
  ---
5
5
 
6
6
  # /ark-adopt — Mark the path (session 0)
7
7
 
8
- **When:** empty tree, or the architecture config does not match the real folders (session 0).
8
+ **When:** empty tree, or the rules file does not match the real folders (session 0).
9
9
  **Not when:** a single new file (`/ark-place`) or leftover design after the path is honest (`/ark-explore` then `/ark-autopilot`).
10
10
 
11
11
  ## Steps
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: ark-architect
3
- description: Shortcut to /ark-adopt for greenfield shape. Deprecated as a first-class door. Do adopt’s job.
3
+ description: Shortcut to /ark-adopt for a new tree. Deprecated as a first-class door.
4
4
  ---
5
5
 
6
6
  # /ark-architect — Shortcut to /ark-adopt
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: ark-autopilot
3
- description: Apply Ark end-to-end — explore first; dual plan A (edges) + B (shape); write mechanical-safe and judgment in this turn; one Shape refactor. Empty plan A is not healthy if leftover design remains. CLI is a sensor; you edit files.
3
+ description: Fix illegal imports and one leftover-design refactor. CLI is a sensor; you edit files.
4
4
  ---
5
5
 
6
6
  # /ark-autopilot — Apply the path
@@ -14,7 +14,7 @@ description: Apply Ark end-to-end — explore first; dual plan A (edges) + B (sh
14
14
  2. Fix import-rule debt; if leftover design remains, apply **one** small refactor.
15
15
  3. Re-run doctor. Never weaken `ark.config.json`.
16
16
 
17
- **This is the apply door.** Invoking it **is** the approval. Doctor remains the control plane.
17
+ **This is the apply door.** Invoking it **is** the approval. Run `arkgate-check --doctor` for the next step.
18
18
 
19
19
  ## Autonomy contract
20
20
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: ark-contract
3
- description: Shortcut to /ark-adopt (session 0) or /ark-autopilot (later config tighten). Deprecated as a first-class door.
3
+ description: Shortcut edit the rules file or extra rules. Use /ark-adopt or /ark-autopilot.
4
4
  ---
5
5
 
6
6
  # /ark-contract — Shortcut to adopt / autopilot
@@ -17,8 +17,9 @@ preview-only. Never weaken the architecture config.
17
17
 
18
18
  | Use this leftover name when… | Prefer instead |
19
19
  |------------------------------|----------------|
20
- | Layers / include / ArkRules need an edit | **`/ark-adopt`** (path) or **`/ark-autopilot`** (tighten) |
20
+ | Layers / include / ArkRules / **ArkRun extra** need an edit | **`/ark-adopt`** (path, first `arkRun`) or **`/ark-autopilot`** (tighten) |
21
21
  | False-green / concentrated edge | **`/ark-adopt`** — write the honest config |
22
+ | Companion install / one kernel candidate | **`/ark-runtime`** — this leftover name does not wire `@arkgate/runtime` |
22
23
 
23
24
  ## Dual engine (mandatory)
24
25
 
@@ -40,7 +41,7 @@ restart/retargeting is required. `ark://manifest` never satisfies this preflight
40
41
 
41
42
  ## Dual plane — layers + ArkRules (mandatory, except /ark-runtime)
42
43
 
43
- Label findings **`[Layer]`** vs **`[ArkRules]`**. Absence of `arkRules` is valid.
44
+ Label findings **`[Layer]`** vs **`[ArkRules]`** vs **`[ArkRun]`**. Absence of `arkRules` or `arkRun` is valid. First-time extra is **`/ark-adopt`** (advisory). Wire one candidate with **`/ark-runtime`**. New kernel-managed file with **`/ark-place`**. Do not invent `/ark-run`.
44
45
 
45
46
  ## Subagent fan-out (optional, host-dependent)
46
47
 
@@ -54,9 +55,9 @@ If the host supports **parallel subagents**, fan out read-only scouts; otherwise
54
55
 
55
56
  ## Steps
56
57
 
57
- 1. If the path is missing or lying → execute **`/ark-adopt`**.
58
- 2. If the path is honest and you are tightening rules → execute **`/ark-autopilot`**.
59
- 3. `ark-check --strict-config`.
58
+ 1. If the path is missing or lying → execute **`/ark-adopt`** (including first advisory `arkRun`).
59
+ 2. If the path is honest and you are tightening rules or the ArkRun extra → execute **`/ark-autopilot`**.
60
+ 3. Companion / one candidate → **`/ark-runtime`**. `ark-check --strict-config`.
60
61
 
61
62
  ## Completion contract (skill incomplete if missing)
62
63
 
@@ -66,7 +67,7 @@ Skill incomplete if missing any field below.
66
67
  - **Sensor:** commands/tools run
67
68
  - **Opened:** real paths read (or `n/a` only if pure install/upgrade with no source analysis)
68
69
  - **Result:** one-line outcome
69
- - **Planes:** one-line split of residual **[Layer]** vs **[ArkRules]** (or `n/a` if unused)
70
+ - **Planes:** one-line split of residual **[Layer]** vs **[ArkRules]** vs **[ArkRun]** (or `n/a` if unused)
70
71
  - **Compass:** top residual lenses | `n/a`
71
72
  - **Handoff:** `/ark-adopt` / `/ark-autopilot` / `none`
72
73
  - **Incomplete?** `no` | `yes — <what is missing>`
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: ark-coverage
3
- description: Ark adoption fitness audit governed%, gates, baseline honesty, capability gaps. CLI is a sensor; read enough source to prove gaps. Full product recon and pattern dual-plan belong to /ark-explore.
3
+ description: How much of the tree the rules file covers. CLI is a sensor; read the source.
4
4
  ---
5
5
 
6
6
  # /ark-coverage — Ark adoption fitness (not full recon)
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: ark-explain
3
- description: Explain this project's architecture in plain language and generate the showcase HTML report — layers, rules, coverage, gates, and why the contract exists.
3
+ description: Explain the rules file in plain language and generate the HTML report.
4
4
  ---
5
5
 
6
6
  # /ark-explain — Understand this project's architecture
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: ark-explore
3
- description: Map skill decision-grade recon of layers + ArkRules opportunities + dual-plan seed (no apply). Primary post-green door when leftover design work remains. CLI is a sensor; you read the tree. No gate bypass.
3
+ description: Map import rules and leftover design. No apply. CLI is a sensor; you read the tree.
4
4
  ---
5
5
 
6
6
  # /ark-explore — Recon the real project (map only)
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: ark-fix
3
- description: Shortcut to /ark-autopilot for a small violation cluster. Deprecated as a first-class door.
3
+ description: Shortcut to /ark-autopilot for a small illegal-import cluster.
4
4
  ---
5
5
 
6
6
  # /ark-fix — Shortcut to /ark-autopilot
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: ark-loop
3
- description: Shortcut to /ark-autopilot for driving plan A to zero. Deprecated as a first-class door. CLI validates — you edit code.
3
+ description: Shortcut to /ark-autopilot for illegal-import fixes. CLI validates — you edit code.
4
4
  ---
5
5
 
6
6
  # /ark-loop — Shortcut to /ark-autopilot
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: ark-place
3
- description: "Where does new code go? Names the layer, directory, and naming for a new artifact from the contract, and writes it there. Autonomous."
3
+ description: "Where does new code go? Names the folder from the rules file and writes the file there."
4
4
  ---
5
5
 
6
6
  # /ark-place — Where does this code go?
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: ark-runtime
3
- description: Evaluate and wire the experimental ArkRun companion (@arkgate/runtime) against hand-rolled event bus, outbox, saga, projection, policy, or NestJS code. One candidate. Extra on via /ark-adopt; new files via /ark-place. Skills never enforce.
3
+ description: Wire the optional ArkRun extra (@arkgate/runtime). One candidate. Extra on via /ark-adopt.
4
4
  ---
5
5
 
6
6
  # /ark-runtime — Evaluate and wire ArkRun (experimental opt-in)
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: ark-think
3
- description: Host-side architectural reasoning — 2–3 enforceable options on layer and/or ArkRules planes for ONE decision. Not full recon (use /ark-explore). No gate bypass. No package LLM call.
3
+ description: 2–3 options for one import-rule or ArkRules decision. Not a full map (use /ark-explore).
4
4
  ---
5
5
 
6
6
  # /ark-think — Architectural reasoning (host LLM only)
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: ark-upgrade
3
- description: Upgrade ArkGate through a content-identity preview, preserve customized files, and verify the active host and architecture contract.
3
+ description: Upgrade ArkGate. Preview first, keep customized files, then apply.
4
4
  ---
5
5
 
6
6
  # /ark-upgrade — managed ArkGate upgrade