@seanmars/tospec 0.19.0-beta.7 → 0.20.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 (429) hide show
  1. package/CHANGELOG.md +60 -231
  2. package/README.md +69 -82
  3. package/assets/dashboard/app.js +14 -3
  4. package/assets/dashboard/style.css +7 -0
  5. package/assets/rules/tospec/decision.md +3 -0
  6. package/dist/cli/index.d.ts.map +1 -1
  7. package/dist/cli/index.js +227 -86
  8. package/dist/cli/index.js.map +1 -1
  9. package/dist/commands/config.d.ts +9 -17
  10. package/dist/commands/config.d.ts.map +1 -1
  11. package/dist/commands/config.js +366 -107
  12. package/dist/commands/config.js.map +1 -1
  13. package/dist/commands/dashboard.d.ts +57 -99
  14. package/dist/commands/dashboard.d.ts.map +1 -1
  15. package/dist/commands/dashboard.js +224 -282
  16. package/dist/commands/dashboard.js.map +1 -1
  17. package/dist/commands/decision.d.ts +41 -19
  18. package/dist/commands/decision.d.ts.map +1 -1
  19. package/dist/commands/decision.js +385 -79
  20. package/dist/commands/decision.js.map +1 -1
  21. package/dist/commands/metrics.d.ts +28 -51
  22. package/dist/commands/metrics.d.ts.map +1 -1
  23. package/dist/commands/metrics.js +62 -93
  24. package/dist/commands/metrics.js.map +1 -1
  25. package/dist/commands/shared-output.d.ts +18 -21
  26. package/dist/commands/shared-output.d.ts.map +1 -1
  27. package/dist/commands/shared-output.js +49 -23
  28. package/dist/commands/shared-output.js.map +1 -1
  29. package/dist/commands/show.d.ts +7 -0
  30. package/dist/commands/show.d.ts.map +1 -1
  31. package/dist/commands/show.js +29 -7
  32. package/dist/commands/show.js.map +1 -1
  33. package/dist/commands/validate.d.ts +43 -45
  34. package/dist/commands/validate.d.ts.map +1 -1
  35. package/dist/commands/validate.js +262 -129
  36. package/dist/commands/validate.js.map +1 -1
  37. package/dist/commands/workflow/index.d.ts +6 -10
  38. package/dist/commands/workflow/index.d.ts.map +1 -1
  39. package/dist/commands/workflow/index.js +6 -10
  40. package/dist/commands/workflow/index.js.map +1 -1
  41. package/dist/commands/workflow/instructions.d.ts +21 -8
  42. package/dist/commands/workflow/instructions.d.ts.map +1 -1
  43. package/dist/commands/workflow/instructions.js +254 -95
  44. package/dist/commands/workflow/instructions.js.map +1 -1
  45. package/dist/commands/workflow/new-change.d.ts +4 -5
  46. package/dist/commands/workflow/new-change.d.ts.map +1 -1
  47. package/dist/commands/workflow/new-change.js +90 -25
  48. package/dist/commands/workflow/new-change.js.map +1 -1
  49. package/dist/commands/workflow/schemas.d.ts +3 -5
  50. package/dist/commands/workflow/schemas.d.ts.map +1 -1
  51. package/dist/commands/workflow/schemas.js +37 -11
  52. package/dist/commands/workflow/schemas.js.map +1 -1
  53. package/dist/commands/workflow/shared.d.ts +48 -21
  54. package/dist/commands/workflow/shared.d.ts.map +1 -1
  55. package/dist/commands/workflow/shared.js +36 -33
  56. package/dist/commands/workflow/shared.js.map +1 -1
  57. package/dist/commands/workflow/status.d.ts +10 -6
  58. package/dist/commands/workflow/status.d.ts.map +1 -1
  59. package/dist/commands/workflow/status.js +81 -42
  60. package/dist/commands/workflow/status.js.map +1 -1
  61. package/dist/commands/workflow/templates.d.ts +10 -3
  62. package/dist/commands/workflow/templates.d.ts.map +1 -1
  63. package/dist/commands/workflow/templates.js +39 -40
  64. package/dist/commands/workflow/templates.js.map +1 -1
  65. package/dist/core/archive.d.ts +26 -21
  66. package/dist/core/archive.d.ts.map +1 -1
  67. package/dist/core/archive.js +378 -235
  68. package/dist/core/archive.js.map +1 -1
  69. package/dist/core/artifact-graph/graph.d.ts +25 -42
  70. package/dist/core/artifact-graph/graph.d.ts.map +1 -1
  71. package/dist/core/artifact-graph/graph.js +45 -63
  72. package/dist/core/artifact-graph/graph.js.map +1 -1
  73. package/dist/core/artifact-graph/index.d.ts +1 -1
  74. package/dist/core/artifact-graph/index.d.ts.map +1 -1
  75. package/dist/core/artifact-graph/index.js +1 -1
  76. package/dist/core/artifact-graph/index.js.map +1 -1
  77. package/dist/core/artifact-graph/instruction-loader.d.ts +97 -103
  78. package/dist/core/artifact-graph/instruction-loader.d.ts.map +1 -1
  79. package/dist/core/artifact-graph/instruction-loader.js +146 -119
  80. package/dist/core/artifact-graph/instruction-loader.js.map +1 -1
  81. package/dist/core/artifact-graph/outputs.d.ts +9 -23
  82. package/dist/core/artifact-graph/outputs.d.ts.map +1 -1
  83. package/dist/core/artifact-graph/outputs.js +45 -38
  84. package/dist/core/artifact-graph/outputs.js.map +1 -1
  85. package/dist/core/artifact-graph/resolver.d.ts +44 -63
  86. package/dist/core/artifact-graph/resolver.d.ts.map +1 -1
  87. package/dist/core/artifact-graph/resolver.js +85 -86
  88. package/dist/core/artifact-graph/resolver.js.map +1 -1
  89. package/dist/core/artifact-graph/schema.d.ts +0 -6
  90. package/dist/core/artifact-graph/schema.d.ts.map +1 -1
  91. package/dist/core/artifact-graph/schema.js +7 -32
  92. package/dist/core/artifact-graph/schema.js.map +1 -1
  93. package/dist/core/artifact-graph/state.d.ts +1 -8
  94. package/dist/core/artifact-graph/state.d.ts.map +1 -1
  95. package/dist/core/artifact-graph/state.js +2 -17
  96. package/dist/core/artifact-graph/state.js.map +1 -1
  97. package/dist/core/artifact-graph/stub-detection.d.ts +12 -0
  98. package/dist/core/artifact-graph/stub-detection.d.ts.map +1 -0
  99. package/dist/core/artifact-graph/stub-detection.js +39 -0
  100. package/dist/core/artifact-graph/stub-detection.js.map +1 -0
  101. package/dist/core/artifact-graph/types.d.ts +4 -0
  102. package/dist/core/artifact-graph/types.d.ts.map +1 -1
  103. package/dist/core/artifact-graph/types.js +30 -10
  104. package/dist/core/artifact-graph/types.js.map +1 -1
  105. package/dist/core/available-tools.d.ts +3 -12
  106. package/dist/core/available-tools.d.ts.map +1 -1
  107. package/dist/core/available-tools.js +4 -13
  108. package/dist/core/available-tools.js.map +1 -1
  109. package/dist/core/change-metadata/schema.d.ts +1 -1
  110. package/dist/core/change-metadata/schema.d.ts.map +1 -1
  111. package/dist/core/change-metadata/schema.js +10 -7
  112. package/dist/core/change-metadata/schema.js.map +1 -1
  113. package/dist/core/change-presenter.d.ts +23 -18
  114. package/dist/core/change-presenter.d.ts.map +1 -1
  115. package/dist/core/change-presenter.js +102 -43
  116. package/dist/core/change-presenter.js.map +1 -1
  117. package/dist/core/change-status-policy.d.ts +8 -1
  118. package/dist/core/change-status-policy.d.ts.map +1 -1
  119. package/dist/core/change-status-policy.js +25 -1
  120. package/dist/core/change-status-policy.js.map +1 -1
  121. package/dist/core/codex-metrics.d.ts +25 -45
  122. package/dist/core/codex-metrics.d.ts.map +1 -1
  123. package/dist/core/codex-metrics.js +44 -88
  124. package/dist/core/codex-metrics.js.map +1 -1
  125. package/dist/core/codex-residue.d.ts +14 -15
  126. package/dist/core/codex-residue.d.ts.map +1 -1
  127. package/dist/core/codex-residue.js +18 -22
  128. package/dist/core/codex-residue.js.map +1 -1
  129. package/dist/core/command-generation/adapters/claude.d.ts +2 -9
  130. package/dist/core/command-generation/adapters/claude.d.ts.map +1 -1
  131. package/dist/core/command-generation/adapters/claude.js +2 -12
  132. package/dist/core/command-generation/adapters/claude.js.map +1 -1
  133. package/dist/core/command-generation/adapters/index.d.ts +1 -9
  134. package/dist/core/command-generation/adapters/index.d.ts.map +1 -1
  135. package/dist/core/command-generation/adapters/index.js +1 -9
  136. package/dist/core/command-generation/adapters/index.js.map +1 -1
  137. package/dist/core/command-generation/generator.d.ts +0 -17
  138. package/dist/core/command-generation/generator.d.ts.map +1 -1
  139. package/dist/core/command-generation/generator.js +0 -17
  140. package/dist/core/command-generation/generator.js.map +1 -1
  141. package/dist/core/command-generation/index.d.ts +2 -5
  142. package/dist/core/command-generation/index.d.ts.map +1 -1
  143. package/dist/core/command-generation/index.js +0 -9
  144. package/dist/core/command-generation/index.js.map +1 -1
  145. package/dist/core/command-generation/types.d.ts +10 -36
  146. package/dist/core/command-generation/types.d.ts.map +1 -1
  147. package/dist/core/command-generation/types.js +0 -6
  148. package/dist/core/command-generation/types.js.map +1 -1
  149. package/dist/core/command-generation/yaml.d.ts +3 -18
  150. package/dist/core/command-generation/yaml.d.ts.map +1 -1
  151. package/dist/core/command-generation/yaml.js +5 -23
  152. package/dist/core/command-generation/yaml.js.map +1 -1
  153. package/dist/core/config-prompts.d.ts +2 -4
  154. package/dist/core/config-prompts.d.ts.map +1 -1
  155. package/dist/core/config-prompts.js +2 -7
  156. package/dist/core/config-prompts.js.map +1 -1
  157. package/dist/core/config-schema.d.ts +8 -53
  158. package/dist/core/config-schema.d.ts.map +1 -1
  159. package/dist/core/config-schema.js +49 -62
  160. package/dist/core/config-schema.js.map +1 -1
  161. package/dist/core/config.d.ts +39 -26
  162. package/dist/core/config.d.ts.map +1 -1
  163. package/dist/core/config.js +36 -22
  164. package/dist/core/config.js.map +1 -1
  165. package/dist/core/dashboard-activity.d.ts +7 -9
  166. package/dist/core/dashboard-activity.d.ts.map +1 -1
  167. package/dist/core/dashboard-activity.js +26 -24
  168. package/dist/core/dashboard-activity.js.map +1 -1
  169. package/dist/core/dashboard-data.d.ts +40 -22
  170. package/dist/core/dashboard-data.d.ts.map +1 -1
  171. package/dist/core/dashboard-data.js +62 -70
  172. package/dist/core/dashboard-data.js.map +1 -1
  173. package/dist/core/global-config.d.ts +24 -53
  174. package/dist/core/global-config.d.ts.map +1 -1
  175. package/dist/core/global-config.js +38 -67
  176. package/dist/core/global-config.js.map +1 -1
  177. package/dist/core/init.d.ts +25 -19
  178. package/dist/core/init.d.ts.map +1 -1
  179. package/dist/core/init.js +168 -181
  180. package/dist/core/init.js.map +1 -1
  181. package/dist/core/list.d.ts +1 -1
  182. package/dist/core/list.d.ts.map +1 -1
  183. package/dist/core/list.js +121 -28
  184. package/dist/core/list.js.map +1 -1
  185. package/dist/core/local-server.d.ts +41 -83
  186. package/dist/core/local-server.d.ts.map +1 -1
  187. package/dist/core/local-server.js +53 -98
  188. package/dist/core/local-server.js.map +1 -1
  189. package/dist/core/markdown-render.d.ts +25 -0
  190. package/dist/core/markdown-render.d.ts.map +1 -0
  191. package/dist/core/markdown-render.js +94 -0
  192. package/dist/core/markdown-render.js.map +1 -0
  193. package/dist/core/migrate.d.ts +29 -14
  194. package/dist/core/migrate.d.ts.map +1 -1
  195. package/dist/core/migrate.js +184 -122
  196. package/dist/core/migrate.js.map +1 -1
  197. package/dist/core/parsers/change-parser.d.ts +7 -10
  198. package/dist/core/parsers/change-parser.d.ts.map +1 -1
  199. package/dist/core/parsers/change-parser.js +48 -56
  200. package/dist/core/parsers/change-parser.js.map +1 -1
  201. package/dist/core/parsers/markdown-parser.d.ts +8 -9
  202. package/dist/core/parsers/markdown-parser.d.ts.map +1 -1
  203. package/dist/core/parsers/markdown-parser.js +31 -22
  204. package/dist/core/parsers/markdown-parser.js.map +1 -1
  205. package/dist/core/parsers/requirement-blocks.d.ts +43 -15
  206. package/dist/core/parsers/requirement-blocks.d.ts.map +1 -1
  207. package/dist/core/parsers/requirement-blocks.js +142 -70
  208. package/dist/core/parsers/requirement-blocks.js.map +1 -1
  209. package/dist/core/parsers/requirement-text.d.ts +73 -79
  210. package/dist/core/parsers/requirement-text.d.ts.map +1 -1
  211. package/dist/core/parsers/requirement-text.js +137 -79
  212. package/dist/core/parsers/requirement-text.js.map +1 -1
  213. package/dist/core/parsers/spec-structure.d.ts.map +1 -1
  214. package/dist/core/parsers/spec-structure.js +10 -6
  215. package/dist/core/parsers/spec-structure.js.map +1 -1
  216. package/dist/core/profiles.d.ts +3 -10
  217. package/dist/core/profiles.d.ts.map +1 -1
  218. package/dist/core/profiles.js +5 -12
  219. package/dist/core/profiles.js.map +1 -1
  220. package/dist/core/project-config.d.ts +43 -44
  221. package/dist/core/project-config.d.ts.map +1 -1
  222. package/dist/core/project-config.js +107 -82
  223. package/dist/core/project-config.js.map +1 -1
  224. package/dist/core/project-layout.d.ts +9 -17
  225. package/dist/core/project-layout.d.ts.map +1 -1
  226. package/dist/core/project-layout.js +16 -26
  227. package/dist/core/project-layout.js.map +1 -1
  228. package/dist/core/root-selection.d.ts +11 -7
  229. package/dist/core/root-selection.d.ts.map +1 -1
  230. package/dist/core/root-selection.js +7 -8
  231. package/dist/core/root-selection.js.map +1 -1
  232. package/dist/core/rules.d.ts +6 -1
  233. package/dist/core/rules.d.ts.map +1 -1
  234. package/dist/core/rules.js +23 -2
  235. package/dist/core/rules.js.map +1 -1
  236. package/dist/core/schema-names.d.ts +16 -0
  237. package/dist/core/schema-names.d.ts.map +1 -0
  238. package/dist/core/schema-names.js +16 -0
  239. package/dist/core/schema-names.js.map +1 -0
  240. package/dist/core/schemas/base.schema.d.ts +3 -0
  241. package/dist/core/schemas/base.schema.d.ts.map +1 -1
  242. package/dist/core/schemas/base.schema.js +22 -6
  243. package/dist/core/schemas/base.schema.js.map +1 -1
  244. package/dist/core/schemas/change.schema.d.ts +16 -0
  245. package/dist/core/schemas/change.schema.d.ts.map +1 -1
  246. package/dist/core/schemas/change.schema.js +41 -10
  247. package/dist/core/schemas/change.schema.js.map +1 -1
  248. package/dist/core/schemas/spec.schema.d.ts +2 -0
  249. package/dist/core/schemas/spec.schema.d.ts.map +1 -1
  250. package/dist/core/shared/index.d.ts +3 -8
  251. package/dist/core/shared/index.d.ts.map +1 -1
  252. package/dist/core/shared/index.js +3 -8
  253. package/dist/core/shared/index.js.map +1 -1
  254. package/dist/core/shared/rules-generation.d.ts +19 -8
  255. package/dist/core/shared/rules-generation.d.ts.map +1 -1
  256. package/dist/core/shared/rules-generation.js +117 -50
  257. package/dist/core/shared/rules-generation.js.map +1 -1
  258. package/dist/core/shared/skill-generation.d.ts +28 -43
  259. package/dist/core/shared/skill-generation.d.ts.map +1 -1
  260. package/dist/core/shared/skill-generation.js +82 -51
  261. package/dist/core/shared/skill-generation.js.map +1 -1
  262. package/dist/core/shared/tool-detection.d.ts +39 -61
  263. package/dist/core/shared/tool-detection.d.ts.map +1 -1
  264. package/dist/core/shared/tool-detection.js +88 -80
  265. package/dist/core/shared/tool-detection.js.map +1 -1
  266. package/dist/core/skill-metrics.d.ts +36 -63
  267. package/dist/core/skill-metrics.d.ts.map +1 -1
  268. package/dist/core/skill-metrics.js +34 -73
  269. package/dist/core/skill-metrics.js.map +1 -1
  270. package/dist/core/spec-presenter.js +6 -6
  271. package/dist/core/spec-presenter.js.map +1 -1
  272. package/dist/core/specs-apply.d.ts +22 -23
  273. package/dist/core/specs-apply.d.ts.map +1 -1
  274. package/dist/core/specs-apply.js +166 -193
  275. package/dist/core/specs-apply.js.map +1 -1
  276. package/dist/core/templates/fragments/interview.d.ts +2 -6
  277. package/dist/core/templates/fragments/interview.d.ts.map +1 -1
  278. package/dist/core/templates/fragments/interview.js +2 -6
  279. package/dist/core/templates/fragments/interview.js.map +1 -1
  280. package/dist/core/templates/fragments/next-step.d.ts +4 -8
  281. package/dist/core/templates/fragments/next-step.d.ts.map +1 -1
  282. package/dist/core/templates/fragments/next-step.js +4 -8
  283. package/dist/core/templates/fragments/next-step.js.map +1 -1
  284. package/dist/core/templates/fragments/validate.d.ts +13 -0
  285. package/dist/core/templates/fragments/validate.d.ts.map +1 -0
  286. package/dist/core/templates/fragments/validate.js +13 -0
  287. package/dist/core/templates/fragments/validate.js.map +1 -0
  288. package/dist/core/templates/fragments/verify.d.ts +9 -12
  289. package/dist/core/templates/fragments/verify.d.ts.map +1 -1
  290. package/dist/core/templates/fragments/verify.js +9 -12
  291. package/dist/core/templates/fragments/verify.js.map +1 -1
  292. package/dist/core/templates/index.d.ts +0 -6
  293. package/dist/core/templates/index.d.ts.map +1 -1
  294. package/dist/core/templates/index.js +0 -7
  295. package/dist/core/templates/index.js.map +1 -1
  296. package/dist/core/templates/skill-templates.d.ts +1 -5
  297. package/dist/core/templates/skill-templates.d.ts.map +1 -1
  298. package/dist/core/templates/skill-templates.js +0 -5
  299. package/dist/core/templates/skill-templates.js.map +1 -1
  300. package/dist/core/templates/types.d.ts +3 -7
  301. package/dist/core/templates/types.d.ts.map +1 -1
  302. package/dist/core/templates/types.js +0 -3
  303. package/dist/core/templates/types.js.map +1 -1
  304. package/dist/core/templates/workflows/apply.d.ts +3 -9
  305. package/dist/core/templates/workflows/apply.d.ts.map +1 -1
  306. package/dist/core/templates/workflows/apply.js +11 -13
  307. package/dist/core/templates/workflows/apply.js.map +1 -1
  308. package/dist/core/templates/workflows/archive.d.ts +0 -6
  309. package/dist/core/templates/workflows/archive.d.ts.map +1 -1
  310. package/dist/core/templates/workflows/archive.js +19 -6
  311. package/dist/core/templates/workflows/archive.js.map +1 -1
  312. package/dist/core/templates/workflows/decision.js +4 -4
  313. package/dist/core/templates/workflows/decision.js.map +1 -1
  314. package/dist/core/templates/workflows/explore.js +1 -1
  315. package/dist/core/templates/workflows/grill.d.ts.map +1 -1
  316. package/dist/core/templates/workflows/grill.js +0 -2
  317. package/dist/core/templates/workflows/grill.js.map +1 -1
  318. package/dist/core/templates/workflows/issue.d.ts +0 -6
  319. package/dist/core/templates/workflows/issue.d.ts.map +1 -1
  320. package/dist/core/templates/workflows/issue.js +3 -2
  321. package/dist/core/templates/workflows/issue.js.map +1 -1
  322. package/dist/core/templates/workflows/propose.d.ts +0 -6
  323. package/dist/core/templates/workflows/propose.d.ts.map +1 -1
  324. package/dist/core/templates/workflows/propose.js +2 -2
  325. package/dist/core/templates/workflows/propose.js.map +1 -1
  326. package/dist/core/templates/workflows/sync.d.ts +2 -8
  327. package/dist/core/templates/workflows/sync.d.ts.map +1 -1
  328. package/dist/core/templates/workflows/sync.js +4 -3
  329. package/dist/core/templates/workflows/sync.js.map +1 -1
  330. package/dist/core/templates/workflows/update.d.ts +0 -6
  331. package/dist/core/templates/workflows/update.d.ts.map +1 -1
  332. package/dist/core/templates/workflows/update.js +9 -2
  333. package/dist/core/templates/workflows/update.js.map +1 -1
  334. package/dist/core/update.d.ts +23 -23
  335. package/dist/core/update.d.ts.map +1 -1
  336. package/dist/core/update.js +139 -118
  337. package/dist/core/update.js.map +1 -1
  338. package/dist/core/user-state-migration.d.ts +13 -15
  339. package/dist/core/user-state-migration.d.ts.map +1 -1
  340. package/dist/core/user-state-migration.js +16 -20
  341. package/dist/core/user-state-migration.js.map +1 -1
  342. package/dist/core/validation/constants.d.ts +4 -10
  343. package/dist/core/validation/constants.d.ts.map +1 -1
  344. package/dist/core/validation/constants.js +25 -20
  345. package/dist/core/validation/constants.js.map +1 -1
  346. package/dist/core/validation/prose-length.d.ts +15 -0
  347. package/dist/core/validation/prose-length.d.ts.map +1 -0
  348. package/dist/core/validation/prose-length.js +29 -0
  349. package/dist/core/validation/prose-length.js.map +1 -0
  350. package/dist/core/validation/purpose-placeholder.d.ts +9 -16
  351. package/dist/core/validation/purpose-placeholder.d.ts.map +1 -1
  352. package/dist/core/validation/purpose-placeholder.js +30 -44
  353. package/dist/core/validation/purpose-placeholder.js.map +1 -1
  354. package/dist/core/validation/section-validator.d.ts +4 -4
  355. package/dist/core/validation/section-validator.d.ts.map +1 -1
  356. package/dist/core/validation/section-validator.js +43 -7
  357. package/dist/core/validation/section-validator.js.map +1 -1
  358. package/dist/core/validation/task-numbering.d.ts +6 -3
  359. package/dist/core/validation/task-numbering.d.ts.map +1 -1
  360. package/dist/core/validation/task-numbering.js +23 -11
  361. package/dist/core/validation/task-numbering.js.map +1 -1
  362. package/dist/core/validation/types.d.ts +18 -0
  363. package/dist/core/validation/types.d.ts.map +1 -1
  364. package/dist/core/validation/types.js +12 -1
  365. package/dist/core/validation/types.js.map +1 -1
  366. package/dist/core/validation/validator.d.ts +43 -63
  367. package/dist/core/validation/validator.d.ts.map +1 -1
  368. package/dist/core/validation/validator.js +500 -267
  369. package/dist/core/validation/validator.js.map +1 -1
  370. package/dist/prompts/searchable-multi-select.d.ts +3 -8
  371. package/dist/prompts/searchable-multi-select.d.ts.map +1 -1
  372. package/dist/prompts/searchable-multi-select.js +16 -39
  373. package/dist/prompts/searchable-multi-select.js.map +1 -1
  374. package/dist/utils/change-metadata.d.ts +11 -50
  375. package/dist/utils/change-metadata.d.ts.map +1 -1
  376. package/dist/utils/change-metadata.js +48 -67
  377. package/dist/utils/change-metadata.js.map +1 -1
  378. package/dist/utils/change-utils.d.ts +30 -54
  379. package/dist/utils/change-utils.d.ts.map +1 -1
  380. package/dist/utils/change-utils.js +133 -91
  381. package/dist/utils/change-utils.js.map +1 -1
  382. package/dist/utils/file-lock.d.ts +39 -0
  383. package/dist/utils/file-lock.d.ts.map +1 -0
  384. package/dist/utils/file-lock.js +149 -0
  385. package/dist/utils/file-lock.js.map +1 -0
  386. package/dist/utils/file-system.d.ts +12 -32
  387. package/dist/utils/file-system.d.ts.map +1 -1
  388. package/dist/utils/file-system.js +16 -40
  389. package/dist/utils/file-system.js.map +1 -1
  390. package/dist/utils/frontmatter.d.ts +7 -11
  391. package/dist/utils/frontmatter.d.ts.map +1 -1
  392. package/dist/utils/frontmatter.js +11 -11
  393. package/dist/utils/frontmatter.js.map +1 -1
  394. package/dist/utils/interactive.d.ts +4 -9
  395. package/dist/utils/interactive.d.ts.map +1 -1
  396. package/dist/utils/interactive.js +2 -4
  397. package/dist/utils/interactive.js.map +1 -1
  398. package/dist/utils/item-discovery.d.ts +15 -10
  399. package/dist/utils/item-discovery.d.ts.map +1 -1
  400. package/dist/utils/item-discovery.js +42 -47
  401. package/dist/utils/item-discovery.js.map +1 -1
  402. package/dist/utils/link.d.ts +9 -18
  403. package/dist/utils/link.d.ts.map +1 -1
  404. package/dist/utils/link.js +9 -18
  405. package/dist/utils/link.js.map +1 -1
  406. package/dist/utils/requirement-diff.d.ts +13 -23
  407. package/dist/utils/requirement-diff.d.ts.map +1 -1
  408. package/dist/utils/requirement-diff.js +13 -23
  409. package/dist/utils/requirement-diff.js.map +1 -1
  410. package/dist/utils/spec-files.d.ts +7 -20
  411. package/dist/utils/spec-files.d.ts.map +1 -1
  412. package/dist/utils/spec-files.js +26 -51
  413. package/dist/utils/spec-files.js.map +1 -1
  414. package/dist/utils/task-progress.d.ts +11 -9
  415. package/dist/utils/task-progress.d.ts.map +1 -1
  416. package/dist/utils/task-progress.js +53 -32
  417. package/dist/utils/task-progress.js.map +1 -1
  418. package/dist/utils/timestamp.d.ts +5 -8
  419. package/dist/utils/timestamp.d.ts.map +1 -1
  420. package/dist/utils/timestamp.js +5 -8
  421. package/dist/utils/timestamp.js.map +1 -1
  422. package/package.json +2 -3
  423. package/schemas/decision/templates/decision.md +3 -1
  424. package/schemas/decision/templates/index.md +2 -2
  425. package/schemas/issue/schema.yaml +8 -1
  426. package/schemas/issue/templates/spec.md +27 -2
  427. package/schemas/sdd/schema.yaml +20 -1
  428. package/schemas/sdd/templates/spec.md +27 -2
  429. /package/assets/rules/tospec/{single-sourc-of-truth.md → single-source-of-truth.md} +0 -0
@@ -1,34 +1,56 @@
1
- /**
2
- * Update Command
3
- *
4
- * Refreshes Tospec skills for configured tools.
5
- */
1
+ /** Refreshes Tospec skills for configured tools. */
6
2
  import path from 'path';
7
3
  import * as fs from 'fs';
8
4
  import { createRequire } from 'module';
9
5
  import { FileSystemUtils } from '../utils/file-system.js';
10
6
  import { AI_TOOLS, TOSPEC_DIR_NAME, dependencyToolIds } from './config.js';
11
- import { getToolVersionStatus, getSkillTemplates, writeSkillDir, getConfiguredTools, removeLegacySkillDirs, removeLegacyToolSkillLayout, writeToolCommands, } from './shared/index.js';
7
+ import { getToolVersionStatus, getSkillTemplates, writeSkillDir, getConfiguredTools, removeLegacySkillDirs, removeUnselectedSkillDirs, removeLegacyToolSkillLayout, writeToolCommands, findWorkflowReferenceGaps, describeWorkflowReferenceGaps, } from './shared/index.js';
12
8
  import { getGlobalConfig } from './global-config.js';
13
9
  import { runLegacyUserStateMigration } from './user-state-migration.js';
14
10
  import { getProfileWorkflows, ALL_WORKFLOWS } from './profiles.js';
15
11
  import { getAvailableTools } from './available-tools.js';
16
12
  import { copyDir } from '../utils/link.js';
17
13
  import { planWorkflowRules, writeWorkflowRules } from './shared/rules-generation.js';
18
- import { hasResidualCodexOutput, RESIDUAL_CODEX_NOTICE } from './codex-residue.js';
14
+ import { hasResidualCodexOutput, RESIDUAL_CODEX_NOTICE, RESIDUAL_CODEX_FIX } from './codex-residue.js';
15
+ import { emitSuccess } from '../commands/shared-output.js';
19
16
  const require = createRequire(import.meta.url);
20
17
  const { version: TOSPEC_VERSION } = require('../../package.json');
21
18
  const OLD_CORE_WORKFLOWS = ['propose', 'explore', 'apply', 'archive'];
22
- const WORKFLOW_TO_SKILL_DIR = Object.fromEntries(getSkillTemplates().map(({ workflowId, dirName }) => [workflowId, dirName]));
19
+ /** The `--json` null-shape; mirrors the success payload with `update` nulled. */
20
+ export const UPDATE_FAILURE_PAYLOAD = { update: null, root: null };
23
21
  export class UpdateCommand {
24
22
  force;
23
+ json;
25
24
  constructor(options = {}) {
26
25
  this.force = options.force ?? false;
26
+ this.json = options.json ?? false;
27
27
  }
28
+ /**
29
+ * Progress prose, suppressed under `--json`: the envelope contract allows only
30
+ * one document on stdout.
31
+ */
32
+ say(...args) {
33
+ if (!this.json)
34
+ console.log(...args);
35
+ }
36
+ /**
37
+ * Unlike `say`, a warning has no other carrier — dropping it under `--json`
38
+ * would leave an agent caller less informed than a human. One helper records
39
+ * and prints, so no call site does half of it.
40
+ */
41
+ warn(code, message, fix) {
42
+ this.jsonWarnings.push({ severity: 'warning', code, message, ...(fix ? { fix } : {}) });
43
+ if (!this.json) {
44
+ console.log(`Warning: ${message}`);
45
+ if (fix)
46
+ console.log(fix);
47
+ }
48
+ }
49
+ /** Emitted alongside the success payload; empty means the key is omitted. */
50
+ jsonWarnings = [];
28
51
  async execute(projectPath) {
29
52
  const resolvedProjectPath = path.resolve(projectPath);
30
53
  const tospecPath = path.join(resolvedProjectPath, TOSPEC_DIR_NAME);
31
- // 1. Check tospec directory exists
32
54
  if (!await FileSystemUtils.directoryExists(tospecPath)) {
33
55
  throw new Error(`No Tospec directory found. Run 'tospec init' first.`);
34
56
  }
@@ -37,59 +59,88 @@ export class UpdateCommand {
37
59
  const rulePlan = await planWorkflowRules(resolvedProjectPath, configuredTools);
38
60
  // No migration or generated-file writes until every rule passed preflight.
39
61
  await runLegacyUserStateMigration();
40
- // 3. Read global config for profile
41
62
  const globalConfig = getGlobalConfig();
42
63
  const profile = globalConfig.profile ?? 'core';
43
64
  const profileWorkflows = getProfileWorkflows(profile, globalConfig.workflows);
44
65
  const desiredWorkflows = profileWorkflows.filter((workflow) => ALL_WORKFLOWS.includes(workflow));
66
+ // An empty selection is legitimate but more often a half-configured profile
67
+ // (`config profile custom` with nothing picked). Either way this run removes
68
+ // every skill dir, so name the setting and its reversal before the deletion.
69
+ if (desiredWorkflows.length === 0) {
70
+ this.warn('update_profile_selects_no_workflows', `Profile '${profile}' selects no workflows, so this update removes every tospec skill.`, 'Run "tospec config profile core" then "tospec update" to restore them.');
71
+ }
72
+ // A selection is a subset; the prose the templates carry is not. Each skill
73
+ // names its siblings unconditionally, so a partial install writes
74
+ // instructions pointing at a workflow that is not there. Reported, not
75
+ // patched: rewriting the generated text per profile would make the installed
76
+ // skills differ from the canonical templates.
77
+ const referenceGaps = findWorkflowReferenceGaps(desiredWorkflows);
78
+ if (referenceGaps.length > 0) {
79
+ const missing = [...new Set(referenceGaps.map((gap) => gap.missing))].sort();
80
+ this.warn('update_workflow_reference_missing', `Installed skills point at workflows this profile leaves out: ${describeWorkflowReferenceGaps(referenceGaps)}.`, `Add them with "tospec config set workflows" (missing: ${missing.join(', ')}), or expect agents to hit instructions they cannot follow.`);
81
+ }
82
+ if (profile !== 'custom' && globalConfig.workflows && globalConfig.workflows.length > 0) {
83
+ this.warn('update_workflows_ignored', `Profile '${profile}' installs every workflow, so the configured workflows list is not used.`, 'Run "tospec config profile custom" to apply it, or "tospec config unset workflows" to drop it.');
84
+ }
45
85
  if (configuredTools.length === 0) {
46
- console.log('No configured tools found.');
47
- console.log('Run "tospec init" to set up tools.');
48
- // A project whose only agent directory was `.codex` lands here, and it is
49
- // the exact case the notice exists for — so it must not be skipped.
86
+ this.say('No configured tools found.');
87
+ this.say('Run "tospec init" to set up tools.');
88
+ // A project whose only agent directory is `.codex` lands here, which is
89
+ // the case the notice exists for.
50
90
  this.reportResidualCodexOutput(resolvedProjectPath);
91
+ // Not an error, but the empty tool list has to reach a JSON caller, who
92
+ // would otherwise read a bare success as "the update ran".
93
+ if (this.json) {
94
+ emitSuccess({
95
+ update: {
96
+ version: TOSPEC_VERSION,
97
+ tools: [],
98
+ failed: [],
99
+ workflows: desiredWorkflows,
100
+ removedSkillDirs: 0,
101
+ rules: [],
102
+ message: 'No configured tools found.',
103
+ },
104
+ ...(this.jsonWarnings.length ? { status: this.jsonWarnings } : {}),
105
+ }, { path: resolvedProjectPath, source: 'explicit' });
106
+ }
51
107
  return;
52
108
  }
53
- // 6. Check version status for all configured tools
54
- const toolStatuses = configuredTools.map((toolId) => {
55
- const status = getToolVersionStatus(resolvedProjectPath, toolId, TOSPEC_VERSION);
56
- return status;
57
- });
109
+ const toolStatuses = configuredTools.map((toolId) => getToolVersionStatus(resolvedProjectPath, toolId, TOSPEC_VERSION));
58
110
  const statusByTool = new Map(toolStatuses.map((status) => [status.toolId, status]));
59
- // 7. Smart update detection
60
111
  const toolsNeedingVersionUpdate = toolStatuses
61
112
  .filter((s) => s.needsUpdate)
62
113
  .map((s) => s.toolId);
63
114
  const toolsToUpdateSet = new Set(toolsNeedingVersionUpdate);
64
115
  // Dependent targets are built from the canonical one, so a stale canonical
65
- // dir makes all of them stale too. Refreshing it alone would rewrite the
66
- // source and leave a copy-fallback dependent pinned at the old version.
116
+ // dir makes all of them stale. Refreshing it alone would leave a dependent
117
+ // pinned at the old version.
67
118
  if (dependencyToolIds().some((toolId) => toolsToUpdateSet.has(toolId))) {
68
119
  for (const toolId of configuredTools)
69
120
  toolsToUpdateSet.add(toolId);
70
121
  }
71
122
  const toolsUpToDate = toolStatuses.filter((s) => !toolsToUpdateSet.has(s.toolId));
72
- if (!this.force && toolsToUpdateSet.size === 0) {
73
- // The generated version is current, but update is also the repair path
74
- // for canonical .agents content and broken/stale links. Continue through
75
- // generation instead of returning early.
76
- console.log(`All ${configuredTools.length} configured tool(s) are version-current; refreshing generated skills.`);
123
+ // Nothing changed version, so the run below is a refresh: the same writes,
124
+ // named for what they are so "version-current" and "Updated" do not appear
125
+ // in the same transcript.
126
+ const refreshOnly = !this.force && toolsToUpdateSet.size === 0;
127
+ if (refreshOnly) {
128
+ // The generated version is current, but update is also the repair path for
129
+ // canonical .agents content and stale copies, so generation still runs.
130
+ this.say(`All ${configuredTools.length} configured tool(s) are version-current; refreshing generated skills.`);
77
131
  this.detectNewTools(resolvedProjectPath, configuredTools);
78
132
  this.displayOldCoreCustomProfileNote(profile, globalConfig.workflows);
79
133
  }
80
- // 8. Display update plan
81
134
  if (this.force) {
82
- console.log(`Force updating ${configuredTools.length} tool(s): ${configuredTools.join(', ')}`);
135
+ this.say(`Force updating ${configuredTools.length} tool(s): ${configuredTools.join(', ')}`);
83
136
  }
84
137
  else if (toolsToUpdateSet.size > 0) {
85
138
  this.displayUpdatePlan([...toolsToUpdateSet], statusByTool, toolsUpToDate);
86
139
  }
87
- console.log();
88
- // 9. Determine what to generate
140
+ this.say();
89
141
  const skillTemplates = getSkillTemplates(desiredWorkflows);
90
- // 9b. Refresh canonical .agents/ content — the single source of truth
91
- // every tool links into (or is regenerated from, for non-linkable
92
- // formats). Always rewritten on update, same as init.
142
+ // The canonical content every tool is copied from, always rewritten, as in
143
+ // init.
93
144
  const agentsSkillsDir = path.join(resolvedProjectPath, '.agents', 'skills');
94
145
  for (const { template, dirName } of skillTemplates) {
95
146
  await writeSkillDir(agentsSkillsDir, dirName, template, TOSPEC_VERSION);
@@ -97,24 +148,14 @@ export class UpdateCommand {
97
148
  await removeLegacySkillDirs(agentsSkillsDir);
98
149
  await fs.promises.rm(path.join(resolvedProjectPath, '.agents', 'commands'), { recursive: true, force: true });
99
150
  await fs.promises.rm(path.join(resolvedProjectPath, '.cursor', 'commands'), { recursive: true, force: true });
100
- // Drop the old `.claude/commands/tospec` namespace (replaced by tosx);
101
- // `.claude/commands/tosx` is refreshed per-tool by writeToolCommands below.
151
+ // Drops the old `.claude/commands/tospec` namespace; `tosx` is refreshed
152
+ // per-tool by writeToolCommands below.
102
153
  await fs.promises.rm(path.join(resolvedProjectPath, '.claude', 'commands', 'tospec'), { recursive: true, force: true });
103
- // Deselected workflows (custom profile) must be cleaned up canonically too —
104
- // per-tool cleanup below only removes that tool's link/file, which would
105
- // otherwise leave a stale, unlinked-from entry behind in .agents/ forever.
106
- {
107
- const desiredSet = new Set(desiredWorkflows);
108
- for (const workflow of ALL_WORKFLOWS) {
109
- if (desiredSet.has(workflow))
110
- continue;
111
- const dirName = WORKFLOW_TO_SKILL_DIR[workflow];
112
- if (dirName) {
113
- await fs.promises.rm(path.join(agentsSkillsDir, dirName), { recursive: true, force: true });
114
- }
115
- }
116
- }
117
- // 10. Update tools (all if force, otherwise only those needing update)
154
+ // Deselected workflows are swept canonically too: the per-tool cleanup below
155
+ // reaches only that tool's copy, leaving a stale entry in .agents/. The same
156
+ // helper init uses, so a dir generated under a name WORKFLOW_DEFS no longer
157
+ // has goes as well — an ALL_WORKFLOWS difference cannot name it.
158
+ await removeUnselectedSkillDirs(agentsSkillsDir, desiredWorkflows);
118
159
  const toolsToUpdate = (this.force || toolsToUpdateSet.size === 0)
119
160
  ? configuredTools
120
161
  : [...toolsToUpdateSet];
@@ -125,17 +166,15 @@ export class UpdateCommand {
125
166
  const tool = AI_TOOLS.find((t) => t.value === toolId);
126
167
  if (!tool?.skillsDir)
127
168
  continue;
128
- console.log(`Updating ${tool.name}...`);
169
+ this.say(`${refreshOnly ? 'Refreshing' : 'Updating'} ${tool.name}...`);
129
170
  try {
130
171
  const skillsDir = path.join(resolvedProjectPath, tool.skillsDir, 'skills');
131
172
  await removeLegacyToolSkillLayout(path.join(resolvedProjectPath, tool.skillsDir));
132
173
  await removeLegacySkillDirs(skillsDir);
133
- // Copy each skill dir out of .agents/skills/, flat and prefixed
134
- // (`<tool>/skills/tospec-<workflow>/`) since project-scope skills can't
135
- // be nested. This is also the repair path for a project still holding
136
- // links from an earlier version — copyDir clears its dest first, which
137
- // unlinks them. The canonical target *is* that directory, so pointing
138
- // this at itself would delete the source.
174
+ // Flat and prefixed (`<tool>/skills/tospec-<workflow>/`) since
175
+ // project-scope skills cannot be nested. copyDir clears its dest, which
176
+ // repairs a project still holding links from an earlier version — and
177
+ // is why copying .agents onto itself would delete the source.
139
178
  if (path.resolve(skillsDir) !== path.resolve(agentsSkillsDir)) {
140
179
  for (const { dirName } of skillTemplates) {
141
180
  const src = path.join(agentsSkillsDir, dirName);
@@ -143,74 +182,83 @@ export class UpdateCommand {
143
182
  await copyDir(src, dest);
144
183
  }
145
184
  }
146
- removedDeselectedSkillCount += await this.removeUnselectedSkillDirs(skillsDir, desiredWorkflows);
147
- // Refresh slash commands for tools with an adapter (Claude Code):
185
+ removedDeselectedSkillCount += await removeUnselectedSkillDirs(skillsDir, desiredWorkflows);
186
+ // Tools with an adapter (Claude Code) get
148
187
  // `.claude/commands/tosx/<id>.md`, invocable as `/tosx:<id>`.
149
188
  await writeToolCommands(resolvedProjectPath, tool.value, desiredWorkflows);
150
- console.log(`Updated ${tool.name}`);
189
+ this.say(`${refreshOnly ? 'Refreshed' : 'Updated'} ${tool.name}`);
151
190
  updatedTools.push(tool.name);
152
191
  }
153
192
  catch (error) {
154
- console.log(`Failed to update ${tool.name}`);
193
+ this.say(`Failed to update ${tool.name}`);
155
194
  failedTools.push({
156
195
  name: tool.name,
157
196
  error: error instanceof Error ? error.message : String(error)
158
197
  });
159
198
  }
160
199
  }
161
- await writeWorkflowRules(rulePlan);
162
- // 11. Summary
163
- console.log();
200
+ await writeWorkflowRules(rulePlan, { silent: this.json });
201
+ this.say();
164
202
  if (updatedTools.length > 0) {
165
- console.log(`Updated: ${updatedTools.join(', ')} (v${TOSPEC_VERSION})`);
203
+ this.say(`${refreshOnly ? 'Refreshed' : 'Updated'}: ${updatedTools.join(', ')} (v${TOSPEC_VERSION})`);
166
204
  }
167
205
  if (failedTools.length > 0) {
168
- console.log(`Failed: ${failedTools.map(f => `${f.name} (${f.error})`).join(', ')}`);
206
+ this.say(`Failed: ${failedTools.map(f => `${f.name} (${f.error})`).join(', ')}`);
169
207
  }
170
208
  if (removedDeselectedSkillCount > 0) {
171
- console.log(`Removed: ${removedDeselectedSkillCount} skill directories (deselected workflows)`);
209
+ this.say(`Removed: ${removedDeselectedSkillCount} skill directories (deselected workflows)`);
172
210
  }
173
- // 13. Detect new tool directories not currently configured
174
211
  this.detectNewTools(resolvedProjectPath, configuredTools);
175
- // 14. Display note about extra workflows not in profile
176
212
  this.displayOldCoreCustomProfileNote(profile, globalConfig.workflows);
177
- // 15. List affected tools
178
213
  if (updatedTools.length > 0) {
179
- const toolDisplayNames = updatedTools;
180
- console.log(`Tools: ${toolDisplayNames.join(', ')}`);
214
+ this.say(`Tools: ${updatedTools.join(', ')}`);
181
215
  }
182
- console.log();
183
- console.log('Restart your agent for skills to take effect.');
216
+ this.say();
217
+ this.say('Restart your agent for skills to take effect.');
184
218
  this.reportResidualCodexOutput(resolvedProjectPath);
219
+ if (this.json) {
220
+ emitSuccess({
221
+ update: {
222
+ version: TOSPEC_VERSION,
223
+ tools: updatedTools,
224
+ failed: failedTools,
225
+ workflows: desiredWorkflows,
226
+ removedSkillDirs: removedDeselectedSkillCount,
227
+ rules: rulePlan.map((entry) => ({
228
+ tool: entry.toolId,
229
+ rule: entry.rule,
230
+ path: entry.destination,
231
+ action: entry.action,
232
+ ...(entry.retire ? { retiredPath: entry.retire } : {}),
233
+ })),
234
+ },
235
+ ...(this.jsonWarnings.length ? { status: this.jsonWarnings } : {}),
236
+ }, { path: resolvedProjectPath, source: 'explicit' });
237
+ }
185
238
  }
186
239
  /**
187
240
  * Read-only, and called only once a run has otherwise finished: a run that
188
241
  * dies in rule preflight must not leave advice about a state it never reached.
242
+ * Routed through `warn` so the notice reaches `status[]` under `--json`.
189
243
  */
190
244
  reportResidualCodexOutput(projectPath) {
191
245
  if (hasResidualCodexOutput(projectPath)) {
192
- console.log(RESIDUAL_CODEX_NOTICE);
246
+ this.warn('codex_residue', RESIDUAL_CODEX_NOTICE, RESIDUAL_CODEX_FIX);
193
247
  }
194
248
  }
195
- /**
196
- * Display the update plan showing which tools need updating.
197
- */
198
249
  displayUpdatePlan(toolsToUpdate, statusByTool, upToDate) {
199
250
  // Every id in toolsToUpdate came from a status with needsUpdate === true,
200
- // so there is no non-version reason to be in this list.
251
+ // so there is no non-version reason to be here.
201
252
  const updates = toolsToUpdate.map((toolId) => {
202
253
  const fromVersion = statusByTool.get(toolId)?.generatedByVersion ?? 'unknown';
203
254
  return `${toolId} (${fromVersion} → ${TOSPEC_VERSION})`;
204
255
  });
205
- console.log(`Updating ${toolsToUpdate.length} tool(s): ${updates.join(', ')}`);
256
+ this.say(`Updating ${toolsToUpdate.length} tool(s): ${updates.join(', ')}`);
206
257
  if (upToDate.length > 0) {
207
258
  const upToDateNames = upToDate.map((s) => s.toolId);
208
- console.log(`Already up to date: ${upToDateNames.join(', ')}`);
259
+ this.say(`Already up to date: ${upToDateNames.join(', ')}`);
209
260
  }
210
261
  }
211
- /**
212
- * Detects new tool directories that aren't currently configured and displays a hint.
213
- */
214
262
  detectNewTools(projectPath, configuredTools) {
215
263
  const availableTools = getAvailableTools(projectPath);
216
264
  const configuredSet = new Set(configuredTools);
@@ -220,13 +268,13 @@ export class UpdateCommand {
220
268
  const isSingleTool = newToolNames.length === 1;
221
269
  const toolNoun = isSingleTool ? 'tool' : 'tools';
222
270
  const pronoun = isSingleTool ? 'it' : 'them';
223
- console.log();
224
- console.log(`Detected new ${toolNoun}: ${newToolNames.join(', ')}. Run 'tospec init' to add ${pronoun}.`);
271
+ this.say();
272
+ this.say(`Detected new ${toolNoun}: ${newToolNames.join(', ')}. Run 'tospec init' to add ${pronoun}.`);
225
273
  }
226
274
  }
227
275
  /**
228
- * Suggest opting back into core when a custom profile still matches the old
229
- * four-workflow core set. Keep custom profiles user-owned; do not mutate them.
276
+ * Suggests opting back into core when a custom profile still matches the old
277
+ * four-workflow core set. Custom profiles stay user-owned, never mutated.
230
278
  */
231
279
  displayOldCoreCustomProfileNote(profile, workflows) {
232
280
  if (profile !== 'custom' || !workflows) {
@@ -238,35 +286,8 @@ export class UpdateCommand {
238
286
  if (!matchesOldCore) {
239
287
  return;
240
288
  }
241
- console.log('Note: The core profile now includes issue and update. Your custom profile is preserving the old core workflow set.');
242
- console.log('Run `tospec config profile core` and then `tospec update` to add them.');
243
- }
244
- /**
245
- * Removes skill directories for workflows that are no longer selected in the
246
- * active profile, from a tool's `skills/` dir (dirs named `tospec-<workflow>`).
247
- * Returns the number of directories removed.
248
- */
249
- async removeUnselectedSkillDirs(skillsDir, desiredWorkflows) {
250
- const desiredSet = new Set(desiredWorkflows);
251
- let removed = 0;
252
- for (const workflow of ALL_WORKFLOWS) {
253
- if (desiredSet.has(workflow))
254
- continue;
255
- const dirName = WORKFLOW_TO_SKILL_DIR[workflow];
256
- if (!dirName)
257
- continue;
258
- const skillDir = path.join(skillsDir, dirName);
259
- try {
260
- if (fs.existsSync(skillDir)) {
261
- await fs.promises.rm(skillDir, { recursive: true, force: true });
262
- removed++;
263
- }
264
- }
265
- catch {
266
- // Ignore errors
267
- }
268
- }
269
- return removed;
289
+ this.say('Note: The core profile now includes issue and update. Your custom profile is preserving the old core workflow set.');
290
+ this.say('Run `tospec config profile core` and then `tospec update` to add them.');
270
291
  }
271
292
  }
272
293
  //# sourceMappingURL=update.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"update.js","sourceRoot":"","sources":["../../src/core/update.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AACvC,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,QAAQ,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAC3E,OAAO,EACL,oBAAoB,EACpB,iBAAiB,EACjB,aAAa,EACb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AkB,CAAC,KAAK,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,WAAW,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC;QAEpE,IAAI,CAAC,cAAc,EAAE,CAAC;YACpB,OAAO;QACT,CAAC;QAED,IAAI,CAAC,GAAG,CAAC,oHAAoH,CAAC,CAAC;QAC/H,IAAI,CAAC,GAAG,CAAC,wEAAwE,CAAC,CAAC;IACrF,CAAC;CAEF"}
@@ -1,12 +1,12 @@
1
1
  /**
2
- * Every path the migration acts on, resolved by the caller. Taking them rather
3
- * than reading the environment is what keeps this testable without a platform
4
- * whose legacy paths differ from its current ones — and it keeps the one policy
5
- * decision (does XDG_DATA_HOME name the live schema directory?) in one place.
2
+ * Every path the migration acts on, resolved by the caller rather than read from
3
+ * the environment: that keeps this testable on any platform and keeps the one
4
+ * policy decision (does XDG_DATA_HOME name the live schema directory?) in one
5
+ * place.
6
6
  *
7
7
  * `schemasDir: null` means "do not migrate schemas at all": XDG_DATA_HOME names
8
- * a directory the user chose and that is still honoured, so the platform-default
9
- * legacy directory it superseded is left where it is.
8
+ * a directory the user chose and that is still honoured, so the legacy default
9
+ * it superseded is left where it is.
10
10
  */
11
11
  export interface MigrationPaths {
12
12
  configDir: string;
@@ -16,8 +16,7 @@ export interface MigrationPaths {
16
16
  /**
17
17
  * How to move things. Swapped out in tests only: the copy fallback's
18
18
  * mid-flight failure — the one that can leave a half-written destination —
19
- * cannot be provoked portably through the filesystem, and it is the failure
20
- * whose handling matters most.
19
+ * cannot be provoked portably through the filesystem.
21
20
  */
22
21
  move?: MoveOperations;
23
22
  }
@@ -40,19 +39,18 @@ export interface MigrationResult {
40
39
  * Moves user-level state from its pre-`~/.config/tospec` locations exactly once.
41
40
  *
42
41
  * Config file and schema directory are judged independently, so an install that
43
- * already migrated one still migrates the other. Nothing is ever overwritten or
44
- * deleted: a destination that already exists means the legacy copy is left on
45
- * disk and reported, for the user to delete when they are ready.
42
+ * already migrated one still migrates the other. Nothing is overwritten or
43
+ * deleted: an occupied destination leaves the legacy copy on disk, reported for
44
+ * the user to delete.
46
45
  */
47
46
  export declare function migrateLegacyUserState(paths: MigrationPaths): Promise<MigrationResult>;
48
47
  /**
49
48
  * The migration as `init` and `update` call it: resolve today's and yesterday's
50
- * locations from the environment, run it, and report in one line per outcome.
51
- * Failures are warnings — a migration that cannot happen must never stop the
49
+ * locations from the environment, run it, and report one line per outcome.
50
+ * Failures are warnings — a migration that cannot happen must not stop the
52
51
  * command that triggered it.
53
52
  *
54
- * Needs no once-per-process guard: a second run finds the sources gone and does
55
- * nothing, which is also exactly what makes it safe to call from two commands.
53
+ * Needs no once-per-process guard: a second run finds the sources gone.
56
54
  */
57
55
  export declare function runLegacyUserStateMigration(): Promise<void>;
58
56
  //# sourceMappingURL=user-state-migration.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"user-state-migration.d.ts","sourceRoot":"","sources":["../../src/core/user-state-migration.ts"],"names":[],"mappings":"AAUA;;;;;;;;;GASG;AACH,MAAM,WAAW,cAAc;IAC7B,SAAS,EAAE,MAAM,CAAC;IAClB,eAAe,EAAE,MAAM,CAAC;IACxB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,gBAAgB,EAAE,MAAM,CAAC;IACzB;;;;;OAKG;IACH,IAAI,CAAC,EAAE,cAAc,CAAC;CACvB;AAED,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACnD,SAAS,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CACzD;AAID,MAAM,WAAW,eAAe;IAC9B,mEAAmE;IACnE,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,sEAAsE;IACtE,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,6EAA6E;IAC7E,MAAM,EAAE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2B,IAAI,OAAO,CAAC,IAAI,CAAC,CAsBjE"}
@@ -7,9 +7,9 @@ const REAL_MOVES = { file: moveFile, directory: moveDirectory };
7
7
  * Moves user-level state from its pre-`~/.config/tospec` locations exactly once.
8
8
  *
9
9
  * Config file and schema directory are judged independently, so an install that
10
- * already migrated one still migrates the other. Nothing is ever overwritten or
11
- * deleted: a destination that already exists means the legacy copy is left on
12
- * disk and reported, for the user to delete when they are ready.
10
+ * already migrated one still migrates the other. Nothing is overwritten or
11
+ * deleted: an occupied destination leaves the legacy copy on disk, reported for
12
+ * the user to delete.
13
13
  */
14
14
  export async function migrateLegacyUserState(paths) {
15
15
  const result = { moved: [], leftBehind: [], failed: [] };
@@ -21,14 +21,13 @@ export async function migrateLegacyUserState(paths) {
21
21
  return result;
22
22
  }
23
23
  async function migrateItem(result, source, destination, move) {
24
- // A missing source is the common case (nothing to migrate) and is also how a
25
- // concurrent run looks to whichever process loses the race — both mean
26
- // "already migrated", and neither is worth a word to the user.
24
+ // A missing source is the common case, and also how a concurrent run looks to
25
+ // whichever process loses the race. Both mean "already migrated".
27
26
  if (!(await exists(source)))
28
27
  return;
29
28
  // The same directory reached by two names: identical paths on macOS/Linux,
30
- // where config never moved, and the junction someone may have created by hand
31
- // as a workaround. Moving either into itself would destroy the data.
29
+ // where config never moved, or a junction someone created by hand. Moving
30
+ // either into itself would destroy the data.
32
31
  if (await sameRealPath(source, destination))
33
32
  return;
34
33
  if (await exists(destination)) {
@@ -36,10 +35,9 @@ async function migrateItem(result, source, destination, move) {
36
35
  return;
37
36
  }
38
37
  try {
39
- // Inside the try: creating the destination's parent is as capable of
40
- // failing as the move itself (a file sitting where the directory belongs,
41
- // a read-only tree), and a migration that cannot happen must never take
42
- // down the command that triggered it.
38
+ // Inside the try: creating the destination's parent can fail just as the
39
+ // move can, and a migration that cannot happen must not take down the
40
+ // command that triggered it.
43
41
  await fs.mkdir(path.dirname(destination), { recursive: true });
44
42
  await move(source, destination);
45
43
  result.moved.push(destination);
@@ -47,8 +45,7 @@ async function migrateItem(result, source, destination, move) {
47
45
  catch (error) {
48
46
  // The move helpers fall back to copy-then-remove, which is not atomic: a
49
47
  // copy that dies partway leaves a destination that later reads as "already
50
- // migrated" and would silently truncate the user's state. Remove it so the
51
- // only two outcomes stay "migrated" and "not migrated".
48
+ // migrated". Remove it so the only outcomes are "migrated" and "not".
52
49
  await fs.rm(destination, { recursive: true, force: true }).catch(() => { });
53
50
  result.failed.push({
54
51
  source,
@@ -76,17 +73,16 @@ async function sameRealPath(source, destination) {
76
73
  }
77
74
  /**
78
75
  * The migration as `init` and `update` call it: resolve today's and yesterday's
79
- * locations from the environment, run it, and report in one line per outcome.
80
- * Failures are warnings — a migration that cannot happen must never stop the
76
+ * locations from the environment, run it, and report one line per outcome.
77
+ * Failures are warnings — a migration that cannot happen must not stop the
81
78
  * command that triggered it.
82
79
  *
83
- * Needs no once-per-process guard: a second run finds the sources gone and does
84
- * nothing, which is also exactly what makes it safe to call from two commands.
80
+ * Needs no once-per-process guard: a second run finds the sources gone.
85
81
  */
86
82
  export async function runLegacyUserStateMigration() {
87
83
  const configDir = getGlobalConfigDir();
88
- // XDG_DATA_HOME still names a live schema override, so when it is set there is
89
- // no legacy schema directory to reclaim.
84
+ // XDG_DATA_HOME still names a live schema override, so when set there is no
85
+ // legacy schema directory to reclaim.
90
86
  const schemasDir = process.env.XDG_DATA_HOME ? null : path.join(configDir, 'schemas');
91
87
  const result = await migrateLegacyUserState({
92
88
  configDir,
@@ -1 +1 @@
1
- {"version":3,"file":"user-state-migration.js","sourceRoot":"","sources":["../../src/core/user-state-migration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,IAAI,EAAE,EAAE,MAAM,SAAS,CAAC;AACzC,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACvD,OAAO,EACL,uBAAuB,EACvB,kBAAkB,EAClB,kBAAkB,E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