arkgate 4.5.6 → 4.6.0

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 (47) hide show
  1. package/CHANGELOG.md +47 -1
  2. package/README.md +16 -14
  3. package/bin/ark-check-runtime.mjs +15 -5
  4. package/bin/ark-mcp-runtime.mjs +82 -61
  5. package/bin/ark.mjs +2 -2
  6. package/bin/lib/agent-gates.mjs +2 -0
  7. package/bin/lib/agent-homes.mjs +296 -0
  8. package/bin/lib/agent-projection.mjs +1 -1
  9. package/bin/lib/ci-and-commands.mjs +9 -8
  10. package/bin/lib/design-smells.mjs +3 -7
  11. package/bin/lib/doctor-plan.mjs +36 -12
  12. package/bin/lib/gate-files.mjs +1 -1
  13. package/bin/lib/golden-pattern.mjs +1 -1
  14. package/bin/lib/hook-templates.mjs +13 -11
  15. package/bin/lib/host-support-matrix.mjs +32 -12
  16. package/bin/lib/html-report-depth.mjs +7 -8
  17. package/bin/lib/html-report.mjs +2 -1
  18. package/bin/lib/install-migrate.mjs +36 -0
  19. package/bin/lib/managed-upgrade.mjs +6 -1
  20. package/bin/lib/mcp-adoption.mjs +6 -1
  21. package/bin/lib/mcp-process-package.mjs +95 -0
  22. package/bin/lib/post-green-path.mjs +3 -2
  23. package/bin/lib/product-copy.mjs +32 -0
  24. package/bin/lib/skill-write.mjs +1 -1
  25. package/bin/lib/start-preview.mjs +5 -1
  26. package/bin/lib/upgrade-whats-new.mjs +16 -0
  27. package/bin/lib/write-path-capabilities.mjs +62 -1
  28. package/dist/index.cjs +19 -19
  29. package/dist/index.d.ts +1 -1
  30. package/dist/index.js +22 -22
  31. package/docs/README.md +3 -2
  32. package/docs/agent-guide.md +18 -13
  33. package/docs/ai-gates.md +43 -14
  34. package/docs/develop.md +3 -3
  35. package/docs/enthusiast/how-to-agent-gates.md +4 -3
  36. package/docs/package-surface.md +3 -3
  37. package/docs/product-voice.md +80 -74
  38. package/docs/use.md +7 -5
  39. package/package.json +2 -2
  40. package/server.json +3 -3
  41. package/templates/agent-skills/README.md +1 -1
  42. package/templates/agent-skills/ark-autopilot/SKILL.md +1 -1
  43. package/templates/agent-skills/ark-explore/SKILL.md +5 -5
  44. package/templates/agent-skills/ark-upgrade/SKILL.md +2 -1
  45. package/templates/skills/ark-autopilot.md +1 -1
  46. package/templates/skills/ark-explore.md +5 -5
  47. package/templates/skills/ark-upgrade.md +2 -1
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: ark-explore
3
- description: Specialized map skill — decision-grade recon of layers + ArkRules opportunities + dual-plan seed (no apply). Primary post-green door when design-weak. Not the default day-to-day path (use doctor + place/gate; guided apply is /ark-autopilot). CLI is a sensor; you read the tree. No gate bypass.
3
+ description: Specialized map skill — decision-grade recon of layers + ArkRules opportunities + dual-plan seed (no apply). Primary post-green door when leftover design work remains. Not the default day-to-day path (use doctor + place/gate; guided apply is /ark-autopilot). CLI is a sensor; you read the tree. No gate bypass.
4
4
  ---
5
5
 
6
6
  # /ark-explore — Recon the real project (map only)
@@ -23,7 +23,7 @@ Name 1–3 **residual** lenses in plain language before skill-shopping. Always `
23
23
 
24
24
  **What the user should feel next:** fewer blocked AI writes, clearer folders, safer domain — then jargon.
25
25
 
26
- **Anti false-done:** empty plan A + residual lenses / design-weak → **Incomplete? yes**. Green edges alone
26
+ **Anti false-done:** empty plan A + leftover design work → **Incomplete? yes**. Green imports alone
27
27
  are not “architecture finished.”
28
28
 
29
29
  **AI-easy architecture:** ports over concrete I/O in domain; one concern per module; golden pattern for
@@ -59,12 +59,12 @@ If the consumer tree has a **domain glossary**, prefer its terms for layer/slice
59
59
  | Use `/ark-explore` when… | Do **not** use it when… |
60
60
  |--------------------------|-------------------------|
61
61
  | Map / “what next?” / residual after ENFORCE | User wants edits applied → `/ark-autopilot` or `/ark-fix` |
62
- | **Primary post-green door:** messy / spaghetti / design-weak / “clarify for AI” | Skill-shopping coverage or think for the same residual |
62
+ | **Primary post-green door:** messy / leftover design work / “clarify for AI” | Skill-shopping coverage or think for the same leftover work |
63
63
  | Spaghetti brownfield: patterns concurrent, design-weak under green check | Only “governed% + gates installed?” numbers → `/ark-coverage` |
64
64
  | Dual-plan **seed** (A remediation + B pattern bets) without applying | One design trade-off between 2–3 options already mapped → `/ark-think` |
65
65
  | Path-correct vs design-correct honesty | Plain-language tour / HTML report → `/ark-explain` |
66
66
 
67
- **Post-green single path:** when doctor `postGreenPath` / ENFORCE · design-weak is active, **this skill
67
+ **Post-green single path:** when doctor `postGreenPath` / ENFORCE · leftover design work is active, **this skill
68
68
  (shape-focus / dual-plan seed) is the map half of the one door** — then `/ark-autopilot` only
69
69
  to apply B with user OK. Do not send the user to coverage or think as equal first choices.
70
70
 
@@ -75,7 +75,7 @@ to apply B with user OK. Do not send the user to coverage or think as equal firs
75
75
  | **Suggest** | Point at `ark start` → doctor; map only if user insists on recon before setup |
76
76
  | **Adapt** | Map false-green / ungoverned / concentrated edge; hand off adopt/contract before Shape vanity |
77
77
  | **Enforce** | Confirm edges; if residual smells/patterns appear, auto-upgrade to dual-plan seed / shape-focus |
78
- | **Enforce · design-weak** | **Primary post-green map door** — shape-focus + dual-plan B + extraction cards. False-done forbidden. Never claim healthy because plan A is empty. |
78
+ | **Enforce · leftover design work** | **Primary post-green map door** — shape-focus + dual-plan B + extraction cards. False-done forbidden. Never claim healthy because plan A is empty. |
79
79
 
80
80
  `/ark-autopilot`, `/ark-adopt`, and `/ark-coverage` embed a **lighter** version of this pass.
81
81
  **You** are the full recon + pattern-planning skill.
@@ -21,7 +21,7 @@ Name 1–3 **residual** lenses in plain language before skill-shopping. Always `
21
21
 
22
22
  **What the user should feel next:** fewer blocked AI writes, clearer folders, safer domain — then jargon.
23
23
 
24
- **Anti false-done:** empty plan A + residual lenses / design-weak → **Incomplete? yes**. Green edges alone
24
+ **Anti false-done:** empty plan A + leftover design work → **Incomplete? yes**. Green imports alone
25
25
  are not “architecture finished.”
26
26
 
27
27
  **AI-easy architecture:** ports over concrete I/O in domain; one concern per module; golden pattern for
@@ -58,6 +58,7 @@ Never invent gate verdicts from these suggestions. Missing residual is honest em
58
58
  | Skills customized after install | Preserved by default. Preview `skillDrift` shows counts. **`--refresh-skills`** rewrites customized *skills* only with consent. |
59
59
  | Conflicted managed assets | Still need `--accept-conflicts`. Never silent overwrite of true edits. |
60
60
  | Multiple checkouts / monorepo packages | One `expectedRoot` per project; upgrade **each** pin; restart MCP after bump; prefer project-local CLI until identity matched **and** process version aligns. |
61
+ | Stale `~/.claude/skills` or `~/.grok/skills` | Shared homes should be the newest ArkGate on the machine (additive; never downgrade). Refresh: `--install-agent-gates --skills-only --agent-homes --force`. Project skills may lag with the pin. |
61
62
  | Active host not in `--tools` / manifest | Preview `hostSelection` notes it and suggests `--tools` expansion. |
62
63
 
63
64
  **Post-apply:** read `postUpgradeChecks` (advisory). Confirm pin↔CLI, run doctor (compass + deepModuleCoach),
@@ -190,7 +190,7 @@ Status lights from doctor — not settings you choose. Rank residual honestly:
190
190
  | **Suggest** | Thin/new tree; contract not control plane | Finish `ark start` → re-doctor; do not skill-shop |
191
191
  | **Adapt** | Contract/tree disagree or debt open | Explore + adopt/loop/contract; do not claim guarded |
192
192
  | **Enforce** | Honest coverage + clean checked **edges** | Confirm gates + CI; emit dual-plan B only if residual found |
193
- | **Enforce · design-weak** | Edges clean; design smells remain | **Primary Shape door:** explore shape-focus → dual-plan **B** → apply **one** pilot with user OK. Empty plan A ≠ done. Never mechanical-safe B. False-done forbidden. |
193
+ | **Enforce · leftover design work** | Imports clean; design still messy | **Primary Shape door:** explore shape-focus → dual-plan **B** → apply **one** small refactor with user OK. Empty plan A ≠ done. Never mechanical-safe B. False-done forbidden. |
194
194
 
195
195
  - **Setup (Suggest):** no config → `ark start` (start freezes origin after config, before gates).
196
196
  - **Align (Adapt):** open debt, low honesty, or false-green → explore + adopt/loop; do not claim “guarded”.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: ark-explore
3
- description: Specialized map skill — decision-grade recon of layers + ArkRules opportunities + dual-plan seed (no apply). Primary post-green door when design-weak. Not the default day-to-day path (use doctor + place/gate; guided apply is /ark-autopilot). CLI is a sensor; you read the tree. No gate bypass.
3
+ description: Specialized map skill — decision-grade recon of layers + ArkRules opportunities + dual-plan seed (no apply). Primary post-green door when leftover design work remains. Not the default day-to-day path (use doctor + place/gate; guided apply is /ark-autopilot). CLI is a sensor; you read the tree. No gate bypass.
4
4
  ---
5
5
 
6
6
  # /ark-explore — Recon the real project (map only)
@@ -23,7 +23,7 @@ Name 1–3 **residual** lenses in plain language before skill-shopping. Always `
23
23
 
24
24
  **What the user should feel next:** fewer blocked AI writes, clearer folders, safer domain — then jargon.
25
25
 
26
- **Anti false-done:** empty plan A + residual lenses / design-weak → **Incomplete? yes**. Green edges alone
26
+ **Anti false-done:** empty plan A + leftover design work → **Incomplete? yes**. Green imports alone
27
27
  are not “architecture finished.”
28
28
 
29
29
  **AI-easy architecture:** ports over concrete I/O in domain; one concern per module; golden pattern for
@@ -59,12 +59,12 @@ If the consumer tree has a **domain glossary**, prefer its terms for layer/slice
59
59
  | Use `/ark-explore` when… | Do **not** use it when… |
60
60
  |--------------------------|-------------------------|
61
61
  | Map / “what next?” / residual after ENFORCE | User wants edits applied → `/ark-autopilot` or `/ark-fix` |
62
- | **Primary post-green door:** messy / spaghetti / design-weak / “clarify for AI” | Skill-shopping coverage or think for the same residual |
62
+ | **Primary post-green door:** messy / leftover design work / “clarify for AI” | Skill-shopping coverage or think for the same leftover work |
63
63
  | Spaghetti brownfield: patterns concurrent, design-weak under green check | Only “governed% + gates installed?” numbers → `/ark-coverage` |
64
64
  | Dual-plan **seed** (A remediation + B pattern bets) without applying | One design trade-off between 2–3 options already mapped → `/ark-think` |
65
65
  | Path-correct vs design-correct honesty | Plain-language tour / HTML report → `/ark-explain` |
66
66
 
67
- **Post-green single path:** when doctor `postGreenPath` / ENFORCE · design-weak is active, **this skill
67
+ **Post-green single path:** when doctor `postGreenPath` / ENFORCE · leftover design work is active, **this skill
68
68
  (shape-focus / dual-plan seed) is the map half of the one door** — then `/ark-autopilot` only
69
69
  to apply B with user OK. Do not send the user to coverage or think as equal first choices.
70
70
 
@@ -75,7 +75,7 @@ to apply B with user OK. Do not send the user to coverage or think as equal firs
75
75
  | **Suggest** | Point at `ark start` → doctor; map only if user insists on recon before setup |
76
76
  | **Adapt** | Map false-green / ungoverned / concentrated edge; hand off adopt/contract before Shape vanity |
77
77
  | **Enforce** | Confirm edges; if residual smells/patterns appear, auto-upgrade to dual-plan seed / shape-focus |
78
- | **Enforce · design-weak** | **Primary post-green map door** — shape-focus + dual-plan B + extraction cards. False-done forbidden. Never claim healthy because plan A is empty. |
78
+ | **Enforce · leftover design work** | **Primary post-green map door** — shape-focus + dual-plan B + extraction cards. False-done forbidden. Never claim healthy because plan A is empty. |
79
79
 
80
80
  `/ark-autopilot`, `/ark-adopt`, and `/ark-coverage` embed a **lighter** version of this pass.
81
81
  **You** are the full recon + pattern-planning skill.
@@ -21,7 +21,7 @@ Name 1–3 **residual** lenses in plain language before skill-shopping. Always `
21
21
 
22
22
  **What the user should feel next:** fewer blocked AI writes, clearer folders, safer domain — then jargon.
23
23
 
24
- **Anti false-done:** empty plan A + residual lenses / design-weak → **Incomplete? yes**. Green edges alone
24
+ **Anti false-done:** empty plan A + leftover design work → **Incomplete? yes**. Green imports alone
25
25
  are not “architecture finished.”
26
26
 
27
27
  **AI-easy architecture:** ports over concrete I/O in domain; one concern per module; golden pattern for
@@ -58,6 +58,7 @@ Never invent gate verdicts from these suggestions. Missing residual is honest em
58
58
  | Skills customized after install | Preserved by default. Preview `skillDrift` shows counts. **`--refresh-skills`** rewrites customized *skills* only with consent. |
59
59
  | Conflicted managed assets | Still need `--accept-conflicts`. Never silent overwrite of true edits. |
60
60
  | Multiple checkouts / monorepo packages | One `expectedRoot` per project; upgrade **each** pin; restart MCP after bump; prefer project-local CLI until identity matched **and** process version aligns. |
61
+ | Stale `~/.claude/skills` or `~/.grok/skills` | Shared homes should be the newest ArkGate on the machine (additive; never downgrade). Refresh: `--install-agent-gates --skills-only --agent-homes --force`. Project skills may lag with the pin. |
61
62
  | Active host not in `--tools` / manifest | Preview `hostSelection` notes it and suggests `--tools` expansion. |
62
63
 
63
64
  **Post-apply:** read `postUpgradeChecks` (advisory). Confirm pin↔CLI, run doctor (compass + deepModuleCoach),