@seanmars/tospec 0.19.0-beta.0 → 0.19.0-beta.13

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 (431) hide show
  1. package/CHANGELOG.md +578 -0
  2. package/README.md +71 -77
  3. package/assets/dashboard/app.js +14 -3
  4. package/assets/dashboard/style.css +7 -0
  5. package/assets/metrics/app.js +22 -0
  6. package/assets/metrics/style.css +8 -0
  7. package/assets/rules/tospec/decision.md +3 -0
  8. package/assets/rules/tospec/single-source-of-truth.md +19 -0
  9. package/dist/cli/index.d.ts.map +1 -1
  10. package/dist/cli/index.js +266 -82
  11. package/dist/cli/index.js.map +1 -1
  12. package/dist/commands/config.d.ts +9 -17
  13. package/dist/commands/config.d.ts.map +1 -1
  14. package/dist/commands/config.js +374 -95
  15. package/dist/commands/config.js.map +1 -1
  16. package/dist/commands/dashboard.d.ts +64 -81
  17. package/dist/commands/dashboard.d.ts.map +1 -1
  18. package/dist/commands/dashboard.js +350 -218
  19. package/dist/commands/dashboard.js.map +1 -1
  20. package/dist/commands/decision.d.ts +41 -19
  21. package/dist/commands/decision.d.ts.map +1 -1
  22. package/dist/commands/decision.js +400 -70
  23. package/dist/commands/decision.js.map +1 -1
  24. package/dist/commands/metrics.d.ts +34 -48
  25. package/dist/commands/metrics.d.ts.map +1 -1
  26. package/dist/commands/metrics.js +74 -84
  27. package/dist/commands/metrics.js.map +1 -1
  28. package/dist/commands/shared-output.d.ts +24 -10
  29. package/dist/commands/shared-output.d.ts.map +1 -1
  30. package/dist/commands/shared-output.js +62 -11
  31. package/dist/commands/shared-output.js.map +1 -1
  32. package/dist/commands/show.d.ts +7 -0
  33. package/dist/commands/show.d.ts.map +1 -1
  34. package/dist/commands/show.js +39 -8
  35. package/dist/commands/show.js.map +1 -1
  36. package/dist/commands/validate.d.ts +47 -30
  37. package/dist/commands/validate.d.ts.map +1 -1
  38. package/dist/commands/validate.js +282 -108
  39. package/dist/commands/validate.js.map +1 -1
  40. package/dist/commands/workflow/index.d.ts +6 -10
  41. package/dist/commands/workflow/index.d.ts.map +1 -1
  42. package/dist/commands/workflow/index.js +6 -10
  43. package/dist/commands/workflow/index.js.map +1 -1
  44. package/dist/commands/workflow/instructions.d.ts +21 -8
  45. package/dist/commands/workflow/instructions.d.ts.map +1 -1
  46. package/dist/commands/workflow/instructions.js +254 -95
  47. package/dist/commands/workflow/instructions.js.map +1 -1
  48. package/dist/commands/workflow/new-change.d.ts +4 -5
  49. package/dist/commands/workflow/new-change.d.ts.map +1 -1
  50. package/dist/commands/workflow/new-change.js +90 -25
  51. package/dist/commands/workflow/new-change.js.map +1 -1
  52. package/dist/commands/workflow/schemas.d.ts +3 -5
  53. package/dist/commands/workflow/schemas.d.ts.map +1 -1
  54. package/dist/commands/workflow/schemas.js +37 -11
  55. package/dist/commands/workflow/schemas.js.map +1 -1
  56. package/dist/commands/workflow/shared.d.ts +48 -21
  57. package/dist/commands/workflow/shared.d.ts.map +1 -1
  58. package/dist/commands/workflow/shared.js +36 -33
  59. package/dist/commands/workflow/shared.js.map +1 -1
  60. package/dist/commands/workflow/status.d.ts +10 -6
  61. package/dist/commands/workflow/status.d.ts.map +1 -1
  62. package/dist/commands/workflow/status.js +84 -42
  63. package/dist/commands/workflow/status.js.map +1 -1
  64. package/dist/commands/workflow/templates.d.ts +10 -3
  65. package/dist/commands/workflow/templates.d.ts.map +1 -1
  66. package/dist/commands/workflow/templates.js +39 -40
  67. package/dist/commands/workflow/templates.js.map +1 -1
  68. package/dist/core/archive.d.ts +26 -21
  69. package/dist/core/archive.d.ts.map +1 -1
  70. package/dist/core/archive.js +415 -201
  71. package/dist/core/archive.js.map +1 -1
  72. package/dist/core/artifact-graph/graph.d.ts +29 -36
  73. package/dist/core/artifact-graph/graph.d.ts.map +1 -1
  74. package/dist/core/artifact-graph/graph.js +50 -58
  75. package/dist/core/artifact-graph/graph.js.map +1 -1
  76. package/dist/core/artifact-graph/index.d.ts +2 -2
  77. package/dist/core/artifact-graph/index.d.ts.map +1 -1
  78. package/dist/core/artifact-graph/index.js +2 -2
  79. package/dist/core/artifact-graph/index.js.map +1 -1
  80. package/dist/core/artifact-graph/instruction-loader.d.ts +105 -100
  81. package/dist/core/artifact-graph/instruction-loader.d.ts.map +1 -1
  82. package/dist/core/artifact-graph/instruction-loader.js +176 -110
  83. package/dist/core/artifact-graph/instruction-loader.js.map +1 -1
  84. package/dist/core/artifact-graph/outputs.d.ts +13 -6
  85. package/dist/core/artifact-graph/outputs.d.ts.map +1 -1
  86. package/dist/core/artifact-graph/outputs.js +146 -8
  87. package/dist/core/artifact-graph/outputs.js.map +1 -1
  88. package/dist/core/artifact-graph/resolver.d.ts +44 -63
  89. package/dist/core/artifact-graph/resolver.d.ts.map +1 -1
  90. package/dist/core/artifact-graph/resolver.js +85 -86
  91. package/dist/core/artifact-graph/resolver.js.map +1 -1
  92. package/dist/core/artifact-graph/schema.d.ts +0 -6
  93. package/dist/core/artifact-graph/schema.d.ts.map +1 -1
  94. package/dist/core/artifact-graph/schema.js +7 -32
  95. package/dist/core/artifact-graph/schema.js.map +1 -1
  96. package/dist/core/artifact-graph/state.d.ts +1 -8
  97. package/dist/core/artifact-graph/state.d.ts.map +1 -1
  98. package/dist/core/artifact-graph/state.js +2 -17
  99. package/dist/core/artifact-graph/state.js.map +1 -1
  100. package/dist/core/artifact-graph/stub-detection.d.ts +12 -0
  101. package/dist/core/artifact-graph/stub-detection.d.ts.map +1 -0
  102. package/dist/core/artifact-graph/stub-detection.js +39 -0
  103. package/dist/core/artifact-graph/stub-detection.js.map +1 -0
  104. package/dist/core/artifact-graph/types.d.ts +4 -0
  105. package/dist/core/artifact-graph/types.d.ts.map +1 -1
  106. package/dist/core/artifact-graph/types.js +30 -10
  107. package/dist/core/artifact-graph/types.js.map +1 -1
  108. package/dist/core/available-tools.d.ts +3 -12
  109. package/dist/core/available-tools.d.ts.map +1 -1
  110. package/dist/core/available-tools.js +4 -13
  111. package/dist/core/available-tools.js.map +1 -1
  112. package/dist/core/change-metadata/schema.d.ts +1 -1
  113. package/dist/core/change-metadata/schema.d.ts.map +1 -1
  114. package/dist/core/change-metadata/schema.js +10 -7
  115. package/dist/core/change-metadata/schema.js.map +1 -1
  116. package/dist/core/change-presenter.d.ts +23 -18
  117. package/dist/core/change-presenter.d.ts.map +1 -1
  118. package/dist/core/change-presenter.js +102 -43
  119. package/dist/core/change-presenter.js.map +1 -1
  120. package/dist/core/change-status-policy.d.ts +8 -1
  121. package/dist/core/change-status-policy.d.ts.map +1 -1
  122. package/dist/core/change-status-policy.js +25 -1
  123. package/dist/core/change-status-policy.js.map +1 -1
  124. package/dist/core/codex-metrics.d.ts +25 -45
  125. package/dist/core/codex-metrics.d.ts.map +1 -1
  126. package/dist/core/codex-metrics.js +44 -88
  127. package/dist/core/codex-metrics.js.map +1 -1
  128. package/dist/core/codex-residue.d.ts +22 -0
  129. package/dist/core/codex-residue.d.ts.map +1 -0
  130. package/dist/core/codex-residue.js +61 -0
  131. package/dist/core/codex-residue.js.map +1 -0
  132. package/dist/core/command-generation/adapters/claude.d.ts +2 -9
  133. package/dist/core/command-generation/adapters/claude.d.ts.map +1 -1
  134. package/dist/core/command-generation/adapters/claude.js +2 -12
  135. package/dist/core/command-generation/adapters/claude.js.map +1 -1
  136. package/dist/core/command-generation/adapters/index.d.ts +1 -9
  137. package/dist/core/command-generation/adapters/index.d.ts.map +1 -1
  138. package/dist/core/command-generation/adapters/index.js +1 -9
  139. package/dist/core/command-generation/adapters/index.js.map +1 -1
  140. package/dist/core/command-generation/generator.d.ts +0 -17
  141. package/dist/core/command-generation/generator.d.ts.map +1 -1
  142. package/dist/core/command-generation/generator.js +0 -17
  143. package/dist/core/command-generation/generator.js.map +1 -1
  144. package/dist/core/command-generation/index.d.ts +2 -5
  145. package/dist/core/command-generation/index.d.ts.map +1 -1
  146. package/dist/core/command-generation/index.js +0 -9
  147. package/dist/core/command-generation/index.js.map +1 -1
  148. package/dist/core/command-generation/types.d.ts +10 -36
  149. package/dist/core/command-generation/types.d.ts.map +1 -1
  150. package/dist/core/command-generation/types.js +0 -6
  151. package/dist/core/command-generation/types.js.map +1 -1
  152. package/dist/core/command-generation/yaml.d.ts +3 -18
  153. package/dist/core/command-generation/yaml.d.ts.map +1 -1
  154. package/dist/core/command-generation/yaml.js +5 -23
  155. package/dist/core/command-generation/yaml.js.map +1 -1
  156. package/dist/core/config-prompts.d.ts +2 -4
  157. package/dist/core/config-prompts.d.ts.map +1 -1
  158. package/dist/core/config-prompts.js +2 -7
  159. package/dist/core/config-prompts.js.map +1 -1
  160. package/dist/core/config-schema.d.ts +8 -53
  161. package/dist/core/config-schema.d.ts.map +1 -1
  162. package/dist/core/config-schema.js +49 -62
  163. package/dist/core/config-schema.js.map +1 -1
  164. package/dist/core/config.d.ts +56 -0
  165. package/dist/core/config.d.ts.map +1 -1
  166. package/dist/core/config.js +73 -2
  167. package/dist/core/config.js.map +1 -1
  168. package/dist/core/converters/json-converter.d.ts.map +1 -1
  169. package/dist/core/dashboard-activity.d.ts +7 -9
  170. package/dist/core/dashboard-activity.d.ts.map +1 -1
  171. package/dist/core/dashboard-activity.js +26 -24
  172. package/dist/core/dashboard-activity.js.map +1 -1
  173. package/dist/core/dashboard-data.d.ts +40 -22
  174. package/dist/core/dashboard-data.d.ts.map +1 -1
  175. package/dist/core/dashboard-data.js +84 -68
  176. package/dist/core/dashboard-data.js.map +1 -1
  177. package/dist/core/global-config.d.ts +24 -53
  178. package/dist/core/global-config.d.ts.map +1 -1
  179. package/dist/core/global-config.js +43 -62
  180. package/dist/core/global-config.js.map +1 -1
  181. package/dist/core/init.d.ts +29 -11
  182. package/dist/core/init.d.ts.map +1 -1
  183. package/dist/core/init.js +232 -164
  184. package/dist/core/init.js.map +1 -1
  185. package/dist/core/list.d.ts +1 -1
  186. package/dist/core/list.d.ts.map +1 -1
  187. package/dist/core/list.js +121 -28
  188. package/dist/core/list.js.map +1 -1
  189. package/dist/core/local-server.d.ts +63 -39
  190. package/dist/core/local-server.d.ts.map +1 -1
  191. package/dist/core/local-server.js +99 -53
  192. package/dist/core/local-server.js.map +1 -1
  193. package/dist/core/markdown-render.d.ts +25 -0
  194. package/dist/core/markdown-render.d.ts.map +1 -0
  195. package/dist/core/markdown-render.js +94 -0
  196. package/dist/core/markdown-render.js.map +1 -0
  197. package/dist/core/migrate.d.ts +32 -15
  198. package/dist/core/migrate.d.ts.map +1 -1
  199. package/dist/core/migrate.js +220 -108
  200. package/dist/core/migrate.js.map +1 -1
  201. package/dist/core/parsers/change-parser.d.ts +7 -10
  202. package/dist/core/parsers/change-parser.d.ts.map +1 -1
  203. package/dist/core/parsers/change-parser.js +48 -56
  204. package/dist/core/parsers/change-parser.js.map +1 -1
  205. package/dist/core/parsers/markdown-parser.d.ts +8 -9
  206. package/dist/core/parsers/markdown-parser.d.ts.map +1 -1
  207. package/dist/core/parsers/markdown-parser.js +31 -22
  208. package/dist/core/parsers/markdown-parser.js.map +1 -1
  209. package/dist/core/parsers/requirement-blocks.d.ts +53 -11
  210. package/dist/core/parsers/requirement-blocks.d.ts.map +1 -1
  211. package/dist/core/parsers/requirement-blocks.js +200 -60
  212. package/dist/core/parsers/requirement-blocks.js.map +1 -1
  213. package/dist/core/parsers/requirement-text.d.ts +73 -79
  214. package/dist/core/parsers/requirement-text.d.ts.map +1 -1
  215. package/dist/core/parsers/requirement-text.js +137 -79
  216. package/dist/core/parsers/requirement-text.js.map +1 -1
  217. package/dist/core/parsers/spec-structure.d.ts +1 -1
  218. package/dist/core/parsers/spec-structure.d.ts.map +1 -1
  219. package/dist/core/parsers/spec-structure.js +30 -3
  220. package/dist/core/parsers/spec-structure.js.map +1 -1
  221. package/dist/core/planning-home.js.map +1 -1
  222. package/dist/core/profiles.d.ts +3 -10
  223. package/dist/core/profiles.d.ts.map +1 -1
  224. package/dist/core/profiles.js +5 -12
  225. package/dist/core/profiles.js.map +1 -1
  226. package/dist/core/project-config.d.ts +43 -44
  227. package/dist/core/project-config.d.ts.map +1 -1
  228. package/dist/core/project-config.js +107 -82
  229. package/dist/core/project-config.js.map +1 -1
  230. package/dist/core/project-layout.d.ts +10 -18
  231. package/dist/core/project-layout.d.ts.map +1 -1
  232. package/dist/core/project-layout.js +16 -26
  233. package/dist/core/project-layout.js.map +1 -1
  234. package/dist/core/root-selection.d.ts +11 -7
  235. package/dist/core/root-selection.d.ts.map +1 -1
  236. package/dist/core/root-selection.js +7 -8
  237. package/dist/core/root-selection.js.map +1 -1
  238. package/dist/core/rules.d.ts +10 -0
  239. package/dist/core/rules.d.ts.map +1 -0
  240. package/dist/core/rules.js +43 -0
  241. package/dist/core/rules.js.map +1 -0
  242. package/dist/core/schema-names.d.ts +16 -0
  243. package/dist/core/schema-names.d.ts.map +1 -0
  244. package/dist/core/schema-names.js +16 -0
  245. package/dist/core/schema-names.js.map +1 -0
  246. package/dist/core/schemas/base.schema.d.ts +3 -0
  247. package/dist/core/schemas/base.schema.d.ts.map +1 -1
  248. package/dist/core/schemas/base.schema.js +22 -6
  249. package/dist/core/schemas/base.schema.js.map +1 -1
  250. package/dist/core/schemas/change.schema.d.ts +16 -0
  251. package/dist/core/schemas/change.schema.d.ts.map +1 -1
  252. package/dist/core/schemas/change.schema.js +41 -10
  253. package/dist/core/schemas/change.schema.js.map +1 -1
  254. package/dist/core/schemas/spec.schema.d.ts +2 -0
  255. package/dist/core/schemas/spec.schema.d.ts.map +1 -1
  256. package/dist/core/shared/index.d.ts +3 -8
  257. package/dist/core/shared/index.d.ts.map +1 -1
  258. package/dist/core/shared/index.js +3 -8
  259. package/dist/core/shared/index.js.map +1 -1
  260. package/dist/core/shared/rules-generation.d.ts +27 -8
  261. package/dist/core/shared/rules-generation.d.ts.map +1 -1
  262. package/dist/core/shared/rules-generation.js +151 -16
  263. package/dist/core/shared/rules-generation.js.map +1 -1
  264. package/dist/core/shared/skill-generation.d.ts +38 -53
  265. package/dist/core/shared/skill-generation.d.ts.map +1 -1
  266. package/dist/core/shared/skill-generation.js +82 -51
  267. package/dist/core/shared/skill-generation.js.map +1 -1
  268. package/dist/core/shared/tool-detection.d.ts +40 -62
  269. package/dist/core/shared/tool-detection.d.ts.map +1 -1
  270. package/dist/core/shared/tool-detection.js +88 -80
  271. package/dist/core/shared/tool-detection.js.map +1 -1
  272. package/dist/core/skill-metrics.d.ts +36 -63
  273. package/dist/core/skill-metrics.d.ts.map +1 -1
  274. package/dist/core/skill-metrics.js +34 -73
  275. package/dist/core/skill-metrics.js.map +1 -1
  276. package/dist/core/spec-presenter.d.ts.map +1 -1
  277. package/dist/core/spec-presenter.js +6 -6
  278. package/dist/core/spec-presenter.js.map +1 -1
  279. package/dist/core/specs-apply.d.ts +24 -23
  280. package/dist/core/specs-apply.d.ts.map +1 -1
  281. package/dist/core/specs-apply.js +188 -173
  282. package/dist/core/specs-apply.js.map +1 -1
  283. package/dist/core/templates/fragments/interview.d.ts +2 -6
  284. package/dist/core/templates/fragments/interview.d.ts.map +1 -1
  285. package/dist/core/templates/fragments/interview.js +2 -6
  286. package/dist/core/templates/fragments/interview.js.map +1 -1
  287. package/dist/core/templates/fragments/next-step.d.ts +4 -8
  288. package/dist/core/templates/fragments/next-step.d.ts.map +1 -1
  289. package/dist/core/templates/fragments/next-step.js +4 -8
  290. package/dist/core/templates/fragments/next-step.js.map +1 -1
  291. package/dist/core/templates/fragments/verify.d.ts +9 -12
  292. package/dist/core/templates/fragments/verify.d.ts.map +1 -1
  293. package/dist/core/templates/fragments/verify.js +9 -12
  294. package/dist/core/templates/fragments/verify.js.map +1 -1
  295. package/dist/core/templates/index.d.ts +0 -6
  296. package/dist/core/templates/index.d.ts.map +1 -1
  297. package/dist/core/templates/index.js +0 -7
  298. package/dist/core/templates/index.js.map +1 -1
  299. package/dist/core/templates/skill-templates.d.ts +1 -5
  300. package/dist/core/templates/skill-templates.d.ts.map +1 -1
  301. package/dist/core/templates/skill-templates.js +0 -5
  302. package/dist/core/templates/skill-templates.js.map +1 -1
  303. package/dist/core/templates/types.d.ts +3 -7
  304. package/dist/core/templates/types.d.ts.map +1 -1
  305. package/dist/core/templates/types.js +0 -3
  306. package/dist/core/templates/types.js.map +1 -1
  307. package/dist/core/templates/workflows/apply.d.ts +3 -9
  308. package/dist/core/templates/workflows/apply.d.ts.map +1 -1
  309. package/dist/core/templates/workflows/apply.js +9 -12
  310. package/dist/core/templates/workflows/apply.js.map +1 -1
  311. package/dist/core/templates/workflows/archive.d.ts +0 -6
  312. package/dist/core/templates/workflows/archive.d.ts.map +1 -1
  313. package/dist/core/templates/workflows/archive.js +7 -5
  314. package/dist/core/templates/workflows/archive.js.map +1 -1
  315. package/dist/core/templates/workflows/decision.js +4 -4
  316. package/dist/core/templates/workflows/decision.js.map +1 -1
  317. package/dist/core/templates/workflows/explore.js +1 -1
  318. package/dist/core/templates/workflows/grill.d.ts.map +1 -1
  319. package/dist/core/templates/workflows/grill.js +0 -2
  320. package/dist/core/templates/workflows/grill.js.map +1 -1
  321. package/dist/core/templates/workflows/issue.d.ts +0 -6
  322. package/dist/core/templates/workflows/issue.d.ts.map +1 -1
  323. package/dist/core/templates/workflows/issue.js +3 -0
  324. package/dist/core/templates/workflows/issue.js.map +1 -1
  325. package/dist/core/templates/workflows/propose.d.ts +0 -6
  326. package/dist/core/templates/workflows/propose.d.ts.map +1 -1
  327. package/dist/core/templates/workflows/propose.js +0 -1
  328. package/dist/core/templates/workflows/propose.js.map +1 -1
  329. package/dist/core/templates/workflows/sync.d.ts +2 -8
  330. package/dist/core/templates/workflows/sync.d.ts.map +1 -1
  331. package/dist/core/templates/workflows/sync.js +2 -2
  332. package/dist/core/templates/workflows/sync.js.map +1 -1
  333. package/dist/core/templates/workflows/update.d.ts +0 -6
  334. package/dist/core/templates/workflows/update.d.ts.map +1 -1
  335. package/dist/core/templates/workflows/update.js.map +1 -1
  336. package/dist/core/update.d.ts +26 -21
  337. package/dist/core/update.d.ts.map +1 -1
  338. package/dist/core/update.js +165 -116
  339. package/dist/core/update.js.map +1 -1
  340. package/dist/core/user-state-migration.d.ts +13 -15
  341. package/dist/core/user-state-migration.d.ts.map +1 -1
  342. package/dist/core/user-state-migration.js +16 -20
  343. package/dist/core/user-state-migration.js.map +1 -1
  344. package/dist/core/validation/constants.d.ts +19 -25
  345. package/dist/core/validation/constants.d.ts.map +1 -1
  346. package/dist/core/validation/constants.js +25 -20
  347. package/dist/core/validation/constants.js.map +1 -1
  348. package/dist/core/validation/prose-length.d.ts +15 -0
  349. package/dist/core/validation/prose-length.d.ts.map +1 -0
  350. package/dist/core/validation/prose-length.js +29 -0
  351. package/dist/core/validation/prose-length.js.map +1 -0
  352. package/dist/core/validation/purpose-placeholder.d.ts +9 -16
  353. package/dist/core/validation/purpose-placeholder.d.ts.map +1 -1
  354. package/dist/core/validation/purpose-placeholder.js +30 -44
  355. package/dist/core/validation/purpose-placeholder.js.map +1 -1
  356. package/dist/core/validation/section-validator.d.ts +4 -4
  357. package/dist/core/validation/section-validator.d.ts.map +1 -1
  358. package/dist/core/validation/section-validator.js +43 -7
  359. package/dist/core/validation/section-validator.js.map +1 -1
  360. package/dist/core/validation/task-numbering.d.ts +6 -3
  361. package/dist/core/validation/task-numbering.d.ts.map +1 -1
  362. package/dist/core/validation/task-numbering.js +23 -11
  363. package/dist/core/validation/task-numbering.js.map +1 -1
  364. package/dist/core/validation/types.d.ts +18 -0
  365. package/dist/core/validation/types.d.ts.map +1 -1
  366. package/dist/core/validation/types.js +12 -1
  367. package/dist/core/validation/types.js.map +1 -1
  368. package/dist/core/validation/validator.d.ts +50 -51
  369. package/dist/core/validation/validator.d.ts.map +1 -1
  370. package/dist/core/validation/validator.js +486 -263
  371. package/dist/core/validation/validator.js.map +1 -1
  372. package/dist/prompts/searchable-multi-select.d.ts +3 -8
  373. package/dist/prompts/searchable-multi-select.d.ts.map +1 -1
  374. package/dist/prompts/searchable-multi-select.js +16 -39
  375. package/dist/prompts/searchable-multi-select.js.map +1 -1
  376. package/dist/utils/change-metadata.d.ts +11 -50
  377. package/dist/utils/change-metadata.d.ts.map +1 -1
  378. package/dist/utils/change-metadata.js +48 -67
  379. package/dist/utils/change-metadata.js.map +1 -1
  380. package/dist/utils/change-utils.d.ts +31 -54
  381. package/dist/utils/change-utils.d.ts.map +1 -1
  382. package/dist/utils/change-utils.js +143 -100
  383. package/dist/utils/change-utils.js.map +1 -1
  384. package/dist/utils/file-lock.d.ts +39 -0
  385. package/dist/utils/file-lock.d.ts.map +1 -0
  386. package/dist/utils/file-lock.js +149 -0
  387. package/dist/utils/file-lock.js.map +1 -0
  388. package/dist/utils/file-system.d.ts +12 -32
  389. package/dist/utils/file-system.d.ts.map +1 -1
  390. package/dist/utils/file-system.js +16 -40
  391. package/dist/utils/file-system.js.map +1 -1
  392. package/dist/utils/frontmatter.d.ts +7 -11
  393. package/dist/utils/frontmatter.d.ts.map +1 -1
  394. package/dist/utils/frontmatter.js +11 -11
  395. package/dist/utils/frontmatter.js.map +1 -1
  396. package/dist/utils/interactive.d.ts +4 -9
  397. package/dist/utils/interactive.d.ts.map +1 -1
  398. package/dist/utils/interactive.js +2 -4
  399. package/dist/utils/interactive.js.map +1 -1
  400. package/dist/utils/item-discovery.d.ts +15 -10
  401. package/dist/utils/item-discovery.d.ts.map +1 -1
  402. package/dist/utils/item-discovery.js +42 -47
  403. package/dist/utils/item-discovery.js.map +1 -1
  404. package/dist/utils/link.d.ts +13 -4
  405. package/dist/utils/link.d.ts.map +1 -1
  406. package/dist/utils/link.js +13 -4
  407. package/dist/utils/link.js.map +1 -1
  408. package/dist/utils/match.js.map +1 -1
  409. package/dist/utils/requirement-diff.d.ts +13 -23
  410. package/dist/utils/requirement-diff.d.ts.map +1 -1
  411. package/dist/utils/requirement-diff.js +13 -23
  412. package/dist/utils/requirement-diff.js.map +1 -1
  413. package/dist/utils/spec-files.d.ts +10 -11
  414. package/dist/utils/spec-files.d.ts.map +1 -1
  415. package/dist/utils/spec-files.js +31 -22
  416. package/dist/utils/spec-files.js.map +1 -1
  417. package/dist/utils/task-progress.d.ts +11 -9
  418. package/dist/utils/task-progress.d.ts.map +1 -1
  419. package/dist/utils/task-progress.js +53 -32
  420. package/dist/utils/task-progress.js.map +1 -1
  421. package/dist/utils/timestamp.d.ts +5 -8
  422. package/dist/utils/timestamp.d.ts.map +1 -1
  423. package/dist/utils/timestamp.js +5 -8
  424. package/dist/utils/timestamp.js.map +1 -1
  425. package/package.json +9 -10
  426. package/schemas/decision/templates/decision.md +3 -1
  427. package/schemas/decision/templates/index.md +2 -2
  428. package/schemas/issue/schema.yaml +11 -2
  429. package/schemas/issue/templates/spec.md +37 -3
  430. package/schemas/sdd/schema.yaml +24 -1
  431. package/schemas/sdd/templates/spec.md +37 -3
@@ -1,93 +1,71 @@
1
1
  /**
2
- * Tool Detection Utilities
3
- *
4
- * Shared utilities for detecting tool configurations and version status.
5
- */
6
- /**
7
- * Names of skill directories created by tospec init, derived from the one
8
- * workflow registry. Project-scope skills can't be nested, so they live flat
9
- * and prefixed at `<tool.skillsDir>/skills/tospec-<workflow>/SKILL.md`.
2
+ * Skill directories `tospec init` creates, derived from the one workflow registry.
3
+ * Project-scope skills can't be nested, so they live flat and prefixed at
4
+ * `<tool.skillsDir>/skills/tospec-<workflow>/SKILL.md`.
10
5
  */
11
6
  export declare const SKILL_NAMES: readonly string[];
12
7
  /**
13
- * Canonical skill directory names tospec used to create but no longer does.
14
- * Cleaned up on init/update so an upgrade leaves no orphan dirs behind in
15
- * `.agents/skills/`. verify was folded into apply; reconcile was renamed back
16
- * to sync, so its dir must go rather than sit beside the new one.
8
+ * Skill directories tospec used to create but no longer does; removed on
9
+ * init/update so an upgrade leaves no orphans.
17
10
  *
18
- * A name generated by WORKFLOW_DEFS must never appear here: removeLegacySkillDirs
19
- * runs on every init/update, so an overlap would delete the skill the same run
20
- * just wrote — silently, surfacing later as a missing skill rather than an error.
21
- * That is why `tospec-sync` came out of this list when the reconcile rename was
22
- * reverted, instead of `tospec-reconcile` simply being appended.
23
- */
24
- export declare const LEGACY_SKILL_DIRS: readonly ["tospec-verify", "tospec-reconcile"];
25
- /**
26
- * Status of skill configuration for a tool.
11
+ * A name WORKFLOW_DEFS generates must never appear here: removeLegacySkillDirs
12
+ * runs on every init/update, so an overlap deletes the skill the run just wrote.
27
13
  */
14
+ export declare const LEGACY_SKILL_DIRS: readonly ['tospec-verify', 'tospec-reconcile'];
28
15
  export interface ToolSkillStatus {
29
- /** Whether the tool has any skills configured */
16
+ /** The tool has at least one skill. */
30
17
  configured: boolean;
31
- /** Whether all skills are configured */
18
+ /** The tool has every skill in SKILL_NAMES. */
32
19
  fullyConfigured: boolean;
33
- /** Number of skills currently configured */
34
20
  skillCount: number;
35
21
  }
36
- /**
37
- * Version information for a tool's skills.
38
- */
39
22
  export interface ToolVersionStatus {
40
- /** The tool ID */
41
23
  toolId: string;
42
- /** The tool's display name */
43
24
  toolName: string;
44
- /** Whether the tool has any skills configured */
45
25
  configured: boolean;
46
- /** The generatedBy version found in the skill files, or null if not found */
26
+ /** The `generatedBy` frontmatter found in the skill files, or null. */
47
27
  generatedByVersion: string | null;
48
- /** Whether the tool needs updating (version mismatch or missing) */
28
+ /** Version mismatched or missing. */
49
29
  needsUpdate: boolean;
50
30
  }
51
- /**
52
- * Removes any legacy skill directories (see LEGACY_SKILL_DIRS) from the given
53
- * skills directory. Idempotent — safe to call when they don't exist. Used by
54
- * init/update so upgrades leave no orphan verify/sync dirs behind.
55
- */
31
+ /** Idempotent: safe when the legacy dirs do not exist. */
56
32
  export declare function removeLegacySkillDirs(skillsDir: string): Promise<number>;
57
33
  /**
58
- * Removes the intermediate grouped skill layouts from earlier builds so an
59
- * upgrade lands cleanly at the current flat `<toolBaseDir>/skills/tospec-<workflow>/`
60
- * location (project-scope skills can't be nested in a sub-folder). Removes:
61
- * 1. the grouped layout `<toolBaseDir>/skills/tospec/<workflow>/`
62
- * 2. the no-`skills/`-layer layout `<toolBaseDir>/tospec/<workflow>/`
63
- * The current flat `skills/tospec-<workflow>/` dirs are left alone (they're
64
- * refreshed by the link loop; a retired one like tospec-verify is handled by
65
- * removeLegacySkillDirs).
34
+ * Removes the skill directories for workflows the active profile does not select.
35
+ *
36
+ * Shared by `init` and `update`: agents load skills from the skill directory, so
37
+ * a run that prunes only `.claude/commands/tosx/` leaves excluded workflows
38
+ * loadable.
39
+ *
40
+ * ALL_WORKFLOWS and the directory naming are derived here rather than passed in,
41
+ * since a caller supplying either is a copy that can fall behind WORKFLOW_DEFS.
66
42
  */
67
- export declare function removeLegacyToolSkillLayout(toolBaseDir: string): Promise<number>;
43
+ export declare function removeUnselectedSkillDirs(skillsDir: string, desiredWorkflows: readonly string[]): Promise<number>;
68
44
  /**
69
- * Gets the list of tools with skillsDir configured.
45
+ * Removes the grouped skill layouts earlier builds wrote, so an upgrade lands at
46
+ * the current flat `<toolBaseDir>/skills/tospec-<workflow>/`. The flat dirs are
47
+ * left alone: the copy loop refreshes them, and retired ones go via
48
+ * removeLegacySkillDirs.
70
49
  */
50
+ export declare function removeLegacyToolSkillLayout(toolBaseDir: string): Promise<number>;
71
51
  export declare function getToolsWithSkillsDir(): string[];
72
- /**
73
- * Checks which skill files exist for a tool.
74
- */
75
52
  export declare function getToolSkillStatus(projectRoot: string, toolId: string): ToolSkillStatus;
76
- /**
77
- * Gets the skill status for all tools with skillsDir configured.
78
- */
79
53
  export declare function getToolStates(projectRoot: string): Map<string, ToolSkillStatus>;
80
- /**
81
- * Extracts the generatedBy version from a skill file's YAML frontmatter.
82
- * Returns null if the field is not found or the file doesn't exist.
83
- */
54
+ /** Null when the field is absent or the file cannot be read. */
84
55
  export declare function extractGeneratedByVersion(skillFilePath: string): string | null;
85
- /**
86
- * Gets version status for a tool by reading the first available skill file.
87
- */
56
+ /** Reads the version from the first skill file the tool has. */
88
57
  export declare function getToolVersionStatus(projectRoot: string, toolId: string, currentVersion: string): ToolVersionStatus;
58
+ export declare function getConfiguredTools(projectRoot: string): string[];
89
59
  /**
90
- * Gets all configured tools in the project.
60
+ * Whether tospec has been installed into this tool dir, independent of how many
61
+ * skills sit there — the right question for `update`/`rules`, where
62
+ * `getToolSkillStatus().configured` is wrong: a profile selecting no workflows
63
+ * makes `update` remove every skill dir, erasing the evidence the tool was set
64
+ * up. tospec/decisions/20260916_152000-tool-install-marker-not-skill-count.md
65
+ *
66
+ * The workflow rule document is the durable marker: written on every
67
+ * init/update/rules, removed by none. The legacy `rules/tospec/decision.md` is
68
+ * init-only, so it proves tospec once touched the dir, not that it manages it.
91
69
  */
92
- export declare function getConfiguredTools(projectRoot: string): string[];
70
+ export declare function isToolInstalled(projectRoot: string, toolId: string): boolean;
93
71
  //# sourceMappingURL=tool-detection.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"tool-detection.d.ts","sourceRoot":"","sources":["../../../src/core/shared/tool-detection.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAOH;;;;GAIG;AACH,eAAO,MAAM,WAAW,EAAE,SAAS,MAAM,EAA4C,CAAC;AAEtF;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,iBAAiB,gDAAiD,CAAC;AAEhF;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,iDAAiD;IACjD,UAAU,EAAE,OAAO,CAAC;IACpB,wCAAwC;IACxC,eAAe,EAAE,OAAO,CAAC;IACzB,4CAA4C;IAC5C,UAAU,EAAE,MAAM,CAAC;CACpB;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,kBAAkB;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,8BAA8B;IAC9B,QAAQ,EAAE,MAAM,CAAC;IACjB,iDAAiD;IACjD,UAAU,EAAE,OAAO,CAAC;IACpB,6EAA6E;IAC7E,kBAAkB,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,oEAAoE;IACpE,WAAW,EAAE,OAAO,CAAC;CACtB;AAED;;;;GAIG;AACH,wBAAsB,qBAAqB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAc9E;AAED;;;;;;;;;GASG;AACH,wBAAsB,2BAA2B,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAiBtF;AAED;;GAEG;AACH,wBAAgB,qBAAqB,IAAI,MAAM,EAAE,CAEhD;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,eAAe,CAqBvF;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,WAAW,EAAE,MAAM,GAAG,GAAG,CAAC,MAAM,EAAE,eAAe,CAAC,CAS/E;AAED;;;GAGG;AACH,wBAAgB,yBAAyB,CAAC,aAAa,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CA2B9E;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAClC,WAAW,EAAE,MAAM,EACnB,MAAM,EAAE,MAAM,EACd,cAAc,EAAE,MAAM,GACrB,iBAAiB,CAkCnB;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,EAAE,CAIhE"}
1
+ {"version":3,"file":"tool-detection.d.ts","sourceRoot":"","sources":["../../../src/core/shared/tool-detection.ts"],"names":[],"mappings":"AAUA;;;;GAIG;AACH,eAAO,MAAM,WAAW,EAAE,SAAS,MAAM,EAA4C,CAAC;AAEtF;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB,YAAI,eAAe,EAAE,kBAAkB,CAAU,CAAC;AAEhF,MAAM,WAAW,eAAe;IAC9B,uCAAuC;IACvC,UAAU,EAAE,OAAO,CAAC;IACpB,+CAA+C;IAC/C,eAAe,EAAE,OAAO,CAAC;IACzB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,iBAAiB;IAChC,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,OAAO,CAAC;IACpB,uEAAuE;IACvE,kBAAkB,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,qCAAqC;IACrC,WAAW,EAAE,OAAO,CAAC;CACtB;AAsBD,0DAA0D;AAC1D,wBAAsB,qBAAqB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAE9E;AAED;;;;;;;;;GASG;AACH,wBAAsB,yBAAyB,CAC7C,SAAS,EAAE,MAAM,EACjB,gBAAgB,EAAE,SAAS,MAAM,EAAE,GAClC,OAAO,CAAC,MAAM,CAAC,CASjB;AAsBD;;;;;GAKG;AACH,wBAAsB,2BAA2B,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAKtF;AAED,wBAAgB,qBAAqB,IAAI,MAAM,EAAE,CAEhD;AAED,wBAAgB,kBAAkB,CAAC,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,eAAe,CAqBvF;AAED,wBAAgB,aAAa,CAAC,WAAW,EAAE,MAAM,GAAG,GAAG,CAAC,MAAM,EAAE,eAAe,CAAC,CAQ/E;AAED,gEAAgE;AAChE,wBAAgB,yBAAyB,CAAC,aAAa,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAiB9E;AAED,gEAAgE;AAChE,wBAAgB,oBAAoB,CAClC,WAAW,EAAE,MAAM,EACnB,MAAM,EAAE,MAAM,EACd,cAAc,EAAE,MAAM,GACrB,iBAAiB,CAiCnB;AAED,wBAAgB,kBAAkB,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,EAAE,CAIhE;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,eAAe,CAAC,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAS5E"}
@@ -1,40 +1,29 @@
1
- /**
2
- * Tool Detection Utilities
3
- *
4
- * Shared utilities for detecting tool configurations and version status.
5
- */
6
1
  import path from 'path';
7
2
  import * as fs from 'fs';
8
- import { AI_TOOLS } from '../config.js';
3
+ import { AI_TOOLS, LEGACY_WORKFLOW_RULE_FILENAME, TOOL_RULES_SUBDIR, WORKFLOW_RULE_FILENAME, } from '../config.js';
9
4
  import { ALL_WORKFLOWS, workflowSkillDirName } from './skill-generation.js';
10
5
  /**
11
- * Names of skill directories created by tospec init, derived from the one
12
- * workflow registry. Project-scope skills can't be nested, so they live flat
13
- * and prefixed at `<tool.skillsDir>/skills/tospec-<workflow>/SKILL.md`.
6
+ * Skill directories `tospec init` creates, derived from the one workflow registry.
7
+ * Project-scope skills can't be nested, so they live flat and prefixed at
8
+ * `<tool.skillsDir>/skills/tospec-<workflow>/SKILL.md`.
14
9
  */
15
10
  export const SKILL_NAMES = ALL_WORKFLOWS.map(workflowSkillDirName);
16
11
  /**
17
- * Canonical skill directory names tospec used to create but no longer does.
18
- * Cleaned up on init/update so an upgrade leaves no orphan dirs behind in
19
- * `.agents/skills/`. verify was folded into apply; reconcile was renamed back
20
- * to sync, so its dir must go rather than sit beside the new one.
12
+ * Skill directories tospec used to create but no longer does; removed on
13
+ * init/update so an upgrade leaves no orphans.
21
14
  *
22
- * A name generated by WORKFLOW_DEFS must never appear here: removeLegacySkillDirs
23
- * runs on every init/update, so an overlap would delete the skill the same run
24
- * just wrote — silently, surfacing later as a missing skill rather than an error.
25
- * That is why `tospec-sync` came out of this list when the reconcile rename was
26
- * reverted, instead of `tospec-reconcile` simply being appended.
15
+ * A name WORKFLOW_DEFS generates must never appear here: removeLegacySkillDirs
16
+ * runs on every init/update, so an overlap deletes the skill the run just wrote.
27
17
  */
28
18
  export const LEGACY_SKILL_DIRS = ['tospec-verify', 'tospec-reconcile'];
29
19
  /**
30
- * Removes any legacy skill directories (see LEGACY_SKILL_DIRS) from the given
31
- * skills directory. Idempotent — safe to call when they don't exist. Used by
32
- * init/update so upgrades leave no orphan verify/sync dirs behind.
20
+ * Removes each directory that exists and reports how many went. Errors are
21
+ * swallowed per directory: one that cannot be removed must not abort an init
22
+ * that has otherwise succeeded.
33
23
  */
34
- export async function removeLegacySkillDirs(skillsDir) {
24
+ async function removeDirs(dirs) {
35
25
  let removed = 0;
36
- for (const dirName of LEGACY_SKILL_DIRS) {
37
- const dir = path.join(skillsDir, dirName);
26
+ for (const dir of dirs) {
38
27
  try {
39
28
  if (fs.existsSync(dir)) {
40
29
  await fs.promises.rm(dir, { recursive: true, force: true });
@@ -42,49 +31,69 @@ export async function removeLegacySkillDirs(skillsDir) {
42
31
  }
43
32
  }
44
33
  catch {
45
- // Ignore errors
34
+ // Best effort, per the note above.
46
35
  }
47
36
  }
48
37
  return removed;
49
38
  }
39
+ /** Idempotent: safe when the legacy dirs do not exist. */
40
+ export async function removeLegacySkillDirs(skillsDir) {
41
+ return removeDirs(LEGACY_SKILL_DIRS.map((dirName) => path.join(skillsDir, dirName)));
42
+ }
50
43
  /**
51
- * Removes the intermediate grouped skill layouts from earlier builds so an
52
- * upgrade lands cleanly at the current flat `<toolBaseDir>/skills/tospec-<workflow>/`
53
- * location (project-scope skills can't be nested in a sub-folder). Removes:
54
- * 1. the grouped layout `<toolBaseDir>/skills/tospec/<workflow>/`
55
- * 2. the no-`skills/`-layer layout `<toolBaseDir>/tospec/<workflow>/`
56
- * The current flat `skills/tospec-<workflow>/` dirs are left alone (they're
57
- * refreshed by the link loop; a retired one like tospec-verify is handled by
58
- * removeLegacySkillDirs).
44
+ * Removes the skill directories for workflows the active profile does not select.
45
+ *
46
+ * Shared by `init` and `update`: agents load skills from the skill directory, so
47
+ * a run that prunes only `.claude/commands/tosx/` leaves excluded workflows
48
+ * loadable.
49
+ *
50
+ * ALL_WORKFLOWS and the directory naming are derived here rather than passed in,
51
+ * since a caller supplying either is a copy that can fall behind WORKFLOW_DEFS.
59
52
  */
60
- export async function removeLegacyToolSkillLayout(toolBaseDir) {
61
- let removed = 0;
62
- const legacyDirs = [
63
- path.join(toolBaseDir, 'skills', 'tospec'), // grouped: <tool>/skills/tospec/<workflow>
64
- path.join(toolBaseDir, 'tospec'), // bare: <tool>/tospec/<workflow>
65
- ];
66
- for (const dir of legacyDirs) {
67
- try {
68
- if (fs.existsSync(dir)) {
69
- await fs.promises.rm(dir, { recursive: true, force: true });
70
- removed++;
71
- }
72
- }
73
- catch {
74
- // Ignore errors
75
- }
53
+ export async function removeUnselectedSkillDirs(skillsDir, desiredWorkflows) {
54
+ const desiredSet = new Set(desiredWorkflows);
55
+ const unselected = ALL_WORKFLOWS
56
+ .filter((workflow) => !desiredSet.has(workflow))
57
+ .map(workflowSkillDirName)
58
+ .filter((dirName) => dirName)
59
+ .map((dirName) => path.join(skillsDir, dirName));
60
+ return removeDirs([...unselected, ...staleGeneratedSkillDirs(skillsDir)]);
61
+ }
62
+ /**
63
+ * `tospec-*` skill directories this version does not generate but an earlier
64
+ * one did — a workflow renamed or dropped since. Recognised by the
65
+ * `generatedBy` frontmatter: a hand-written skill carries none and is left
66
+ * alone, because nothing else would ever restore it.
67
+ */
68
+ function staleGeneratedSkillDirs(skillsDir) {
69
+ let entries;
70
+ try {
71
+ entries = fs.readdirSync(skillsDir, { withFileTypes: true });
76
72
  }
77
- return removed;
73
+ catch {
74
+ return [];
75
+ }
76
+ const known = new Set([...SKILL_NAMES, ...LEGACY_SKILL_DIRS]);
77
+ return entries
78
+ .filter((entry) => entry.isDirectory() && entry.name.startsWith('tospec-') && !known.has(entry.name))
79
+ .map((entry) => path.join(skillsDir, entry.name))
80
+ .filter((dir) => extractGeneratedByVersion(path.join(dir, 'SKILL.md')) !== null);
78
81
  }
79
82
  /**
80
- * Gets the list of tools with skillsDir configured.
83
+ * Removes the grouped skill layouts earlier builds wrote, so an upgrade lands at
84
+ * the current flat `<toolBaseDir>/skills/tospec-<workflow>/`. The flat dirs are
85
+ * left alone: the copy loop refreshes them, and retired ones go via
86
+ * removeLegacySkillDirs.
81
87
  */
88
+ export async function removeLegacyToolSkillLayout(toolBaseDir) {
89
+ return removeDirs([
90
+ path.join(toolBaseDir, 'skills', 'tospec'), // grouped: <tool>/skills/tospec/<workflow>
91
+ path.join(toolBaseDir, 'tospec'), // bare: <tool>/tospec/<workflow>
92
+ ]);
93
+ }
82
94
  export function getToolsWithSkillsDir() {
83
95
  return AI_TOOLS.filter((t) => t.skillsDir).map((t) => t.value);
84
96
  }
85
- /**
86
- * Checks which skill files exist for a tool.
87
- */
88
97
  export function getToolSkillStatus(projectRoot, toolId) {
89
98
  const tool = AI_TOOLS.find((t) => t.value === toolId);
90
99
  if (!tool?.skillsDir) {
@@ -104,36 +113,20 @@ export function getToolSkillStatus(projectRoot, toolId) {
104
113
  skillCount,
105
114
  };
106
115
  }
107
- /**
108
- * Gets the skill status for all tools with skillsDir configured.
109
- */
110
116
  export function getToolStates(projectRoot) {
111
117
  const states = new Map();
112
- const toolIds = AI_TOOLS.filter((t) => t.skillsDir).map((t) => t.value);
113
- for (const toolId of toolIds) {
118
+ for (const toolId of getToolsWithSkillsDir()) {
114
119
  states.set(toolId, getToolSkillStatus(projectRoot, toolId));
115
120
  }
116
121
  return states;
117
122
  }
118
- /**
119
- * Extracts the generatedBy version from a skill file's YAML frontmatter.
120
- * Returns null if the field is not found or the file doesn't exist.
121
- */
123
+ /** Null when the field is absent or the file cannot be read. */
122
124
  export function extractGeneratedByVersion(skillFilePath) {
123
125
  try {
124
126
  if (!fs.existsSync(skillFilePath)) {
125
127
  return null;
126
128
  }
127
129
  const content = fs.readFileSync(skillFilePath, 'utf-8');
128
- // Look for generatedBy in the YAML frontmatter
129
- // The file format is:
130
- // ---
131
- // ...
132
- // metadata:
133
- // author: tospec
134
- // version: "1.0"
135
- // generatedBy: "0.23.0"
136
- // ---
137
130
  const generatedByMatch = content.match(/^\s*generatedBy:\s*["']?([^"'\n]+)["']?\s*$/m);
138
131
  if (generatedByMatch && generatedByMatch[1]) {
139
132
  return generatedByMatch[1].trim();
@@ -144,9 +137,7 @@ export function extractGeneratedByVersion(skillFilePath) {
144
137
  return null;
145
138
  }
146
139
  }
147
- /**
148
- * Gets version status for a tool by reading the first available skill file.
149
- */
140
+ /** Reads the version from the first skill file the tool has. */
150
141
  export function getToolVersionStatus(projectRoot, toolId, currentVersion) {
151
142
  const tool = AI_TOOLS.find((t) => t.value === toolId);
152
143
  if (!tool?.skillsDir) {
@@ -160,7 +151,6 @@ export function getToolVersionStatus(projectRoot, toolId, currentVersion) {
160
151
  }
161
152
  const skillsDir = path.join(projectRoot, tool.skillsDir, 'skills');
162
153
  let generatedByVersion = null;
163
- // Find the first skill file that exists and read its version
164
154
  for (const skillName of SKILL_NAMES) {
165
155
  const skillFile = path.join(skillsDir, skillName, 'SKILL.md');
166
156
  if (fs.existsSync(skillFile)) {
@@ -178,12 +168,30 @@ export function getToolVersionStatus(projectRoot, toolId, currentVersion) {
178
168
  needsUpdate,
179
169
  };
180
170
  }
181
- /**
182
- * Gets all configured tools in the project.
183
- */
184
171
  export function getConfiguredTools(projectRoot) {
185
172
  return AI_TOOLS
186
- .filter((t) => t.skillsDir && getToolSkillStatus(projectRoot, t.value).configured)
173
+ .filter((t) => t.skillsDir && isToolInstalled(projectRoot, t.value))
187
174
  .map((t) => t.value);
188
175
  }
176
+ /**
177
+ * Whether tospec has been installed into this tool dir, independent of how many
178
+ * skills sit there — the right question for `update`/`rules`, where
179
+ * `getToolSkillStatus().configured` is wrong: a profile selecting no workflows
180
+ * makes `update` remove every skill dir, erasing the evidence the tool was set
181
+ * up. tospec/decisions/20260916_152000-tool-install-marker-not-skill-count.md
182
+ *
183
+ * The workflow rule document is the durable marker: written on every
184
+ * init/update/rules, removed by none. The legacy `rules/tospec/decision.md` is
185
+ * init-only, so it proves tospec once touched the dir, not that it manages it.
186
+ */
187
+ export function isToolInstalled(projectRoot, toolId) {
188
+ const tool = AI_TOOLS.find((t) => t.value === toolId);
189
+ if (!tool?.skillsDir)
190
+ return false;
191
+ if (getToolSkillStatus(projectRoot, toolId).configured)
192
+ return true;
193
+ // Either spelling: a project last touched before the filename typo was fixed
194
+ // holds the legacy name, which is just as much proof of an install.
195
+ return [WORKFLOW_RULE_FILENAME, LEGACY_WORKFLOW_RULE_FILENAME].some((name) => fs.existsSync(path.join(projectRoot, tool.skillsDir, ...TOOL_RULES_SUBDIR, name)));
196
+ }
189
197
  //# sourceMappingURL=tool-detection.js.map
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3
  *
4
- * There is no tospec-side event to measure. The CLI is stateless by design
5
- * (status comes from file existence), so it never learns when a workflow
6
- * starts or ends — and CLI-call telemetry would miss the workflows that
7
- * barely touch the CLI at all: `grill` only ever runs `tospec list`, and
8
- * `explore` only an optional `tospec decision new`.
4
+ * There is no tospec-side event to measure: the CLI is stateless, so it never
5
+ * learns when a workflow starts or ends, and CLI-call telemetry would miss the
6
+ * workflows that barely touch it. Every transcript entry in
7
+ * `<config>/projects/<encoded-cwd>/<session>.jsonl` already carries an
8
+ * `attributionSkill`, so this is a read-only analysis of existing data. The
9
+ * field is recent, so older sessions yield no runs — reported, not hidden.
9
10
  *
10
- * Claude Code already records what we need. Every transcript entry in
11
- * `<config>/projects/<encoded-cwd>/<session>.jsonl` carries an
12
- * `attributionSkill` field naming the skill that entry belongs to, so skill
13
- * timing is a read-only analysis of data that already exists — retroactively,
14
- * with nothing to install. The cost is that the field is recent: sessions
15
- * predating it yield no runs, which is reported rather than hidden.
16
- *
17
- * Two durations are reported per run because they answer different questions
18
- * and diverge sharply in conversational workflows:
11
+ * Two durations per run, because they diverge sharply in conversational
12
+ * workflows:
19
13
  *
20
14
  * - `span` — wall clock, first to last entry. "How long did this take?"
21
15
  * - `engaged` — span minus gaps over `idleGapMs`. "How much of that was work?"
22
16
  *
23
- * An interview loop like `grill` idles while the user thinks, so its span runs
24
- * well above its engaged time; a continuous `apply` pass has the two nearly
25
- * equal. Reporting only one of them would silently answer the other question.
26
- *
27
- * Pure parsing/aggregation is split from the directory-reading wrapper so
28
- * vitest can exercise it without a transcript store on disk.
17
+ * Pure parsing/aggregation is split from the directory-reading wrapper so tests
18
+ * can exercise it without a transcript store on disk.
29
19
  */
30
20
  /** Gap above which the user is considered away, excluded from `engaged`. */
31
21
  export declare const DEFAULT_IDLE_GAP_MS: number;
@@ -42,10 +32,9 @@ export interface TranscriptEntry {
42
32
  skill: string | null;
43
33
  }
44
34
  /**
45
- * Which tool a run's timing was derived from. Claude Code's `attributionSkill`
46
- * is read directly from recorded data; Codex's is inferred by a heuristic
47
- * (see codex-metrics.ts) — the two are never combined into one figure because
48
- * they carry different confidence.
35
+ * Which tool a run's timing came from. Claude Code's `attributionSkill` is read
36
+ * directly; Codex's is inferred by a heuristic (codex-metrics.ts), so the two
37
+ * carry different confidence and are never combined into one figure.
49
38
  */
50
39
  export type MetricsSourceKind = 'claude-code' | 'codex';
51
40
  export interface SkillRun {
@@ -103,8 +92,8 @@ export interface RunGroupingOptions {
103
92
  /**
104
93
  * Claude Code's per-project transcript directory name: the absolute cwd with
105
94
  * every non-alphanumeric character replaced by `-`. `D:\workspace\a.b` becomes
106
- * `D--workspace-a-b` (the drive colon and the separator each contribute a dash,
107
- * which is why the doubled dash is correct and not a bug).
95
+ * `D--workspace-a-b` — the drive colon and the separator each contribute a dash,
96
+ * so the doubled dash is correct.
108
97
  */
109
98
  export declare function encodeProjectDirName(rootPath: string): string;
110
99
  export interface TranscriptDirOptions {
@@ -112,57 +101,46 @@ export interface TranscriptDirOptions {
112
101
  homedir?: string;
113
102
  }
114
103
  /**
115
- * Locates the transcript directory for a project root. `CLAUDE_CONFIG_DIR` is
116
- * honoured because Claude Code itself does; without it the default is
117
- * `~/.claude`. Injectable env/homedir follows global-config.ts so path
118
- * resolution stays testable.
104
+ * The transcript directory for a project root. `CLAUDE_CONFIG_DIR` is honoured
105
+ * because Claude Code itself does; without it the default is `~/.claude`.
119
106
  */
120
107
  export declare function resolveTranscriptDir(rootPath: string, options?: TranscriptDirOptions): string;
121
108
  /**
122
109
  * Collapses the two names one workflow is recorded under — the slash command
123
- * (`tosx:apply`) and the skill (`tospec-apply`) — onto the workflow id. Without
124
- * this every workflow's history is split across two unrelated-looking rows.
110
+ * (`tosx:apply`) and the skill (`tospec-apply`) — onto the workflow id, so its
111
+ * history is one row rather than two.
125
112
  */
126
113
  export declare function normalizeSkillName(raw: string): string;
127
114
  export declare function isWorkflowSkill(skill: string): boolean;
128
115
  /**
129
116
  * Parses one `.jsonl` transcript into timestamped entries, sorted by time.
130
117
  * Malformed lines are skipped rather than fatal: transcripts are an append-only
131
- * log written by another process and can be torn at the tail while a session
132
- * is live.
118
+ * log written by another process and can be torn at the tail.
133
119
  */
134
120
  export declare function parseTranscript(text: string): TranscriptEntry[];
135
121
  /**
136
- * Groups one session's entries into runs.
122
+ * Groups one session's entries into runs. Two rules carry the design:
137
123
  *
138
- * Two rules carry the whole design:
139
- *
140
- * - An **unattributed** entry does not end a run. Tool results and the user's
141
- * own messages carry no `attributionSkill`, so treating them as boundaries
142
- * shatters a single 30-minute `apply` into a hundred two-entry fragments.
143
- * They are folded into the open run instead, because they are its work.
144
- * - A **different skill** does end a run. Grouping all of one skill's entries
145
- * by min/max instead would make an A → B → A sequence count B's elapsed time
146
- * inside A's engaged total. Splitting keeps run windows disjoint, at the cost
147
- * of reporting a re-entered skill as several runs.
124
+ * - An **unattributed** entry does not end a run. Tool results and user messages
125
+ * carry no `attributionSkill`, so treating them as boundaries shatters a
126
+ * 30-minute `apply` into fragments.
127
+ * - A **different skill** does end a run. Grouping by min/max instead would
128
+ * count B's elapsed time inside A's engaged total for an A → B → A sequence.
129
+ * The cost is reporting a re-entered skill as several runs.
148
130
  *
149
131
  * A run is additionally split at any internal gap over `splitGapMs`.
150
132
  */
151
133
  export declare function buildRuns(entries: TranscriptEntry[], session: string, options?: RunGroupingOptions): SkillRun[];
152
134
  /**
153
- * The composite key identifying one report row: a skill under one source.
154
- * Shared by aggregation, the daily/weekly/monthly series, and the frontend
155
- * (which reproduces this exact format in JS, since it cannot import a TS
156
- * module) — one definition of "row" everywhere a skill and its source must
157
- * be kept apart rather than merged.
135
+ * The composite key for one report row: a skill under one source. The frontend
136
+ * reproduces this format in JS (it cannot import a TS module), so keep the two
137
+ * in step.
158
138
  */
159
139
  export declare function skillRowKey(skill: string, source: MetricsSourceKind): string;
160
140
  /**
161
- * Aggregates runs per skill-and-source pair, ordered by total engaged time
162
- * (descending). Grouping by source too, not by skill alone, is what keeps a
163
- * skill run under both tools from being summed into one figure — Claude
164
- * Code's attribution and Codex's heuristic one carry different confidence and
165
- * must stay distinguishable everywhere a skill is reported.
141
+ * Aggregates runs per skill-and-source pair, by total engaged time descending.
142
+ * Grouping by source keeps a skill run under both tools from summing into one
143
+ * figure, since the two carry different confidence.
166
144
  */
167
145
  export declare function aggregateRuns(runs: SkillRun[]): SkillAggregate[];
168
146
  export interface CollectMetricsOptions extends RunGroupingOptions, TranscriptDirOptions {
@@ -172,14 +150,9 @@ export interface CollectMetricsOptions extends RunGroupingOptions, TranscriptDir
172
150
  /**
173
151
  * Reads every transcript for a project root and derives skill timings.
174
152
  *
175
- * Every skill found is reported, tospec's own workflows and unrelated ones
176
- * alike — there is deliberately no filtering by skill name. `workflow` on each
177
- * aggregate labels which is which, so a caller that cares can tell them apart
178
- * without this function deciding for it.
179
- *
180
- * A missing transcript directory is a reportable state (`available: false`),
181
- * not an error: the project may simply never have been opened in Claude Code,
182
- * and the caller renders that far better than a stack trace.
153
+ * No filtering by skill name: every skill found is reported, and `workflow` on
154
+ * each aggregate labels tospec's own. A missing transcript directory is a
155
+ * reportable state (`available: false`), not an error.
183
156
  */
184
157
  export declare function collectSkillMetrics(rootPath: string, options?: CollectMetricsOptions): Promise<SkillMetrics>;
185
158
  //# sourceMappingURL=skill-metrics.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"skill-metrics.d.ts","sourceRoot":"","sources":["../../src/core/skill-metrics.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAQH,4EAA4E;AAC5E,eAAO,MAAM,mBAAmB,QAAgB,CAAC;AAEjD;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,QAAiB,CAAC;AAQnD,qEAAqE;AACrE,MAAM,WAAW,eAAe;IAC9B,MAAM,EAAE,MAAM,CAAC;IACf,gFAAgF;IAChF,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;CACtB;AAED;;;;;GAKG;AACH,MAAM,MAAM,iBAAiB,G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