@canonical/pragma-cli 0.35.0 → 0.36.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 (230) hide show
  1. package/README.md +2 -2
  2. package/bundled-skills/add-standard/SKILL.md +338 -0
  3. package/bundled-skills/adoption-a1-styles/SKILL.md +269 -0
  4. package/bundled-skills/adoption-a2-components/SKILL.md +291 -0
  5. package/bundled-skills/adoption-a3-forms/SKILL.md +260 -0
  6. package/bundled-skills/anatomy-author/ANATOMY_DSL_SPEC.md +406 -0
  7. package/bundled-skills/anatomy-author/SKILL.md +1226 -0
  8. package/bundled-skills/design-auditor/SKILL.md +455 -0
  9. package/bundled-skills/implement-component/SKILL.md +333 -0
  10. package/bundled-skills/specify-component/SKILL.md +331 -0
  11. package/bundled-skills/specify-pattern/SKILL.md +292 -0
  12. package/dist/package.json +16 -15
  13. package/dist/pragma.conf.js +236 -34
  14. package/dist/pragma.conf.js.map +1 -1
  15. package/dist/src/bin.js +1 -1
  16. package/dist/src/bin.js.map +1 -1
  17. package/dist/src/capabilities/colophon/colophon.render.js +1 -1
  18. package/dist/src/capabilities/colophon/colophon.render.js.map +1 -1
  19. package/dist/src/capabilities/create/mount.js +4 -3
  20. package/dist/src/capabilities/create/mount.js.map +1 -1
  21. package/dist/src/capabilities/doctor/checks/checkPackageRefs.js +60 -4
  22. package/dist/src/capabilities/doctor/checks/checkPackageRefs.js.map +1 -1
  23. package/dist/src/capabilities/doctor/checks/checkShellCompletions.js +8 -8
  24. package/dist/src/capabilities/doctor/checks/checkShellCompletions.js.map +1 -1
  25. package/dist/src/capabilities/doctor/checks/harnessInventory.js +195 -0
  26. package/dist/src/capabilities/doctor/checks/harnessInventory.js.map +1 -0
  27. package/dist/src/capabilities/doctor/checks/index.js +6 -6
  28. package/dist/src/capabilities/doctor/checks/targetHealth.js +194 -50
  29. package/dist/src/capabilities/doctor/checks/targetHealth.js.map +1 -1
  30. package/dist/src/capabilities/doctor/doctor.render.js +43 -64
  31. package/dist/src/capabilities/doctor/doctor.render.js.map +1 -1
  32. package/dist/src/capabilities/doctor/doctor.verb.js +6 -2
  33. package/dist/src/capabilities/doctor/doctor.verb.js.map +1 -1
  34. package/dist/src/capabilities/doctor/runChecks.js +14 -11
  35. package/dist/src/capabilities/doctor/runChecks.js.map +1 -1
  36. package/dist/src/capabilities/graph/query.render.js +2 -2
  37. package/dist/src/capabilities/graph/query.render.js.map +1 -1
  38. package/dist/src/capabilities/info/collectInfo.js +8 -2
  39. package/dist/src/capabilities/info/collectInfo.js.map +1 -1
  40. package/dist/src/capabilities/info/info.render.js +6 -2
  41. package/dist/src/capabilities/info/info.render.js.map +1 -1
  42. package/dist/src/capabilities/prompt/prompt.render.js +2 -2
  43. package/dist/src/capabilities/prompt/prompt.render.js.map +1 -1
  44. package/dist/src/capabilities/setup/buildPlan.js +43 -39
  45. package/dist/src/capabilities/setup/buildPlan.js.map +1 -1
  46. package/dist/src/capabilities/setup/mode.js +2 -2
  47. package/dist/src/capabilities/setup/operations/index.js +4 -4
  48. package/dist/src/capabilities/setup/operations/index.js.map +1 -1
  49. package/dist/src/capabilities/setup/operations/setupGenerator.js +92 -45
  50. package/dist/src/capabilities/setup/operations/setupGenerator.js.map +1 -1
  51. package/dist/src/capabilities/setup/operations/setupLsp.js +88 -36
  52. package/dist/src/capabilities/setup/operations/setupLsp.js.map +1 -1
  53. package/dist/src/capabilities/setup/operations/setupMcp.js +97 -51
  54. package/dist/src/capabilities/setup/operations/setupMcp.js.map +1 -1
  55. package/dist/src/capabilities/setup/operations/setupSkills.js +325 -47
  56. package/dist/src/capabilities/setup/operations/setupSkills.js.map +1 -1
  57. package/dist/src/capabilities/setup/plan.js.map +1 -1
  58. package/dist/src/capabilities/setup/plan.render.js +144 -66
  59. package/dist/src/capabilities/setup/plan.render.js.map +1 -1
  60. package/dist/src/capabilities/setup/setup.render.js +1 -1
  61. package/dist/src/capabilities/setup/setup.verb.js +86 -33
  62. package/dist/src/capabilities/setup/setup.verb.js.map +1 -1
  63. package/dist/src/capabilities/setup/targets.js +110 -45
  64. package/dist/src/capabilities/setup/targets.js.map +1 -1
  65. package/dist/src/capabilities/shared/index.js +6 -5
  66. package/dist/src/capabilities/shared/index.js.map +1 -1
  67. package/dist/src/capabilities/shared/packageManager.js +300 -54
  68. package/dist/src/capabilities/shared/packageManager.js.map +1 -1
  69. package/dist/src/capabilities/skill/discover.js +97 -11
  70. package/dist/src/capabilities/skill/discover.js.map +1 -1
  71. package/dist/src/capabilities/skill/render.js +2 -2
  72. package/dist/src/capabilities/skill/render.js.map +1 -1
  73. package/dist/src/capabilities/sources/installSkills.js +145 -3
  74. package/dist/src/capabilities/sources/installSkills.js.map +1 -1
  75. package/dist/src/capabilities/sources/runUpdate.js +68 -2
  76. package/dist/src/capabilities/sources/runUpdate.js.map +1 -1
  77. package/dist/src/capabilities/sources/update.verb.js +3 -3
  78. package/dist/src/capabilities/sources/update.verb.js.map +1 -1
  79. package/dist/src/capabilities/upgrade/runUpgrade.js +43 -7
  80. package/dist/src/capabilities/upgrade/runUpgrade.js.map +1 -1
  81. package/dist/src/capabilities/upgrade/upgrade.render.js +10 -2
  82. package/dist/src/capabilities/upgrade/upgrade.render.js.map +1 -1
  83. package/dist/src/constants.js +6 -1
  84. package/dist/src/constants.js.map +1 -1
  85. package/dist/src/kernel/index.js +11 -2
  86. package/dist/src/kernel/index.js.map +1 -1
  87. package/dist/src/kernel/interactivity.js +68 -0
  88. package/dist/src/kernel/interactivity.js.map +1 -0
  89. package/dist/src/kernel/packs/renderPack.js +3 -3
  90. package/dist/src/kernel/packs/renderPack.js.map +1 -1
  91. package/dist/src/kernel/packs/resolveEntity.js +63 -12
  92. package/dist/src/kernel/packs/resolveEntity.js.map +1 -1
  93. package/dist/src/kernel/packs/runBodies.js +57 -4
  94. package/dist/src/kernel/packs/runBodies.js.map +1 -1
  95. package/dist/src/kernel/packs/schema.js +54 -2
  96. package/dist/src/kernel/packs/schema.js.map +1 -1
  97. package/dist/src/kernel/packs/sparql/applyFilters.js +104 -5
  98. package/dist/src/kernel/packs/sparql/applyFilters.js.map +1 -1
  99. package/dist/src/kernel/packs/sparql/buildLookupQuery.js +306 -43
  100. package/dist/src/kernel/packs/sparql/buildLookupQuery.js.map +1 -1
  101. package/dist/src/kernel/packs/types.js.map +1 -1
  102. package/dist/src/kernel/project/cli/buildProgram.js +1 -1
  103. package/dist/src/kernel/project/cli/buildProgram.js.map +1 -1
  104. package/dist/src/kernel/project/cli/dispatch.js +23 -23
  105. package/dist/src/kernel/project/cli/dispatch.js.map +1 -1
  106. package/dist/src/kernel/project/cli/globalFlags.js +4 -1
  107. package/dist/src/kernel/project/cli/globalFlags.js.map +1 -1
  108. package/dist/src/kernel/project/cli/helpFormat.js +1 -2
  109. package/dist/src/kernel/project/cli/helpFormat.js.map +1 -1
  110. package/dist/src/kernel/project/cli/rootHelp.js +34 -4
  111. package/dist/src/kernel/project/cli/rootHelp.js.map +1 -1
  112. package/dist/src/kernel/project/mcp/registerVerb.js +16 -1
  113. package/dist/src/kernel/project/mcp/registerVerb.js.map +1 -1
  114. package/dist/src/kernel/render/renderers.js +1 -1
  115. package/dist/src/kernel/render/style.js +29 -9
  116. package/dist/src/kernel/render/style.js.map +1 -1
  117. package/dist/src/kernel/render/vocabulary.js +174 -0
  118. package/dist/src/kernel/render/vocabulary.js.map +1 -0
  119. package/dist/src/kernel/spec/emitReference.js +1 -1
  120. package/dist/src/kernel/spec/emitReference.js.map +1 -1
  121. package/package.json +16 -15
  122. package/pragma.conf.ts +241 -34
  123. package/src/bin.ts +8 -1
  124. package/src/capabilities/block.parity.test.ts +25 -11
  125. package/src/capabilities/block.shipped.exec.test.ts +282 -0
  126. package/src/capabilities/block.tierRank.exec.test.ts +300 -0
  127. package/src/capabilities/colophon/colophon.render.ts +1 -2
  128. package/src/capabilities/colophon/colophon.test.ts +2 -2
  129. package/src/capabilities/create/createGrammar.test.ts +1 -1
  130. package/src/capabilities/create/mount.ts +3 -3
  131. package/src/capabilities/distribution.parity.test.ts +4 -0
  132. package/src/capabilities/doctor/checks/checkPackageRefs.ts +69 -4
  133. package/src/capabilities/doctor/checks/checkShellCompletions.test.ts +6 -4
  134. package/src/capabilities/doctor/checks/checkShellCompletions.ts +8 -8
  135. package/src/capabilities/doctor/checks/harnessInventory.test.ts +219 -0
  136. package/src/capabilities/doctor/checks/harnessInventory.ts +298 -0
  137. package/src/capabilities/doctor/checks/index.ts +6 -6
  138. package/src/capabilities/doctor/checks/targetHealth.ts +229 -59
  139. package/src/capabilities/doctor/doctor.render.test.ts +108 -32
  140. package/src/capabilities/doctor/doctor.render.ts +56 -80
  141. package/src/capabilities/doctor/doctor.test.ts +247 -35
  142. package/src/capabilities/doctor/doctor.verb.ts +7 -2
  143. package/src/capabilities/doctor/runChecks.ts +14 -11
  144. package/src/capabilities/doctor/types.ts +15 -24
  145. package/src/capabilities/emptyRecovery.test.ts +10 -2
  146. package/src/capabilities/graph/query.render.ts +2 -2
  147. package/src/capabilities/info/collectInfo.ts +8 -1
  148. package/src/capabilities/info/info.render.ts +6 -2
  149. package/src/capabilities/info/info.test.ts +37 -1
  150. package/src/capabilities/info/types.ts +10 -2
  151. package/src/capabilities/prompt/prompt.render.ts +2 -2
  152. package/src/capabilities/renderVocabularySync.test.ts +82 -0
  153. package/src/capabilities/scopeTypeSync.test.ts +29 -15
  154. package/src/capabilities/setup/buildPlan.ts +45 -41
  155. package/src/capabilities/setup/index.ts +1 -1
  156. package/src/capabilities/setup/mode.ts +2 -2
  157. package/src/capabilities/setup/operations/index.ts +6 -1
  158. package/src/capabilities/setup/operations/setupGenerator.ts +144 -70
  159. package/src/capabilities/setup/operations/setupLsp.ts +129 -37
  160. package/src/capabilities/setup/operations/setupMcp.ts +132 -61
  161. package/src/capabilities/setup/operations/setupSkills.ts +392 -58
  162. package/src/capabilities/setup/plan.render.ts +171 -76
  163. package/src/capabilities/setup/plan.ts +17 -12
  164. package/src/capabilities/setup/setup.mcp.correctness.test.ts +9 -9
  165. package/src/capabilities/setup/setup.render.test.ts +50 -36
  166. package/src/capabilities/setup/setup.render.ts +1 -1
  167. package/src/capabilities/setup/setup.test.ts +881 -50
  168. package/src/capabilities/setup/setup.verb.ts +91 -33
  169. package/src/capabilities/setup/targets.ts +120 -52
  170. package/src/capabilities/setup/types.ts +10 -18
  171. package/src/capabilities/shared/index.ts +17 -6
  172. package/src/capabilities/shared/packageManager.test.ts +421 -6
  173. package/src/capabilities/shared/packageManager.ts +394 -59
  174. package/src/capabilities/skill/bundledSkills.test.ts +347 -0
  175. package/src/capabilities/skill/discover.ts +100 -11
  176. package/src/capabilities/skill/render.ts +2 -2
  177. package/src/capabilities/skill/skill.test.ts +17 -4
  178. package/src/capabilities/sources/installSkills.ts +181 -3
  179. package/src/capabilities/sources/runUpdate.ts +78 -2
  180. package/src/capabilities/sources/sources.test.ts +228 -0
  181. package/src/capabilities/sources/update.verb.ts +3 -3
  182. package/src/capabilities/surface.test.ts +2 -2
  183. package/src/capabilities/upgrade/runUpgrade.ts +45 -6
  184. package/src/capabilities/upgrade/types.ts +10 -2
  185. package/src/capabilities/upgrade/upgrade.render.ts +9 -2
  186. package/src/capabilities/upgrade/upgrade.test.ts +72 -0
  187. package/src/constants.ts +6 -1
  188. package/src/identity.test.ts +18 -5
  189. package/src/kernel/completion/entitySource.test.ts +15 -2
  190. package/src/kernel/completion/safety.test.ts +16 -9
  191. package/src/kernel/config/defaults.test.ts +2 -1
  192. package/src/kernel/index.ts +11 -2
  193. package/src/kernel/interactivity.test.ts +76 -0
  194. package/src/kernel/interactivity.ts +69 -0
  195. package/src/kernel/packs/compile.test.ts +92 -0
  196. package/src/kernel/packs/renderPack.ts +3 -3
  197. package/src/kernel/packs/resolveEntity.test.ts +75 -14
  198. package/src/kernel/packs/resolveEntity.ts +88 -24
  199. package/src/kernel/packs/runBodies.ts +84 -19
  200. package/src/kernel/packs/schema.ts +60 -4
  201. package/src/kernel/packs/sparql/applyFilters.ts +125 -4
  202. package/src/kernel/packs/sparql/buildLookupQuery.test.ts +290 -0
  203. package/src/kernel/packs/sparql/buildLookupQuery.ts +323 -45
  204. package/src/kernel/packs/toolDescription.test.ts +35 -1
  205. package/src/kernel/packs/types.ts +125 -2
  206. package/src/kernel/project/cli/buildProgram.test.ts +73 -2
  207. package/src/kernel/project/cli/buildProgram.ts +8 -1
  208. package/src/kernel/project/cli/dispatch.test.ts +5 -4
  209. package/src/kernel/project/cli/dispatch.ts +25 -24
  210. package/src/kernel/project/cli/globalFlags.ts +4 -1
  211. package/src/kernel/project/cli/helpFormat.ts +1 -2
  212. package/src/kernel/project/cli/rootHelp.ts +36 -3
  213. package/src/kernel/project/mcp/registerVerb.ts +20 -1
  214. package/src/kernel/render/renderers.ts +1 -1
  215. package/src/kernel/render/style.ts +32 -9
  216. package/src/kernel/render/vocabulary.ts +276 -0
  217. package/src/kernel/spec/emitReference.ts +1 -1
  218. package/src/kernel/spec/types.ts +35 -6
  219. package/src/testing/PARITY_GAPS.ts +9 -3
  220. package/src/testing/behavioral/docExamples.test.ts +4 -2
  221. package/src/testing/behavioral/errorMatrix.mcp.test.ts +110 -7
  222. package/src/testing/behavioral/journeys.firstInstall.test.ts +7 -2
  223. package/src/testing/behavioral/journeys.packageStories.test.ts +6 -3
  224. package/src/testing/eval/__snapshots__/eval.test.ts.snap +26 -1
  225. package/src/testing/eval/cases/readNouns.ts +245 -9
  226. package/src/testing/fixtures/blockGraph.ts +28 -13
  227. package/src/testing/fixtures/graph/canonical.ts +95 -12
  228. package/dist/src/capabilities/shared/bands.js +0 -16
  229. package/dist/src/capabilities/shared/bands.js.map +0 -1
  230. package/src/capabilities/shared/bands.ts +0 -16
@@ -1,35 +1,64 @@
1
1
  /**
2
2
  * `setup skills` — symlink discovered skills into harness skill directories.
3
3
  *
4
- * BAND-MATCHED: the band picks the source root AND the link destination, and
4
+ * SCOPE-MATCHED: the scope picks the source root AND the link destination, and
5
5
  * the two always match.
6
6
  *
7
7
  * - global (the default): INSTALLED skills (`$XDG_DATA_HOME/<bin>/skills`, where
8
- * `sources update` puts package skills) link into user-level harness skill
9
- * directories — the cross-client `~/.agents/skills`, plus the user-level
8
+ * `sources update` puts package skills) AND the BUNDLED snapshot this package
9
+ * ships (`bundled-skills/`, last in precedence) link into user-level harness
10
+ * skill directories — the cross-client `~/.agents/skills`, plus the user-level
10
11
  * directory of each detected harness whose user-level location is verified.
12
+ * The global scope is therefore a root SET, and every rule below that used to
13
+ * read one `sourceRoot` ranges over it: what a skill resolves to (first-seen
14
+ * wins, so an installed skill beats the shipped copy), what this command
15
+ * OWNS, and what its stale sweep is entitled to touch.
11
16
  * - project (`--local`): PROJECT skills (`<cwd>/.<bin>/skills`) link into the
12
17
  * project's harness directories — the checked-in, team-shared arrangement.
13
18
  *
14
- * Cross-band linking is what this replaces: linking installed skills into a
19
+ * Cross-scope linking is what this replaces: linking installed skills into a
15
20
  * repository's directories leaks machine state into a checkout, and linking a
16
21
  * repository's skills into the home directory applies one project's skills
17
22
  * machine-wide. Neither is ever what the user asked for.
18
23
  *
24
+ * A BUNDLED SKILL IS LINKED, NOT COPIED, and that is a decision about who owns
25
+ * the target directory. Every other link this command writes points into a
26
+ * directory pragma controls (`$XDG_DATA_HOME/<bin>/skills`, or the user's own
27
+ * repository); a bundled one points into the package directory, which the
28
+ * PACKAGE MANAGER owns and may move or delete without telling us — a pnpm or
29
+ * npx layout puts the version in the path, so an upgrade leaves the link
30
+ * dangling. Copying would avoid that and cost more than it saves: `linkState`
31
+ * classifies a real directory as `other`, and this module treats `other` as
32
+ * hand-placed and never touches it. So a copied skill could never be updated,
33
+ * never be retired, and never be removed by `--undo` — pragma would be writing
34
+ * permanent, silently stale directories into `~/.claude/skills`.
35
+ *
36
+ * A dangling link, by contrast, the reconcile ALREADY repairs, and this was
37
+ * checked rather than assumed: `detectSkills` classifies a link that does not
38
+ * resolve to the current skill as `replaced` (delete + relink) whatever it
39
+ * points at, so the next `setup skills` — or the layer-2 pass `sources update`
40
+ * runs — moves it onto the new package directory. The one thing that had to
41
+ * change is ownership: `withinRoot` against the installed root alone read a
42
+ * bundled-pointing link as somebody else's and skipped it, so the sweep and the
43
+ * relink both range over the root SET now ({@link withinAnyRoot}). The residual
44
+ * window is between an upgrade and the next reconcile, which is the same window
45
+ * a `sources update` link into a cleared ref cache already has.
46
+ *
19
47
  * Split into `detectSkills` (discovery, harness detection, and the per-link
20
48
  * create/skip/replace DECISION, all against the real filesystem up front, so
21
49
  * the plan and the recap reflect true state) and pure compose bodies performing
22
50
  * only the symlink/delete effects the dry-run interpreter mocks.
23
51
  */
24
- import { lstatSync, readdirSync, readlinkSync } from "node:fs";
52
+ import { existsSync, lstatSync, readdirSync, readlinkSync, statSync, } from "node:fs";
25
53
  import { dirname, isAbsolute, relative, resolve, sep } from "node:path";
26
54
  import { deleteFile, mkdir, sequence_, symlink, } from "@canonical/task";
55
+ import { BIN_NAME } from "../../../constants.js";
27
56
  /** Cross-client skill directory, shared across all harnesses. */
28
57
  const CROSS_CLIENT_DIR = ".agents/skills";
29
58
  /**
30
59
  * The harnesses whose USER-LEVEL skills directory is verified against the
31
60
  * harness's own documentation, and therefore safe to link into on the global
32
- * band. A harness absent from this set simply contributes no global link
61
+ * scope. A harness absent from this set simply contributes no global link
33
62
  * directory: an invented `~/.<something>/skills` would be a directory nothing
34
63
  * reads, and creating it would be litter dressed up as configuration.
35
64
  *
@@ -41,7 +70,7 @@ const VERIFIED_GLOBAL_SKILL_HARNESSES = new Set([
41
70
  "claude-code",
42
71
  ]);
43
72
  /**
44
- * Whether a link's destination lives INSIDE the band's skill root — the
73
+ * Whether a link's destination lives INSIDE the scope's skill root — the
45
74
  * ownership test, and the one that decides what `--undo` deletes.
46
75
  *
47
76
  * A raw `readlink` target may be relative, so it is resolved against the link's
@@ -53,13 +82,13 @@ const VERIFIED_GLOBAL_SKILL_HARNESSES = new Set([
53
82
  * The root itself is not "inside" it: a link pointing AT the root is not one of
54
83
  * the per-skill links this command writes.
55
84
  *
56
- * @param root - The band's skill source root, absolute.
85
+ * @param root - The scope's skill source root, absolute.
57
86
  * @param linkPath - The absolute path of the link being classified.
58
87
  * @param rawTarget - The link's destination exactly as `readlink` reported it.
59
88
  * @returns Whether the destination is a path under the root.
60
89
  * @note Pure — it resolves and compares strings, and reads nothing.
61
90
  */
62
- function withinRoot(root, linkPath, rawTarget) {
91
+ export function withinRoot(root, linkPath, rawTarget) {
63
92
  const destination = resolve(dirname(linkPath), rawTarget);
64
93
  const rel = relative(root, destination);
65
94
  return (rel.length > 0 &&
@@ -67,6 +96,63 @@ function withinRoot(root, linkPath, rawTarget) {
67
96
  !rel.startsWith(`..${sep}`) &&
68
97
  !isAbsolute(rel));
69
98
  }
99
+ /**
100
+ * Whether a link's destination lives inside ANY of the scope's skill roots.
101
+ *
102
+ * The scope ownership test, once the global scope stopped being a single
103
+ * directory. Every caller that used to ask {@link withinRoot} about one path
104
+ * asks this about the set, so a link into the bundled snapshot is as much this
105
+ * command's to maintain as one into the installed root — and a link into
106
+ * neither is still nobody's business but the user's.
107
+ *
108
+ * @param roots - The scope's skill source roots, absolute.
109
+ * @param linkPath - The absolute path of the link being classified.
110
+ * @param rawTarget - The link's destination exactly as `readlink` reported it.
111
+ * @returns Whether the destination is a path under one of the roots.
112
+ * @note Pure — {@link withinRoot} reads nothing, and neither does this.
113
+ */
114
+ export function withinAnyRoot(roots, linkPath, rawTarget) {
115
+ return roots.some((root) => withinRoot(root, linkPath, rawTarget));
116
+ }
117
+ /**
118
+ * The directory a release's bundled skills live in, inside the package.
119
+ *
120
+ * Named here because it is the ONE shape that identifies a link as pragma's
121
+ * without asking where the package currently sits.
122
+ */
123
+ const BUNDLED_DIR_SEGMENT = "bundled-skills";
124
+ /**
125
+ * Whether this link is pragma's to rewrite or remove.
126
+ *
127
+ * Residence in a current root is not sufficient, in EITHER direction.
128
+ *
129
+ * Too narrow: after an upgrade under a version-stamped layout (pnpm, npx,
130
+ * volta) a link points into `…/pragma-cli@0.34.0/bundled-skills/<name>`, a
131
+ * directory that no longer exists and is inside no current root. Ownership by
132
+ * residence alone reads pragma's own link as somebody else's, so the sweep
133
+ * declines it and the per-skill pass cannot reach it once the skill is gone —
134
+ * the dangling link then survives every reconcile, invisible to setup and to
135
+ * doctor. The path SHAPE still says whose it is.
136
+ *
137
+ * Too wide: the bundled root is present on every install now, so a folder name
138
+ * that collides with a bundled skill is reachable with no user action at all.
139
+ * A user's own `~/.claude/skills/design-auditor -> ~/work/design-auditor`
140
+ * must not become this command's to delete just because a bundled skill shares
141
+ * its name. That is the same rule a hand-placed real directory already gets.
142
+ *
143
+ * @param roots - The scope's source roots.
144
+ * @param linkPath - The link's own path, absolute.
145
+ * @param rawTarget - Its unresolved `readlink` value.
146
+ * @returns Whether pragma created this link.
147
+ * @note Pure — resolves strings, reads nothing.
148
+ */
149
+ function ownsLink(roots, linkPath, rawTarget) {
150
+ if (withinAnyRoot(roots, linkPath, rawTarget))
151
+ return true;
152
+ return resolve(dirname(linkPath), rawTarget)
153
+ .split(sep)
154
+ .includes(BUNDLED_DIR_SEGMENT);
155
+ }
70
156
  /**
71
157
  * Classify a link path WITHOUT following it: absent, a symlink (with its raw
72
158
  * target, resolving or not), or a real (non-symlink) entry. `lstat`-based, the
@@ -94,22 +180,22 @@ function linkState(linkPath) {
94
180
  return { kind: "other" };
95
181
  }
96
182
  /**
97
- * The link directories for a band. Project: every detected harness's
183
+ * The link directories for a scope. Project: every detected harness's
98
184
  * project-rooted skills directory plus the cross-client one, exactly as
99
185
  * before. Global: the same construction rooted at the user's home directory,
100
186
  * but only for the harnesses in {@link VERIFIED_GLOBAL_SKILL_HARNESSES} —
101
187
  * plus the cross-client directory, which every client reads by convention.
102
188
  *
103
189
  * @param detected - The detected harnesses.
104
- * @param band - The band being set up.
105
- * @param root - The band's link root (`cwd` for project, home for global).
190
+ * @param scope - The scope being set up.
191
+ * @param root - The scope's link root (`cwd` for project, home for global).
106
192
  * @returns The deduplicated target directories, first-seen wins.
107
193
  */
108
- function linkTargets(detected, band, root) {
194
+ function linkTargets(detected, scope, root) {
109
195
  const seen = new Set();
110
196
  const targets = [];
111
197
  for (const d of detected) {
112
- if (band === "global" &&
198
+ if (scope === "global" &&
113
199
  !VERIFIED_GLOBAL_SKILL_HARNESSES.has(d.harness.id)) {
114
200
  continue;
115
201
  }
@@ -124,6 +210,55 @@ function linkTargets(detected, band, root) {
124
210
  targets.push({ dir: crossDir, name: CROSS_CLIENT_DIR });
125
211
  return targets;
126
212
  }
213
+ /**
214
+ * The GLOBAL scope's link directories that ALREADY EXIST — the converge-only set
215
+ * `sources update` is allowed to refresh.
216
+ *
217
+ * The filter is the whole policy, and it is why this is a separate export
218
+ * rather than `linkTargets` made public. `composeSkills` mkdirs its targets and
219
+ * `linkTargets` unconditionally appends `~/.agents/skills`, so an update that
220
+ * reused them would CREATE harness directories on a machine that never asked
221
+ * for skill linking — and `sources update` is `mcp: { expose: true }` with
222
+ * `mutates: true`, which would mean an agent, over MCP, after a network fetch,
223
+ * conjuring `~/.claude/skills` into existence. Refresh what is there; never
224
+ * bring a directory into being.
225
+ *
226
+ * The scope is not widened by this: `VERIFIED_GLOBAL_SKILL_HARNESSES` and the
227
+ * scope covenant are exactly the ones `setup skills --global` already honours,
228
+ * because this is the same `linkTargets` call it makes.
229
+ *
230
+ * @param cwd - The invocation's working directory (harness detection reads it).
231
+ * @returns The existing global link directories.
232
+ * @note Impure — detects harnesses and stats each candidate directory.
233
+ */
234
+ export async function existingGlobalSkillDirs(cwd) {
235
+ const [{ detectHarnesses, readPlatformEnv, userHome }, { runTask }] = await Promise.all([
236
+ import("@canonical/harnesses"),
237
+ import("@canonical/task/node"),
238
+ ]);
239
+ const detected = await runTask(detectHarnesses(cwd));
240
+ const home = userHome(readPlatformEnv());
241
+ return linkTargets(detected, "global", home).filter((t) => rootIsPresent(t.dir));
242
+ }
243
+ /**
244
+ * Whether the scope's source root exists as a directory.
245
+ *
246
+ * `stat`, not `lstat`: a root the user symlinked into place is still a root.
247
+ * Every failure — absent, unreadable, not a directory — answers false, which is
248
+ * the fail-closed direction: the sweep then declines to act at all.
249
+ *
250
+ * @param root - The scope's skill source root, absolute.
251
+ * @returns Whether it is a directory this run can have an opinion about.
252
+ * @note Impure — stats the real filesystem.
253
+ */
254
+ function rootIsPresent(root) {
255
+ try {
256
+ return statSync(root).isDirectory();
257
+ }
258
+ catch {
259
+ return false;
260
+ }
261
+ }
127
262
  /**
128
263
  * Every owned link sitting in the target directories that the per-skill pass
129
264
  * did not already visit.
@@ -135,13 +270,32 @@ function linkTargets(detected, band, root) {
135
270
  * containment test the forward pass applies, so a user's own link is no more
136
271
  * removable here than it is there.
137
272
  *
138
- * @param targets - The band's link directories.
139
- * @param sourceRoot - The band's skill source root.
273
+ * SAFETY GATE: nothing is orphaned when the source root does not EXIST. An
274
+ * absent root is "no opinion", never "everything here is stale" — see
275
+ * {@link SkillsDetection.rootExists}. The containment test below is a pure
276
+ * string test that reads nothing, so it still answers correctly once the link's
277
+ * target is gone; the root's own existence is the separate question of whether
278
+ * this command is entitled to answer at all.
279
+ *
280
+ * THE GATE IS PER ROOT, not per scope. A scope with two roots must not let one
281
+ * of them vouch for the other: if the installed root is deleted (or
282
+ * `XDG_DATA_HOME` points elsewhere for one invocation) while the bundled
283
+ * snapshot — which ships inside the package and so is essentially always there
284
+ * — still exists, a scope-wide "some root exists" gate would hand the sweep every
285
+ * link into the vanished root and call it stale. So `existingRoots` is passed
286
+ * already filtered, and a link is orphanable only when the root it points into
287
+ * is one of them.
288
+ *
289
+ * @param targets - The scope's link directories.
290
+ * @param existingRoots - The scope's source roots that EXIST (empty ⇒ no
291
+ * orphans at all).
140
292
  * @param covered - Link paths the per-skill pass already decided.
141
293
  * @returns The owned links no current skill accounts for.
142
294
  * @note Impure — reads each target directory and lstats its entries.
143
295
  */
144
- function orphanedLinks(targets, sourceRoot, covered) {
296
+ function orphanedLinks(targets, existingRoots, covered) {
297
+ if (existingRoots.length === 0)
298
+ return [];
145
299
  const orphans = [];
146
300
  for (const { dir, name } of targets) {
147
301
  let entries;
@@ -158,7 +312,11 @@ function orphanedLinks(targets, sourceRoot, covered) {
158
312
  const state = linkState(linkPath);
159
313
  if (state.kind !== "symlink")
160
314
  continue;
161
- if (!withinRoot(sourceRoot, linkPath, state.target))
315
+ // `ownsLink`, not `withinAnyRoot`: a link into a REMOVED version-stamped
316
+ // package directory is inside no current root, and once its skill is gone
317
+ // from the release no per-skill action covers the path either. Residence
318
+ // alone would leave it dangling forever.
319
+ if (!ownsLink(existingRoots, linkPath, state.target))
162
320
  continue;
163
321
  orphans.push({
164
322
  skillName: entry,
@@ -174,30 +332,38 @@ function orphanedLinks(targets, sourceRoot, covered) {
174
332
  return orphans;
175
333
  }
176
334
  /**
177
- * Discover the band's skills, detect harnesses, and decide each link action
335
+ * Discover the scope's skills, detect harnesses, and decide each link action
178
336
  * (real filesystem, up front).
179
337
  *
180
- * Target discovery runs even when the band holds NO skills: the directories are
338
+ * Target discovery runs even when the scope holds NO skills: the directories are
181
339
  * where this command's own links live, and a removal has to be able to find
182
340
  * them after the source root has been emptied.
183
341
  *
184
342
  * @param rt - The per-invocation runtime.
185
- * @param band - Which band to plan: global (installed skills) or project.
186
- * @returns The band's link plan.
343
+ * @param scope - Which scope to plan: global (installed skills) or project.
344
+ * @returns The scope's link plan.
187
345
  * @note Impure — reads the filesystem (skills + harnesses + existing links).
188
346
  */
189
- export async function detectSkills(rt, band) {
347
+ export async function detectSkills(rt, scope) {
190
348
  const cwd = rt.cwd;
191
- const [{ discoverSkillsFrom, installedSkillsDir, projectSkillsDir }, { detectHarnesses, readPlatformEnv, userHome }, { runTask },] = await Promise.all([
349
+ const [{ discoverSkillsFrom, globalSkillRoots, projectSkillsDir }, { detectHarnesses, readPlatformEnv, userHome }, { runTask },] = await Promise.all([
192
350
  import("../../skill/discover.js"),
193
351
  import("@canonical/harnesses"),
194
352
  import("@canonical/task/node"),
195
353
  ]);
196
- const sourceRoot = band === "project" ? projectSkillsDir(cwd) : installedSkillsDir();
197
- const linkRoot = band === "project" ? cwd : userHome(readPlatformEnv());
198
- const skills = discoverSkillsFrom([sourceRoot]);
354
+ // The scope picks the root SET; `globalSkillRoots` owns the global scope's
355
+ // order (installed, then bundled) so this module and `sources update` cannot
356
+ // drift on which directories the scope is.
357
+ const sourceRoots = scope === "project" ? [projectSkillsDir(cwd)] : globalSkillRoots();
358
+ const sourceRoot = sourceRoots[0];
359
+ const linkRoot = scope === "project" ? cwd : userHome(readPlatformEnv());
360
+ // First-seen wins, so an installed skill shadows the bundled copy of the same
361
+ // name: someone who ran `sources update` links the CURRENT skill.
362
+ const skills = discoverSkillsFrom(sourceRoots);
363
+ const existingRoots = sourceRoots.filter(rootIsPresent);
364
+ const rootExists = existingRoots.length > 0;
199
365
  const detected = await runTask(detectHarnesses(cwd));
200
- const targets = linkTargets(detected, band, linkRoot);
366
+ const targets = linkTargets(detected, scope, linkRoot);
201
367
  // Decide each action against REAL fs (so the preview is accurate). Dangling
202
368
  // or wrong-target symlinks are `replaced` (delete + relink); a real
203
369
  // (non-symlink) file or directory at the path is `skipped` — a hand-placed
@@ -207,11 +373,36 @@ export async function detectSkills(rt, band) {
207
373
  for (const skill of skills) {
208
374
  const linkPath = resolve(dir, skill.folderName);
209
375
  const state = linkState(linkPath);
376
+ // A link is already correct when it RESOLVES to the skill, not when its
377
+ // raw `readlink` string equals an absolute path. Comparing the raw target
378
+ // classified every RELATIVE link as `replaced`, so a functionally correct
379
+ // link was torn down and rebuilt on every run and doctor reported it as
380
+ // `N links point elsewhere`.
381
+ const resolvesToSkill = state.kind === "symlink" &&
382
+ resolve(dirname(linkPath), state.target) === skill.sourcePath;
383
+ const owned = state.kind === "symlink" &&
384
+ ownsLink(sourceRoots, linkPath, state.target);
385
+ // A link is FOREIGN when it resolves to something real that pragma does
386
+ // not own — a user's own `~/.claude/skills/design-auditor ->
387
+ // ~/work/design-auditor`. That is `skipped`, the same answer a
388
+ // hand-placed real directory gets: `composeSkills` composes every
389
+ // non-skipped row, so calling it `replaced` would delete the link. The
390
+ // bundled root is on every install now, so a name collision with a
391
+ // shipped skill is reachable with no user action at all.
392
+ //
393
+ // A DANGLING link is replaced regardless of where it pointed. Nothing
394
+ // depends on a broken link, so deleting it destroys nothing — while
395
+ // leaving it blocks the skill forever and, for pragma's own link into a
396
+ // cleared cache or a replaced package directory, is the repair. An
397
+ // unresolvable target cannot vouch for its owner either way.
398
+ const foreign = state.kind === "symlink" &&
399
+ !owned &&
400
+ existsSync(resolve(dirname(linkPath), state.target));
210
401
  const action = state.kind === "absent"
211
402
  ? "created"
212
- : state.kind === "symlink" && state.target === skill.sourcePath
403
+ : resolvesToSkill
213
404
  ? "skipped"
214
- : state.kind === "symlink"
405
+ : state.kind === "symlink" && !foreign
215
406
  ? "replaced"
216
407
  : "skipped";
217
408
  actions.push({
@@ -221,8 +412,7 @@ export async function detectSkills(rt, band) {
221
412
  action,
222
413
  harnessName: name,
223
414
  blocked: state.kind === "other",
224
- owned: state.kind === "symlink" &&
225
- withinRoot(sourceRoot, linkPath, state.target),
415
+ owned,
226
416
  });
227
417
  }
228
418
  }
@@ -230,17 +420,41 @@ export async function detectSkills(rt, band) {
230
420
  .filter((a) => a.action === "replaced")
231
421
  .map((a) => `Replaced a stale symlink for ${a.skillName} in ${a.harnessName}`);
232
422
  return {
233
- band,
423
+ scope,
424
+ sourceRoots,
234
425
  sourceRoot,
426
+ rootExists,
235
427
  available: skills.length > 0,
236
428
  targets,
237
429
  actions,
238
- orphans: orphanedLinks(targets, sourceRoot, new Set(actions.map((a) => a.linkPath))),
430
+ // Ownership above spans EVERY root (a pure string test that reads nothing,
431
+ // so it still answers after a target is gone); the sweep below spans only
432
+ // the roots that EXIST. Those are two different questions and the split is
433
+ // deliberate — see {@link orphanedLinks}.
434
+ orphans: orphanedLinks(targets, existingRoots, new Set(actions.map((a) => a.linkPath))),
239
435
  skillCount: skills.length,
240
- harnessCount: targets.length,
241
436
  warnings,
242
437
  };
243
438
  }
439
+ /**
440
+ * The links a FORWARD run must retire: the ones this scope owns that no current
441
+ * skill accounts for.
442
+ *
443
+ * The forward pass used to read `d.actions` alone, and `d.actions` enumerates
444
+ * CURRENT skills — so once a skill was dropped upstream, the link it left behind
445
+ * was invisible to it. `d.orphans` was computed and then read only by `--undo`,
446
+ * which removes EVERY owned link rather than just the stale ones, so there was
447
+ * no command that reconciled. Forward is where a reconcile belongs: the plan row
448
+ * says so, and re-running the installer is what a user does to converge.
449
+ *
450
+ * Gated on {@link SkillsDetection.rootExists}: the sweep declines entirely when
451
+ * the source root is absent. `d.orphans` is already empty in that case; the
452
+ * guard is restated here so the safety rule is visible at the site that deletes.
453
+ *
454
+ * @param d - The detection gathered up front.
455
+ * @returns The owned links no current skill accounts for.
456
+ */
457
+ export const staleSkillLinks = (d) => (d.rootExists ? d.orphans : []);
244
458
  /**
245
459
  * Compose the (re)link effects from a detection (builds ABSOLUTE link paths
246
460
  * itself).
@@ -248,15 +462,23 @@ export async function detectSkills(rt, band) {
248
462
  * Built from re-runnable combinators (NOT a single-use `gen`) because `execute`
249
463
  * interprets the task twice (preview + perform). `created` links carry an undo;
250
464
  * a `replaced` link is delete-then-relink (idempotent); `skipped` is a no-op —
251
- * and a detection where every action is `skipped` composes NOTHING, so a
252
- * converged re-run performs zero filesystem mutations.
465
+ * and a detection where every action is `skipped` and nothing is stale composes
466
+ * NOTHING, so a converged re-run performs zero filesystem mutations.
467
+ *
468
+ * A forward run is a RECONCILE, not an append: it also deletes the links this
469
+ * scope owns that no current skill accounts for (see {@link staleSkillLinks}), each
470
+ * carrying its own re-creation as `undo`.
253
471
  *
254
472
  * @param d - The detection gathered up front.
255
- * @returns A Task that mkdirs each needed target and creates/replaces links.
473
+ * @returns A Task that mkdirs each needed target, creates/replaces links, and
474
+ * removes the stale ones.
256
475
  */
257
476
  export function composeSkills(d) {
258
- const pending = d.actions.filter((a) => a.action !== "skipped");
259
- if (!d.available || pending.length === 0)
477
+ const pending = d.available
478
+ ? d.actions.filter((a) => a.action !== "skipped")
479
+ : [];
480
+ const stale = staleSkillLinks(d);
481
+ if (pending.length === 0 && stale.length === 0)
260
482
  return sequence_([]);
261
483
  const dirs = new Set(pending.map((a) => dirname(a.linkPath)));
262
484
  const tasks = [...dirs]
@@ -271,11 +493,23 @@ export function composeSkills(d) {
271
493
  tasks.push(symlink(a.target, a.linkPath, { undo: deleteFile(a.linkPath) }));
272
494
  }
273
495
  }
496
+ // The undo clears the path before re-linking: the undo interpreter MOCKS the
497
+ // forward effects when collecting, so the delete above may never have run and
498
+ // `fs.symlink` refuses an occupied path. Same shape `sources update`'s own
499
+ // prune undo uses, for the same reason.
500
+ for (const a of stale) {
501
+ tasks.push(deleteFile(a.linkPath, {
502
+ undo: sequence_([
503
+ deleteFile(a.linkPath),
504
+ symlink(a.target, a.linkPath),
505
+ ]),
506
+ }));
507
+ }
274
508
  return sequence_(tasks);
275
509
  }
276
510
  /**
277
- * The links this band OWNS right now — every existing symlink pointing into the
278
- * band's skill root, including dangling ones, ones already correct, and the
511
+ * The links this scope OWNS right now — every existing symlink pointing into the
512
+ * scope's skill root, including dangling ones, ones already correct, and the
279
513
  * ones no current skill accounts for. This is what removal acts on, and it is
280
514
  * deliberately NOT the forward plan: undoing a freshly composed forward plan on
281
515
  * an already-linked tree reversed the mkdirs and removed nothing, while
@@ -287,13 +521,57 @@ export function composeSkills(d) {
287
521
  * for one condition is how a user ends up unsure whether they are looking at one
288
522
  * problem or two.
289
523
  *
290
- * @param sourceRoot - The band's skill source root, already root-relative.
291
- * @param band - The band being reported.
524
+ * ABSENT AND EMPTY ARE NOT THE SAME SKIP. `available` is false for both — the
525
+ * root holds no skill either way — but the parenthetical names a filesystem
526
+ * fact, and telling a user their directory "is absent" while they are looking
527
+ * at it is a wrong diagnosis, not a terse one. {@link
528
+ * SkillsDetection.rootExists} is the flag that separates the two states
529
+ * everywhere else in this module, so it separates them here too, and both
530
+ * callers pass it rather than each re-deciding the wording.
531
+ *
532
+ * The GLOBAL sentence names where skills come from, because "no skills
533
+ * installed" on its own is a dead end: a reader has no way to know that skills
534
+ * arrive inside the configured packs rather than inside this CLI. The scope is
535
+ * named as `local project` — the phrase the `--local` flag that selects it
536
+ * points at — never by a type-layer word.
537
+ *
538
+ * @param sourceRoot - The scope's skill source root, already root-relative.
539
+ * @param scope - The scope being reported.
540
+ * @param rootExists - Whether that root exists ({@link
541
+ * SkillsDetection.rootExists}) — an existing root that holds no skill reports
542
+ * as empty, never as absent.
292
543
  * @returns The reason line.
293
544
  */
294
- export const skillsSkipReason = (sourceRoot, band) => band === "project"
295
- ? `no project skills (${sourceRoot} is absent)`
296
- : "no skills installed";
545
+ export const skillsSkipReason = (sourceRoot, scope, rootExists) => scope === "project"
546
+ ? rootExists
547
+ ? `nothing to link — this project holds no skills (${sourceRoot} is empty)`
548
+ : `nothing to link — this project holds no skills (${sourceRoot} does not exist)`
549
+ : `nothing to link — no skills installed yet; they arrive with the packs \`${BIN_NAME} sources update\` builds`;
550
+ /**
551
+ * The remedy beneath that skip — {@link skillsSkipReason}'s twin, and authored
552
+ * here for the same reason: the setup row and the doctor row must not word the
553
+ * same finding differently.
554
+ *
555
+ * A skip with no remedy is a dead end. `setup` printed "no skills installed",
556
+ * exited 0 claiming success, and gave the user no next step — while the
557
+ * completions and lsp skips beside it each named an action. The scope decides
558
+ * which action that is, because the scope decides where the skills come from:
559
+ * the global root is filled ONLY by `sources update` (skills ship in the
560
+ * configured packages, not in this CLI), and the local project's is a directory
561
+ * the user fills by hand.
562
+ *
563
+ * It is the IMPERATIVE half of the pair. {@link skillsSkipReason} states the
564
+ * finding and where skills come from; this line is the command to type, so a
565
+ * surface that renders both reads as a fact followed by a next step rather than
566
+ * as the same sentence twice.
567
+ *
568
+ * @param sourceRoot - The scope's skill source root, already root-relative.
569
+ * @param scope - The scope being reported.
570
+ * @returns The remedy line — an action that works on THIS machine now.
571
+ */
572
+ export const skillsSkipRemedy = (sourceRoot, scope) => scope === "project"
573
+ ? `add a skill at ${sourceRoot}/<name>/SKILL.md, then run this again`
574
+ : `run \`${BIN_NAME} sources update\`, then run this again`;
297
575
  export const ownedSkillLinks = (d) => [
298
576
  ...d.actions.filter((a) => a.owned),
299
577
  ...d.orphans,
@@ -1 +1 @@
1
- {"version":3,"file":"setupSkills.js","sourceRoot":"","sources":["../../../../../src/capabilities/setup/operations/setupSkills.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAC/D,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AACxE,OAAO,EACL,UAAU,EACV,KAAK,EACL,SAAS,EACT,OAAO,GAER,MAAM,iBAAiB,CAAC;AAIzB,iEAAiE;AACjE,MAAM,gBAAgB,GAAG,gBAAgB,CAAC;AAE1C;;;;;;;;;;GAUG;AACH,MAAM,+BAA+B,GAAwB,IAAI,GAAG,CAAC;IACnE,aAAa;CACd,CAAC,CAAC;AA0DH;;;;;;;;;;;;;;;;;;GAkBG;AACH,SAAS,UAAU,CACjB,IAAY,EACZ,QAAgB,EAChB,SAAiB;IAEjB,MAAM,WAAW,GAAG,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,SAAS,CAAC,CAAC;IAC1D,MAAM,GAAG,GAAG,QAAQ,CAAC,IAAI,EAAE,WAAW,CAAC,CAAC;IACxC,OAAO,CACL,GAAG,CAAC,MAAM,GAAG,CAAC;QACd,GAAG,KAAK,IAAI;QACZ,CAAC,GAAG,CAAC,UAAU,CAAC,KAAK,GAAG,EAAE,CAAC;QAC3B,CAAC,UAAU,CAAC,GAAG,CAAC,CACjB,CAAC;AACJ,CAAC;AAED;;;;;;;GAOG;AACH,SAAS,SAAS,CAAC,QAAgB;IACjC,IAAI,IAAkC,CAAC;IACvC,IAAI,CAAC;QACH,IAAI,GAAG,SAAS,CAAC,QAAQ,CAAC,CAAC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AC,CAAC;AAC1B,CAAC;AAED;;;;;;;GAOG;AACH;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAC9B,UAAkB,EAClB,IAAe,EACP,EAAE,CACV,IAAI,KAAK,SAAS;IAChB,CAAC,CAAC,sBAAsB,UAAU,aAAa;IAC/C,CAAC,CAAC,qBAAqB,CAAC;AAE5B,MAAM,CAAC,MAAM,eAAe,GAAG,CAC7B,CAAkB,EACQ,EAAE,CAAC;IAC7B,GAAG,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC;IACnC,GAAG,CAAC,CAAC,OAAO;CACb,CAAC;AAEF;;;;;;;;GAQG;AACH,MAAM,UAAU,oBAAoB,CAAC,CAAkB;IACrD,MAAM,KAAK,GAAG,eAAe,CAAC,CAAC,CAAC,CAAC;IACjC,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,SAAS,CAAC,EAAE,CAAC,CAAC;IAC7C,OAAO,SAAS,CACd,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CACd,OAAO,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE,EAAE,IAAI,EAAE,UAAU,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAChE,CACF,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"setupSkills.js","sourceRoot":"","sources":["../../../../../src/capabilities/setup/operations/setupSkills.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkDG;AAEH,OAAO,EACL,UAAU,EACV,SAAS,EACT,WAAW,EACX,YAAY,EACZ,QAAQ,GACT,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AACx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