@seanmars/tospec 0.19.0-beta.1 → 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 (428) hide show
  1. package/CHANGELOG.md +530 -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/rules/tospec/decision.md +3 -0
  6. package/assets/rules/tospec/single-source-of-truth.md +19 -0
  7. package/dist/cli/index.d.ts.map +1 -1
  8. package/dist/cli/index.js +254 -83
  9. package/dist/cli/index.js.map +1 -1
  10. package/dist/commands/config.d.ts +9 -17
  11. package/dist/commands/config.d.ts.map +1 -1
  12. package/dist/commands/config.js +374 -98
  13. package/dist/commands/config.js.map +1 -1
  14. package/dist/commands/dashboard.d.ts +64 -81
  15. package/dist/commands/dashboard.d.ts.map +1 -1
  16. package/dist/commands/dashboard.js +346 -230
  17. package/dist/commands/dashboard.js.map +1 -1
  18. package/dist/commands/decision.d.ts +41 -19
  19. package/dist/commands/decision.d.ts.map +1 -1
  20. package/dist/commands/decision.js +400 -70
  21. package/dist/commands/decision.js.map +1 -1
  22. package/dist/commands/metrics.d.ts +28 -51
  23. package/dist/commands/metrics.d.ts.map +1 -1
  24. package/dist/commands/metrics.js +69 -85
  25. package/dist/commands/metrics.js.map +1 -1
  26. package/dist/commands/shared-output.d.ts +18 -21
  27. package/dist/commands/shared-output.d.ts.map +1 -1
  28. package/dist/commands/shared-output.js +49 -23
  29. package/dist/commands/shared-output.js.map +1 -1
  30. package/dist/commands/show.d.ts +7 -0
  31. package/dist/commands/show.d.ts.map +1 -1
  32. package/dist/commands/show.js +39 -8
  33. package/dist/commands/show.js.map +1 -1
  34. package/dist/commands/validate.d.ts +47 -30
  35. package/dist/commands/validate.d.ts.map +1 -1
  36. package/dist/commands/validate.js +282 -108
  37. package/dist/commands/validate.js.map +1 -1
  38. package/dist/commands/workflow/index.d.ts +6 -10
  39. package/dist/commands/workflow/index.d.ts.map +1 -1
  40. package/dist/commands/workflow/index.js +6 -10
  41. package/dist/commands/workflow/index.js.map +1 -1
  42. package/dist/commands/workflow/instructions.d.ts +21 -8
  43. package/dist/commands/workflow/instructions.d.ts.map +1 -1
  44. package/dist/commands/workflow/instructions.js +254 -95
  45. package/dist/commands/workflow/instructions.js.map +1 -1
  46. package/dist/commands/workflow/new-change.d.ts +4 -5
  47. package/dist/commands/workflow/new-change.d.ts.map +1 -1
  48. package/dist/commands/workflow/new-change.js +90 -25
  49. package/dist/commands/workflow/new-change.js.map +1 -1
  50. package/dist/commands/workflow/schemas.d.ts +3 -5
  51. package/dist/commands/workflow/schemas.d.ts.map +1 -1
  52. package/dist/commands/workflow/schemas.js +37 -11
  53. package/dist/commands/workflow/schemas.js.map +1 -1
  54. package/dist/commands/workflow/shared.d.ts +48 -21
  55. package/dist/commands/workflow/shared.d.ts.map +1 -1
  56. package/dist/commands/workflow/shared.js +36 -33
  57. package/dist/commands/workflow/shared.js.map +1 -1
  58. package/dist/commands/workflow/status.d.ts +10 -6
  59. package/dist/commands/workflow/status.d.ts.map +1 -1
  60. package/dist/commands/workflow/status.js +84 -42
  61. package/dist/commands/workflow/status.js.map +1 -1
  62. package/dist/commands/workflow/templates.d.ts +10 -3
  63. package/dist/commands/workflow/templates.d.ts.map +1 -1
  64. package/dist/commands/workflow/templates.js +39 -40
  65. package/dist/commands/workflow/templates.js.map +1 -1
  66. package/dist/core/archive.d.ts +26 -21
  67. package/dist/core/archive.d.ts.map +1 -1
  68. package/dist/core/archive.js +386 -205
  69. package/dist/core/archive.js.map +1 -1
  70. package/dist/core/artifact-graph/graph.d.ts +29 -36
  71. package/dist/core/artifact-graph/graph.d.ts.map +1 -1
  72. package/dist/core/artifact-graph/graph.js +50 -58
  73. package/dist/core/artifact-graph/graph.js.map +1 -1
  74. package/dist/core/artifact-graph/index.d.ts +1 -1
  75. package/dist/core/artifact-graph/index.d.ts.map +1 -1
  76. package/dist/core/artifact-graph/index.js +1 -1
  77. package/dist/core/artifact-graph/index.js.map +1 -1
  78. package/dist/core/artifact-graph/instruction-loader.d.ts +105 -100
  79. package/dist/core/artifact-graph/instruction-loader.d.ts.map +1 -1
  80. package/dist/core/artifact-graph/instruction-loader.js +176 -110
  81. package/dist/core/artifact-graph/instruction-loader.js.map +1 -1
  82. package/dist/core/artifact-graph/outputs.d.ts +11 -14
  83. package/dist/core/artifact-graph/outputs.d.ts.map +1 -1
  84. package/dist/core/artifact-graph/outputs.js +47 -29
  85. package/dist/core/artifact-graph/outputs.js.map +1 -1
  86. package/dist/core/artifact-graph/resolver.d.ts +44 -63
  87. package/dist/core/artifact-graph/resolver.d.ts.map +1 -1
  88. package/dist/core/artifact-graph/resolver.js +85 -86
  89. package/dist/core/artifact-graph/resolver.js.map +1 -1
  90. package/dist/core/artifact-graph/schema.d.ts +0 -6
  91. package/dist/core/artifact-graph/schema.d.ts.map +1 -1
  92. package/dist/core/artifact-graph/schema.js +7 -32
  93. package/dist/core/artifact-graph/schema.js.map +1 -1
  94. package/dist/core/artifact-graph/state.d.ts +1 -8
  95. package/dist/core/artifact-graph/state.d.ts.map +1 -1
  96. package/dist/core/artifact-graph/state.js +2 -17
  97. package/dist/core/artifact-graph/state.js.map +1 -1
  98. package/dist/core/artifact-graph/stub-detection.d.ts +12 -0
  99. package/dist/core/artifact-graph/stub-detection.d.ts.map +1 -0
  100. package/dist/core/artifact-graph/stub-detection.js +39 -0
  101. package/dist/core/artifact-graph/stub-detection.js.map +1 -0
  102. package/dist/core/artifact-graph/types.d.ts +4 -0
  103. package/dist/core/artifact-graph/types.d.ts.map +1 -1
  104. package/dist/core/artifact-graph/types.js +30 -10
  105. package/dist/core/artifact-graph/types.js.map +1 -1
  106. package/dist/core/available-tools.d.ts +3 -12
  107. package/dist/core/available-tools.d.ts.map +1 -1
  108. package/dist/core/available-tools.js +4 -13
  109. package/dist/core/available-tools.js.map +1 -1
  110. package/dist/core/change-metadata/schema.d.ts +1 -1
  111. package/dist/core/change-metadata/schema.d.ts.map +1 -1
  112. package/dist/core/change-metadata/schema.js +10 -7
  113. package/dist/core/change-metadata/schema.js.map +1 -1
  114. package/dist/core/change-presenter.d.ts +23 -18
  115. package/dist/core/change-presenter.d.ts.map +1 -1
  116. package/dist/core/change-presenter.js +102 -43
  117. package/dist/core/change-presenter.js.map +1 -1
  118. package/dist/core/change-status-policy.d.ts +8 -1
  119. package/dist/core/change-status-policy.d.ts.map +1 -1
  120. package/dist/core/change-status-policy.js +25 -1
  121. package/dist/core/change-status-policy.js.map +1 -1
  122. package/dist/core/codex-metrics.d.ts +25 -45
  123. package/dist/core/codex-metrics.d.ts.map +1 -1
  124. package/dist/core/codex-metrics.js +44 -88
  125. package/dist/core/codex-metrics.js.map +1 -1
  126. package/dist/core/codex-residue.d.ts +22 -0
  127. package/dist/core/codex-residue.d.ts.map +1 -0
  128. package/dist/core/codex-residue.js +61 -0
  129. package/dist/core/codex-residue.js.map +1 -0
  130. package/dist/core/command-generation/adapters/claude.d.ts +2 -9
  131. package/dist/core/command-generation/adapters/claude.d.ts.map +1 -1
  132. package/dist/core/command-generation/adapters/claude.js +2 -12
  133. package/dist/core/command-generation/adapters/claude.js.map +1 -1
  134. package/dist/core/command-generation/adapters/index.d.ts +1 -9
  135. package/dist/core/command-generation/adapters/index.d.ts.map +1 -1
  136. package/dist/core/command-generation/adapters/index.js +1 -9
  137. package/dist/core/command-generation/adapters/index.js.map +1 -1
  138. package/dist/core/command-generation/generator.d.ts +0 -17
  139. package/dist/core/command-generation/generator.d.ts.map +1 -1
  140. package/dist/core/command-generation/generator.js +0 -17
  141. package/dist/core/command-generation/generator.js.map +1 -1
  142. package/dist/core/command-generation/index.d.ts +2 -5
  143. package/dist/core/command-generation/index.d.ts.map +1 -1
  144. package/dist/core/command-generation/index.js +0 -9
  145. package/dist/core/command-generation/index.js.map +1 -1
  146. package/dist/core/command-generation/types.d.ts +10 -36
  147. package/dist/core/command-generation/types.d.ts.map +1 -1
  148. package/dist/core/command-generation/types.js +0 -6
  149. package/dist/core/command-generation/types.js.map +1 -1
  150. package/dist/core/command-generation/yaml.d.ts +3 -18
  151. package/dist/core/command-generation/yaml.d.ts.map +1 -1
  152. package/dist/core/command-generation/yaml.js +5 -23
  153. package/dist/core/command-generation/yaml.js.map +1 -1
  154. package/dist/core/config-prompts.d.ts +2 -4
  155. package/dist/core/config-prompts.d.ts.map +1 -1
  156. package/dist/core/config-prompts.js +2 -7
  157. package/dist/core/config-prompts.js.map +1 -1
  158. package/dist/core/config-schema.d.ts +8 -53
  159. package/dist/core/config-schema.d.ts.map +1 -1
  160. package/dist/core/config-schema.js +49 -62
  161. package/dist/core/config-schema.js.map +1 -1
  162. package/dist/core/config.d.ts +56 -0
  163. package/dist/core/config.d.ts.map +1 -1
  164. package/dist/core/config.js +73 -2
  165. package/dist/core/config.js.map +1 -1
  166. package/dist/core/converters/json-converter.d.ts.map +1 -1
  167. package/dist/core/dashboard-activity.d.ts +7 -9
  168. package/dist/core/dashboard-activity.d.ts.map +1 -1
  169. package/dist/core/dashboard-activity.js +26 -24
  170. package/dist/core/dashboard-activity.js.map +1 -1
  171. package/dist/core/dashboard-data.d.ts +40 -22
  172. package/dist/core/dashboard-data.d.ts.map +1 -1
  173. package/dist/core/dashboard-data.js +62 -70
  174. package/dist/core/dashboard-data.js.map +1 -1
  175. package/dist/core/global-config.d.ts +24 -53
  176. package/dist/core/global-config.d.ts.map +1 -1
  177. package/dist/core/global-config.js +38 -67
  178. package/dist/core/global-config.js.map +1 -1
  179. package/dist/core/init.d.ts +29 -11
  180. package/dist/core/init.d.ts.map +1 -1
  181. package/dist/core/init.js +232 -164
  182. package/dist/core/init.js.map +1 -1
  183. package/dist/core/list.d.ts +1 -1
  184. package/dist/core/list.d.ts.map +1 -1
  185. package/dist/core/list.js +121 -28
  186. package/dist/core/list.js.map +1 -1
  187. package/dist/core/local-server.d.ts +60 -50
  188. package/dist/core/local-server.d.ts.map +1 -1
  189. package/dist/core/local-server.js +94 -66
  190. package/dist/core/local-server.js.map +1 -1
  191. package/dist/core/markdown-render.d.ts +25 -0
  192. package/dist/core/markdown-render.d.ts.map +1 -0
  193. package/dist/core/markdown-render.js +94 -0
  194. package/dist/core/markdown-render.js.map +1 -0
  195. package/dist/core/migrate.d.ts +32 -15
  196. package/dist/core/migrate.d.ts.map +1 -1
  197. package/dist/core/migrate.js +220 -108
  198. package/dist/core/migrate.js.map +1 -1
  199. package/dist/core/parsers/change-parser.d.ts +7 -10
  200. package/dist/core/parsers/change-parser.d.ts.map +1 -1
  201. package/dist/core/parsers/change-parser.js +48 -56
  202. package/dist/core/parsers/change-parser.js.map +1 -1
  203. package/dist/core/parsers/markdown-parser.d.ts +8 -9
  204. package/dist/core/parsers/markdown-parser.d.ts.map +1 -1
  205. package/dist/core/parsers/markdown-parser.js +31 -22
  206. package/dist/core/parsers/markdown-parser.js.map +1 -1
  207. package/dist/core/parsers/requirement-blocks.d.ts +43 -15
  208. package/dist/core/parsers/requirement-blocks.d.ts.map +1 -1
  209. package/dist/core/parsers/requirement-blocks.js +169 -54
  210. package/dist/core/parsers/requirement-blocks.js.map +1 -1
  211. package/dist/core/parsers/requirement-text.d.ts +73 -79
  212. package/dist/core/parsers/requirement-text.d.ts.map +1 -1
  213. package/dist/core/parsers/requirement-text.js +137 -79
  214. package/dist/core/parsers/requirement-text.js.map +1 -1
  215. package/dist/core/parsers/spec-structure.d.ts.map +1 -1
  216. package/dist/core/parsers/spec-structure.js +10 -6
  217. package/dist/core/parsers/spec-structure.js.map +1 -1
  218. package/dist/core/planning-home.js.map +1 -1
  219. package/dist/core/profiles.d.ts +3 -10
  220. package/dist/core/profiles.d.ts.map +1 -1
  221. package/dist/core/profiles.js +5 -12
  222. package/dist/core/profiles.js.map +1 -1
  223. package/dist/core/project-config.d.ts +43 -44
  224. package/dist/core/project-config.d.ts.map +1 -1
  225. package/dist/core/project-config.js +107 -82
  226. package/dist/core/project-config.js.map +1 -1
  227. package/dist/core/project-layout.d.ts +10 -18
  228. package/dist/core/project-layout.d.ts.map +1 -1
  229. package/dist/core/project-layout.js +16 -26
  230. package/dist/core/project-layout.js.map +1 -1
  231. package/dist/core/root-selection.d.ts +11 -7
  232. package/dist/core/root-selection.d.ts.map +1 -1
  233. package/dist/core/root-selection.js +7 -8
  234. package/dist/core/root-selection.js.map +1 -1
  235. package/dist/core/rules.d.ts +10 -0
  236. package/dist/core/rules.d.ts.map +1 -0
  237. package/dist/core/rules.js +43 -0
  238. package/dist/core/rules.js.map +1 -0
  239. package/dist/core/schema-names.d.ts +16 -0
  240. package/dist/core/schema-names.d.ts.map +1 -0
  241. package/dist/core/schema-names.js +16 -0
  242. package/dist/core/schema-names.js.map +1 -0
  243. package/dist/core/schemas/base.schema.d.ts +3 -0
  244. package/dist/core/schemas/base.schema.d.ts.map +1 -1
  245. package/dist/core/schemas/base.schema.js +22 -6
  246. package/dist/core/schemas/base.schema.js.map +1 -1
  247. package/dist/core/schemas/change.schema.d.ts +16 -0
  248. package/dist/core/schemas/change.schema.d.ts.map +1 -1
  249. package/dist/core/schemas/change.schema.js +41 -10
  250. package/dist/core/schemas/change.schema.js.map +1 -1
  251. package/dist/core/schemas/spec.schema.d.ts +2 -0
  252. package/dist/core/schemas/spec.schema.d.ts.map +1 -1
  253. package/dist/core/shared/index.d.ts +3 -8
  254. package/dist/core/shared/index.d.ts.map +1 -1
  255. package/dist/core/shared/index.js +3 -8
  256. package/dist/core/shared/index.js.map +1 -1
  257. package/dist/core/shared/rules-generation.d.ts +27 -8
  258. package/dist/core/shared/rules-generation.d.ts.map +1 -1
  259. package/dist/core/shared/rules-generation.js +151 -16
  260. package/dist/core/shared/rules-generation.js.map +1 -1
  261. package/dist/core/shared/skill-generation.d.ts +38 -53
  262. package/dist/core/shared/skill-generation.d.ts.map +1 -1
  263. package/dist/core/shared/skill-generation.js +82 -51
  264. package/dist/core/shared/skill-generation.js.map +1 -1
  265. package/dist/core/shared/tool-detection.d.ts +40 -62
  266. package/dist/core/shared/tool-detection.d.ts.map +1 -1
  267. package/dist/core/shared/tool-detection.js +88 -80
  268. package/dist/core/shared/tool-detection.js.map +1 -1
  269. package/dist/core/skill-metrics.d.ts +36 -63
  270. package/dist/core/skill-metrics.d.ts.map +1 -1
  271. package/dist/core/skill-metrics.js +34 -73
  272. package/dist/core/skill-metrics.js.map +1 -1
  273. package/dist/core/spec-presenter.d.ts.map +1 -1
  274. package/dist/core/spec-presenter.js +6 -6
  275. package/dist/core/spec-presenter.js.map +1 -1
  276. package/dist/core/specs-apply.d.ts +22 -23
  277. package/dist/core/specs-apply.d.ts.map +1 -1
  278. package/dist/core/specs-apply.js +166 -193
  279. package/dist/core/specs-apply.js.map +1 -1
  280. package/dist/core/templates/fragments/interview.d.ts +2 -6
  281. package/dist/core/templates/fragments/interview.d.ts.map +1 -1
  282. package/dist/core/templates/fragments/interview.js +2 -6
  283. package/dist/core/templates/fragments/interview.js.map +1 -1
  284. package/dist/core/templates/fragments/next-step.d.ts +4 -8
  285. package/dist/core/templates/fragments/next-step.d.ts.map +1 -1
  286. package/dist/core/templates/fragments/next-step.js +4 -8
  287. package/dist/core/templates/fragments/next-step.js.map +1 -1
  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 +9 -12
  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 +7 -5
  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 -0
  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 +0 -1
  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 +2 -2
  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.map +1 -1
  333. package/dist/core/update.d.ts +26 -21
  334. package/dist/core/update.d.ts.map +1 -1
  335. package/dist/core/update.js +165 -116
  336. package/dist/core/update.js.map +1 -1
  337. package/dist/core/user-state-migration.d.ts +13 -15
  338. package/dist/core/user-state-migration.d.ts.map +1 -1
  339. package/dist/core/user-state-migration.js +16 -20
  340. package/dist/core/user-state-migration.js.map +1 -1
  341. package/dist/core/validation/constants.d.ts +19 -25
  342. package/dist/core/validation/constants.d.ts.map +1 -1
  343. package/dist/core/validation/constants.js +25 -20
  344. package/dist/core/validation/constants.js.map +1 -1
  345. package/dist/core/validation/prose-length.d.ts +15 -0
  346. package/dist/core/validation/prose-length.d.ts.map +1 -0
  347. package/dist/core/validation/prose-length.js +29 -0
  348. package/dist/core/validation/prose-length.js.map +1 -0
  349. package/dist/core/validation/purpose-placeholder.d.ts +9 -16
  350. package/dist/core/validation/purpose-placeholder.d.ts.map +1 -1
  351. package/dist/core/validation/purpose-placeholder.js +30 -44
  352. package/dist/core/validation/purpose-placeholder.js.map +1 -1
  353. package/dist/core/validation/section-validator.d.ts +4 -4
  354. package/dist/core/validation/section-validator.d.ts.map +1 -1
  355. package/dist/core/validation/section-validator.js +43 -7
  356. package/dist/core/validation/section-validator.js.map +1 -1
  357. package/dist/core/validation/task-numbering.d.ts +6 -3
  358. package/dist/core/validation/task-numbering.d.ts.map +1 -1
  359. package/dist/core/validation/task-numbering.js +23 -11
  360. package/dist/core/validation/task-numbering.js.map +1 -1
  361. package/dist/core/validation/types.d.ts +18 -0
  362. package/dist/core/validation/types.d.ts.map +1 -1
  363. package/dist/core/validation/types.js +12 -1
  364. package/dist/core/validation/types.js.map +1 -1
  365. package/dist/core/validation/validator.d.ts +50 -51
  366. package/dist/core/validation/validator.d.ts.map +1 -1
  367. package/dist/core/validation/validator.js +478 -269
  368. package/dist/core/validation/validator.js.map +1 -1
  369. package/dist/prompts/searchable-multi-select.d.ts +3 -8
  370. package/dist/prompts/searchable-multi-select.d.ts.map +1 -1
  371. package/dist/prompts/searchable-multi-select.js +16 -39
  372. package/dist/prompts/searchable-multi-select.js.map +1 -1
  373. package/dist/utils/change-metadata.d.ts +11 -50
  374. package/dist/utils/change-metadata.d.ts.map +1 -1
  375. package/dist/utils/change-metadata.js +48 -67
  376. package/dist/utils/change-metadata.js.map +1 -1
  377. package/dist/utils/change-utils.d.ts +31 -54
  378. package/dist/utils/change-utils.d.ts.map +1 -1
  379. package/dist/utils/change-utils.js +143 -100
  380. package/dist/utils/change-utils.js.map +1 -1
  381. package/dist/utils/file-lock.d.ts +39 -0
  382. package/dist/utils/file-lock.d.ts.map +1 -0
  383. package/dist/utils/file-lock.js +149 -0
  384. package/dist/utils/file-lock.js.map +1 -0
  385. package/dist/utils/file-system.d.ts +12 -32
  386. package/dist/utils/file-system.d.ts.map +1 -1
  387. package/dist/utils/file-system.js +16 -40
  388. package/dist/utils/file-system.js.map +1 -1
  389. package/dist/utils/frontmatter.d.ts +7 -11
  390. package/dist/utils/frontmatter.d.ts.map +1 -1
  391. package/dist/utils/frontmatter.js +11 -11
  392. package/dist/utils/frontmatter.js.map +1 -1
  393. package/dist/utils/interactive.d.ts +4 -9
  394. package/dist/utils/interactive.d.ts.map +1 -1
  395. package/dist/utils/interactive.js +2 -4
  396. package/dist/utils/interactive.js.map +1 -1
  397. package/dist/utils/item-discovery.d.ts +15 -10
  398. package/dist/utils/item-discovery.d.ts.map +1 -1
  399. package/dist/utils/item-discovery.js +42 -47
  400. package/dist/utils/item-discovery.js.map +1 -1
  401. package/dist/utils/link.d.ts +13 -4
  402. package/dist/utils/link.d.ts.map +1 -1
  403. package/dist/utils/link.js +13 -4
  404. package/dist/utils/link.js.map +1 -1
  405. package/dist/utils/match.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 +10 -11
  411. package/dist/utils/spec-files.d.ts.map +1 -1
  412. package/dist/utils/spec-files.js +31 -22
  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 +9 -10
  423. package/schemas/decision/templates/decision.md +3 -1
  424. package/schemas/decision/templates/index.md +2 -2
  425. package/schemas/issue/schema.yaml +11 -2
  426. package/schemas/issue/templates/spec.md +37 -3
  427. package/schemas/sdd/schema.yaml +24 -1
  428. package/schemas/sdd/templates/spec.md +37 -3
@@ -6,9 +6,9 @@ Archive merges the change's delta specs into \`tospec/specs/\` permanently, so i
6
6
 
7
7
  Take these in order; the first that matches wins.
8
8
 
9
- 1. **The user's request unambiguously names sync as what to skip** ("archive without sync", "skip the sync") — honor that. Skip the sync and archive **without** \`--require-sync\` (Step 2, not-synced branch). This is checked first on purpose: an explicit instruction outranks the default, and what was removed is the unsolicited question, not the user's authority. A request that merely contains the word "archive" (e.g. "just archive this") does not count on its own — that word is also the ordinary verb for the whole workflow, so matching on it alone risks skipping a sync the user never asked to skip.
9
+ 1. **The user's request unambiguously names sync as what to skip** ("archive without sync", "skip the sync") — honor that: skip the sync and archive **without** \`--require-sync\` (Step 2, not-synced branch). A request that merely contains the word "archive" ("just archive this") does not count — that is also the ordinary verb for the whole workflow, so matching on it alone skips a sync nobody asked to skip.
10
10
  2. **No delta specs at all** (e.g. a purely cosmetic issue fix with no behavior change) — there is no spec-vs-code drift to find. Skip straight to Step 2 and archive directly. Under a schema that requires deltas (sdd), such a change also needs \`skip_specs: true\` in its \`.tospec.yaml\` or validation will refuse it — set that once, and only when the change truly has no externally observable effect. Never write a delta spec just to get past the gate.
11
- 3. **Otherwise the change produced delta specs** (a non-empty \`specs/<capability>/spec.md\` under the change dir), so behavior was added or changed and drift is possible. Run the \`tospec-sync\` workflow now, without asking. There is no question to put: declining would mean knowingly publishing a spec that may not describe the code, so a prompt here spends the user's attention without buying a decision.
11
+ 3. **Otherwise the change produced delta specs** (a non-empty \`specs/<capability>/spec.md\` under the change dir), so behavior was added or changed and drift is possible. Run the \`tospec-sync\` workflow now, without asking — declining would mean knowingly publishing a spec that may not describe the code, so there is no decision here to put to the user.
12
12
 
13
13
  Running it unannounced is safe because of how \`tospec-sync\` is ordered: it judges every Requirement before writing anything, so a defect surfaces while the working tree is still untouched.
14
14
 
@@ -19,7 +19,7 @@ Running it unannounced is safe because of how \`tospec-sync\` is ordered: it jud
19
19
 
20
20
  > "Sync found <N> Requirement(s) the code doesn't satisfy: <names>. Fix them now, or leave it for later?"
21
21
 
22
- - **Fix now** → hand off to \`tospec-apply\` for the fix. Archive does not edit source itself. On return, resume \`tospec-sync\` **at step 4** with the verdicts it already produced — do not re-run steps 1-3. Concretely: re-judge **only the Requirements that were reported as defects** (not the whole set, and not the ones already judged MATCH), and once none of them is still a CODE-BUG, run step 4's write phase over **every** SPEC-UPDATED verdict, including the ones sync held back when it stopped. Sync then rewrites \`sync-report.md\` with \`Conclusion: PASS\`. Only then continue to Step 2 — the gate reads that report, so an un-rewritten FAIL will (correctly) refuse.
22
+ - **Fix now** → hand off to \`tospec-apply\` for the fix. Archive does not edit source itself. On return, resume \`tospec-sync\` **at step 4**, not step 1 — that step documents the re-entry: it re-judges only the Requirements reported as defects, keeps every other verdict, and then writes the SPEC-UPDATED ones it held back. Continue to Step 2 only once sync has rewritten \`sync-report.md\` with \`Conclusion: PASS\`; the gate reads that report, so an un-rewritten FAIL will (correctly) refuse.
23
23
  - **Later** → stop. Do not archive; the change stays active with its spec files unmodified.
24
24
 
25
25
  If the re-judge finds a Requirement is *still* a CODE-BUG, do **not** put the question again — it was already answered. Report which Requirement did not come clean and stop, as for "Later". The one-question rule is per archive run, not per attempt.
@@ -32,7 +32,7 @@ Synced branch (a sync ran and \`sync-report.md\` says \`Conclusion: PASS\`):
32
32
  \`\`\`bash
33
33
  tospec archive "<name>" --json --require-sync
34
34
  \`\`\`
35
- \`--require-sync\` is the CLI's own machine-checkable half of the sync gate: it refuses unless \`sync-report.md\` exists with a \`Conclusion: PASS\` line (\`SYNC_REPORT_MISSING\` / \`SYNC_REPORT_FAILED\`). Since the sync just ran and passed, this succeeds for free — a CLI-enforced backstop behind the instruction-level order above.
35
+ \`--require-sync\` is the CLI's own machine-checkable half of the sync gate: it refuses unless \`sync-report.md\` exists with a \`Conclusion: PASS\` line (\`sync_report_missing\` / \`sync_report_failed\`). Since the sync just ran and passed, this succeeds for free — a CLI-enforced backstop behind the instruction-level order above.
36
36
 
37
37
  Not-synced branch (no delta specs, or the user asked to skip):
38
38
  \`\`\`bash
@@ -42,7 +42,9 @@ Only omit \`--require-sync\` on this branch; passing it without a sync having ru
42
42
 
43
43
  Either way, the CLI then: re-validates the delta specs (blocking), checks tasks/task completion (with \`--json\`, incomplete tasks block unless you pass \`--yes\` after the user confirms), does a two-phase atomic merge into \`tospec/specs/\` (dry-run + re-validate every target first, writes only if all pass), and moves the change directory — including \`sync-report.md\` when present — into \`tospec/changes/archive/\` under a \`yyyyMMdd_HHmmss-<name>\` timestamp the CLI generates itself.
44
44
 
45
- **Reading the result**: the \`--json\` output is \`{archive, status}\`. Success → \`archive\` holds \`{change, archivedAs, path, specsUpdated}\`. Failure → \`archive\` is \`null\` and \`status[0].code\` tells you which ending you got: \`archive_validation_failed\` (fix artifacts, re-validate), \`archive_tasks_incomplete\` / \`archive_tasks_missing\` (ask the user, then rerun with \`--yes\` to override), \`SYNC_REPORT_MISSING\` / \`SYNC_REPORT_FAILED\` (the sync gate refused). Each status entry carries \`{code, message, fix}\` — follow \`fix\`.
45
+ **Reading the result**: the \`--json\` output is \`{archive, status}\`. Success → \`archive\` holds \`{change, archivedAs, path, specsUpdated}\`. Failure → \`archive\` is \`null\` and \`status[0].code\` tells you which ending you got: \`archive_validation_failed\` (fix artifacts, re-validate), \`archive_artifacts_incomplete\` (the schema's required artifacts were never written — the message names them; write them rather than overriding, because archiving is what makes the omission permanent), \`archive_tasks_incomplete\` / \`archive_tasks_missing\` (ask the user, then rerun with \`--yes\` to override), \`sync_report_missing\` / \`sync_report_failed\` (the sync gate refused). Each status entry carries \`{code, message, fix}\` — follow \`fix\`.
46
+
47
+ A successful archive can also carry \`status\` warnings for things that happened but did not block: an overridden gate, or a delta whose \`## Purpose\` was ignored because the capability already has a main spec. Read them — nothing else reports these.
46
48
 
47
49
  **Guardrails — explicit and non-negotiable**
48
50
  - Run the sync when the change has spec deltas; do not ask permission for it. Honor an explicit request to skip, and skip it outright when there are no delta specs
@@ -1 +1 @@
1
- {"version":3,"file":"archive.js","sourceRoot":"","sources":["../../../../src/core/templates/workflows/archive.ts"],"names":[],"mappings":"AAQA,MAAM,YAAY,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uTAuDkS,CAAC;AAExT,MAAM,UAAU,6BAA6B;IAC3C,OAAO;QACL,IAAI,EAAE,gBAAgB;QACtB,WAAW,EAAE,+LAA+L;QAC5M,YAAY,EAAE;;;;EAIhB,YAAY,EAAE;QACZ,OAAO,EAAE,KAAK;QACd,aAAa,EAAE,sBAAsB;QACrC,QAAQ,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE;QAC9B,YAAY,EAAE,CAAC,gBAAgB,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,iBAAiB,CAAC;KAC7F,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,+BAA+B;IAC7C,OAAO;QACL,IAAI,EAAE,iBAAiB;QACvB,WAAW,EAAE,mFAAmF;QAChG,QAAQ,EAAE,UAAU;QACpB,IAAI,EAAE,CAAC,UAAU,EAAE,SAAS,CAAC;QAC7B,OAAO,EAAE;;;;EAIX,YAAY,EAAE;KACb,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"archive.js","sourceRoot":"","sources":["../../../../src/core/templates/workflows/archive.ts"],"names":[],"mappings":"AAEA,MAAM,YAAY,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uTAyDkS,CAAC;AAExT,MAAM,UAAU,6BAA6B;IAC3C,OAAO;QACL,IAAI,EAAE,gBAAgB;QACtB,WAAW,EAAE,+LAA+L;QAC5M,YAAY,EAAE;;;;EAIhB,YAAY,EAAE;QACZ,OAAO,EAAE,KAAK;QACd,aAAa,EAAE,sBAAsB;QACrC,QAAQ,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE;QAC9B,YAAY,EAAE,CAAC,gBAAgB,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,iBAAiB,CAAC;KAC7F,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,+BAA+B;IAC7C,OAAO;QACL,IAAI,EAAE,iBAAiB;QACvB,WAAW,EAAE,mFAAmF;QAChG,QAAQ,EAAE,UAAU;QACpB,IAAI,EAAE,CAAC,UAAU,EAAE,SAAS,CAAC;QAC7B,OAAO,EAAE;;;;EAIX,YAAY,EAAE;KACb,CAAC;AACJ,CAAC"}
@@ -4,7 +4,7 @@ const DECISION_BODY = `Capture a decision that has already been made or is ready
4
4
  **Steps**
5
5
 
6
6
  1. **Check the ledger for prior decisions**
7
- Read \`tospec/decisions/index.md\` (if it exists) — its timestamp / title / summary rows are the history of what was already decided. Use it to spot a decision this one extends or supersedes, and to avoid contradicting an accepted one.
7
+ Read \`tospec/decisions/index.md\` (if it exists) — its timestamp / status / title / summary rows are the history of what was already decided. Use it to spot a decision this one extends or supersedes, and to avoid contradicting an accepted one.
8
8
 
9
9
  2. **Converge on the decision first — and keep the exchange**
10
10
  Before writing anything, make sure you can state: what was decided, why (the driving forces), which alternatives were evaluated, and what it impacts. If any of these is fuzzy, ask the user — don't invent them. As you interview, keep the material questions you asked and the user's answers; you'll record them in Decision Process (step 4) so the reasoning trail survives the chat.
@@ -26,7 +26,7 @@ const DECISION_BODY = `Capture a decision that has already been made or is ready
26
26
 
27
27
  The template carries two more that are optional:
28
28
  - **Decision Process** — the key questions you asked and the user's answers that shaped this decision. Format each pair as a \`**Q:** question\` line followed by the answer in the next paragraph, one pair per block. Summarize each Q&A; don't paste a full transcript. Omit the section entirely if there was no interactive discussion.
29
- - **Related Changes** — leave it empty. It fills in later, as changes link back via \`tospec new change --decisions\`.
29
+ - **Related Changes** — leave it empty. Nothing writes it: \`tospec new change --decisions\` records the link on the change's side only, so this list is filled in by hand if anyone wants it.
30
30
 
31
31
  5. **Verify**
32
32
  \`\`\`bash
@@ -36,14 +36,14 @@ const DECISION_BODY = `Capture a decision that has already been made or is ready
36
36
 
37
37
  **Output**
38
38
 
39
- Summarize the decision, its status, and the follow-up work. If it supersedes an older decision, state which one and flip that older file's Status to \`superseded\`. Report the created filename explicitly — when a change later implements this decision, that filename is what \`tospec new change --decisions\` records to link the change back here (the file's optional \`## Related Changes\` section can list those changes in return).
39
+ Summarize the decision, its status, and the follow-up work. If it supersedes an older decision, state which one and flip that older file's Status to \`superseded\`, then run \`tospec decision list --reindex\` so the ledger's status column matches the file you just edited. Report the created filename explicitly — when a change later implements this decision, that filename is what \`tospec new change --decisions\` records to link the change back here (the file's optional \`## Related Changes\` section can list those changes in return).
40
40
 
41
41
  Then point at the next step. ${nextStepLabelRule('the decision you just recorded', '\`(update)\`, \`(propose)\`/\`(issue)\`')} If the decision came out of grilling or exploring an **existing** change, offer **(update)** via \`tospec-update\` to fold it into that change's artifacts; if no change exists yet, offer **(propose)** / **(issue)** via \`tospec-propose\`/\`tospec-issue\` and carry the filename into \`--decisions\`.
42
42
 
43
43
  **Guardrails**
44
44
  - The decision file, its date-prefixed filename, and the ledger row are all CLI-generated — pass \`--summary\`, and never create/rename decision files or hand-edit \`index.md\` yourself; only edit the decision file's section contents
45
45
  - Don't record a decision whose rationale or alternatives you can't state — clarify with the user first
46
- - \`superseded\` must name its successor; the superseded record's Status must be updated too`;
46
+ - \`superseded\` must name its successor; the superseded record's Status must be updated too — in the file, then \`tospec decision list --reindex\` to carry it into \`index.md\``;
47
47
  export function getTospecDecisionSkillTemplate() {
48
48
  return {
49
49
  name: 'tospec-decision',
@@ -1 +1 @@
1
- {"version":3,"file":"decision.js","sourceRoot":"","sources":["../../../../src/core/templates/workflows/decision.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAE9D,MAAM,aAAa,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+BAuCS,iBAAiB,CAAC,gCAAgC,EAAE,yCAAyC,CAAC;;;;;6FAKhC,CAAC;AAE9F,MAAM,UAAU,8BAA8B;IAC5C,OAAO;QACL,IAAI,EAAE,iBAAiB;QACvB,WAAW,EACT,6NAA6N;QAC/N,YAAY,EAAE;;;;EAIhB,aAAa,EAAE;QACb,OAAO,EAAE,KAAK;QACd,aAAa,EAAE,sBAAsB;QACrC,QAAQ,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE;QAC9B,YAAY,EAAE,CAAC,gBAAgB,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,iBAAiB,CAAC;KAC7F,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,gCAAgC;IAC9C,OAAO;QACL,IAAI,EAAE,kBAAkB;QACxB,WAAW,EAAE,6FAA6F;QAC1G,QAAQ,EAAE,UAAU;QACpB,IAAI,EAAE,CAAC,UAAU,EAAE,UAAU,EAAE,KAAK,CAAC;QACrC,OAAO,EAAE;;;;EAIX,aAAa,EAAE;KACd,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"decision.js","sourceRoot":"","sources":["../../../../src/core/templates/workflows/decision.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAE9D,MAAM,aAAa,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+BAuCS,iBAAiB,CAAC,gCAAgC,EAAE,yCAAyC,CAAC;;;;;kLAKqD,CAAC;AAEnL,MAAM,UAAU,8BAA8B;IAC5C,OAAO;QACL,IAAI,EAAE,iBAAiB;QACvB,WAAW,EACT,6NAA6N;QAC/N,YAAY,EAAE;;;;EAIhB,aAAa,EAAE;QACb,OAAO,EAAE,KAAK;QACd,aAAa,EAAE,sBAAsB;QACrC,QAAQ,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE;QAC9B,YAAY,EAAE,CAAC,gBAAgB,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,iBAAiB,CAAC;KAC7F,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,gCAAgC;IAC9C,OAAO;QACL,IAAI,EAAE,kBAAkB;QACxB,WAAW,EAAE,6FAA6F;QAC1G,QAAQ,EAAE,UAAU;QACpB,IAAI,EAAE,CAAC,UAAU,EAAE,UAAU,EAAE,KAAK,CAAC;QACrC,OAAO,EAAE;;;;EAIX,aAAa,EAAE;KACd,CAAC;AACJ,CAAC"}
@@ -48,7 +48,7 @@ ${INTERVIEW_MECHANICS}
48
48
 
49
49
  Recommend \`tospec-propose\`/\`tospec-issue\` when the requirement is ready to build, and \`tospec-grill\` when it still feels fuzzy or under-tested.
50
50
 
51
- \`tospec-propose\`/\`tospec-issue\` synthesize the requirement straight from the conversation and write the change artifacts; apart from the ADR in step 5, explore persists nothing itself. Carry the recorded decision filename(s) (reported by \`tospec decision new\`) into that handoff: the propose/issue step passes them via \`tospec new change --decisions\` so the change's metadata links back to its ADRs.
51
+ Carry any recorded decision filename (reported by \`tospec decision new\`) into that handoff: the propose/issue step passes it via \`tospec new change --decisions\` so the change's metadata links back to its ADRs.
52
52
 
53
53
  **Guardrails**
54
54
  - **Always end with the next-step question** — never choose the follow-up action yourself, and never finish explore without asking. Recording a settled decision (step 5) is the one exception: that one you do unasked
@@ -1 +1 @@
1
- {"version":3,"file":"grill.d.ts","sourceRoot":"","sources":["../../../../src/core/templates/workflows/grill.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAmDlE,wBAAgB,qBAAqB,IAAI,aAAa,CAcrD;AAED,wBAAgB,6BAA6B,IAAI,eAAe,CAY/D"}
1
+ {"version":3,"file":"grill.d.ts","sourceRoot":"","sources":["../../../../src/core/templates/workflows/grill.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAiDlE,wBAAgB,qBAAqB,IAAI,aAAa,CAcrD;AAED,wBAAgB,6BAA6B,IAAI,eAAe,CAY/D"}
@@ -41,8 +41,6 @@ A grill that shifts the picture leaves work behind. Once the user confirms the r
41
41
  - **Target was an existing written proposal** → **(update)** via \`tospec-update\` to fold the outcome into that change's artifacts. Name the change so update doesn't have to re-ask, and carry any recorded decision filename with it.
42
42
  - **Target was a raw idea or an explore** → nothing is written yet; offer **(propose)** (or **(issue)** when something is broken) via \`tospec-propose\`/\`tospec-issue\`, or **(grill)** if it's still fuzzy.
43
43
 
44
- Apart from that ADR, grill writes nothing — \`tospec-decision\` and \`tospec-update\` own those files.
45
-
46
44
  **Guardrails**
47
45
  - **Don't act before consensus** — take no action, including any handoff, until the user has confirmed the restated understanding
48
46
  - **Don't force closure** — if the user wants to keep grilling after you've restated where things stand, keep going`;
@@ -1 +1 @@
1
- {"version":3,"file":"grill.js","sourceRoot":"","sources":["../../../../src/core/templates/workflows/grill.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAE9D,MAAM,UAAU,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;EA0BjB,mBAAmB;;;;;;;;;;;0DAWqC,iBAAiB,CAAC,mCAAmC,EAAE,sDAAsD,CAAC;;;;;;;;oHAQpD,CAAC;AAErH,MAAM,UAAU,qBAAqB;IACnC,OAAO;QACL,IAAI,EAA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OAAO;QACL,IAAI,EAAE,eAAe;QACrB,WAAW,EAAE,2FAA2F;QACxG,QAAQ,EAAE,UAAU;QACpB,IAAI,EAAE,CAAC,UAAU,EAAE,OAAO,CAAC;QAC3B,OAAO,EAAE;;;;EAIX,UAAU,EAAE;KACX,CAAC;AACJ,CAAC"}
@@ -1,9 +1,3 @@
1
- /**
2
- * Skill Template Workflow Modules
3
- *
4
- * This file is generated by splitting the legacy monolithic
5
- * templates file into workflow-focused modules.
6
- */
7
1
  import type { SkillTemplate, CommandTemplate } from '../types.js';
8
2
  export declare function getTospecIssueSkillTemplate(): SkillTemplate;
9
3
  export declare function getTospecIssueCommandTemplate(): CommandTemplate;
@@ -1 +1 @@
1
- {"version":3,"file":"issue.d.ts","sourceRoot":"","sources":["../../../../src/core/templates/workflows/issue.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AA+DlE,wBAAgB,2BAA2B,IAAI,aAAa,CAc3D;AAED,wBAAgB,6BAA6B,IAAI,eAAe,CAY/D"}
1
+ {"version":3,"file":"issue.d.ts","sourceRoot":"","sources":["../../../../src/core/templates/workflows/issue.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAkElE,wBAAgB,2BAA2B,IAAI,aAAa,CAc3D;AAED,wBAAgB,6BAA6B,IAAI,eAAe,CAY/D"}
@@ -38,6 +38,8 @@ const ISSUE_BODY = `Diagnose before you propose a fix. Jumping to a hypothesis b
38
38
  \`\`\`
39
39
  Include: the symptom and how to reproduce it, the verified root cause (not a guess — how you verified it), why existing tests didn't already catch this, the fix plan, the test plan, and a checkbox task list for \`tospec-apply\`. This is where the issue's detail lives (the ticket only summarizes).
40
40
 
41
+ **Before moving on, reconcile Test Plan against Tasks.** Walk the Test Plan's "tests to add" items one by one and name the task that covers each. Every item must either map to a numbered task or say in the Test Plan why it needs none. Nothing checks this later: \`tospec validate\` sees two prose sections, and apply reports done when the Tasks boxes are ticked — so an item that never became a task is silently lost, and the change still looks complete.
42
+
41
43
  7. **Delta specs — only if behavior changes**
42
44
 
43
45
  \`specs\` is optional in the issue schema. Only produce it if the fix changes externally observable behavior (skip it and \`status\` will show \`skipped\`, not \`blocked\`). If the bug is the spec itself being wrong, use MODIFIED to correct the Requirement instead of writing new tests against a wrong spec.
@@ -57,6 +59,7 @@ Summarize the confirmed root cause, the fix plan, and prompt: "Run \`tospec-appl
57
59
  - No hypotheses before a red-capable feedback loop exists
58
60
  - 3-5 ranked, falsifiable hypotheses — never a single guess
59
61
  - Root cause must be verified, not assumed — state how you confirmed it
62
+ - Every Test Plan item maps to a task, or the Test Plan says why it needs none
60
63
  - Don't write \`specs\` unless the fix actually changes external behavior`;
61
64
  export function getTospecIssueSkillTemplate() {
62
65
  return {
@@ -1 +1 @@
1
- {"version":3,"file":"issue.js","sourceRoot":"","sources":["../../../../src/core/templates/workflows/issue.ts"],"names":[],"mappings":"AAQA,MAAM,UAAU,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;0EA2DuD,CAAC;AAE3E,MAAM,UAAU,2BAA2B;IACzC,OAAO;QACL,IAAI,EAAE,cAAc;QACpB,WAAW,EAAE,6NAA6N;QAC1O,YAAY,EAAE;;;;EAIhB,UAAU,EAAE;QACV,OAAO,EAAE,KAAK;QACd,aAAa,EAAE,sBAAsB;QACrC,QAAQ,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE;QAC9B,YAAY,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,iBAAiB,CAAC;KACnF,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,6BAA6B;IAC3C,OAAO;QACL,IAAI,EAAE,eAAe;QACrB,WAAW,EAAE,8EAA8E;QAC3F,QAAQ,EAAE,UAAU;QACpB,IAAI,EAAE,CAAC,UAAU,EAAE,OAAO,EAAE,WAAW,CAAC;QACxC,OAAO,EAAE;;;;EAIX,UAAU,EAAE;KACX,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"issue.js","sourceRoot":"","sources":["../../../../src/core/templates/workflows/issue.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;0EA8DuD,CAAC;AAE3E,MAAM,UAAU,2BAA2B;IACzC,OAAO;QACL,IAAI,EAAE,cAAc;QACpB,WAAW,EAAE,6NAA6N;QAC1O,YAAY,EAAE;;;;EAIhB,UAAU,EAAE;QACV,OAAO,EAAE,KAAK;QACd,aAAa,EAAE,sBAAsB;QACrC,QAAQ,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE;QAC9B,YAAY,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,iBAAiB,CAAC;KACnF,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,6BAA6B;IAC3C,OAAO;QACL,IAAI,EAAE,eAAe;QACrB,WAAW,EAAE,8EAA8E;QAC3F,QAAQ,EAAE,UAAU;QACpB,IAAI,EAAE,CAAC,UAAU,EAAE,OAAO,EAAE,WAAW,CAAC;QACxC,OAAO,EAAE;;;;EAIX,UAAU,EAAE;KACX,CAAC;AACJ,CAAC"}
@@ -1,9 +1,3 @@
1
- /**
2
- * Skill Template Workflow Modules
3
- *
4
- * This file is generated by splitting the legacy monolithic
5
- * templates file into workflow-focused modules.
6
- */
7
1
  import type { SkillTemplate, CommandTemplate } from '../types.js';
8
2
  export declare function getTospecProposeSkillTemplate(): SkillTemplate;
9
3
  export declare function getTospecProposeCommandTemplate(): CommandTemplate;
@@ -1 +1 @@
1
- {"version":3,"file":"propose.d.ts","sourceRoot":"","sources":["../../../../src/core/templates/workflows/propose.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AA8DlE,wBAAgB,6BAA6B,IAAI,aAAa,CAc7D;AAED,wBAAgB,+BAA+B,IAAI,eAAe,CAYjE"}
1
+ {"version":3,"file":"propose.d.ts","sourceRoot":"","sources":["../../../../src/core/templates/workflows/propose.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AA6DlE,wBAAgB,6BAA6B,IAAI,aAAa,CAc7D;AAED,wBAAgB,+BAA+B,IAAI,eAAe,CAYjE"}
@@ -51,7 +51,6 @@ Summarize the change name and location, the artifacts created, and prompt: "Run
51
51
  - The request that invoked this workflow authorizes planning only. Any build/fix instruction in it does not carry forward: don't edit project code, and don't start \`tospec-apply\` in the same response — stop after presenting the artifacts and wait for a new request
52
52
  - Create every artifact \`apply.requires\` needs — don't stop at \`proposal\`
53
53
  - The ticket file and its timestamp are CLI-generated — never create, rename, or move ticket files; only edit the Summary in the existing stub
54
- - Detailed why/what goes in \`proposal.md\`; the ticket stays a thin index
55
54
  - Read dependency artifacts from disk before writing the next one — don't rely on memory from earlier in the conversation, they may have been edited since
56
55
  - Inspect the implementation before drafting, and never defer that discovery to \`tospec-apply\` as a generic explore-the-codebase task
57
56
  - \`context\`/\`rules\` from \`instructions\` are constraints for you, never content to copy into the file
@@ -1 +1 @@
1
- {"version":3,"file":"propose.js","sourceRoot":"","sources":["../../../../src/core/templates/workflows/propose.ts"],"names":[],"mappings":"AAQA,MAAM,YAAY,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gIA0D2G,CAAC;AAEjI,MAAM,UAAU,6BAA6B;IAC3C,OAAO;QACL,IAAI,EAAE,gBAAgB;QACtB,WAAW,EAAE,kRAAkR;QAC/R,YAAY,EAAE;;;;EAIhB,YAAY,EAAE;QACZ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;EAIX,YAAY,EAAE;KACb,CAAC;AACJ,CAAC"}
@@ -1,13 +1,7 @@
1
1
  /**
2
- * Skill Template Workflow Modules
3
- *
4
- * This file is generated by splitting the legacy monolithic
5
- * templates file into workflow-focused modules.
6
- *
7
2
  * sync is a standalone skill, and also archive's automatic first step: archive
8
- * decides whether a sync is warranted and, when it is, runs this procedure
9
- * without asking. Step 4's judge-before-write gate is what makes running it
10
- * unannounced safe.
3
+ * decides whether a sync is warranted and runs this procedure without asking.
4
+ * Step 4's judge-before-write gate is what makes running it unannounced safe.
11
5
  */
12
6
  import type { SkillTemplate, CommandTemplate } from '../types.js';
13
7
  export declare function getTospecSyncSkillTemplate(): SkillTemplate;
@@ -1 +1 @@
1
- {"version":3,"file":"sync.d.ts","sourceRoot":"","sources":["../../../../src/core/templates/workflows/sync.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AA8ElE,wBAAgB,0BAA0B,IAAI,aAAa,CAc1D;AAED,wBAAgB,4BAA4B,IAAI,eAAe,CAY9D"}
1
+ {"version":3,"file":"sync.d.ts","sourceRoot":"","sources":["../../../../src/core/templates/workflows/sync.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AA8ElE,wBAAgB,0BAA0B,IAAI,aAAa,CAc1D;AAED,wBAAgB,4BAA4B,IAAI,eAAe,CAY9D"}
@@ -39,7 +39,7 @@ const SYNC_BODY = `Whether a spec still matches the source code is a semantic ju
39
39
 
40
40
  5. **Write the sync report**
41
41
 
42
- Create \`sync-report.md\` in the change directory in exactly this format — \`tospec archive --require-sync\` parses the first \`Conclusion:\` line, so the heading and label text must match:
42
+ Create \`sync-report.md\` in the change directory in exactly this format — \`tospec archive --require-sync\` reads the \`Conclusion:\` line, so the heading and label text must match. Lines inside a code fence are ignored, so quoting the template is safe:
43
43
 
44
44
  \`\`\`markdown
45
45
  # Sync Report: <change-name>
@@ -52,7 +52,7 @@ const SYNC_BODY = `Whether a spec still matches the source code is a semantic ju
52
52
  - Notes: <the difference and how it was handled; SPEC-UPDATED must include the validate result>
53
53
  \`\`\`
54
54
 
55
- Fill the \`Conclusion:\` line with exactly one literal — \`Conclusion: PASS\` or \`Conclusion: FAIL\` (FAIL may append a \`(reason)\` note); never leave both options in one line, or \`tospec archive --require-sync\` can't parse it. \`Conclusion:\` is **FAIL** if even one Requirement is CODE-BUG — a single unresolved defect blocks the whole change, not just that Requirement. It's **PASS** only when every Requirement resolved to MATCH or SPEC-UPDATED (with validate passing). For the no-delta case, still emit the Summary and a single Requirements entry describing the task.md-vs-code comparison (module described, not a Requirement name).
55
+ Write exactly one real \`Conclusion:\` line, carrying one literal — \`Conclusion: PASS\` or \`Conclusion: FAIL\` (FAIL may append a \`(reason)\` note). Both options left in one line, or two lines that disagree, parse as no verdict at all and shut the gate. It is **FAIL** if even one Requirement is CODE-BUG — a single unresolved defect blocks the whole change, not just that Requirement. It's **PASS** only when every Requirement resolved to MATCH or SPEC-UPDATED (with validate passing). For the no-delta case, still emit the Summary and a single Requirements entry describing the task.md-vs-code comparison (module described, not a Requirement name).
56
56
 
57
57
  6. **Final artifact validation**
58
58
  \`\`\`bash
@@ -1 +1 @@
1
- {"version":3,"file":"sync.js","sourceRoot":"","sources":["../../../../src/core/templates/workflows/sync.ts"],"names":[],"mappings":"AAaA,MAAM,SAAS,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mQA0EiP,CAAC;AAEpQ,MAAM,UAAU,0BAA0B;IACxC,OAAO;QACL,IAAI,EAAE,aAAa;QACnB,WAAW,EAAE,mMAAmM;QAChN,YAAY,EAAE;;;;EAIhB,SAAS,EAAE;QACT,OAAO,EAAE,KAAK;QACd,aAAa,EAAE,sBAAsB;QACrC,QAAQ,E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- * Skill Template Workflow Modules
3
- *
4
- * This file is generated by splitting the legacy monolithic
5
- * templates file into workflow-focused modules.
6
- */
7
1
  import type { SkillTemplate, CommandTemplate } from '../types.js';
8
2
  export declare function getTospecUpdateSkillTemplate(): SkillTemplate;
9
3
  export declare function getTospecUpdateCommandTemplate(): CommandTemplate;
@@ -1 +1 @@
1
- {"version":3,"file":"update.d.ts","sourceRoot":"","sources":["../../../../src/core/templates/workflows/update.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAgElE,wBAAgB,4BAA4B,IAAI,aAAa,CAc5D;AAED,wBAAgB,8BAA8B,IAAI,eAAe,CAYhE"}
1
+ {"version":3,"file":"update.d.ts","sourceRoot":"","sources":["../../../../src/core/templates/workflows/update.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAgElE,wBAAgB,4BAA4B,IAAI,aAAa,CAc5D;AAED,wBAAgB,8BAA8B,IAAI,eAAe,CAYhE"}
@@ -1 +1 @@
1
- {"version":3,"file":"update.js","sourceRoot":"","sources":["../../../../src/core/templates/workflows/update.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAE9D,MAAM,WAAW,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAyCf,iBAAiB,CAAC,mCAAmC,EAAE,uDAAuD,CAAC;;;;;;;;;;;;;;;;;;oLAkBgE,CAAC;AAErL,MAAM,UAAU,4BAA4B;IAC1C,OAAO;QACL,IAAI,EAAE,eAAe;QACrB,WAAW,EAAE,oPAAoP;QACjQ,YAAY,EAAE;;;;EAIhB,WAAW,EAAE;QACX,OAAO,EAAE,KAAK;QACd,aAAa,EAAE,sBAAsB;QACrC,QAAQ,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE;QAC9B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,CAAC;AACJ,CAAC"}
@@ -1,37 +1,42 @@
1
- /**
2
- * Update Command
3
- *
4
- * Refreshes Tospec skills for configured tools.
5
- */
6
- /**
7
- * Options for the update command.
8
- */
1
+ /** Refreshes Tospec skills for configured tools. */
9
2
  export interface UpdateCommandOptions {
10
- /** Force update even when tools are up to date */
3
+ /** Update even when tools are already version-current. */
11
4
  force?: boolean;
5
+ /** Emit one JSON document instead of progress prose. */
6
+ json?: boolean;
12
7
  }
8
+ /** The `--json` null-shape; mirrors the success payload with `update` nulled. */
9
+ export declare const UPDATE_FAILURE_PAYLOAD: Record<string, unknown>;
13
10
  export declare class UpdateCommand {
14
11
  private readonly force;
12
+ private readonly json;
15
13
  constructor(options?: UpdateCommandOptions);
16
- execute(projectPath: string): Promise<void>;
17
14
  /**
18
- * Display the update plan showing which tools need updating.
15
+ * Progress prose, suppressed under `--json`: the envelope contract allows only
16
+ * one document on stdout.
19
17
  */
20
- private displayUpdatePlan;
18
+ private say;
21
19
  /**
22
- * Detects new tool directories that aren't currently configured and displays a hint.
20
+ * Unlike `say`, a warning has no other carrier — dropping it under `--json`
21
+ * would leave an agent caller less informed than a human. One helper records
22
+ * and prints, so no call site does half of it.
23
23
  */
24
- private detectNewTools;
24
+ private warn;
25
+ /** Emitted alongside the success payload; empty means the key is omitted. */
26
+ private readonly jsonWarnings;
27
+ execute(projectPath: string): Promise<void>;
25
28
  /**
26
- * Suggest opting back into core when a custom profile still matches the old
27
- * four-workflow core set. Keep custom profiles user-owned; do not mutate them.
29
+ * Read-only, and called only once a run has otherwise finished: a run that
30
+ * dies in rule preflight must not leave advice about a state it never reached.
31
+ * Routed through `warn` so the notice reaches `status[]` under `--json`.
28
32
  */
29
- private displayOldCoreCustomProfileNote;
33
+ private reportResidualCodexOutput;
34
+ private displayUpdatePlan;
35
+ private detectNewTools;
30
36
  /**
31
- * Removes skill directories for workflows that are no longer selected in the
32
- * active profile, from a tool's `skills/` dir (dirs named `tospec-<workflow>`).
33
- * Returns the number of directories removed.
37
+ * Suggests opting back into core when a custom profile still matches the old
38
+ * four-workflow core set. Custom profiles stay user-owned, never mutated.
34
39
  */
35
- private removeUnselectedSkillDirs;
40
+ private displayOldCoreCustomProfileNote;
36
41
  }
37
42
  //# sourceMappingURL=update.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"update.d.ts","sourceRoot":"","sources":["../../src/core/update.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AA8BH;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,kDAAkD;IAClD,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED,qBAAa,aAAa;IACxB,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAU;gBAEpB,OAAO,GAAE,oBAAyB;IAIxC,OAAO,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAoKjD;;OAEG;IACH,OAAO,CAAC,iBAAiB;IAoBzB;;OAEG;IACH,OAAO,CAAC,cAAc;IAkBtB;;;OAGG;IACH,OAAO,CAAC,+BAA+B;IAkBvC;;;;OAIG;YACW,yBAAyB;CA0BxC"}
1
+ {"version":3,"file":"update.d.ts","sourceRoot":"","sources":["../../src/core/update.ts"],"names":[],"mappings":"AAAA,oDAAoD;AAiCpD,MAAM,WAAW,oBAAoB;IACnC,0DAA0D;IAC1D,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,wDAAwD;IACxD,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAED,iFAAiF;AACjF,eAAO,MAAM,sBAAsB,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAgC,CAAC;AAE5F,qBAAa,aAAa;IACxB,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAU;IAChC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAU;IAE/B,YAAY,OAAO,GAAE,oBAAyB,EAG7C;IAED;;;OAGG;IACH,OAAO,CAAC,GAAG;IAIX;;;;OAIG;IACH,OAAO,CAAC,IAAI;IAQZ,6EA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