@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
@@ -3,22 +3,17 @@
3
3
  * report `skill-metrics.ts` builds from Claude Code transcripts.
4
4
  *
5
5
  * Codex keeps one session tree shared by every project
6
- * (`<CODEX_HOME or ~/.codex>/sessions/<yyyy>/<mm>/<dd>/rollout-*.jsonl`),
7
- * partitioned by date rather than by project, with the working directory
8
- * recorded once per session (`type: "session_meta"`, `payload.cwd`) rather than
9
- * encoded into a directory name. Project scoping therefore reads that field
10
- * instead of resolving a path (see codex-metrics-source spec, "Codex sessions
11
- * are scoped to a project by their recorded working directory").
6
+ * (`<CODEX_HOME or ~/.codex>/sessions/<yyyy>/<mm>/<dd>/rollout-*.jsonl`), with
7
+ * the working directory recorded once per session (`type: "session_meta"`,
8
+ * `payload.cwd`) rather than encoded into a directory name, so project scoping
9
+ * reads that field instead of resolving a path.
12
10
  *
13
- * Codex transcripts carry nothing like Claude Code's `attributionSkill`. Every
14
- * session's system prompt lists all installed skills identically whether or
15
- * not any of them were used, so that listing carries no signal. The one event
16
- * confirmed (against this project's own real `~/.codex` history) to correlate
17
- * with a skill actually being used is a tool-call command whose text reads a
18
- * path ending in `<skill-name>/SKILL.md` — the moment the agent pulls in that
19
- * skill's instructions. Skill attribution here is therefore a heuristic, not a
20
- * recorded fact, and undercounts by construction: a skill run that never
21
- * re-reads its own instructions file is invisible to it.
11
+ * Codex transcripts carry nothing like `attributionSkill`, and the system prompt
12
+ * lists every installed skill whether used or not, so that listing is no signal.
13
+ * The one event that correlates with a skill being used is a tool-call command
14
+ * reading a path ending in `<skill-name>/SKILL.md`. Attribution here is
15
+ * therefore a heuristic that undercounts: a run that never re-reads its own
16
+ * instructions file is invisible.
22
17
  */
23
18
  import { promises as fs } from 'node:fs';
24
19
  import * as os from 'node:os';
@@ -27,10 +22,8 @@ import fg from 'fast-glob';
27
22
  import { aggregateRuns, buildRuns, normalizeSkillName, DEFAULT_IDLE_GAP_MS, DEFAULT_SPLIT_GAP_MS, } from './skill-metrics.js';
28
23
  const CODEX_HOME_DIR_NAME = '.codex';
29
24
  /**
30
- * Locates Codex's session tree. `CODEX_HOME` is honoured the same way
31
- * `CLAUDE_CONFIG_DIR` is for Claude Code; without it the default is
32
- * `~/.codex`. This is the directory to search, not a per-project one — Codex
33
- * has no equivalent of Claude Code's per-project transcript directory.
25
+ * Codex's session tree (`CODEX_HOME`, else `~/.codex`). The whole directory has
26
+ * to be searched: Codex has no per-project transcript directory.
34
27
  */
35
28
  export function resolveCodexSessionsDir(options = {}) {
36
29
  const env = options.env ?? process.env;
@@ -40,9 +33,8 @@ export function resolveCodexSessionsDir(options = {}) {
40
33
  return path.join(home, 'sessions');
41
34
  }
42
35
  /**
43
- * Whether a session's recorded working directory names the given project.
44
- * `null` (no `session_meta` seen, or no `cwd` field) never matches — a session
45
- * with nothing recorded cannot be attributed to any project.
36
+ * Whether a session's recorded working directory names the given project. `null`
37
+ * never matches: a session with nothing recorded belongs to no project.
46
38
  */
47
39
  export function sessionBelongsToProject(cwd, rootPath) {
48
40
  if (cwd === null)
@@ -52,11 +44,8 @@ export function sessionBelongsToProject(cwd, rootPath) {
52
44
  return process.platform === 'win32' ? a.toLowerCase() === b.toLowerCase() : a === b;
53
45
  }
54
46
  /**
55
- * The working directory a record records, or null when it is not the kind of
56
- * record that carries one. Shared by the full parse and the prefix probe so a
57
- * single statement defines a session's cwd — the first `session_meta` whose
58
- * `payload.cwd` is a string — and the probe can never disagree with the parse
59
- * it exists to skip.
47
+ * Shared by the full parse and the prefix probe, so the probe cannot disagree
48
+ * with the parse it exists to skip.
60
49
  */
61
50
  function recordedCwd(record) {
62
51
  if (record.type !== 'session_meta')
@@ -65,17 +54,11 @@ function recordedCwd(record) {
65
54
  return typeof cwd === 'string' ? cwd : null;
66
55
  }
67
56
  /**
68
- * Matches a tool-call command's text against a path ending in
69
- * `<skill-name>/SKILL.md`, on either separator. This is the one signal
70
- * confirmed to correlate with a skill actually being read, as opposed to
71
- * merely appearing in the session's fixed skill-listing text (see the module
72
- * docstring).
57
+ * A path ending in `<skill-name>/SKILL.md`, on either separator — the one signal
58
+ * that a skill was read rather than merely listed.
73
59
  *
74
- * `function_call` arguments are JSON-encoded twice — once as the tool-call
75
- * argument string itself, once more for the outer transcript line — so a
76
- * Windows path's single backslash separator survives as a doubled `\\` in the
77
- * text this matches against. The separator class therefore matches one or
78
- * more repetitions rather than exactly one.
60
+ * `function_call` arguments are JSON-encoded twice, so a Windows path's single
61
+ * backslash arrives doubled; hence `[\\/]+`.
79
62
  */
80
63
  const SKILL_MD_READ_PATTERN = /([^\\/"]+)[\\/]+SKILL\.md/i;
81
64
  function extractSkillFromCommandText(text) {
@@ -83,18 +66,13 @@ function extractSkillFromCommandText(text) {
83
66
  return match ? match[1] : null;
84
67
  }
85
68
  /**
86
- * Parses one Codex rollout `.jsonl` file into the recorded project directory
87
- * plus a sorted, timestamped, skill-labelled entry list — the same shape
88
- * `parseTranscript` produces for Claude Code, so `buildRuns`/`aggregateRuns`
89
- * apply unchanged (design.md D3). Malformed lines are skipped rather than
90
- * fatal, for the same reason Claude Code transcripts are: an append-only log
91
- * that can be torn at the tail while a session is live.
69
+ * Produces the same shape `parseTranscript` does for Claude Code, so
70
+ * `buildRuns`/`aggregateRuns` apply unchanged (D3). Malformed lines are skipped:
71
+ * an append-only log can be torn at the tail.
92
72
  *
93
- * Only `function_call`/`custom_tool_call` entries are ever inspected for a
94
- * `SKILL.md` read. Every other entry — including the one carrying the fixed
95
- * skill-listing text every session opens with — is folded in unattributed
96
- * (`skill: null`), exactly as an unattributed Claude Code entry is: it cannot
97
- * end a run, but it is not evidence a skill became active either.
73
+ * Only `function_call`/`custom_tool_call` entries are inspected for a `SKILL.md`
74
+ * read. Everything else — including the fixed skill-listing text every session
75
+ * opens with — is folded in unattributed.
98
76
  */
99
77
  export function parseCodexSession(text) {
100
78
  let cwd = null;
@@ -137,19 +115,11 @@ export function parseCodexSession(text) {
137
115
  entries.sort((a, b) => a.timeMs - b.timeMs);
138
116
  return { cwd, entries };
139
117
  }
140
- // -----------------------------------------------------------------------------
141
- // IO: project scoping without reading whole sessions
142
- // -----------------------------------------------------------------------------
143
118
  /**
144
- * Bytes read from a session when only its `cwd` is wanted.
145
- *
146
- * Codex writes `session_meta` as the very first line, but that line embeds the
147
- * session's whole base-instructions text and so runs to ~20 KB. The probe has
148
- * to be large enough to hold a *complete* line: a line cut by the read boundary
149
- * fails `JSON.parse` and is indistinguishable from an absent one. 64 KiB clears
150
- * the observed maximum several times over, and anything the probe cannot settle
151
- * falls back to a full read — so an unusually long first line costs time, never
152
- * correctness.
119
+ * Bytes read from a session when only its `cwd` is wanted. `session_meta` is the
120
+ * first line but embeds the whole base-instructions text (~20 KB), and the probe
121
+ * must hold a *complete* line — one cut by the read boundary fails `JSON.parse`
122
+ * and looks absent. Anything inconclusive falls back to a full read.
153
123
  */
154
124
  const CWD_PROBE_BYTES = 64 * 1024;
155
125
  /** First recorded cwd in already-read text, stopping at the first one found. */
@@ -171,15 +141,10 @@ function findRecordedCwd(text) {
171
141
  return null;
172
142
  }
173
143
  /**
174
- * Reads just enough of a session to decide which project it belongs to.
175
- *
176
- * Every session in the shared Codex tree has to be classified, but only the
177
- * matching ones are worth parsing, and on a real machine the tree is dominated
178
- * by other projects: the history that motivated this held 716 MB of sessions of
179
- * which one project owned 0.9 MB, and parsing all of it cost ~9 s of the
180
- * command's startup. Because the deciding field sits on line 0, reading a prefix
181
- * instead of the whole file makes the cost proportional to this project's share
182
- * of Codex history rather than to all of it.
144
+ * Reads just enough of a session to decide which project it belongs to. The
145
+ * shared tree is dominated by other projects — one real history held 716 MB of
146
+ * sessions of which this project owned 0.9 MB — and the deciding field sits on
147
+ * line 0, so a prefix read makes the cost proportional to this project's share.
183
148
  */
184
149
  async function probeSessionCwd(filePath) {
185
150
  const handle = await fs.open(filePath, 'r');
@@ -187,8 +152,8 @@ async function probeSessionCwd(filePath) {
187
152
  const buffer = Buffer.alloc(CWD_PROBE_BYTES);
188
153
  const { bytesRead } = await handle.read(buffer, 0, CWD_PROBE_BYTES, 0);
189
154
  const cwd = findRecordedCwd(buffer.subarray(0, bytesRead).toString('utf8'));
190
- // A short read means the prefix was the entire file, so "no session_meta
191
- // here" is the final answer rather than a reason to read it again.
155
+ // A short read means the prefix was the whole file, so "no session_meta
156
+ // here" is final rather than a reason to read it again.
192
157
  return { cwd, conclusive: cwd !== null || bytesRead < CWD_PROBE_BYTES };
193
158
  }
194
159
  finally {
@@ -196,18 +161,14 @@ async function probeSessionCwd(filePath) {
196
161
  }
197
162
  }
198
163
  /**
199
- * Finds and parses every Codex session belonging to one project.
200
- *
201
- * Shared by `collectCodexSkillMetrics` and the metrics server, which need
202
- * exactly this and previously each carried their own copy of the walk — so the
203
- * probe optimisation could otherwise have been applied to one and not the other.
164
+ * Finds and parses every Codex session belonging to one project. Shared by
165
+ * `collectCodexSkillMetrics` and the metrics server, so the probe reaches both.
204
166
  */
205
167
  export async function scanCodexSessions(rootPath, options = {}) {
206
168
  const sessionsDir = resolveCodexSessionsDir(options);
207
169
  // fast-glob returns an empty list for a missing `cwd` rather than throwing,
208
- // so existence has to be checked directly — otherwise "Codex never used on
209
- // this machine" (available: false) would be indistinguishable from "used,
210
- // but nothing here matches this project" (available: true, sessions: 0).
170
+ // so without this check "Codex never ran here" and "ran, but nothing matches
171
+ // this project" look identical.
211
172
  const stat = await fs.stat(sessionsDir).catch(() => null);
212
173
  if (!stat)
213
174
  return { sessionsDir, available: false, sessions: [] };
@@ -218,8 +179,7 @@ export async function scanCodexSessions(rootPath, options = {}) {
218
179
  const probe = await probeSessionCwd(filePath);
219
180
  if (probe.conclusive && !sessionBelongsToProject(probe.cwd, rootPath))
220
181
  continue;
221
- // The probe only ever skips work; the full parse stays authoritative for
222
- // every session that survives it.
182
+ // The probe only skips work; the full parse stays authoritative.
223
183
  const { cwd, entries } = parseCodexSession(await fs.readFile(filePath, 'utf8'));
224
184
  if (!sessionBelongsToProject(cwd, rootPath))
225
185
  continue;
@@ -233,13 +193,9 @@ export async function scanCodexSessions(rootPath, options = {}) {
233
193
  return { sessionsDir, available: true, sessions };
234
194
  }
235
195
  /**
236
- * Derives skill timings from the `SKILL.md`-read heuristic over this project's
237
- * Codex sessions — the Codex-flavoured equivalent of `collectSkillMetrics`.
238
- * `scanCodexSessions` does the finding and scoping.
239
- *
240
- * A missing sessions directory is a reportable state (`available: false`), not
241
- * an error, for the same reason it is for Claude Code: the project may simply
242
- * never have been opened in Codex.
196
+ * The Codex equivalent of `collectSkillMetrics`, over the `SKILL.md`-read
197
+ * heuristic. A missing sessions directory is a reportable state
198
+ * (`available: false`), not an error.
243
199
  */
244
200
  export async function collectCodexSkillMetrics(rootPath, options = {}) {
245
201
  const thresholds = {
@@ -1 +1 @@
1
- {"version":3,"file":"codex-metrics.js","sourceRoot":"","sources":["../../src/core/codex-metrics.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,EAAE,QAAQ,IAAI,EAAE,EAAE,MAAM,SAAS,CAAC;AACzC,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,MAAM,WAAW,CAAC;AAE3B,OAAO,EACL,aAAa,EACb,SAAS,EACT,kBAAkB,EAClB,mBAAmB,EACnB,oBAAoB,GAMrB,MAAM,oBAAoB,CAAC;AAE5B,MAAM,mBAAmB,GAAG,QAAQ,CAAC;AAWrC;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;QAC9B,IAAI,EAAE,OAAO;KACd,CAAC;AACJ,CAAC"}
@@ -1,23 +1,22 @@
1
1
  /**
2
- * Residual Codex Output Detection
3
- *
4
2
  * `.codex` was a write target until Codex turned out to read its skills from
5
- * `.agents`. Projects initialized by an earlier version still hold that output.
6
- *
7
- * This module answers one question and holds no writer: rule files are content
8
- * hash-protected precisely because users edit them, so anything that could
9
- * delete them must not exist here. Removing leftovers stays the user's call.
3
+ * `.agents`, and projects initialized by an earlier version still hold that
4
+ * output. Read-only by design: rule files are content hash-protected precisely
5
+ * because users edit them, so removing leftovers stays the user's call.
10
6
  */
11
7
  /**
12
8
  * Whether `<projectPath>/.codex` still holds tospec output: a `tospec-` skill
13
- * directory, or a file under `rules/tospec/`. Either alone is enough — a user
14
- * who cleaned up one half should still hear about the other.
15
- *
16
- * Both halves match only what tospec itself writes. The directory merely
17
- * existing is not enough: a project that only ever kept its own Codex settings
18
- * there would otherwise be told to delete them.
9
+ * directory, or a file under `rules/tospec/`. Either alone is enough. Both
10
+ * halves match only what tospec writes, so a project keeping its own Codex
11
+ * settings is not told to delete them.
19
12
  */
20
13
  export declare function hasResidualCodexOutput(projectPath: string): boolean;
21
- /** Shared by init and update so neither can report what the other suppresses. */
22
- export declare const RESIDUAL_CODEX_NOTICE = "Note: .codex/ still holds tospec output from an earlier version. tospec no longer writes there \u2014 Codex reads skills from .agents/. Removing .codex/skills/tospec-* and .codex/rules/tospec/ is optional and entirely up to you; tospec will not touch them.";
14
+ /**
15
+ * Shared by init and update so neither can report what the other suppresses.
16
+ * Split into message and fix because both commands carry it through their
17
+ * `warn` helper: under `--json` a `say()` line is dropped, and the leftover
18
+ * would be reported to a human and hidden from an agent.
19
+ */
20
+ export declare const RESIDUAL_CODEX_NOTICE = ".codex/ still holds tospec output from an earlier version. tospec no longer writes there \u2014 Codex reads skills from .agents/.";
21
+ export declare const RESIDUAL_CODEX_FIX = "Removing .codex/skills/tospec-* and .codex/rules/tospec/ is optional and entirely up to you; tospec will not touch them.";
23
22
  //# sourceMappingURL=codex-residue.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"codex-residue.d.ts","sourceRoot":"","sources":["../../src/core/codex-residue.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AA2CH;;;;;;;;GAQG;AACH,wBAAgB,sBAAsB,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAGnE;AAED,iFAAiF;AACjF,eAAO,MAAM,qBAAqB,qQAC6N,CAAC"}
1
+ {"version":3,"file":"codex-residue.d.ts","sourceRoot":"","sources":["../../src/core/codex-residue.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAwCH;;;;;GAKG;AACH,wBAAgB,sBAAsB,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAGnE;AAED;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB,sIAC8F,CAAC;AACjI,eAAO,MAAM,kBAAkB,6HAC6F,CAAC"}
@@ -1,12 +1,8 @@
1
1
  /**
2
- * Residual Codex Output Detection
3
- *
4
2
  * `.codex` was a write target until Codex turned out to read its skills from
5
- * `.agents`. Projects initialized by an earlier version still hold that output.
6
- *
7
- * This module answers one question and holds no writer: rule files are content
8
- * hash-protected precisely because users edit them, so anything that could
9
- * delete them must not exist here. Removing leftovers stays the user's call.
3
+ * `.agents`, and projects initialized by an earlier version still hold that
4
+ * output. Read-only by design: rule files are content hash-protected precisely
5
+ * because users edit them, so removing leftovers stays the user's call.
10
6
  */
11
7
  import path from 'node:path';
12
8
  import * as fs from 'node:fs';
@@ -26,13 +22,10 @@ function hasTospecSkillDir(codexDir) {
26
22
  }
27
23
  }
28
24
  /**
29
- * Scoped to `rules/tospec/` rather than all of `rules/`, for the same reason
30
- * the skill check is scoped to the `tospec-` prefix: `writeToolRules` only ever
31
- * writes under that subdirectory, and the notice tells the user to delete
32
- * exactly it. Scanning the whole tree made a project's own
33
- * `.codex/rules/team-style.md` trigger a notice claiming tospec had put it
34
- * there — the very mistake this module's docstring warns against one paragraph
35
- * down. Still recursive, so a nested layout from an older version counts.
25
+ * Scoped to `rules/tospec/`, not all of `rules/`: generation only writes under
26
+ * that subdirectory, so scanning the whole tree makes a project's own
27
+ * `.codex/rules/team-style.md` trigger a notice claiming tospec put it there.
28
+ * Still recursive, so a nested layout from an older version counts.
36
29
  */
37
30
  function hasTospecRuleFile(codexDir) {
38
31
  try {
@@ -49,17 +42,20 @@ function hasTospecRuleFile(codexDir) {
49
42
  }
50
43
  /**
51
44
  * Whether `<projectPath>/.codex` still holds tospec output: a `tospec-` skill
52
- * directory, or a file under `rules/tospec/`. Either alone is enough — a user
53
- * who cleaned up one half should still hear about the other.
54
- *
55
- * Both halves match only what tospec itself writes. The directory merely
56
- * existing is not enough: a project that only ever kept its own Codex settings
57
- * there would otherwise be told to delete them.
45
+ * directory, or a file under `rules/tospec/`. Either alone is enough. Both
46
+ * halves match only what tospec writes, so a project keeping its own Codex
47
+ * settings is not told to delete them.
58
48
  */
59
49
  export function hasResidualCodexOutput(projectPath) {
60
50
  const codexDir = path.join(projectPath, CODEX_DIR);
61
51
  return hasTospecSkillDir(codexDir) || hasTospecRuleFile(codexDir);
62
52
  }
63
- /** Shared by init and update so neither can report what the other suppresses. */
64
- export const RESIDUAL_CODEX_NOTICE = 'Note: .codex/ still holds tospec output from an earlier version. tospec no longer writes there — Codex reads skills from .agents/. Removing .codex/skills/tospec-* and .codex/rules/tospec/ is optional and entirely up to you; tospec will not touch them.';
53
+ /**
54
+ * Shared by init and update so neither can report what the other suppresses.
55
+ * Split into message and fix because both commands carry it through their
56
+ * `warn` helper: under `--json` a `say()` line is dropped, and the leftover
57
+ * would be reported to a human and hidden from an agent.
58
+ */
59
+ export const RESIDUAL_CODEX_NOTICE = '.codex/ still holds tospec output from an earlier version. tospec no longer writes there — Codex reads skills from .agents/.';
60
+ export const RESIDUAL_CODEX_FIX = 'Removing .codex/skills/tospec-* and .codex/rules/tospec/ is optional and entirely up to you; tospec will not touch them.';
65
61
  //# sourceMappingURL=codex-residue.js.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ACP,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,sBAAsB,CAAC,WAAmB;IACxD,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,SAAS,CAAC,CAAC;IACnD,OAAO,iBAAiB,CAAC,QAAQ,CAAC,IAAI,iBAAiB,CAAC,QAAQ,CAAC,CAAC;AACpE,CAAC;AAED;;;;;GAKG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAChC,8HAA8H,CAAC;AACjI,MAAM,CAAC,MAAM,kBAAkB,GAC7B,0HAA0H,CAAC"}
@@ -1,14 +1,7 @@
1
- /**
2
- * Claude Code Command Adapter
3
- *
4
- * Formats commands for Claude Code following its frontmatter specification.
5
- */
6
1
  import type { ToolCommandAdapter } from '../types.js';
7
2
  /**
8
- * Claude Code adapter for command generation.
9
- * File path: .claude/commands/tosx/<id>.md — the `tosx` sub-folder becomes the
10
- * command namespace, so commands are invoked as `/tosx:<id>`.
11
- * Frontmatter: name, description, category, tags
3
+ * The `tosx` sub-folder becomes the command namespace, so what lands at
4
+ * `.claude/commands/tosx/<id>.md` is invoked as `/tosx:<id>`.
12
5
  */
13
6
  export declare const claudeAdapter: ToolCommandAdapter;
14
7
  //# sourceMappingURL=claude.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"claude.d.ts","sourceRoot":"","sources":["../../../../src/core/command-generation/adapters/claude.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,KAAK,EAAkB,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAWtE;;;;;GAKG;AACH,eAAO,MAAM,aAAa,EAAE,kBAkB3B,CAAC"}
1
+ {"version":3,"file":"claude.d.ts","sourceRoot":"","sources":["../../../../src/core/command-generation/adapters/claude.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAkB,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAQtE;;;GAGG;AACH,eAAO,MAAM,aAAa,EAAE,kBAkB3B,CAAC"}
@@ -1,22 +1,12 @@
1
- /**
2
- * Claude Code Command Adapter
3
- *
4
- * Formats commands for Claude Code following its frontmatter specification.
5
- */
6
1
  import path from 'path';
7
2
  import { escapeYamlValue } from '../yaml.js';
8
- /**
9
- * Formats a tags array as a YAML array with proper escaping.
10
- */
11
3
  function formatTagsArray(tags) {
12
4
  const escapedTags = tags.map((tag) => escapeYamlValue(tag));
13
5
  return `[${escapedTags.join(', ')}]`;
14
6
  }
15
7
  /**
16
- * Claude Code adapter for command generation.
17
- * File path: .claude/commands/tosx/<id>.md — the `tosx` sub-folder becomes the
18
- * command namespace, so commands are invoked as `/tosx:<id>`.
19
- * Frontmatter: name, description, category, tags
8
+ * The `tosx` sub-folder becomes the command namespace, so what lands at
9
+ * `.claude/commands/tosx/<id>.md` is invoked as `/tosx:<id>`.
20
10
  */
21
11
  export const claudeAdapter = {
22
12
  toolId: 'claude',
@@ -1 +1 @@
1
- {"version":3,"file":"claude.js","sourceRoot":"","sources":["../../../../src/core/command-generation/adapters/claude.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAE7C;;GAEG;AACH,SAAS,eAAe,CAAC,IAAc;IACrC,MAAM,WAAW,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,eAAe,CAAC,GAAG,CAAC,CAAC,CAAC;IAC5D,OAAO,IAAI,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC;AACvC,CAAC;AAED;;;;;GAKG;AACH,MAAM,CAAC,MAAM,aAAa,GAAuB;IAC/C,MAAM,EAAE,QAAQ;IAEhB,WAAW,CAAC,SAAiB;QAC3B,OAAO,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,UAAU,EAAE,MAAM,EAAE,GAAG,SAAS,KAAK,CAAC,CAAC;IACrE,CAAC;IAED,UAAU,CAAC,OAAuB;QAChC,OAAO;QACH,eAAe,CAAC,OAAO,CAAC,IAAI,CAAC;eACtB,eAAe,CAAC,OAAO,CAAC,WAAW,CAAC;YACvC,eAAe,CAAC,OAAO,CAAC,QAAQ,CAAC;QACrC,eAAe,CAAC,OAAO,CAAC,IAAI,CAAC;;;EAGnC,OAAO,CAAC,IAAI;CACb,CAAC;IACA,CAAC;CACF,CAAC"}
1
+ {"version":3,"file":"claude.js","sourceRoot":"","sources":["../../../../src/core/command-generation/adapters/claude.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAE7C,SAAS,eAAe,CAAC,IAAc;IACrC,MAAM,WAAW,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,eAAe,CAAC,GAAG,CAAC,CAAC,CAAC;IAC5D,OAAO,IAAI,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC;AACvC,CAAC;AAED;;;GAGG;AACH,MAAM,CAAC,MAAM,aAAa,GAAuB;IAC/C,MAAM,EAAE,QAAQ;IAEhB,WAAW,CAAC,SAAiB;QAC3B,OAAO,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,UAAU,EAAE,MAAM,EAAE,GAAG,SAAS,KAAK,CAAC,CAAC;IACrE,CAAC;IAED,UAAU,CAAC,OAAuB;QAChC,OAAO;QACH,eAAe,CAAC,OAAO,CAAC,IAAI,CAAC;eACtB,eAAe,CAAC,OAAO,CAAC,WAAW,CAAC;YACvC,eAAe,CAAC,OAAO,CAAC,QAAQ,CAAC;QACrC,eAAe,CAAC,OAAO,CAAC,IAAI,CAAC;;;EAGnC,OAAO,CAAC,IAAI;CACb,CAAC;IACA,CAAC;CACF,CAAC"}
@@ -1,15 +1,7 @@
1
- /**
2
- * Command Adapters Index
3
- *
4
- * Re-exports the tool command adapters tospec ships (claude only).
5
- */
6
1
  import type { ToolCommandAdapter } from '../types.js';
7
2
  import { claudeAdapter } from './claude.js';
8
3
  export { claudeAdapter };
9
- /**
10
- * The adapter registry. Adding a tool means adding it here — callers resolve by
11
- * `toolId` rather than testing the tool name, so no generation code changes.
12
- */
4
+ /** Adding a tool means adding it here; callers resolve by `toolId`. */
13
5
  export declare const COMMAND_ADAPTERS: readonly ToolCommandAdapter[];
14
6
  export declare function findCommandAdapter(toolId: string): ToolCommandAdapter | undefined;
15
7
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/core/command-generation/adapters/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE5C,OAAO,EAAE,aAAa,EAAE,CAAC;AAEzB;;;GAGG;AACH,eAAO,MAAM,gBAAgB,EAAE,SAAS,kBAAkB,EAAoB,CAAC;AAE/E,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,GAAG,kBAAkB,GAAG,SAAS,CAEjF"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/core/command-generation/adapters/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE5C,OAAO,EAAE,aAAa,EAAE,CAAC;AAEzB,uEAAuE;AACvE,eAAO,MAAM,gBAAgB,EAAE,SAAS,kBAAkB,EAAoB,CAAC;AAE/E,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,GAAG,kBAAkB,GAAG,SAAS,CAEjF"}
@@ -1,14 +1,6 @@
1
- /**
2
- * Command Adapters Index
3
- *
4
- * Re-exports the tool command adapters tospec ships (claude only).
5
- */
6
1
  import { claudeAdapter } from './claude.js';
7
2
  export { claudeAdapter };
8
- /**
9
- * The adapter registry. Adding a tool means adding it here — callers resolve by
10
- * `toolId` rather than testing the tool name, so no generation code changes.
11
- */
3
+ /** Adding a tool means adding it here; callers resolve by `toolId`. */
12
4
  export const COMMAND_ADAPTERS = [claudeAdapter];
13
5
  export function findCommandAdapter(toolId) {
14
6
  return COMMAND_ADAPTERS.find((adapter) => adapter.toolId === toolId);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/core/command-generation/adapters/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE5C,OAAO,EAAE,aAAa,EAAE,CAAC;AAEzB;;;GAGG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAkC,CAAC,aAAa,CAAC,CAAC;AAE/E,MAAM,UAAU,kBAAkB,CAAC,MAAc;IAC/C,OAAO,gBAAgB,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,MAAM,KAAK,MAAM,CAAC,CAAC;AACvE,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/core/command-generation/adapters/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE5C,OAAO,EAAE,aAAa,EAAE,CAAC;AAEzB,uEAAuE;AACvE,MAAM,CAAC,MAAM,gBAAgB,GAAkC,CAAC,aAAa,CAAC,CAAC;AAE/E,MAAM,UAAU,kBAAkB,CAAC,MAAc;IAC/C,OAAO,gBAAgB,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,MAAM,KAAK,MAAM,CAAC,CAAC;AACvE,CAAC"}
@@ -1,21 +1,4 @@
1
- /**
2
- * Command Generator
3
- *
4
- * Functions for generating command files using tool adapters.
5
- */
6
1
  import type { CommandContent, ToolCommandAdapter, GeneratedCommand } from './types.js';
7
- /**
8
- * Generate a single command file using the provided adapter.
9
- * @param content - The tool-agnostic command content
10
- * @param adapter - The tool-specific adapter
11
- * @returns Generated command with path and file content
12
- */
13
2
  export declare function generateCommand(content: CommandContent, adapter: ToolCommandAdapter): GeneratedCommand;
14
- /**
15
- * Generate multiple command files using the provided adapter.
16
- * @param contents - Array of tool-agnostic command contents
17
- * @param adapter - The tool-specific adapter
18
- * @returns Array of generated commands with paths and file contents
19
- */
20
3
  export declare function generateCommands(contents: CommandContent[], adapter: ToolCommandAdapter): GeneratedCommand[];
21
4
  //# sourceMappingURL=generator.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"generator.d.ts","sourceRoot":"","sources":["../../../src/core/command-generation/generator.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAEvF;;;;;GAKG;AACH,wBAAgB,eAAe,CAC7B,OAAO,EAAE,cAAc,EACvB,OAAO,EAAE,kBAAkB,GAC1B,gBAAgB,CAKlB;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAC9B,QAAQ,EAAE,cAAc,EAAE,EAC1B,OAAO,EAAE,kBAAkB,GAC1B,gBAAgB,EAAE,CAEpB"}
1
+ {"version":3,"file":"generator.d.ts","sourceRoot":"","sources":["../../../src/core/command-generation/generator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAEvF,wBAAgB,eAAe,CAC7B,OAAO,EAAE,cAAc,EACvB,OAAO,EAAE,kBAAkB,GAC1B,gBAAgB,CAKlB;AAED,wBAAgB,gBAAgB,CAC9B,QAAQ,EAAE,cAAc,EAAE,EAC1B,OAAO,EAAE,kBAAkB,GAC1B,gBAAgB,EAAE,CAEpB"}
@@ -1,26 +1,9 @@
1
- /**
2
- * Command Generator
3
- *
4
- * Functions for generating command files using tool adapters.
5
- */
6
- /**
7
- * Generate a single command file using the provided adapter.
8
- * @param content - The tool-agnostic command content
9
- * @param adapter - The tool-specific adapter
10
- * @returns Generated command with path and file content
11
- */
12
1
  export function generateCommand(content, adapter) {
13
2
  return {
14
3
  path: adapter.getFilePath(content.id),
15
4
  fileContent: adapter.formatFile(content),
16
5
  };
17
6
  }
18
- /**
19
- * Generate multiple command files using the provided adapter.
20
- * @param contents - Array of tool-agnostic command contents
21
- * @param adapter - The tool-specific adapter
22
- * @returns Array of generated commands with paths and file contents
23
- */
24
7
  export function generateCommands(contents, adapter) {
25
8
  return contents.map((content) => generateCommand(content, adapter));
26
9
  }
@@ -1 +1 @@
1
- {"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../src/core/command-generation/generator.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH;;;;;GAKG;AACH,MAAM,UAAU,eAAe,CAC7B,OAAuB,EACvB,OAA2B;IAE3B,OAAO;QACL,IAAI,EAAE,OAAO,CAAC,WAAW,CAAC,OAAO,CAAC,EAAE,CAAC;QACrC,WAAW,EAAE,OAAO,CAAC,UAAU,CAAC,OAAO,CAAC;KACzC,CAAC;AACJ,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,gBAAgB,CAC9B,QAA0B,EAC1B,OAA2B;IAE3B,OAAO,QAAQ,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,eAAe,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC;AACtE,CAAC"}
1
+ {"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../src/core/command-generation/generator.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,eAAe,CAC7B,OAAuB,EACvB,OAA2B;IAE3B,OAAO;QACL,IAAI,EAAE,OAAO,CAAC,WAAW,CAAC,OAAO,CAAC,EAAE,CAAC;QACrC,WAAW,EAAE,OAAO,CAAC,UAAU,CAAC,OAAO,CAAC;KACzC,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,gBAAgB,CAC9B,QAA0B,EAC1B,OAA2B;IAE3B,OAAO,QAAQ,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,eAAe,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC;AACtE,CAAC"}
@@ -1,9 +1,6 @@
1
1
  /**
2
- * Command Generation Module
3
- *
4
- * Generic command generation with a tool adapter. Claude Code is the only
5
- * shipped adapter today; add a tool by writing an adapter in adapters/ and
6
- * registering it in COMMAND_ADAPTERS — callers resolve it by toolId.
2
+ * Command generation through a tool adapter. Claude Code is the only shipped
3
+ * one; add a tool by writing an adapter and registering it in COMMAND_ADAPTERS.
7
4
  */
8
5
  export type { CommandContent, ToolCommandAdapter, GeneratedCommand, } from './types.js';
9
6
  export { generateCommand, generateCommands } from './generator.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/core/command-generation/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,YAAY,EACV,cAAc,EACd,kBAAkB,EAClB,gBAAgB,GACjB,MAAM,YAAY,CAAC;AAGpB,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAGnE,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/core/command-generation/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,YAAY,EACV,cAAc,EACd,kBAAkB,EAClB,gBAAgB,GACjB,MAAM,YAAY,CAAC;AAEpB,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAEnE,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC"}
@@ -1,12 +1,3 @@
1
- /**
2
- * Command Generation Module
3
- *
4
- * Generic command generation with a tool adapter. Claude Code is the only
5
- * shipped adapter today; add a tool by writing an adapter in adapters/ and
6
- * registering it in COMMAND_ADAPTERS — callers resolve it by toolId.
7
- */
8
- // Generator functions
9
1
  export { generateCommand, generateCommands } from './generator.js';
10
- // Adapters
11
2
  export { claudeAdapter, COMMAND_ADAPTERS, findCommandAdapter } from './adapters/index.js';
12
3
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/core/command-generation/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AASH,sBAAsB;AACtB,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAEnE,WAAW;AACX,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/core/command-generation/index.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAEnE,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC"}