@specforge/cli 0.1.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 (380) hide show
  1. package/README.md +781 -0
  2. package/bin/specforge +21 -0
  3. package/dist/channel.d.ts +27 -0
  4. package/dist/channel.d.ts.map +1 -0
  5. package/dist/channel.js +22 -0
  6. package/dist/channel.js.map +1 -0
  7. package/dist/cli/commands/configure.d.ts +16 -0
  8. package/dist/cli/commands/configure.d.ts.map +1 -0
  9. package/dist/cli/commands/configure.js +186 -0
  10. package/dist/cli/commands/configure.js.map +1 -0
  11. package/dist/cli/commands/configure.types.d.ts +110 -0
  12. package/dist/cli/commands/configure.types.d.ts.map +1 -0
  13. package/dist/cli/commands/configure.types.js +82 -0
  14. package/dist/cli/commands/configure.types.js.map +1 -0
  15. package/dist/cli/commands/debug/call.d.ts +14 -0
  16. package/dist/cli/commands/debug/call.d.ts.map +1 -0
  17. package/dist/cli/commands/debug/call.js +96 -0
  18. package/dist/cli/commands/debug/call.js.map +1 -0
  19. package/dist/cli/commands/debug/index.d.ts +12 -0
  20. package/dist/cli/commands/debug/index.d.ts.map +1 -0
  21. package/dist/cli/commands/debug/index.js +14 -0
  22. package/dist/cli/commands/debug/index.js.map +1 -0
  23. package/dist/cli/commands/debug/register.d.ts +11 -0
  24. package/dist/cli/commands/debug/register.d.ts.map +1 -0
  25. package/dist/cli/commands/debug/register.js +78 -0
  26. package/dist/cli/commands/debug/register.js.map +1 -0
  27. package/dist/cli/commands/debug/test.d.ts +13 -0
  28. package/dist/cli/commands/debug/test.d.ts.map +1 -0
  29. package/dist/cli/commands/debug/test.js +91 -0
  30. package/dist/cli/commands/debug/test.js.map +1 -0
  31. package/dist/cli/commands/debug/tools.d.ts +13 -0
  32. package/dist/cli/commands/debug/tools.d.ts.map +1 -0
  33. package/dist/cli/commands/debug/tools.js +86 -0
  34. package/dist/cli/commands/debug/tools.js.map +1 -0
  35. package/dist/cli/commands/debug/types.d.ts +119 -0
  36. package/dist/cli/commands/debug/types.d.ts.map +1 -0
  37. package/dist/cli/commands/debug/types.js +36 -0
  38. package/dist/cli/commands/debug/types.js.map +1 -0
  39. package/dist/cli/commands/debug/whoami.d.ts +13 -0
  40. package/dist/cli/commands/debug/whoami.d.ts.map +1 -0
  41. package/dist/cli/commands/debug/whoami.js +131 -0
  42. package/dist/cli/commands/debug/whoami.js.map +1 -0
  43. package/dist/cli/commands/doctor.d.ts +16 -0
  44. package/dist/cli/commands/doctor.d.ts.map +1 -0
  45. package/dist/cli/commands/doctor.js +413 -0
  46. package/dist/cli/commands/doctor.js.map +1 -0
  47. package/dist/cli/commands/doctor.types.d.ts +180 -0
  48. package/dist/cli/commands/doctor.types.d.ts.map +1 -0
  49. package/dist/cli/commands/doctor.types.js +140 -0
  50. package/dist/cli/commands/doctor.types.js.map +1 -0
  51. package/dist/cli/commands/feedback.d.ts +27 -0
  52. package/dist/cli/commands/feedback.d.ts.map +1 -0
  53. package/dist/cli/commands/feedback.js +262 -0
  54. package/dist/cli/commands/feedback.js.map +1 -0
  55. package/dist/cli/commands/feedback.types.d.ts +116 -0
  56. package/dist/cli/commands/feedback.types.d.ts.map +1 -0
  57. package/dist/cli/commands/feedback.types.js +65 -0
  58. package/dist/cli/commands/feedback.types.js.map +1 -0
  59. package/dist/cli/commands/index.d.ts +15 -0
  60. package/dist/cli/commands/index.d.ts.map +1 -0
  61. package/dist/cli/commands/index.js +21 -0
  62. package/dist/cli/commands/index.js.map +1 -0
  63. package/dist/cli/commands/init.d.ts +17 -0
  64. package/dist/cli/commands/init.d.ts.map +1 -0
  65. package/dist/cli/commands/init.js +773 -0
  66. package/dist/cli/commands/init.js.map +1 -0
  67. package/dist/cli/commands/init.types.d.ts +193 -0
  68. package/dist/cli/commands/init.types.d.ts.map +1 -0
  69. package/dist/cli/commands/init.types.js +29 -0
  70. package/dist/cli/commands/init.types.js.map +1 -0
  71. package/dist/cli/commands/invitations.d.ts +31 -0
  72. package/dist/cli/commands/invitations.d.ts.map +1 -0
  73. package/dist/cli/commands/invitations.js +250 -0
  74. package/dist/cli/commands/invitations.js.map +1 -0
  75. package/dist/cli/commands/login.d.ts +40 -0
  76. package/dist/cli/commands/login.d.ts.map +1 -0
  77. package/dist/cli/commands/login.js +139 -0
  78. package/dist/cli/commands/login.js.map +1 -0
  79. package/dist/cli/commands/members.d.ts +55 -0
  80. package/dist/cli/commands/members.d.ts.map +1 -0
  81. package/dist/cli/commands/members.js +296 -0
  82. package/dist/cli/commands/members.js.map +1 -0
  83. package/dist/cli/commands/scaffold/agent-types.d.ts +54 -0
  84. package/dist/cli/commands/scaffold/agent-types.d.ts.map +1 -0
  85. package/dist/cli/commands/scaffold/agent-types.js +22 -0
  86. package/dist/cli/commands/scaffold/agent-types.js.map +1 -0
  87. package/dist/cli/commands/scaffold/display.d.ts +56 -0
  88. package/dist/cli/commands/scaffold/display.d.ts.map +1 -0
  89. package/dist/cli/commands/scaffold/display.js +217 -0
  90. package/dist/cli/commands/scaffold/display.js.map +1 -0
  91. package/dist/cli/commands/scaffold/files.d.ts +99 -0
  92. package/dist/cli/commands/scaffold/files.d.ts.map +1 -0
  93. package/dist/cli/commands/scaffold/files.js +122 -0
  94. package/dist/cli/commands/scaffold/files.js.map +1 -0
  95. package/dist/cli/commands/scaffold/index.d.ts +13 -0
  96. package/dist/cli/commands/scaffold/index.d.ts.map +1 -0
  97. package/dist/cli/commands/scaffold/index.js +12 -0
  98. package/dist/cli/commands/scaffold/index.js.map +1 -0
  99. package/dist/cli/commands/scaffold/register.d.ts +11 -0
  100. package/dist/cli/commands/scaffold/register.d.ts.map +1 -0
  101. package/dist/cli/commands/scaffold/register.js +11 -0
  102. package/dist/cli/commands/scaffold/register.js.map +1 -0
  103. package/dist/cli/commands/scaffold/scaffold.d.ts +11 -0
  104. package/dist/cli/commands/scaffold/scaffold.d.ts.map +1 -0
  105. package/dist/cli/commands/scaffold/scaffold.js +728 -0
  106. package/dist/cli/commands/scaffold/scaffold.js.map +1 -0
  107. package/dist/cli/commands/scaffold/targets.d.ts +60 -0
  108. package/dist/cli/commands/scaffold/targets.d.ts.map +1 -0
  109. package/dist/cli/commands/scaffold/targets.js +251 -0
  110. package/dist/cli/commands/scaffold/targets.js.map +1 -0
  111. package/dist/cli/commands/scaffold/types.d.ts +170 -0
  112. package/dist/cli/commands/scaffold/types.d.ts.map +1 -0
  113. package/dist/cli/commands/scaffold/types.js +12 -0
  114. package/dist/cli/commands/scaffold/types.js.map +1 -0
  115. package/dist/cli/commands/scaffold/utils.d.ts +89 -0
  116. package/dist/cli/commands/scaffold/utils.d.ts.map +1 -0
  117. package/dist/cli/commands/scaffold/utils.js +401 -0
  118. package/dist/cli/commands/scaffold/utils.js.map +1 -0
  119. package/dist/cli/commands/status.d.ts +19 -0
  120. package/dist/cli/commands/status.d.ts.map +1 -0
  121. package/dist/cli/commands/status.js +124 -0
  122. package/dist/cli/commands/status.js.map +1 -0
  123. package/dist/cli/commands/status.types.d.ts +37 -0
  124. package/dist/cli/commands/status.types.d.ts.map +1 -0
  125. package/dist/cli/commands/status.types.js +7 -0
  126. package/dist/cli/commands/status.types.js.map +1 -0
  127. package/dist/cli/commands/switch.d.ts +18 -0
  128. package/dist/cli/commands/switch.d.ts.map +1 -0
  129. package/dist/cli/commands/switch.js +134 -0
  130. package/dist/cli/commands/switch.js.map +1 -0
  131. package/dist/cli/commands/switch.types.d.ts +123 -0
  132. package/dist/cli/commands/switch.types.d.ts.map +1 -0
  133. package/dist/cli/commands/switch.types.js +46 -0
  134. package/dist/cli/commands/switch.types.js.map +1 -0
  135. package/dist/cli/config/agent-teams.types.d.ts +120 -0
  136. package/dist/cli/config/agent-teams.types.d.ts.map +1 -0
  137. package/dist/cli/config/agent-teams.types.js +23 -0
  138. package/dist/cli/config/agent-teams.types.js.map +1 -0
  139. package/dist/cli/config/index.d.ts +13 -0
  140. package/dist/cli/config/index.d.ts.map +1 -0
  141. package/dist/cli/config/index.js +7 -0
  142. package/dist/cli/config/index.js.map +1 -0
  143. package/dist/cli/config/loader.d.ts +114 -0
  144. package/dist/cli/config/loader.d.ts.map +1 -0
  145. package/dist/cli/config/loader.js +198 -0
  146. package/dist/cli/config/loader.js.map +1 -0
  147. package/dist/cli/config/paths.d.ts +107 -0
  148. package/dist/cli/config/paths.d.ts.map +1 -0
  149. package/dist/cli/config/paths.js +79 -0
  150. package/dist/cli/config/paths.js.map +1 -0
  151. package/dist/cli/config/planning-sessions-registry.d.ts +52 -0
  152. package/dist/cli/config/planning-sessions-registry.d.ts.map +1 -0
  153. package/dist/cli/config/planning-sessions-registry.js +46 -0
  154. package/dist/cli/config/planning-sessions-registry.js.map +1 -0
  155. package/dist/cli/config/types.d.ts +186 -0
  156. package/dist/cli/config/types.d.ts.map +1 -0
  157. package/dist/cli/config/types.js +27 -0
  158. package/dist/cli/config/types.js.map +1 -0
  159. package/dist/cli/config/validation.d.ts +62 -0
  160. package/dist/cli/config/validation.d.ts.map +1 -0
  161. package/dist/cli/config/validation.js +133 -0
  162. package/dist/cli/config/validation.js.map +1 -0
  163. package/dist/cli/config/writer.d.ts +153 -0
  164. package/dist/cli/config/writer.d.ts.map +1 -0
  165. package/dist/cli/config/writer.js +168 -0
  166. package/dist/cli/config/writer.js.map +1 -0
  167. package/dist/cli/index.d.ts +30 -0
  168. package/dist/cli/index.d.ts.map +1 -0
  169. package/dist/cli/index.js +142 -0
  170. package/dist/cli/index.js.map +1 -0
  171. package/dist/cli/middleware/auth-guard.d.ts +107 -0
  172. package/dist/cli/middleware/auth-guard.d.ts.map +1 -0
  173. package/dist/cli/middleware/auth-guard.js +97 -0
  174. package/dist/cli/middleware/auth-guard.js.map +1 -0
  175. package/dist/cli/middleware/error-handler.d.ts +133 -0
  176. package/dist/cli/middleware/error-handler.d.ts.map +1 -0
  177. package/dist/cli/middleware/error-handler.js +139 -0
  178. package/dist/cli/middleware/error-handler.js.map +1 -0
  179. package/dist/cli/middleware/index.d.ts +6 -0
  180. package/dist/cli/middleware/index.d.ts.map +1 -0
  181. package/dist/cli/middleware/index.js +3 -0
  182. package/dist/cli/middleware/index.js.map +1 -0
  183. package/dist/cli/templates/agents/content/core/sfag-orchestrator.d.ts +9 -0
  184. package/dist/cli/templates/agents/content/core/sfag-orchestrator.d.ts.map +1 -0
  185. package/dist/cli/templates/agents/content/core/sfag-orchestrator.js +160 -0
  186. package/dist/cli/templates/agents/content/core/sfag-orchestrator.js.map +1 -0
  187. package/dist/cli/templates/agents/content/core/sfag-spec-creator.d.ts +9 -0
  188. package/dist/cli/templates/agents/content/core/sfag-spec-creator.d.ts.map +1 -0
  189. package/dist/cli/templates/agents/content/core/sfag-spec-creator.js +343 -0
  190. package/dist/cli/templates/agents/content/core/sfag-spec-creator.js.map +1 -0
  191. package/dist/cli/templates/agents/content/core/sfag-ticket-implementer.d.ts +9 -0
  192. package/dist/cli/templates/agents/content/core/sfag-ticket-implementer.d.ts.map +1 -0
  193. package/dist/cli/templates/agents/content/core/sfag-ticket-implementer.js +254 -0
  194. package/dist/cli/templates/agents/content/core/sfag-ticket-implementer.js.map +1 -0
  195. package/dist/cli/templates/agents/content/research/sfag-package-researcher.d.ts +8 -0
  196. package/dist/cli/templates/agents/content/research/sfag-package-researcher.d.ts.map +1 -0
  197. package/dist/cli/templates/agents/content/research/sfag-package-researcher.js +128 -0
  198. package/dist/cli/templates/agents/content/research/sfag-package-researcher.js.map +1 -0
  199. package/dist/cli/templates/agents/index.d.ts +23 -0
  200. package/dist/cli/templates/agents/index.d.ts.map +1 -0
  201. package/dist/cli/templates/agents/index.js +29 -0
  202. package/dist/cli/templates/agents/index.js.map +1 -0
  203. package/dist/cli/templates/commands.d.ts +17 -0
  204. package/dist/cli/templates/commands.d.ts.map +1 -0
  205. package/dist/cli/templates/commands.js +78 -0
  206. package/dist/cli/templates/commands.js.map +1 -0
  207. package/dist/cli/templates/content/sf-blockers.d.ts +7 -0
  208. package/dist/cli/templates/content/sf-blockers.d.ts.map +1 -0
  209. package/dist/cli/templates/content/sf-blockers.js +69 -0
  210. package/dist/cli/templates/content/sf-blockers.js.map +1 -0
  211. package/dist/cli/templates/content/sf-commit.d.ts +7 -0
  212. package/dist/cli/templates/content/sf-commit.d.ts.map +1 -0
  213. package/dist/cli/templates/content/sf-commit.js +79 -0
  214. package/dist/cli/templates/content/sf-commit.js.map +1 -0
  215. package/dist/cli/templates/content/sf-context.d.ts +7 -0
  216. package/dist/cli/templates/content/sf-context.d.ts.map +1 -0
  217. package/dist/cli/templates/content/sf-context.js +63 -0
  218. package/dist/cli/templates/content/sf-context.js.map +1 -0
  219. package/dist/cli/templates/content/sf-help.d.ts +7 -0
  220. package/dist/cli/templates/content/sf-help.d.ts.map +1 -0
  221. package/dist/cli/templates/content/sf-help.js +42 -0
  222. package/dist/cli/templates/content/sf-help.js.map +1 -0
  223. package/dist/cli/templates/content/sf-init.d.ts +7 -0
  224. package/dist/cli/templates/content/sf-init.d.ts.map +1 -0
  225. package/dist/cli/templates/content/sf-init.js +62 -0
  226. package/dist/cli/templates/content/sf-init.js.map +1 -0
  227. package/dist/cli/templates/content/sf-reset.d.ts +7 -0
  228. package/dist/cli/templates/content/sf-reset.d.ts.map +1 -0
  229. package/dist/cli/templates/content/sf-reset.js +67 -0
  230. package/dist/cli/templates/content/sf-reset.js.map +1 -0
  231. package/dist/cli/templates/content/sf-search.d.ts +7 -0
  232. package/dist/cli/templates/content/sf-search.d.ts.map +1 -0
  233. package/dist/cli/templates/content/sf-search.js +63 -0
  234. package/dist/cli/templates/content/sf-search.js.map +1 -0
  235. package/dist/cli/templates/content/sf-status.d.ts +7 -0
  236. package/dist/cli/templates/content/sf-status.d.ts.map +1 -0
  237. package/dist/cli/templates/content/sf-status.js +62 -0
  238. package/dist/cli/templates/content/sf-status.js.map +1 -0
  239. package/dist/cli/templates/index.d.ts +8 -0
  240. package/dist/cli/templates/index.d.ts.map +1 -0
  241. package/dist/cli/templates/index.js +17 -0
  242. package/dist/cli/templates/index.js.map +1 -0
  243. package/dist/cli/ui/banner.d.ts +38 -0
  244. package/dist/cli/ui/banner.d.ts.map +1 -0
  245. package/dist/cli/ui/banner.js +89 -0
  246. package/dist/cli/ui/banner.js.map +1 -0
  247. package/dist/cli/ui/colors.d.ts +76 -0
  248. package/dist/cli/ui/colors.d.ts.map +1 -0
  249. package/dist/cli/ui/colors.js +67 -0
  250. package/dist/cli/ui/colors.js.map +1 -0
  251. package/dist/cli/ui/index.d.ts +7 -0
  252. package/dist/cli/ui/index.d.ts.map +1 -0
  253. package/dist/cli/ui/index.js +4 -0
  254. package/dist/cli/ui/index.js.map +1 -0
  255. package/dist/cli/ui/output.d.ts +117 -0
  256. package/dist/cli/ui/output.d.ts.map +1 -0
  257. package/dist/cli/ui/output.js +83 -0
  258. package/dist/cli/ui/output.js.map +1 -0
  259. package/dist/cli/ui/spinner.d.ts +120 -0
  260. package/dist/cli/ui/spinner.d.ts.map +1 -0
  261. package/dist/cli/ui/spinner.js +158 -0
  262. package/dist/cli/ui/spinner.js.map +1 -0
  263. package/dist/cli/ui/time.d.ts +54 -0
  264. package/dist/cli/ui/time.d.ts.map +1 -0
  265. package/dist/cli/ui/time.js +119 -0
  266. package/dist/cli/ui/time.js.map +1 -0
  267. package/dist/client/api-client.d.ts +123 -0
  268. package/dist/client/api-client.d.ts.map +1 -0
  269. package/dist/client/api-client.js +105 -0
  270. package/dist/client/api-client.js.map +1 -0
  271. package/dist/client/cli-client.d.ts +26 -0
  272. package/dist/client/cli-client.d.ts.map +1 -0
  273. package/dist/client/cli-client.js +20 -0
  274. package/dist/client/cli-client.js.map +1 -0
  275. package/dist/config/index.d.ts +78 -0
  276. package/dist/config/index.d.ts.map +1 -0
  277. package/dist/config/index.js +79 -0
  278. package/dist/config/index.js.map +1 -0
  279. package/dist/index.d.ts +16 -0
  280. package/dist/index.d.ts.map +1 -0
  281. package/dist/index.js +73 -0
  282. package/dist/index.js.map +1 -0
  283. package/dist/lib/format.d.ts +126 -0
  284. package/dist/lib/format.d.ts.map +1 -0
  285. package/dist/lib/format.js +71 -0
  286. package/dist/lib/format.js.map +1 -0
  287. package/dist/lib/index.d.ts +11 -0
  288. package/dist/lib/index.d.ts.map +1 -0
  289. package/dist/lib/index.js +45 -0
  290. package/dist/lib/index.js.map +1 -0
  291. package/dist/lib/monorepo-detector.d.ts +31 -0
  292. package/dist/lib/monorepo-detector.d.ts.map +1 -0
  293. package/dist/lib/monorepo-detector.js +188 -0
  294. package/dist/lib/monorepo-detector.js.map +1 -0
  295. package/dist/lib/prompt-generator.d.ts +65 -0
  296. package/dist/lib/prompt-generator.d.ts.map +1 -0
  297. package/dist/lib/prompt-generator.js +162 -0
  298. package/dist/lib/prompt-generator.js.map +1 -0
  299. package/dist/lib/strategy-analyzer.d.ts +59 -0
  300. package/dist/lib/strategy-analyzer.d.ts.map +1 -0
  301. package/dist/lib/strategy-analyzer.js +91 -0
  302. package/dist/lib/strategy-analyzer.js.map +1 -0
  303. package/dist/lib/workflow-definitions.d.ts +41 -0
  304. package/dist/lib/workflow-definitions.d.ts.map +1 -0
  305. package/dist/lib/workflow-definitions.js +497 -0
  306. package/dist/lib/workflow-definitions.js.map +1 -0
  307. package/dist/patterns/index.d.ts +9 -0
  308. package/dist/patterns/index.d.ts.map +1 -0
  309. package/dist/patterns/index.js +21 -0
  310. package/dist/patterns/index.js.map +1 -0
  311. package/dist/patterns/inheritance.d.ts +193 -0
  312. package/dist/patterns/inheritance.d.ts.map +1 -0
  313. package/dist/patterns/inheritance.js +125 -0
  314. package/dist/patterns/inheritance.js.map +1 -0
  315. package/dist/server.d.ts +44 -0
  316. package/dist/server.d.ts.map +1 -0
  317. package/dist/server.js +91 -0
  318. package/dist/server.js.map +1 -0
  319. package/dist/tools/core/context-helper.d.ts +50 -0
  320. package/dist/tools/core/context-helper.d.ts.map +1 -0
  321. package/dist/tools/core/context-helper.js +49 -0
  322. package/dist/tools/core/context-helper.js.map +1 -0
  323. package/dist/tools/core/index.d.ts +2 -0
  324. package/dist/tools/core/index.d.ts.map +1 -0
  325. package/dist/tools/core/index.js +2 -0
  326. package/dist/tools/core/index.js.map +1 -0
  327. package/dist/tools/index.d.ts +58 -0
  328. package/dist/tools/index.d.ts.map +1 -0
  329. package/dist/tools/index.js +1499 -0
  330. package/dist/tools/index.js.map +1 -0
  331. package/dist/transport/__tests__/resolve-endpoint.test.d.ts +6 -0
  332. package/dist/transport/__tests__/resolve-endpoint.test.d.ts.map +1 -0
  333. package/dist/transport/index.d.ts +6 -0
  334. package/dist/transport/index.d.ts.map +1 -0
  335. package/dist/transport/index.js +5 -0
  336. package/dist/transport/index.js.map +1 -0
  337. package/dist/transport/interface.d.ts +25 -0
  338. package/dist/transport/interface.d.ts.map +1 -0
  339. package/dist/transport/interface.js +1 -0
  340. package/dist/transport/interface.js.map +1 -0
  341. package/dist/transport/remote.d.ts +38 -0
  342. package/dist/transport/remote.d.ts.map +1 -0
  343. package/dist/transport/remote.js +107 -0
  344. package/dist/transport/remote.js.map +1 -0
  345. package/dist/transport/resolve-endpoint.d.ts +58 -0
  346. package/dist/transport/resolve-endpoint.d.ts.map +1 -0
  347. package/dist/transport/resolve-endpoint.js +146 -0
  348. package/dist/transport/resolve-endpoint.js.map +1 -0
  349. package/dist/types/index.d.ts +212 -0
  350. package/dist/types/index.d.ts.map +1 -0
  351. package/dist/types/index.js +16 -0
  352. package/dist/types/index.js.map +1 -0
  353. package/dist/validation/index.d.ts +86 -0
  354. package/dist/validation/index.d.ts.map +1 -0
  355. package/dist/validation/index.js +392 -0
  356. package/dist/validation/index.js.map +1 -0
  357. package/dist/validation/ticket-validation.d.ts +162 -0
  358. package/dist/validation/ticket-validation.d.ts.map +1 -0
  359. package/dist/validation/ticket-validation.js +188 -0
  360. package/dist/validation/ticket-validation.js.map +1 -0
  361. package/package.json +69 -0
  362. package/src/cli/templates/agents/content/core/sfag-orchestrator.ts +165 -0
  363. package/src/cli/templates/agents/content/core/sfag-spec-creator.ts +348 -0
  364. package/src/cli/templates/agents/content/core/sfag-ticket-implementer.ts +259 -0
  365. package/src/cli/templates/agents/content/research/sfag-package-researcher.ts +132 -0
  366. package/src/cli/templates/agents/index.ts +47 -0
  367. package/src/cli/templates/commands.ts +90 -0
  368. package/src/cli/templates/content/sf-blockers.ts +71 -0
  369. package/src/cli/templates/content/sf-commit.ts +81 -0
  370. package/src/cli/templates/content/sf-context.ts +65 -0
  371. package/src/cli/templates/content/sf-help.ts +44 -0
  372. package/src/cli/templates/content/sf-init.ts +64 -0
  373. package/src/cli/templates/content/sf-reset.ts +69 -0
  374. package/src/cli/templates/content/sf-search.ts +65 -0
  375. package/src/cli/templates/content/sf-status.ts +64 -0
  376. package/src/cli/templates/index.ts +16 -0
  377. package/src/cli/templates/skills/specforge-conventions.md +114 -0
  378. package/src/cli/templates/skills/specforge-orchestrator.md +409 -0
  379. package/src/cli/templates/skills/specforge-validator.md +128 -0
  380. package/src/cli/templates/skills/specforge-worker.md +412 -0
@@ -0,0 +1,132 @@
1
+ /**
2
+ * SFAG-Package-Researcher Agent Template v2
3
+ *
4
+ * Lean research agent. Find docs, extract what matters, report back.
5
+ */
6
+
7
+ import type { AgentTemplate } from '../../../../commands/scaffold/agent-types.js';
8
+
9
+ export const SFAG_PACKAGE_RESEARCHER: AgentTemplate = {
10
+ name: 'sfag-package-researcher',
11
+ description: 'Research packages, APIs, and external docs',
12
+ triggerDescription: `Use this agent when you need to research external packages, libraries, or APIs before implementation. Gathers documentation, patterns, and gotchas.
13
+
14
+ <example>
15
+ Context: Ticket references a package the team hasn't used
16
+ user: "Pesquisa como usar Stripe webhooks em Node.js antes de implementar"
17
+ assistant: "Launching sfag-package-researcher to gather Stripe webhook docs and patterns."
18
+ </example>
19
+
20
+ <example>
21
+ Context: Orchestrator needs research before delegating implementation
22
+ user: "O ticket menciona usar Resend pra email — pesquisa primeiro"
23
+ assistant: "Launching sfag-package-researcher to research Resend before implementation."
24
+ </example>
25
+
26
+ <example>
27
+ Context: User wants to evaluate options
28
+ user: "Compara Zod vs Yup vs Joi pra validação"
29
+ assistant: "Launching sfag-package-researcher to compare validation libraries."
30
+ </example>`,
31
+ model: 'sonnet',
32
+ color: 'magenta',
33
+ category: 'Research',
34
+ memory: 'project',
35
+ content: `# SpecForge Package Researcher Agent
36
+
37
+ You research external packages and APIs. You find what matters, skip the noise, and deliver actionable intelligence for implementation.
38
+
39
+ ## Process
40
+
41
+ ### 1. Search (official sources first)
42
+ \`\`\`
43
+ Search priority:
44
+ 1. Official docs site
45
+ 2. Official GitHub repo + README
46
+ 3. Official examples/tutorials
47
+ 4. npm/PyPI page for metadata (version, size, maintenance)
48
+
49
+ Skip: Random blog posts, outdated tutorials, Stack Overflow answers from 3 years ago.
50
+ \`\`\`
51
+
52
+ ### 2. Extract (only what implementation needs)
53
+
54
+ For each package, gather:
55
+
56
+ - **Install command** — exact, with version if it matters
57
+ - **Minimal setup** — the shortest working example
58
+ - **API surface** — the 3-5 functions/methods the ticket will actually use (not the full API reference)
59
+ - **Configuration** — required config, env vars, secrets needed
60
+ - **Error handling** — what errors does it throw? How to handle them?
61
+ - **Gotchas** — breaking changes between versions, known bugs, things that don't work as expected
62
+ - **Bundle/performance impact** — size, cold start implications, memory usage if relevant
63
+
64
+ ### 3. Report (structured, no prose)
65
+
66
+ Output format:
67
+
68
+ \`\`\`markdown
69
+ # [Package Name] Research
70
+
71
+ **Version:** x.y.z | **Last updated:** date | **Weekly downloads:** N
72
+
73
+ ## Install
74
+ \\\`\\\`\\\`bash
75
+ npm install package-name
76
+ \\\`\\\`\\\`
77
+
78
+ ## Setup
79
+ \\\`\\\`\\\`typescript
80
+ // Minimal working example — copy-paste ready
81
+ \\\`\\\`\\\`
82
+
83
+ ## Key APIs (relevant to this task)
84
+ - \`functionA(params)\` — what it does, what it returns
85
+ - \`functionB(params)\` — what it does, what it returns
86
+
87
+ ## Configuration
88
+ | Key | Required | Default | Description |
89
+ |-----|----------|---------|-------------|
90
+ | API_KEY | Yes | - | Your API key from dashboard |
91
+
92
+ ## Error Handling
93
+ - \`PackageError\` — when X happens, handle with Y
94
+ - Rate limits: N requests/min, returns 429
95
+
96
+ ## Gotchas
97
+ - ⚠️ Version 3.x has breaking change in X
98
+ - ⚠️ Does NOT work with ESM unless you configure Y
99
+ - ⚠️ TypeScript types are incomplete for Z
100
+
101
+ ## Recommendation
102
+ [Use it / Don't use it / Use alternative X instead] — because [concrete reason]
103
+ \`\`\`
104
+
105
+ ## Comparison Mode
106
+
107
+ When asked to compare packages:
108
+
109
+ \`\`\`markdown
110
+ # Comparison: A vs B vs C
111
+
112
+ | Criteria | A | B | C |
113
+ |----------|---|---|---|
114
+ | Bundle size | X kb | Y kb | Z kb |
115
+ | TypeScript | Native | @types | None |
116
+ | Maintenance | Active | Stale | Active |
117
+ | API style | Fluent | Declarative | Mixed |
118
+ | [project-specific criteria] | ... | ... | ... |
119
+
120
+ ## Verdict
121
+ Use [X] because [concrete reasons relevant to this project's stack and constraints].
122
+ \`\`\`
123
+
124
+ ## Rules
125
+
126
+ - **Official docs or nothing.** Don't cite a Medium post from 2021 as a source.
127
+ - **Version matters.** Always note the version. APIs change between majors.
128
+ - **Working examples only.** If you can't verify the code works, say so.
129
+ - **Be opinionated.** If a package is garbage, say it's garbage and recommend an alternative. Don't be diplomatic about bad tools.
130
+ - **Stay scoped.** Research what the ticket/task needs, not the entire package ecosystem. If the task uses 2 functions from a 200-function library, document those 2.
131
+ `,
132
+ };
@@ -0,0 +1,47 @@
1
+ /**
2
+ * Agent Templates Module
3
+ *
4
+ * Defines all SpecForge agent templates for scaffolding to AI CLI tools.
5
+ */
6
+
7
+ import type { AgentTemplate, AgentCategory } from '../../commands/scaffold/agent-types.js';
8
+
9
+ import { SFAG_ORCHESTRATOR } from './content/core/sfag-orchestrator.js';
10
+ import { SFAG_SPEC_CREATOR } from './content/core/sfag-spec-creator.js';
11
+ import { SFAG_TICKET_IMPLEMENTER } from './content/core/sfag-ticket-implementer.js';
12
+ import { SFAG_PACKAGE_RESEARCHER } from './content/research/sfag-package-researcher.js';
13
+
14
+ const AGENT_TEMPLATES: AgentTemplate[] = [
15
+ SFAG_ORCHESTRATOR,
16
+ SFAG_SPEC_CREATOR,
17
+ SFAG_TICKET_IMPLEMENTER,
18
+ SFAG_PACKAGE_RESEARCHER,
19
+ ];
20
+
21
+ /**
22
+ * Get all agent templates
23
+ */
24
+ export function getAgentTemplates(): AgentTemplate[] {
25
+ return AGENT_TEMPLATES;
26
+ }
27
+
28
+ /**
29
+ * Get a specific agent template by name
30
+ */
31
+ export function getAgentTemplate(name: string): AgentTemplate | undefined {
32
+ return AGENT_TEMPLATES.find(t => t.name === name);
33
+ }
34
+
35
+ /**
36
+ * Get agent templates by category
37
+ */
38
+ export function getAgentsByCategory(category: AgentCategory): AgentTemplate[] {
39
+ return AGENT_TEMPLATES.filter(t => t.category === category);
40
+ }
41
+
42
+ /**
43
+ * Get all agent template names
44
+ */
45
+ export function getAgentNames(): string[] {
46
+ return AGENT_TEMPLATES.map(t => t.name);
47
+ }
@@ -0,0 +1,90 @@
1
+ /**
2
+ * Command Templates Module
3
+ *
4
+ * Defines all SpecForge slash commands with their full markdown content
5
+ * for scaffolding to AI CLI tools.
6
+ */
7
+
8
+ import type { CommandTemplate } from '../commands/scaffold/types.js';
9
+
10
+ import { SF_INIT_CONTENT } from './content/sf-init.js';
11
+ import { SF_STATUS_CONTENT } from './content/sf-status.js';
12
+ import { SF_RESET_CONTENT } from './content/sf-reset.js';
13
+ import { SF_ANALYZE_BLOCKERS_CONTENT } from './content/sf-blockers.js';
14
+ import { SF_CONTEXT_CONTENT } from './content/sf-context.js';
15
+ import { SF_SEARCH_CONTENT } from './content/sf-search.js';
16
+ import { SF_COMMIT_CONTENT } from './content/sf-commit.js';
17
+ import { SF_HELP_CONTENT } from './content/sf-help.js';
18
+
19
+ export function getCommandTemplates(): CommandTemplate[] {
20
+ return [
21
+ {
22
+ name: 'sf-init',
23
+ description: 'Initialize ticket system for a specification',
24
+ argumentHint: '[specification-id]',
25
+ content: SF_INIT_CONTENT,
26
+ category: 'Setup',
27
+ },
28
+ {
29
+ name: 'sf-context',
30
+ description: 'View or switch working context',
31
+ argumentHint: '[project-or-spec-id]',
32
+ content: SF_CONTEXT_CONTENT,
33
+ category: 'Setup',
34
+ },
35
+ {
36
+ name: 'sf-status',
37
+ description: 'Display implementation status with consolidated tools',
38
+ argumentHint: '[specification-id]',
39
+ content: SF_STATUS_CONTENT,
40
+ category: 'Status',
41
+ },
42
+ {
43
+ name: 'sf-analyze-blockers',
44
+ description: 'Analyze blockers and dependency bottlenecks',
45
+ content: SF_ANALYZE_BLOCKERS_CONTENT,
46
+ category: 'Status',
47
+ },
48
+ {
49
+ name: 'sf-search',
50
+ description: 'Search tickets by text, tags, or filters',
51
+ argumentHint: '<query>',
52
+ content: SF_SEARCH_CONTENT,
53
+ category: 'Review',
54
+ },
55
+ {
56
+ name: 'sf-reset',
57
+ description: 'Reset ticket statuses with dependency awareness',
58
+ argumentHint: '[specification-id]',
59
+ content: SF_RESET_CONTENT,
60
+ category: 'Utilities',
61
+ },
62
+ {
63
+ name: 'sf-commit',
64
+ description: 'Commit changes with SpecForge ticket metadata',
65
+ argumentHint: '[ticket-id]',
66
+ content: SF_COMMIT_CONTENT,
67
+ category: 'Utilities',
68
+ },
69
+ {
70
+ name: 'sf-help',
71
+ description: 'Quick reference for all SpecForge commands',
72
+ content: SF_HELP_CONTENT,
73
+ category: 'Utilities',
74
+ },
75
+ ];
76
+ }
77
+
78
+ /**
79
+ * Get a specific command template by name
80
+ */
81
+ export function getCommandTemplate(name: string): CommandTemplate | undefined {
82
+ return getCommandTemplates().find(t => t.name === name);
83
+ }
84
+
85
+ /**
86
+ * Get command templates by category
87
+ */
88
+ export function getCommandsByCategory(category: string): CommandTemplate[] {
89
+ return getCommandTemplates().filter(t => t.category === category);
90
+ }
@@ -0,0 +1,71 @@
1
+ /**
2
+ * SF-Analyze-Blockers Command Template
3
+ *
4
+ * Template for analyzing blockers and dependency bottlenecks.
5
+ */
6
+
7
+ export const SF_ANALYZE_BLOCKERS_CONTENT = `# Analyze Blockers (SpecForge)
8
+
9
+ Analyze dependency bottlenecks and identify critical path tickets.
10
+
11
+ ## Task
12
+
13
+ ### 1. Get Implementation Data
14
+
15
+ **MCP Calls:**
16
+ \`\`\`typescript
17
+ // Read project config
18
+ const config = readFile('.specforge.json')
19
+ const specificationId = config.activeSpecification?.id
20
+
21
+ get_specification({ specificationId })
22
+ list_epics({ specificationId })
23
+ list_tickets({ specificationId })
24
+ \`\`\`
25
+
26
+ ### 2. Analyze Dependencies
27
+
28
+ **Logic:**
29
+ - Build dependency graph
30
+ - Calculate blocking relationships
31
+ - Identify critical path
32
+ - Find bottleneck tickets
33
+
34
+ ### 3. Display Analysis Results
35
+
36
+ **Output:**
37
+ \`\`\`
38
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
39
+ BLOCKER ANALYSIS
40
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
41
+ Specification: {title}
42
+
43
+ CRITICAL PATH
44
+ ─────────────────────────────────────────────────────────────────
45
+ Length: {pathLength} tickets
46
+ Impact: {blockedCount} tickets blocked
47
+
48
+ E{n}-T{m} → E{n}-T{m} → E{n}-T{m} → ...
49
+
50
+ HIGH-IMPACT BLOCKERS
51
+ ─────────────────────────────────────────────────────────────────
52
+ E{n}-T{m} │ {title} │ Blocking {count} tickets
53
+ ↳ E{n}-T{m}, E{n}-T{m}, E{n}-T{m}
54
+
55
+ BLOCKED TICKETS
56
+ ─────────────────────────────────────────────────────────────────
57
+ E{n}-T{m} │ {title}
58
+ ⚠ Waiting on: E{n}-T{m} ({status})
59
+
60
+ RECOMMENDATIONS
61
+ ─────────────────────────────────────────────────────────────────
62
+ • Prioritize E{n}-T{m} to unblock {count} tickets
63
+ • Review dependency chain for E{n}-T{m}
64
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
65
+ \`\`\`
66
+
67
+ ## Notes
68
+ - Identifies tickets blocking the most work
69
+ - Shows critical path through implementation
70
+ - Provides actionable recommendations
71
+ `;
@@ -0,0 +1,81 @@
1
+ /**
2
+ * SF-Commit Command Template
3
+ *
4
+ * Template for committing changes with SpecForge ticket metadata.
5
+ */
6
+
7
+ export const SF_COMMIT_CONTENT = `# Commit Changes (SpecForge)
8
+
9
+ Create a git commit with SpecForge ticket metadata.
10
+
11
+ ## Arguments
12
+ - \`$ARGUMENTS\` - Optional: Ticket ID (uses context if not provided)
13
+
14
+ ## Task
15
+
16
+ ### 1. Get Ticket Context
17
+
18
+ **MCP Calls:**
19
+ \`\`\`typescript
20
+ if ($ARGUMENTS) {
21
+ get_ticket({ ticketId: $ARGUMENTS })
22
+ } else {
23
+ // Read active ticket from .specforge.json or find active ticket
24
+ const config = readFile('.specforge.json')
25
+ const specificationId = config.activeSpecification?.id
26
+ // Find the currently active ticket
27
+ list_tickets({ specificationId, status: ["active"] })
28
+ // Use the active ticket
29
+ get_ticket({ ticketId: activeTicket.id })
30
+ }
31
+ \`\`\`
32
+
33
+ ### 2. Generate Commit Message
34
+
35
+ **Logic:**
36
+ - Format: \`feat(scope): description (TICKET-ID)\`
37
+ - Extract scope from epic
38
+ - Use ticket title as description
39
+ - Add ticket ID reference
40
+
41
+ ### 3. Create Commit
42
+
43
+ **Shell:**
44
+ \`\`\`bash
45
+ git add .
46
+ git commit -m "{type}({scope}): {description} ({ticketId})"
47
+ \`\`\`
48
+
49
+ ### 4. Update Ticket Status
50
+
51
+ **MCP Calls:**
52
+ \`\`\`typescript
53
+ complete_work_session({
54
+ ticketId: ticket.id
55
+ })
56
+ \`\`\`
57
+
58
+ ### 5. Display Commit Result
59
+
60
+ **Output:**
61
+ \`\`\`
62
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
63
+ COMMIT CREATED
64
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
65
+ Ticket: E{n}-T{m}
66
+ Message: {commitMessage}
67
+ Hash: {commitHash}
68
+
69
+ TICKET COMPLETED
70
+ ─────────────────────────────────────────────────────────────────
71
+ ✓ E{n}-T{m} marked as done
72
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
73
+
74
+ Next: Run /sf-next for the next ticket
75
+ \`\`\`
76
+
77
+ ## Notes
78
+ - Automatically completes the work session
79
+ - Uses conventional commit format
80
+ - Includes ticket ID for traceability
81
+ `;
@@ -0,0 +1,65 @@
1
+ /**
2
+ * SF-Context Command Template
3
+ *
4
+ * Template for viewing or switching working context.
5
+ */
6
+
7
+ export const SF_CONTEXT_CONTENT = `# Working Context (SpecForge)
8
+
9
+ Quickly view or switch the current working context.
10
+
11
+ ## Arguments
12
+ - \`$ARGUMENTS\` - Optional: Project or Specification ID to switch to
13
+
14
+ ## Task
15
+
16
+ ### 1. If No Arguments - Show Current Context
17
+
18
+ **Logic:**
19
+ \`\`\`typescript
20
+ // Read project config
21
+ const config = readFile('.specforge.json')
22
+ const projectId = config.project.id
23
+ const specificationId = config.activeSpecification?.id
24
+
25
+ // Load details
26
+ if (specificationId) {
27
+ get_specification({ specificationId, include: ["status"] })
28
+ }
29
+ \`\`\`
30
+
31
+ **Output:**
32
+ \`\`\`
33
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
34
+ WORKING CONTEXT
35
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
36
+ Project: {project.name}
37
+ Specification: {spec.title}
38
+ Source: .specforge.json
39
+
40
+ Progress: {done}/{total} ({pct}%)
41
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
42
+ \`\`\`
43
+
44
+ ### 2. If Arguments - Switch Context
45
+
46
+ **Logic:**
47
+ \`\`\`typescript
48
+ // Try as specification first
49
+ get_specification({ specificationId: $ARGUMENTS })
50
+
51
+ // Update .specforge.json activeSpecification
52
+ // (or inform user to update manually)
53
+ \`\`\`
54
+
55
+ **Output:**
56
+ \`\`\`
57
+ ✓ Switched to: {name}
58
+ Update .specforge.json activeSpecification.id to persist.
59
+ \`\`\`
60
+
61
+ ## Notes
62
+ - No argument = show current context
63
+ - With argument = switch context
64
+ - Auto-detects if ID is project or specification
65
+ `;
@@ -0,0 +1,44 @@
1
+ /**
2
+ * SF-Help Command Template
3
+ *
4
+ * Template for displaying SpecForge command reference.
5
+ */
6
+
7
+ export const SF_HELP_CONTENT = `# SpecForge Command Reference
8
+
9
+ Quick reference for all available SpecForge slash commands.
10
+
11
+ ## Task
12
+
13
+ Display the command reference:
14
+
15
+ \`\`\`
16
+ ═══════════════════════════════════════════════════════════════════
17
+ SPECFORGE COMMAND REFERENCE
18
+ ═══════════════════════════════════════════════════════════════════
19
+
20
+ SETUP & CONTEXT
21
+ /sf-init [spec-id] Initialize specification for work
22
+ /sf-context [id] View or switch working context
23
+
24
+ STATUS & ANALYSIS
25
+ /sf-status [spec-id] Implementation status overview
26
+ /sf-analyze-blockers Dependency bottleneck analysis
27
+
28
+ SEARCH
29
+ /sf-search <query> Search tickets
30
+
31
+ UTILITIES
32
+ /sf-reset [spec-id] Reset ticket statuses
33
+ /sf-commit [ticket-id] Commit with ticket metadata
34
+
35
+ ═══════════════════════════════════════════════════════════════════
36
+ Tip: Use /sf-init first to set up your working context.
37
+ ═══════════════════════════════════════════════════════════════════
38
+ \`\`\`
39
+
40
+ ## Notes
41
+ - Commands use MCP tools from the SpecForge CLI
42
+ - Context is persisted across commands
43
+ - Use /sf-status to see current progress
44
+ `;
@@ -0,0 +1,64 @@
1
+ /**
2
+ * SF-Init Command Template
3
+ *
4
+ * Template for initializing SpecForge specification for implementation work.
5
+ */
6
+
7
+ export const SF_INIT_CONTENT = `# Initialize Ticket System (SpecForge)
8
+
9
+ Initialize a SpecForge specification for implementation work.
10
+
11
+ ## Arguments
12
+ - \`$ARGUMENTS\` - Optional: Specification ID to initialize
13
+
14
+ ## Task
15
+
16
+ ### 1. Get or Set Working Context
17
+
18
+ **Logic:**
19
+ \`\`\`typescript
20
+ // Read project config
21
+ const config = readFile('.specforge.json')
22
+ const projectId = config.project.id
23
+ const specificationId = $ARGUMENTS || config.activeSpecification?.id
24
+
25
+ // If no spec found, list available specs
26
+ if (!specificationId) {
27
+ list_specifications({ projectId })
28
+ // Let user pick
29
+ }
30
+ \`\`\`
31
+
32
+ ### 2. Load Specification Details
33
+
34
+ **MCP Calls:**
35
+ \`\`\`typescript
36
+ get_specification(specificationId)
37
+ list_epics({ specificationId })
38
+ list_tickets({ specificationId })
39
+ \`\`\`
40
+
41
+ ### 3. Display Initialization Summary
42
+
43
+ **Output:**
44
+ \`\`\`
45
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
46
+ SPECFORGE INITIALIZED
47
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
48
+ Specification: {title}
49
+ Status: {status}
50
+ Epics: {epicCount}
51
+ Tickets: {ticketCount}
52
+
53
+ Progress: {done}/{total} ({percentage}%)
54
+ Ready: {readyCount} tickets available
55
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
56
+
57
+ Next: Run /sf-next to start the next ready ticket
58
+ \`\`\`
59
+
60
+ ## Notes
61
+ - Context persists across commands
62
+ - Use /sf-status for detailed view
63
+ - Use /sf-next to start implementation
64
+ `;
@@ -0,0 +1,69 @@
1
+ /**
2
+ * SF-Reset Command Template
3
+ *
4
+ * Template for resetting ticket statuses with dependency awareness.
5
+ */
6
+
7
+ export const SF_RESET_CONTENT = `# Reset Ticket Statuses (SpecForge)
8
+
9
+ Reset ticket statuses to ready state with dependency awareness.
10
+
11
+ ## Arguments
12
+ - \`$ARGUMENTS\` - Optional: Specification ID or ticket ID to reset
13
+
14
+ ## Task
15
+
16
+ ### 1. Get Reset Scope
17
+
18
+ **MCP Calls:**
19
+ \`\`\`typescript
20
+ // Read project config
21
+ const config = readFile('.specforge.json')
22
+ const specificationId = $ARGUMENTS || config.activeSpecification?.id
23
+
24
+ if ($ARGUMENTS?.match(/E\d+-T\d+/)) {
25
+ // Single ticket reset
26
+ get_ticket({ ticketId: $ARGUMENTS })
27
+ } else {
28
+ // Full specification reset
29
+ list_tickets({ specificationId })
30
+ }
31
+ \`\`\`
32
+
33
+ ### 2. Reset Tickets
34
+
35
+ **MCP Calls:**
36
+ \`\`\`typescript
37
+ // Reset tickets via lifecycle operation
38
+ reset_work_session({
39
+ specificationId,
40
+ ticketId: $ARGUMENTS.match(/E\d+-T\d+/) ? $ARGUMENTS : undefined
41
+ })
42
+ \`\`\`
43
+
44
+ ### 3. Display Reset Results
45
+
46
+ **Output:**
47
+ \`\`\`
48
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
49
+ TICKET RESET COMPLETE
50
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
51
+ Scope: {scope}
52
+
53
+ RESET SUMMARY
54
+ ─────────────────────────────────────────────────────────────────
55
+ Ready: {readyCount} tickets
56
+ Blocked: {blockedCount} tickets
57
+ Done: {doneCount} tickets (unchanged)
58
+
59
+ RESET TICKETS
60
+ ─────────────────────────────────────────────────────────────────
61
+ E{n}-T{m} │ {oldStatus} → {newStatus}
62
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
63
+ \`\`\`
64
+
65
+ ## Notes
66
+ - Respects dependency constraints
67
+ - Can reset single ticket or entire specification
68
+ - Completed tickets remain unchanged by default
69
+ `;